/* ==========================================================================
   THE CASE - card game
   Loads after base.css and style.css. Reuses the UNPAID tokens.
   ========================================================================== */

:root {
  --cs-bone: #f7f4ec;
  --cs-charcoal: #2e2e2e;
  --cs-deep: #141414;
  --cs-terra: #c05a3e;
  --cs-terra-lit: #dd7351;
  --cs-sage: #8a9a7b;
  --cs-sage-deep: #5f7050;
  --cs-gold: #c9a227;
  --cs-gold-lit: #dcb63c;
  --cs-navy: #1f3247;
  --cs-grey: #6b6b6b;
  --cs-tape: rgba(233, 224, 196, 0.5);
  --card-w: 190px;
  --card-h: 272px;
}

.case-body {
  background: var(--cs-deep);
  color: #e9e3d5;
  min-height: 100dvh;
  overflow-x: hidden;
}
.case-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 700px at 10% -8%, rgba(201, 162, 39, 0.18), rgba(201, 162, 39, 0) 60%),
    radial-gradient(1300px 1000px at 50% 46%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.66) 100%);
}
.case-body main { position: relative; z-index: 1; }
.mono { font-family: var(--font-mono); }
.roles, .how, .hand, .modal-cards, .claim-links { list-style: none; margin: 0; padding-left: 0; }
.roles li, .how li, .hand li, .modal-cards li { list-style: none; }

/* ---------------- header ---------------- */
.cs-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0.55rem clamp(0.7rem, 2.5vw, 1.75rem);
  background: rgba(12, 12, 12, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(233, 227, 213, 0.14);
}
.cs-brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: #e9e3d5; }
.cs-brand-word { font-family: var(--font-display); font-weight: 900; font-size: 1.02rem; letter-spacing: 0.02em; }
.cs-brand-sub { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.18em; color: var(--cs-gold); display: none; }
@media (min-width: 620px) { .cs-brand-sub { display: block; } }
.cs-header-right { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; }
.cs-clearance { font-size: 0.625rem; letter-spacing: 0.16em; color: var(--cs-sage); display: none; }
@media (min-width: 820px) { .cs-clearance { display: inline; } }

