/* Isolated Hearts UI. No shared game or site selectors. */
body.ht-page { color-scheme:dark; margin:0; background:#081426; color:#f2f6ff; font:1rem/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; --ht-muted:#bdcce1; --ht-line:#4a6687; --ht-yellow:#ffdf58; }
.ht-page *, .ht-page *::before, .ht-page *::after { box-sizing:border-box; }
.ht-page [hidden] { display:none!important; }
.ht-page a { color:#83c9ff; text-underline-offset:.2em; }
.ht-page a:hover { color:var(--ht-yellow); }
.ht-page :is(button,input,select) { font:inherit; }
.ht-page :is(button,a,input,summary,[tabindex]):focus-visible { outline:3px solid var(--ht-yellow); outline-offset:4px; }
.ht-page :is(h1,h2,[tabindex="-1"]):focus { outline:3px solid var(--ht-yellow); outline-offset:5px; }
.ht-page button { min-height:46px; padding:.65rem 1.1rem; border:1px solid var(--ht-yellow); border-radius:9px; background:var(--ht-yellow); color:#081426; font-weight:700; cursor:pointer; }
.ht-page button:hover { background:#ffe983; }
.ht-page button[aria-disabled="true"] { background:#253952; border-color:#8095ad; color:#c6d2e0; cursor:default; }
.ht-page .ht-secondary { background:transparent; color:#83c9ff; border-color:var(--ht-line); }
.ht-page .ht-site { max-width:1000px; margin:auto; padding:1.3rem 1.5rem; display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.ht-page .ht-brand { font-size:1.1rem; font-weight:750; color:#f2f6ff; text-decoration:none; }
.ht-page .ht-brand span { color:var(--ht-yellow); margin-left:.3rem; }
.ht-page main { max-width:920px; margin:auto; padding:1.5rem 1.5rem 3rem; }
.ht-page h1 { font-size:clamp(2.25rem,6vw,3.5rem); line-height:1.12; letter-spacing:-.04em; margin:0 0 .8rem; }
.ht-page h2 { font-size:1.25rem; line-height:1.3; margin:0 0 .85rem; }
.ht-page p { margin:.7rem 0 1rem; }
.ht-page .ht-hero { display:grid; grid-template-columns:minmax(0,1fr) 260px; align-items:center; gap:1rem; margin-bottom:1.75rem; }
.ht-page .ht-hero p,.ht-page .ht-muted { color:var(--ht-muted); }
.ht-page .ht-hero img { max-width:100%; height:auto; }
.ht-page .ht-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.ht-page .ht-panel,.ht-page .ht-mode { padding:1.5rem; border:1px solid var(--ht-line); border-radius:16px; background:#102440; min-width:0; }
.ht-page .ht-mode { display:flex; flex-direction:column; align-items:flex-start; gap:.7rem; text-align:left; text-decoration:none; color:#f2f6ff; font-weight:400; }
.ht-page .ht-mode:hover { background:#163054; border-color:var(--ht-yellow); }
.ht-page .ht-mode strong { font-size:1.45rem; }
.ht-page .ht-mode>span:not(.ht-option-symbol):not(.ht-option-action) { color:var(--ht-muted); }
.ht-page .ht-option-symbol { display:grid; place-items:center; min-width:48px; height:48px; border:1px solid var(--ht-line); border-radius:12px; color:#83c9ff; font-weight:700; }
.ht-page .ht-option-action { color:var(--ht-yellow); font-weight:700; padding-top:1rem; margin-top:auto; }
.ht-page .ht-panel { display:flex; flex-direction:column; align-items:flex-start; gap:.8rem; }
.ht-page .ht-panel h2,.ht-page .ht-panel p { margin:0; }
.ht-page .ht-panel button { margin-top:auto; }
.ht-page .ht-field { display:flex; flex-direction:column; gap:.4rem; margin-bottom:1.2rem; min-width:0; width:100%; max-width:440px; }
.ht-page .ht-field label { font-weight:650; }
.ht-page input:not([type=radio]):not([type=checkbox]) { width:100%; min-width:0; min-height:46px; padding:.6rem .75rem; background:#081426; color:#f2f6ff; border:1px solid #8095ad; border-radius:7px; }
.ht-page #ht-code { text-transform:uppercase; letter-spacing:.08em; }
.ht-page .ht-invited { color:#83c9ff; }
.ht-page .ht-invite .ht-field { max-width:none; margin:0; }
.ht-page input[type=radio],.ht-page input[type=checkbox] { accent-color:#ffdf58; width:1.15rem; height:1.15rem; flex-shrink:0; margin:0; }
.ht-page .ht-check { display:flex; align-items:center; gap:.7rem; min-height:48px; cursor:pointer; }
.ht-page details { padding:.8rem 0; }
.ht-page summary { cursor:pointer; width:fit-content; padding:.4rem .2rem; min-height:44px; color:#d5e6ff; font-weight:600; }
.ht-page .ht-menu { margin-top:1.5rem; border-top:1px solid var(--ht-line); }
.ht-page .ht-menu>summary { color:#83c9ff; }
.ht-page .ht-menu>details,.ht-page .ht-menu-info>details { border-bottom:1px solid #2c4361; }
.ht-page .ht-menu nav { display:flex; flex-wrap:wrap; gap:.5rem 1.3rem; margin-top:1rem; }
.ht-page .ht-menu nav a { padding:.4rem 0; }
.ht-page .ht-menu-info>button { margin:.75rem .75rem 0 0; }
.ht-page .ht-error { color:#ffd8d4; background:#3e202b; border-left:3px solid #ffab9f; padding:.7rem 1rem; overflow-wrap:anywhere; }
.ht-page .ht-error:empty { padding:0; margin:0; border:0; }
.ht-page .ht-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.ht-page .ht-skip { position:absolute; left:1rem; top:-100px; padding:.75rem; background:#081426; z-index:10; }
.ht-page .ht-skip:focus { top:1rem; }
.ht-page [data-seat="0"] { --ht-seat:#69b8ff; }
.ht-page [data-seat="1"] { --ht-seat:#ffac65; }
.ht-page [data-seat="2"] { --ht-seat:#52d9c5; }
.ht-page [data-seat="3"] { --ht-seat:#c5a0ff; }
.ht-page .ht-seats { padding:0; list-style:none; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.ht-page .ht-seats li { padding:.9rem 1rem; border:1px solid var(--ht-line); border-left:5px solid var(--ht-seat); border-radius:9px; background:#102440; overflow-wrap:anywhere; }
.ht-page .ht-lobby-controls { margin:1.5rem 0 1rem; }
body.ht-page.ht-active .ht-site,body.ht-page.ht-active .ht-hero { display:none; }
body.ht-page.ht-active main { max-width:1100px; padding-top:1.5rem; }
.ht-page .ht-topbar { display:flex; justify-content:space-between; gap:1rem; align-items:center; margin-bottom:1.5rem; }
.ht-page .ht-topbar h1 { font-size:clamp(1.45rem,4vw,2rem); letter-spacing:-.02em; margin:0; overflow-wrap:anywhere; }
.ht-page .ht-table-brand { color:var(--ht-muted); font-weight:700; white-space:nowrap; }
.ht-page fieldset { min-width:0; border:0; margin:0; padding:0; }
.ht-page legend { padding:0; font-size:1.15rem; font-weight:700; margin-bottom:.9rem; }
.ht-page .ht-bid-grid { display:flex; flex-wrap:wrap; gap:.6rem; margin-bottom:1rem; }
.ht-page .ht-bid-choice { min-width:62px; min-height:48px; padding:.65rem .8rem; border:1px solid #8095ad; border-radius:8px; display:flex; align-items:center; gap:.55rem; background:#102440; cursor:pointer; }
.ht-page .ht-bid-choice:has(:checked) { border-color:var(--ht-yellow); box-shadow:inset 0 0 0 1px var(--ht-yellow); }
.ht-page #ht-bid-form { margin-bottom:1.8rem; }
.ht-page .ht-hand-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(96px,1fr)); gap:.65rem; align-items:start; }
.ht-page .ht-card-choice input[type=radio] { position:absolute;top:.6rem;right:.5rem;z-index:1;color-scheme:light; }
.ht-page .ht-card-choice { display:flex; flex-direction:column; align-items:center; gap:.5rem; position:relative; min-width:0; max-width:150px; padding:.2rem; border:2px solid #667e9a; border-radius:10px; background:#102440; cursor:pointer; }
.ht-page .ht-card-choice:has(input:checked) { border-color:var(--ht-yellow); box-shadow:0 0 0 1px var(--ht-yellow); }
.ht-page .ht-card-choice:has(input:focus-visible) { outline:3px solid var(--ht-yellow); outline-offset:3px; }
.ht-page .ht-card-choice:has(input[hidden]) { cursor:default; }
.ht-page .ht-card-choice.ht-unavailable { border-style:dashed; background:#192333; }
.ht-page .ht-unavailable .ht-card-face { background:#c7cdd5; }
.ht-page .ht-card-face { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:space-between; width:100%; min-height:105px; padding:.45rem .35rem; border:1px solid #c7bfae; border-radius:6px; background:#fff7e8; color:#152438; line-height:1.05; }
.ht-page .ht-card-face.ht-suit-H,.ht-page .ht-card-face.ht-suit-D { color:#a52236; }
.ht-page .ht-rank { align-self:flex-start; font:750 1.65rem/1.05 Georgia,serif; }
.ht-page .ht-suit-icon { font:2.7rem/1 Georgia,"Segoe UI Symbol",serif; }
.ht-page .ht-suit-name { font-size:.8rem; font-weight:650; line-height:1.2; }
.ht-page .ht-selected-tag { display:none; min-height:1.1rem; font-size:.75rem; color:var(--ht-yellow); visibility:hidden; }
.ht-page .ht-card-choice:has(input:checked) .ht-selected-tag { visibility:visible; }
.ht-page #ht-legal-note { font-size:.95rem; }
.ht-page #ht-selected { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0; }
.ht-page .ht-contract { color:var(--ht-muted);font-size:.95rem;margin:-.7rem 0 1rem; }
.ht-page :is(h1,h2,[tabindex="-1"]):focus:not(:focus-visible) { outline:none; }
.ht-page .ht-trick { display:flex; flex-wrap:wrap; gap:.8rem; list-style:none; padding:0; margin:0 0 1.3rem; }
.ht-page .ht-trick li { display:flex; flex-direction:column; gap:.5rem; width:128px; padding:.55rem; border:3px solid var(--ht-seat); border-radius:10px; background:#102440; }
.ht-page .ht-trick .ht-card-face { min-height:115px; }
.ht-page .ht-played-name { font-size:.85rem; line-height:1.3; overflow-wrap:anywhere; }
.ht-page table { width:100%; border-collapse:collapse; margin:.6rem 0 1.25rem; table-layout:fixed; }
.ht-page caption { text-align:left; font-weight:700; margin-bottom:.6rem; }
.ht-page th,.ht-page td { padding:.85rem .7rem; border-bottom:1px solid var(--ht-line); text-align:left; overflow-wrap:anywhere; }
.ht-page thead { color:var(--ht-muted); }
.ht-page th[scope=row] { font-weight:600; }
.ht-page .ht-score-table th:last-child,.ht-page .ht-score-table td:last-child { width:85px; text-align:right; font-variant-numeric:tabular-nums; }
.ht-page tr[data-seat] th { border-left:4px solid var(--ht-seat); }
.ht-page .ht-result-message { font-size:1.15rem; }
.ht-page .ht-stats { padding:0; list-style:none; }
.ht-page .ht-stats li { border-left:4px solid var(--ht-seat); padding:.6rem .8rem; margin:.5rem 0; }
.ht-page .ht-history { padding-left:1.6rem; }
.ht-page .ht-history li { margin:.6rem 0; overflow-wrap:anywhere; }
@media (max-width:600px) {
 .ht-page main,body.ht-page.ht-active main { padding:1rem 1rem 2rem; }
 .ht-page .ht-site { padding:1rem; }
 .ht-page .ht-hero { grid-template-columns:1fr; margin-top:.5rem; }
 .ht-page .ht-hero img { display:none; }
 .ht-page .ht-options,.ht-page .ht-seats { grid-template-columns:1fr; }
 .ht-page .ht-panel,.ht-page .ht-mode { padding:1.2rem; }
 .ht-page .ht-table-brand { display:none; }
 .ht-page .ht-hand-grid { grid-template-columns:repeat(auto-fit,minmax(76px,1fr)); gap:.45rem; }
 .ht-page .ht-card-choice { padding:.2rem; }
 .ht-page .ht-card-face { min-height:94px; }
 .ht-page .ht-rank { font-size:1.4rem; }
 .ht-page .ht-suit-icon { font-size:2.2rem; }
 .ht-page .ht-suit-name { font-size:.7rem; }
 .ht-page .ht-trick { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem; }
 .ht-page .ht-trick li { width:auto;max-width:none;padding:.3rem; }
 .ht-page .ht-trick .ht-card-face { min-height:90px; }
 .ht-page th,.ht-page td { padding:.7rem .4rem; }
}
@media (prefers-reduced-motion:reduce) { .ht-page *, .ht-page *::before,.ht-page *::after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }
@media (forced-colors:active) {
 body.ht-page { background:Canvas; color:CanvasText; }
 .ht-page :is(.ht-panel,.ht-mode,.ht-seats li,.ht-card-choice,.ht-trick li,.ht-card-face,.ht-bid-choice,.ht-error) { background:Canvas; color:CanvasText; border-color:CanvasText; box-shadow:none; }
 .ht-page :is(.ht-card-face.ht-suit-H,.ht-card-face.ht-suit-D,.ht-unavailable .ht-card-face) { color:CanvasText; background:Canvas; }
 .ht-page :is(p,summary,legend,.ht-muted,.ht-selected-tag,.ht-option-action,.ht-option-symbol,.ht-hero p,.ht-mode>span,.ht-table-brand) { color:CanvasText!important; }
 .ht-page a { color:LinkText; }
 .ht-page button,.ht-page button[aria-disabled=true],.ht-page .ht-secondary { background:ButtonFace; color:ButtonText; border-color:ButtonText; }
 .ht-page input:not([type=radio]):not([type=checkbox]) { background:Field; color:FieldText; border-color:FieldText; }
 .ht-page :focus-visible,.ht-page [tabindex="-1"]:focus { outline-color:Highlight!important; }
 .ht-page .ht-card-choice:has(input:checked),.ht-page .ht-bid-choice:has(input:checked) { border-color:Highlight; outline:2px solid Highlight; box-shadow:none; }
 .ht-page .ht-unavailable { border-style:dashed; }
 .ht-page :is(tr[data-seat] th,.ht-stats li) { border-color:CanvasText; }
}

.ht-page .ht-card-choice input[type=checkbox] { position:absolute;top:.6rem;right:.5rem;z-index:1;color-scheme:light; }
