/* Shared navigation across the forge and card browser. */
#pop { padding-top:48px; max-height:calc(100dvh - 20px); overflow:auto; }
#pop .previewClose { position:absolute; top:9px; right:12px; min-height:30px; }
#pop .cardLocation { color:#ffbf7b; font-size:12px; font-weight:600; }
#pop .acts { position:sticky; bottom:-14px; background:#211a15; padding:10px 0; border-top:1px solid #785337; }
.line .nm[tabindex] { cursor:pointer; border-radius:3px; }
.line .nm[tabindex]:hover { color:#ffbf7b; text-decoration:underline; text-underline-offset:3px; }
@media(max-width:580px) { #pop.on { flex-direction:column; } #pop .art { width:160px; flex-basis:auto; margin:auto; } }
#workspaceModes { display:grid; grid-template-columns:repeat(3,1fr); gap:4px; padding:12px 12px 4px; flex-shrink:0; }
#workspaceModes button { min-height:40px; color:#c7b7a4; background:#211b16; border-color:#41362c; }
#workspaceModes button[aria-pressed=true] { color:#ffbf7b; border-color:#b57440; background:linear-gradient(#443020,#2d2118); box-shadow:inset 0 -2px #e98a42; }
#deckTabs .toolGroup[hidden], #qaRow[hidden] { display:none; }
#deckTabs .toolGroupLabel { display:none; }
#deckTabs .toolGroup, #deckTabs .toolGroup > div { width:100%; }
#deckTabs .toolGroup button { flex:1; min-height:36px; }
#deckTabs { padding-bottom:8px; }
#deckResize { flex:0 0 8px; cursor:col-resize; touch-action:none; background:#171310; border-inline:1px solid #41362c; position:relative; z-index:3; }
#deckResize::after { content:''; position:absolute; top:45%; left:2px; width:2px; height:42px; border-radius:2px; background:#795033; }
#deckResize:hover, #deckResize:focus-visible, .resizing #deckResize { background:#795033; outline:2px solid #ffbf7b; outline-offset:-2px; }
.resizing { cursor:col-resize; user-select:none; }
@media(min-width:901px) { #buildView > aside { width:var(--deck-panel-width,420px); flex:0 0 var(--deck-panel-width,420px); } }
@media(max-width:900px) { #deckResize { display:none; } }
.homeWrap { padding-top:28px; }
.recentHeading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin:24px 0 12px; }
#recentWrap .recentHeading h3 { margin:0; }
#recentFilter { width:min(260px,100%); }
#recent { max-height:320px; overflow:auto; padding:4px; }
#recent .deckCard[hidden] { display:none; }
.startHeading { margin:28px 0 12px; color:#c7b7a4; font-size:14px; }
.homeWrap .door { min-height:0; padding:20px; }
.homeWrap .door .ic { font-size:24px; margin-bottom:10px; }
header { flex-wrap:wrap; gap:8px 12px; }
.siteNav { display:flex; flex-wrap:wrap; align-items:center; gap:4px; }
.siteNav a, .siteNav button { display:inline-flex; align-items:center; min-height:36px; padding:7px 10px; border:1px solid transparent; border-radius:6px; color:#c7b7a4; background:transparent; text-decoration:none; font:500 13px/1.3 Inter,system-ui,sans-serif; cursor:pointer; }
.siteNav [hidden] { display:none; }
.siteNav a:hover, .siteNav button:hover { color:#f2e8da; background:#332b24; }
.siteNav [aria-current=page] { color:#ffbf7b; border-color:#795033; background:#38291d; }
.siteNav :focus-visible { outline:2px solid #ffbf7b; outline-offset:2px; }
header #steps { display:none; }
header #saved { max-width:240px; }
.playtestSection { border:1px solid #41362c; border-radius:8px; margin-top:16px; padding:12px; background:#211b16; }
.playtestSection > summary { cursor:pointer; color:#ffbf7b; font-weight:600; padding:3px 0; }
.playtestSection[open] > summary { margin-bottom:12px; }
@media(max-width:700px) { header .siteNav { order:10; width:100%; border-top:1px solid #41362c; padding-top:6px; } header h1 { font-size:16px; } header #saved { max-width:190px; } }

/* Workspace reference design: iron structure, restrained ember, card-first contrast. */
header { background:linear-gradient(180deg,#24211d,#191715); border-bottom:1px solid #3b332b; }
.siteNav [aria-current=page] { border-color:transparent; background:#ffffff07; color:#f3d4ad; box-shadow:inset 0 -2px #bd7945; }
.homeWrap { max-width:1160px; padding:48px 32px 36px; }
.hero { text-align:left; max-width:700px; margin:0 0 40px; }
.hero h2 { font:500 clamp(30px,4vw,46px)/1.15 Cinzel,Georgia,serif; letter-spacing:-.035em; color:#eee1ce; margin:12px 0 16px; }
.hero p { font-size:15px; line-height:1.7; max-width:560px; color:#b9ac9a; }
.recentHeading { margin:0 0 16px; }
#recentWrap .recentHeading h3,.startHeading { font:600 14px/1.5 Inter,system-ui,sans-serif; color:#e1d5c3; letter-spacing:0; }
#recentFilter { background:#171512; border-color:#44382b; min-height:38px; font-size:12px; }
#recent { gap:16px; max-height:350px; }
.deckCard { border-color:#4b3c2d; border-radius:10px; box-shadow:0 6px 16px #0003; }
.deckCard:hover { border-color:#a27a50; box-shadow:0 10px 22px #0005; }
.startHeading { margin-top:36px; }
.homeWrap .door,.homeWrap .door.main { background:var(--iron-grain),linear-gradient(150deg,#29231c,#1b1814); border:1px solid #4b3c2d; border-radius:10px; box-shadow:0 4px 16px #0002; padding:24px; text-align:left; }
.homeWrap .door:hover { border-color:#95704d; background:var(--iron-grain),#30271e; }
.homeWrap .door b { font-size:16px; color:#eadfce; }
.homeWrap .door > span:last-child { font-size:12px; line-height:1.7; color:#b9ad9b; }
.homeWrap .door .ic { color:#c49a6b; font-size:24px; margin-bottom:20px; }
.homeWrap .door em { color:#aa9780; font-size:10px; letter-spacing:.06em; }
.minorLinks { gap:10px; margin-top:18px; }
.minorLinks button { background:transparent; border-color:#403529; color:#c4b49e; font-size:12px; }
.dataBar { border-color:#332b22; color:#9d907e; line-height:1.7; }
dialog { border-color:#695038; border-radius:12px; box-shadow:0 24px 80px #0009; }
dialog h3 { color:#ead6b8; letter-spacing:-.02em; }
dialog::backdrop { background:#080705b8; backdrop-filter:blur(4px); }
dialog input,dialog select,dialog textarea { background:#181512; border-color:#493a2b; }
@media(max-width:900px) { #treeArea { min-width:0; } #treeBar { min-width:0; } #treeBar #zoomSlider { display:none; } #minimap { width:120px; height:85px; } }
@media(max-width:700px) { .homeWrap { padding:30px 20px; } .hero { margin-bottom:28px; } .hero h2 { font-size:30px; } .homeWrap .doors { gap:12px; } .homeWrap .door { padding:20px; } #treeBar #treeQ { flex:1 1 120px; min-width:100px; max-width:180px; } }
body:has(#buildView.on) { --surface-base:#1c1b19; --surface-raised:#252320; --surface-hover:#302c26; --border-subtle:#38332d; --border-strong:#615141; --text-secondary:#c2b8aa; --text-muted:#a79b8c; }
body:has(#buildView.on) > header { padding:12px 22px; min-height:64px; background:var(--iron-grain),linear-gradient(180deg,#24211d,#191715); border-bottom:1px solid #3b332b; box-shadow:0 4px 20px #0003; }
body:has(#buildView.on) header h1 { font-size:15px; letter-spacing:.015em; color:#ead8be; text-shadow:none; }
body:has(#buildView.on) header > button, body:has(#buildView.on) header > select { background:#24211d; border-color:#3a332b; }
body:has(#buildView.on) .siteNav [aria-current=page] { border-color:transparent; background:#ffffff07; color:#f3d4ad; box-shadow:inset 0 -2px #bd7945; }
.sectionEyebrow { color:#a79b8c; font:600 10px/1.4 Inter,system-ui,sans-serif; letter-spacing:.12em; text-transform:uppercase; }
#treeArea { background:var(--iron-grain),radial-gradient(ellipse at 45% 100%,#33211655,transparent 65%),#121110; box-shadow:inset 0 0 100px #0003; }
.workbenchHeading { padding:22px 24px 16px; gap:24px; background:transparent; border:0; }
.workbenchTitle h2 { margin-top:5px; color:#e9e1d5; font:600 19px/1.3 Inter,system-ui,sans-serif; letter-spacing:-.025em; }
.workbenchHeading p { color:#a79b8c; font-size:12px; }
.workspaceLegend span { color:#aaa091; }
#treeBar { width:calc(100% - 48px); margin:0 24px 12px; padding:7px; border:1px solid #39322a; border-radius:8px; background:#211e1a; box-shadow:0 4px 12px #0002; flex-wrap:wrap; }
#treeBar #viewToggle { background:#302a23; border-color:transparent; }
#treeBar #treeQ { background:#171512; border-color:#3c342b; max-width:260px; }
#treeBar button { font-size:12px; border-radius:5px; }
#treeGuide { padding:0 24px 12px; background:transparent; border:0; justify-content:flex-start; gap:12px; color:#b0a596; }
#treeGuide button { background:transparent; border-color:#3a3229; font-weight:500; }
.tree { --line:#514235; }
.tree.ltr ul::before,.tree.ttb ul::before { border-color:#514235; }
.tree .node,.tree .node.tag,.tree .node.card { background:var(--iron-grain),linear-gradient(145deg,#25221e,#1d1b18); border:1px solid #443b31; border-radius:10px; box-shadow:0 4px 12px #0003; }
.tree .node.tag { padding:18px 20px; border-left:2px solid color-mix(in srgb,var(--cat,#ac805b) 55%,#39322c); }
.tree .node .kind { text-align:left; font-size:10px; letter-spacing:.035em; color:#bdac95; margin-bottom:9px; }
.tree .node .lbl { text-align:left; font:600 14px/1.4 Inter,system-ui,sans-serif; }
.tree .node .why { text-align:left; font-size:12px; line-height:1.65; margin-top:8px; color:#b4a99a; }
.tree .node:hover { background:var(--iron-grain),#2b2620; border-color:#796047; box-shadow:0 6px 16px #0004; }
.tree .node.tag.open,.tree .node:focus-within { background:var(--iron-grain),#25211c; border-color:#95704d; box-shadow:0 6px 20px #0004; }
.tree .node.root { background:var(--iron-grain),linear-gradient(145deg,#32281f,#201c17); border:1px solid #795a3d; border-top:2px solid #c38a55; box-shadow:0 10px 28px #0004; padding:20px; }
.node .tools button { background:#25211c; border-color:#554535; }
#minimap { opacity:.7; border-color:#4d4033; box-shadow:0 5px 20px #0004; transition:opacity 180ms; }
#minimap:hover,#minimap:focus-within { opacity:1; }
#buildView > aside { background:var(--iron-grain),#1b1916; border-left:0; box-shadow:-8px 0 28px #0002; }
#deckResize { background:#121110; border-inline-color:#302a23; flex-basis:7px; }
#deckTop { padding:22px 22px 18px; gap:12px; background:var(--iron-grain),linear-gradient(150deg,#28231d,#1c1915); border-bottom:1px solid #393127; }
.nameRow #deckName { font-size:18px; font-weight:600; line-height:1.4; color:#f0e7da; border-radius:4px; }
.nameRow #deckName:hover { background:#ffffff05; }
#saveStatus { color:#a4b59c; font-size:11px; }
.countRow { gap:16px; }
.countRow #count { font-size:26px; font-weight:500; letter-spacing:-.04em; }
#count small { font-size:12px; letter-spacing:0; color:#a79b8c; }
#bar { height:3px; opacity:.75; }
#health .hchip { font-size:11px; padding-block:1px; }
.healthDetails summary { font-size:11px; }
#optBtn { min-height:36px; padding:8px 12px; border-color:#59432d; color:#e0bd92; background:#33271c; border-radius:6px; font-size:12px; }
#optBtn:hover { background:#41301f; border-color:#a6794a; }
#workspaceModes { padding:14px 20px 0; gap:0; background:#1b1916; }
#workspaceModes button { min-height:40px; background:transparent; border:0; border-radius:0; color:#a99d8d; font-size:13px; font-weight:500; box-shadow:inset 0 -1px #393127; }
#workspaceModes button[aria-pressed=true] { background:transparent; color:#f1d4ae; border:0; box-shadow:inset 0 -2px #cb9059; }
#workspaceModes button:hover { background:#ffffff04; color:#f0e7da; }
#qaRow { padding:18px 20px 4px; }
#qa { min-height:38px; background:#141310; border-color:#45392c; font-size:12px; }
#deckTabs { padding:12px 20px; border-bottom:1px solid #342d25; }
#deckTabs .toolGroup button { min-height:30px; font-size:12px; border-radius:5px; box-shadow:none; }
#deckTabs button.on { background:#ffffff08; color:#e8ded0; box-shadow:none; }
#deckTabs:has(.toolGroup[aria-label=Playtest]:not([hidden])) { display:none; }
#buildView .pane { padding:18px 20px; background:transparent; }
#deckList h3 { font:600 11px/1.5 Inter,system-ui,sans-serif; letter-spacing:.07em; text-transform:uppercase; color:#b7a48c; margin:24px 0 10px; border:0; }
#deckList h3 span { color:#8e8171; margin-left:6px; }
#deckList .line,#maybeList .line { min-height:36px; font-size:13px; padding:4px 6px; border-bottom:1px solid #ffffff04; }
#deckList .line:hover,#maybeList .line:hover { background:#30281f; }
#buildView .line button { border-color:transparent; background:transparent; color:#c2b09a; }
#buildView .line button:hover { background:#453323; color:#ffe0b7; }
.playtestSection { background:#211d18; border-color:#3f3428; padding:14px; }
.playtestSection > summary { color:#d5c3aa; font-size:13px; }
@media(max-width:1100px) { .workbenchHeading { padding:18px; } #treeBar { margin-inline:16px; width:calc(100% - 32px); } #zoomSlider { width:60px; } }
@media(max-width:700px) { .workbenchTitle h2 { font-size:16px; } .workspaceLegend { display:none!important; } #deckTop { padding:18px; } }
