/* The Arena's shared look for /arena, Shootout and Pickup. One idea runs through all three: every panel is a ticket stub.
   A stub on top, a perforated tear line with real notches cut out of the card (the 3D scene shows through them), the body below. */
:root {
  --ink: #17191D; --surface: #22262C; --raise: #2C3239; --line: #3B4149; --text: #E7EAF0; --soft: #CDD3DA; --dove: #A7ADB5; --dim: #88919C;
  --accent: #438BB7; --accent-hi: #5197C1; --accent-ink: #0C1822;
  --display: 'Syne', sans-serif; --body: 'Space Grotesk', system-ui, sans-serif; --mono: 'Space Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 1px 2px rgb(8 10 14 / .4), 0 14px 34px -10px rgb(8 10 14 / .6);
}
[hidden] { display: none !important; }

/* the ticket. --tear is the stub's height; the two notches sit on the tear line, cut with a mask */
.tk { --tear: 118px; --notch: 11px; position: relative; display: grid; grid-template-rows: var(--tear) auto; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: 20px;
  background: rgb(34 38 44 / .97); box-shadow: var(--shadow); color: var(--text); text-align: left;
  -webkit-mask: radial-gradient(circle var(--notch) at 0 var(--tear), #0000 96%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% var(--tear), #0000 96%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 var(--tear), #0000 96%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% var(--tear), #0000 96%, #000) right / 51% 100% no-repeat; }
.tk-stub { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; padding: 16px 22px 14px; border-bottom: 2px dashed var(--line); margin: 0 14px; padding-inline: 8px; }
.tk-body { padding: 14px 22px 10px; }
.tk-kicker { margin: 0 0 6px; font: 700 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dove); }
.tk-title { margin: 0; font: 800 clamp(34px, 9.6vw, 46px)/.95 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  overflow-x: clip; overflow-y: visible; }   /* cut a long title at the side only: the tight line height would clip the letters' feet (Safari) */
.tk-title small { font-size: .45em; letter-spacing: -.01em; color: var(--dove); }
.tk-text { margin: 0 0 4px; color: var(--soft); line-height: 1.6; text-wrap: pretty; }
.tk-fine { margin: 0 0 4px; font: 400 12px/1.6 var(--mono); letter-spacing: .03em; color: var(--dim); text-wrap: pretty; }
.tk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.tk-actions > :only-child { grid-column: 1 / -1; }
.tk-link { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 4px; color: var(--dove); font-size: 15px; font-weight: 600; text-decoration: none; }
.tk-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

/* buttons: one solid accent action, everything else a ghost */
.tk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font: 700 16px/1 var(--body); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgb(255 255 255 / .18) inset, 0 8px 20px -10px rgb(67 139 183 / .7); transition: background-color .2s var(--ease), transform .15s var(--ease); }
.tk-btn:hover { background: var(--accent-hi); }
.tk-btn:active { transform: scale(.97); }
.tk-btn[disabled] { opacity: .6; cursor: progress; }
.tk-btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.tk-btn.ghost:hover { background: var(--raise); }
.tk-btn.sm { min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; }

/* docked: a ticket at the bottom of a phone screen, bottom-left on wide screens */
.dock { position: fixed; z-index: 6; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 440px; margin: 0 auto; animation: tk-in .55s var(--ease) both;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }   /* short phones: it scrolls, never past the top */
@keyframes tk-in { from { opacity: 0; transform: translateY(18px); } }
@media (min-width: 900px) { .dock { left: 28px; right: auto; bottom: 28px; width: 420px; margin: 0; } }
/* phones on their side: the ticket docks left so the game stays in view */
@media (max-height: 500px) { .dock { left: calc(12px + env(safe-area-inset-left)); right: auto; top: 12px; bottom: 12px; width: min(380px, 56vw); margin: 0; overflow-y: auto; }
  .tk { --tear: 92px; } .tk-title { font-size: 34px; } .tk-actions { margin-top: 10px; } .tk-btn { min-height: 46px; } }
@media (prefers-reduced-motion: reduce) { .dock { animation: none; } .tk-btn { transition: none; } }
