@font-face { font-family: 'Bagel Fallback'; src: local('Arial Black'), local('Arial-Black'); size-adjust: 83%; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }

/* Layout: one-thumb column — sticky turn bar, the tiles on the table (8×2), the turn panel, then everyone's stack */
:root {
  --coal: #17110e;
  --grate: #241a15;
  --grate-2: #2f231c;
  --line: #4a3a30;
  --ember: #ff6b2c;
  --ember-deep: #b8461c;
  --glow: #ffbd4a;
  --tile: #f3e4c4;
  --tile-shade: #d6bf96;
  --tile-ink: #3b2519;
  --worm: #f2877b;
  --text: #f7ede1;
  --muted: #b5a191;
  --bust: #b8332b;
  --good: #9bdc8c;
  --die: #fbf7ef;
  --die-shade: #d9cfbe;
  --pip: #241813;
  --display: 'Bagel Fat One', 'Bagel Fallback', 'Arial Black', system-ui, sans-serif;
  --body: 'Rethink Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: radial-gradient(130% 55% at 50% 105%, rgba(255, 107, 44, .16), transparent 62%), var(--coal);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
#app {
  max-width: 560px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 140px;
  display: grid;
  gap: 14px;
}

/* ---------- tiles ---------- */
.tile {
  appearance: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  position: relative; display: flex; flex-direction: column;
  width: 100%; aspect-ratio: 5 / 9;
  container-type: inline-size;
  background: var(--tile); color: var(--tile-ink);
  border-radius: 7px;
  box-shadow: inset 0 -3px 0 var(--tile-shade), 0 3px 0 rgba(0, 0, 0, .45);
  transition: transform .15s ease, opacity .2s ease;
}
.tile:active { transform: translateY(2px); }
span.tile, div.tile { cursor: default; }
.t-num {
  margin: 8cqi 8cqi 0; padding: 13cqi 0 11cqi;
  border-radius: 9cqi;
  background: var(--tile-ink); color: var(--tile);
  font-family: var(--display); font-size: 40cqi; line-height: 1; text-align: center;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.t-worms { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqi; padding: 4cqi 6cqi 10cqi; }
.t-worms svg { display: block; width: 70cqi; height: auto; aspect-ratio: 26 / 14; }
.t-worms.w3 svg { width: 54cqi; }
.t-worms.w4 { display: grid; grid-template-columns: 1fr 1fr; place-items: center; align-content: center; gap: 8cqi 2cqi; }
.t-worms.w4 svg { width: 42cqi; }
.tile.can {
  outline: 3px solid var(--glow); outline-offset: 2px;
  animation: pulse 1.1s ease-in-out infinite;
  z-index: 1;
}
.tile.dim { opacity: .3; }
.tile.arrive { animation: arrive .45s cubic-bezier(.2, 1.4, .4, 1); }
.slot {
  aspect-ratio: 5 / 9; border-radius: 7px; border: 1.5px dashed var(--line);
  display: grid; place-items: center; position: relative; container-type: inline-size;
}
.slot span { font-family: var(--display); font-size: 34cqi; color: var(--muted); opacity: .5; }
.slot i {
  position: absolute; bottom: 9cqi; left: 50%; translate: -50% 0;
  width: 40cqi; height: 40cqi; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pc); color: var(--coal);
  font-style: normal; font-weight: 800; font-size: 24cqi;
}
.slot.flipped {
  border-style: solid; border-color: transparent;
  background: repeating-linear-gradient(135deg, var(--grate-2) 0 5px, var(--grate) 5px 10px);
}
.slot.flipped span { text-decoration: line-through; opacity: .45; }
.slot.flipped.arrive { animation: flipdown .5s ease; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 12px 10px;
  background: linear-gradient(var(--coal) 80%, transparent);
}
.turn { min-width: 0; display: flex; flex-direction: column; }
.turn-name {
  font-family: var(--display); font-size: 30px; line-height: 1.05; color: var(--pc);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.turn-name.swap { animation: namein .4s ease; }
.top-actions { display: flex; gap: 8px; flex: none; }
.icon-btn {
  appearance: none; width: 46px; height: 46px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--grate); cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- sections ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sec-head h2 { font-family: var(--display); font-weight: 400; font-size: 20px; }
.sec-head span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.grill {
  border-radius: 18px; padding: 12px 10px 14px;
  background:
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(0, 0, 0, .28) 13px 16px),
    linear-gradient(180deg, var(--grate-2), var(--grate));
  box-shadow: inset 0 0 0 1px rgba(255, 189, 74, .08), 0 18px 40px -24px rgba(255, 107, 44, .5);
}
.grill .sec-head { padding-inline: 4px; }
.grill-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px 5px; }
.panel { border-radius: 18px; padding: 14px; background: var(--grate); display: grid; gap: 12px; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; width: 100%;
  min-height: 52px; padding: 0 18px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 800; font-size: 17px; text-align: center;
  transition: transform .1s ease;
}
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--ember); color: var(--coal); box-shadow: 0 3px 0 var(--ember-deep); }
.btn.bust { background: var(--bust); color: var(--text); flex-direction: column; gap: 0; line-height: 1.15; padding-block: 8px; }
.btn.bust small { font-weight: 500; font-size: 12.5px; opacity: .85; }
.btn.bust.urge { animation: pulse-red 1.1s ease-in-out infinite; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn.text { background: transparent; color: var(--muted); min-height: 44px; font-weight: 700; }
.btn.big { min-height: 60px; font-size: 20px; font-family: var(--display); font-weight: 400; letter-spacing: .01em; }

/* ---------- tracker helper ---------- */
.helper { display: grid; gap: 8px; }
.helper-head { display: flex; justify-content: space-between; align-items: baseline; }
.helper-head label { font-weight: 800; }
.h-row { display: flex; gap: 8px; align-items: stretch; }
.h-row input {
  flex: 1; min-width: 0; height: 48px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--coal); color: var(--text);
  padding: 0 14px; font-family: var(--display); font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.h-row input::placeholder { font-family: var(--body); font-size: 16px; color: var(--muted); }
.chip {
  appearance: none; height: 48px; padding: 0 14px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap;
}
.chip svg { width: 26px; height: 14px; }
.chip.on { border-color: var(--worm); color: var(--text); background: rgba(242, 135, 123, .12); }
.chip.square { width: 48px; padding: 0; justify-content: center; font-size: 22px; }
.status { font-size: 14.5px; color: var(--muted); min-height: 2.8em; }
.status.good { color: var(--good); }
.status.bad { color: #ff9a8f; }

/* ---------- dice ---------- */
.dice-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat.right { text-align: right; }
.worm-flag {
  justify-self: center; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  border: 1.5px dashed var(--line); color: var(--muted);
}
.worm-flag svg { width: 26px; height: 14px; opacity: .4; }
.worm-flag.yes { border-style: solid; border-color: var(--worm); color: var(--text); background: rgba(242, 135, 123, .12); }
.worm-flag.yes svg { opacity: 1; }
.dice-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.dice-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.tray { min-height: 44px; border-radius: 14px; padding: 10px; background: var(--coal); box-shadow: inset 0 2px 10px rgba(0, 0, 0, .5); }
.tray .dice-row { gap: 7px; }
.tray-empty { display: grid; place-items: center; min-height: 40px; color: var(--muted); font-size: 14px; text-align: center; }
.die {
  appearance: none; border: 0; padding: 13%; cursor: pointer;
  aspect-ratio: 1; width: 100%; border-radius: 22%;
  background: var(--die);
  box-shadow: inset 0 -3px 0 var(--die-shade), 0 2px 0 rgba(0, 0, 0, .45);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  transition: transform .12s ease, opacity .2s ease;
}
.die i { margin: 14%; border-radius: 50%; }
.die i.on { background: var(--pip); }
.die.wormface { display: grid; place-items: center; grid-template-columns: 1fr; grid-template-rows: 1fr; padding: 8%; }
.die.wormface svg { width: 92%; height: auto; aspect-ratio: 26 / 14; }
.die.dead { opacity: .28; }
.die.hot { transform: translateY(-4px); box-shadow: inset 0 -3px 0 var(--die-shade), 0 0 0 3px var(--glow); }
.die.ghost { background: transparent; border: 1.5px dashed var(--line); box-shadow: none; cursor: default; }
span.die { cursor: default; }
.die.tumble { animation: tumble .3s ease-in-out infinite; animation-delay: calc(var(--d) * -1s); }
.die.land { animation: land .35s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--d) * .25s); }
.dice-actions { display: grid; gap: 8px; }
.bust-banner {
  border-radius: 14px; padding: 14px; text-align: center;
  background: repeating-linear-gradient(135deg, rgba(184, 51, 43, .25) 0 10px, rgba(184, 51, 43, .12) 10px 20px);
  border: 1.5px solid var(--bust);
}
.bust-banner strong { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; color: #ff9a8f; }

/* ---------- players ---------- */
.player-list { display: grid; gap: 8px; }
.prow {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 6px; border-radius: 16px;
  background: var(--grate); border: 1.5px solid transparent;
}
.prow.current { border-color: var(--ember); background: linear-gradient(90deg, rgba(255, 107, 44, .16), var(--grate) 70%); }
.p-main {
  appearance: none; flex: 1; min-width: 0; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 4px; border: 0; border-radius: 12px; background: none; text-align: left;
}
.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pc); color: var(--coal); font-weight: 800; font-size: 17px;
}
.p-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.p-name { font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta { font-size: 13px; color: var(--muted); }
.p-meta b { color: var(--glow); font-weight: 700; }
.p-worms { flex: none; display: flex; align-items: center; gap: 5px; font-family: var(--display); font-size: 24px; font-variant-numeric: tabular-nums; }
.p-worms svg { width: 28px; height: 15px; }
.prow .tile, .prow .slot { width: 44px; flex: none; }
.prow .slot { border-color: var(--line); }
.tile.depth2 { box-shadow: inset 0 -3px 0 var(--tile-shade), 3px -3px 0 -1px var(--tile-shade), 0 3px 0 rgba(0, 0, 0, .45); }
.tile.depth3 { box-shadow: inset 0 -3px 0 var(--tile-shade), 3px -3px 0 -1px var(--tile-shade), 6px -6px 0 -2px #b39c74, 0 3px 0 rgba(0, 0, 0, .45); }

/* ---------- setup ---------- */
.setup { display: grid; gap: 14px; padding-top: 18px; }
.hero { display: grid; gap: 12px; justify-items: center; text-align: center; padding-block: 8px 4px; }
.hero-tiles { display: flex; gap: 10px; justify-content: center; padding-top: 8px; }
.hero-tiles .tile { width: 52px; }
.hero-tiles .tile:nth-child(1) { rotate: -9deg; translate: 0 6px; }
.hero-tiles .tile:nth-child(2) { rotate: -3deg; }
.hero-tiles .tile:nth-child(3) { rotate: 3deg; }
.hero-tiles .tile:nth-child(4) { rotate: 9deg; translate: 0 6px; }
.hero h1 { min-width: 0; font-family: var(--display); font-weight: 400; font-size: clamp(42px, 13vw, 60px); line-height: 1; color: var(--tile); letter-spacing: -.01em; overflow-wrap: anywhere; }
.hero h1 em { font-style: normal; color: var(--worm); }
.hero p { color: var(--muted); max-width: 30ch; }
.card { border-radius: 18px; padding: 16px; background: var(--grate); display: grid; gap: 14px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-row h2 { font-size: 18px; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--coal); border-radius: 14px; padding: 4px; }
.stepper button {
  appearance: none; width: 44px; height: 44px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--grate-2); font-size: 24px; font-weight: 700;
}
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper output { width: 40px; text-align: center; font-family: var(--display); font-size: 26px; }
.names { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.names li { display: flex; align-items: center; gap: 10px; }
.names .avatar { width: 34px; height: 34px; font-size: 15px; }
.names input {
  flex: 1; min-width: 0; height: 48px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--coal); color: var(--text);
  padding: 0 14px; font: inherit; font-size: 17px; font-weight: 600;
}
.names input::placeholder { color: var(--muted); font-weight: 400; }
.toggle-card {
  appearance: none; border: 0; cursor: pointer; text-align: left; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.toggle-card > span:first-child { display: grid; gap: 2px; }
.toggle-card strong { font-size: 17px; }
.toggle-card .muted { font-size: 14px; }
.switch {
  flex: none; width: 52px; height: 32px; border-radius: 999px; position: relative;
  background: var(--line); transition: background .2s ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--text); transition: transform .2s ease;
}
[aria-checked="true"] .switch { background: var(--ember); }
[aria-checked="true"] .switch::after { transform: translateX(20px); }
.foot { text-align: center; font-size: 13.5px; }

/* ---------- end ---------- */
.end { display: grid; gap: 16px; padding-top: 26px; }
.end-hero { text-align: center; display: grid; gap: 6px; justify-items: center; }
.end-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 11vw, 52px); line-height: 1.02; color: var(--glow); }
.end-hero p { color: var(--muted); }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank li {
  display: grid; grid-template-columns: 28px auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--grate);
}
.rank li.first { border: 1.5px solid var(--glow); background: linear-gradient(90deg, rgba(255, 189, 74, .14), var(--grate) 75%); }
.rank .place { font-family: var(--display); font-size: 22px; color: var(--muted); text-align: center; }
.rank li.first .place { color: var(--glow); }
.rank .who { min-width: 0; display: flex; flex-direction: column; }
.rank .who span:last-child { font-size: 13px; color: var(--muted); }
.end-actions { display: grid; gap: 8px; }

