/* Forge look: hard edges and cut corners everywhere ("kiki", not "bouba").
   Loaded last on every page. Only real-world round things stay round: Magic card frames and mana symbols. */

*, *::before, *::after { border-radius:0 !important; }

/* Magic cards keep their printed corner */
.cmdr, .mini, .rec, .optCard .img, #preview, .flyer,
#pop .art img, .node.root img, .node.card img, .hand img, .pHead img, .gCmdr img, .readyHero img.cmd,
.mini img, .rec img, .cmdr img, .optCard .img img { border-radius:4.75% / 3.5% !important; }

/* mana symbols, colour pips, tiny status dots and spinners stay circular */
.ms, .pip, .spark, .gBuilding .spin, .line .own, .mini.owned::before, .rec.owned::before { border-radius:50% !important; }

/* the cut: one sharp corner clipped off */
:root { --cut-sm:6px; --cut:10px; --cut-lg:16px; }
button.primary, .primary, .door, .deckCard, .pvItem, dialog, .menu, #pop, .kpi {
  clip-path:polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
dialog, #pop, .door { clip-path:polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, var(--cut-lg) 100%, 0 calc(100% - var(--cut-lg))); }

/* small round badges and icon buttons become cut tabs */
.mini .add, .rec .add, .rec .plus, .deckCard .tmenu, button.round, .node .tools button, .pNum, .warn .ic,
.mini.in::after, .optCard.sel::after {
  clip-path:polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

/* pills → flat stamped labels */
.chip, .tag, .badge, .pill { letter-spacing:.04em; }

/* inputs and plain buttons: square, crisp border, no soft glow */
input, select, textarea, button { box-shadow:none; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline:2px solid var(--gold-hi, #ffc27a); outline-offset:1px; }

/* ---------- calmer screens ---------- */
/* header: the "More" menu holds import, collection, sleepers, experience level and help */
#moreWrap { position:relative; }
#moreWrap > .menu { display:none; position:absolute; right:0; top:calc(100% + 6px); z-index:60; min-width:230px; flex-direction:column; gap:2px; padding:8px; }
#moreWrap.open > .menu { display:flex; }
#moreMenu > button, #moreMenu > a { display:flex; gap:8px; align-items:center; justify-content:flex-start; width:100%; text-align:left; background:none; border:0; padding:8px 10px; color:var(--cream, #fbefe4); text-decoration:none; font-size:14px; }
#moreMenu > button:hover, #moreMenu > a:hover { background:rgba(255,138,61,.1); }
#moreMenu .moreLbl { margin:8px 10px 4px; font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--muted, #968474); }
#moreMenu #modeSlot { padding:0 8px 6px; }
#moreMenu .modeSwitch { display:flex !important; }
#moreMenu .modeSwitch button { flex:1; }
/* the new-deck step strip only matters while making a new deck */
body:has(#buildView.on) #steps { display:none !important; }
/* workbench: the Path view's trail says where you are, so drop the extra heading */
#treeArea.pathMode .workbenchHeading { display:none !important; }
#treeArea.pathMode #pathView { padding-top:58px; }
/* deck list: Maybe / Remove appear on the row you point at */
aside .line > button { opacity:0; transition:opacity .12s; }
aside .line:hover > button, aside .line:focus-within > button { opacity:1; }
@media (hover:none) { aside .line > button { opacity:1; } }
/* deck health chips repeat the Path view's "Deck needs" line, so hide them while it's on screen */
body:has(#treeArea.pathMode):has(#buildView[data-workspace-mode=Build]) #health .healthMetrics,
body:has(#treeArea.pathMode):not(:has(#buildView[data-workspace-mode])) #health .healthMetrics { display:none; }

/* ---------- cards at 55% of real size (63mm → ~35mm ≈ 132px), name printed under each ---------- */
:root { --card-w:132px; }
.pvGrid, .grid { grid-template-columns:repeat(auto-fill, var(--card-w)) !important; gap:16px 14px !important; justify-content:start; }
.grid { max-width:calc(var(--card-w) * 4 + 14px * 3); }
.cardCell { width:var(--card-w); display:flex; flex-direction:column; gap:6px; min-width:0; }
.cardCell .mini { width:100%; }
.cname { font-size:13px; line-height:1.25; font-weight:600; color:var(--cream, #fbefe4); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; letter-spacing:.01em; }
.cardCell:has(.mini.in) .cname { color:var(--good, #58d68d); }
.optGrid { grid-template-columns:repeat(auto-fill, var(--card-w)) !important; justify-content:start; }

/* Path view: the view switch sits in normal flow here, so no room needs reserving above the trail */
#treeArea.pathMode #pathView { padding-top:10px !important; }
#treeArea.pathMode #treeBar { background:none; border:0; box-shadow:none; width:auto; align-self:flex-start; padding:6px 0 0; margin-left:clamp(10px,2vw,24px); }

/* card size control (S/M/L) next to the view switch */
#sizeSeg { display:flex; align-items:center; gap:0; margin-left:14px; }
#sizeSeg span { font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--muted, #968474); margin-right:8px; }
#sizeSeg button { min-width:30px; padding:4px 8px; }
#treeArea.pathMode #treeBar > #sizeSeg { display:flex !important; }
#treeArea:not(.pathMode) #sizeSeg { display:none; }
.cname { font-size:clamp(13px, calc(var(--card-w) * .075), 16px); }

/* format picker on the new-deck screen */
#fmtPick { display:flex; flex-wrap:wrap; gap:8px; align-items:stretch; margin:0 0 14px; }
#fmtPick .fmtLbl { align-self:center; font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:var(--muted, #968474); margin-right:6px; }
#fmtPick button { display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:8px 14px; font-weight:700; font-size:14px; text-align:left;
  clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
#fmtPick button small { font-weight:400; font-size:11px; color:var(--cream-dim, #c9b5a2); letter-spacing:.02em; }
#fmtPick button.on { background:rgba(255,138,61,.16); border-color:var(--gold, #ff8a3d); color:var(--gold-hi, #ffc27a); }

/* Table view: sit below the view switch instead of being pinned under where a floating toolbar used to be */
#treeArea.tableMode .workbenchHeading { display:none !important; }
#treeArea.tableMode #treeBar { background:none; border:0; box-shadow:none; width:auto; align-self:flex-start; padding:6px 0 0; margin-left:clamp(10px,2vw,24px); }
#treeArea.tableMode #tableView { position:static !important; inset:auto !important; flex:1; min-height:0; margin:8px clamp(10px,2vw,24px) 12px; }
#treeArea.tableMode #treeWrap, #treeArea.tableMode #minimap, #treeArea.tableMode #focusBanner, #treeArea.tableMode #treeGuide { display:none !important; }

/* quiz: named colour combinations (guilds, shards, clans, four, five) */
.gComboHead { display:flex; gap:10px; align-items:baseline; margin:22px 0 8px; }
.gComboHead b { font-size:13px; text-transform:uppercase; letter-spacing:.1em; color:var(--gold-hi, #ffc27a); }
.gComboHead span { font-size:12px; color:var(--muted, #968474); }
.gCombos { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:8px; }
.gCombo { display:flex; align-items:center; gap:10px; padding:8px 12px; text-align:left; font-size:14px; background:rgba(255,255,255,.03); border:1px solid rgba(255,138,61,.2);
  clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.gCombo:hover { border-color:rgba(255,138,61,.55); }
.gCombo.on { background:rgba(255,138,61,.16); border-color:var(--gold, #ff8a3d); color:var(--gold-hi, #ffc27a); }
.gCombo .pips { display:flex; gap:2px; flex:none; }
.gCombo .pip { width:18px; height:18px; font-size:10px; cursor:inherit; }

/* ---------- guided ready screen: game plan, key interactions, cards by job ---------- */
.readyPlan { margin:10px 0 12px; padding:12px 14px; background:rgba(255,138,61,.07); border-left:3px solid var(--gold, #ff8a3d);
  clip-path:polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.readyPlan .lbl { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:var(--gold-hi, #ffc27a); margin-bottom:4px; }
.readyPlan p { margin:0; font-size:15px; line-height:1.55; color:var(--cream, #fbefe4); max-width:72ch; }
.readyInter { margin:22px 0 4px; }
.readyInter h3, .jobs .job h4 { font-size:13px; text-transform:uppercase; letter-spacing:.1em; color:var(--gold-hi, #ffc27a); margin:0 0 8px; }
.readyInter ul { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:6px 18px; }
.readyInter li { font-size:14px; padding:6px 0 6px 12px; border-left:2px solid rgba(255,138,61,.35); color:var(--cream-dim, #c9b5a2); }
.readyInter li b { color:var(--cream, #fbefe4); }
.readyInter li.verified { border-left-color:var(--good, #58d68d); } .readyInter li.feasible { border-left-color:var(--gold, #ff8a3d); }
.readyInter .hint { margin-top:8px; }
.jobs { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:22px 26px; margin-top:22px; }
.jobs .job h4 small { color:var(--muted, #968474); font-weight:400; letter-spacing:0; margin-left:6px; }
.jobRow { display:flex; gap:10px; align-items:center; padding:5px 0; border-bottom:1px solid rgba(255,138,61,.08); }
.jobRow img, .jobRow .noimg { width:42px; flex:none; aspect-ratio:488/680; border-radius:4.75% / 3.5%; object-fit:cover; background:#0b0b0b; }
.jobRow b { display:block; font-size:14px; font-weight:600; color:var(--cream, #fbefe4); }
.jobRow .why { display:block; font-size:12.5px; color:var(--cream-dim, #c9b5a2); line-height:1.35; }
.jobRow .src { font-style:normal; font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted, #968474); margin-left:6px; }
.jobRow.basics .noimg { background:linear-gradient(135deg, #2a2420, #15110e); }
.readyNotes { margin-top:24px; }
.jobs .job h4 small span { color:var(--muted, #968474); text-transform:none; }

/* ---------- ready screen: next steps ---------- */
.nextSteps { margin:22px 0 4px; }
.nextSteps h3 { font-size:13px; text-transform:uppercase; letter-spacing:.1em; color:var(--gold-hi, #ffc27a); margin:0 0 8px; }
.nextSteps ol { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:8px; }
.nextSteps li { display:contents; }
.nsBtn { display:flex; gap:10px; align-items:center; width:100%; text-align:left; padding:10px 12px; background:rgba(255,255,255,.03); border:1px solid rgba(255,138,61,.22);
  clip-path:polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.nsBtn:hover, .nsBtn[aria-expanded="true"] { border-color:var(--gold, #ff8a3d); background:rgba(255,138,61,.09); }
.nsBtn .nsNum { flex:none; width:22px; height:22px; display:grid; place-items:center; font-weight:700; font-size:12px; color:#1a0d05; background:var(--gold-hi, #ffc27a);
  clip-path:polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%); }
.nsBtn > i { font-size:20px; color:var(--gold-hi, #ffc27a); flex:none; }
.nsBtn b { display:block; font-size:14px; color:var(--cream, #fbefe4); } .nsBtn span span { display:block; font-size:12px; color:var(--cream-dim, #c9b5a2); }
.nsPanel { grid-column:1 / -1; padding:12px 14px; background:rgba(10,6,3,.5); border-left:3px solid var(--gold, #ff8a3d); }
.nsPanel p { margin:6px 0; }
.nsPanel .ok { color:var(--good, #58d68d); } .nsPanel .mid { color:var(--gold-hi, #ffc27a); } .nsPanel .bad { color:var(--bad, #ff6b5e); }
.nsHand { display:flex; gap:8px; flex-wrap:wrap; }
.nsHand img, .nsHand .noimg { width:110px; aspect-ratio:488/680; border-radius:4.75% / 3.5%; object-fit:cover; background:#0b0b0b; font-size:11px; padding:4px; }
.nsActs { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.nsAlts { display:grid; gap:6px; }
.nsAlt { display:flex; gap:10px; align-items:center; }
.nsAlt img { width:44px; aspect-ratio:488/680; border-radius:4.75% / 3.5%; object-fit:cover; }
.nsAlt > div { flex:1; } .nsAlt b { display:block; font-size:14px; } .nsAlt span { font-size:12px; color:var(--cream-dim, #c9b5a2); }

/* ---------- "Start a new deck" chooser ---------- */
#newDlg { max-width:680px; }
.newChoices { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:14px 0; }
.newChoice { display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:16px; text-align:left; min-height:150px;
  clip-path:polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
.newChoice i { font-size:26px; color:var(--gold-hi, #ffc27a); }
.newChoice b { font-size:17px; color:var(--cream, #fbefe4); } .newChoice span { font-size:13px; color:var(--cream-dim, #c9b5a2); line-height:1.4; }
.newChoice.main { border-color:var(--gold, #ff8a3d); background:rgba(255,138,61,.1); }
.newChoice:hover { border-color:var(--gold-hi, #ffc27a); }
.newMinor { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
@media (max-width:600px) { .newChoices { grid-template-columns:1fr; } }

/* ---------- Advice: Improve this deck walkthrough ---------- */
.impStart { display:flex; gap:14px; align-items:center; justify-content:space-between; margin:6px 0 16px; padding:12px 14px; background:rgba(255,138,61,.08);
  border:1px solid rgba(255,138,61,.35); clip-path:polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); }
.impStart b { display:block; font-size:15px; color:var(--cream, #fbefe4); } .impStart span { font-size:13px; color:var(--cream-dim, #c9b5a2); }
.impStart button { flex:none; }
.impCard { margin:6px 0 18px; padding:14px 16px; background:rgba(10,6,3,.55); border:1px solid rgba(255,138,61,.35); border-left:3px solid var(--gold, #ff8a3d);
  clip-path:polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); }
.impCard.optional { border-left-color:var(--muted, #968474); } .impCard.done { border-left-color:var(--good, #58d68d); }
.impHead { display:flex; gap:10px; align-items:baseline; }
.impHead h3 { margin:0; font-size:17px; color:var(--cream, #fbefe4); }
.impStep { font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:var(--gold-hi, #ffc27a); }
.impWhy { margin:8px 0 10px; font-size:14px; line-height:1.5; color:var(--cream-dim, #c9b5a2); max-width:75ch; }
.impRows { display:grid; gap:4px; }
.impRow { display:flex; gap:8px; align-items:center; padding:5px 4px; border-bottom:1px solid rgba(255,138,61,.08); cursor:pointer; }
.impRow img, .impRow .noimg { width:38px; aspect-ratio:488/680; border-radius:4.75% / 3.5%; object-fit:cover; background:#0b0b0b; flex:none; }
.impRow .arrow { color:var(--gold, #ff8a3d); font-weight:700; }
.impSwap { display:flex; flex-direction:column; min-width:0; } .impSwap b { font-size:14px; color:var(--cream, #fbefe4); font-weight:600; } .impSwap span { font-size:12px; color:var(--cream-dim, #c9b5a2); }
.impActs { display:flex; gap:8px; align-items:center; margin-top:12px; flex-wrap:wrap; }
.impLog { margin:8px 0; padding-left:18px; font-size:13px; color:var(--cream-dim, #c9b5a2); } .impLog li { margin:3px 0; }
.hiddenWarn { display:flex; gap:10px; align-items:center; justify-content:space-between; margin:8px 0 4px; font-size:13px; color:var(--muted, #968474); }
.warn.hidden-warn { opacity:.55; }
.warn .unhide { margin-top:6px; font-size:12px; padding:2px 10px; }

/* ---------- holiday: string lights under the header, snow over the page (holiday.js) ---------- */
header .xmasLights { position:absolute; left:0; right:0; top:100%; height:48px; margin-top:-4px; pointer-events:none; z-index:30; overflow:visible; }
header .xmasLights svg { display:block; overflow:visible; }
.xmasLights .bulb { filter:drop-shadow(0 0 3px var(--c)) drop-shadow(0 0 7px var(--c)); animation:xmasTwinkle 2.4s ease-in-out infinite; animation-delay:var(--d); }
.xmasLights.still .bulb { animation:none; }
@keyframes xmasTwinkle { 0%, 100% { opacity:1; } 45% { opacity:.45; filter:drop-shadow(0 0 1px var(--c)); } 55% { opacity:.55; } }
.xmasSnow { position:fixed; inset:0; width:100vw; height:100vh; pointer-events:none; z-index:45; }

/* ---------- card details: click to open (no hover pop-ups); ⓘ where a click already picks the card ---------- */
.cardClick { cursor:pointer; }
.cardInfo { position:absolute; top:5px; right:5px; z-index:4; width:24px; height:24px; padding:0; display:grid; place-items:center; font-size:15px; line-height:1;
  color:var(--gold-hi, #ffc27a); background:rgba(10,6,3,.88); border:1px solid var(--gold-dk, #9c4a1a); opacity:.9; box-shadow:none; }
.cardInfo:hover, .cardInfo:focus-visible { opacity:1; border-color:var(--gold-hi, #ffc27a); }
.qaRow > .cardInfo { top:50%; transform:translateY(-50%); right:8px; }
.optRow .nm > .cardInfo, .impRow > .cardInfo { position:static; display:inline-grid; margin-left:6px; vertical-align:middle; }
