:root {
  --bg: #FFF7EE;
  --surface: #FFFFFF;
  --ink: #1B1B1F;
  --muted: #7A7480;
  --line: #EDE4DA;
  --c1: #FF6B6B; --c2: #FFB627; --c3: #2EC4B6; --c4: #8B5CF6; --c5: #3A86FF; --c6: #FF8FCB;
  --radius: 22px;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }

.screen {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: 12px; }
.logo {
  font-size: clamp(56px, 16vw, 84px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
  line-height: 1;
}
.top-logo { color: #1B1B1F; font-size: clamp(46px, 13vw, 72px); }
.logo span { display: inline-block; transition: transform .25s; }
.logo span:nth-child(1) { color: var(--c1); }
.logo span:nth-child(2) { color: var(--c2); }
.logo span:nth-child(3) { color: var(--c3); }
.logo span:nth-child(4) { color: var(--c4); }
.logo span:nth-child(5) { color: var(--c5); }
.logo span:nth-child(6) { color: var(--c6); }
.logo span:nth-child(7) { color: var(--c1); }
.logo span:nth-child(8) { color: var(--c3); }
.logo:hover span:nth-child(odd) { transform: translateY(-4px) rotate(-4deg); }
.logo:hover span:nth-child(even) { transform: translateY(3px) rotate(4deg); }
.tag { color: var(--muted); margin: 8px 0 0; }

/* ---------- Blocks ---------- */
.block { display: flex; flex-direction: column; gap: 10px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; }
h2 { font-size: 20px; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.link { color: var(--muted); font-size: 14px; padding: 4px 0; }
.link:hover { color: var(--ink); }

.add-row { display: flex; gap: 8px; }
.add-row input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 17px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.add-row input:focus { border-color: var(--ink); }
.btn-add {
  width: 54px; border-radius: 16px;
  background: var(--ink); color: #fff;
  font-size: 26px; font-weight: 700;
}

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: var(--pc);
  color: #fff;
  font-weight: 700;
  animation: pop .25s cubic-bezier(.3,1.6,.5,1);
}
.chip button {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.28); color: #fff; font-size: 13px; line-height: 1;
}
.chip button:hover { background: rgba(255,255,255,.45); }

/* ---------- Packs ---------- */
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack {
  position: relative;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 2px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  min-height: 112px;
  transition: transform .15s, background .2s, border-color .2s, color .2s;
}
.pack:active { transform: scale(.97); }
.pack .p-emoji { font-size: 24px; line-height: 1; }
.pack .p-name { font-weight: 800; font-size: 16px; line-height: 1.15; }
.pack .p-desc { font-size: 13px; color: var(--muted); line-height: 1.25; }
.pack .p-count { font-size: 12px; color: var(--muted); margin-top: auto; }
.pack .p-check {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 12px; color: transparent;
}
.pack.on { background: var(--pc); border-color: var(--pc); color: var(--pi); }
.pack.on .p-desc, .pack.on .p-count { color: var(--pi); opacity: .78; }
.pack.on .p-check { border-color: transparent; background: rgba(255,255,255,.9); color: #1B1B1F; }
.pack .badge18 {
  align-self: flex-start;
  font-size: 11px; font-weight: 800;
  padding: 2px 7px; border-radius: 6px;
  background: #FF3D7F; color: #fff;
}

/* ---------- Segmented ---------- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 4px; }
.seg button { padding: 10px; border-radius: 12px; font-weight: 700; color: var(--muted); }
.seg button[aria-checked="true"] { background: #FFE14D; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn-primary {
  width: 100%;
  padding: 18px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  transition: transform .12s, opacity .2s;
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .25; cursor: not-allowed; }
.btn-primary.sm { padding: 14px; font-size: 16px; }
.btn-ghost { padding: 14px; border-radius: 16px; border: 2px solid var(--line); font-weight: 700; width: 100%; }

.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: auto; }

.coffee {
  align-self: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
  padding: 14px 24px; border-radius: 999px;
  background: #FFDD00; color: #1B1B1F;
  border: 2.5px solid #1B1B1F;
  box-shadow: 0 5px 0 #1B1B1F;
  font-weight: 800; font-size: 17px; text-decoration: none; text-align: center;
  transition: transform .12s, box-shadow .12s;
  animation: nudge 4s ease-in-out 1.5s infinite;
}
.coffee span { font-weight: 600; font-size: 14px; opacity: .75; }
.coffee:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #1B1B1F; }
.coffee:active { transform: translateY(4px); box-shadow: 0 1px 0 #1B1B1F; }
.hero-coffee { margin-top: 16px; }
.coffee.sm { padding: 10px 16px; font-size: 15px; box-shadow: 0 3px 0 #1B1B1F; animation: none; }
@keyframes nudge { 0%, 88%, 100% { rotate: 0deg; } 91% { rotate: -3deg; } 94% { rotate: 3deg; } 97% { rotate: -2deg; } }

/* ---------- Avatars / photos ---------- */
.avatar {
  flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pc, #ddd) center / cover no-repeat;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--pc, #ddd);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 18px;
}
.avatar:empty:not(.has) { display: grid; }
.avatar.big { width: 84px; height: 84px; font-size: 34px; margin-bottom: 6px; }
.chip .cam {
  width: 30px; height: 30px; margin-left: -8px; border-radius: 50%;
  background: rgba(255,255,255,.3) center / cover no-repeat; font-size: 14px; border: 2px solid rgba(255,255,255,.8);
}
.chip .cam.has { font-size: 0; }
.rail li .av { width: 20px; height: 20px; border-radius: 50%; background: center / cover no-repeat; margin-left: -6px; border: 2px solid #fff; }
.rail li.has-av::before { display: none; }
.rail li { cursor: pointer; }
.rail li .sips-n { font-size: 12px; opacity: .8; }
.top-right { display: flex; gap: 8px; }

/* ---------- Card extras: timer + sip logging ---------- */
.card-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.card-tools:empty { display: none; }
.timer, .sipbtn {
  --p: 0;
  padding: 10px 16px; border-radius: 999px;
  font-weight: 800; font-size: 15px;
  background: rgba(255,255,255,.9); color: #1B1B1F;
  box-shadow: 0 3px 0 rgba(0,0,0,.2);
}
.timer.running { background: conic-gradient(#1B1B1F calc(var(--p) * 1turn), rgba(255,255,255,.9) 0) border-box; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); min-width: 92px; }
.timer.done { background: #FF3D7F; color: #fff; animation: shake .5s 2; }
.sipbtn.logged { opacity: .6; }

/* ---------- Sheets: custom cards + drink counter ---------- */
.sheet.tall { max-height: calc(100dvh - 32px); overflow-y: auto; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hint.left { text-align: left; font-size: 12.5px; }
#customInput {
  font: inherit; font-size: 16px; width: 100%; resize: vertical;
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; outline: none; background: var(--bg); color: var(--ink);
}
#customInput:focus { border-color: var(--ink); }
.ins-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ins-row button { padding: 6px 10px; border-radius: 999px; background: #C6F432; font-weight: 700; font-size: 13px; }
.custom-list, .sip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.custom-list li { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-weight: 600; font-size: 14.5px; }
.custom-list li span { flex: 1; }
.custom-list li b { background: #C6F432; border-radius: 6px; padding: 0 4px; }
.custom-list li button { color: var(--muted); font-size: 16px; }
.custom-list .empty { color: var(--muted); justify-content: center; }
.sip-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--bg); font-weight: 800; }
.sip-list .nm3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sip-list .ct { min-width: 44px; text-align: center; font-size: 20px; }
.sip-list button.pm { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid var(--line); font-size: 20px; font-weight: 800; }
.sip-list .avatar { width: 38px; height: 38px; font-size: 15px; border-width: 2px; }

.about { border-top: 2px solid var(--line); padding-top: 22px; color: #3a3640; font-size: 15px; }
.about h2 { font-size: 20px; margin-bottom: 8px; }
.about h3 { font-size: 16px; font-weight: 800; margin: 18px 0 6px; color: var(--ink); }
.about p { margin: 0 0 8px; }
.about ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.about details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.about summary { font-weight: 700; cursor: pointer; color: var(--ink); }
.about details p { margin: 8px 0 0; color: var(--muted); }

/* ---------- Game ---------- */
#game { gap: 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line);
  font-size: 18px; font-weight: 700;
}
.icon-btn.rev { transform: scaleX(-1); }
.round { font-weight: 700; color: var(--muted); }

.turn { display: flex; flex-direction: column; align-items: center; gap: 0; }
.turn-label { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.turn-name { font-size: clamp(34px, 10vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; text-align: center; word-break: break-word; }

.effects { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 0; }
.effect {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--line);
  font-size: 13px; font-weight: 700;
  animation: pop .3s cubic-bezier(.3,1.6,.5,1);
}
.effect .count {
  background: var(--ink); color: #fff;
  border-radius: 999px; padding: 2px 8px; font-size: 12px;
  white-space: nowrap;
}
.effect.mine { border-color: var(--ink); }

.card {
  --cc: #FF6B6B; --ci: #1B1B1F;
  position: relative;
  flex: 1;
  min-height: 340px;
  background: var(--cc);
  color: var(--ci);
  border-radius: 28px;
  padding: 22px 22px 24px;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.45);
  cursor: pointer;
  outline: none;
  overflow: hidden;
}
.card.deal { animation: deal .42s cubic-bezier(.2,1.2,.4,1); }
.card.wild {
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.55) 0 6px, transparent 7px),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,.55) 0 10px, transparent 11px),
    radial-gradient(circle at 80% 18%, rgba(255,107,107,.6) 0 5px, transparent 6px),
    radial-gradient(circle at 22% 85%, rgba(58,134,255,.55) 0 7px, transparent 8px),
    var(--cc);
}
.card.adult { box-shadow: 0 18px 40px -18px rgba(255,61,127,.6); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pill {
  font-size: 13px; font-weight: 800;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.28);
}
.card.adult .pill { background: #FF3D7F; color: #fff; }
.mult { font-size: 13px; font-weight: 800; padding: 6px 12px; border-radius: 999px; background: var(--ci); color: var(--cc); }
.card-text {
  margin: auto 0;
  padding: 18px 0;
  font-size: clamp(24px, 6.6vw, 31px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.card-foot { margin: 0; font-weight: 700; font-size: 15px; opacity: .85; }
.card-foot:empty { display: none; }
.nm { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.sips { white-space: nowrap; }
.card.doubled .sips { background: var(--ci); color: var(--cc); padding: 0 .25em; border-radius: .2em; }

.rail { list-style: none; padding: 0; margin: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rail::-webkit-scrollbar { display: none; }
.rail li {
  flex: none;
  padding: 6px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
  background: var(--surface); border: 2px solid var(--line); color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.rail li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.rail li.now { background: var(--pc); border-color: var(--pc); color: #fff; }
.rail li.now::before { background: #fff; }

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(27,27,31,.45);
  display: grid; place-items: end center;
  padding: 16px;
  animation: fade .2s;
}
@media (min-width: 560px) { .overlay { place-items: center; } }
.sheet {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border-radius: 26px;
  padding: 26px 22px 20px;
  text-align: center;
  animation: up .3s cubic-bezier(.2,1.2,.4,1);
}
.sheet-emoji { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.sheet h2 { font-size: 22px; }
.sheet p { color: var(--muted); margin: 8px 0 20px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  max-width: calc(100% - 32px);
  text-align: center;
  animation: up .3s cubic-bezier(.2,1.2,.4,1);
}

/* ---------- Modes ---------- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode {
  padding: 12px 8px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  transition: transform .15s, border-color .2s, background .2s;
}
.mode:active { transform: scale(.97); }
.mode .m-emoji { font-size: 26px; line-height: 1; }
.mode .m-name { font-weight: 800; font-size: 14px; line-height: 1.15; }
.mode .m-desc { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.mode[aria-checked="true"] { border-color: var(--ink); background: #FFE14D; }
.mode[aria-checked="true"] .m-desc { color: var(--ink); opacity: .7; }
.duo-note { font-size: 13px; font-weight: 700; color: #06A77D; margin: 0; }
.pack .badge2 { align-self: flex-start; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: #06A77D; color: #fff; }

.modes { grid-template-columns: repeat(2, 1fr); }
.seg.two { grid-template-columns: 1fr 1fr; }
#friendBlock .seg + .seg { margin-top: 8px; }

/* ---------- Friend Test ---------- */
.ft-stage {
  flex: 1;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 28px;
  padding: 22px 18px;
  display: flex; flex-direction: column; gap: 14px;
  animation: up .3s cubic-bezier(.2,1.2,.4,1);
}
.ft-center { text-align: center; align-items: center; justify-content: center; }
.ft-emoji { font-size: 56px; line-height: 1; }
.ft-big { font-size: clamp(26px, 7.5vw, 34px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.ft-sub { color: var(--muted); margin: 0; font-weight: 600; }
.ft-who { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.ft-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ft-bar i { display: block; height: 100%; background: #FF8C42; border-radius: 99px; transition: width .3s; }
.ft-q { font-size: clamp(24px, 6.8vw, 30px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.18; margin: 0; }
.ft-opts { display: grid; gap: 10px; margin-top: auto; }
.ft-opt {
  text-align: left;
  padding: 16px 18px;
  border-radius: 18px;
  border: 2px solid var(--oc);
  background: color-mix(in srgb, var(--oc) 14%, #fff);
  font-weight: 800; font-size: 17px;
  transition: transform .12s, opacity .2s;
}
.ft-opt:active { transform: scale(.98); }
.ft-opt.right { background: #06A77D; border-color: #06A77D; color: #fff; }
.ft-opt.wrong { background: #FF3D7F; border-color: #FF3D7F; color: #fff; }
.ft-opt.dim { opacity: .35; }
.ft-opt .tag { float: right; font-size: 13px; opacity: .9; }
.ft-result { font-size: 19px; font-weight: 800; margin: 0; line-height: 1.3; }
.ft-scores { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; }
.ft-scores li { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--pc) 16%, #fff); border: 2px solid var(--pc); font-weight: 800; }
.ft-award { background: #FFE14D; border-radius: 18px; padding: 14px; font-weight: 800; width: 100%; }
.ft-actions { display: grid; gap: 8px; width: 100%; margin-top: auto; }

/* ---------- Four in a Row ---------- */
.bwrap.four { aspect-ratio: 7 / 6; }
.c4 {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr);
  gap: 5px; padding: 8px;
  background: #3A86FF; border-radius: 22px;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.15);
}
.c4-cell {
  position: relative; border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 3px 0 rgba(0,0,0,.12);
  display: grid; place-items: center;
}
.c4.live .c4-cell { cursor: pointer; }
.c4-cell .ic { font-size: clamp(12px, 3.8vw, 22px); opacity: .75; }
.c4-cell .ctr {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--tc);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18);
}
.c4-cell .ctr.drop { animation: drop .5s cubic-bezier(.35,1.35,.5,1); }
@keyframes drop { from { transform: translateY(calc(var(--d) * -118%)); } }
.c4-cell.win .ctr { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #1B1B1F; animation: pop .4s; }
.c4-turn { width: 46px; height: 46px; border-radius: 50%; background: var(--tc); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }

/* ---------- Board screen ---------- */
.board-screen { gap: 12px; }
.bwrap { position: relative; width: 100%; aspect-ratio: 1; }
.bgrid { position: absolute; inset: 0; display: grid; gap: 2px; }
.bgrid.sl { grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(10, 1fr); border-radius: 18px; overflow: hidden; }
.bsvg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.sl-cell {
  position: relative;
  background: var(--tint);
  font-size: clamp(8px, 2.2vw, 11px); font-weight: 700; color: rgba(27,27,31,.55);
  padding: 2px 3px;
  display: flex; align-items: flex-start; justify-content: flex-start;
}
.sl-cell .ic { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(11px, 3.4vw, 18px); opacity: .9; }
.sl-cell.fin { background: #1B1B1F; color: #fff; }

.token {
  position: absolute; z-index: 3;
  width: clamp(14px, 4.4vw, 22px); aspect-ratio: 1; border-radius: 50%;
  background: var(--pc) center / cover no-repeat;
  border: 2px solid var(--pc);
  box-shadow: 0 0 0 1.5px #fff, 0 2px 6px rgba(0,0,0,.35);
  transform: translate(-50%, -50%);
  transition: left .16s ease, top .16s ease, transform .2s;
}
.token.now { z-index: 4; transform: translate(-50%, -50%) scale(1.35); box-shadow: 0 0 0 3px rgba(27,27,31,.25), 0 2px 6px rgba(0,0,0,.35); }
.token.hop { animation: hop .16s ease; }
@keyframes hop { 50% { margin-top: -6px; } }

.panel {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-who { display: flex; flex-direction: column; min-width: 0; }
.panel-name { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmsg { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; min-height: 1.3em; }
.bmsg:empty { display: none; }
.bactions { display: flex; gap: 8px; flex-wrap: wrap; }
.bactions button { flex: 1 1 40%; }
.bactions .coffee { flex: 1 1 100%; }
.ft-actions .coffee { justify-self: center; margin-top: 6px; }
.panel-row .avatar { width: 52px; height: 52px; font-size: 22px; }
.panel-row { justify-content: flex-start; }
.panel-row .dice-row { margin-left: auto; }
.btn-primary.alt { background: #FF3D7F; }

.dice-row { display: flex; gap: 8px; flex: none; }
.die {
  width: 46px; height: 46px; border-radius: 12px;
  background: #fff; border: 2px solid var(--ink);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  padding: 5px;
}
.die i { width: 7px; height: 7px; border-radius: 50%; background: transparent; place-self: center; }
.die i.on { background: var(--ink); }
.die.roll { animation: shake .5s; }
@keyframes shake {
  20% { transform: rotate(-18deg) scale(1.1); } 40% { transform: rotate(14deg); }
  60% { transform: rotate(-10deg) scale(1.05); } 80% { transform: rotate(6deg); }
}

.sheet-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px; animation: up .3s cubic-bezier(.2,1.2,.4,1); }
.sheet-card .card { min-height: 320px; cursor: default; }
#cardSheet { place-items: center; }

@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes deal {
  from { transform: translateY(30px) rotate(-3deg) scale(.95); opacity: 0; }
}
@keyframes up { from { translate: 0 24px; opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
