/* Hallmark · macrostructure: Workbench · theme: Sport · three-card table */
/* Hallmark · pre-emit critique: P5 H5 E4 S5 R5 V4 */
@import url('./tokens.css');
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { background: var(--color-paper); color: var(--color-ink); font: 14px/1.5 var(--font-body); }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: var(--color-clear); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
button:active:not(:disabled) { transform: translateY(2px); }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--font-display); font-style: normal; overflow-wrap: anywhere; min-width: 0; }
.game { width: min(100%, 592px); padding: 0 24px; margin: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; height: 64px; border-bottom: 1px solid var(--color-rule); }
.brand { font: 800 44px/1 var(--font-display); letter-spacing: -1px; color: inherit; text-decoration: none; }
.brand span { color: var(--color-accent); }
.text-button { border: 0; background: var(--color-clear); font-size: 12px; min-height: 44px; padding: 8px 0; white-space: nowrap; }
.text-button > span { padding-left: 8px; }
.scoreboard { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 12px 0; }
.score-side { display: flex; flex-direction: column; align-items: center; width: 90px; }
.score-side > span { font-size: 9px; font-weight: 600; letter-spacing: 1.5px; }
.score-side strong { font: 600 44px/1.1 var(--font-display); }
.score-middle { display: flex; flex-direction: column; align-items: center; }
.score-divider { color: var(--color-muted); font-size: 22px; line-height: 1.1; }
.score-middle > span:last-child { font-size: 8px; letter-spacing: 1px; margin-top: 8px; color: var(--color-muted); }
.table { position: relative; height: 228px; display: flex; align-items: center; justify-content: center; background: var(--color-forest); color: var(--color-on-forest); border-radius: 8px; overflow: clip; }
.court-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.court-lines path { fill: none; stroke: var(--color-court-line); stroke-width: 1.5; opacity: .14; }
.opponent-hand { position: absolute; top: 12px; display: flex; justify-content: center; gap: 4px; }
.card-back { width: 21px; height: 28px; border: 1px solid var(--color-on-forest-muted); border-radius: 3px; font: 600 16px var(--font-display); display: grid; place-items: center; background: var(--color-court); color: var(--color-on-forest); }
.card-back.revealed { width: 51px; font-size: 12px; background: var(--color-drive-light); color: var(--color-drive); border-color: var(--color-drive-light); }
.table-card { --family: var(--color-ink); --family-light: var(--color-paper); position: relative; width: 162px; min-height: 148px; padding: 12px; margin-top: 16px; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--family-light); color: var(--family); box-shadow: 0 5px 0 var(--color-shadow-heavy); }
.table-card.dink, .shot-card.dink { --family: var(--color-dink); --family-light: var(--color-dink-light); }
.table-card.drive, .shot-card.drive { --family: var(--color-drive); --family-light: var(--color-drive-light); }
.table-card.lob, .shot-card.lob { --family: var(--color-lob); --family-light: var(--color-lob-light); }
#shotOwner { font-size: 8px; font-weight: 600; letter-spacing: 1px; }
.table-card h1 { font-size: 38px; line-height: 1.05; font-weight: 700; white-space: nowrap; }
.table-card.neutral h1 { font-size: 30px; }
.shot-art { width: 80px; height: 50px; margin: 4px 0; }
.shot-art svg, .card-art svg { width: 100%; height: 100%; }
.shot-art path, .card-art path { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#shotCaption { margin-top: 6px; font-size: 9px; text-align: center; }
.table-caption { position: absolute; bottom: 10px; left: 16px; font-size: 8px; letter-spacing: 1px; color: var(--color-on-forest-muted); }
.turn-copy { padding: 16px 0; text-align: center; min-height: 88px; }
.turn-copy h2 { font-size: 25px; line-height: 1.15; font-weight: 600; }
.turn-copy p { font-size: 12px; color: var(--color-muted); margin-top: 5px; }
.hand-label { display: flex; justify-content: space-between; align-items: center; font-size: 9px; letter-spacing: 1px; font-weight: 600; margin-bottom: 10px; }
.hand-label span:last-child { font-size: 10px; letter-spacing: 0; font-weight: 400; color: var(--color-muted); }
.hand { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shot-card { --family: var(--color-ink); --family-light: var(--color-paper-deep); border: 1px solid var(--color-rule); border-radius: 6px; background: var(--color-card); color: var(--family); padding: 12px; text-align: left; min-width: 0; box-shadow: 0 3px 0 var(--color-paper-deep); transition: transform var(--dur-fast) var(--ease-out); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.shot-card h2 { font-size: 30px; line-height: 1; font-weight: 700; }
.card-number { font-size: 9px; color: var(--color-muted); }
.card-art { height: 55px; margin: 10px 0; background: var(--family-light); border-radius: 3px; }
.card-rule { font-size: 10px; white-space: nowrap; }
.card-action { display: block; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--color-rule); font-size: 11px; font-weight: 500; }
.shot-card.blocked { opacity: .46; box-shadow: none; }
.shot-card.blocked .card-action { font-weight: 400; }
.primary-button { min-height: 48px; display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px; border: 0; padding: 12px 18px; margin-top: 20px; border-radius: 4px; background: var(--color-ink); color: var(--color-paper); font-size: 14px; font-weight: 500; white-space: nowrap; }
.primary-button > span { font-size: 21px; line-height: 1; }
.primary-button:disabled { opacity: .5; }
.counter-rule { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 20px 0 16px; font: 600 15px var(--font-display); }
.counter-rule small { font: 400 10px var(--font-body); color: var(--color-muted); }
.dink-text { color: var(--color-dink); } .drive-text { color: var(--color-drive); } .lob-text { color: var(--color-lob); }
footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--color-rule); padding: 4px 0 max(12px, env(safe-area-inset-bottom)); }
footer > span { font-size: 10px; color: var(--color-muted); }
footer .text-button { font-size: 10px; }
[hidden] { display: none !important; }
dialog { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100dvh - 32px); width: min(440px, calc(100% - 32px)); padding: 32px; border: 1px solid var(--color-rule); border-radius: 8px; background: var(--color-paper); color: var(--color-ink); overflow-y: auto; }
dialog::backdrop { background: var(--color-shadow-heavy); }
dialog h2 { font-size: 38px; line-height: 1; }
.close-button { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border: 0; background: var(--color-clear); font-size: 24px; }
dialog ol { padding-left: 20px; margin: 24px 0 20px; }
dialog li { font-size: 13px; padding-left: 4px; margin: 16px 0; }
dialog strong { display: block; font-weight: 600; }
dialog > p { font-size: 11px; color: var(--color-muted); }
@media (hover: hover) { .shot-card:not(:disabled):hover { transform: translateY(-5px); } .text-button:hover { text-decoration: underline; text-underline-offset: 3px; } .primary-button:not(:disabled):hover { background: var(--color-court); } }
@media (max-width: 440px) {
.game { padding: 0 16px; } .topbar { height: 60px; } .brand { font-size: 38px; }
.score-side strong { font-size: 40px; } .table { height: 206px; }
.table-card { width: 146px; min-height: 137px; padding: 8px; } .shot-art { height: 44px; }
.turn-copy h2 { font-size: 23px; } .turn-copy p { font-size: 11px; }
.hand { gap: 8px; } .shot-card { padding: 8px; } .shot-card h2 { font-size: 26px; }
.card-art { height: 46px; margin: 8px 0; } .card-rule { font-size: 9px; }
.card-action { font-size: 10px; margin-top: 8px; padding-top: 6px; } .card-number, .keyboard-hint { display: none; }
.counter-rule { font-size: 14px; gap: 7px; } .counter-rule small { font-size: 9px; }
}
@media (max-width: 350px) { .game { padding: 0 12px; } .hand { gap: 6px; } .shot-card { padding: 7px; } .card-rule { font-size: 8px; } .counter-rule { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; } }
.empty-card { display: grid; place-items: center; min-height: 145px; border: 1px dashed var(--color-rule); border-radius: 6px; color: var(--color-muted); font-size: 11px; }
.card-action { white-space: nowrap; }