/* ---------- sheets & toast ---------- */
.backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(8, 5, 4, .6); animation: fade .2s ease; }
.sheet {
  position: fixed; z-index: 21; bottom: 0; left: 50%; translate: -50% 0;
  width: min(100%, 560px); max-height: 86%; overflow-y: auto;
  border-radius: 22px 22px 0 0; background: var(--grate);
  padding-top: 10px;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 14px;
  animation: rise .25s cubic-bezier(.2, .9, .3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
}
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); justify-self: center; }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head h3 { font-family: var(--display); font-weight: 400; font-size: 24px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-head .p-worms { font-size: 22px; }
.close-btn { appearance: none; border: 0; background: var(--grate-2); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; display: grid; place-items: center; flex: none; }
.close-btn svg { width: 18px; height: 18px; }
.stack-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 12px 8px; }
.stack-tiles figure { margin: 0; display: grid; gap: 4px; justify-items: center; }
.stack-tiles figcaption { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--glow); }
.menu-list { display: grid; gap: 6px; }
.menu-item {
  appearance: none; border: 0; cursor: pointer; width: 100%; min-height: 54px; padding: 0 14px;
  border-radius: 14px; background: var(--grate-2); text-align: left; font-weight: 700; font-size: 16.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.menu-item.danger { color: #ff9a8f; }
.modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(8, 5, 4, .6); animation: fade .2s ease; }
.modal {
  position: fixed; z-index: 41; left: 50%; top: 50%; translate: -50% -50%;
  width: min(calc(100% - 48px), 360px); padding: 20px; border-radius: 20px;
  background: var(--grate); box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  display: grid; gap: 10px; animation: pop .2s ease;
}
.modal h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.1; }
.modal p { margin: 0; color: var(--muted); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.modal-actions .btn { min-height: 48px; font-size: 16px; padding: 0 10px; }
@keyframes pop { from { opacity: 0; scale: .95; } }
.back-link { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin-bottom: -10px; color: var(--muted); font-weight: 700; text-decoration: none; }
.menu-item.danger.confirm { background: var(--bust); color: var(--text); }
.rules { margin: 0; padding-left: 22px; display: grid; gap: 10px; color: var(--text); }
.rules li::marker { font-family: var(--display); color: var(--ember); }
.rules b { color: var(--glow); }
.worm-table { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; font-size: 13px; color: var(--muted); }
.worm-table .tile { width: 46px; margin: 0 auto 4px; }
.toast {
  position: fixed; z-index: 30;
  left: 50%; translate: -50% 0;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 2 * max(16px, env(safe-area-inset-left, 0px))), 528px);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 16px;
  background: var(--tile); color: var(--tile-ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
  font-weight: 600; font-size: 15px;
}
.toast.show { animation: rise .25s cubic-bezier(.2, .9, .3, 1); }
.toast span { flex: 1; min-width: 0; }

