/* Cream & Ink · Wall: cream paper, black ink, a red pen; the crew across the top. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700;9..144,900&family=JetBrains+Mono:wght@400;500;700;800&family=Barlow+Condensed:wght@600;700;800&display=swap');
:root { --cond: 'Fraunces', serif; }
:root { --bg: #f3eee4; --panel: #fbf8f1; --raise: #ece5d6; --line: #d8cfbd; --fg: #1c1813; --mut: #6c6355; --acc: #c23b22; --acc-fg: #ffffff; --paper: #fffdf8; --ink: #1c1813; --ink-mut: #6c6355; --printer: #e9e2d3; --slot-a: #3b352c; --slot-b: #25211b; --tint: rgba(194,59,34,.08); --good: #1e7a45; --bad: #c23b22; --warn: #b7791f; }
body { background: var(--bg); }
.card { border: 1px solid var(--line); } .receipt { box-shadow: 0 6px 18px rgba(0,0,0,.08); } .step.now { color: var(--acc-fg); }
.stage-h h1, .brand { text-transform: none; }
.app { grid-template-rows: 56px auto minmax(0, 1fr); }
.wall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.main { grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 480px); }
#bar { height: 100%; }

/* Special cards: the whole list of options, scrolling inside a fixed box. */
.card.special { grid-template-rows: 32px 16px auto auto minmax(0, 1fr) auto 30px; }
.card.special .opts { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; overflow-y: auto; min-height: 0; padding: 2px; }
.card.special .opts img { width: clamp(24px, 17cqi, 36px); height: clamp(24px, 17cqi, 36px); border-radius: 5px; }
.card.special .goal { font-family: var(--cond); font-weight: 800; font-size: clamp(16px, 12cqi, 24px); line-height: 1.15; color: var(--ink); align-self: center; }
.card-acts { display: flex; justify-content: space-between; gap: 6px; }

/* Bet tickets: text stays inside. With four or five, each ticket is two
   rows (the bet, then its history on one line) and the payout rides in the
   header line. */
.tk-text { overflow-wrap: anywhere; }
.tk-no { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-pay-in { display: none; }
.ticket { min-height: 0; }
.tk-bet { overflow: hidden; min-height: 0; }
.tickets.many .ticket { grid-template-columns: clamp(92px, 11cqi, 130px) minmax(0, 1fr) clamp(108px, 13cqi, 150px); grid-template-rows: minmax(0, 1fr) auto; max-height: none; }
.tickets.many .tk-stub { grid-row: 1 / 3; padding: 6px; gap: 3px; min-height: 0; overflow: hidden; }
.tickets.many .tk-stub img { width: clamp(24px, 4.4vh, 44px); height: clamp(24px, 4.4vh, 44px); box-shadow: 0 0 0 2px var(--acc); flex: none; }
.tickets.many .tk-name { font-size: clamp(10px, 1.1vw, 16px); }
.tickets.many .tk-sub { font-size: 9px; }
.tickets.many .tk-bet { grid-column: 2; grid-row: 1; padding: 6px 14px 2px; grid-template-rows: auto minmax(0, 1fr); gap: 2px; align-content: center; }
.tickets.many .tk-pay { display: none; }
.tickets.many .tk-pay-in { display: inline; }
.tickets.many .tk-line { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; min-height: 0; }
.tickets.many .tk-line img { width: 30px; height: 30px; }
.tickets.many .tk-text { font-size: clamp(13px, 1.25vw, 20px); line-height: 1.08; }
.tickets.many .tk-sides { grid-column: 3; grid-row: 1 / 3; padding: 6px; gap: 4px; }
.tickets.many .ticket .form { grid-column: 2; grid-row: 2; padding: 3px 14px 5px; border-left: 0; border-top: 1px dashed rgba(0,0,0,.2); display: block; }
.tickets.many .ticket .form .cells { display: none; }
.tickets.many .ticket .form .lbl { display: flex; flex-direction: row; align-items: baseline; gap: 10px; white-space: nowrap; overflow: hidden; }
.tickets.many .ticket .form .lbl > span:first-child { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.tickets.many .ticket .form .lbl .inline { display: inline; flex: 1; min-width: 0; text-align: left; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.tickets.many .ticket .form .lbl b { flex: none; }

/* In game: the special's options on one row, cut at the card's edge. */
.ig-icons { flex-wrap: wrap; overflow: hidden; height: clamp(24px, 18cqi, 40px); min-width: 0; }
.ig-icons img { flex: none; }

/* Open tab form and messages. */
.find select.input { height: 40px; }
.find-err { color: var(--bad); font-size: 12px; align-self: stretch; }
.loading-screen { height: 100vh; display: grid; place-items: center; font-family: var(--cond); font-size: 28px; color: var(--mut); }

/* Suggest a fix. */
.sheet-bg { position: fixed; inset: 0; background: rgba(28,24,19,.35); display: grid; place-items: center; z-index: 20; }
.sheet { background: var(--paper); color: var(--ink); width: min(720px, 92vw); max-height: 84vh; overflow: auto; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.sheet-h { display: flex; justify-content: space-between; align-items: center; font-family: var(--cond); font-size: 20px; }
.fx-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fx { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 12px; max-width: 220px; }
.fx img { width: 26px; height: 26px; border-radius: 50%; } .fx span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx.off { opacity: .45; text-decoration: line-through; } .fx.new { border-color: var(--good); }
.sheet-acts { display: flex; justify-content: flex-end; }
.ig-pics .ch { border-radius: 50%; }
.card-acts .redo { white-space: nowrap; font-size: 12px; padding: 0 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.find .input { height: 40px; }
.form .lbl .inline i.hit { display: inline; border: 0; border-radius: 0; padding: 0; }
.deal.many .card.special .t { font-size: clamp(15px, 1.45vw, 26px); }
.deal.many .card-acts { gap: 4px; }
.deal.many .card-acts .redo { font-size: 10px; letter-spacing: -.02em; padding: 0 3px; }
