/* The dungeon hub keeps the active journey and its next action together. */
.dungeon-hub{max-width:1220px;margin:0 auto;padding:28px clamp(18px,3vw,42px) 20px;color:var(--text);font-size:14px}
.dungeon-hub h1,.dungeon-hub h2,.dungeon-hub h3,.dungeon-hub p{margin:0}
.dungeon-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:24px}
.dungeon-heading h1{font:500 clamp(27px,3vw,38px)/1.2 'Cinzel',Georgia,serif;letter-spacing:-.025em}
.dungeon-heading p{margin-top:8px;font-size:13px;color:var(--muted);line-height:1.6}
.dungeon-hub .text-btn{min-height:40px;font-size:12px;white-space:nowrap}
.dungeon-hub .btn{min-height:46px;padding:12px 22px;display:inline-flex;align-items:center;justify-content:center;gap:24px;font-size:13px;letter-spacing:0;white-space:nowrap;border-radius:8px}
.dungeon-hub button:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
.dungeon-kicker{display:flex;align-items:center;gap:9px;font-size:10px;font-weight:600;letter-spacing:.14em;color:var(--gold);line-height:1.5}
.dungeon-kicker>span{color:var(--muted);letter-spacing:.03em}
.dungeon-kicker i{height:6px;width:6px;background:#a8d6bc;border-radius:50%;box-shadow:0 0 10px #a8d6bc55}
.dungeon-active{border:1px solid #e8c77745;border-radius:16px;background:radial-gradient(ellipse at 90% 0,#68512830,transparent 62%),linear-gradient(115deg,#251d31,#181321);padding:26px 30px;box-shadow:0 12px 40px #0002}
.dungeon-active-top{display:flex;align-items:center;justify-content:space-between;gap:28px}
.dungeon-run-heading h2{font:500 clamp(25px,3vw,36px)/1.2 'Cinzel',Georgia,serif;margin:12px 0 8px}
.dungeon-run-heading p{font-size:14px;color:#d4cbdc;line-height:1.5}
.dungeon-stop{display:block;margin-top:8px;font-size:12px;color:var(--muted)}
.dungeon-progress-ring{width:116px;height:116px;position:relative;flex-shrink:0}
.dungeon-progress-ring svg{width:100%;height:100%;transform:rotate(-90deg);fill:none;stroke-width:5}
.ring-track{stroke:#e8c77715}.ring-fill{stroke:var(--gold);stroke-linecap:round}
.dungeon-progress-ring>div{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column}
.dungeon-progress-ring strong{font-size:31px;font-weight:500;line-height:1.2;font-variant-numeric:tabular-nums}.dungeon-progress-ring strong small{font-size:15px;margin-left:2px;color:var(--gold)}
.dungeon-progress-ring>div>span{font-size:10px;color:var(--muted);margin-top:3px}
.dungeon-milestones{list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:24px 0;padding:0}
.dungeon-milestones li{display:grid;grid-template-columns:auto 1fr;gap:8px;color:#93879f;align-content:start}
.milestone-line{grid-column:1/-1;height:4px;border-radius:4px;background:#ffffff10;overflow:hidden;margin-bottom:3px}.milestone-line>span{display:block;height:100%;background:#9dcbb5}
.dungeon-milestones .current .milestone-line{background:#e8c77735}.dungeon-milestones .current .milestone-line>span{background:var(--gold)}
.milestone-number{font-size:10px;line-height:1.5}.dungeon-milestones strong{font-size:11px;font-weight:500;line-height:1.5}
.dungeon-milestones .done{color:#a8cdb9}.dungeon-milestones .current{color:var(--gold)}
.dungeon-run-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0;padding:18px 0;border-block:1px solid #ffffff0e;gap:18px}
.dungeon-run-stats dt{font-size:11px;color:var(--muted);line-height:1.4}.dungeon-run-stats dd{margin:8px 0 0;font-size:23px;line-height:1;font-weight:500;font-variant-numeric:tabular-nums}
.dungeon-run-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:20px}.dungeon-run-bottom>div{display:grid;gap:6px}
.dungeon-auto-note{font-size:12px;color:#c4b9cf}.dungeon-auto-note.available{color:#a8d6bc}.dungeon-run-bottom small{font-size:11px;color:var(--muted);line-height:1.5}
.dungeon-setup [hidden]{display:none!important}.dungeon-setup.has-active-run{margin-top:18px;border:1px solid #ffffff12;border-radius:12px;background:#17121e66}
.dungeon-setup-toggle{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:18px 22px;font:inherit;color:var(--text);background:none;border:0}
.dungeon-setup-toggle>span{font-size:14px;font-weight:500}.dungeon-setup-toggle small{font-size:12px;color:var(--muted)}.dungeon-setup-toggle b{margin-left:auto;font-size:22px;font-weight:400;color:var(--gold)}
.has-active-run #new-run-settings{padding:0 22px 20px}.has-active-run .dungeon-setup-grid{padding-top:4px}
.dungeon-setup-grid{display:grid;grid-template-columns:minmax(210px,.7fr) minmax(0,1.7fr);gap:20px;align-items:start}
.dungeon-chapters{display:grid;gap:12px}
.dungeon-chapter{display:flex;align-items:center;gap:14px;padding:18px 16px;min-height:114px;text-align:left;border:1px solid #ffffff16;border-radius:12px;background:#1a1523;color:var(--text);font:inherit;transition:border-color .18s,background .18s}
.dungeon-chapter img{width:46px;height:65px;object-fit:cover;object-position:top;flex-shrink:0;border-radius:6px;background:#30263d}
.dungeon-chapter>span{flex:1;min-width:0;display:grid;gap:7px}.dungeon-chapter small{font-size:9px;letter-spacing:.12em;color:var(--muted)}.dungeon-chapter strong{font-size:14px;line-height:1.3;font-weight:500}.dungeon-chapter em{font-size:10px;font-style:normal;line-height:1.5;color:var(--muted)}.dungeon-chapter>b{font-size:16px;font-weight:400;color:var(--gold)}
.dungeon-chapter svg,.dungeon-difficulties svg{width:14px;height:14px;flex-shrink:0}
.dungeon-chapter.selected{border-color:#e8c77775;box-shadow:inset 3px 0 var(--gold);background:linear-gradient(110deg,#352b36,#201a2b)}
.dungeon-chapter.selected small{color:var(--gold)}.dungeon-chapter:disabled{opacity:.48;cursor:not-allowed}.dungeon-chapter:disabled img{filter:grayscale(1)}.dungeon-chapter:not(:disabled):hover{border-color:var(--gold);background-color:#2b2237}
.dungeon-launch{position:relative;isolation:isolate;overflow:hidden;padding:24px;border:1px solid #e8c77735;background:linear-gradient(130deg,#292032,#17121f);border-radius:14px}
.dungeon-landscape{position:absolute;z-index:-1;right:-20px;top:0;width:75%;height:190px;stroke:var(--gold);stroke-width:1.5;opacity:.1;pointer-events:none}
.dungeon-launch-intro{padding-bottom:16px;max-width:440px}.dungeon-launch-intro h2{font:500 clamp(24px,2.8vw,32px)/1.25 'Cinzel',Georgia,serif;margin:8px 0 0}.dungeon-launch-intro p{font-size:13px;line-height:1.6;color:#c2b7ce}
.dungeon-difficulties{border:0;padding:0;margin:0}.dungeon-difficulties legend{padding:0;margin:0 0 12px;font-size:12px;width:100%;display:flex;justify-content:space-between;gap:10px}.dungeon-difficulties legend span{color:var(--muted);font-size:10px}
.dungeon-difficulties>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.dungeon-difficulties button{display:flex;align-items:center;justify-content:center;gap:4px;min-height:42px;border:1px solid #ffffff18;background:#110e1a70;border-radius:6px;padding:8px 4px;color:#c4b8d0;font:500 10px 'DM Sans',sans-serif}
.dungeon-difficulties button[aria-pressed=true]{color:var(--gold);background:#e8c77712;border-color:#e8c77799}.dungeon-difficulties button:disabled{opacity:.4;cursor:not-allowed}.dungeon-difficulties .cleared>span{color:#a8d6bc}
.dungeon-reward-preview{margin-top:16px;padding:14px 0;border-block:1px solid #ffffff12}.dungeon-reward-preview>span{display:block;font-size:10px;letter-spacing:.04em;color:var(--muted);margin-bottom:10px}.dungeon-reward-preview>div{display:flex;gap:clamp(16px,3vw,40px);flex-wrap:wrap}.dungeon-reward-preview b{font-size:18px;color:var(--gold);font-weight:500;font-variant-numeric:tabular-nums}.dungeon-reward-preview small{display:block;margin-top:5px;font-size:10px;font-weight:400;color:var(--muted)}
.dungeon-launch-bottom{display:flex;flex-wrap:wrap;gap:14px;align-items:center;justify-content:space-between;margin-top:16px}.dungeon-launch-bottom p{font-size:11px;line-height:1.6;color:var(--muted);flex:1;min-width:150px}
.dungeon-save-note{text-align:center!important;color:var(--muted);font-size:11px;line-height:1.6;margin:18px 0 0!important}
.dungeon-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;border-top:1px solid #ffffff0e;padding-top:12px;font-size:11px;color:var(--muted)}.dungeon-footer>div{display:flex;gap:18px;flex-wrap:wrap}
.dungeon-starters{margin-bottom:16px;padding:16px;border:1px solid #ffffff16;border-radius:12px;background:#191321}.dungeon-starters h3{font-family:inherit;font-size:14px}.dungeon-starters p{font-size:12px;line-height:1.6;color:var(--muted);margin-top:6px}.dungeon-starter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.dungeon-starter{display:flex;align-items:center;gap:12px;text-align:left;padding:12px;border:1px solid #ffffff16;background:#201927;border-radius:8px;font:inherit;color:var(--text)}.dungeon-starter img{width:35px;height:51px;object-fit:contain}.dungeon-starter>span{flex:1;min-width:0}.dungeon-starter strong{display:block;font-size:12px;font-weight:500;line-height:1.5}.dungeon-starter small{display:block;font-size:10px;color:var(--muted);margin-top:4px;line-height:1.4}.dungeon-starter>b{font-size:12px;color:var(--gold)}.dungeon-starter.selected{border-color:var(--gold);background:#e8c77710}
@media(min-width:1450px){.dungeon-hub{padding-top:36px}.dungeon-active{padding:30px 36px}.dungeon-active-top{min-height:132px}.dungeon-milestones{margin:30px 0}.dungeon-run-stats{padding:22px 0}.dungeon-launch{padding:32px}}
@media(max-width:1050px){.dungeon-setup-grid{grid-template-columns:1fr}.dungeon-chapters{grid-template-columns:repeat(2,minmax(0,1fr))}.dungeon-chapter{min-height:96px;padding:14px}.dungeon-launch-intro{padding-bottom:22px}.dungeon-launch-bottom{flex-wrap:nowrap}}
@media(max-width:650px){.dungeon-hub{padding:20px 16px}.dungeon-heading{align-items:start;gap:10px;margin-bottom:20px}.dungeon-heading p{font-size:12px;max-width:230px}.dungeon-heading>.text-btn{font-size:10px;min-height:32px}.dungeon-heading h1{font-size:25px}.dungeon-active{padding:20px 18px}.dungeon-active-top{gap:12px}.dungeon-run-heading h2{font-size:25px}.dungeon-kicker{font-size:9px;flex-wrap:wrap;gap:5px}.dungeon-progress-ring{width:85px;height:85px}.dungeon-progress-ring strong{font-size:25px}.dungeon-run-heading p{font-size:12px}.dungeon-milestones{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px;margin:20px 0}.dungeon-run-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.dungeon-run-stats dd{font-size:22px}.dungeon-run-bottom{flex-direction:column;align-items:stretch;gap:16px}.dungeon-run-bottom .btn{width:100%}.dungeon-setup-toggle{padding:16px;font-size:13px;gap:8px}.dungeon-setup-toggle small{display:none}.has-active-run #new-run-settings{padding:0 12px 16px}.dungeon-chapters{gap:8px}.dungeon-chapter{padding:12px;gap:10px;flex-wrap:wrap}.dungeon-chapter>span{flex-basis:100%}.dungeon-chapter img{width:30px;height:38px}.dungeon-chapter>b,.dungeon-chapter>svg{position:absolute;right:12px;top:20px}.dungeon-chapter{position:relative}.dungeon-chapter strong{font-size:13px}.dungeon-launch{padding:20px 16px}.dungeon-launch-intro h2{font-size:25px}.dungeon-difficulties>div{grid-template-columns:repeat(3,minmax(0,1fr))}.dungeon-difficulties button{font-size:11px;min-height:44px}.dungeon-launch-bottom{flex-direction:column;align-items:stretch}.dungeon-launch-bottom p{min-width:0}.dungeon-footer{flex-direction:column;align-items:start;gap:4px}.dungeon-footer>div{gap:10px}.dungeon-footer .text-btn{font-size:10px}.dungeon-starter-grid{grid-template-columns:1fr}.dungeon-starter img{width:36px;height:52px}.dungeon-starter strong{font-size:13px}}
@media(prefers-reduced-motion:reduce){.dungeon-hub *{transition:none!important;animation:none!important}}

.dungeon-launch-bottom {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
}
.dungeon-launch-bottom p { min-width: 0; margin: 0; }
.dungeon-clear-times {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 0;
  padding: 0;
  border: 1px solid #e8c77726;
  border-radius: 8px;
  background: #14101b66;
}
.dungeon-clear-times > div { min-width: 96px; padding: 8px 11px; }
.dungeon-clear-times > div + div { border-left: 1px solid #ffffff12; }
.dungeon-clear-times dt { color: var(--muted); font-size: 11px; line-height: 1.4; }
.dungeon-clear-times dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dungeon-clear-times > div:first-child dd { color: var(--gold); }
.dungeon-clear-times[data-empty] dd { color: var(--muted); }
.dungeon-clear-times[data-recent-empty] > div:last-child dd { color: var(--muted); }
@media (max-width: 740px) {
  .dungeon-launch-bottom { grid-template-columns: minmax(0,1fr) auto; }
  .dungeon-launch-bottom > .btn { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .dungeon-launch-bottom { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .dungeon-clear-times > div { min-width: 0; padding: 8px 6px; }
  .dungeon-clear-times dt { font-size: 10px; }
  .dungeon-clear-times dd { font-size: 13px; }
}

/* Chapter-specific sixth difficulty and five-act progress. */
.dungeon-milestones:has(li:nth-child(5)){grid-template-columns:repeat(5,minmax(0,1fr))}
.dungeon-difficulties>div:has(button:nth-child(6)){grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:650px){.dungeon-milestones:has(li:nth-child(5)){gap:7px}.dungeon-milestones:has(li:nth-child(5)) strong{font-size:9px;overflow-wrap:anywhere}}
.dungeon-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}
.dungeon-heading-actions .text-btn{display:inline-flex;align-items:center;min-height:40px;box-sizing:border-box;padding:8px 0;font-family:inherit;line-height:1.2;text-decoration:none}
.dungeon-auto-settings{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:7px 12px;border:1px solid #d9c38a80;border-radius:9px;background:#d9c38a14;color:#f1d99b;font-size:12px;cursor:pointer}
.dungeon-auto-settings span:first-child{font-size:22px;line-height:1}
.dungeon-auto-settings:hover{background:#d9c38a2b}
@media(max-width:650px){.dungeon-heading-actions{gap:6px;flex-wrap:wrap}.dungeon-auto-settings{min-height:38px;padding:5px 8px;font-size:11px}}
@media(max-width:650px){.dungeon-heading{flex-direction:column;align-items:stretch}.dungeon-heading-actions{justify-content:flex-start;gap:6px 14px}.dungeon-heading-actions .text-btn{display:inline-flex;align-items:center;min-height:36px;padding:6px 0;font-size:11px;white-space:nowrap}}

.first-journey{max-width:1080px}
.first-journey-intro{
 display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:24px;
 padding:clamp(18px,4vw,36px);border:1px solid #ddbc7350;border-radius:16px;
 background:radial-gradient(ellipse at 100% 20%,#715a363e,transparent 68%),#201929;
}
.first-journey-intro h1{margin:8px 0;font:500 clamp(29px,4.8vw,51px)/1.12 Cinzel,Georgia,serif;letter-spacing:-.035em}
.first-journey-intro p{color:var(--muted);line-height:1.6}
.first-journey-intro>img{object-fit:cover;width:clamp(54px,11vw,108px);height:auto;aspect-ratio:1;border:1px solid #d9ba7150;border-radius:14px}
.first-journey-decks{margin:24px 0 18px}
.first-journey-decks h2{font:500 clamp(20px,2.5vw,26px)/1.3 Cinzel,Georgia,serif;margin-bottom:12px}
.first-journey-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.first-journey-deck{
 display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;
 min-width:0;padding:12px;text-align:left;border:1px solid #c5aadd30;border-radius:10px;
 background:#1c1727;color:var(--text);font:inherit;cursor:pointer;
}
.first-journey-deck:hover{background:#282034}
.first-journey-deck[aria-pressed=true]{border-color:var(--gold);background:#2c2431}
.first-journey-deck>img{display:block;width:50px;height:auto;aspect-ratio:421/614;object-fit:contain}
.first-journey-deck>span{display:grid;gap:4px;line-height:1.35}
.first-journey-deck>span>small{color:var(--gold);font-size:11px}
.first-journey-deck>span>span,.first-journey .first-journey-deck-note{color:var(--muted);font-size:12px}
.first-journey-deck>b{align-self:start;color:var(--gold);font-weight:600}
.first-journey .first-journey-deck-note{margin-top:10px;line-height:1.45}
.first-journey-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;margin-bottom:16px}
.first-journey-actions .text-btn{min-height:44px}
.first-journey-guide{padding:0 14px;border:1px solid #c5aadd30;border-radius:9px;background:#201929;color:var(--muted);line-height:1.55;text-align:left}
.first-journey-guide summary{display:list-item;min-height:44px;padding:11px 0;color:var(--gold);cursor:pointer}
.first-journey-guide ul,.first-journey-guide ol{padding-left:22px;margin:0 0 14px}
.first-journey-guide li+li{margin-top:7px}
.first-journey-guide p{font-size:12px;margin:0 0 12px}
.first-journey-story-link{margin-top:16px}.first-journey-story-link a{display:inline-flex;align-items:center;min-height:44px;color:var(--gold)}
@media(max-width:1050px){.first-journey-grid{grid-template-columns:1fr}}
@media(max-width:480px){
 .first-journey-intro{gap:12px}
 .first-journey-decks{margin-top:18px}
 .first-journey-actions{display:grid;gap:4px}
 .first-journey-actions .text-btn{justify-self:center}
}

.first-journey-help,.dungeon-footer a.text-btn{display:inline-flex;align-items:center}
.first-journey-help{color:var(--gold)}
