:root {
  --paper: #efeee9;
  --ink: #1c1917;
  --dim: #6d675f;
  --gold: #a7772f;
  --line: rgba(28, 25, 23, 0.12);
  --card: #f7f4ee;
  --n: #8d887f;
  --r: #2f6fed;
  --sr: #7a45c4;
  --ssr: #c6922a;
  --ur: #e11d74;
  --dock-h: 168px;
  color-scheme: light;
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body[data-screen="reveal"] #viewHome,
body[data-screen="album"] #viewHome,
body[data-screen="album"] #viewReveal,
body[data-screen="home"] #viewReveal,
body[data-screen="home"] #viewAlbum { display: none !important; }
html, body {
  margin: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  position: fixed;
  top: 0;
  left: 0;
  background:
    linear-gradient(rgba(28, 25, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 25, 23, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 22px 22px, 22px 22px, auto;
  color: var(--ink);
  touch-action: manipulation;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.app {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.home, #viewReveal, #viewAlbum {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.home {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  padding:
    max(8px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    calc(var(--dock-h) + env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}
.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: visible;
}
.pack-slot {
  container-type: size;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: grid;
  place-items: center;
}
.pack-shadow { position: absolute; left: 50%; bottom: 8%; width: 42%; height: 18px; transform: translateX(-50%); background: #000; filter: blur(14px); border-radius: 50%; opacity: .28; animation: shadow 5.2s ease-in-out infinite; pointer-events: none; }
.pack-wrap {
  --pack-max: 400px;
  --pack-min: 160px;
  position: relative;
  z-index: 2;
  container-type: size;
  aspect-ratio: 150 / 104;
  width: auto;
  max-width: 100%;
  height: min(var(--pack-max), max(var(--pack-min), 75cqh), 100cqh, calc(100cqw * 104 / 150 * 0.846));
  animation: float 5.2s ease-in-out infinite;
  --tear: 0%;
  --shine: 0;
  --seal: 11.8%;
}
.pack-wrap[data-orient="port"] {
  aspect-ratio: 104 / 150;
  height: min(var(--pack-max), max(var(--pack-min), 75cqh), 100cqh, calc(100cqw * 1.22));
}
.pack-wrap[data-orient="square"] {
  aspect-ratio: 1;
  height: min(var(--pack-max), max(var(--pack-min), 75cqh), 100cqh, calc(100cqw * 0.846));
}
.hero, .counter { position: relative; z-index: 4; }
.pack-wrap.gripped, .pack-wrap.torn, .stage.opening .pack-shadow { animation-play-state: paused; }
#pack3d { position: absolute; left: -35%; top: -99.75%; width: 170%; height: 299.5%; pointer-events: none; z-index: 2; }
.pack-wrap[data-orient="port"] #pack3d { top: -22%; height: 144%; }
.pack-wrap[data-orient="square"] #pack3d { top: -53.85%; height: 207.7%; }
#ribbons { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#fx, #flash { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#spectacle { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 34; }
#fx { z-index: 40; }
#flash { z-index: 39; opacity: 0; background: radial-gradient(circle at 50% 42%, #fff 0%, var(--glow2, #fff) 16%, var(--glow, #d5e4ff) 38%, transparent 72%); }
#flash.go { animation: flash-burst .85s ease-out both; }
@keyframes flash-burst { 0% { opacity: 0; } 12% { opacity: .9; } 100% { opacity: 0; } }
.stage.opening #pack3d { animation: pack-out .5s cubic-bezier(.5,0,.9,.4) both; }
.pouch { display: block; width: 100%; height: 100%; position: relative; touch-action: none; user-select: none; cursor: grab; background: transparent; border: 0; padding: 0; }
.pouch.dragging { cursor: grabbing; }
.mouth { position: absolute; inset: 0; pointer-events: none; opacity: var(--shine); }
.mouth:after { content: ""; position: absolute; left: -8%; top: var(--seal); width: calc(var(--tear) + 18%); height: 24%; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(closest-side, #fff 0%, #f4fbff 28%, #b9d4ff 58%, transparent 100%); filter: blur(12px); mix-blend-mode: screen; opacity: .95; }
.hint { position: absolute; z-index: 6; left: 5%; top: var(--seal); width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px #f6e6bdcc, 0 0 22px 8px #dcbd8466; pointer-events: none; animation: hint 2.4s cubic-bezier(.5,0,.3,1) infinite; }
.hint:before { content: ""; position: absolute; right: 50%; top: 50%; height: 2px; width: 18cqw; margin-top: -1px; background: linear-gradient(90deg, transparent, #f6e6bd); border-radius: 2px; transform-origin: 100% 50%; animation: hint-tail 2.4s cubic-bezier(.5,0,.3,1) infinite; }
.has-interacted .hint { display: none; }
.counter { margin: 4px 0 0; letter-spacing: .18em; color: var(--dim); font-size: 12px; text-align: center; }
.screen-switch { display: flex; gap: 4px; width: 100%; padding: 4px; background: rgba(255,252,247,.92); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 30px rgba(28,25,23,.08); }
.screen-switch button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; border-radius: 999px; padding: 8px 6px; min-height: 36px; letter-spacing: .12em; white-space: nowrap; }
.screen-switch button.on { background: #221b25; color: #fff; }
body[data-screen="album"],
body[data-screen="reveal"] { --dock-h: 64px; }
body[data-screen="album"] .open-count,
body[data-screen="album"] .pack-switch,
body[data-screen="reveal"] .open-count,
body[data-screen="reveal"] .pack-switch { display: none; }
.dock {
  position: fixed;
  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  z-index: 5;
  width: min(560px, calc(100% - 16px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  max-height: var(--dock-h);
}
.dock[hidden] { display: none; }
.open-count, .pack-switch { max-width: 100%; flex-wrap: nowrap; justify-content: center; }
.open-count { display: flex; align-items: center; gap: 4px; width: 100%; padding: 4px 6px 4px 12px; background: rgba(255,252,247,.92); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 30px rgba(28,25,23,.08); color: var(--dim); font-size: clamp(11px, 2.8vw, 13px); letter-spacing: .08em; }
.open-count span { flex: none; }
.open-count button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; border-radius: 999px; padding: 8px 4px; min-height: 36px; letter-spacing: .04em; white-space: nowrap; }
.open-count button.on { background: #221b25; color: #fff; }
.pack-switch { display: flex; gap: 4px; width: 100%; padding: 4px; background: rgba(255,252,247,.92); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 30px rgba(28,25,23,.08); }
.pack-switch button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; border-radius: 999px; padding: 8px 6px; min-height: 36px; white-space: nowrap; font-size: clamp(12px, 3.2vw, 16px); }
.pack-switch button.on { background: #221b25; color: #fff; }
@keyframes float { 0%,100% { transform: translateY(6px); } 50% { transform: translateY(-8px); } }
@keyframes shadow { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(.84); opacity: .16; } }
@keyframes pack-out { 0% { opacity: 1; } 35% { transform: translateY(-8px) scale(1.04); } 100% { transform: translateY(110px) scale(.82); opacity: 0; } }
@keyframes hint { 0% { left: 5%; opacity: 0; } 12% { left: 5%; opacity: 1; } 70% { left: 94%; opacity: 1; } 84%,100% { left: 94%; opacity: 0; } }
@keyframes hint-tail { 0%,12% { transform: scaleX(0); } 40% { transform: scaleX(1); } 70% { transform: scaleX(.5); } 84%,100% { transform: scaleX(0); } }
.hero { text-align: center; min-width: 0; max-width: 100%; }
.hero h1 {
  margin: 0;
  font-size: clamp(26px, min(8vw, 8svh), 64px);
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.05;
  background: linear-gradient(100deg, #8d6424, #e8c98a 45%, #8a5a1c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { margin: 2px 0 0; color: var(--dim); font-size: clamp(12px, 2.6vw, 16px); }
.level-row {
  margin: clamp(4px, 1.2svh, 16px) auto 0;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: min(420px, 100%);
}
.level-row b { font-size: 14px; min-width: 42px; flex: none; }
.level-bar {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 280px;
  height: 14px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
}
.level-bar i {
  display: block;
  border-radius: 3px;
  background: rgba(28, 25, 23, 0.1);
}
.level-bar i.on { background: linear-gradient(#f0d48a, #a7772f); }
#oddsBtn, .ghost, .solid, .mini, .chip {
  border: 0;
  border-radius: 999px;
}
#oddsBtn {
  width: 28px;
  height: 28px;
  flex: none;
  background: #221b25;
  color: #fff;
}
.pity {
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.35;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.packs {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
}
.pack {
  display: grid;
  justify-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}
.pack-stage {
  position: relative;
  width: 100%;
  filter: drop-shadow(0 18px 16px rgba(20, 16, 12, 0.28));
}
.pack-stage.land { aspect-ratio: 3 / 2; }
.pack-stage.port { aspect-ratio: 2 / 3; max-width: 220px; }
.pack-stage.square { aspect-ratio: 1; max-width: 230px; }
.pack-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pack-fx { pointer-events: none; }
.pack small { color: var(--dim); }
.pack b { font-size: 16px; letter-spacing: 0.12em; }
.foot {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 13px;
  margin-top: 18px;
}

#viewReveal {
  display: grid;
  place-items: center;
  padding:
    max(10px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    calc(var(--dock-h) + env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}
.card-wrap {
  width: min(480px, 100%);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  justify-items: stretch;
  align-items: stretch;
  gap: 8px;
}
#reveal[data-wide="1"] { width: min(1080px, 100%); }
.batch { grid-row: 2; margin: 0; letter-spacing: .16em; color: var(--gold); font-size: 13px; text-align: center; }
.flip { width: min(440px, 100%); perspective: 900px; }
.flip-inner { position: relative; transform-style: preserve-3d; animation: turn 0.8s ease; }
.face { backface-visibility: hidden; }
.face.back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotateY(180deg);
  border-radius: 18px;
}
@keyframes turn { from { transform: rotateY(180deg); } to { transform: none; } }
.card {
  grid-row: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  padding: 10px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.08), inset 0 0 0 1px rgba(255,255,255,0.7);
}
.card.SR, .card.SSR, .card.UR { box-shadow: 0 0 0 1px rgba(255,255,255,0.4), 0 18px 50px rgba(80, 40, 120, 0.18); }
.card.UR { background-image: linear-gradient(120deg, rgba(255,61,127,0.08), rgba(47,155,255,0.08), rgba(245,196,0,0.08)); }
.photo-slot {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
  container-type: size;
}
.photo {
  position: relative;
  flex: none;
  width: min(100cqw, calc(100cqh * var(--w) / var(--h)));
  max-height: 100cqh;
  height: auto;
  aspect-ratio: var(--w) / var(--h);
  margin: 0;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
}
.turn-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 12px;
  background: rgba(34, 27, 37, 0.82);
  color: #fff;
  letter-spacing: 0.12em;
}
.card.card-live { animation: none; }
.photo.photo-3d { overflow: hidden; background: transparent; }
.card-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.photo.photo-3d {
  z-index: 1;
  pointer-events: none;
  background: transparent;
  width: min(86cqw, calc(86cqh * var(--w) / var(--h)));
  max-height: 86cqh;
}
.turn-btn { pointer-events: auto; }
.card-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #111; }
.badge.hidden { background: #24182e; color: #f6e4ff; }
.play-mark {
  position: absolute;
  left: 8px;
  bottom: 8px;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(28, 25, 23, 0.78);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.photo img, .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #e7e2d6;
}
.meta { flex: none; padding: 8px 4px 0; min-width: 0; }
.who { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.who strong {
  flex: 1;
  min-width: 0;
  font-size: clamp(15px, 2.2svh, 20px);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.score { margin-left: auto; flex: none; font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 750; }
.sub, .dup { color: var(--dim); font-size: 13px; margin: 4px 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.stats b { display: block; font-size: clamp(14px, 2.2svh, 18px); }
.stats span { color: var(--dim); font-size: 12px; }
.radar {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
  font-size: clamp(10px, 2.4vw, 12px);
  color: var(--dim);
}
.radar b { display: block; color: var(--ink); font-size: clamp(13px, 2svh, 16px); }
.badge {
  flex: none;
  border-radius: 999px;
  padding: 2px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}
.badge.N { background: var(--n); }
.badge.R { background: var(--r); }
.badge.SR { background: var(--sr); }
.badge.SSR { background: var(--ssr); color: #1c1404; }
.badge.UR {
  background: linear-gradient(110deg, #ff3d7f, #ff9f0a, #18c98f, #2f9bff, #a855f7);
  background-size: 200% 100%;
  animation: holo 2.6s linear infinite;
}
.actions, .filters, .pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
#viewReveal .actions, #detail .actions {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 8px;
  flex: none;
}
#viewReveal .actions { grid-row: 3; }
#viewReveal .actions .solid,
#viewReveal .actions .back-link,
#detail .actions form { grid-column: 1 / -1; }
.solid, .ghost, .mini, .chip { padding: 10px 12px; }
#viewReveal .actions button, #detail .actions button, #detail .actions form { min-width: 0; }
#detail .actions form { margin: 0; }
#detail .actions button, #viewReveal .actions button { width: 100%; min-height: 40px; white-space: nowrap; }
.solid { background: #221b25; color: #fff; }
.ghost, .mini, .chip { background: transparent; border: 1px solid var(--line) !important; color: var(--ink); }
.mini.on, .chip.on { background: #221b25; color: #fff; }
.back-link { background: none; border: 0; color: var(--dim); }

#viewAlbum {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding:
    max(10px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    calc(var(--dock-h) + env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}
.album-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-width: 0; }
.album-head h2 { margin: 0; font-size: clamp(18px, 4vw, 28px); }
.album-head p { margin: 2px 0 0; color: var(--dim); font-size: 12px; }
.filters { justify-content: flex-start; margin: 0; flex-wrap: wrap; min-width: 0; }
.filters label { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; }
.filters select { font-size: 16px; max-width: 42vw; background: transparent; color: inherit; }
.grid {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  align-content: start;
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  grid-auto-rows: var(--row, 160px);
  gap: 8px;
}
.cell {
  height: 100%;
  min-height: 0;
  min-width: 0;
  background: var(--card);
  border-radius: 14px;
  padding: 8px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-content: stretch;
  overflow: hidden;
}
.thumb {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 10px;
  background: #e7e2d6;
  overflow: hidden;
  border: 0;
  padding: 0;
  aspect-ratio: auto;
  max-height: none;
}
.times {
  position: absolute;
  right: 6px;
  top: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(28, 25, 23, 0.72);
  color: #fff;
  font-size: 11px;
}
.cell .name {
  font-size: 13px;
  line-height: 1.3;
  min-height: 0;
  max-height: 2.6em;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cell .row { display: flex; justify-content: space-between; gap: 6px; align-items: center; min-width: 0; }
.cell .row .mini { flex: none; padding: 4px 8px; min-height: 28px; white-space: nowrap; }
.empty-album { grid-column: 1 / -1; text-align: center; color: var(--dim); padding: 24px 12px; }
.pager { flex-wrap: nowrap; min-height: 36px; }
.pager:empty { display: none; }
dialog {
  border: 0;
  border-radius: 18px;
  padding: 14px;
  color: inherit;
  background: #f7f4ee;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  overflow: hidden;
}
dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: fixed;
  inset: auto;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, calc(100vw - 16px));
  max-height: calc(100svh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
  margin: 0;
}
#detail[data-wide="1"] { width: min(1080px, calc(100vw - 16px)); }
#detail[open] {
  height: calc(100svh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
  padding:
    12px
    max(12px, env(safe-area-inset-right))
    12px
    max(12px, env(safe-area-inset-left));
}
#detail .card { width: 100%; box-shadow: none; padding: 0; background: transparent; }
#odds[open] { height: auto; }
#odds h3, #odds p { margin: 0; }
.odds-list { display: grid; gap: 8px; margin: 4px 0; }
.odds-list div { display: flex; justify-content: space-between; gap: 12px; }
.detail-photo {
  max-height: 50vh;
  background: #e7e2d6;
  border-radius: 12px;
  overflow: hidden;
}
.warn { color: #9a3b32; font-size: 13px; }
@keyframes rise {
  from { transform: translateY(18px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes holo { to { background-position: 200% 0; } }
@media (min-width: 760px) and (min-height: 760px) {
  #viewReveal .actions, #detail .actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #viewReveal .actions .solid,
  #viewReveal .actions .back-link,
  #detail .actions form { grid-column: auto; }
}
@media (max-height: 640px) {
  .radar { display: none; }
  .meta { padding-top: 4px; }
  .sub, .dup { margin: 2px 0; }
}
@media (max-height: 520px) {
  :root { --dock-h: 100px; }
  .home {
    padding-top: max(4px, env(safe-area-inset-top));
    padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
  }
  .hero p, .pity, .stats, .sub, .dup { display: none; }
  .level-row { margin-top: 2px; }
  .dock { flex-direction: row; flex-wrap: wrap; width: min(920px, calc(100% - 12px - env(safe-area-inset-left) - env(safe-area-inset-right))); gap: 6px; }
  .open-count, .pack-switch { width: auto; flex: 1; }
  .screen-switch { flex: 1 0 100%; }
  .open-count button, .pack-switch button, .screen-switch button { min-height: 32px; padding: 4px; }
  #viewReveal .actions, #detail .actions { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  #viewReveal .actions .solid,
  #viewReveal .actions .back-link,
  #detail .actions form { grid-column: auto; }
  #viewReveal .actions button, #detail .actions button { min-height: 34px; padding: 4px 6px; font-size: 12px; }
  #odds .warn, #odds .sub { display: none; }
}
@media (max-width: 380px) {
  .open-count { letter-spacing: 0; padding-left: 8px; }
  .cell .name { font-size: 12px; }
}
