/* Corner Pocket — UI */
:root {
  --bg: #0b0a08;
  --ink: #17140f;
  --cream: #efe6d2;
  --paper: #ece2cb;
  --muted: #9b917e;
  --brass: #c9a45a;
  --brass2: #ead197;
  --line: rgba(239, 230, 210, 0.13);
  --line2: rgba(239, 230, 210, 0.24);
  --panel: rgba(18, 16, 12, 0.86);
  --red: #d4553f;
  --hud-h: 64px;
  --side-w: 76px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ui: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--ui); color: var(--cream); -webkit-user-select: none; user-select: none; touch-action: none; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
.hidden { display: none !important; }

#app { position: fixed; left: 0; top: 0; overflow: hidden; transform-origin: 0 0; background: var(--bg); }
#game { position: absolute; left: 0; top: 0; display: block; touch-action: none; }

/* ---------- brand ---------- */
.brand { text-align: center; line-height: 1; }
.brand .kicker { font-family: var(--ui); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--brass); display: flex; align-items: center; justify-content: center; gap: 0.9rem; padding-left: 0.42em; }
.brand .kicker span { display: block; width: 2.6rem; height: 1px; background: linear-gradient(90deg, transparent, var(--brass)); }
.brand .kicker span:last-child { background: linear-gradient(270deg, transparent, var(--brass)); }
.brand h1 { margin: 0.45rem 0 0; font-family: var(--display); font-weight: 600; font-size: 3.3rem; letter-spacing: -0.01em; color: var(--cream); font-variation-settings: "opsz" 144; text-shadow: 0 2px 0 rgba(0,0,0,0.5); }
.brand h1 em { font-style: italic; font-weight: 900; color: var(--brass2); letter-spacing: -0.02em; }
.brand.big h1 { font-size: 4.4rem; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 20; }
.screen.show { display: flex; animation: fadeIn 0.35s ease both; }
.screen.leaving { animation: fadeOut 0.3s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

#menu, #ladder, #online { background: radial-gradient(ellipse at 50% 45%, rgba(8,7,5,0.35), rgba(8,7,5,0.86) 70%), rgba(8,7,5,0.35); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal { background: rgba(6, 5, 4, 0.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 40; }

/* ---------- loader ---------- */
#loader { background: radial-gradient(ellipse at 50% 42%, #1f1a13 0%, #0b0a08 62%); z-index: 60; }
#loader.done { animation: fadeOut 0.6s ease forwards; pointer-events: none; }
.ld-inner { display: flex; flex-direction: column; align-items: center; gap: 1.3rem; animation: rise 0.6s ease both; }
#ld-ball { width: 6.5rem; height: 6.5rem; filter: drop-shadow(0 1.1rem 1rem rgba(0,0,0,0.6)); }
.ld-bar { width: 15rem; height: 2px; background: rgba(239,230,210,0.1); position: relative; overflow: hidden; border-radius: 2px; }
.ld-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #8a6a2a, var(--brass2)); transition: width 0.25s ease; }
.ld-step { font-size: 0.95rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); min-height: 1.2em; }

