/* ================= HOME =================
   Desktop: a full-height hero (logo, what the game is, a little board) beside the start card, then "how to play".
   Phone: the same blocks stacked, start card right after the logo. */
.home { max-inline-size: 1240px; padding-block-start: 18px; }
.home-hero { display: grid; gap: 22px; align-items: center; }
.hero-text { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 14px; text-align: center; }
.logo { display: flex; justify-content: center; gap: 7px; margin: 6px 0 0; direction: rtl; }
.logo span {
  --tab: var(--bad);
  position: relative; overflow: hidden;
  font-family: var(--f-head); font-size: clamp(2.4rem, min(10vw, 5.4vw + 1rem), 5rem);
  inline-size: 1.08em; block-size: 1.3em; display: grid; place-items: center; padding-block-start: .1em;
  color: var(--ink);
  background: var(--grain), var(--paper-hi);
  border: 3px solid var(--ink); border-radius: 9px 11px 10px 12px / 11px 9px 12px 10px;
  box-shadow: 0 5px 0 var(--ink), 3px 8px 0 rgba(29, 39, 68, .2);
  transform: rotate(var(--r));
  animation: logo-in .55s cubic-bezier(.2, 1.3, .4, 1) backwards;
}
.logo span::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; block-size: .15em; background: var(--tab); border-block-end: 2.5px solid var(--ink); }
.logo span:nth-child(4n+1) { --tab: #c9694a; }
.logo span:nth-child(4n+2) { --tab: #e5ae3a; }
.logo span:nth-child(4n+3) { --tab: #6f9a78; }
.logo span:nth-child(4n+4) { --tab: #6f8fb3; }
.logo span:nth-child(2) { animation-delay: .05s; } .logo span:nth-child(3) { animation-delay: .1s; }
.logo span:nth-child(4) { animation-delay: .15s; } .logo span:nth-child(5) { animation-delay: .2s; }
.logo span:nth-child(6) { animation-delay: .25s; } .logo span:nth-child(7) { animation-delay: .3s; }
@keyframes logo-in { from { transform: translateY(-24px) scale(.7); opacity: 0; } }
.tagline { font-size: clamp(1.1rem, 2.4vw, 1.55rem); font-weight: 500; line-height: 1.5; color: var(--ink); max-inline-size: 34em; text-wrap: balance; margin-block-start: 8px; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.facts li { background: var(--paper-hi); border: 2px solid var(--ink); border-radius: var(--rr-xs); padding: .2em .8em; font-weight: 700; font-size: .95rem; box-shadow: var(--print-s); }
.how-link { display: inline-flex; align-items: center; gap: .5em; margin-block-start: 6px; }
/* the studio's "all games" badge: identical in every GrapeSeed game, so its colours are fixed, not themed */
.slop-badge { display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 8px; background: #1a1024; border: 1px solid #9b3cff66; text-decoration: none; box-shadow: 0 4px 14px #0006; transition: border-color .2s, transform .2s; direction: rtl; }
.slop-badge:hover { border-color: #d8f244; transform: translateY(-1px); }
.slop-badge .sb-txt { font: 500 14px/1 'Rubik', sans-serif; color: #c9bfd6; }
.slop-badge .sb-logo { direction: ltr; display: inline-flex; align-items: baseline; gap: 7px; }
.slop-badge .sb-slop { font: 22px/1 'Rubik Wet Paint', sans-serif; color: #d8f244; }
.slop-badge .sb-games { font: 13px/1 'Rubik Mono One', sans-serif; color: #f6efe3; letter-spacing: .04em; }
.hero-text .slop-wrap { margin-block-start: 4px; }
.slop-wrap { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slop-hint { font-family: var(--f-hand); font-size: 1.15rem; color: var(--ink-2); line-height: 1; white-space: nowrap; }
.head-btns .slop-hint { font-size: 1rem; }
.how-arrow { display: inline-block; font-size: 1.2em; animation: how-bob 1.6s ease-in-out infinite; }
@keyframes how-bob { 50% { transform: translateY(4px); } }

/* the little board strip on the hero: four pawns hop along it */
.hero-board { position: relative; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; inline-size: min(100%, 640px); padding-block-start: 34px; margin-block: 4px; }
.hb-sq { aspect-ratio: 1; display: grid; place-items: center; background: var(--grain), var(--paper-hi); border: 2.5px solid var(--ink); border-radius: 8px; font-family: var(--f-head); font-size: clamp(.8rem, 2.4vw, 1.1rem); box-shadow: 0 3px 0 var(--ink); }
.hb-sq.sp { background: var(--grain), #f8e2a6; }
.hb-sq.fin { background: var(--grain), var(--good-bg); font-size: clamp(.6rem, 1.6vw, .85rem); }
.hb-pawns { position: absolute; inset-block-start: 0; inset-inline-start: 4%; display: flex; animation: pawn-walk 7s ease-in-out infinite; }
.hb-pawns .meeple { inline-size: 34px; block-size: 34px; margin-inline-start: -10px; filter: drop-shadow(1px 2px 0 rgba(29, 39, 68, .3)); }
@keyframes pawn-walk { 0%, 12% { inset-inline-start: 4%; } 40%, 55% { inset-inline-start: 38%; } 82%, 100% { inset-inline-start: 4%; } }

/* the demo scene: the explainer's card and two speech bubbles */
.hero-demo { display: flex; align-items: center; gap: 22px; margin-block: 10px 4px; flex-wrap: wrap; justify-content: center; }
.demo-card {
  position: relative; display: grid; justify-items: center; gap: 4px; inline-size: 210px; padding: 1.5rem 1rem 1rem;
  background: var(--grain), var(--paper-hi); border: 3px solid var(--ink); border-radius: 16px 19px 17px 20px / 19px 16px 20px 17px;
  box-shadow: 4px 6px 0 rgba(29, 39, 68, .35); transform: rotate(-4deg);
}
.demo-card b { font-family: var(--f-head); font-weight: 400; font-size: 2.6rem; line-height: 1; }
.demo-card b::after { content: ""; display: block; inline-size: 60%; block-size: 8px; margin: .15em auto 0; background: var(--squiggle) repeat-x center / 28px 8px; }
.demo-lvl { position: absolute; inset-block-start: -1px; padding: .05em .8em .1em; background: var(--ink); color: var(--paper-hi); border-radius: 0 0 9px 9px; font-size: .75rem; font-weight: 600; }
.demo-no { font-size: .82rem; font-weight: 700; color: var(--bad-ink); }
.demo-talk { display: grid; gap: 12px; }
.bub { position: relative; margin: 0; padding: .5em 1em; background: var(--paper-hi); border: 2.5px solid var(--ink); border-radius: 18px; font-weight: 600; font-size: 1.05rem; box-shadow: var(--print-s); max-inline-size: 16em; }
.bub::after {   /* tail: a square with only its right and bottom edges, turned 45deg so the corner points down */
  content: ""; position: absolute; inset-block-end: -8px; inset-inline-start: 24px; inline-size: 13px; block-size: 13px;
  background: inherit; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); border-top: 0; border-left: 0; border-radius: 0 0 3px 0; transform: rotate(45deg);
}
.bub.hint { animation: bub-in 6s ease-out infinite; }
.bub.guess { justify-self: end; background: var(--good-bg); font-family: var(--f-head); font-weight: 400; font-size: 1.4rem; animation: bub-in2 6s ease-out infinite; }
.bub.guess::after { inset-inline-start: auto; inset-inline-end: 24px; }
.bub .plus { direction: ltr; unicode-bidi: isolate; margin-inline-start: .5em; font-family: var(--f-body); font-weight: 800; font-size: .9rem; color: var(--good-ink); }
@keyframes bub-in { 0%, 4% { opacity: 0; transform: translateY(6px); } 10%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes bub-in2 { 0%, 30% { opacity: 0; transform: scale(.8); } 36%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* start card */
.start-card { padding: 1.3rem 1.2rem 1.2rem; inline-size: min(100%, 460px); justify-self: center; }
.start-card h2 { font-size: 1.6rem; margin-block-end: .9rem; }
.who-row { display: flex; align-items: flex-end; gap: 12px; }
.who-row .field { flex: 1; }
.who-row .av-thumb { margin-block-end: .9rem; }
.edit-row { margin-block: -.2rem .9rem; }
.edit-row .btn .ico { margin-inline-end: .35em; }
.lid::before, .modal-box::before {   /* the printed inner frame of a box lid / card */
  content: ""; position: absolute; inset: 5px; border: 1.5px solid var(--ink-line); border-radius: 13px 16px 14px 17px / 16px 13px 17px 14px; pointer-events: none;
}
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.swatch {
  inline-size: 100%; aspect-ratio: 1; max-inline-size: 38px; border-radius: 50%; background: var(--c); cursor: pointer;
  border: 2.5px solid var(--ink); padding: 0; transition: transform .1s, box-shadow .1s;
  box-shadow: inset -3px -4px 0 rgba(0, 0, 0, .14), inset 2px 2px 0 rgba(255, 255, 255, .28);
}
.swatch:hover { transform: translateY(-1px); }
.swatch.on { transform: scale(1.12); box-shadow: 0 0 0 3px var(--paper-hi), 0 0 0 5.5px var(--ink), inset -3px -4px 0 rgba(0, 0, 0, .14), inset 2px 2px 0 rgba(255, 255, 255, .28); }
.or { text-align: center; font-weight: 600; font-size: .95rem; color: var(--ink-2); margin-block: .9rem; display: flex; align-items: center; gap: .8rem; }
.or::before, .or::after { content: ""; flex: 1; block-size: 0; border-block-start: 2px dashed var(--ink-line); }
.join-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; }
.join-row .input { inline-size: 100%; }
.join-first .join-row .btn { background: var(--grain), var(--accent); }

/* how to play */
.how-play { margin-block-start: 48px; padding-block-start: 32px; border-block-start: 3px dashed var(--ink-line); display: grid; gap: 18px; scroll-margin-block-start: 16px; }
.how-title { font-size: clamp(1.8rem, 4vw, 2.4rem); text-align: center; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.step { position: relative; display: grid; gap: 6px; justify-items: start; background: var(--grain), var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--rr); padding: 1rem 1rem 1.1rem; box-shadow: var(--print); }
.step b { font-family: var(--f-head); font-weight: 400; font-size: 1.3rem; }
.step p { line-height: 1.5; color: var(--ink-2); }
.step-n { position: absolute; inset-block-start: -12px; inset-inline-end: 14px; inline-size: 30px; block-size: 30px; display: grid; place-items: center; background: var(--accent); border: 2.5px solid var(--ink); border-radius: 50%; font-family: var(--f-head); }
.step-ic { inline-size: 46px; block-size: 46px; display: grid; place-items: center; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 12px; }
.step-ic .ico { inline-size: 26px; block-size: 26px; vertical-align: 0; }
.rule-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.rule-card { background: var(--grain), var(--paper-hi); border: var(--bw) solid var(--ink); border-radius: var(--rr); padding: 1rem 1.1rem; box-shadow: var(--print); display: grid; gap: 8px; align-content: start; }
.rule-card h3 { display: flex; align-items: center; gap: .45em; font-size: 1.3rem; }
.rule-card.no { background: var(--grain), #f8e7dd; }
.rule-card.no h3 .ico { color: var(--bad-ink); }
.rule-card ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; line-height: 1.5; font-weight: 500; }
.sq-title { font-size: 1.4rem; text-align: center; margin-block-start: 6px; }
.sq-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.sq-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: var(--rr-s); padding: .6rem .7rem; }
.sq-mark { display: grid; place-items: center; block-size: 44px; background: var(--grain), var(--paper-2); border: 2px solid var(--ink); border-radius: 9px; font-family: var(--f-head); font-size: 1.15rem; }
.sq-item p { line-height: 1.45; color: var(--ink-2); font-size: .95rem; }
.home-links { text-align: center; margin-block: 10px 6px; font-size: .95rem; }
.home-links a { color: var(--ink); font-weight: 600; text-decoration-color: var(--ink-line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.home-links a:hover { text-decoration-color: var(--ink); }

@media (min-width: 1100px), (orientation: landscape) and (max-height: 500px) and (min-width: 600px) {
  .home { padding-block-start: 28px; }
  .home-hero { grid-template-columns: minmax(0, 1.25fr) minmax(360px, 460px); gap: 48px; min-block-size: calc(100dvh - 80px); }
  .hero-text { justify-items: start; text-align: start; }
  .facts { justify-content: flex-start; }
  .logo { justify-content: flex-start; }
}
@media (max-width: 1099px) and (orientation: portrait), (max-width: 1099px) and (min-height: 501px) {
  .hero-text .how-link { order: 10; }
  .hero-text .slop-wrap { order: 11; }
}

/* ================= LOBBY ================= */
.lobby { display: grid; gap: 16px; }
.lobby-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.kicker { font-family: var(--f-hand); font-size: 1.1rem; color: var(--ink-2); margin-block-end: 4px; line-height: 1; }
.code-tiles { display: flex; gap: 6px; justify-content: flex-end; }
.code-tile {
  font-family: var(--f-head); font-size: 1.8rem; inline-size: 1.3em; block-size: 1.5em; display: grid; place-items: center;
  background: var(--grain), var(--paper-hi); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 8px 10px 9px 11px / 10px 8px 11px 9px;
  box-shadow: 0 4px 0 var(--ink);
}
.code-tile:nth-child(odd) { transform: rotate(-2deg); }
.code-tile:nth-child(even) { transform: rotate(1.5deg); }
.head-btns { display: flex; flex-wrap: wrap; gap: 10px; }

.teams { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.team-col {
  --c: #888;
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--grain), var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--rr);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55), var(--print);
}
.team-col::before { content: ""; display: block; block-size: 9px; background: var(--tc); border-block-end: var(--bw) solid var(--ink); }
.team-col.mine { box-shadow: 0 0 0 4px var(--accent), 0 0 0 6.5px var(--ink), var(--print); }
.team-col > header {
  display: flex; justify-content: space-between; align-items: center; padding: .6rem .9rem .35rem;
  font-family: var(--f-head); font-size: 1.25rem; color: var(--ink);
}
.team-name { display: inline-flex; align-items: center; gap: .5em; }
.team-name::before { content: ""; inline-size: .6em; block-size: .6em; border-radius: 50%; background: var(--tc); border: 2px solid var(--ink); flex: none; }
.team-col.loose { --c: #8a8f9f; }
.team-count { background: var(--paper-hi); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; min-inline-size: 1.9em; text-align: center; font-family: var(--f-body); font-weight: 700; font-size: .9rem; padding: .05em .55em; }
.team-members { display: grid; gap: 8px; padding: .5rem .8rem .8rem; flex: 1; align-content: start; min-block-size: 96px; }
.empty { color: var(--ink-3); text-align: center; padding: 1rem 0; font-family: var(--f-hand); font-size: 1.1rem; }
.join-team { margin: 0 .8rem .9rem; }

.pl {
  display: flex; align-items: center; gap: .55em; padding: .35em .65em; background: var(--paper-hi); border: 2px solid var(--ink-line); border-radius: var(--rr-xs);
  font-weight: 600; transition: box-shadow .12s, border-color .12s;
}
.pl.me { background: var(--accent-soft); border-color: var(--ink); }
.pl.gone { opacity: .55; }
.pl .pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .crown { display: inline-block; vertical-align: -.2em; color: var(--accent-d); margin-inline-start: .25em; }
.pl .crown .ico { inline-size: 1.1em; block-size: 1.1em; }
.pdot { inline-size: 1em; block-size: 1em; border-radius: 50%; background: var(--tp); border: 2px solid var(--ink); flex: none; }
.pl .mic { display: inline-grid; place-items: center; color: var(--ink-2); transition: transform .1s; }
.pl .mic .ico { inline-size: 1.15em; block-size: 1.15em; vertical-align: 0; }
.pl .mic.off { color: var(--ink-3); opacity: .8; }
.pl.speaking { box-shadow: 0 0 0 3px var(--good); border-color: var(--ink); }
.pl.speaking .mic { transform: scale(1.25); color: var(--good-ink); }

.settings-panel h2 { font-size: 1.35rem; margin-block-end: .8rem; }
.settings { display: grid; gap: .9rem; }
.set-row { display: grid; gap: .4rem; }
.set-label { font-weight: 700; font-size: .95rem; color: var(--ink-2); }
.seg { display: flex; border: var(--bw) solid var(--ink); border-radius: var(--rr-s); overflow: hidden; background: var(--paper-hi); }
.seg button {
  flex: 1; font: inherit; font-weight: 600; font-size: .95rem; padding: .5em .4em; min-block-size: 44px; cursor: pointer;
  background: transparent; color: var(--ink-2); border: 0; border-inline-start: 2px solid var(--ink); transition: background .15s, color .15s;
}
.seg button:first-child { border-inline-start: 0; }
.seg button:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--paper-2); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--ink); font-weight: 800; box-shadow: inset 0 -3px 0 rgba(29, 39, 68, .22); }
.seg button:disabled { cursor: default; }
.seg button:disabled:not([aria-pressed="true"]) { color: var(--ink-3); }
.seg button:focus-visible { outline-offset: -5px; }
.toggles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-block-start: .4rem; }
.toggle {
  display: flex; align-items: center; gap: .6em; font: inherit; font-weight: 600; text-align: start; cursor: pointer;
  padding: .45em .75em; min-block-size: 48px; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: var(--rr-xs); color: var(--ink);
}
.toggle:disabled { cursor: default; }
.toggle .tg-ic { display: none; }
.toggle > span:nth-child(2) { flex: 1; }
.tg-sw { direction: ltr; inline-size: 46px; block-size: 26px; border-radius: 99px; background: var(--paper-3); border: 2.5px solid var(--ink); position: relative; flex: none; transition: background .15s; }
.tg-sw::after { content: ""; position: absolute; inset-block-start: 2.5px; left: 2.5px; inline-size: 16px; block-size: 16px; border-radius: 50%; background: var(--paper-hi); border: 2px solid var(--ink); transition: transform .15s; }
.toggle[aria-checked="true"] .tg-sw { background: var(--accent); }
.toggle[aria-checked="true"] .tg-sw::after { transform: translateX(20px); }
.lobby-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding-block-end: 4px; }
.lobby-actions .btn .ico, .head-btns .btn .ico { margin-inline-end: .35em; vertical-align: -.22em; }
.start-hint { text-align: center; font-family: var(--f-hand); font-size: 1.15rem; color: var(--ink); min-block-size: 1.2em; }
.lobby .badge { justify-self: center; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(29, 39, 68, .55); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal-box { inline-size: min(100%, 440px); display: grid; gap: 12px; text-align: center; animation: pop .25s ease-out; background: var(--grain), var(--paper); padding: 1.2rem 1.1rem; }
.modal-box h2 { font-size: 1.5rem; }
.lvl { block-size: 14px; border-radius: 99px; background: var(--paper-3); border: 2px solid var(--ink); overflow: hidden; }
.lvl-fill { block-size: 100%; inline-size: 0; background: var(--accent); border-inline-end: 2px solid var(--ink); transition: inline-size .08s; }
.heard-box { min-block-size: 64px; display: grid; place-items: center; background: var(--paper-hi); border: 2px dashed var(--ink-3); border-radius: var(--rr-s); padding: .6rem; }
.heard { font-family: var(--f-head); font-size: 1.5rem; color: var(--ink-3); }
.heard.final { color: var(--ink); }
.mic-status { color: var(--bad-ink); font-weight: 600; min-block-size: 1.2em; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.94) rotate(-.8deg); opacity: 0; } }

@media (min-width: 900px), (orientation: landscape) and (max-height: 500px) and (min-width: 600px) {
  .lobby { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
  .lobby-head, .lobby .badge, .lobby-actions, .start-hint { grid-column: 1 / -1; }
  .teams { grid-column: 1; }
  .settings-panel { grid-column: 2; }
}

/* ---- avatar / character creator (CSS only; the 3D preview code is in avatar-editor.js) ---- */
.av-thumb { display: block; inline-size: 72px; block-size: 72px; border-radius: 50%; border: 2.5px solid var(--ink); background: radial-gradient(circle at 50% 35%, #fff6d8, #ecd196); object-fit: cover; flex: none; box-shadow: var(--print-s); }
.av-home-row { display: flex; align-items: center; gap: 12px; margin-block-end: 1rem; }
.av-home-row .btn { flex: 1; }
.pavbox { display: inline-grid; place-items: center; flex: none; }
.pav { display: block; inline-size: 38px; block-size: 38px; margin-block: -4px; border-radius: 50%; border: 2px solid var(--ink); background: radial-gradient(circle at 50% 35%, #fff6d8, #ecd196); object-fit: cover; }
.av-modal .modal-box.av-box::before { display: none; }
.av-modal .modal-box.av-box { inline-size: min(100%, 720px); max-block-size: calc(100dvh - 24px); overflow: auto; }
.av-layout { display: grid; gap: 12px; text-align: start; }
.av-preview { position: relative; justify-self: center; inline-size: min(100%, 250px); aspect-ratio: .86; border: var(--bw) solid var(--ink); border-radius: var(--rr); overflow: hidden;
  background: radial-gradient(ellipse at 50% 88%, #f1dca8 0, #ddc08a 52%, #c9a36b 100%); touch-action: pan-y; box-shadow: inset 0 -10px 0 -4px rgba(29, 39, 68, .12), var(--print-s); }
.av-canvas { display: block; inline-size: 100%; block-size: 100%; cursor: grab; touch-action: none; }
.av-hint { position: absolute; inset-block-end: 6px; inset-inline: 0; text-align: center; font-family: var(--f-hand); font-size: .95rem; color: var(--ink-2); pointer-events: none; }
.av-rows { display: grid; gap: 8px; align-content: start; }
.av-row { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); align-items: center; gap: 8px; }
.av-label { font-weight: 700; font-size: .92rem; color: var(--ink-2); }
.av-swatches { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 6px; }
.av-sw { max-inline-size: 36px; }
.av-sw.on { transform: scale(1.12); }
.av-pick { display: flex; align-items: center; gap: 6px; }
.av-name { flex: 1; text-align: center; font-weight: 700; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: var(--rr-xs); padding: .25em .3em; min-inline-size: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-arrow { min-inline-size: 40px; padding-inline: .5em; font-size: 1.6rem; line-height: .9; color: var(--ink); }
.av-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (min-width: 640px) {
  .av-layout { grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
}
