:root {
  --bg: #15111E;
  --bg-deep: #0D0A13;
  --surface: #211A2E;
  --surface-2: #2C2340;
  --line: #3A3052;
  --text: #F4EFE6;
  --muted: #B3A9C4;
  --faint: #8E84A3;
  --gold: #F5B83D;
  --gold-deep: #D9982A;
  --ink: #1A1204;
  --teal: #3CCFB6;
  --teal-ink: #0E2420;
  --teal-soft: #1F2A2A;
  --coral: #FF9B85;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.1; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.release-notice { position: relative; z-index: 20; display: grid; gap: 4px; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--gold); text-align: center; }
.release-notice .btn { white-space: normal; min-height: 44px; }
.release-notice small { font-size: 12px; color: var(--muted); }

/* ---------- shell ---------- */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + var(--safe-top)) 18px 12px;
  background: var(--bg);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo img { width: 34px; height: 34px; }
.logo span { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.logo b { color: var(--gold); font-weight: 800; }
.top-right { display: flex; align-items: center; gap: 8px; }
.tokens {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px 6px 8px; font-weight: 700;
}
.coin { width: 20px; height: 20px; border-radius: 50%; background: var(--gold); box-shadow: inset 0 0 0 4px var(--gold), inset 0 0 0 6px var(--ink); flex: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; padding: 0;
}
.icon-btn svg { width: 20px; height: 20px; }

main { flex: 1; padding: 4px 18px 28px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

.bottomnav {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; justify-content: space-around;
  border-top: 1px solid var(--surface-2); background: var(--bg);
  padding: 6px 10px calc(8px + var(--safe-bottom));
}
.bottomnav a {
  min-height: 48px; padding: 0 14px; display: flex; align-items: center;
  color: var(--faint); text-decoration: none; font-weight: 700; font-size: 15px; border-radius: 12px;
}
.bottomnav a.on { color: var(--gold); }
/* Keep navigation below the whole solo card, never over its last row. */
.bottomnav.solo-nav { position: static; }

/* ---------- controls ---------- */
.btn {
  min-height: 52px; border-radius: 14px; border: none; padding: 0 20px;
  font-weight: 700; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.teal { background: var(--teal); color: var(--teal-ink); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.dashed { background: transparent; color: var(--text); border: 1px dashed #5A4D78; }
.btn.danger { background: transparent; color: var(--coral); border: 1px solid #5C3A3A; }
.btn.small { min-height: 44px; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.btn.block { width: 100%; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  min-height: 52px; padding: 12px 16px; color: var(--text); font-size: 16px;
}
textarea.input { min-height: 160px; resize: vertical; line-height: 1.4; }
.input::placeholder { color: var(--faint); }
.code-input { letter-spacing: 3px; text-transform: uppercase; font-size: 18px; font-weight: 700; }

.tabs { display: flex; gap: 8px; }
.tab {
  flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-weight: 700; font-size: 14px;
}
.tab.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button {
  min-height: 60px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-align: left; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center;
}
.seg button strong { font-size: 15px; }
.seg button span { font-size: 12px; color: var(--muted); }
.seg button.on { border-color: var(--gold); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--gold); }

.error { color: var(--coral); font-size: 14px; }

.pw { position: relative; display: block; }
.pw .input { padding-right: 84px; }
.pw button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 42px; min-width: 64px; padding: 0 12px; border-radius: 10px; border: none;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 14px;
}

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.claim { background: var(--teal-soft); border: 1px solid #2E4A45; border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.claim small { color: #B3E9DF; display: block; font-size: 13px; }
.email-banner {
  margin-bottom: 14px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid #8c6931; background: #312516;
  display: flex; flex-direction: column; gap: 9px;
}
.email-banner strong { color: var(--gold); }
.email-banner small { display: block; color: var(--text); font-size: 12px; line-height: 1.4; }
.email-banner .row { flex-wrap: wrap; }
.install-banner-slot:empty { display: none; }
.install-banner {
  margin: 0; padding: 10px 12px;
  display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 6px 8px;
  align-items: center;
}
.install-banner strong { font-size: 14px; line-height: 1.35; }
.install-banner-close {
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); font-size: 24px;
  display: grid; place-items: center;
}
.install-banner-close:hover { background: var(--surface); }
.install-banner .install-cta { grid-column: 1; justify-self: start; min-height: 36px; }

.room-card {
  width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; color: var(--text); display: flex; flex-direction: column; gap: 8px; text-decoration: none;
}
.room-card .when { font-size: 13px; color: var(--muted); }
.room-card .title { font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 1.15; }
.room-card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.room-card .meta b { color: var(--gold); }
.tag { font-size: 12px; font-weight: 700; color: var(--teal); }
.tag.gold { color: var(--gold); }
.tag.lilac { color: #C9A7FF; }

.empty { text-align: center; padding: 28px 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--surface-2);
}
.list-row.me { background: var(--surface-2); border-color: var(--gold); }
.pack-row { flex-wrap: wrap; }
.pack-row .grow { flex-basis: 100%; overflow-wrap: anywhere; }
.list-row .place { font-family: var(--display); font-weight: 800; font-size: 18px; min-width: 40px; }
.list-row .amt { font-weight: 700; color: var(--gold); }

/* ---------- pack picker ---------- */
.cat { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cat > summary {
  list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); min-height: 52px;
}
.cat > summary::-webkit-details-marker { display: none; }
.cat[open] > summary { border-bottom: 1px solid var(--line); }
.pack-opt { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; cursor: pointer; }
.pack-opt + .pack-opt { border-top: 1px solid var(--surface-2); }
.pack-opt input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.pack-opt .count { margin-left: auto; color: var(--faint); font-size: 13px; }
.phrase-total { position: sticky; bottom: 70px; z-index: 5; }

/* ---------- game ---------- */
.game-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.live-tag { font-size: 13px; font-weight: 700; color: var(--teal); }
.pot { text-align: right; }
.pot small { display: block; font-size: 12px; color: var(--muted); }
.pot strong { font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--gold); }
.countdown { font-variant-numeric: tabular-nums; }

.board {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: minmax(clamp(80px, 22vw, 106px), auto); gap: 3px;
  margin-left: calc(-18px + env(safe-area-inset-left, 0px));
  margin-right: calc(-18px + env(safe-area-inset-right, 0px));
}
.cell {
  min-width: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: clamp(13px, 3.7vw, 16px); line-height: 1.12; font-weight: 700; padding: 2px;
  display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden;
  overflow-wrap: normal; word-break: normal; hyphens: none; -webkit-hyphens: none; transition: transform .12s ease;
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.cell > span, .adm-cell > span { display: block; width: 100%; max-width: 100%; white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: none; -webkit-hyphens: none; }
.cell:active { transform: scale(.94); }
.cell.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.cell.win { box-shadow: inset 0 0 0 2px #FFF3D6; }
.cell.free { background: var(--teal); color: var(--teal-ink); border: none; font-family: var(--display); font-size: 16px; font-weight: 800; }
.cell.stamp { animation: stamp .28s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stamp { from { transform: scale(.7); } to { transform: scale(1); } }
.game-status { flex-wrap: wrap; gap: 6px; }
.phrase-full { font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; word-break: break-word; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rules-btn { min-height: 36px; padding: 0 12px; }
.game-help { gap: 8px; flex-wrap: nowrap; }
.game-help .rules-btn { min-height: 44px; }
.play-guide { display: grid; gap: 20px; }
.play-guide section { min-width: 0; }
.play-guide h3 { color: var(--gold); font-size: 16px; letter-spacing: .5px; margin-bottom: 8px; }
.play-guide p { font-size: 18px; line-height: 1.65; }
.rules { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rule-row { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.rule-row dt { font-size: 12px; color: var(--muted); font-weight: 700; }
.rule-row dd { margin: 2px 0 0; font-size: 15px; }
.toggle { flex: none; width: 54px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); padding: 3px; display: flex; }
.toggle span { width: 24px; height: 24px; border-radius: 50%; background: var(--faint); transition: transform .15s ease; }
.toggle.on { background: var(--teal); border-color: var(--teal); }
.toggle.on span { background: var(--teal-ink); transform: translateX(22px); }

.reactions { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.reactions::-webkit-scrollbar { display: none; }
.reactions button {
  flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 700;
}
.feed { min-height: 20px; text-align: center; font-size: 14px; color: var(--muted); }
.feed b { color: var(--text); }

.bingo {
  flex: 1; height: 62px; border: none; border-radius: 16px; font-family: var(--display); font-weight: 800;
  background: var(--surface-2); color: var(--faint); font-size: 16px;
}
.bingo.ready { background: var(--gold); color: var(--ink); font-size: 26px; animation: pulse 1.1s ease-in-out infinite; }
.bingo.called { background: var(--teal); color: var(--teal-ink); font-size: 18px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 184, 61, .55); } 50% { box-shadow: 0 0 0 10px rgba(245, 184, 61, 0); } }

.code-box { text-align: center; padding: 22px 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.code-box .code { font-family: var(--display); font-size: 44px; font-weight: 800; letter-spacing: 6px; color: var(--gold); margin: 6px 0 14px; }

.result-hero { background: var(--gold); color: var(--ink); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.result-hero h1 { font-size: 38px; }
.result-hero.plain { background: var(--surface-2); color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

/* ---------- overlays ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(8, 6, 12, .72);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-radius: 26px 26px 0 0; padding: 22px 20px calc(24px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 14px;
  animation: rise .22s ease-out;
}
@keyframes rise { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast-wrap { position: fixed; left: 0; right: 0; top: calc(12px + var(--safe-top)); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 700; font-size: 14px;
  max-width: 440px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); animation: rise .2s ease-out;
}
.toast.bad { background: var(--coral); color: #2A0F08; }

.onboard { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; justify-content: center; }
.onboard-inner { width: 100%; max-width: 480px; padding: calc(40px + var(--safe-top)) 24px calc(28px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 22px; }
.onboard-inner h1 { font-size: 40px; }
.onboard-art { flex: 1; display: grid; place-items: center; }
.dots { display: flex; gap: 8px; justify-content: center; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots span.on { background: var(--gold); width: 24px; border-radius: 8px; }

.auth { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 32px 22px; }
.auth .brand { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.landing-intro { border: 1px solid var(--gold); border-radius: 14px; overflow: hidden; background: var(--panel, #241735); }
.landing-intro[hidden] { display: none; }
.landing-intro h2 { color: var(--gold); font-size: 18px; margin: 0; padding: 10px 14px; }
.landing-intro video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #130d20; }
.auth .brand img { width: 96px; height: 96px; }
.auth .brand h1 { font-size: 40px; }

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

/* ---------- phrase suggestions ---------- */
.sug-form { display: flex; flex-direction: column; gap: 10px; }
.sug-form .sug-err { margin-top: -4px; }
.sug-form .input[aria-invalid="true"] { border-color: var(--coral); }
.sug-form select.input:invalid { color: var(--faint); }
.sug-form optgroup { color: var(--muted); font-weight: 700; }
.sug-form option { color: var(--text); background: var(--surface); }
.sug-note { color: var(--gold); }
.sug-under { align-self: center; min-height: 40px; color: var(--muted); }
.sug-review-inputs .input { min-width: 0; }
@media (max-width: 600px) {
  .sug-review-inputs .input {
    flex: 1 1 100%;
    width: 100% !important;
  }
}

/* ---------- billing (test mode) ---------- */
button.tokens { color: var(--text); cursor: pointer; }
.tokens-plus { width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-size: 15px; line-height: 1; font-weight: 800; }
.test-banner { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--teal); background: var(--teal-soft); }
.test-banner strong { color: var(--teal); letter-spacing: 1.5px; font-size: 13px; }
.test-banner span { font-size: 13px; color: #B3E9DF; }
.price-list { display: flex; flex-direction: column; gap: 10px; }
.price-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.coin.big { width: 34px; height: 34px; box-shadow: inset 0 0 0 7px var(--gold), inset 0 0 0 10px var(--ink); }
.premium-hero { padding: 22px; border-radius: 22px; background: linear-gradient(135deg, var(--surface-2), #3A2A55); border: 1px solid #5A4D78; display: flex; flex-direction: column; gap: 6px; }
.premium-hero h1 { font-size: 40px; color: var(--gold); }
.premium-hero > span { color: #C9A7FF; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.premium-pitch { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 18px; border: 1px solid #5A4D78; background: var(--surface-2); color: var(--text); text-decoration: none; }
.premium-pitch strong { color: #C9A7FF; font-family: var(--display); font-size: 18px; }
.premium-note strong { color: var(--gold); }
.custom-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.custom-tag { font-size: 12px; font-weight: 700; color: #C9A7FF; background: var(--surface-2); border: 1px solid #5A4D78; border-radius: 999px; padding: 3px 10px; text-decoration: none; }
.skel { border-radius: 18px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: skel 1.3s linear infinite; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.list-row .amt.neg { color: var(--coral); }

/* ---------- midterm madness ---------- */
.mt-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--ink); background: var(--coral); border-radius: 6px; padding: 2px 7px; vertical-align: middle; white-space: nowrap; }
.mt-status { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.mt-status.ok { border-color: var(--teal); }
.mt-status.warn { border-color: var(--coral); }
.mt-status .row { flex-wrap: wrap; }
.mt-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-quick .btn { flex: 1 1 auto; }
.mt-count { position: sticky; top: -22px; z-index: 2; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; }
.mt-count.short { border-color: var(--coral); }
.mt-group { flex-shrink: 0; }
.mt-group > summary { gap: 10px; }
.mt-gl { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.mt-gl input { width: 22px; height: 22px; accent-color: var(--gold); }

/* ---------- admin: official packs ---------- */
.adm-subtabs { min-width: 260px; }
.adm-label { display: flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.adm-pack { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--surface-2); background: var(--surface); color: var(--text); }
.adm-pack.on { border-color: var(--gold); background: var(--surface-2); }
.adm-pack-name { font-weight: 700; overflow-wrap: anywhere; }
.adm-pack-meta { font-size: 12px; color: var(--faint); }
.adm-cats > summary { cursor: pointer; font-weight: 700; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
.adm-status { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 6px; }
.adm-status.draft { background: var(--surface-2); color: var(--gold); border: 1px dashed var(--gold); }
.adm-status.pub { background: var(--teal); color: var(--teal-ink); }
.adm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-inline { width: auto !important; min-height: 44px !important; }
.adm-note { font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--teal-soft); color: #B3E9DF; border: 1px solid #2E4A45; }
.adm-note.warn { background: #312516; color: var(--text); border-color: #8c6931; }
.adm-group { display: flex; flex-direction: column; gap: 8px; }
.adm-group-head h3 { font-size: 16px; color: var(--gold); }
.ph-row.adm-ph { display: grid; grid-template-columns: 22px minmax(0, 2fr) minmax(100px, 1fr) auto auto; gap: 8px; align-items: center; }
.adm-ph input[type="text"] { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 40px; padding: 6px 10px; color: var(--text); }
.adm-ph .ph-text, .adm-ph .ph-group { width: 100%; min-width: 0; }
@media (max-width: 600px) {
  .ph-row.adm-ph { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .ph-row.adm-ph .ph-text { grid-column: 2 / -1; font-size: 16px; min-height: 48px; }
  .ph-row.adm-ph .ph-group { grid-column: 2 / -1; font-size: 16px; min-height: 44px; }
  .ph-row.adm-ph input[type="checkbox"] { grid-column: 1; grid-row: 1; }
  .ph-row.adm-ph .stat-pill { grid-column: 2; grid-row: 3; }
  .ph-row.adm-ph .btn { grid-column: 3; grid-row: 3; }
}
.ph-row.ro { display: flex; gap: 10px; align-items: center; }
.adm-two { display: grid; gap: 20px; }
@media (min-width: 900px) { .adm-two { grid-template-columns: 1fr 1fr; align-items: start; } }
.adm-modal { align-items: center; padding: 16px; }
.adm-modal .sheet { border-radius: 22px; max-width: 520px; }
.adm-modal .sheet.wide { max-width: 680px; }
.adm-modal .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.adm-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.adm-cell { min-width: 0; min-height: clamp(72px, 20vw, 116px); display: flex; align-items: center; justify-content: center; text-align: center; padding: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 16px; font-weight: 700; line-height: 1.12; overflow-wrap: normal; word-break: normal; hyphens: none; overflow: hidden; }
.adm-cell.free { background: var(--teal); color: var(--teal-ink); font-family: var(--display); font-size: 15px; border: none; }
