.bridge-room{--bridge-ink:#394b47;--bridge-muted:#626c65;--bridge-line:#ccd4c7;width:min(100%,1160px);margin-inline:auto;text-align:left;color:var(--bridge-ink);font-variant-numeric:tabular-nums}
.game-shell .play .bridge-room .session-banner{max-width:none;margin:0 0 24px;text-align:left}
.game-shell .play .bridge-room .session-banner>:is(h2,.meta){max-width:none;margin-inline:0;text-align:left}
.game-shell .play .bridge-room p{max-width:none;text-align:left;margin-inline:0;line-height:1.7;color:var(--bridge-muted)}
.bridge-room .button{min-height:46px;font-size:.92rem;white-space:normal;line-height:1.5}
.bridge-room button:focus-visible{outline:3px solid #70928b;outline-offset:3px}
.game-shell .play .bridge-room .actions{justify-content:flex-start;margin:18px 0 0;gap:10px}
.bridge-room textarea{width:100%;resize:vertical;min-height:100px;font:inherit;line-height:1.6}
.bridge-room label{display:grid;gap:10px;font-size:.92rem}
.bridge-conditions{max-width:900px!important;font-size:1rem}
.bridge-illustration{position:relative;width:min(100%,580px);height:240px;margin:25px 0 18px;overflow:hidden;background:linear-gradient(transparent 98%,#cbd1c1 98%);isolation:isolate}
.bridge-cup{position:absolute;top:96px;width:22%;height:135px;background:repeating-linear-gradient(90deg,#f5eed9 0 7px,#e8dfc1 8px 9px);clip-path:polygon(0 0,100% 0,85% 100%,15% 100%);filter:drop-shadow(0 5px 3px #727d6d33)}
.bridge-cup.left{left:6%}.bridge-cup.right{right:6%}
.bridge-deck{position:absolute;left:4%;right:4%;top:84px;height:17px;background:repeating-linear-gradient(90deg,#d4e6db 0 19px,#b4cfc0 20px 21px);border-top:2px solid #8ba79b;box-shadow:0 5px 0 #a4b7a7;transform:perspective(600px) rotateX(18deg)}
.bridge-loads{position:absolute;inset:0;pointer-events:none}
.bridge-loads i{position:absolute;left:calc(35% + mod(var(--bridge-i),5)*6%);top:calc(69px - round(down,var(--bridge-i)/5)*19px);width:25px;height:15px;background:linear-gradient(#e0c58f,#bd9b65);border:1px solid #a78d5f;border-radius:4px;box-shadow:0 2px 0 #8d795944;animation:bridge-placed .18s ease-out}
.bridge-load-point{position:absolute;left:48%;top:9px;font-size:2rem;color:#698579}
.bridge-build-desk,.bridge-testing-desk,.bridge-confirm-desk{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(300px,1fr);gap:clamp(25px,5vw,70px);align-items:center}
.bridge-build-desk .exp-clock{font-size:4rem}
.bridge-order,.bridge-waiting{font-size:.95rem}
.bridge-count{display:block;font-size:clamp(3.7rem,7vw,6rem);font-weight:650;line-height:1.2;color:#42645a;overflow-wrap:anywhere}
.game-shell .play .bridge-room .bridge-count-label{font-size:.95rem;margin:0}
.game-shell .play .bridge-room [data-bridge-next]{font-size:1.1rem;color:#4c655b;margin:13px 0}
.game-shell .play .bridge-room :is(.bridge-count-help,.bridge-undo-help,.bridge-manual){font-size:.9rem}
.bridge-testing-desk .actions{align-items:stretch}
.bridge-testing-desk .actions .cta{width:100%;text-align:left}
.bridge-ending-options{border-top:1px solid var(--bridge-line);margin-top:27px;padding-top:17px}
.bridge-ending-options h3{font-size:1rem;font-weight:600;margin:0}
.bridge-score-table{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;margin-top:30px}
.bridge-score-table>section{border-top:2px solid #a5b8ab;padding-top:13px;min-width:0}
.bridge-score-table h3{font-size:1.15rem;font-weight:650;margin:0 0 17px}
.bridge-two-rounds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.bridge-two-rounds>div{display:flex;flex-direction:column;gap:10px}
.bridge-two-rounds span{font-size:.87rem;color:#616c62}
.bridge-two-rounds strong{font-size:1.6rem;color:#4f6b5e;font-weight:600;overflow-wrap:anywhere}
.bridge-two-rounds small{font-size:.88rem;line-height:1.5;color:#7b8171}
.bridge-score-table [data-bridge-best]{font-size:2.1rem;color:#3f6757;margin-left:12px}
.bridge-archive{margin-top:33px;border-top:1px solid var(--bridge-line)}
.bridge-archive>h3{font-size:1rem;margin:21px 0}
.bridge-archive article{display:grid;grid-template-columns:minmax(140px,.65fr) 80px minmax(0,1.6fr);gap:8px 20px;border-top:1px solid #dce0d4;padding:16px 0;align-items:baseline}
.bridge-archive h4{font-size:.95rem;margin:0;font-weight:600}
.bridge-archive article>strong{font-size:1.5rem;color:#4c695b;overflow-wrap:anywhere}
.game-shell .play .bridge-room .bridge-archive p{font-size:.9rem;margin:0}
.bridge-archive [data-bridge-failed-item],.bridge-record-note{grid-column:3}
.bridge-bounded{border-left:3px solid #bca66b;padding-left:16px}
@keyframes bridge-placed{from{transform:translateY(-7px);opacity:.3}to{transform:translateY(0);opacity:1}}
@media(max-width:800px){.bridge-build-desk,.bridge-testing-desk,.bridge-confirm-desk{grid-template-columns:minmax(0,1fr);gap:16px}.bridge-illustration{height:215px}.bridge-cup{height:110px}.bridge-score-table{gap:20px}.bridge-two-rounds{grid-template-columns:1fr}.bridge-archive article{grid-template-columns:minmax(0,1fr) 100px}.bridge-archive article>p{grid-column:1/-1}.bridge-room .button{font-size:.9rem}}
@media(max-width:400px){.bridge-score-table{gap:17px}.bridge-two-rounds strong{font-size:1.35rem}.bridge-illustration{height:195px}.bridge-cup{height:90px}.bridge-room .button{font-size:.9rem}.bridge-room label{font-size:.9rem}.bridge-count{font-size:3.5rem}.bridge-archive article{grid-template-columns:minmax(0,1fr) 90px}}
@media(prefers-reduced-motion:reduce){.bridge-loads i{animation:none}}


.game-shell.theme-bridge {
  --bridge-ink:#152b43;
  --bridge-muted:#45596b;
  --bridge-line:#adb7ba;
  --bridge-action:#ff903f;
}
.page-game .game-shell.theme-bridge:has(.bridge-room) {
  background:radial-gradient(ellipse at 24% 30%,#fffaf1 5%,transparent 70%),#f8eddd;
  color:var(--bridge-ink);
}
.page-game .game-shell.theme-bridge:has(.bridge-room) .game-toolbar {
  color:var(--bridge-ink); background:#fbf3e6eb; border-color:#b2b6b3; backdrop-filter:blur(12px);
}
.game-shell.theme-bridge:has(.bridge-room) .game-toolbar .button {
  color:var(--bridge-ink); background:#fff8ec; border-color:#6d7b86;
}
.game-shell .play .bridge-room {
  --bridge-ink:#152b43; --bridge-muted:#45596b; --bridge-line:#adb7ba;
  width:min(100%,79rem);
}
.page-game .game-shell .play .bridge-room .session-banner h2 {
  color:var(--bridge-ink); font-size:clamp(1.55rem,3.65vw,3.25rem); line-height:1.1; text-wrap:balance;
}
.game-shell .play .bridge-room .session-banner .meta { color:var(--bridge-muted) }
.bridge-build-desk,.bridge-testing-desk,.bridge-confirm-desk { gap:clamp(.75rem,3.25vw,3.1rem) }
.bridge-build-desk>*,.bridge-testing-desk>* { min-width:0 }
.bridge-illustration {
  width:min(100%,44rem); height:clamp(12rem,27vw,22rem); margin:.5rem 0 .85rem;
  background:none; overflow:visible;
}
.bridge-illustration::before {
  content:""; position:absolute; left:50%; top:5%; height:69%;
  border-inline-start:3px dotted #b9551e; z-index:-1;
}
.bridge-bench {
  position:absolute; inset:auto 2% 4%; height:28%; border:5px solid #394c62; border-radius:.85rem;
  background:repeating-linear-gradient(2deg,#9f6e3b23 0 1px,transparent 2px 5px,#ffecba50 7px 9px,transparent 11px 16px),
    linear-gradient(150deg,#f7d7a7,#cf965c 58%,#edc291);
  transform:perspective(330px) rotateX(25deg);
  box-shadow:0 .26rem 0 #213548,0 .7rem .95rem -.4rem #46322e84;
}
.bridge-cup {
  top:49%; width:24%; height:37%; clip-path:none; background:none;
  filter:drop-shadow(2px 4px 3px #2637456e);
}
.bridge-cup.left { left:12% }
.bridge-cup.right { right:12% }
.bridge-cup::before {
  content:""; position:absolute; inset:0; clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);
  background:repeating-linear-gradient(0deg,#031b3c30 0 1px,#fff1 1px 2px,transparent 2px 5px),
    linear-gradient(90deg,#0d3e8a,#1e64c8 23%,#6aa7f5 44%,#1e64c8 67%,#0d3e8a);
}
.bridge-cup::after {
  content:""; position:absolute; inset:auto 0 -3% 0; height:10%; border-radius:50%;
  border-bottom:3px solid #fff6d9; background:#1d4b8b;
}
.bridge-deck {
  top:42%; left:9%; right:9%; height:8%; border:0; border-bottom:2px solid #bc9758;
  transform:none; border-radius:.1rem; box-shadow:0 3px 3px #594a2e65;
  background:repeating-linear-gradient(113deg,#fff6dc 0 5px,#e6d2a4 6px 10px,#b89354 11px 12px,#f9ebc9 13px 17px);
}
.bridge-loads {
  inset:auto 22% 58% 22%; display:grid; grid-template-columns:repeat(12,minmax(0,1fr));
  grid-template-rows:repeat(5,clamp(7px,1vw,15px)); gap:2px;
}
.bridge-loads i {
  position:static; width:100%; height:100%; border:1px solid #a16b21; border-radius:42%;
  background:radial-gradient(ellipse at 50% 36%,#5e431d 0 17%,transparent 20%),
    linear-gradient(#f8dc83,#bc852d 65%,#9a6223);
  box-shadow:inset 0 1px #fff1ad,0 1px 2px #60402270;
}
.bridge-counter {
  border:2px solid var(--bridge-ink); border-radius:.65rem; padding:clamp(.6rem,1.6vw,1.25rem);
  background:#fff9ed;
}
.bridge-counter .bridge-count { color:var(--bridge-ink); font-weight:820; line-height:1.05 }
.game-shell .play .bridge-room .bridge-counter [data-bridge-next] { color:var(--bridge-ink); font-weight:720; margin:.35rem 0 0 }
.game-shell .play .bridge-room .actions { flex-wrap:wrap; gap:.5rem }
.page-game .game-shell.theme-bridge .play .bridge-room .button.cta {
  background:var(--bridge-action); border-color:#c65322; color:#252b2c; font-weight:800;
}
.page-game .game-shell.theme-bridge .play .bridge-room .button.cta:enabled:hover { background:#ffa66b }
.page-game .game-shell.theme-bridge .play .bridge-room .button.cta:disabled {
  background:#eee4d4; border-color:#a89481; color:#4b514e; opacity:1;
}
.game-shell .play .bridge-room .button.secondary { color:var(--bridge-ink); background:#fff8ec; border-color:#798993 }
.game-shell .play .bridge-room button:focus-visible { outline-color:#225eaa }
.bridge-score-table :is([data-bridge-best],.bridge-two-rounds strong) { color:var(--bridge-ink) }
@media(max-width:800px){
  .bridge-ending-options { margin-top:1rem; padding-top:.65rem }
  .game-shell .play .bridge-room .actions { margin-top:.65rem }
}
