/* Crafting and progress: compact controls and readable item cards. */
.recipe-heading { display:flex; align-items:center; gap:12px; }
.recipe .recipe-heading { flex-direction:row; justify-content:flex-start; width:100%; }
.recipe-heading > div { min-width:0; display:flex; flex-direction:column; gap:4px; }
.recipe .recipe-heading > div { flex:1; align-items:flex-start; }
.recipe-heading b { font:600 16px Georgia,serif; overflow-wrap:anywhere; }
.inv-row.recipe { padding:10px; gap:7px; border:1px solid #4b5c54; background:linear-gradient(135deg,#1a2b2a,#10191a); }
.recipe .gear-item-art { flex-basis:38px !important; width:38px !important; height:40px !important; }
.recipe .gear-item-art > svg { width:25px !important; height:25px !important; }
.recipe .gear-item-art img { width:128%; height:128%; max-width:none; max-height:none; }
.inv-row.recipe-ready { border-color:#5aa689; box-shadow:inset 3px 0 #4abb8a; }
.recipe .card-actions { display:flex; gap:8px; }
.recipe .card-actions button, .conversion-row button { min-height:44px; }
.recipe .card-actions button { flex:1; }
.crafting-section { margin: 10px 0 16px; }
.crafting-section .workshop-heading { display:flex; align-items:center; gap:10px; margin:16px 0 8px; }
.recipe-count { margin-left:auto; color:#aebdb2; font:600 12px system-ui,sans-serif; }
.crafting-empty { margin:0 0 12px; padding:4px 0; color:#c0c9c4; font-size:14px; line-height:1.45; }
.recipe-goal { border-color:#72664c; }
.recipe-sources { width:100%; border-top:1px solid #3e4a42; padding-top:4px; }
.recipe-sources > summary { min-height:44px; display:flex; align-items:center; color:#d8c69e; font-size:13px; cursor:pointer; }
.recipe-sources > summary:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.recipe-source { display:flex; flex-direction:column; gap:3px; padding:6px 0; border-top:1px solid #293533; }
.recipe-source > b { color:#e5dfcf; font-size:12px; }
.recipe-source .material-sources { margin:0; }
.recipe .cost-line { align-items:center; font-size:12px; line-height:1.3; }
.recipe .cost-line .material-name { display:flex; align-items:center; gap:6px; min-width:0; }
.material-art { color:var(--material-tint); display:inline-flex !important; flex:0 0 26px; align-items:center; justify-content:center; width:26px; height:26px; border:1px solid #5a6251; border-radius:6px; background:#0e1919; }
.material-art svg { width:19px; height:19px; }
.recipe .material-art { flex-basis:26px; width:26px; height:26px; }
.recipe .material-art svg { width:19px; height:19px; }
.gear-card .inv-row > .material-art { margin-right:8px; }
.material-row { align-items:center; }
.material-row > div { gap:2px; }
.material-row .material-sources { margin-top:4px; }
.cost-ok, .cost-missing { font-size:13px; font-weight:600; }
.cost-ok { color:#8de1b7; }
.cost-missing { color:#e6bf8c; }
.next-unlock { border-color:#557962; background:linear-gradient(135deg,rgba(70,139,101,.17),rgba(17,27,25,.94)); padding:12px; }
.next-unlock b { color:#e4d3af; font:600 16px Georgia,serif; }
.next-unlock p { color:#cad4c3; margin:6px 0 0; line-height:1.4; }
.gear-disclosure .conversion-row { gap:8px; align-items:center; }

#panel-gear .mast, #panel-gear .wcard { padding:8px 10px; }
#panel-gear .mast-head { flex-wrap:wrap; }
#panel-gear .mast p, #panel-gear .wcard p { margin-top:4px; }
#panel-gear .passive-slot { padding:7px; }
#panel-gear .inv-row:not(.recipe) { gap:8px; }

/* Small-screen management flows retain the character, but leave room for the task. */
#panel-gear .wanderer-heading.compact { min-height:78px; gap:10px; padding:6px 10px; margin-bottom:8px; }
#panel-gear .wanderer-heading.compact canvas { flex:0 0 68px; width:68px; height:76px; }
#panel-gear .wanderer-heading.compact h2 { font-size:21px; margin:0 0 2px; }
#panel-gear .wanderer-heading.compact .eyebrow { font-size:9px; }
#panel-gear .wanderer-heading.compact p { font-size:12px; line-height:1.3; }
#panel-gear .gear-body .dim.tiny { font-size:12.5px; line-height:1.4; }
#panel-gear .gear-body h5 { margin:14px 0 8px; }
.craft-goal-shortcut { display:flex; align-items:center; flex-wrap:wrap; gap:6px 8px; width:100%; color:#d6c9a6; font-size:13px; line-height:1.4; }
.craft-goal-shortcut .material-source-route { min-height:44px; padding:7px 10px; border:1px solid #5d927b; border-radius:4px; background:#13342e; color:#a8edc9; font-weight:600; }
.item-stat-context { display:block; color:#d4c49e; font-size:12px; line-height:1.4; margin-top:5px; }

body.journey-open[data-journey-page="dungeons"] .featured-expedition { order:2; }
body.journey-open[data-journey-page="dungeons"] .route-entry.locked .route-card .route-art { filter:grayscale(1) brightness(.34) contrast(1.3); opacity:.8; }
body.journey-open .route-card.locked { border-color:#41483f; }
body.journey-open .route-card.locked .rc-lockreq { color:#cbbd9f; }
/* The full composition is local, selected-route-specific menu artwork. */
body.journey-open .featured-expedition-art {
  position:absolute; z-index:0; inset:0; width:100%; height:100%; object-fit:cover;
  object-position:right center; pointer-events:none;
}
body.journey-open .featured-copy { padding:12px; }
body.journey-open .featured-boss-name { display:block; margin:0 0 7px; color:#e2c994; font:600 10px var(--mono); letter-spacing:.09em; text-shadow:0 1px 5px #000; }
@media (max-width:340px) {
  body.journey-open .featured-copy { padding:9px; }
}

/* Ancient Threshold presentation: actual kit, actual copies, authored progress. */
#panel-gear .wanderer-heading:not(.compact) {
  position:relative; justify-content:flex-start; overflow:hidden; min-height:142px;
  border-bottom:1px solid #8b7955;
  background:radial-gradient(ellipse at 23% 95%,#8c7a5038,transparent 38%),
    linear-gradient(112deg,#101918 0%,#23342e 46%,#111a1c 100%);
  box-shadow:inset 0 -3px #8c744733;
}
#panel-gear .wanderer-heading:not(.compact)::after {
  content:""; position:absolute; inset:8px; border:1px solid #c3a76b33; pointer-events:none;
}
#panel-gear .wanderer-heading:not(.compact) canvas {
  position:relative; z-index:1; flex:0 0 124px; width:124px; height:140px; filter:drop-shadow(0 6px 6px #0009);
}
#panel-gear .wanderer-copy { position:relative; z-index:1; min-width:0; padding-right:12px; }
#panel-gear .wanderer-heading:not(.compact) h2 { font-size:clamp(22px,6vw,26px); line-height:1.1; white-space:nowrap; }
.equipment-showcase { padding:12px; border-color:#85734d; background:linear-gradient(145deg,#192624,#111819 70%); }
.equipment-showcase-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.equipment-showcase-heading .eyebrow { color:#c9ad75; font:10px var(--mono); letter-spacing:.14em; }
.equipment-showcase-heading h3 { margin:3px 0 0; color:#eee1c3; font:600 21px Georgia,serif; }
#panel-gear .equipment-slots .slot-card { border-color:#48564c; background:linear-gradient(105deg,#1b2924,#10191a 82%); }
#panel-gear .equipment-slots .slot-card .gear-item-art { border-color:#97845a; box-shadow:0 4px 12px #0008; }
#panel-gear .equipment-slots .slot-card .inv-title > span:first-child { color:#c7b78e; font:10px var(--mono); letter-spacing:.1em; }
#panel-gear .equipment-slots .slot-card .inspect-cue { color:#a9d9c1; }
#panel-gear .build-disclosure { margin-top:10px; border-color:#46574d; background:linear-gradient(120deg,#182421,#111819); }

.inventory-heading { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin:4px 0 6px; padding:4px 2px 8px; border-bottom:1px solid #4b5649; background:none; }
.inventory-heading h3 { margin:0; color:#eee1c3; font:600 21px Georgia,serif; }
.inventory-heading .inventory-count { margin:0; color:#c7d0c5; font-size:13px; }
.inventory-compact-count { color:#bfc9bd; font:13px var(--sans); white-space:nowrap; }
#panel-gear .inventory-item-row { align-items:center; gap:10px; margin:7px 0; padding:9px 8px 9px 10px; border:1px solid #39483f; border-left:3px solid var(--row-rarity,#c7b78f); background:linear-gradient(105deg,#1a2724,#101718 72%); }
#panel-gear .inventory-item-row .item-main { min-width:0; }
#panel-gear .inventory-item-row .item-copy { gap:4px; }
#panel-gear .inventory-item-row .inv-title { align-items:center; }
#panel-gear .inventory-item-row .inspect-cue { color:#b7d5c2; font-size:12px; }
#panel-gear .inventory-active { padding:7px 8px; border-left:2px solid #9f895a; background:#18211e; }
#panel-gear [data-gear-disclosure="inventory-filters"] { margin:8px 0 10px; border-color:#3c4a41; background:#121a19; }

#inspector .insp-toolbar { position:sticky; top:-14px; z-index:2; margin:-14px -14px 8px; padding:8px 14px; background:#111918f5; border-bottom:1px solid #796a4d; }
#inspector .insp-head { align-items:center; gap:14px; padding:14px 4px; border:1px solid #786a4e; border-left:3px solid #b39a65; background:radial-gradient(ellipse at 15% 50%,#78835a26,transparent 60%),linear-gradient(110deg,#1d2a26,#111819); }
#inspector .insp-title { gap:6px; }
#inspector .insp-title b { color:#f0e2c2; font-size:clamp(18px,5vw,23px); line-height:1.2; }
#inspector .inspector-primary-stats { padding-top:5px; border-top:1px solid #b29b6738; }
#inspector .insp-block { border-color:#46564a; background:linear-gradient(145deg,#17221f,#111819); }
#inspector .insp-label { color:#c9ae78; }
#inspector .insp-advanced { border-color:#76694c; }
#inspector .insp-actions { position:sticky; bottom:0; margin:8px -14px 0; padding:8px 14px calc(env(safe-area-inset-bottom) + 8px); background:#101716f5; }
#inspector .insp-toolbar-name { display:block; max-width:65%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#inspector .insp-body > .insp-advanced { margin-top:8px; }
#panel-gear .progress-unlock-card .unlock-description { color:#d8ddcc; font-size:14px; }
#panel-gear .progress-unlock-card .unlock-meter { margin-top:10px; }
#panel-gear .skill-mastery-meter { margin:7px 0 5px; }
#panel-gear .skill-numbers { margin:5px 0; color:#b7c5b7; font-size:13px; }
#panel-gear .skill-numbers > summary { min-height:36px; cursor:pointer; }
#panel-gear .skill-numbers p { padding:0 8px; }

.crafting-spotlight { position:relative; margin:6px 0 12px; padding:9px; overflow:hidden; border:1px solid #786e50; background:radial-gradient(ellipse at 95% 0%,#ae8c3a20,transparent 43%),linear-gradient(145deg,#1c2a24,#101717 72%); box-shadow:inset 0 0 0 2px #0e1715,0 8px 18px #0004; }
.craft-feature-heading { position:relative; display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.craft-feature-heading .eyebrow { color:#d7bb79; font:10px var(--mono); letter-spacing:.14em; }
.craft-feature-heading h4 { margin:3px 0 0; color:#f0e2c2; font:600 22px Georgia,serif; }
.craft-feature-heading .recipe-count { margin:0; padding:6px 8px; border:1px solid #71644a; background:#111918; color:#d4c49e; white-space:nowrap; }
.recipe-featured { position:relative; z-index:1; }
.recipe-featured.recipe-ready { border:0; background:transparent; box-shadow:none; }
.recipe-featured.recipe-goal { border:0; background:transparent; box-shadow:none; }
.recipe-featured .recipe-heading { gap:12px; }
.recipe-featured .recipe-heading .gear-item-art { flex-basis:54px !important; width:54px !important; height:58px !important; border-color:#a58a56; }
.recipe-featured .recipe-heading b { font-size:18px; }
.recipe-featured .card-actions { margin-top:8px; }
.recipe-featured .card-actions button { min-height:48px; }
.recipe-featured .cost-line { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; min-height:32px; padding:3px 0; border-bottom:0; }
.recipe-featured .material-progress { display:block; grid-column:1/-1; height:5px; overflow:hidden; background:#37413a; border-radius:3px; }
.recipe-featured .material-progress i { display:block; height:100%; background:#88baa0; border-radius:3px; }
.recipe-featured .cost-line.short .material-progress i { background:#baa175; }
.recipe-featured .card-actions { flex-wrap:wrap; }
.recipe-featured .card-actions .material-source-route { white-space:normal; overflow-wrap:anywhere; font-size:12px; }
.catalog-filters { margin:5px 0 8px; border-bottom:1px solid #3f5046; }
.catalog-filters > summary { min-height:44px; display:flex; align-items:center; padding:8px; color:#c7d8c8; cursor:pointer; }
.catalog-filters > summary:focus-visible { outline:2px solid #dabf8d; outline-offset:-2px; }
.catalog-filters .gear-filters { margin:4px 0 8px; }

#panel-gear .progress-level-card { position:relative; overflow:hidden; padding:14px; border-color:#978053; background:radial-gradient(ellipse at 100% 0%,#b7984825,transparent 45%),linear-gradient(120deg,#202d27,#111819); }
#panel-gear .progress-level-card .mast-head b { color:#f0e1be; font:600 20px Georgia,serif; }
#panel-gear .progress-unlock-card { position:relative; margin:10px 0 16px; border-left:3px solid #84a887; }
#panel-gear .progress-section-title { display:flex; align-items:center; gap:8px; margin:18px 0 8px; padding-bottom:7px; border-bottom:1px solid #6b5e43; color:#e7d7b5; font:600 17px Georgia,serif; }
#panel-gear .progress-skill-row { align-items:flex-start; padding:10px 8px; border-bottom:1px solid #39463e; background:linear-gradient(100deg,#17221f,#111819 80%); }
#panel-gear .progress-skill-row > div { min-width:0; }
#panel-gear .progress-skill-row > div > b { color:#eadbbb; font:600 15px Georgia,serif; }
#panel-gear .progress-family-card { margin:8px 0; padding:12px; border-color:#655d47; background:linear-gradient(120deg,#1a2622,#111818); }
#panel-gear .progress-family-card.wcard-held { border-color:#74b69a; box-shadow:inset 3px 0 #64b18d; }
#panel-gear .progress-passive-slot { min-height:72px; background:linear-gradient(140deg,#18231f,#101717); }
#panel-gear .progress-passive-slot.filled { border-color:#8c9a6a; background:linear-gradient(140deg,#223127,#111918); }

body.journey-open[data-journey-page="challenges"] .challenge-screen { border-color:#87764e; background:radial-gradient(ellipse at 50% 0%,#b99b5420,transparent 42%),linear-gradient(145deg,#182522,#101718); box-shadow:inset 0 0 0 3px #101716,0 14px 36px #000a; }
body.journey-open[data-journey-page="challenges"] .challenge-screen .brand { padding:10px 8px 14px; border-bottom:1px solid #726347; }
body.journey-open[data-journey-page="challenges"] .challenge-screen .brand h1 { color:#efe0be; }
body.journey-open[data-journey-page="challenges"] .challenge-season-note { margin:12px 0 4px; color:#c4cbbb; font:12px var(--mono); letter-spacing:.06em; }
body.journey-open[data-journey-page="challenges"] .challenge-mode-equalized { border-color:#a18754; background:linear-gradient(125deg,#332b1d,#171b18 68%); box-shadow:inset 3px 0 #b69a60; }
body.journey-open[data-journey-page="challenges"] .challenge-mode-wanderer { border-color:#4d806e; background:linear-gradient(125deg,#17382f,#141b19 68%); box-shadow:inset 3px 0 #68bd9b; }
body.journey-open[data-journey-page="challenges"] .challenge-mode-equalized::before { background:#d9ba77; }
body.journey-open[data-journey-page="challenges"] .challenge-mode-wanderer::before { background:#79d8b1; }
body.journey-open[data-journey-page="challenges"] .challenge-mode-kicker { display:block; margin-bottom:4px; color:#cfb777; font:10px var(--mono); letter-spacing:.13em; }
body.journey-open[data-journey-page="challenges"] .challenge-mode-wanderer .challenge-mode-kicker { color:#91d6b6; }
body.journey-open[data-journey-page="challenges"] .challenge-modes .wave-mode:focus-visible { outline:2px solid #e8cc85; outline-offset:3px; }
@media (max-width:380px) {
  #panel-gear .wanderer-heading:not(.compact) { min-height:136px; gap:5px; padding:6px; }
  #panel-gear .wanderer-heading:not(.compact) canvas { flex-basis:116px; width:116px; height:130px; }
  #panel-gear .wanderer-heading:not(.compact) h2 { font-size:22px; }
  #panel-gear .wanderer-heading:not(.compact) h2 { font-size:22px; }
  .equipment-showcase { padding:9px; }
  .inventory-heading { padding:9px; }
  #inspector .insp-head { gap:9px; }
  .crafting-spotlight { padding:9px; }
  .craft-feature-heading h4 { font-size:19px; }
}

/* Player audio mix. Thumb-sized controls; values remain readable at 320px. */
.audio-settings { margin:0 0 20px; padding:14px 12px; border:1px solid #596257;
  border-radius:var(--r); background:linear-gradient(130deg,#1b2924,#11191a); }
.audio-settings > h3 { margin:0 0 12px; color:#ebdebe; font:600 17px Georgia,serif; }
.audio-settings .audio-mute-label { display:flex; align-items:center; gap:12px;
  min-height:48px; color:var(--text); font-size:15px; font-weight:600; }
.audio-mute-label input[type="checkbox"] { flex:0 0 24px; width:24px; height:24px;
  accent-color:var(--accent); }
.audio-levels { display:flex; flex-direction:column; gap:4px; }
.audio-level-row { display:grid; grid-template-columns:74px minmax(0,1fr) 45px;
  align-items:center; gap:9px; min-height:48px; color:#dce5de; font-size:13px; }
.audio-level-row input[type="range"] { width:100%; min-width:0; height:44px;
  margin:0; accent-color:var(--accent); cursor:pointer; }
.audio-level-row output { justify-self:end; color:#e9d6ad;
  font:600 12px var(--mono); font-variant-numeric:tabular-nums; }
.audio-settings .dim { margin:10px 0 0; line-height:1.5; }
.audio-settings input:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
@media(max-width:340px) {
  .audio-settings { padding:12px 8px; }
  .audio-level-row { grid-template-columns:64px minmax(0,1fr) 40px; gap:6px; }
}