.cs-chip {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: #e9e3d5;
  background: none;
  border: 1px solid rgba(233, 227, 213, 0.3);
  border-radius: 2px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.cs-chip:hover { background: var(--cs-terra); border-color: var(--cs-terra); color: #fff; }
.cs-chip--go { background: var(--cs-terra); border-color: var(--cs-terra); color: #fff; font-weight: 700; }
.cs-chip--go:hover { background: var(--cs-terra-lit); border-color: var(--cs-terra-lit); }
.cs-chip[disabled] { opacity: 0.38; cursor: not-allowed; }
.cs-chip[disabled]:hover { background: none; color: #e9e3d5; border-color: rgba(233,227,213,0.3); }

/* ---------------- screens ---------------- */
.screen { display: none; }
.screen.is-active { display: block; }

.cs-eyebrow { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase; color: #a49c8a; }
.cs-eyebrow--gold { color: var(--cs-gold); }
.fine { font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.6; color: #9c958a; }

/* ---------------- title ---------------- */
.title-inner { max-width: 1120px; margin-inline: auto; padding: clamp(1.6rem, 5vw, 4rem) clamp(1.1rem, 4vw, 3rem) 4rem; }
.cs-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.2rem, 15vw, 9rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  margin-top: 0.5rem;
  color: var(--cs-bone);
}
.cs-sub { font-family: var(--font-mono); font-size: clamp(0.78rem, 2.4vw, 1rem); letter-spacing: 0.09em; text-transform: uppercase; color: var(--cs-terra); margin-top: 0.9rem; }
.cs-lede { margin-top: 1.4rem; max-width: 44ch; font-size: var(--text-lg); line-height: 1.45; color: #cfc7b6; }

.how { margin-top: 2rem; display: grid; gap: 0.5rem; font-size: 0.75rem; letter-spacing: 0.04em; color: #b3ab9c; max-width: 60ch; }
.how li { display: flex; gap: 0.7rem; }
.how span { color: var(--cs-gold); flex: 0 0 auto; }

#role-label { margin-top: 2.6rem; }
.roles { display: grid; gap: 0.9rem; margin-top: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .roles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .roles { grid-template-columns: repeat(4, 1fr); } }

.role-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--cs-bone);
  color: var(--cs-charcoal);
  border: 0;
  padding: 1.05rem 1rem 1.15rem;
  cursor: pointer;
  position: relative;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
  clip-path: polygon(0 1%, 100% 0, 99.5% 99%, 1% 100%);
  transform: rotate(var(--rot, 0deg));
}
.role-btn:hover, .role-btn:focus-visible { transform: rotate(0deg) translateY(-5px); box-shadow: 0 18px 34px rgba(0, 0, 0, 0.62); }
.role-btn .r-key { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.18em; color: var(--cs-terra); }
.role-btn .r-name { font-family: var(--font-display); font-weight: 900; font-size: 1.45rem; line-height: 1; margin-top: 0.3rem; display: block; }
.role-btn .r-job { font-size: 0.8125rem; line-height: 1.45; margin-top: 0.55rem; color: #4a4a4a; display: block; }
.role-btn .r-abil { font-family: var(--font-mono); font-size: 0.625rem; line-height: 1.5; margin-top: 0.7rem; padding-top: 0.5rem; border-top: 1px dashed rgba(0,0,0,0.25); color: var(--cs-sage-deep); display: block; }
.role-btn .r-tape {
  position: absolute; top: -10px; left: 50%;
  width: 72px; height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: var(--cs-tape);
  border-left: 1px dashed rgba(0,0,0,0.12);
  border-right: 1px dashed rgba(0,0,0,0.12);
}
.title-inner .fine { margin-top: 2.2rem; border-top: 1.5px dashed rgba(233,227,213,0.22); padding-top: 1rem; }

/* ---------------- status bar ---------------- */
.statusbar {
  position: sticky;
  top: 49px;
  z-index: 40;
  display: flex;
  gap: 0.6rem 1.2rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.55rem clamp(0.8rem, 3vw, 2rem);
  background: rgba(18, 18, 18, 0.94);
  border-bottom: 1px solid rgba(201, 162, 39, 0.28);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
}
.st-round { color: var(--cs-gold); }
.st-station { color: var(--cs-bone); }
.st-need { color: var(--cs-terra-lit); }
.st-deck { color: #8d8578; margin-left: auto; }

/* ---------------- table ---------------- */
.table {
  position: relative;
  padding: clamp(0.9rem, 2.4vw, 1.8rem) clamp(0.8rem, 3vw, 2rem) 3rem;
  background-color: #121110;
  background-image: linear-gradient(rgba(14, 13, 12, 0.84), rgba(14, 13, 12, 0.92)), url('./assets/case-table.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed, fixed;
  min-height: calc(100dvh - 92px);
}
.table::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 500px at 12% 0%, rgba(255, 214, 130, 0.13), rgba(0,0,0,0) 60%),
    radial-gradient(1200px 900px at 50% 50%, rgba(0,0,0,0) 42%, rgba(0,0,0,0.62) 100%);
  mix-blend-mode: multiply;
}
.table > * { position: relative; z-index: 1; }

.zone-h { font-size: 0.625rem; letter-spacing: 0.22em; color: #a09786; text-transform: uppercase; }

/* spin zone */
.spin-zone { display: flex; align-items: flex-start; gap: clamp(0.7rem, 2.4vw, 1.6rem); }
.hog-side { flex: 0 0 auto; width: clamp(56px, 9vw, 96px); text-align: center; }
.hog-mark { width: 100%; height: auto; opacity: 0.85; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.7)); }
.hog-label { display: block; font-size: 0.5625rem; letter-spacing: 0.2em; color: var(--cs-terra-lit); margin-top: 0.3rem; }
.spin-slot { flex: 1 1 auto; min-width: 0; min-height: 150px; display: flex; align-items: flex-start; }

.spin-card {
  width: 100%;
  max-width: 560px;
  background: var(--cs-navy);
  color: #eee7d7;
  border: 1px solid rgba(233,227,213,0.22);
  padding: 1rem 1.1rem 1.05rem;
  box-shadow: 0 16px 34px rgba(0,0,0,0.6);
  position: relative;
  transform: rotate(-0.8deg);
  background-image: linear-gradient(rgba(31,50,71,0.93), rgba(19,31,45,0.96)), url('./assets/case-tape.jpg');
  background-size: cover, 320px 320px;
}
.spin-card.is-in { animation: dropIn 420ms var(--ease) 1; }
@keyframes dropIn { from { transform: translateY(-26px) rotate(-4deg); opacity: 0; } to { transform: rotate(-0.8deg); opacity: 1; } }
.spin-top { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.2em; color: var(--cs-terra-lit); }
.spin-quote { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 3vw, 1.5rem); line-height: 1.15; margin-top: 0.65rem; color: #f4eee0; }
.spin-needs {
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em;
  margin-top: 0.8rem; padding-top: 0.6rem;
  border-top: 1.5px dashed rgba(233,227,213,0.3);
  color: var(--cs-gold-lit);
}
.spin-said { font-family: var(--font-mono); font-size: 0.625rem; color: #a9b6c4; margin-top: 0.4rem; line-height: 1.6; }

.readout {
  margin-top: 0.9rem;
  background: rgba(10, 10, 9, 0.6);
  padding: 0.55rem 0.7rem;
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: #ccc4b3;
  min-height: 2.6em;
  max-width: 70ch;
  border-left: 2px solid rgba(201,162,39,0.5);
  padding-left: 0.7rem;
}
.readout.is-good { color: var(--cs-sage); border-left-color: var(--cs-sage); }
.readout.is-bad { color: #e79c80; border-left-color: var(--cs-terra); }

/* chain */
.chain-wrap {
  margin-top: 1.3rem;
  background: rgba(10, 10, 9, 0.55);
  border: 1px solid rgba(233, 227, 213, 0.1);
  border-radius: 2px;
  padding: 0.8rem clamp(0.6rem, 2vw, 1.1rem) 0.4rem;
}
.chain {
  display: flex;
  gap: 1.6rem;
  align-items: flex-start;
  margin-top: 0.5rem;
  padding: 0.5rem 0 1rem;
  overflow-x: auto;
  min-height: 120px;
  scrollbar-width: thin;
}
.chain-empty { font-family: var(--font-mono); font-size: 0.6875rem; color: #7e766a; padding: 1.6rem 0; }
.chain .card { flex: 0 0 auto; }
.chain { gap: 0.7rem; }
.chain-link {
  flex: 0 0 auto;
  align-self: center;
  width: 1.6rem;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--cs-terra) 0 7px, rgba(0,0,0,0) 7px 11px);
}

/* hand */
.hand-wrap { margin-top: 1.4rem; }
.hand-bar { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.hand-tools { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.hand-hint { font-size: 0.625rem; letter-spacing: 0.08em; color: #8d8578; }
.hand {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.7rem;
  padding: 1.6rem 0.2rem 1rem;
  overflow-x: auto;
  align-items: stretch;
  min-height: calc(var(--card-h) + 2.4rem);
  scrollbar-width: thin;
}
.hand li { display: flex; flex: 0 0 auto; }
.hand .card { flex: 1 1 auto; }
.hand .card:hover, .hand .card:focus-visible { transform: translateY(-16px) rotate(0deg) scale(1.03); z-index: 5; }

/* ---------------- the card ---------------- */
.card {
  position: relative;
  width: var(--card-w);
  min-height: var(--card-h);
  background: var(--cs-bone);
  color: var(--cs-charcoal);
  border: 0;
  text-align: left;
  padding: 0.7rem 0.7rem 0.6rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 24px rgba(0,0,0,0.58);
  clip-path: polygon(0 0.6%, 100% 0, 99.5% 99.4%, 0.5% 100%);
  transform: rotate(var(--rot, 0deg));
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), opacity 220ms var(--ease);
  font-family: var(--font-mono);
}
.card:focus-visible { outline: 2px solid var(--cs-gold); outline-offset: 3px; z-index: 6; }
.card .c-top { display: flex; justify-content: space-between; gap: 0.4rem; font-size: 0.5rem; letter-spacing: 0.14em; color: var(--cs-grey); }
.card .c-fig {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7rem;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-top: 0.45rem;
  word-break: break-word;
}
.card .c-fig.is-word { font-size: 1.05rem; line-height: 1.06; letter-spacing: 0; }
.card.tone-their .c-fig { color: var(--cs-terra); }
.card.tone-ours .c-fig { color: var(--cs-sage-deep); }
.card.tone-flat .c-fig { color: var(--cs-navy); }
.card .c-line {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  line-height: 1.35;
  margin-top: 0.4rem;
  color: #3a3a3a;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .c-flag {
  display: inline-block; align-self: flex-start;
  font-size: 0.5rem; letter-spacing: 0.12em;
  margin-top: 0.4rem; padding: 0.1rem 0.28rem;
  border: 1px solid var(--cs-terra); color: var(--cs-terra);
}
.card .c-perf { border: 0; border-top: 1.5px dashed rgba(0,0,0,0.32); margin: 0.55rem 0 0.4rem; }
.card .c-src { font-size: 0.5rem; line-height: 1.5; color: var(--cs-grey); margin-top: auto; word-break: break-word; }
.card .c-src a { color: var(--cs-navy); }
.card .c-url { color: #8b8478; }
.card .c-bar { width: 100%; height: 16px; margin-top: 0.4rem; color: #3b3b3b; }
.card .c-tape {
  position: absolute; top: -9px; left: 50%;
  width: 56px; height: 18px;
  transform: translateX(-50%) rotate(-3deg);
  background: var(--cs-tape);
  pointer-events: none;
}
.card.is-locked { cursor: default; box-shadow: 0 6px 16px rgba(0,0,0,0.5); padding-bottom: 1.35rem; }
.card.is-locked::after {
  content: 'FILED';
  position: absolute; right: 8px; bottom: 5px;
  font-size: 0.5rem; letter-spacing: 0.14em; color: var(--cs-sage-deep);
}
.card.is-dealt { animation: dealIn 380ms var(--ease) backwards; }
@keyframes dealIn {
  from { transform: translate(-46vw, 40px) rotate(-16deg) scale(0.88); opacity: 0; }
  to { transform: rotate(var(--rot, 0deg)); opacity: 1; }
}
.card.is-bounce { animation: bounce 420ms ease-in-out 1; }
@keyframes bounce {
  0% { transform: translateY(-16px) rotate(var(--rot, 0deg)); }
  25% { transform: translate(-9px, -22px) rotate(-4deg); }
  55% { transform: translate(9px, -22px) rotate(4deg); }
  100% { transform: rotate(var(--rot, 0deg)); }
}
.card.is-snap { animation: snap 320ms var(--ease) 1; }
@keyframes snap {
  from { transform: translateY(-30px) scale(1.08) rotate(0deg); }
  to { transform: rotate(var(--rot, 0deg)); }
}
.card.is-picked { opacity: 0.45; }

/* the face-down back that flips away as the card is dealt */
.hand { perspective: 1400px; }
.c-back {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-color: var(--cs-navy);
  background-image: linear-gradient(rgba(21,34,49,0.88), rgba(15,25,36,0.92)), url('./assets/case-tape.jpg');
  background-size: cover, 220px 220px;
  display: grid;
  place-items: center;
  transform-origin: left center;
  animation: flipOff 420ms var(--ease) forwards;
}
.c-back img { width: 50%; height: auto; opacity: 0.9; }
@keyframes flipOff {
  0% { transform: rotateY(0deg); opacity: 1; }
  55% { transform: rotateY(-40deg); opacity: 1; }
  100% { transform: rotateY(-92deg); opacity: 0; }
}

/* card back */
.card-back {
  width: var(--card-w);
  min-height: var(--card-h);
  background-color: var(--cs-navy);
  background-image: linear-gradient(rgba(21,34,49,0.86), rgba(15,25,36,0.9)), url('./assets/case-tape.jpg');
  background-size: cover, 300px 300px;
  border: 1px solid rgba(233,227,213,0.18);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px rgba(0,0,0,0.55);
}
.card-back img { width: 52%; height: auto; opacity: 0.9; }

/* deck and discard counters live in the status bar, the piles sit beside the hand */
.piles { display: flex; gap: 1rem; align-items: flex-end; }

/* ---------------- modal ---------------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(8, 8, 8, 0.88);
  display: grid; place-items: center;
  padding: 1rem;
  overflow-y: auto;
}
.modal-panel {
  width: min(760px, 100%);
  background: #1b1917;
  border: 1px solid rgba(233,227,213,0.2);
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: 0 30px 70px rgba(0,0,0,0.72);
  margin-block: auto;
}
.modal-h { font-size: 0.75rem; letter-spacing: 0.2em; color: var(--cs-gold); text-transform: uppercase; }
.modal-p { font-size: 0.75rem; line-height: 1.6; color: #c3bbaa; margin-top: 0.5rem; max-width: 58ch; }
.modal-cards { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.1rem; }
.modal .btn-row { margin-top: 1.2rem; }

/* ---------------- ending ---------------- */
.screen--end { min-height: 100dvh; display: none; place-items: center; padding: clamp(1rem, 4vw, 3rem) 1rem 5rem; position: relative; }
.screen--end.is-active { display: grid; }
.skip-end {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  background: rgba(12, 12, 12, 0.94);
  border-color: rgba(233, 227, 213, 0.5);
}
.end-inner { width: min(460px, 100%); }

.cs-receipt {
  background: var(--cs-bone);
  color: var(--cs-charcoal);
  padding: 1.5rem 1.3rem 1.2rem;
  font-family: var(--font-mono);
  box-shadow: 0 24px 60px rgba(0,0,0,0.65);
  position: relative;
}
.cs-receipt::before, .cs-receipt::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 8px;
  background-image: radial-gradient(circle at 5px 0, rgba(0,0,0,0) 5px, var(--cs-bone) 5px);
  background-size: 10px 8px;
}
.cs-receipt::before { top: -7px; transform: scaleY(-1); }
.cs-receipt::after { bottom: -7px; }
.rc-org { font-size: 0.5625rem; letter-spacing: 0.14em; display: flex; justify-content: space-between; gap: 0.6rem; white-space: nowrap; }
.rc-title { font-family: var(--font-display); font-weight: 900; font-size: 1.55rem; margin-top: 0.6rem; line-height: 1; }
.rc-sub { font-size: 0.625rem; letter-spacing: 0.12em; color: var(--cs-grey); margin-top: 0.25rem; }
.rc-dash { border: 0; border-top: 1.5px dashed rgba(0,0,0,0.4); margin: 0.75rem 0; }
.rc-dbl { border: 0; border-top: 3px double rgba(0,0,0,0.8); margin: 0.75rem 0; }
.rc-line { display: flex; align-items: baseline; gap: 0.35rem; font-size: 0.75rem; padding: 0.14rem 0; }
.rc-line .lead { flex: 1 1 auto; border-bottom: 1px dotted rgba(0,0,0,0.35); transform: translateY(-3px); }
.rc-line .v { flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-line--wrap { display: block; }
.rc-line--wrap .v { display: block; font-size: 0.6875rem; word-break: break-word; margin-top: 0.15rem; }
.rc-total { display: flex; justify-content: space-between; gap: 0.7rem; align-items: baseline; padding: 0.2rem 0; }
.rc-total .k { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; }
.rc-total .v { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.rc-total--big .v { font-size: 1.85rem; }
.terra { color: var(--cs-terra); }
.sage-d { color: var(--cs-sage-deep); }
.rc-fine { font-size: 0.5625rem; line-height: 1.6; color: var(--cs-grey); margin-top: 0.6rem; word-break: break-word; }
.rc-fine a { color: var(--cs-navy); }
.rc-barcode { width: 100%; height: 48px; margin-top: 0.7rem; color: var(--cs-charcoal); }

.end-lines { margin-top: 1.8rem; display: grid; gap: 0.85rem; }
.end-line {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.3rem, 4.6vw, 1.95rem);
  line-height: 1.05;
  color: var(--cs-bone);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.end-line.in { opacity: 1; transform: none; }
.end-line:nth-child(2) { color: var(--cs-terra-lit); }
.end-line:nth-child(3) { color: var(--cs-sage); }
.end-actions { margin-top: 1.8rem; }

/* ---------------- claim ---------------- */
.screen--claim { padding: clamp(1.6rem, 6vw, 4rem) 1rem 6rem; }
.claim-inner { max-width: 640px; margin-inline: auto; }
.claim-h { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1; color: var(--cs-bone); margin-top: 0.4rem; }
.case-no {
  font-size: clamp(1.5rem, 7vw, 2.8rem);
  letter-spacing: 0.06em;
  color: var(--cs-gold);
  background: rgba(201,162,39,0.08);
  border: 1.5px dashed rgba(201,162,39,0.5);
  padding: 0.75rem 1rem;
  margin-top: 1.3rem;
  text-align: center;
  font-weight: 700;
}
#case-meta { margin-top: 0.6rem; }
.claim-form { margin-top: 1.6rem; display: grid; gap: 0.45rem; max-width: 420px; }
.claim-form label { font-size: 0.625rem; letter-spacing: 0.18em; color: var(--cs-gold); }
.claim-form input {
  background: #0f0e0d;
  border: 1px solid rgba(233,227,213,0.32);
  color: #efe8d8;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 0.65rem;
  border-radius: 2px;
}
.claim-form .btn { justify-content: center; margin-top: 0.3rem; }
.case-body .btn { background: var(--cs-bone); color: #171512; border-color: var(--cs-bone); }
.case-body .btn:hover { background: var(--cs-terra); border-color: var(--cs-terra); color: #fff; }
.case-body .btn--ghost { background: none; color: #e9e3d5; border-color: rgba(233,227,213,0.4); }
.claim-out { margin-top: 1.4rem; }
.claim-out .btn-row { gap: 0.6rem; }
.claim-art { margin-top: 2.2rem; }
.claim-art img { width: 100%; height: auto; border: 8px solid #efe8d6; box-shadow: 0 18px 40px rgba(0,0,0,0.6); }
.claim-links { margin-top: 1.8rem; display: flex; gap: 1.3rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; }
.claim-links a { color: var(--cs-terra-lit); }

/* ---------------- narrow screens ---------------- */
@media (max-width: 760px) {
  :root { --card-w: 168px; --card-h: 252px; }
  .statusbar { top: 47px; font-size: 0.625rem; letter-spacing: 0.1em; }
  .st-deck { margin-left: 0; }
  .spin-zone { flex-direction: row; }
  .hog-side { width: 46px; }
  .chain {
    flex-direction: column;
    align-items: center;
    overflow-x: visible;
    overflow-y: auto;
    max-height: 56vh;
    gap: 0.7rem;
  }
  .chain-link { width: 2px; height: 1.6rem; align-self: center; background: repeating-linear-gradient(180deg, var(--cs-terra) 0 7px, rgba(0,0,0,0) 7px 11px); }
  .hand { gap: 0.55rem; padding-top: 1.2rem; }
  .hand .card:hover { transform: rotate(var(--rot, 0deg)); }
  .hand-tools { margin-left: 0; width: 100%; }
  .table { padding-bottom: 4rem; }
}

/* ---------------- print slip ---------------- */
.slip { display: none; }
@media print {
  @page { margin: 14mm; }
  body.case-body { background: #fff; color: #111; }
  .cs-header, main, .modal { display: none !important; }
  .slip { display: block; background: #fff; color: #111; max-width: 420px; border: 1.5px dashed #111; padding: 18px; font-family: 'Space Mono', monospace; }
  .slip-head { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: 0.18em; }
  .slip-dash { border: 0; border-top: 1.5px dashed #111; margin: 10px 0; }
  .slip-case { font-size: 26px; font-weight: 700; letter-spacing: 0.06em; text-align: center; }
  .slip-rows { margin-top: 12px; }
  .slip-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; padding: 3px 0; border-bottom: 1px dotted #999; }
  .slip-barcode { width: 100%; height: 44px; color: #111; }
  .slip-foot { font-size: 9px; letter-spacing: 0.14em; text-align: center; margin-top: 6px; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  .card.is-dealt, .card.is-bounce, .card.is-snap, .spin-card.is-in { animation: none; }
  .c-back { display: none; }
  .end-line { opacity: 1; transform: none; transition: none; }
  .card, .role-btn { transition: none; }
}
