/* LIVE LANE (f16): Wplace-style identity -- shared between the compact
   #pc-profile-panel header and the full "Player card" view. --v-* tokens
   only (style.css), same discipline full-profile.css already follows. */

.pc-id-av { position: relative; display: grid; place-items: center; }
.pc-id-canvas, .pc-id-default { image-rendering: pixelated; width: 100%; height: 100%; grid-area: 1 / 1; }
/* Un-force the UA [hidden] rule: a forced "display: block" on these two
   shared classes used to beat [hidden]'s own "display: none", so the
   default icon never actually hid once an avatar was drawn (measured via
   screenshot -- paintIdentity() set .hidden=true but the icon kept
   painting on top of the canvas in the same grid cell). */
.pc-id-canvas[hidden], .pc-id-default[hidden] { display: none; }
/* f26: .pc-icon { display:block } and panel rules beat the plain [hidden] rule, so the default face showed
   behind a drawn picture. Hidden means hidden. */
.pc-id-av .pc-id-canvas[hidden], .pc-id-av .pc-id-default[hidden] { display: none !important; }
.pc-id-canvas { position: absolute; inset: 0; border-radius: inherit; }
.pc-id-pencil {
  position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--v-surf); color: var(--v-ink);
  border: 1.5px solid var(--v-edge); cursor: pointer; padding: 0; z-index: 2;
}
.pc-id-pencil:hover { background: var(--v-acc); color: var(--v-accink); border-color: var(--v-acc); }

.pc-id-num { color: var(--v-acc); font-weight: 700; margin-left: 6px; font-size: 0.85em; }
.pc-id-flag { margin-left: 6px; }

