:root { color-scheme:dark; --ink:#f4fbff; --muted:#b6d5d3; --paper:#092338; --yellow:#f7cb62; --red:#dc1730; font-family:'Segoe UI',system-ui,sans-serif; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; color:var(--ink); background:linear-gradient(180deg,#162f45,#132a3e 70%,#12283b); }
button,a { -webkit-tap-highlight-color:transparent; }
button { font:inherit; cursor:pointer; touch-action:manipulation; }
button:disabled { cursor:default; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid #80dcff; outline-offset:4px; }
.site-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 40px; background:#152d42; border-bottom:1px solid #91a9ba24; }
.brand { display:flex; align-items:center; gap:14px; color:#fff; text-decoration:none; font-size:30px; font-weight:800; letter-spacing:-1px; white-space:nowrap; }
.brand em { color:#69ccff; font-style:normal; }
.brand-mark { display:grid; place-items:center; color:#092943; background:#71d5ff; width:46px; height:46px; border-radius:16px; font-size:35px; }
.brand-mark svg { display:block; width:100%; height:100%; }
.header-controls { display:flex; gap:12px; }
.quiet-button { color:#d1e0ea; background:#20394e; border:1px solid #8aa4b533; border-radius:24px; padding:10px 16px; font-size:13px; }
main { max-width:1700px; margin:auto; padding:0 12px; }
.game-table { position:relative; height:calc(100dvh - 114px); min-height:740px; max-height:1020px; overflow:hidden; border-radius:0 0 28px 28px; border:1px solid #50bca177; border-top:0; background:radial-gradient(ellipse at 50% 35%,#248c7760,transparent 66%),url('./assets/felt.svg'),linear-gradient(135deg,#075445,#087363 48%,#033d36); box-shadow:inset 0 0 120px #001c2780,0 15px 45px #0006; }
.game-table { border-radius:48px 48px 38px 38px; border-top:1px solid #75c6a455; box-shadow:inset 0 0 120px #001c2780,inset 0 14px 25px #001f26a0,0 12px 0 #07332e,0 19px 0 #031c20,0 26px 35px #0009; }
.game-table::before { content:''; position:absolute; inset:0; pointer-events:none; z-index:1; border:14px solid #082f2a; border-top-width:10px; border-bottom-width:20px; border-radius:inherit; box-shadow:inset 0 2px 1px #a4ead16b,inset 0 -6px 14px #001c22ba,0 0 0 1px #397b6b; }
.game-table::after { content:''; position:absolute; inset:12px 16px 23px; border:1px solid #7cd2b32b; border-radius:32px; pointer-events:none; }
.game-heading { position:absolute; top:24px; left:50%; transform:translateX(-50%); text-align:center; z-index:2; width:100%; }
.game-heading h1 { display:flex; align-items:center; justify-content:center; gap:24px; font-family:'Arial Rounded MT Bold','Nunito','Trebuchet MS',ui-rounded,sans-serif; font-size:60px; line-height:1.1; margin:0 0 5px; font-weight:900; letter-spacing:-1.5px; text-shadow:0 2px 0 #c7e5df,0 5px 4px #002a3260; }
.title-name { color:#f8fffc; }
.title-fish { width:76px; height:60px; object-fit:contain; filter:drop-shadow(0 3px 2px #002d3940); }
.title-waves { width:58px; height:44px; flex:none; fill:none; stroke:#7fdcff; stroke-width:5; stroke-linecap:round; filter:drop-shadow(0 3px 2px #002a3240); }
@media(max-width:380px) { .game-heading h1 { column-gap:8px!important; } .title-waves { width:32px; height:28px; } }
h2 { font-size:18px; margin:0; }
.board-layout,.play-lane { display:contents; }
.opponent { position:absolute; top:132px; left:50%; transform:translateX(-50%); width:650px; text-align:center; }
.opponent { z-index:72; }
.opponent-heading { position:absolute; right:100%; top:45px; width:115px; display:flex; flex-direction:column; gap:4px; align-items:center; }
.opponent-heading p { margin:0; color:#cce7e6; font-size:12px; }
.avatar { display:grid; place-items:center; width:58px; height:58px; border-radius:50%; color:#95e2ff; border:2px solid #75d4f5; background:#034256; font-size:37px; box-shadow:0 0 18px #45c1ec25; }
.opponent-cards { display:flex; justify-content:center; align-items:center; min-height:144px; gap:16px; }
.mini-back { display:block; width:114px; height:146px; flex:0 1 114px; border:4px solid #f5f1e8; border-radius:9px; background:#153568 url('./assets/card-back.svg') center/100% 100%; box-shadow:0 7px 10px #001d2f80; transform:rotate(-3deg); }
.mini-back:nth-child(even) { transform:rotate(2deg); }
.quick-rules { position:absolute; right:20px; top:170px; width:230px; padding:20px; background:#002c2fe8; border:1px solid #39b59daa; border-radius:24px; box-shadow:0 8px 20px #001a2350; }
.quick-rules { z-index:90; max-height:calc(100% - 200px); overflow-y:auto; }
.quick-rules.in-depth { width:320px; }
.quick-rules.in-depth li { font-size:13px; margin-top:12px; }
.quick-rules h2 { font-size:20px; padding-bottom:15px; border-bottom:1px solid #76d9cf33; }
.quick-rules h2 span { display:inline-grid; place-items:center; width:26px; height:26px; margin-right:6px; background:#80d9ff; color:#043344; border-radius:50%; }
.quick-rules ol { list-style:none; counter-reset:rules; margin:0; padding:0; }
.quick-rules li { counter-increment:rules; display:flex; gap:12px; font-size:15px; line-height:1.6; margin-top:18px; }
.quick-rules li:before { content:counter(rules); display:grid; place-items:center; flex:0 0 30px; height:30px; border:1px solid #4ad2ba; border-radius:50%; background:#08786e; }
.pool-area { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:570px; text-align:center; }
.pool { position:relative; width:100%; height:250px; margin:auto; }
.card-back { border:4px solid #f4f1e7; border-radius:9px; background:#153568 url('./assets/card-back.svg') center/100% 100%; box-shadow:0 7px 9px #001c2a90; }
.pool-card { position:absolute; width:112px; height:160px; left:var(--x); top:var(--y); transform:translate(-50%,-50%) rotate(var(--angle)); z-index:var(--order); padding:0; transition:transform .18s,filter .18s; }
.pool-card > span { display:none; }
.can-draw { filter:drop-shadow(0 0 12px #56dfff60); }
.computer-draw { filter:drop-shadow(0 0 12px #b578ff80); }
.pool-card.computer-selected { outline:4px solid #bd8aff; outline-offset:2px; box-shadow:0 0 16px #a958f0,0 0 34px #a958f0b0; z-index:60; }
.flying-card.computer-selected { outline:4px solid #bd8aff; box-shadow:0 0 16px #a958f0,0 0 34px #a958f0b0; }
.can-draw .pool-card { cursor:pointer; }
.can-draw .pool-card:hover,.can-draw .pool-card:focus-visible { transform:translate(-50%,-62%) rotate(var(--angle)) scale(1.08); outline:4px solid #77e3ff; filter:brightness(1.2); z-index:60; }
.pool-label { position:absolute; top:-9px; right:0; z-index:70; margin:0; padding:4px 9px; border-radius:15px; background:#003832e8; font-size:11px; font-weight:600; }
.pool-hint { display:none; }
.pool-area:has(.can-draw) .pool-hint { display:block; position:absolute; left:calc(100% + 8px); top:40%; margin:0; width:140px; padding:14px 10px; border:2px solid #69caff; border-radius:20px; background:#052c3fea; font-size:15px; line-height:1.4; font-weight:700; }
.stacked-pool .pool-card { margin-top:calc(var(--order) * -.18px); box-shadow:0 1px 1px #0003; }
.empty-pool { border:1px dashed #8ee5c85a; border-radius:50%; }
.hand-area { position:absolute; bottom:62px; left:50%; transform:translateX(-50%); width:min(1000px,calc(100% - 190px)); text-align:center; z-index:65; }
.hand-heading { --seat-width:110px; position:absolute; bottom:35px; left:calc(50% - min(100%,calc(var(--seat-ranks,5)*146px))/2 - var(--seat-width)); width:var(--seat-width); text-align:center; }
.hand-heading h2 { font-size:15px; background:#003638c9; border-radius:20px; padding:8px; }
.hand-heading h2 span { display:block; font-size:11px; color:#b6d9d5; font-weight:400; margin-top:3px; }
.hand-heading p { display:none; }
.player-avatar { width:74px; height:74px; margin:0 auto -6px; background:radial-gradient(circle at 40% 25%,#236779,#003c4c); border-color:#72d5f1; box-shadow:inset 0 0 15px #001f3960,0 5px 12px #002f3960; }
.player-avatar svg { width:56px; height:56px; fill:#9cdcf2; filter:drop-shadow(0 2px 1px #002e43); }
.computer-avatar { width:74px; height:74px; background:radial-gradient(circle at 40% 25%,#236779,#003c4c); box-shadow:inset 0 0 15px #001f3960,0 5px 12px #002f3960; }
.computer-avatar img { width:62px; height:62px; }
.opponent-heading h2 { padding:7px 14px; background:#003638d9; border-radius:22px; white-space:nowrap; }
.opponent.requesting .computer-avatar { background:radial-gradient(circle at 40% 25%,#236779,#003c4c); box-shadow:0 0 20px #b578ff70; }
.hand-heading h2 { position:relative; z-index:1; }
.answer-slot { position:absolute; bottom:calc(100% + 10px); left:50%; transform:translateX(-50%); z-index:75; }
#no-button { min-width:190px; min-height:62px; font-size:28px; padding:13px 26px; border-color:#77dfff; color:#dff7ff; background:linear-gradient(#176da6,#094e80); box-shadow:0 0 16px #56dfff30,0 4px 10px #002b3a60; }
#no-button:hover { background:#187dbb; }
.hand { --card-width:138px; --card-height:202px; --stack-step:28px; display:flex; justify-content:center; align-items:flex-end; flex-wrap:nowrap; gap:0; min-height:202px; padding:0 20px 0 0; }
.rank-group { position:relative; width:min(146px,calc((100% - 24px)/var(--rank-count))); flex:0 1 146px; text-align:center; transform-origin:center 140%; }
.rank-group:nth-child(1) { transform:rotate(-7deg) translateY(9px); }
.rank-group:nth-child(2) { transform:rotate(-4deg) translateY(3px); }
.rank-group:nth-last-child(1) { transform:rotate(7deg) translateY(9px); }
.rank-group:nth-last-child(2) { transform:rotate(4deg) translateY(3px); }
.rank-stack { position:relative; width:var(--card-width); height:calc(var(--card-height) + (var(--stack-count) - 1)*var(--stack-step)); }
.rank-stack .playing-card { position:absolute; left:calc(var(--stack-index)*3px); top:calc(var(--stack-index)*var(--stack-step)); width:var(--card-width); z-index:var(--stack-index); }
.rank-group:focus-within { z-index:20; }
.stack-count { position:absolute; top:-22px; right:10px; border:1px solid #74d4ba55; background:#003c3bd9; border-radius:14px; padding:3px 7px; font-size:10px; color:#d6f0e9; }
.rank-group[data-count="1"] .stack-count { display:none; }
.playing-card { position:relative; height:var(--card-height,202px); color:#0a1220; border:1px solid #e6e0d7; border-radius:11px; background:linear-gradient(125deg,#fffefa,#eee9e0); box-shadow:0 8px 15px #001e2980; padding:0; transition:transform .17s; }
.playing-card:not(:disabled):hover { transform:translateY(-14px); }
.red-card { color:var(--red); }
.card-corner { position:absolute; left:12px; top:10px; font-family:Georgia,serif; font-size:35px; line-height:1; font-weight:700; }
.card-corner small { display:block; font-size:28px; margin-top:3px; }
.card-corner.bottom { left:auto; top:auto; right:12px; bottom:10px; transform:rotate(180deg); }
.card-suit { font-size:78px; }
.playing-card.requested-card { outline:4px solid #bd8aff; outline-offset:2px; box-shadow:0 0 25px #b578ff70; }
.books-row { display:flex; flex-direction:column; gap:8px; padding-top:10px; border-top:1px solid #ffffff20; margin-top:10px; }
.books-label { display:block; color:#aed7ce; margin-bottom:5px; }
.book-list { display:flex; flex-wrap:wrap; gap:5px; }
.book { display:inline-flex; gap:3px; background:var(--yellow); color:#183a3b; padding:3px 6px; border-radius:4px; font-size:12px; font-weight:700; }
.no-books { color:#8bc2b8; font-size:11px; }
.turn-tag,.last-event { display:none; }
.speech-bubble { position:absolute; top:calc(100% + 8px); left:50%; transform:translateX(-50%); z-index:75; width:max-content; max-width:360px; margin:0; padding:12px 20px; background:#201c3d; border:2px solid #bd8aff; border-radius:20px; color:#d5b8ff; font-size:22px; font-weight:700; box-shadow:0 5px 15px #002f3760; }
.speech-bubble:before { content:''; position:absolute; bottom:100%; left:50%; border:8px solid transparent; border-bottom-color:#bd8aff; }
.denial-bubble { border-color:#bd8aff; color:#d5b8ff; }
.denial-bubble:before { border-bottom-color:#bd8aff; }
.denial-bubble strong { display:block; font-size:30px; margin-bottom:5px; }
.denial-bubble span { display:block; font-size:16px; line-height:1.4; }
.computer-request { border-color:var(--yellow); }
.computer-request h2 { color:var(--yellow); }
.requesting .avatar { background:var(--yellow); color:#083a45; }
.table-actions { position:absolute; bottom:17px; left:var(--action-inset,20px); right:var(--action-inset,20px); display:flex; justify-content:space-between; gap:16px; z-index:85; pointer-events:none; }
.table-actions button { pointer-events:auto; }
.restart-button { display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:11px 20px; min-height:48px; border:1px solid #3dccb5; border-radius:26px; background:linear-gradient(#216e72,#104749); color:#fff; font-weight:700; box-shadow:0 4px 10px #002b3a60; }
.restart-button:hover { background:#247c81; }
.restart-button span { font-size:23px; }
#new-game { border-color:#527c89; background:#073c45; }
#start-button { margin-top:12px; background:#137ae9; border-color:#84d9ff; }
.activity { font-size:12px; color:#91a8b8; padding:10px 6px; }
.activity summary { cursor:pointer; width:fit-content; }
.activity ol { line-height:1.7; max-height:220px; overflow:auto; }
.footer-note { display:none; }
.eyebrow { font-size:12px; letter-spacing:2px; font-weight:700; }
dialog { width:min(540px,calc(100% - 32px)); border:1px solid #38889b; border-radius:22px; padding:32px; background:#092c3b; color:#effaff; box-shadow:0 20px 100px #0005; }
dialog::backdrop { background:#001c2abb; backdrop-filter:blur(4px); }
dialog h2 { font-size:28px; margin-bottom:20px; }
dialog ol { padding-left:22px; line-height:1.55; }
dialog li { margin-bottom:10px; }
.close-button { position:absolute; right:12px; top:10px; background:none; border:0; font-size:30px; color:white; width:44px; height:44px; }
.flying-card { position:fixed; z-index:100; pointer-events:none; display:grid; place-items:center; margin:0; }
@media(min-width:901px) and (max-height:850px) {
  .game-heading { top:18px; } .game-heading h1 { font-size:48px; }
  .opponent { top:117px; } .mini-back { width:104px; height:132px; }
  .pool { height:210px; }
}
@media(max-width:1250px) and (min-width:901px) {
  .quick-rules { width:190px; padding:15px; right:12px; }
  .quick-rules h2 { font-size:17px; } .quick-rules li { font-size:13px; }
  .opponent { width:550px; } .opponent-heading { width:85px; }
  .pool-area { width:510px; } .pool-card { width:104px; height:150px; }
  .hand-area { width:calc(100% - 160px); } .hand-heading { --seat-width:70px; }
  .restart-button { padding:11px 14px; font-size:14px; }
}
@media(max-width:900px) {
  .site-header { padding:12px 16px; } .brand { font-size:22px; gap:9px; }
  .brand-mark { width:35px; height:35px; font-size:28px; border-radius:12px; }
  main { padding:0 6px; } .game-table { height:auto; min-height:0; max-height:none; padding:15px 12px 10px; }
  .game-heading,.opponent,.pool-area,.hand-area,.capture-panel,.turn-panel,.table-actions { position:relative; top:auto; bottom:auto; left:auto; right:auto; transform:none; width:100%; }
  .board-layout { display:flex; flex-direction:column; align-items:stretch; gap:0; }
  .play-lane { display:flex; flex-direction:column; } .game-heading { margin-top:8px; margin-bottom:15px; }
  .game-heading h1 { font-size:43px; gap:12px; }
  .title-fish { width:54px; height:44px; }
  .opponent-heading { position:static; width:100%; flex-direction:row; justify-content:center; margin-bottom:10px; }
  .avatar { width:30px; height:30px; font-size:23px; } .opponent-heading h2 { font-size:14px; }
  .opponent-cards { min-height:100px; gap:8px; } .mini-back { width:73px; height:98px; flex-basis:73px; border-width:3px; }
  .pool-area { width:min(100%,460px); margin:12px auto 18px; } .pool { height:225px; } .pool-card { width:83px; height:120px; border-width:3px; }
  .pool-label { top:-6px; right:4px; }
  .pool-area:has(.can-draw) .pool-hint { position:relative; left:auto; top:auto; width:max-content; max-width:100%; margin:10px auto 0; padding:7px 12px; border-radius:15px; font-size:12px; }
  .quick-rules,.quick-rules.in-depth { position:fixed; right:12px; top:80px; width:calc(100% - 24px); margin:0; max-height:calc(100dvh - 104px); }
  .speech-bubble { top:calc(100% + 8px); font-size:17px; padding:8px 13px; }
  .opponent:has(.speech-bubble:not([hidden])) { margin-bottom:44px; }
  .opponent:has(.denial-bubble:not([hidden])) { margin-bottom:125px; }
  .hand-area { order:3; margin-top:16px; } .hand-heading { display:none; }
  .hand-heading { position:relative; display:flex; align-items:center; justify-content:center; gap:8px; width:100%; bottom:auto; left:auto; right:auto; margin-bottom:10px; }
  .player-avatar { width:40px; height:40px; margin:0; } .player-avatar svg { width:30px; height:30px; }
  .computer-avatar { width:44px; height:44px; } .computer-avatar img { width:38px; height:38px; }
  .hand-heading h2 { min-width:70px; font-size:12px; padding:5px 12px; }
  .game-table::before { border-width:6px; border-bottom-width:10px; }
  .hand { --card-width:96px; --card-height:144px; --stack-step:26px; min-height:144px; padding-right:6px; }
  .rank-group { flex-basis:102px; width:102px; } .card-corner { font-size:26px; left:8px; top:7px; } .card-corner small { font-size:21px; } .card-corner.bottom { right:8px; bottom:7px; } .card-suit { font-size:55px; }
  .answer-slot { position:relative; bottom:auto; left:auto; transform:none; margin-bottom:16px; }
  #no-button { min-width:165px; min-height:56px; font-size:26px; }
  .table-actions { margin-top:12px; } .restart-button { font-size:13px; padding:9px 14px; min-height:43px; }
}
@media(max-width:500px) {
  .site-header { padding:10px; } .brand { font-size:18px; letter-spacing:-.5px; }
  .header-controls { flex-direction:column; gap:3px; } .quiet-button { font-size:10px; padding:4px 7px; }
  .opponent-cards { gap:5px; min-height:88px; } .mini-back { width:64px; height:84px; flex-basis:64px; }
  .pool { height:210px; } .pool-card { width:76px; height:110px; }
  .hand { --card-width:76px; --card-height:112px; --stack-step:23px; min-height:112px; }
  .hand { overflow-x:auto; justify-content:safe center; padding:24px 28px 16px 8px; }
  .rank-group { flex:0 0 58px; width:58px; } .card-corner { font-size:22px; left:7px; top:6px; } .card-corner small { font-size:17px; } .card-corner.bottom { right:7px; bottom:6px; } .card-suit { font-size:44px; }
  .stack-count { font-size:9px; padding:3px 5px; right:3px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; scroll-behavior:auto!important; animation-duration:.01ms!important; animation-delay:0s!important; } .confetti { display:none; } }

.reaction-layer { position:fixed; inset:0; display:grid; place-items:center; pointer-events:none; z-index:110; }
.reaction-token,.score-token { display:flex; flex-direction:column; align-items:center; gap:10px; width:min(380px,calc(100vw - 36px)); text-align:center; color:#173a3e; background:#f7cb62; border:5px solid #ffedb5; border-radius:24px; padding:24px; box-shadow:0 18px 60px #082e3b60; }
.reaction-token.blue-reaction,.score-token.blue-reaction { color:#dff7ff; background:linear-gradient(#176da6,#094e80); border-color:#77dfff; box-shadow:0 0 24px #56dfff40,0 18px 60px #082e3b60; }
.score-token.purple-reaction { color:#efddff; background:linear-gradient(#633794,#38245f); border-color:#bd8aff; box-shadow:0 0 24px #b578ff40,0 18px 60px #082e3b60; }
.reaction-token strong { font-size:clamp(60px,9vw,105px); line-height:1; } .score-token strong { font-size:92px; line-height:1; } .reaction-token span,.score-token span { font-size:18px; line-height:1.4; font-weight:600; }
.outcome-dialog { position:fixed; inset:0; z-index:100; padding:24px; background:transparent; color:#effaff; pointer-events:none; overflow:hidden; }
.outcome-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; perspective: 600px; }
.outcome-content h2 { font-family:'Arial Rounded MT Bold','Trebuchet MS',sans-serif; font-weight:900; font-size:clamp(64px,12vw,150px); letter-spacing:-.045em; line-height:1.05; margin:15px 0 24px; color:#77dfff; text-shadow:0 4px 0 #052c46,0 8px 24px #001a2a,0 0 26px #002c45; animation:outcome-arrival 950ms cubic-bezier(.15,.7,.2,1) both; }
.lost .outcome-content h2 { color:#bd8aff; }
.outcome-content p { font-size:20px; font-weight:700; line-height:1.5; max-width:460px; margin:0 0 28px; text-shadow:0 2px 3px #001a2a,0 0 10px #001a2a,0 0 20px #001a2a; }
.outcome-content .restart-button { min-height:52px; font-size:18px; pointer-events:auto; border-color:#77dfff; background:#073e60; box-shadow:0 0 20px #001a2a80; }
.lost .outcome-content .restart-button { border-color:#bd8aff; background:#372451; }
#confetti { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.confetti { position:absolute; left:var(--origin-x); top:var(--origin-y); width:var(--size); height:calc(var(--size) * 1.7); background:var(--color); border-radius:2px; opacity:0; animation:confetti-burst var(--duration) var(--delay) linear forwards; }
@keyframes outcome-arrival { 0% { opacity: 0; transform: translateZ(-700px) scale(.03); } 65% { opacity: 1; transform: translateZ(60px) scale(1.12); } 100% { opacity: 1; transform: translateZ(0) scale(1); } }
@keyframes confetti-burst { 0% { opacity:1; transform:translate(0,0) rotate(0) scale(.7); } 60% { opacity:1; } 100% { opacity:0; transform:translate(var(--dx),var(--dy)) rotate(var(--spin)) scale(1); } }





.start-panel { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.start-panel.ready-panel { left:50%; bottom:90px; transform:translateX(-50%); width:min(600px,calc(100% - 32px)); height:auto; overflow:visible; clip-path:none; text-align:center; padding:0; border:0; background:none; z-index:80; }
.start-panel h2 { font-size:19px; }
.start-panel p { font-size:13px; line-height:1.4; }
.start-panel.ready-panel h2 { margin:0 0 5px; font-size:19px; text-shadow:0 3px 4px #002a36; }
.start-panel.ready-panel p { margin:7px 0 0; font-size:17px; font-weight:700; text-shadow:0 3px 4px #002a36; }
.start-panel.ready-panel #start-button { width:min(420px,100%); min-height:168px; margin:0; border-radius:26px; font-size:64px; font-weight:850; letter-spacing:-1px; text-shadow:0 4px 5px #003b6f; background:#177ee9; }
@media(max-width:900px) { .start-panel.ready-panel { position:relative; left:auto; bottom:auto; transform:none; margin:10px auto; } }


.side-scores { display:contents; }
.score-seat { position:absolute; left:1cm; width:178px; z-index:5; }
.computer-seat { top:60px; }
.player-seat { bottom:80px; }
.standing-label { text-align:center; margin:4px 0 12px; min-height:23px; font-size:18px; line-height:1.25; color:#fff; text-shadow:0 2px 3px #001f36; }
.set-score { display:block; text-align:center; font-size:118px; line-height:1.1; font-weight:850; color:white; text-shadow:0 5px 6px #002938b0; }
.score-details { padding:8px 10px; background:#00363ae3; }
.capture-count { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.capture-count span { font-size:12px; line-height:1.4; }
.capture-count strong { font-size:27px; color:#80dcff; }
.player-seat .capture-count strong { color:#77dfff; }
.computer-seat .capture-count strong { color:#bd8aff; }
.player-seat .book { background:#77dfff; color:#082e46; }
.computer-seat .book { background:#bd8aff; color:#291443; }
.score-books { margin-top:8px; padding-top:6px; border-top:1px solid #ffffff17; }
.score-books .books-label { font-size:12px; margin-bottom:4px; }
.pool-label { left:calc(100% + 16px); right:auto; top:50%; transform:translateY(-50%); width:150px; padding:9px 12px; font-size:16px; line-height:1.4; text-align:center; }
.pool-area:has(.can-draw) .pool-hint { top:calc(50% + 60px); }
@media(max-width:1250px) and (min-width:901px) {
  .score-seat { left:1cm; width:140px; }
  .set-score { font-size:100px; }
  .standing-label { font-size:16px; }
  .pool-label { left:calc(100% + 6px); width:126px; font-size:15px; padding:8px; }
}
@media(max-width:900px) {
  .side-scores { display:flex; order:2; gap:12px; margin-top:14px; }
  .score-seat { position:static; flex:1; width:auto; }
  .standing-label { font-size:14px; min-height:20px; }
  .set-score { font-size:56px; }
  .score-details { border-radius:12px; }
  .capture-count strong { font-size:22px; }
  .capture-count span { font-size:10px; }
  .pool-label { left:auto; right:0; top:50%; width:112px; font-size:14px; padding:7px 10px; }
  .pool-area:has(.can-draw) .pool-hint { top:auto; }
}
.pool-label { left:calc(var(--pile-edge-x,50%) + 1cm); right:auto; top:var(--pile-mid-y,50%); transform:translateY(-50%); margin:0; padding:0; border:0; border-radius:0; background:none; color:white; font-size:16px; line-height:1.4; text-shadow:0 2px 3px #00333b; }
.pool-label.label-below { left:50%; top:calc(var(--pile-bottom-y,100%) + 1cm); transform:translateX(-50%); }
@media(min-width:901px) { .pool-area:has(.stacked-pool) { top:38%; } }
@media(max-width:900px) {
  .pool-area { padding-bottom:var(--label-space,0px); }
  .start-panel.ready-panel #start-button { min-height:130px; font-size:clamp(36px,9vw,56px); }
  .start-panel.ready-panel p { font-size:14px; }
}




.brand-mark:has(img){background:transparent;box-shadow:none;border:0}

/* Replay feedback is an overlay and never changes the board dimensions. */
.outcome-replay { position:relative; display:flex; align-items:center; justify-content:center; }
.outcome-content .rematch-prompt { position:absolute; top:100%; left:0; right:0; margin:8px 0 0; font-size:16px; color:#dfc7ff; text-align:center; pointer-events:none; }
.lost #outcome-restart,body:has(.outcome-dialog.lost:not([hidden])) #restart { animation:rematch-invitation .9s ease-in-out 2; }
@keyframes rematch-invitation { 0%,100% { box-shadow:0 0 8px #bd8aff30; } 50% { box-shadow:0 0 22px #bd8aff80; } }
@media(prefers-reduced-motion:reduce) { .lost #outcome-restart,body:has(.outcome-dialog.lost:not([hidden])) #restart { animation:none; } }

/* Shared game navigation keeps Home visible without adding a mobile row. */
.site-header .brand-mark img { display:block; width:100%; height:100%; object-fit:contain; }
.game-navigation { display:flex; align-items:center; gap:18px; margin-left:auto; }
.game-navigation a { color:#d2e5f4; text-decoration:none; white-space:nowrap; font-size:14px; padding:8px 2px; }
.game-navigation a:hover { color:#77dfff; }
@media(max-width:1100px) {
  .game-navigation { margin-left:auto; gap:0; }
  .game-navigation a:not(:first-child) { display:none; }
}
@media(max-width:480px) {
  .site-header .brand { font-size:13px; letter-spacing:-.3px; gap:5px; }
  .game-navigation a { font-size:12px; padding:6px 3px; }
}