@keyframes pulse { 0%, 100% { box-shadow: inset 0 -3px 0 var(--tile-shade), 0 0 10px 2px rgba(255, 107, 44, .55); } 50% { box-shadow: inset 0 -3px 0 var(--tile-shade), 0 0 22px 7px rgba(255, 107, 44, .8); } }
@keyframes pulse-red { 0%, 100% { box-shadow: 0 0 0 0 rgba(184, 51, 43, .7); } 50% { box-shadow: 0 0 0 6px rgba(184, 51, 43, 0); } }
@keyframes arrive { from { transform: translateY(-16px) scale(1.18); } to { transform: none; } }
@keyframes flipdown { from { transform: rotateY(90deg); } to { transform: none; } }
@keyframes namein { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes tumble { 0% { transform: rotate(-16deg) translateY(-3px); } 50% { transform: rotate(14deg) translateY(3px); } 100% { transform: rotate(-16deg) translateY(-3px); } }
@keyframes land { from { transform: translateY(-14px) rotate(-20deg); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes rise { from { translate: -50% 30px; opacity: 0; } to { translate: -50% 0; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- shared additions ---------- */
.avatar.pic, .slot i.pic { padding: 0; overflow: hidden; }
.avatar.pic svg, .slot i.pic svg { display: block; width: 100%; height: 100%; }
.avatar.avatar-btn { appearance: none; border: 0; padding: 0; cursor: pointer; position: relative; overflow: visible; }
.names .avatar.avatar-btn { width: 44px; height: 44px; }
.avatar-btn svg { border-radius: 50%; }
.avatar-btn::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ember) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E") center / 11px no-repeat;
  box-shadow: 0 0 0 2px var(--grate);
}
[data-look="apple"] .avatar-btn::after { background-color: var(--a-tint); box-shadow: 0 0 0 2px var(--a-card); }
.picker-head { margin: 4px 0 0; font-family: var(--display); font-weight: 400; font-size: 18px; }
[data-look="apple"] .picker-head { font-family: var(--a-font); font-weight: 600; font-size: 17px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 12px 6px; }
.picker-item { appearance: none; border: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 4px 0; border-radius: 12px; }
.picker-item .avatar { width: 52px; height: 52px; }
.picker-item.on .avatar { box-shadow: 0 0 0 3px var(--glow); }
[data-look="apple"] .picker-item.on .avatar { box-shadow: 0 0 0 3px var(--a-tint-text); }
.picker-name { font-size: 11.5px; line-height: 1.2; text-align: center; color: var(--muted); }
[data-look="apple"] .picker-name { color: var(--a-label-2); }
.picker-item.on .picker-name { font-weight: 700; color: var(--text); }
[data-look="apple"] .picker-item.on .picker-name { color: var(--a-label); }
.turn-avatar { display: none; }
.panel.bare { background: none; padding: 0; }
.settings-group { display: grid; gap: 14px; }
.setting-row { cursor: default; }
.menu-item.static { cursor: default; }
.menu-item small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
[data-look="apple"] .menu-item small { font-size: 13px; font-weight: 400; color: var(--a-label-2); }
.grabber { box-sizing: content-box; padding-block: 8px; background-clip: content-box; margin-block: -8px; }
.grabber, .sheet-head { touch-action: none; }
.segmented { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 12px; background: var(--coal); }
.segmented button {
  appearance: none; border: 0; cursor: pointer; min-height: 38px; padding: 0 14px;
  border-radius: 9px; background: none; color: var(--muted); font-weight: 700; font-size: 15px; padding: 0 12px;
}
.segmented button[aria-checked="true"] { background: var(--ember); color: var(--coal); }
