/* Sixty-Six. Big type, big targets (56px+), high contrast. No animation faster than 3 per second: the only motion
   is a single 0.3s slide when a card is chosen, and none at all with "reduce motion". */
:root{--ink:#14181f;--paper:#f4f6f8;--card:#fff;--line:#c3cad4;--go:#1d6b3a;--goInk:#fff;--accent:#f2c14e;--felt:#0f4d33;--felt2:#0b3a27;--red:#c4161c;--blue:#0b4fb3;--green:#0d7a2c;--black:#111;--err:#a3140f}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:19px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
.skip{position:absolute;left:-999px;top:0;background:#fff;padding:12px}.skip:focus{left:8px;z-index:99}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
:focus-visible{outline:4px solid #1a5fd0;outline-offset:2px}
.screen{max-width:560px;margin:0 auto;padding:10px 14px 40px}
.topnav{display:flex;justify-content:space-between;gap:8px;margin:0 0 6px}
.topnav a,.linkbtn{display:inline-flex;align-items:center;min-height:56px;padding:0 6px;color:#0b3d91;font-weight:700;text-decoration:underline;background:none;border:0;font-size:19px;cursor:pointer}
.brand{display:flex;gap:14px;align-items:center;margin:4px 0 12px}
.brand h1{margin:0;font-size:34px;line-height:1.1}
.brand .tag{margin:4px 0 0;font-size:18px}
.brand-cards{display:flex;flex:0 0 auto}
.mini{display:inline-flex;align-items:center;justify-content:center;width:46px;height:62px;border:2px solid #333;border-radius:8px;background:#fff;font-weight:800;font-size:20px}
.mini+.mini{margin-left:-14px;transform:rotate(8deg)}.mini.s{color:var(--black)}.mini.h{color:var(--red)}
h1{font-size:28px;margin:6px 0 12px}h2{font-size:23px;margin:0 0 8px}
.card{background:#fff;border:2px solid var(--line);border-radius:16px;padding:14px;margin:0 0 14px}
.card.hi{border-color:var(--go);border-width:3px;background:#f0faf3}
.hint{margin:6px 0 10px;font-size:18px;color:#333}
.fine{font-size:17px;color:#333;margin:12px 0}.fine a{color:#0b3d91;font-weight:700}
.center{text-align:center}
.err{color:var(--err);font-weight:700;margin:8px 0 0;min-height:0}.err:empty{display:none}
.ok{color:var(--go);font-weight:700;margin:6px 0 0}.ok:empty{display:none}
input[type=text],input:not([type]){width:100%;min-height:56px;font:20px system-ui,sans-serif;padding:0 14px;border:2px solid #555;border-radius:12px;background:#fff;color:var(--ink)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:8px 18px;font:700 20px/1.2 system-ui,sans-serif;color:var(--ink);background:#e6ebf0;border:2px solid #5b6675;border-radius:14px;cursor:pointer;text-align:center;text-decoration:none}
.btn.go{background:var(--go);border-color:#0e4524;color:var(--goInk)}
.btn.big{min-height:68px;font-size:23px}
.btn.full{width:100%;margin:6px 0}
.btn.plain{background:none;border-color:transparent;text-decoration:underline;color:#0b3d91;font-weight:700}
.btn.sm{min-height:56px;font-size:18px;padding:6px 14px}
.btn.warn{background:#fff3f0;border-color:var(--err);color:var(--err)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.row2{display:flex;gap:10px;flex-wrap:wrap}.row2 .btn{flex:1 1 140px}
fieldset.seg{border:0;padding:0;margin:0 0 10px}
fieldset.seg legend{font-weight:700;margin:0 0 8px;font-size:19px}
.seg{display:flex;flex-wrap:wrap;gap:8px}
.seg label{flex:1 1 0;min-width:84px}
.seg input{position:absolute;opacity:0;width:1px;height:1px}
.seg span{display:flex;align-items:center;justify-content:center;min-height:56px;border:2px solid #5b6675;border-radius:12px;font-weight:700;background:#fff;cursor:pointer;padding:0 8px;text-align:center}
.seg input:checked+span{background:var(--ink);color:#fff;border-color:var(--ink)}
.seg input:focus-visible+span{outline:4px solid #1a5fd0;outline-offset:2px}
details.card summary{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:800;font-size:22px;cursor:pointer;list-style:none}
details.card summary::-webkit-details-marker{display:none}
details.card summary::after{content:"Change \25BE";font-size:17px;color:#0b3d91;text-decoration:underline;white-space:nowrap}
details.card[open] summary::after{content:"Close \25B4"}
details.card summary small{font-weight:400;font-size:16px;color:#333;flex:1}
.settings .set{margin:0 0 12px}
.settings label{display:block;font-weight:700;margin:0 0 4px}
.settings select{width:100%;min-height:56px;font:19px system-ui,sans-serif;padding:0 10px;border:2px solid #555;border-radius:12px;background:#fff;color:var(--ink)}
.settings .ro{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #ddd;font-size:18px}.settings .ro b{text-align:right}
.switch{display:flex;align-items:center;gap:12px;min-height:56px;font-weight:600;cursor:pointer}
.switch input{width:30px;height:30px;flex:0 0 auto}
.link{word-break:break-all;background:#fff;border:2px dashed #888;border-radius:10px;padding:10px;font-size:16px}
.seatrow{display:flex;align-items:center;gap:10px;min-height:64px;padding:8px 0;border-bottom:1px solid #ddd;flex-wrap:wrap}
.seatrow .who{flex:1 1 160px;font-weight:700}
.seatrow .who small{display:block;font-weight:400;font-size:16px;color:#333}
.team-h{margin:12px 0 0;font-size:19px;padding:6px 10px;border-radius:8px}
.team-h.t0{background:#e3f1ff}.team-h.t1{background:#fde7e0}
.conn{position:fixed;top:0;left:0;right:0;z-index:50;background:#3d4654;color:#fff;text-align:center;padding:12px;font-weight:700}
/* ---------- table ---------- */
body.at-table{background:var(--felt2)}
.tablescr{max-width:620px;padding:6px 8px 12px;color:#fff;min-height:100vh}
.score{display:grid;grid-template-columns:1fr 1.3fr 1fr auto;gap:6px;align-items:stretch}
.sc{background:#fff;color:var(--ink);border-radius:12px;padding:4px 8px;text-align:center;display:flex;flex-direction:column;justify-content:center;min-height:56px}
.sc .lab{font-size:15px;font-weight:700}.sc b{font-size:26px;line-height:1}
.sc.us{border:4px solid #3b8ee8}.sc.them{border:4px solid #e0603f}
.sc.mid{font-size:15px;font-weight:700;gap:2px}
.trump{font-size:18px;font-weight:800}
.suit{font-weight:900}
.menu{min-height:56px;min-width:64px;font:700 17px system-ui,sans-serif;border-radius:12px;border:2px solid #fff;background:#123;color:#fff;cursor:pointer}
.handpts{display:flex;justify-content:space-between;gap:8px;font-size:17px;font-weight:700;margin:6px 2px 2px}
.felt{display:grid;grid-template-columns:1fr 222px 1fr;grid-template-areas:". n ." "w t e" ". s .";gap:4px;align-items:center;background:var(--felt);border-radius:18px;padding:6px;margin:4px 0}
.pos2{grid-area:n}.pos1{grid-area:w}.pos3{grid-area:e}.pos0{grid-area:s}.trick{grid-area:t}
.seat{background:rgba(0,0,0,.35);border:3px solid transparent;border-radius:12px;padding:4px 6px;text-align:center;font-size:16px;line-height:1.25;min-height:48px;display:flex;flex-direction:column;justify-content:center;word-break:break-word}
.seat b{font-size:17px}
.seat .tm{font-size:14px;font-weight:700}
.seat.t-us .tm{color:#9cd0ff}.seat.t-them .tm{color:#ffb4a2}
.seat.turn{border-color:var(--accent);background:rgba(242,193,78,.25)}
.seat .turnTxt{color:var(--accent);font-weight:800;font-size:15px}
.seat .off{color:#ffb0a0;font-weight:700;font-size:14px}
.trick{position:relative;width:222px;height:206px;justify-self:center}
.trick .tc{position:absolute}
.trick .tc.p2{top:0;left:80px}.trick .tc.p0{bottom:0;left:80px}.trick .tc.p1{top:58px;left:0}.trick .tc.p3{top:58px;right:0}
.trick .tc .pc{width:62px;height:88px}
.trick .tc.win .pc{outline:5px solid var(--accent);outline-offset:1px}
.trick .face-up{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);text-align:center;font-size:13px;font-weight:700}
.pc{display:flex;flex-direction:column;justify-content:space-between;background:var(--card);color:var(--black);border:2px solid #222;border-radius:10px;padding:3px 5px;font-weight:800;line-height:1;user-select:none;position:relative}
.pc .r{font-size:24px;letter-spacing:-1px}.pc .s{font-size:30px;align-self:center}.pc .r2{font-size:15px;align-self:flex-end}
.pc.h,.pc.d{color:var(--red)}
/* opt-in four-color deck: whole face tinted, white index and pips */
.four .pc.s{background:#3A3A3A;border-color:#3A3A3A}.four .pc.c{background:#1F5FBF;border-color:#1F5FBF}.four .pc.h{background:#C8102E;border-color:#C8102E}.four .pc.d{background:#1E8A3C;border-color:#1E8A3C}
.four .pc.s,.four .pc.c,.four .pc.h,.four .pc.d{color:#fff}
.status{min-height:30px;margin:6px 2px;font-size:20px;font-weight:800;text-align:center}
.status .you{color:var(--accent)}
.tablescr{position:relative}
.banner{background:var(--accent);color:#14181f;border-radius:12px;padding:10px 12px;font-weight:800;font-size:20px;text-align:center;position:absolute;left:6px;right:6px;top:6px;z-index:5;margin:0;box-shadow:0 4px 12px rgba(0,0,0,.35)}
.actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;min-height:0}
.actions .btn{flex:1 1 150px;min-height:60px}
.actions .suitbtn{flex:1 1 70px;font-size:30px;background:#fff}
.hand{display:grid;grid-template-columns:repeat(var(--cols,3),1fr);gap:8px;margin:8px 0 6px}
.hand .pc{width:100%;height:auto;aspect-ratio:5/6.4;max-height:136px;cursor:pointer;padding:6px 8px;border-width:3px;font:inherit;font-weight:800;line-height:1;text-align:left}
.hand .pc .r{font-size:34px}.hand .pc .s{font-size:44px}.hand .pc .r2{font-size:20px}
.hand .pc.no{opacity:1;filter:none;background:#e2e6e4;border-style:dashed;border-color:#5b6675}
.hand .pc.sel{outline:6px solid var(--accent);outline-offset:2px;transform:translateY(-8px);transition:transform .3s}
.hand .pc.trumpc::after{content:"trump";position:absolute;left:0;right:0;bottom:-2px;text-align:center;font-size:12px;font-weight:700;color:#555;background:#e3f4e8;border-radius:0 0 8px 8px}
.tablefoot{display:flex;gap:8px;justify-content:space-between;margin-top:8px}
.tablefoot .btn{flex:1;background:#123;color:#fff;border-color:#fff}
.overlay{position:fixed;inset:0;z-index:40;background:rgba(0,0,0,.6);display:flex;align-items:flex-end;justify-content:center;padding:10px}
.overlay[hidden]{display:none}
.sheet{background:#fff;color:var(--ink);border-radius:18px;padding:16px;width:100%;max-width:520px;max-height:92vh;overflow:auto}
.sheet h2{font-size:26px}
.sheet table{width:100%;border-collapse:collapse;font-size:18px;margin:8px 0}
.sheet td,.sheet th{padding:6px;border-bottom:1px solid #ddd;text-align:left}.sheet td.n{text-align:right;font-weight:800}
.big-score{display:flex;justify-content:space-around;font-size:22px;font-weight:800;margin:10px 0}
.big-score .us{color:#0b5bb5}.big-score .them{color:#b03a1e}
.cardrow{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.cardrow .pc{width:62px;height:88px}
.howto h3{font-size:20px;margin:14px 0 4px}.howto p,.howto li{font-size:18px}
@media (max-width:359px){
  body{font-size:18px}
  .felt{grid-template-columns:1fr 180px 1fr}
  .trick{width:180px;height:186px}
  .trick .tc .pc{width:54px;height:78px}.trick .tc.p2,.trick .tc.p0{left:63px}.trick .tc.p1,.trick .tc.p3{top:54px}
  .pc .r{font-size:20px}.pc .s{font-size:24px}
  .seat{font-size:14px}.seat b{font-size:15px}
  .hand .pc .r{font-size:28px}.hand .pc .s{font-size:36px}
  .sc b{font-size:22px}.sc .lab,.sc.mid{font-size:13px}.trump{font-size:15px}.menu{min-width:56px;font-size:15px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.handpts{flex-wrap:wrap}.handpts .marline{flex-basis:100%;text-align:center;color:var(--accent)}
[hidden]{display:none!important}
.felt{grid-template-columns:1fr 200px 1fr;gap:6px 4px}
.trick{width:200px;height:196px}
.trick .tc.p2,.trick .tc.p0{left:69px}.trick .tc.p1{top:54px;left:0}.trick .tc.p3{top:54px;right:0}
.seat{overflow-wrap:normal;word-break:normal;hyphens:none;font-size:15px}
.seat.pos1 b,.seat.pos3 b{font-size:15px}
.seat.pos0,.seat.pos2{min-height:44px;padding:4px 8px}
.seat .line{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:2px 8px}
.hand .pc{max-height:118px}
.status{font-size:19px;margin:4px 2px}
.actions .hint{font-size:17px!important}
@media (max-width:359px){.felt{grid-template-columns:1fr 172px 1fr}.trick{width:172px;height:180px}.trick .tc.p2,.trick .tc.p0{left:59px}.trick .tc.p1,.trick .tc.p3{top:51px}.seat.pos1 b,.seat.pos3 b{font-size:14px}.seat{font-size:13px}}
.felt{grid-template-columns:minmax(0,1fr) 200px minmax(0,1fr)}
.seat.pos1,.seat.pos3{padding:4px 3px;min-width:0}
@media (max-width:359px){.felt{grid-template-columns:minmax(0,1fr) 172px minmax(0,1fr)}.seat.pos1 b,.seat.pos3 b{font-size:13px}.seat.pos1 .tm,.seat.pos3 .tm{font-size:12px}}
@media (max-height:700px){
  .seat.pos0{display:none}
  .felt{grid-template-areas:". n ." "w t e"}
  .trick{height:172px}.trick .tc .pc{width:54px;height:76px}.trick .tc.p1,.trick .tc.p3{top:48px}
  .hand .pc{max-height:78px}.hand .pc .r{font-size:26px}.hand .pc .s{font-size:26px}
  .hand .pc{padding:3px 6px}.hand .pc .si{font-size:20px}.hand .pc .r2{display:none}.hand .pc .s{align-self:flex-end;margin-top:-4px}
  .handpts{font-size:15px;margin:2px}
}

/* standard corner index: rank with the suit under it */
.pc .ix{display:flex;flex-direction:column;align-items:center;align-self:flex-start;line-height:.92}
.pc .si{font-size:18px}.hand .pc .si{font-size:28px}
.trick .tc .pc .s,.cardrow .pc .s{font-size:26px}
@media (max-width:359px){.pc .si{font-size:16px}.hand .pc .si{font-size:24px}}
@media (max-height:700px){.hand .pc .si{font-size:20px}}
.hand .pc.no{background:#e2e6e4}
.four .hand .pc.no{background:#e2e6e4;border-style:dashed;border-color:#5b6675;box-shadow:none;filter:none}.four .hand .pc.no.s{color:#3a3a3a}.four .hand .pc.no.c{color:#0b4fb3}.four .hand .pc.no.h{color:#a3140f}.four .hand .pc.no.d{color:#0e6b30}
.banner .marwhat{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;background:none;border:0;color:#0b3d91;font:inherit;font-size:18px;font-weight:800;text-decoration:underline;cursor:pointer}
.fine a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px}
/* the top-left index carries rank + suit; the small bottom index is dropped so nothing spills off the card */
.pc .r2{display:none!important}
@media (max-width:380px){.seat.pos1 b,.seat.pos3 b{font-size:14px}.seat.pos1,.seat.pos3{padding:4px 2px}}
.banner[hidden]{display:none}
@media (max-height:700px){.banner{font-size:18px;padding:8px 10px}}
@media (min-width:700px) and (max-height:860px){.hand .pc{max-height:100px}}
