/* Avatar creator (#/profile/avatar) and avatar pictures across the site. */
.avc { display: grid; gap: 16px; }
.avc-head { min-height: 0; padding: 22px 26px; }
.avc-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 16px; align-items: start; }
.avc-stage { position: relative; padding-bottom: 12px; }
.avc-view {
  --av-glow: var(--accent);
  position: relative; height: min(68vh, 720px); min-height: 420px;
  background: radial-gradient(ellipse 60% 70% at 50% 40%, color-mix(in srgb, var(--av-glow) 9%, #0b120e), var(--bg) 72%);
  border: 1px solid var(--line-2); overflow: hidden; touch-action: none;
}
.avc-view .loading-state { height: 100%; }
.avc-view canvas { display: block; cursor: grab; }
.avc-view canvas:active { cursor: grabbing; }
.avc-turn { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.avc-turn .btn { min-width: 48px; }

.avc-ctrl { display: grid; gap: 12px; align-content: start; }
.avc-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.avc-bar .grow { flex: 1; }
.avc-note { font: 400 14px/1.35 var(--f-label); color: var(--ink-2); min-height: 19px; }
.avc-note.bad { color: var(--gold); }
.avc-tabs button { min-width: 0; }
.avc-pane { display: grid; gap: 10px; align-content: start; max-height: calc(68vh - 60px); overflow: auto; padding-right: 4px; }
.avc-sub { margin-top: 6px; }
.avc-tip { font-size: 14px; line-height: 1.4; }

.avs-list { display: grid; gap: 4px; }
.avs { display: grid; grid-template-columns: 150px minmax(0, 1fr) 26px; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.avs > span, .avs > label { font: 400 15px/1.2 var(--f-label); color: var(--ink); }
.avs-list.wide .avs { grid-template-columns: 172px minmax(0, 1fr) 26px; }
.avs input:disabled { opacity: .4; cursor: not-allowed; }
/* reset one slider to its default */
.avs-rst {
  width: 26px; height: 26px; padding: 0; cursor: pointer; color: var(--ink-2); background: none;
  border: 1px solid var(--line-2); border-radius: var(--r); font: 400 15px/1 var(--f-label);
}
.avs-rst:hover { color: var(--accent); border-color: var(--line); }
.avc-tabfoot { display: flex; justify-content: flex-end; padding-top: 4px; }
.avc-confirm {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px;
  border: 1px solid var(--gold); border-radius: var(--r); background: rgba(242,194,48,.06);
}
.avc-confirm[hidden] { display: none; }
.avc-confirm span { flex: 1 1 180px; font: 400 15px/1.3 var(--f-label); color: var(--ink); }

/* brow editor: head, peak and tail dots on the guide lines, thickness handles above them */
.avbr-dots { position: absolute; inset: 0; pointer-events: none; }
.avbr-dot {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  box-shadow: 0 0 0 1.5px #0a0f0c, 0 1px 4px rgba(0,0,0,.6);
}
.avbr-dot.head { background: #ffc73d; }
.avbr-dot.peak { background: #5ae678; }
.avbr-dot.tail { background: #4fa0ff; }
.avbr-dot.headT, .avbr-dot.peakT { left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 2px; background: #fff; }
.avbr-dot.on { transform-origin: center; box-shadow: 0 0 0 2px #fff, 0 0 12px var(--av-glow); }
.avbr-dot.on.snap { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--av-glow); }

/* sculpt: dots on the face, the point list and the tools */
.avc-view.sculpting canvas { cursor: crosshair; }
.avsc-dots { position: absolute; inset: 0; pointer-events: none; }
.avsc-dot {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: color-mix(in srgb, var(--av-glow) 70%, transparent); box-shadow: 0 0 0 1.5px rgba(255,255,255,.85), 0 1px 3px rgba(0,0,0,.6);
}
.avsc-dot.twin { background: none; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--av-glow) 80%, #fff), 0 1px 3px rgba(0,0,0,.5); }
.avsc-dot.sel { left: -7px; top: -7px; width: 14px; height: 14px; background: var(--av-glow); box-shadow: 0 0 0 2px #fff, 0 0 12px var(--av-glow); }
.avsc-dot.sel.twin { background: none; box-shadow: 0 0 0 2px var(--av-glow); }
.avsc-dot.fixed { border-radius: 2px; background: #fff; box-shadow: 0 0 0 3px var(--av-glow), 0 0 0 5px #0a0f0c, 0 0 14px var(--av-glow); }
.avsc-dot.fixed.twin { background: none; border-radius: 2px; box-shadow: 0 0 0 2px #fff; }
.avsc-tools, .avsc-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.avsc-tools .btn[aria-pressed="true"] { color: var(--bg-1); background: var(--accent); border-color: var(--accent); }
.avsc-head { display: flex; justify-content: space-between; align-items: baseline; }
.avsc-head .dim { font-size: 13px; letter-spacing: 0; }
.avsc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.avsc-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; text-align: left;
  color: var(--ink); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r); font: 400 14px/1.2 var(--f-label);
}
.avsc-row > span:first-of-type { white-space: nowrap; }
.avsc-row i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.avsc-row .dim { font-size: 12px; }
.avsc-row:hover { border-color: var(--line); }
.avsc-row[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.avsc-tag { margin-left: auto; padding: 2px 6px; border-radius: 2px; color: var(--bg-1); background: var(--accent); font-size: 12px; }
.avs input[type=range] { width: 100%; accent-color: var(--accent); height: 24px; cursor: pointer; }

.avc-skins { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.avc-skins .skin {
  aspect-ratio: 1; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--c); cursor: pointer; padding: 0;
}
.avc-skins .skin[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 10px rgba(var(--accent-rgb),.5); }

.avc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.avo { display: grid; gap: 6px; align-content: start; }
.avo > button[data-slot] {
  display: grid; gap: 6px; justify-items: start; text-align: left; width: 100%; min-height: 58px; cursor: pointer;
  padding: 9px 10px; color: var(--ink); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r);
  font: 400 15px/1.15 var(--f-label);
}
.avo > button[data-slot]:hover:not(:disabled) { border-color: var(--line); }
.avo > button[data-slot][aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: rgba(var(--accent-rgb),.08); box-shadow: 0 0 10px rgba(var(--accent-rgb),.3); }
.avo > button[data-slot]:disabled { cursor: not-allowed; opacity: .55; }
.avo .price { font-size: 14px; }
.avo .price svg { width: 14px; height: 14px; }
.avo-lock, .avo-why { display: inline-flex; align-items: center; gap: 5px; font: 400 13px/1 var(--f-label); color: var(--ink-2); }
.avo-lock svg { width: 13px; height: 13px; }
.avo .sw { display: block; width: 100%; height: 10px; background: var(--c); border: 1px solid rgba(255,255,255,.12); }
.avo-buy { width: 100%; }

/* options shown on the player's own avatar: a picture and a name, no frame inside the panel */
.avc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px 8px; }
.avc-tiles .avo > button[data-slot] {
  justify-items: center; text-align: center; min-height: 0; padding: 0 0 4px; gap: 4px;
  background: none; border: 0; box-shadow: none; font-size: 14px;
}
.avc-tiles .avo-pic { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r); border: 1px solid transparent; background: var(--bg-3); }
.avc-tiles .avo > button[data-slot]:hover:not(:disabled) .avo-pic { border-color: var(--line); }
.avc-tiles .avo > button[data-slot][aria-pressed="true"] { background: none; box-shadow: none; }
.avc-tiles .avo > button[data-slot][aria-pressed="true"] .avo-pic { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.avc-tiles .avo > button[data-slot]:not(:has(.avo-pic)) { min-height: 88px; align-content: center; border: 1px dashed var(--line-2); border-radius: var(--r); }
.avc-tiles .price, .avc-tiles .avo-lock, .avc-tiles .avo-why { font-size: 13px; }

/* colour swatches */
.avc-sw { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.avc-sw .dot {
  width: 30px; height: 30px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--c); border: 2px solid rgba(255,255,255,.14);
}
.avc-sw .dot[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.avc-sw .dot.locked { opacity: .55; }
.avc-sw .dot.match { width: auto; border-radius: 15px; padding: 0 12px 0 34px; background: linear-gradient(90deg, var(--c) 0 26px, transparent 26px); color: var(--ink); font: 400 13px/1 var(--f-label); }
.avc-note .btn { margin: 6px 6px 0 0; }

/* eye colours: a small iris (pupil, colour from the pupil out, dark rim, catchlight) and a name */
.avc-eyes { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.eyec {
  display: grid; justify-items: center; gap: 5px; padding: 8px 4px 7px; cursor: pointer; color: var(--ink);
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r); font: 400 13px/1.15 var(--f-label); text-align: center;
}
.eyec i {
  width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 3px #e6e2db;
  background: radial-gradient(circle at 37% 33%, #fff 0 7%, transparent 10%),
    radial-gradient(circle, #050505 0 27%, var(--ci) 31%, var(--c) 70%, color-mix(in srgb, var(--c) 30%, #000) 88%, #111 100%);
}
.eyec:hover { border-color: var(--line); }
.eyec[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: rgba(var(--accent-rgb),.08); box-shadow: 0 0 10px rgba(var(--accent-rgb),.3); }
.eyec.locked i { opacity: .6; }
.eyec .price { font-size: 13px; }
.eyec .price svg { width: 13px; height: 13px; }

/* makeup: preset chips, then one row per layer (name, colour, strength) */
.mkp-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mkp {
  display: grid; justify-items: center; align-content: center; gap: 7px; min-height: 52px; padding: 8px 4px; cursor: pointer;
  color: var(--ink); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r);
  font: 400 14px/1 var(--f-label);
}
.mkp:hover { border-color: var(--line); }
.mkp[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.mkp-dots { display: flex; gap: 4px; height: 9px; }
.mkp-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.mkr {
  display: grid; grid-template-columns: 104px 28px minmax(0, 1fr) 40px 26px; align-items: center; gap: 6px 12px;
  padding: 7px 0; border-bottom: 1px solid var(--line-2);
}
.mkr-n { font: 400 15px/1.2 var(--f-label); color: var(--ink); }
.mkr > span:empty { width: 28px; }
.mkr input[type=range] { width: 100%; accent-color: var(--accent); height: 24px; cursor: pointer; }
.mkr output { font: 400 13px/1 var(--f-label); color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.mkr.off .mkr-n { color: var(--ink-2); }
.mkr-sw {
  width: 26px; height: 26px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--c); border: 2px solid rgba(255,255,255,.14);
}
.mkr-sw[aria-expanded="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.mkr-sw.locked { box-shadow: inset 0 0 0 2px rgba(0,0,0,.35); }
.mkr.off .mkr-sw { opacity: .5; }
.mkr-shapes { grid-column: 3 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.mkr-shapes button {
  padding: 4px 10px; cursor: pointer; color: var(--ink-2); background: none;
  border: 1px solid var(--line-2); border-radius: var(--r); font: 400 13px/1.1 var(--f-label);
}
.mkr-shapes button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.mkr .avc-sw { grid-column: 2 / -1; padding: 2px 0 4px; }

/* shop cards for avatar items show the whole bust */
.item.av-item .thumb img { object-fit: contain; }

@media (max-width: 1100px) {
  .avc-main { grid-template-columns: minmax(0, 1fr); }
  .avc-view { height: 56vh; min-height: 360px; }
  .avc-pane { max-height: none; overflow: visible; }
}
@media (max-width: 560px) {
  .avc-head { padding: 14px 16px; }
  .avc-head .coin-box { padding: 8px 12px; }
  .avc-head .coin-box b { font-size: 24px; }
  .avc-head .coin-box svg { width: 28px; height: 28px; }
  .avc-view { height: 46vh; min-height: 300px; }
  .avs { grid-template-columns: 116px minmax(0, 1fr) 26px; gap: 8px; }
  .avs > span, .avs > label { font-size: 14px; }
  .avs-list.wide .avs { grid-template-columns: 140px minmax(0, 1fr) 26px; }
  .avsc-list { grid-template-columns: minmax(0, 1fr); }
  .avc-skins { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .avc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avc-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mkr { grid-template-columns: 80px 26px minmax(0, 1fr) 34px 26px; gap: 6px 6px; }
  .mkp-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mkr-n { font-size: 14px; }
  .avc-tabs { flex-wrap: wrap; }
  .avc-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .avc-bar > a { grid-column: 1 / -1; }
  .avc-bar .grow { display: none; }
}

/* Face tab: Balance thirds and Show guides; Mouth tab: lip preset chips */
.avc-prop { display: flex; flex-wrap: wrap; gap: 8px; }
.avc-prop [aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.mkp-row.lp { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
.mkp-row.lp .mkp { min-height: 40px; }