/* ---------- menu ---------- */
.menu-wrap { display: flex; flex-direction: column; align-items: center; gap: 1.9rem; animation: rise 0.5s ease both; width: min(30rem, 92%); }
.menu-list { display: flex; flex-direction: column; gap: 0.7rem; width: 100%; }
.mrow { display: flex; gap: 0.7rem; }
.mbtn { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.15rem; width: 100%; padding: 0.85rem 1.2rem; border-radius: 0.6rem; border: 1px solid var(--line2); background: var(--panel); text-align: left; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.mbtn::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 0.5rem; height: 0.5rem; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-50%) rotate(45deg); opacity: 0.45; }
.mbtn.small::after, .mbtn.half::after, .pause-list .mbtn::after, .res-actions .mbtn::after { display: none; }
.mbtn:hover { border-color: var(--brass); transform: translateY(-1px); }
.mbtn:active { transform: translateY(1px); }
.mbtn .mb-t { font-weight: 700; font-size: 1.45rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.05; }
.mbtn .mb-s { font-size: 0.98rem; color: var(--muted); letter-spacing: 0.04em; }
.mbtn.primary { background: linear-gradient(180deg, #f3ead6, #e2d5b8); color: #1b1712; border-color: #f6eedd; box-shadow: 0 0.6rem 1.6rem rgba(0,0,0,0.35), inset 0 -2px 0 rgba(0,0,0,0.12); }
.mbtn.primary .mb-s { color: #5f5646; }
.mbtn.half { flex: 1; }
.mbtn.small { width: auto; padding: 0.6rem 1.1rem; align-items: center; }
.mbtn.small .mb-t { font-size: 1.1rem; }
.mbtn.danger { border-color: rgba(212,85,63,0.45); color: #f0b3a6; }
.mbtn:disabled { opacity: 0.45; pointer-events: none; }
.menu-foot { display: flex; align-items: center; gap: 1rem; }
.ghost { font-size: 1rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); padding: 0.4rem 0.2rem; transition: color 0.15s; }
.ghost:hover { color: var(--cream); }
.menu-foot .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--brass); opacity: 0.6; }

/* ---------- sheets ---------- */
.sheet { width: min(64rem, 94%); max-height: 94%; display: flex; flex-direction: column; animation: rise 0.4s ease both; }
.sheet.narrow { width: min(27rem, 92%); background: #15120e; border: 1px solid var(--line2); border-radius: 0.9rem; padding: 1.2rem 1.4rem 1.4rem; box-shadow: 0 2rem 4rem rgba(0,0,0,0.6); }
#online .sheet.narrow, #ladder .sheet { background: none; border: 0; box-shadow: none; padding: 0; }
.sheet.tall { max-height: 92%; }
.sheet-h { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.1rem; }
.sheet-h h2 { margin: 0; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2rem; letter-spacing: -0.01em; flex: 1; }
.sheet-note { font-size: 0.95rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.back { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; flex: none; transition: border-color 0.15s; }
.back:hover { border-color: var(--brass); }
.back svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- ladder cards ---------- */
.cards { display: flex; gap: 0.9rem; overflow-x: auto; padding: 0.4rem 0.2rem 1rem; scroll-snap-type: x mandatory; }
.card { flex: 1 0 10.8rem; scroll-snap-align: start; position: relative; background: linear-gradient(170deg, #f1e8d3, #e1d3b4); color: #1d1913; border-radius: 0.8rem; padding: 1rem 1rem 0.9rem; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 1rem 2rem rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.5); animation: rise 0.45s ease both; }
.card::before { content: ""; position: absolute; inset: 0.4rem; border: 1px solid rgba(80,60,30,0.25); border-radius: 0.55rem; pointer-events: none; }
.card .no { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.3em; color: #7c6a4b; text-transform: uppercase; }
.card .mono { width: 4.4rem; height: 4.4rem; border-radius: 50%; margin: 0.7rem 0 0.6rem; display: grid; place-items: center; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 2rem; color: #f4ecda; box-shadow: inset 0 -0.5rem 1rem rgba(0,0,0,0.3), inset 0 0.3rem 0.6rem rgba(255,255,255,0.18), 0 0.3rem 0.6rem rgba(0,0,0,0.25); }
.card .nm { font-family: var(--display); font-weight: 800; font-size: 1.45rem; line-height: 1.1; }
.card .tt { font-size: 0.95rem; letter-spacing: 0.18em; text-transform: uppercase; color: #6d604a; margin-top: 0.15rem; }
.card .pips { display: flex; gap: 0.3rem; margin: 0.75rem 0 0.9rem; }
.card .pips i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: rgba(60,45,25,0.2); }
.card .pips i.on { background: #8c3a2c; }
.card .play { width: 100%; padding: 0.55rem; border-radius: 0.45rem; background: #1d1913; color: #f1e8d3; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.18em; text-transform: uppercase; }
.card .play:hover { background: #2e271d; }
.card.locked { filter: grayscale(0.7); opacity: 0.55; }
.card.locked .play { background: transparent; color: #6d604a; border: 1px dashed rgba(60,45,25,0.4); pointer-events: none; }
.card .beat { position: absolute; top: 0.8rem; right: 0.8rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; color: #2f6b3e; border: 1.5px solid #2f6b3e; border-radius: 0.3rem; padding: 0.05rem 0.35rem; transform: rotate(8deg); }

/* ---------- online ---------- */
.online-body { display: flex; flex-direction: column; gap: 0.75rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field span { font-size: 0.9rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
input#name-input, input#name-input2, #code-input { background: rgba(0,0,0,0.35); border: 1px solid var(--line2); color: var(--cream); border-radius: 0.5rem; padding: 0.65rem 0.85rem; font-size: 1.25rem; letter-spacing: 0.06em; outline: none; -webkit-user-select: text; user-select: text; }
input:focus { border-color: var(--brass); }
.join-row { display: flex; gap: 0.6rem; }
#code-input { flex: 1; text-transform: uppercase; letter-spacing: 0.4em; text-align: center; font-weight: 700; }
#online-wait { align-items: center; text-align: center; padding: 1rem 0; gap: 1rem; }
.spin8 { width: 4.2rem; height: 4.2rem; }
.wait-text { font-size: 1.2rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream); }
.room-box { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.room-code { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 3.2rem; letter-spacing: 0.12em; color: var(--brass2); }
.online-err { min-height: 1.3em; margin-top: 0.8rem; color: #f0a594; font-size: 1.05rem; letter-spacing: 0.04em; text-align: center; }

/* ---------- settings ---------- */
.set-list { display: flex; flex-direction: column; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.set-row > span { font-size: 1.15rem; letter-spacing: 0.14em; text-transform: uppercase; }
.set-row input { width: 11rem; padding: 0.45rem 0.7rem !important; font-size: 1.1rem !important; }
.seg { display: flex; border: 1px solid var(--line2); border-radius: 0.45rem; overflow: hidden; }
.seg button { padding: 0.4rem 0.85rem; font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--cream); color: #1b1712; font-weight: 700; }
.swatches { display: flex; gap: 0.5rem; }
.swatches button { width: 1.8rem; height: 1.8rem; border-radius: 50%; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.35); outline: 2px solid transparent; outline-offset: 2px; transition: outline-color 0.15s; }
.swatches button.on { outline-color: var(--brass2); }

/* ---------- rules ---------- */
.rules-body { overflow-y: auto; padding-right: 0.4rem; touch-action: pan-y; }
.rules-body h3 { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.3rem; margin: 0.4rem 0 0.4rem; color: var(--brass2); }
.rules-body p { margin: 0 0 0.75rem; font-size: 1.1rem; line-height: 1.38; color: #d9cfba; letter-spacing: 0.02em; }
.rules-body b { color: var(--cream); }

.pause-list { display: flex; flex-direction: column; gap: 0.55rem; }
.pause-list .mbtn { align-items: center; padding: 0.7rem; }
.pause-list .mbtn .mb-t { font-size: 1.2rem; }

/* ---------- result ---------- */
.result { text-align: center; align-items: center; padding: 1.8rem 1.6rem 1.6rem !important; }
.res-kicker { font-size: 0.95rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--brass); }
.res-title { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 3.6rem; line-height: 1.05; margin: 0.4rem 0 0.3rem; letter-spacing: -0.01em; }
.res-title.lose { color: #cbbfa6; }
.res-reason { font-size: 1.15rem; color: #cfc5b0; letter-spacing: 0.04em; }
.res-stats { display: flex; gap: 1.8rem; justify-content: center; margin: 1.2rem 0 1.3rem; }
.res-stats div { display: flex; flex-direction: column; gap: 0.1rem; }
.res-stats b { font-family: var(--display); font-weight: 800; font-size: 1.7rem; }
.res-stats span { font-size: 0.8rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.res-actions { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.res-actions .mbtn { align-items: center; padding: 0.7rem; }
.res-actions .mbtn .mb-t { font-size: 1.2rem; }

/* ---------- HUD ---------- */
#hud { position: absolute; left: 0; right: 0; top: 0; height: var(--hud-h); display: flex; align-items: center; gap: 0.8rem; padding: 0 0.8rem; z-index: 10; background: linear-gradient(180deg, rgba(5,4,3,0.85), rgba(5,4,3,0)); transition: opacity 0.3s; }
.off { opacity: 0; pointer-events: none !important; }
.off * { pointer-events: none !important; }
.icon-btn { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; flex: none; background: rgba(0,0,0,0.3); transition: border-color 0.15s; }
.icon-btn:hover { border-color: var(--brass); }
.icon-btn svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: var(--cream); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plate { flex: 1; display: flex; align-items: center; gap: 0.7rem; min-width: 0; padding: 0.35rem 0.7rem 0.35rem 0.35rem; border-radius: 2rem; border: 1px solid transparent; transition: border-color 0.3s, background 0.3s, opacity 0.3s; opacity: 0.62; }
.plate.right { flex-direction: row-reverse; padding: 0.35rem 0.35rem 0.35rem 0.7rem; text-align: right; }
.plate.active { opacity: 1; border-color: rgba(201,164,90,0.5); background: linear-gradient(90deg, rgba(201,164,90,0.13), rgba(201,164,90,0.02)); }
.plate.right.active { background: linear-gradient(270deg, rgba(201,164,90,0.13), rgba(201,164,90,0.02)); }
.avatar { position: relative; width: 2.9rem; height: 2.9rem; border-radius: 50%; flex: none; display: grid; place-items: center; background: #2a251d; box-shadow: inset 0 -0.35rem 0.7rem rgba(0,0,0,0.35), inset 0 0.2rem 0.4rem rgba(255,255,255,0.12); }
.avatar span { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 1.3rem; color: #f4ecda; }
.avatar .ring { position: absolute; inset: -0.28rem; width: calc(100% + 0.56rem); height: calc(100% + 0.56rem); transform: rotate(-90deg); }
.avatar .ring circle { fill: none; stroke: var(--brass2); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 125.7; stroke-dashoffset: 125.7; transition: stroke 0.3s; }
.avatar .ring.warn circle { stroke: var(--red); }
.pmeta { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.plate.right .pmeta { align-items: flex-end; }
.pname { font-weight: 700; font-size: 1.2rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pballs { display: flex; gap: 0.2rem; height: 1.4rem; }
.plate.right .pballs { flex-direction: row-reverse; }
.pballs canvas, .pballs i { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: block; flex: none; }
.pballs i { border: 1px dashed rgba(239,230,210,0.22); }
.pballs canvas.gone { opacity: 0.16; filter: grayscale(1); }
.pballs canvas.eight { box-shadow: 0 0 0 1.5px var(--brass2); }
.status { flex: 0 1 15rem; text-align: center; min-width: 0; }
.status-main { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.35rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-sub { font-size: 0.85rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* power */
#power { position: absolute; left: 0; top: var(--hud-h); bottom: 0; width: var(--side-w); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; z-index: 9; transition: opacity 0.25s; }
.pw-label, .pw-val, #rightctl b { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); padding-left: 0.24em; }
.pw-val { color: var(--cream); font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; padding: 0; min-width: 2em; text-align: center; }
.pw-track { position: relative; width: 2.3rem; height: min(62%, 20rem); border-radius: 1.2rem; background: linear-gradient(90deg, #070605, #15120e 50%, #070605); border: 1px solid rgba(201,164,90,0.45); box-shadow: inset 0 0.3rem 0.8rem rgba(0,0,0,0.8), 0 0 0 3px rgba(0,0,0,0.35); overflow: hidden; cursor: ns-resize; touch-action: none; }
.pw-fill { position: absolute; left: 0; right: 0; top: 0; height: 0%; background: linear-gradient(180deg, #4c8a5b 0%, #c9a45a 55%, #d4553f 100%); opacity: 0.85; }
.pw-ticks { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 calc(10% - 1px), rgba(0,0,0,0.35) calc(10% - 1px) 10%); pointer-events: none; }
.pw-cue { position: absolute; left: 50%; width: 0.62rem; margin-left: -0.31rem; top: -2%; height: 100%; border-radius: 0.3rem 0.3rem 0 0; pointer-events: none;
  background: linear-gradient(180deg, #3f74ad 0 2.2%, #f3eee2 2.2% 5%, #ecd6a8 5% 52%, #c9a45a 52% 53.5%, #1a120c 53.5% 75%, #2a2420 75%);
  box-shadow: inset -0.15rem 0 0.25rem rgba(0,0,0,0.5), inset 0.12rem 0 0.2rem rgba(255,255,255,0.35); transition: transform 0.05s linear; }

/* right controls */
#rightctl { position: absolute; right: 0; top: var(--hud-h); bottom: 0; width: var(--side-w); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; z-index: 9; transition: opacity 0.25s; }
#spin-btn { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.spin-ball { position: relative; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fffdf6 0%, #eee8d8 40%, #b9b2a2 85%, #8d8678 100%); box-shadow: 0 0.35rem 0.7rem rgba(0,0,0,0.5); display: block; }
.spin-ball i { position: absolute; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--red); left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px rgba(255,255,255,0.5); }
#fine { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; touch-action: none; cursor: ns-resize; }
.fine-ribs { width: 2.3rem; height: min(28vh, 11rem); border-radius: 1.2rem; border: 1px solid rgba(201,164,90,0.45); background-color: #1a1611; background-image: repeating-linear-gradient(180deg, rgba(255,255,255,0.13) 0 2px, rgba(0,0,0,0.55) 2px 7px); box-shadow: inset 0 0.8rem 0.8rem rgba(0,0,0,0.75), inset 0 -0.8rem 0.8rem rgba(0,0,0,0.75); }

/* quick chat */
#emotes { position: absolute; right: 0.8rem; top: calc(var(--hud-h) + 0.2rem); display: flex; flex-direction: column; gap: 0.35rem; z-index: 12; transition: opacity 0.2s; }
#emotes button { padding: 0.45rem 0.9rem; background: var(--panel); border: 1px solid var(--line2); border-radius: 1rem; font-size: 1rem; letter-spacing: 0.06em; text-align: right; }
#emotes button:hover { border-color: var(--brass); }
.bubble { position: absolute; left: 4.2rem; top: calc(var(--hud-h) - 0.2rem); padding: 0.45rem 0.9rem; border-radius: 0 1rem 1rem 1rem; background: var(--cream); color: #1b1712; font-weight: 600; font-size: 1.05rem; letter-spacing: 0.04em; opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s; pointer-events: none; z-index: 12; }
.bubble.right { left: auto; right: 4.2rem; border-radius: 1rem 0 1rem 1rem; }
.bubble.show { opacity: 1; transform: none; }

/* toast + banner */
#toast { position: absolute; left: 50%; bottom: 1.1rem; transform: translate(-50%, 10px); padding: 0.5rem 1.1rem; border-radius: 2rem; background: rgba(12,10,8,0.9); border: 1px solid var(--line2); font-size: 1.05rem; letter-spacing: 0.08em; white-space: nowrap; opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none; z-index: 15; max-width: 80%; overflow: hidden; text-overflow: ellipsis; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.foul { border-color: rgba(212,85,63,0.6); color: #f6c3b7; }
#banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; z-index: 14; opacity: 0; }
#banner.show { animation: banner 1.7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -40%) scale(0.96); letter-spacing: 0.1em; } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -56%); } }
.b-kicker { font-size: 1rem; font-weight: 700; letter-spacing: 0.45em; text-transform: uppercase; color: var(--brass2); text-shadow: 0 2px 8px rgba(0,0,0,0.8); padding-left: 0.45em; }
.b-main { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 3.6rem; color: #fff8e8; text-shadow: 0 0.3rem 1.6rem rgba(0,0,0,0.85), 0 2px 0 rgba(0,0,0,0.5); white-space: nowrap; }
#banner.foul .b-kicker { color: #f08a72; }

/* spin picker */
.spin-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; animation: rise 0.3s ease both; }
.spin-title { font-size: 1rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--brass); }
.spin-face { position: relative; width: min(15rem, 52vmin); height: min(15rem, 52vmin); border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fffdf6 0%, #efe9da 38%, #c0b8a6 80%, #8a8375 100%); box-shadow: 0 1.4rem 2.6rem rgba(0,0,0,0.6); touch-action: none; cursor: crosshair; }
.spin-limit { position: absolute; inset: 22%; border-radius: 50%; border: 1px dashed rgba(60,50,35,0.35); }
.spin-cross { position: absolute; inset: 0; background: linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(60,50,35,0.25) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)), linear-gradient(180deg, transparent calc(50% - 0.5px), rgba(60,50,35,0.25) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)); border-radius: 50%; }
.spin-tip { position: absolute; width: 1.4rem; height: 1.4rem; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 40% 35%, #e9765f, #b2321f); box-shadow: 0 0 0 3px rgba(255,255,255,0.7), 0 0.2rem 0.5rem rgba(0,0,0,0.4); }
.spin-labels { display: flex; gap: 2rem; font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.spin-actions { display: flex; align-items: center; gap: 1.4rem; }

#rotate-hint { display: none; }

@media (hover: none) { .mbtn:hover { transform: none; } }
