/* Based on the light forms and tables in gewesselt/pruefungen shared/style.css.
   Wizard-specific components: score sheet, play area, hand and suit cards. */
:root { color-scheme:light; --blue:#153d6f; --blue2:#235a96; --bg:#f1f4f8; --panel:#fff; --line:#d7dee8; --text:#1c2733; --muted:#5d6877; --ember:#a83737; --tide:#235a96; --grove:#365d44; --sun:#956b14; font-family:system-ui,-apple-system,"Segoe UI",sans-serif; font-size:15px; }
* { box-sizing:border-box; }
body { margin:0; min-height:100dvh; background:var(--bg); color:var(--text); line-height:1.5; }
button,input { font:inherit; }
button,a,input { -webkit-tap-highlight-color:transparent; }
button { color:inherit; cursor:pointer; transition:background .15s,border-color .15s; }
button:disabled { opacity:.45; cursor:default; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid #2b70b955; outline-offset:3px; }
a { color:var(--blue); }
.ui-icon { display:inline-block; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; vertical-align:middle; }
header { width:min(1120px,calc(100% - 48px)); margin:24px auto 0; padding:0 0 20px; display:flex; justify-content:space-between; align-items:center; gap:20px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:13px; color:#142f50; text-decoration:none; font-size:26px; font-weight:750; line-height:1.2; letter-spacing:-.6px; }
.brand small { display:block; margin-top:4px; font-size:8px; font-weight:550; color:var(--muted); letter-spacing:2px; }
nav { display:flex; align-items:center; gap:23px; }.private { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; }.private .ui-icon { width:13px; height:13px; }
.text-button { display:inline-flex; align-items:center; gap:8px; padding:9px 0; border:0; background:transparent; color:var(--blue); font-size:12px; font-weight:600; }.text-button:hover { text-decoration:underline; }
.icon { display:inline-grid; place-items:center; width:39px; height:39px; padding:8px; border:1px solid var(--line); border-radius:6px; background:transparent; color:var(--muted); }.icon:hover { background:#e8edf3; }
h1,h2,h3 { color:#142f50; font-family:inherit; line-height:1.2; margin:0 0 12px; }p { margin:0 0 14px; }h1 { font-size:clamp(28px,4vw,38px); font-weight:730; letter-spacing:-1px; }h2 { font-size:24px; font-weight:700; }h3 { font-size:16px; font-weight:650; }
.eyebrow { color:var(--blue2); font-size:10px; font-weight:750; letter-spacing:1px; margin:0 0 13px; }.muted { color:var(--muted); }.small { font-size:11px!important; }
.welcome { display:grid; grid-template-columns:1fr 410px; gap:70px; align-items:start; width:min(1000px,calc(100% - 48px)); margin:64px auto 40px; }.intro { padding-top:13px; }.lead { color:#49596a; max-width:450px; font-size:15px; line-height:1.75; margin:18px 0 26px; }
.how-to { list-style:none; padding:0; margin:28px 0; counter-reset:steps; }.how-to li { position:relative; counter-increment:steps; padding:16px 0 16px 46px; border-top:1px solid var(--line); }.how-to li:before { content:"0" counter(steps); position:absolute; left:0; top:18px; color:#8292a6; font:600 12px ui-monospace,Consolas,monospace; }.how-to strong { color:#20364f; font-size:14px; font-weight:650; }.how-to p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.rules-note { border-left:3px solid #b3c4d7; padding:0 0 0 17px; margin-top:28px; }.rules-note strong { font-size:13px; color:#40546b; }.rules-note p { margin:5px 0 0; font-size:12px; color:var(--muted); }.rules-note .text-button { font-size:11px; }
.entry-panel { background:white; border:1px solid var(--line); border-top:4px solid var(--blue); border-radius:8px; box-shadow:0 5px 20px #1936530a; padding:29px; }.entry-panel h2 { font-size:23px; margin-bottom:13px; }.entry-panel>.muted { font-size:13px; line-height:1.7; margin-bottom:24px; }.entry-panel .eyebrow { font-size:9px; margin-bottom:10px; }
label { display:block; font-size:13px; font-weight:650; margin:18px 0 7px; color:#253649; }label span { color:var(--muted); font-weight:400; font-size:11px; }
input:not([type=checkbox]) { width:100%; height:47px; padding:11px 12px; border:1px solid #b9c4d2; border-radius:7px; background:white; color:#1c2733; font-size:14px; }input:not([type=checkbox]):focus { outline:3px solid #2b70b92d; border-color:var(--blue2); }input::placeholder { color:#7a8696; }
.password-wrap { position:relative; }.password-wrap input { padding-right:45px; }.password-wrap .icon { position:absolute; right:4px; top:4px; border:0; width:39px; height:39px; }
.primary,.secondary { display:inline-flex; align-items:center; justify-content:space-between; gap:15px; border-radius:7px; border:1px solid transparent; min-height:44px; padding:10px 16px; font-size:13px; font-weight:650; text-decoration:none; }.primary { background:var(--blue); color:white; width:100%; margin-top:17px; }.primary:not(:disabled):hover { background:#0e315b; }.secondary { background:#e8edf3; color:#253649; border-color:#d7dee8; }.secondary:not(:disabled):hover { background:#dde5ef; }.full { width:100%; }.compact { width:auto; margin:0; font-size:12px; }
.access-note { display:flex; align-items:center; gap:7px; margin:22px 0 0; padding-top:18px; border-top:1px solid var(--line); color:#687585; font-size:11px; }.access-note .ui-icon { width:13px; height:13px; }.divider { margin:27px 0 17px; padding-top:20px; border-top:1px solid var(--line); color:#687585; font-size:9px; font-weight:700; letter-spacing:.7px; }.check { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:400; margin:15px 0; }.check input { width:16px; height:16px; accent-color:var(--blue); }.help { width:25px; height:25px; border:1px solid #b9c4d2; border-radius:50%; background:transparent; font-size:11px; }.code-input { text-transform:uppercase; letter-spacing:3px; }
footer { width:min(1120px,calc(100% - 48px)); margin:40px auto 0; border-top:1px solid var(--line); padding:18px 0 24px; display:flex; justify-content:space-between; gap:15px; color:#687585; font-size:10px; }
.game-layout { width:min(1120px,calc(100% - 48px)); margin:26px auto 0; display:flex; flex-direction:column; }.sidebar { order:-1; display:grid; grid-template-columns:1fr auto auto auto; gap:12px; align-items:center; margin-bottom:27px; }.sidebar>.section-title { justify-content:flex-start; gap:12px; }.section-title { display:flex; justify-content:space-between; align-items:center; gap:15px; }.section-title .eyebrow { margin:0; font-size:10px; color:#5d6877; letter-spacing:.6px; }.section-title>span:not(.eyebrow) { color:var(--muted); font-size:10px; }.code-chip { display:inline-flex; align-items:center; gap:9px; background:white; border:1px solid #c4cfdd; border-radius:5px; padding:7px 10px; color:var(--blue); font:650 12px ui-monospace,Consolas,monospace; letter-spacing:1px; }.code-chip .ui-icon { width:13px; height:13px; }.sidebar>.secondary { width:auto; min-height:35px; padding:7px 11px; font-size:11px; background:transparent; }.sidebar>.secondary .ui-icon { width:14px; height:14px; }.sidebar-note { display:none; }
.players { grid-column:1/-1; grid-row:2; background:white; border:1px solid var(--line); border-radius:8px; overflow:hidden; }.players-heading,.player { display:grid; grid-template-columns:38px minmax(0,1fr) 90px 90px 90px; align-items:center; gap:10px; padding:9px 18px; }.players-heading { font-size:10px; color:#687585; background:#e8edf3; border-bottom:1px solid var(--line); }.players-heading>span:nth-child(n+3) { text-align:right; }.player { position:relative; min-height:56px; border-bottom:1px solid #e7ebf1; }.player:last-child { border-bottom:0; }.player.active { background:#edf5ff; box-shadow:inset 3px 0 var(--blue2); }.seat-index { font:11px ui-monospace,Consolas,monospace; color:#8292a6; }.player-info { min-width:0; }.player-info strong { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:13px; font-weight:600; overflow-wrap:anywhere; }.player-info small { display:block; color:#687585; font-size:9px; min-height:13px; margin-top:2px; }.player.active .player-info small { color:var(--blue2); font-weight:700; }.you { font-size:9px; color:#687585; font-weight:400; }.you:before { content:'· '; }.host-icon { color:#687585; }.host-icon .ui-icon { width:12px; height:12px; }.player-metric,.player-score { text-align:right; font:14px ui-monospace,Consolas,monospace; font-variant-numeric:tabular-nums; }.player-score { font-weight:750; color:#142f50; }
.table-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:15px; }.table-heading .eyebrow { font-size:9px; margin-bottom:6px; color:#687585; letter-spacing:.8px; }.table-heading h1 { font-size:27px; margin:0; font-weight:700; letter-spacing:-.5px; }.table-heading h1>span { font-size:16px; color:#687585; font-weight:400; }
.trump-badge { display:flex; align-items:center; gap:10px; padding:7px 0 7px 17px; border-left:1px solid #c4cfdd; }.trump-badge>span { font-size:25px; color:#6e7d8d; }.trump-badge small { display:block; font-size:8px; color:#687585; letter-spacing:.7px; }.trump-badge strong { font-size:12px; color:#253649; font-weight:650; }.trump-badge>.ember { color:var(--ember); }.trump-badge>.tide { color:var(--tide); }.trump-badge>.grove { color:var(--grove); }.trump-badge>.sun { color:var(--sun); }
.game-table { position:relative; display:grid; place-items:center; min-height:225px; border:1px solid #c9d5e3; border-top:3px solid var(--blue); border-radius:8px; background:#fff; padding:24px; }.lobby-table { min-height:325px; }.table-center-mark { text-align:center; }.table-round { display:block; font:500 58px ui-monospace,Consolas,monospace; color:#d3dce7; line-height:1.1; }.table-center-mark p { color:#8290a1; font-size:12px; margin:14px 0 0; }
.lobby-center,.round-summary { width:100%; max-width:470px; text-align:center; }.lobby-center h2,.round-summary h2 { font-size:23px; margin:0 0 10px; }.lobby-center p,.round-summary p { font-size:12px; }.lobby-center>small { font-size:10px; }.invite-code { display:block; background:#f5f7fa; color:var(--blue); border:1px solid #bccbdd; border-radius:6px; padding:11px 17px; margin:18px auto 8px; font:700 28px ui-monospace,Consolas,monospace; letter-spacing:5px; }.invite-code span { font-size:15px; letter-spacing:0; }.invite-code .ui-icon { width:16px; height:16px; }.empty-seats { display:flex; justify-content:center; gap:9px; margin:19px 0; }.empty-seats>span { display:grid; place-items:center; width:30px; height:30px; border:1px dashed #bdcad8; color:#9ba8b8; border-radius:50%; font-size:12px; }.empty-seats>.filled { background:#e8edf3; border:1px solid #9cb1cb; color:var(--blue); font-weight:650; }.lobby-center>.primary,.round-summary>.primary { display:flex; max-width:300px; margin:18px auto 12px; }.table-sigil { display:block; color:var(--blue); font-size:38px; margin-bottom:12px; }
.trick-area { display:flex; justify-content:center; flex-wrap:wrap; gap:17px; }.played-card { text-align:center; }.played-card>small { display:block; margin-top:9px; font-size:10px; color:#5d6877; max-width:106px; overflow-wrap:anywhere; }
.action-prompt { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:15px; padding:15px 17px; margin:13px 0; border:1px solid #b7cde6; border-left:3px solid var(--blue2); border-radius:6px; background:#edf5ff; min-height:76px; }.action-prompt h3 { font-size:14px; margin:0; }.action-prompt .eyebrow { font-size:8px; margin-bottom:5px; color:var(--blue2); }.action-prompt>.muted { font-size:11px; }.bid-buttons { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; max-width:65%; }.bid-buttons button { width:43px; min-height:43px; border:1px solid #b9c4d2; border-radius:6px; background:white; font-size:16px; font-weight:650; color:var(--blue); }.bid-buttons button:not(:disabled):hover { background:var(--blue); color:white; border-color:var(--blue); }.bid-buttons .ember { color:var(--ember); }.bid-buttons .grove { color:var(--grove); }.bid-buttons .sun { color:var(--sun); }
.waiting { padding:14px 0; margin:9px 0; min-height:65px; border-bottom:1px solid var(--line); font-size:13px; color:#40546b; }.waiting>span { display:block; color:#687585; font-size:10px; margin-top:4px; }.hand-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0 3px; font-size:10px; font-weight:600; color:#40546b; letter-spacing:.5px; }.hand-heading b { margin-left:6px; color:var(--blue); font-size:11px; }.hand-heading small { font-size:10px; font-weight:400; letter-spacing:0; color:#687585; }.hand { display:flex; align-items:flex-start; justify-content:center; gap:9px; overflow-x:auto; padding:22px 7px 22px; min-height:193px; scroll-snap-type:x proximity; scrollbar-width:thin; scrollbar-color:#b0bdcf transparent; }
.card { position:relative; display:inline-flex; align-items:center; justify-content:center; flex:none; width:106px; height:154px; padding:0; border:1px solid #c2cbd2; border-radius:7px; color:#365d44; background:#fff; overflow:hidden; font-family:inherit; text-align:center; box-shadow:0 3px 7px #19365314; }.card:before { content:''; position:absolute; inset:6px; border:1px solid currentColor; border-radius:3px; opacity:.14; }.card:after { display:none; }.corner { position:absolute; top:10px; left:11px; font-size:23px; font-weight:750; line-height:1; }.corner small { display:block; font-size:13px; margin-top:4px; }.corner.bottom { top:auto; left:auto; right:11px; bottom:10px; transform:rotate(180deg); font-size:17px; }.card-art { position:relative; display:block; line-height:1; }.card-art svg { display:block; width:49px; height:49px; }.wizard .card-art svg { width:60px; height:60px; }.card-name { position:absolute; bottom:20px; font-size:7px; font-weight:650; letter-spacing:1px; text-transform:uppercase; }.card.ember { color:#a83737; background:#fffafa; }.card.tide { color:#235a96; background:#fbfdff; }.card.grove { color:#365d44; background:#fcfdfa; }.card.sun { color:#956b14; background:#fffdf7; }.card.wizard { background:#153d6f; color:white; border-color:#153d6f; }.card.jester { color:#606b7b; background:#f7f8fa; }.card.back { background:var(--blue); color:#fff; }.back>div { width:85%; height:90%; border:1px solid #ffffff70; display:flex; flex-direction:column; justify-content:space-around; }.back span { font-size:40px; }
.hand .card { scroll-snap-align:center; width:101px; height:147px; transition:transform .15s,box-shadow .15s; }.hand .card:disabled { opacity:.72; }.hand .card:not(:disabled):hover { transform:translateY(-7px); box-shadow:0 5px 12px #19365325; }.hand .card.selected { transform:translateY(-9px); outline:3px solid var(--blue2); outline-offset:3px; }.classic-card { background:#fff!important; border-color:#b9c4d2!important; }.classic-card:before { display:none; }.classic-card img { width:100%; height:100%; object-fit:fill; pointer-events:none; }
.last-trick { padding:11px 0 0; color:#5d6877; font-size:11px; }.last-trick summary { cursor:pointer; min-height:25px; }.last-trick>div { display:flex; flex-wrap:wrap; gap:11px; padding:12px 0; }.last-trick>div>div { text-align:center; }.last-trick small { display:block; margin-top:5px; font-size:9px; }.card.mini { width:61px; height:89px; border-radius:5px; }.mini .corner { top:6px; left:7px; font-size:12px; }.mini .corner small { font-size:9px; }.mini .corner.bottom { top:auto; left:auto; bottom:6px; right:7px; font-size:12px; }.mini .card-art svg { width:29px; height:29px; }.mini .card-name { display:none; }.mini:before { inset:4px; border-radius:2px; }
.result-list { margin:20px auto; max-width:420px; }.result-list>div { display:flex; justify-content:space-between; align-items:center; gap:20px; border-bottom:1px solid var(--line); padding:10px 2px; font-size:12px; }.result-list strong { min-width:70px; text-align:left; font-weight:600; }.result-list span { color:var(--muted); font-size:11px; }.positive { color:#226038; }.negative { color:#a52424; }.scores { border:1px solid var(--line); border-radius:8px; background:#fff; padding:20px; margin-bottom:17px; }.scores .section-title { margin-bottom:15px; }.scores h3 { margin:0; font-size:18px; }.score-scroll { overflow:auto; }table { border-collapse:collapse; width:100%; text-align:left; white-space:nowrap; font-size:12px; }th,td { padding:11px; border-bottom:1px solid var(--line); }th { background:#f5f7fa; font-weight:600; color:#40546b; }td small { display:block; margin-top:4px; font-size:9px; }.connection { border:1px solid #d6ac55; border-radius:6px; padding:12px; margin-bottom:15px; font-size:12px; background:#fff2d9; color:#764500; }
dialog { max-width:760px; width:calc(100% - 32px); max-height:85dvh; border:1px solid #c4cfdd; border-radius:10px; padding:34px; background:white; color:var(--text); box-shadow:0 20px 70px #142f502b; }dialog::backdrop { background:#142f5080; }dialog .close { position:absolute; right:12px; top:12px; }dialog h2 { font-size:27px; margin:0 0 25px; padding-right:28px; }dialog h3 { font-size:13px; }dialog p { color:#49596a; font-size:12px; line-height:1.8; }dialog a { font-size:12px; }.rule-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px 30px; }
#toast { position:fixed; z-index:20; left:50%; bottom:max(22px,env(safe-area-inset-bottom)); transform:translate(-50%,20px); opacity:0; pointer-events:none; padding:14px 20px; max-width:calc(100% - 30px); width:max-content; border:1px solid #b9c4d2; border-left:4px solid var(--blue2); border-radius:7px; background:white; color:#253649; font-size:13px; box-shadow:0 5px 25px #142f5030; transition:opacity .2s,transform .2s; }#toast.show { opacity:1; transform:translate(-50%,0); }
@media(min-width:1050px) { .hand:has(.card:nth-child(10)) { justify-content:flex-start; } }
@media(max-width:950px) { .welcome { grid-template-columns:1fr 360px; gap:36px; }.hand:has(.card:nth-child(7)) { justify-content:flex-start; } }
@media(max-width:700px) {
 header { width:calc(100% - 32px); margin-top:18px; padding-bottom:16px; gap:12px; }.brand { font-size:23px; gap:10px; }.brand small { font-size:7px; letter-spacing:1.6px; }.brand-mark { grid-template-columns:repeat(2,7px); gap:3px; }.brand-mark i { height:12px; }nav { gap:15px; }.private { display:none; }.text-button { font-size:11px; }.icon { width:36px; height:36px; }
 .welcome { width:calc(100% - 32px); max-width:500px; grid-template-columns:1fr; gap:26px; margin:25px auto 20px; }.entry-panel { grid-row:1; padding:23px; border-radius:7px; }.intro { padding:4px 5px; }.intro h1 { font-size:28px; letter-spacing:-.7px; }.intro .lead { font-size:13px; margin:12px 0 20px; }.how-to { margin:20px 0; }.how-to li { padding-top:13px; padding-bottom:13px; padding-left:35px; }.how-to li:before { top:16px; font-size:11px; }.how-to strong { font-size:13px; }.how-to p { font-size:12px; }.rules-note { margin-top:23px; }.eyebrow { font-size:9px; }.entry-panel h2 { font-size:23px; }.entry-panel>.muted { font-size:12px; margin-bottom:20px; }input:not([type=checkbox]) { font-size:16px; }.access-note { font-size:10px; }.entry-panel .primary { min-height:47px; }footer { width:calc(100% - 32px); margin-top:27px; font-size:9px; }
 .game-layout { width:calc(100% - 24px); margin:18px auto 0; }.sidebar { grid-template-columns:1fr auto auto; gap:9px 6px; margin-bottom:20px; }.sidebar>.section-title { grid-column:1/-1; justify-content:space-between; }.sidebar>.secondary { grid-row:3; font-size:10px; padding:7px 9px; min-height:36px; gap:7px; }.sidebar>.secondary[data-action=leave] { grid-column:1; }.sidebar>.secondary[data-do=cards] { grid-column:2; }.sidebar>.secondary[data-do=scores] { grid-column:3; }.sidebar>.secondary[data-do=cards]:first-of-type { grid-column:1/3; }.sidebar>.secondary .ui-icon { width:13px; height:13px; }
 .players { border-radius:6px; }.players-heading,.player { grid-template-columns:23px minmax(0,1fr) 43px 40px 47px; gap:5px; padding:8px 11px; }.players-heading { font-size:9px; }.player { min-height:50px; }.seat-index { font-size:10px; }.player-info strong { font-size:12px; gap:4px; }.player-info small { font-size:8px; min-height:12px; }.player-metric,.player-score { font-size:12px; }.host-icon .ui-icon { width:10px; height:10px; }.you { font-size:8px; }
 .table-heading { gap:10px; margin-bottom:12px; }.table-heading h1 { font-size:24px; }.table-heading h1>span { font-size:14px; }.table-heading .eyebrow { font-size:8px; }.trump-badge { padding:4px 0 4px 12px; gap:7px; }.trump-badge>span { font-size:22px; }.trump-badge strong { font-size:11px; }.trump-badge small { font-size:7px; }
 .game-table { min-height:170px; padding:19px 12px; border-radius:6px; }.lobby-table { min-height:315px; padding:24px 15px; }.lobby-center h2,.round-summary h2 { font-size:21px; }.lobby-center p,.round-summary p { font-size:11px; }.invite-code { font-size:25px; letter-spacing:4px; }.table-round { font-size:48px; }.table-center-mark p { font-size:10px; margin-top:10px; }.trick-area { gap:9px; }.played-card .card { width:76px; height:110px; border-radius:5px; }.played-card>small { font-size:8px; max-width:76px; margin-top:6px; }.played-card .corner { top:8px; left:8px; font-size:17px; }.played-card .corner small { font-size:10px; }.played-card .corner.bottom { top:auto; left:auto; right:8px; bottom:8px; font-size:14px; }.played-card .card-art svg { width:36px; height:36px; }.played-card .wizard .card-art svg { width:47px; height:47px; }.played-card .card-name { font-size:6px; bottom:14px; }
 .action-prompt { margin:11px 0; padding:12px; min-height:68px; gap:12px; border-radius:5px; }.action-prompt h3 { font-size:12px; }.action-prompt .eyebrow { font-size:7px; }.action-prompt>.muted { font-size:10px; }.action-prompt:has(.bid-buttons) { align-items:flex-start; flex-direction:column; }.bid-buttons { max-width:100%; justify-content:flex-start; gap:5px; }.bid-buttons button { width:40px; min-height:42px; font-size:15px; }.compact { min-height:43px; padding:10px 12px; font-size:11px; }.waiting { margin:8px 0; padding:12px 2px; min-height:60px; font-size:11px; }.waiting>span { font-size:9px; }.hand-heading { padding-top:10px; font-size:9px; letter-spacing:.2px; }.hand-heading small { font-size:8px; }.hand { gap:8px; min-height:164px; padding:21px 7px max(20px,env(safe-area-inset-bottom)); }.hand:has(.card:nth-child(4)) { justify-content:flex-start; }.hand .card { width:85px; height:124px; border-radius:6px; }.hand .corner { top:9px; left:9px; font-size:19px; }.hand .corner small { font-size:11px; }.hand .corner.bottom { top:auto; left:auto; right:9px; bottom:9px; font-size:15px; }.hand .card-art svg { width:39px; height:39px; }.hand .wizard .card-art svg { width:51px; height:51px; }.hand .card-name { font-size:6px; bottom:16px; }
 .scores { padding:14px; }.scores h3 { font-size:17px; }.result-list>div { gap:14px; }.rule-grid { grid-template-columns:1fr; gap:5px; }dialog { padding:28px 23px; }dialog h2 { font-size:24px; }.mini .card-art svg { width:29px; height:29px; }
}
/* The score sheet is a dialog so opening it never displaces the hand. */
#score-dialog { width:min(920px,calc(100% - 32px)); padding:0; }
#score-dialog .scores { margin:0; border:0; padding:23px; }
#score-dialog .section-title>span { margin-left:auto; }
#score-dialog .score-scroll { max-height:calc(80dvh - 105px); overflow:auto; }
#score-dialog th { position:sticky; top:0; }

/* Laptop table: the score sheet sits beside play, leaving the full height for cards.
   Keep natural page flow below 600px height (zoom and very small windows). */
@media(min-width:1000px) and (min-height:600px) {
  body:has(.game-layout) header { width:min(1440px,calc(100% - 40px)); height:57px; margin:0 auto; padding:0; }
  body:has(.game-layout) .brand { font-size:23px; }
  .game-layout { --hand-card-width:clamp(76px,12.7dvh,104px); width:min(1440px,calc(100% - 40px)); height:calc(100dvh - 77px); min-height:0; margin:10px auto; display:grid; grid-template-columns:240px minmax(0,1fr); align-items:start; gap:22px; }
  .sidebar { display:flex; flex-direction:column; align-items:stretch; gap:10px; margin:0; min-width:0; }
  .sidebar>.section-title { justify-content:space-between; min-height:35px; gap:8px; }
  .sidebar .players-heading,.sidebar .player { grid-template-columns:17px minmax(0,1fr) 34px 32px 40px; gap:4px; padding:8px; }
  .sidebar .players-heading { font-size:8px; }
  .sidebar .player { min-height:48px; }
  .sidebar .player-info strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
  .sidebar .player-info small { font-size:8px; }
  .sidebar .player-metric,.sidebar .player-score { font-size:12px; }
  .sidebar .seat-index { font-size:9px; }
  .sidebar>.secondary { justify-content:flex-start; min-height:35px; }
  .play-main { min-height:0; min-width:0; height:100%; display:flex; flex-direction:column; }
  .table-heading { flex:none; height:48px; margin:0 0 9px; }
  .table-heading h1 { font-size:25px; }
  .table-heading .eyebrow { font-size:8px; margin-bottom:4px; }
  .game-table { min-height:0; flex:1 1 0; padding:14px; }
  .trick-area { gap:clamp(6px,1vw,16px); max-width:100%; flex-wrap:nowrap; }
  .played-card .card { width:clamp(68px,11dvh,104px); height:clamp(98px,16dvh,151px); }
  .played-card>small { margin-top:5px; font-size:9px; }
  .action-prompt { flex:none; min-height:65px; margin:9px 0 0; padding:10px 14px; gap:10px; }
  .bid-buttons { max-width:100%; gap:5px; }
  .bid-buttons button { width:36px; min-height:36px; font-size:14px; }
  .waiting { flex:none; min-height:58px; margin:7px 0 0; padding:10px 0; }
  .hand-heading { flex:none; height:29px; padding:8px 0 0; }
  .hand { flex:none; min-height:0; height:calc(var(--hand-card-width)*1.455 + 29px); padding:17px 7px 10px; gap:7px; overflow:visible; }
  .hand .card { width:var(--hand-card-width); height:calc(var(--hand-card-width)*1.455); }
  .hand .card:disabled { opacity:1; filter:saturate(.65); }
  .hand .corner { font-size:19px; top:8px; left:8px; }
  .hand .corner.bottom { top:auto; left:auto; bottom:8px; right:8px; font-size:16px; }
  .hand .card-art svg { width:40px; height:40px; }
  .hand .wizard .card-art svg { width:52px; height:52px; }
  /* Deal long hands into overlapping slots; every corner stays available. */
  .hand:has(.card:nth-child(8)) { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); padding-right:calc(var(--hand-card-width) + 7px); }
  .hand .card { position:relative; }
  .hand .card:focus-visible,.hand .card:not(:disabled):hover,.hand .card.selected { z-index:2; }
  .last-trick { flex:none; position:relative; height:24px; padding:5px 0 0; }
  .last-trick>div { position:absolute; z-index:4; right:0; bottom:24px; padding:13px; border:1px solid var(--line); border-radius:7px; box-shadow:0 5px 20px #142f5025; background:white; flex-wrap:nowrap; }
  .connection { flex:none; margin:0 0 8px; padding:8px 11px; }
  .phase-lobby .game-table,.phase-finished .game-table { flex:1; }
  .phase-roundEnd .game-table { padding:12px; }
  .round-summary .table-sigil { display:none; }
  .round-summary h2 { font-size:21px; margin-bottom:6px; }
  .round-summary p { margin-bottom:7px; font-size:11px; }
  .result-list { margin:9px auto; }
  .result-list>div { padding:6px 2px; font-size:11px; }
  .round-summary>.primary { min-height:37px; margin:9px auto 0; padding:8px 14px; font-size:12px; }
}
@media(min-width:1000px) and (max-width:1150px) and (min-height:600px) {
  .game-layout { grid-template-columns:218px minmax(0,1fr); gap:16px; }
  .sidebar .players-heading,.sidebar .player { grid-template-columns:14px minmax(0,1fr) 30px 28px 34px; padding:7px; }
}
/* English playing-card faces, using the standard red / black suits. */
:root { --ember:#b52e37; --tide:#202a35; --grove:#202a35; --sun:#b52e37; }
.card.ember,.card.sun { color:#b52e37; background:#fff; }
.card.tide,.card.grove { color:#202a35; background:#fff; }
.corner.bottom small { font-size:.65em; }


/* A shared baseline and consistent overlap keep the discard readable.
   Seat vectors only determine where a newly played card arrives from. */
.wizard-mark { display:block; width:42px; height:44px; flex:none; }
.brand { gap:10px; font-weight:700; letter-spacing:-.7px; }
.brand small { letter-spacing:1.6px; font-size:8px; }
/* Card centres are equally spaced on one circle, relative to the viewer. */
.game-table:has(.trick-pile) { container-type:size; }
.trick-pile { --ring-radius:clamp(32px,20cqh,80px); --pile-height:clamp(55px,34cqh,110px); --pile-width:calc(var(--pile-height)/1.455); position:absolute; inset:0; }
.trick-pile:before { content:''; position:absolute; left:50%; top:52%; width:calc(2*var(--ring-radius)); height:calc(2*var(--ring-radius)); transform:translate(-50%,-50%); border:1px dashed #d7dee8; border-radius:50%; }
.trick-meta { position:absolute; z-index:8; left:14px; right:14px; top:10px; display:flex; align-items:center; gap:12px; pointer-events:none; }
.trick-meta strong { color:var(--blue); font-size:10px; font-weight:650; max-width:48%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.trick-meta>span { color:var(--muted); font-size:9px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.trick-pile .played-card { position:absolute; left:calc(50% + var(--x)*var(--ring-radius)); top:calc(52% + var(--y)*var(--ring-radius)); width:var(--pile-width); height:var(--pile-height); transform:translate(-50%,-50%); }
.trick-pile .played-card .card { width:100%; height:100%; transform:none; border-radius:5px; box-shadow:0 2px 5px #142f5025; }
.trick-pile .lead-card .card { border:2px solid var(--blue2); }
.trick-pile .played-card .corner { top:6px; left:6px; font-size:clamp(13px,7cqh,21px); }
.trick-pile .played-card .corner small { margin-top:2px; font-size:.65em; }
.trick-pile .played-card .corner.bottom,.trick-pile .card-name { display:none; }
.trick-pile .played-card .card-art svg { width:clamp(22px,12cqh,38px); height:clamp(22px,12cqh,38px); }
.trick-pile .player-tag { position:absolute; left:3px; bottom:3px; top:auto; transform:none; display:flex; gap:3px; align-items:center; width:calc(100% - 6px); height:15px; max-width:none; margin:0; padding:1px 3px; background:#f1f4f8; border-radius:2px; color:#40546b; font-size:8px; line-height:13px; }
.trick-pile .player-tag b { flex:none; color:var(--blue); font-size:8px; }
.trick-pile .player-tag span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Keep seat labels outside the cards so none is hidden by a later play. */
.trick-pile .player-tag { left:50%; top:calc(100% + 5px); bottom:auto; transform:translateX(-50%); width:max-content; max-width:94px; height:16px; background:white; border:1px solid #d7dee8; padding:0 4px; }
:is(.seats-3,.seats-4,.seats-5,.seats-6) .seat-1 .player-tag,.seats-5 .seat-2 .player-tag,.seats-6 .seat-2 .player-tag { left:auto; right:calc(100% + 6px); top:50%; transform:translateY(-50%); }
.seats-3 .seat-2 .player-tag,.seats-4 .seat-3 .player-tag,.seats-5 .seat-3 .player-tag,.seats-5 .seat-4 .player-tag,.seats-6 .seat-4 .player-tag,.seats-6 .seat-5 .player-tag { left:calc(100% + 6px); top:50%; transform:translateY(-50%); }
.seats-4 .seat-2 .player-tag,.seats-6 .seat-3 .player-tag { top:auto; bottom:calc(100% + 5px); }

.trick-pile .lead-card .player-tag { background:var(--blue); color:white; }.trick-pile .lead-card .player-tag b { color:white; }
.order-0 { z-index:1; }.order-1 { z-index:2; }.order-2 { z-index:3; }.order-3 { z-index:4; }.order-4 { z-index:5; }.order-5 { z-index:6; }
.seats-3 .seat-0 { --x:0.00000; --y:1.00000; }
.seats-3 .seat-1 { --x:-0.86603; --y:-0.50000; }
.seats-3 .seat-2 { --x:0.86603; --y:-0.50000; }
.seats-4 .seat-0 { --x:0.00000; --y:1.00000; }
.seats-4 .seat-1 { --x:-1.00000; --y:0.00000; }
.seats-4 .seat-2 { --x:-0.00000; --y:-1.00000; }
.seats-4 .seat-3 { --x:1.00000; --y:-0.00000; }
.seats-5 .seat-0 { --x:0.00000; --y:1.00000; }
.seats-5 .seat-1 { --x:-0.95106; --y:0.30902; }
.seats-5 .seat-2 { --x:-0.58779; --y:-0.80902; }
.seats-5 .seat-3 { --x:0.58779; --y:-0.80902; }
.seats-5 .seat-4 { --x:0.95106; --y:0.30902; }
.seats-6 .seat-0 { --x:0.00000; --y:1.00000; }
.seats-6 .seat-1 { --x:-0.86603; --y:0.50000; }
.seats-6 .seat-2 { --x:-0.86603; --y:-0.50000; }
.seats-6 .seat-3 { --x:-0.00000; --y:-1.00000; }
.seats-6 .seat-4 { --x:0.86603; --y:-0.50000; }
.seats-6 .seat-5 { --x:0.86603; --y:0.50000; }

.just-played>.card { animation:card-to-table .28s ease-out; }
@keyframes card-to-table { from { opacity:0; transform:translate(calc(var(--x)*65px),calc(var(--y)*65px)); } to { opacity:1; transform:translate(0,0); } }
.hand .card:not(:disabled) { cursor:grab; }
.dragging-card,.dragging-card * { cursor:grabbing!important; user-select:none; }
.hand .drag-source { opacity:.25!important; }
.drag-ghost { position:fixed; z-index:100; margin:0!important; transform:rotate(-3deg)!important; pointer-events:none; box-shadow:0 10px 24px #142f5040!important; opacity:1!important; }
.game-table.can-drop { border:2px dashed #8ba9cd; background:#f7faff; }
.game-table.drag-over { border-color:var(--blue2); background:#edf5ff; box-shadow:inset 0 0 0 3px #235a9615; }
.game-table.can-drop:after { content:'Karte hier ablegen'; position:absolute; z-index:10; right:12px; bottom:12px; padding:6px 10px; border:1px solid #9bb6d5; border-radius:5px; background:white; color:var(--blue); font-size:11px; font-weight:650; pointer-events:none; }
.game-table.drag-over:after { content:'Loslassen zum Ausspielen'; background:var(--blue); color:white; border-color:var(--blue); }
@media(max-width:700px) { .wizard-mark { width:35px; height:38px; }.game-table:has(.trick-pile) { min-height:220px; }.trick-meta { left:10px; right:10px; gap:8px; }.trick-meta strong { font-size:9px; }.trick-meta>span { font-size:8px; } }
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { transition:none!important; animation:none!important; scroll-behavior:auto!important; } }
#card-import-dialog { max-width:620px; }
#card-import-dialog code { color:var(--blue); font-size:11px; }
#card-archive { width:100%; padding:12px; border:1px solid var(--line); border-radius:6px; background:#f5f7fa; font-size:12px; }
#card-import-status { margin:18px 0 0; color:var(--blue); font-size:12px; }
@media(max-width:700px) { .import-button span { display:none; }nav { gap:13px; }.private { display:none; } }

/* Portrait prioritises play: the score sheet follows the hand in DOM and view.
   This also overrides the wide laptop grid on large portrait tablets. */
@media(orientation:portrait) {
  .game-layout { display:flex; flex-direction:column; height:auto; gap:18px; }
  .game-layout .play-main { order:0; display:block; height:auto; width:100%; }
  .game-layout .sidebar { order:1; display:grid; width:100%; grid-template-columns:1fr auto auto; margin:0 0 18px; padding-top:16px; border-top:1px solid var(--line); gap:9px; }
  .game-layout .sidebar>.section-title { grid-column:1/-1; justify-content:space-between; }
  .game-layout .players { grid-row:2; }
  .game-layout .sidebar>.secondary { grid-row:3; }
  .game-layout .sidebar>.secondary[data-action=leave] { grid-column:1; }
  .game-layout .sidebar>.secondary[data-do=cards] { grid-column:2; }
  .game-layout .sidebar>.secondary[data-do=scores] { grid-column:3; }
  .game-layout .game-table { min-height:clamp(180px,25dvh,300px); }
  .game-layout.phase-lobby .game-table { min-height:315px; }
  .game-layout .sidebar .players-heading,.game-layout .sidebar .player { grid-template-columns:25px minmax(0,1fr) 52px 52px 56px; gap:6px; padding:9px 11px; }
  .game-layout .sidebar .player-info strong { font-size:12px; }
}
@media(orientation:portrait) and (min-width:701px) {
  .game-layout .sidebar>.secondary { width:auto; }
  .game-layout .sidebar .players-heading,.game-layout .sidebar .player { grid-template-columns:35px minmax(0,1fr) 80px 80px 85px; padding:10px 16px; }
}