.pc-id-badges { display: flex; gap: 6px; }
.pc-id-badge {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--v-surf2); border: 1px solid var(--v-line);
}
.pc-tint-acc { color: var(--v-acc); }
.pc-tint-bronze { color: #c97b3d; }
.pc-tint-silver { color: #b9c0c9; }
:root { --pc-gold: #e8b93c; } /* one gold for badges and the coin pill */
:root { --pc-flame: #ee3b2d; } /* one red flame (hue ~4) in light, dark and neon; --v-live is pink in neon */
.pc-tint-gold { color: var(--pc-gold); }
.pc-tint-mut { color: var(--v-mut); }

/* Frames: applied to the avatar wrap (.pc-prof-av, .pc-fp-av, .pc-ped-framedemo). */
.pc-frame-gold { box-shadow: 0 0 0 3px #e8b93c, 0 0 10px rgba(232, 185, 60, .6); }
.pc-frame-wreath { box-shadow: 0 0 0 3px #3f9142, 0 0 0 5px #c1392b; }
.pc-frame-neon { box-shadow: 0 0 0 3px #ff4fd8, 0 0 14px rgba(255, 79, 216, .7); }

/* Compact pane (#pc-profile-panel) identity row additions. */
#pc-prof-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0; }
.pc-prof-who h2 { display: flex; align-items: baseline; }
#pc-prof-badges { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--v-line); }
@media (max-width: 600px) {
  #pc-prof-badges { padding: 0 16px 10px; }
}

/* ---- Editor (inside the full Player card view) ---- */
.pc-ped { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pc-ped-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--v-line); padding-bottom: 8px; }
.pc-ped-tab {
  padding: 7px 13px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--v-mut); font: 700 13.5px/1.2 var(--v-font); cursor: pointer;
}
.pc-ped-tab.on { background: var(--v-surf2); border-color: var(--v-line); color: var(--v-ink); }
.pc-ped-pane { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pc-ped-field { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.pc-ped-input {
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--v-line); background: var(--v-surf);
  color: var(--v-ink); font: 500 14px/1.3 var(--v-font);
}
.pc-ped-input.is-error { border-color: #e24b4b; }
/* Focus ring drawn INSIDE the field (offset -2 over the 1px border, so its outer edge IS the border edge): same radius as the
   field, nothing for the editor's overflow:hidden/auto panes to clip on the left edge. Error keeps the live colour. */
.pc-ped-input:focus-visible { outline: 2px solid var(--v-acc); outline-offset: -2px; }
.pc-ped-input.is-error:focus-visible { outline-color: var(--v-live); }
.pc-ped-err { color: #e24b4b; font: 600 12.5px/1.3 var(--v-font); margin: 0; min-height: 1em; }

.pc-ped-avrow { display: flex; flex-wrap: wrap; gap: 10px; }
.pc-ped-avslot {
  width: 64px; height: 64px; border-radius: 14px; border: 2px solid var(--v-line); background: var(--v-surf2);
  padding: 0; overflow: hidden; cursor: pointer; display: grid; place-items: center;
  color: var(--v-mut); font: 600 12px/1.2 var(--v-font); text-align: center;
}
.pc-ped-avslot.on { border-color: var(--v-acc); box-shadow: 0 0 0 1.7px var(--v-acc); }
.pc-ped-avslot canvas { width: 100%; height: 100%; }

.pc-ped-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-ped-sw {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--v-line); padding: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--v-ink);
}
.pc-ped-sw.on { border-color: var(--v-acc); box-shadow: 0 0 0 1.7px var(--v-acc); }
.pc-ped-eraser { background: var(--v-surf2); }

.pc-ped-grid {
  display: grid; grid-template-columns: repeat(16, 1fr); gap: 1px; background: var(--v-line);
  border: 1px solid var(--v-line); border-radius: 8px; overflow: hidden; width: min(320px, 100%); aspect-ratio: 1;
  touch-action: none;
}
.pc-ped-cell { background: var(--v-surf); aspect-ratio: 1; }
.pc-ped-cell.filled { background-image: none; }
.pc-ped-draw-actions { display: flex; gap: 8px; }

.pc-ped-equip { display: flex; gap: 10px; }
.pc-ped-slot {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px dashed var(--v-line); display: grid; place-items: center;
  color: var(--v-mut); font: 700 14px/1 var(--v-font); background: var(--v-surf2);
}
.pc-ped-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.pc-ped-badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 12px;
  border: 1px solid var(--v-line); background: var(--v-surf2); cursor: pointer; color: var(--v-ink); text-align: center;
}
.pc-ped-badge[aria-pressed="true"] { border-color: var(--v-acc); box-shadow: 0 0 0 1.7px var(--v-acc); }
.pc-ped-badge.locked { opacity: .55; cursor: not-allowed; filter: grayscale(1); }
.pc-ped-badge b { font: 700 13px/1.2 var(--v-font); }
.pc-ped-bicon { position: relative; width: 36px; height: 36px; display: grid; place-items: center; }
.pc-ped-lock { position: absolute; right: -4px; bottom: -4px; color: var(--v-ink); background: var(--v-surf); border-radius: 50%; padding: 1px; }
.pc-ped-caption { color: var(--v-mut); font: 600 12.5px/1.4 var(--v-font); margin: 0; }

.pc-ped-flaglist { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow: auto; border: 1px solid var(--v-line); border-radius: 10px; padding: 6px; }
.pc-ped-flagrow {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; border: 0; background: transparent;
  color: var(--v-ink); font: 500 13.5px/1.2 var(--v-font); cursor: pointer; text-align: left;
}
.pc-ped-flagrow:hover { background: var(--v-surf2); }
.pc-ped-flagrow.on { background: var(--v-surf2); box-shadow: inset 0 0 0 1.5px var(--v-acc); }
.pc-ped-flagemoji { font-size: 16px; }

.pc-ped-framerow { display: flex; flex-wrap: wrap; gap: 14px; }
.pc-ped-frame {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; border-radius: 14px;
  border: 1px solid var(--v-line); background: var(--v-surf2); color: var(--v-ink); cursor: pointer; width: 120px;
}
.pc-ped-frame.on { border-color: var(--v-acc); box-shadow: 0 0 0 1.7px var(--v-acc); }
.pc-ped-frame.soon { cursor: not-allowed; color: var(--v-mut); }
.pc-ped-framedemo { width: 48px; height: 48px; border-radius: 14px; background: var(--v-acc); color: var(--v-accink); display: grid; place-items: center; }

.pc-ped-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 10px; border-top: 1px solid var(--v-line); }

.pc-id-toast-host { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2147483000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.pc-id-toast {
  padding: 9px 16px; border-radius: 99px; background: var(--v-ink); color: var(--v-surf); font: 700 13px/1.2 var(--v-font);
  opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease;
}
.pc-id-toast.on { opacity: 1; transform: translateY(0); }
:root[data-theme="dark"] .pc-id-toast, :root[data-theme="neon"] .pc-id-toast { background: var(--v-surf2); color: var(--v-ink); border: 1px solid var(--v-line); }

@media (max-width: 600px) {
  .pc-ped-grid { width: min(260px, 100%); }
}

/* LIVE LANE (f18 r3): founder -- the draw screen felt "clunky": too little
   space between swatches, canvas and buttons; Save stretched full width; wants
   it centered. One centered column, 18px between rows, buttons sized to text. */
.pc-ped-draw {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  width: 100%; padding: 6px 0 4px; text-align: center;
}
.pc-ped-draw .pc-ped-tools { justify-content: center; gap: 8px; max-width: 360px; }
.pc-ped-draw .pc-ped-grid { width: min(300px, 100%); cursor: crosshair; user-select: none; }
.pc-ped-draw .pc-ped-draw-actions { justify-content: center; gap: 10px; }
.pc-ped-draw .pc-ped-draw-actions .pc-fp-btn { width: auto; min-width: 96px; padding: 10px 18px; }
/* Keep the 16x16 canvas square: a flex column was shrinking its height. */
.pc-ped-draw > * { flex: none; }
.pc-ped-draw .pc-ped-grid { height: auto; grid-template-rows: repeat(16, 1fr); }
/* Fixed square: 16 cells x 24px (shows ~17px each under the 0.7 chrome zoom). aspect-ratio on each cell fought the 1fr rows
   and left one wide column and tall bottom rows. */
.pc-ped-draw .pc-ped-grid {
  width: 384px; height: 384px; max-width: 100%; aspect-ratio: auto;
  grid-template-columns: repeat(16, minmax(0, 1fr)); grid-template-rows: repeat(16, minmax(0, 1fr));
}
.pc-ped-draw .pc-ped-cell { aspect-ratio: auto; min-width: 0; min-height: 0; }
.pc-ped-draw .pc-ped-sw { width: 34px; height: 34px; }
.pc-ped-draw .pc-ped-tools { max-width: 440px; gap: 9px; }
@media (max-width: 600px) { .pc-ped-draw .pc-ped-grid { width: min(300px, 100%); height: auto; aspect-ratio: 1; } }
/* LIVE LANE (f20): founder -- "Uncenter the screen before I click Draw new"
   (Picture list is left-aligned again; only the draw screen centers) and the
   draw screen needed a scroll at full size. Canvas 384px -> 240px (15px cells), smaller swatches and gaps. */
@media (min-width: 601px) {
  .pc-ped-draw { gap: 12px; padding-top: 0; }
  .pc-ped-draw .pc-ped-grid { width: 240px; height: 240px; }
  .pc-ped-draw .pc-ped-sw { width: 30px; height: 30px; }
  .pc-ped-draw .pc-ped-tools { gap: 7px; }
}

/* f26: picture background + paid colors in the draw pane. */
.pc-ped-swlabel { width: 100%; text-align: center; font: 700 12px/1.2 var(--v-font); color: var(--v-mut); margin-top: 4px; }
.pc-ped-sw[data-locked="true"] { opacity: .35; position: relative; cursor: pointer; }
.pc-ped-sw[data-locked="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 12px;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Crect x='0' y='5' width='10' height='7'/%3E%3Cpath d='M2 5V3a3 3 0 0 1 6 0v2' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Crect x='0' y='5' width='10' height='7'/%3E%3Cpath d='M2 5V3a3 3 0 0 1 6 0v2' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center/contain no-repeat; color: #fff; }
.pc-ped-sw.pc-ped-nobg { background: repeating-conic-gradient(var(--v-surf2) 0 25%, var(--v-surf) 0 50%) 50%/10px 10px; }
.pc-ped-draw .pc-ped-grid[data-bg] .pc-ped-cell:not(.filled) { background: var(--ped-bg); }
/* f26: with the face hidden, a grid-placed absolute canvas took one grid cell (52px of the 104px card
   picture). Drop the grid placement so it fills the whole box. */
.pc-id-av > .pc-id-canvas { grid-area: auto; width: 100%; height: 100%; inset: 0; }
.pc-ped-editpic { align-self: flex-start; width: auto; padding: 8px 16px; } /* f27 */
/* f28: flag tab shop link. */
.pc-fp-editor .pc-ped-flaglist.is-owned { flex: none; min-height: 0; } /* f28: short list of owned flags */

/* The player ID number hides; hovering the name shows it (title). */
.pc-id-num[hidden] { display: none; }

/* Copy button + hover tip for the player ID. */
.pc-id-host { position: relative; }
.pc-id-copy {
  align-self: center; margin-left: 6px; padding: 3px; width: 22px; height: 22px; display: grid; place-items: center;
  border: 1px solid var(--v-line); border-radius: 7px; background: transparent; color: var(--v-mut); cursor: pointer;
}
.pc-id-copy:hover { color: var(--v-ink); border-color: var(--v-edge); }
.pc-id-copy.is-done { color: var(--v-acc); border-color: var(--v-acc); }
.pc-id-tip {
  position: absolute; left: 0; top: 100%; margin-top: 2px; z-index: 5; display: none; pointer-events: none;
  padding: 2px 7px; border-radius: 7px; background: var(--v-card); color: var(--v-acc);
  border: 1px solid var(--v-line); font: 700 12px/1.3 var(--v-font); white-space: nowrap;
}
#pc-prof-name:hover ~ .pc-id-tip, #pc-fp-name:hover ~ .pc-id-tip, .pc-id-copy:hover ~ .pc-id-tip { display: block; }
.pc-fp-namerow .pc-id-tip { left: 50%; transform: translateX(-50%); }

/* Copy -> check swap (about 2 s), then back to the copy icon. */
.pc-id-copy { position: relative; }
.pc-id-copy svg { grid-area: 1 / 1; transition: opacity .18s ease, transform .18s ease; }
.pc-id-copy .pc-ic-check { opacity: 0; transform: scale(.5); }
.pc-id-copy.is-done .pc-ic-copy { opacity: 0; transform: scale(.5); }
.pc-id-copy.is-done .pc-ic-check { opacity: 1; transform: scale(1); }
.pc-id-copy.is-done { transition: color .18s ease, border-color .18s ease; }
