/* Task structure takes precedence over decorative containers. */
.inlineHand { margin:20px 0 32px; }
.inlineHand #handSummary { padding:0 0 14px; }
.inlineHand .handTable { border-radius:6px; overflow:visible; }
.inlineHand #handSpread { display:flex; flex-wrap:wrap; justify-content:center; gap:32px 20px; min-width:0; min-height:0; width:100%; box-sizing:border-box; padding:44px 32px 48px; }
.inlineHand .spreadCard { flex:1 1 130px; width:auto; min-width:0; max-width:220px; }
.inlineHand .spreadCard > span { overflow-wrap:anywhere; }
@media(max-width:700px) {
  .inlineHand #handSpread { gap:28px 16px; padding:32px 20px 36px; }
  .inlineHand .spreadCard { flex-basis:100px; max-width:180px; transform:none; }
}
.inlineHand > .hint { margin-top:12px; }
.handObservation { max-width:680px; padding:0 0 20px; margin:-12px 0 24px; color:#c8b69c; font-size:14px; line-height:1.7; }
.handObservation > span { display:block; color:#efcea0; font-size:11px; text-transform:uppercase; letter-spacing:.08em; margin-bottom:5px; }
@media(max-width:700px) {
  #buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop { display:flex; align-items:center; gap:12px; padding:12px 20px; }
  #buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop .nameRow { flex:1; min-width:0; grid-template-columns:minmax(0,1fr) auto auto auto; }
  #buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop .nameRow #deckName { grid-column:1 / -1; font-size:14px; }
  #buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop .countRow { min-width:0; }
  #buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #workspaceModes { padding-top:6px; }
  #buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #testPanel { padding:12px 20px 32px; }
}
.emptyPlaymat,.tableHand { display:block; width:100%; margin:22px 0 32px; padding:28px 24px 20px; border:0; border-radius:8px; background:var(--iron-grain),radial-gradient(ellipse at 50% 100%,#51341b55,transparent 75%),#161410; box-shadow:inset 0 1px #ffffff05,inset 0 -1px #6b4a2a55; color:#d7c4a9; }
.emptyPlaymat:hover,.tableHand:hover { background:var(--iron-grain),radial-gradient(ellipse at 50% 100%,#70451f55,transparent 75%),#1b1712; }
.emptyPlaymat strong,.emptyPlaymat > span:last-child { display:block; margin-top:14px; }
.emptyPlaymat strong { font:500 22px Cinzel,Georgia,serif; color:#efdab7; }
.emptyPlaymat > span:last-child { font-size:13px; color:#b6a58e; }
.cardSilhouettes { display:flex; justify-content:center; padding:14px 0; }
.cardSilhouettes i { display:block; width:64px; height:90px; margin-left:-12px; border:1px solid #725538; border-radius:5px; background:repeating-linear-gradient(45deg,#251e16,#251e16 5px,#2c2319 5px,#2c2319 6px); transform:rotate(var(--card-angle)); box-shadow:0 4px 10px #0006; }
.tableCards { display:flex; justify-content:center; gap:8px; padding:20px 8px; }
.tableCards > span { display:block; width:min(12%,120px); flex-shrink:0; transform:rotate(var(--card-angle)); animation:hand-deal 500ms ease-out var(--deal-delay) backwards; }
.tableCards img { display:block; width:100%; aspect-ratio:488/680; border-radius:5px; box-shadow:0 5px 12px #0009; }
.handCaption { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:16px; font-size:12px; }
.handCaption > span { color:#c69864; }
.openingStory { padding:8px 0 24px; }
.openingStory h3 { font:600 21px/1.4 Inter,system-ui,sans-serif; color:#ecdfcc; margin:0 0 12px; letter-spacing:-.025em; }
.openingTakeaway { font-size:15px; line-height:1.7; max-width:680px; color:#c4b69f; }
.openingTakeaway strong { color:#f3c98f; }
.turnJourney { list-style:none; display:flex; gap:24px; padding:24px 0; margin:0; overflow-x:auto; }
.turnJourney li { flex:1 0 95px; text-align:center; }
.turnLabel { display:block; color:#d7c4a7; margin-bottom:12px; font-size:13px; }
.landMoment { position:relative; width:80px; height:90px; margin:auto auto 18px; overflow:hidden; border-radius:4px; box-shadow:0 6px 15px #0006; background:#33281d; }
.landMoment img { width:100%; height:155px; object-fit:cover; object-position:top; }
.landNumber { position:absolute; bottom:0; left:0; right:0; padding:5px; background:linear-gradient(transparent,#100c08); color:#fff0d6; font-size:22px; }
.turnChance { height:4px; background:#3a3025; margin-bottom:10px; border-radius:2px; overflow:hidden; }
.turnChance span { display:block; height:100%; background:linear-gradient(90deg,#936239,#e6b675); }
.turnJourney strong { font-size:16px; color:#f1d6b0; }
.turnMeaning { display:block; font-size:11px; color:#ac9b83; margin-top:5px; }
.commanderMoment { display:flex; align-items:center; gap:24px; padding:28px 0; border-block:1px solid #43392d; }
.commanderMoment > img { width:110px; border-radius:6px; box-shadow:0 7px 18px #0006; }
.commanderMoment h3 { font-size:18px; margin:7px 0; }
.commanderMoment p { max-width:560px; color:#c4b69f; line-height:1.7; }
@media(max-width:600px) { .tableCards { justify-content:flex-start; overflow-x:auto; padding:18px 8px; } .tableCards > span { width:85px; } .commanderMoment { gap:16px; } .commanderMoment > img { width:80px; } .emptyPlaymat,.tableHand { padding-inline:12px; } }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop #health,#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop #optBtn { display:none; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop .nameRow { grid-template-columns:minmax(0,1fr) auto auto auto auto; align-items:center; gap:8px; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop .nameRow #deckName { grid-column:1; font-size:15px; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop .countRow { min-width:120px; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop .countRow #count { font-size:19px; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop .countRow #bar { display:none; }
:root { --product-rule:#43392d; --product-muted:#b5a792; }
.homeWrap { max-width:1120px; }
.homeWrap .hero { margin-bottom:28px; }
.homeWrap .hero h2 { font:600 30px/1.2 Inter,system-ui,sans-serif; letter-spacing:-.035em; margin:8px 0; }
.homeWrap .hero p { font-size:13px; }
#recent { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; max-height:440px; padding:0; }
#recent .deckCard { display:flex; align-items:center; min-height:86px; height:auto; padding:12px 72px 12px 82px; border:0; border-bottom:1px solid var(--product-rule); border-radius:0; background:transparent; box-shadow:none; text-align:left; }
#recent .deckCard::after,#recent .deckCard::before { display:none; }
#recent .deckCard > img { position:absolute; inset:12px auto 12px 0; width:64px; height:62px; object-fit:cover; opacity:1; filter:none; border-radius:4px; }
#recent .deckCard .t { position:static; padding:0; background:none; min-width:0; }
#recent .deckCard .t b { font-size:13px; line-height:1.4; }
#recent .deckCard .t span { display:block; margin-top:4px; font-size:11px; color:var(--product-muted); }
#recent .deckCard .pill { top:auto; bottom:16px; right:8px; background:transparent; border:0; color:var(--product-muted); font-size:11px; }
#recent .deckCard:hover { background:#ffffff05; transform:none; }
.homeWrap .doors { display:flex; flex-direction:column; gap:0; }
.homeWrap .door,.homeWrap .door.main { display:grid; grid-template-columns:32px minmax(160px,220px) 1fr; align-items:center; gap:16px; padding:18px 8px; border:0; border-bottom:1px solid var(--product-rule); border-radius:0; background:transparent; box-shadow:none; min-height:0; }
.homeWrap .door:hover { background:#ffffff05; transform:none; }
.homeWrap .door .ic { margin:0; font-size:20px; }
.homeWrap .door em { display:none; }
.homeWrap .door b { font-size:14px; }
.homeWrap .door > span:last-child { font-size:12px; }
.playtoolNav { display:flex; gap:24px; border-bottom:1px solid var(--product-rule); margin-bottom:28px; }
.playtoolNav button { background:transparent; border:0; border-radius:0; padding:12px 0; color:var(--product-muted); box-shadow:none; }
.playtoolNav button[aria-pressed=true] { color:#f3dfbf; box-shadow:inset 0 -2px #c18a53; }
[data-playpanel][hidden] { display:none; }
.handMetrics { display:flex; flex-wrap:wrap; gap:36px; padding:28px 0; margin-top:24px; border-block:1px solid var(--product-rule); }
.handMetrics div { display:flex; flex-direction:column; gap:6px; }
.handMetrics b { font-size:28px; font-weight:500; color:#f0dfc5; }
.handMetrics span { font-size:12px; color:var(--product-muted); }
.oddsDetails { margin-top:20px; }
.oddsDetails summary { cursor:pointer; font-size:12px; color:var(--product-muted); padding:8px 0; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) > #treeArea,#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) > #deckResize { display:none; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) > aside { width:100%; flex:1 1 auto; max-height:none; border:0; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop { display:grid; grid-template-columns:minmax(220px,1fr) auto; gap:10px 32px; padding:18px 28px; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop > .sectionEyebrow { display:none; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #health { grid-column:1; }
#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #optBtn { grid-column:2; grid-row:2; margin:0; }

#buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #testPanel { width:100%; max-width:none; min-width:0; box-sizing:border-box; margin:0; padding:20px 28px 40px; }
#buildView .kpi { background:transparent; border:0; border-left:1px solid var(--product-rule); border-radius:0; box-shadow:none; }
#buildView .combo,#buildView .cut,#buildView .verRow,#buildView .upRow { background:transparent; border:0; border-bottom:1px solid var(--product-rule); border-radius:0; box-shadow:none; }
body:has(#grid) .grid { display:block; }
body:has(#grid) .s { display:grid; grid-template-columns:180px 1fr; border:0; border-bottom:1px solid var(--product-rule); border-radius:0; background:transparent; padding:20px 0; gap:24px; }
body:has(#grid) .s .body { padding:0; }
body:has(#grid) .s .art { height:140px; border-radius:4px; overflow:hidden; }
body:has(#grid) .tabs button { border:0; border-radius:0; background:transparent; color:var(--product-muted); }
body:has(#grid) .tabs button.on { color:#f3dfbf; box-shadow:inset 0 -2px #c18a53; }
body:has(#grid) .bt div { border:0; border-right:1px solid var(--product-rule); background:transparent; border-radius:0; }
#filters,#deckhead,#stats,#synergyBox { border-radius:0; box-shadow:none; }
@media(max-width:700px) { #recent { grid-template-columns:1fr; } .homeWrap .door,.homeWrap .door.main { grid-template-columns:28px 1fr; gap:8px 12px; } .homeWrap .door > span:last-child { grid-column:2; } #buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #deckTop { grid-template-columns:1fr; } #buildView:is([data-workspace-mode=Playtest],[data-workspace-mode=Analyze]) #optBtn { grid-column:1; grid-row:auto; } body:has(#grid) .s { grid-template-columns:100px 1fr; gap:16px; } .handMetrics { gap:24px; } }

/* Workspace tabs stay above both the builder and the dedicated tool screens. */
#buildView.view.on { display:grid; grid-template-columns:minmax(0,1fr) 8px var(--deck-panel-width,420px); grid-template-rows:auto minmax(0,1fr); }
#buildView > #workspaceModes { grid-column:1 / -1; max-width:none; display:flex; padding:0 28px; gap:28px; border-bottom:1px solid var(--product-rule); }
#buildView > #workspaceModes button { flex:0 0 auto; padding:14px 4px; min-width:72px; box-shadow:none; }
#buildView > #workspaceModes button[aria-selected=true] { box-shadow:inset 0 -2px #cb9059; }
#buildView > #treeArea { grid-column:1; min-width:0; }
#buildView > #deckResize { grid-column:2; }
#buildView > aside { grid-column:3; width:100%; min-height:0; }
#buildView:is([data-workspace-mode=Analyze],[data-workspace-mode=Playtest]) > aside { grid-column:1 / -1; }
#buildView[data-workspace-mode=Analyze] #deckTabs { padding:16px 28px 8px; }
#buildView[data-workspace-mode=Analyze] #deckTabs .toolGroup > div { justify-content:flex-start; gap:24px; }
#buildView[data-workspace-mode=Analyze] #deckTabs .toolGroup button { flex:0 0 auto; padding:8px 0; }
#buildView[data-workspace-mode=Analyze] .pane { padding:20px 28px 40px; }
@media(max-width:900px) {
  #buildView.view.on { grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(240px,1fr) minmax(240px,1fr); }
  #buildView > aside { grid-column:1; max-height:none; }
  #buildView:is([data-workspace-mode=Analyze],[data-workspace-mode=Playtest]).view.on { grid-template-rows:auto minmax(0,1fr); }
}

