:root{
  --panel-edge:rgba(233,224,203,.15);
  --panel-fill:rgba(18,16,14,.94);
  --rarity-common:#aaa59c;
  --rarity-uncommon:#78b56a;
  --rarity-rare:#5e9ee8;
  --rarity-epic:#ad72df;
  --rarity-legendary:#e6a448;
  --rarity-mythic:#ef6670;
  --rarity-ancient:#5fd0c4;
  --rarity-divine:#f2dc83;
}

body{
  background:#0d0d0c;
}

#grain{
  opacity:.065;
  background-size:4px 4px;
}

#vignette{
  box-shadow:inset 0 0 190px 36px rgba(0,0,0,.68);
}

#hud{
  isolation:isolate;
}

.hud-tl,
.hud-tr,
#menu{
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.38));
}

.world-status{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:7px;
  margin-top:9px;
  color:var(--bone-dim);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.world-status span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}

.world-status span::before{
  content:"";
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--status-color,var(--moss));
  box-shadow:0 0 9px color-mix(in srgb,var(--status-color,var(--moss)) 75%,transparent);
}

.mbtn,
.close,
.act button{
  border-radius:6px;
  transition:border-color .16s ease,background .16s ease,color .16s ease,transform .16s ease;
}

.mbtn{
  min-height:36px;
  background:rgba(15,14,13,.9);
  backdrop-filter:blur(8px);
}

.mbtn:hover,
.act button:hover:not(:disabled),
.close:hover{
  transform:translateY(-1px);
}

.mbtn[data-panel="journal"]{
  color:#c8d9c1;
}

#panel{
  background:
    linear-gradient(180deg,rgba(10,10,9,.82),rgba(8,7,7,.96)),
    rgba(8,7,6,.94);
  backdrop-filter:blur(12px);
}

.sheet{
  max-width:1040px;
}

.sheet header{
  position:sticky;
  top:calc(-18px - env(safe-area-inset-top));
  z-index:4;
  padding:18px 0 11px;
  background:linear-gradient(180deg,#0b0a09 72%,transparent);
}

.card{
  position:relative;
  overflow:hidden;
  min-height:138px;
  border-radius:8px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.028),transparent 45%),
    rgba(24,22,20,.94);
  border-color:var(--panel-edge);
}

.card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:2px;
  background:var(--rarity-color,transparent);
}

.card[data-rarity]{
  border-color:color-mix(in srgb,var(--rarity-color) 40%,rgba(233,224,203,.12));
}

.card[data-rarity="legendary"],
.card.legendary{
  --rarity-color:var(--rarity-legendary);
  box-shadow:0 0 32px -22px var(--rarity-legendary) inset;
}

.card[data-rarity="mythic"]{
  box-shadow:0 0 34px -21px var(--rarity-mythic) inset;
}

.card[data-rarity="ancient"],
.card[data-rarity="divine"]{
  box-shadow:0 0 38px -20px var(--rarity-color) inset;
}

.rarity-common{--rarity-color:var(--rarity-common)}
.rarity-uncommon{--rarity-color:var(--rarity-uncommon)}
.rarity-rare{--rarity-color:var(--rarity-rare)}
.rarity-epic{--rarity-color:var(--rarity-epic)}
.rarity-legendary{--rarity-color:var(--rarity-legendary)}
.rarity-mythic{--rarity-color:var(--rarity-mythic)}
.rarity-ancient{--rarity-color:var(--rarity-ancient)}
.rarity-divine{--rarity-color:var(--rarity-divine)}

.rarity-badge{
  display:inline-flex;
  margin-left:7px;
  color:var(--rarity-color,var(--bone-dim));
  font-family:var(--ui);
  font-size:9px;
  letter-spacing:.12em;
  text-transform:uppercase;
  vertical-align:2px;
}

.rarity-badge::before{
  content:"";
  width:5px;
  height:5px;
  margin:4px 5px 0 0;
  transform:rotate(45deg);
  background:currentColor;
}

.journal-summary{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(110px,.6fr));
  border-top:1px solid var(--panel-edge);
  border-bottom:1px solid var(--panel-edge);
  margin:0 0 20px;
}

.journal-summary > div{
  padding:13px 14px;
  border-right:1px solid var(--panel-edge);
}

.journal-summary > div:last-child{
  border-right:0;
}

.journal-summary b{
  display:block;
  color:var(--bone);
  font-family:var(--display);
  font-size:16px;
  font-weight:500;
}

.journal-summary span{
  display:block;
  margin-top:3px;
  color:var(--bone-dim);
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.section-title{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  margin:24px 0 9px;
  padding-bottom:7px;
  border-bottom:1px solid rgba(233,224,203,.1);
}

.section-title h2{
  margin:0;
  font-family:var(--display);
  font-size:14px;
  font-weight:500;
  letter-spacing:.08em;
}

.section-title span{
  color:var(--bone-dim);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.progress-track{
  height:5px;
  margin-top:8px;
  overflow:hidden;
  background:rgba(0,0,0,.55);
}

.progress-track i{
  display:block;
  width:100%;
  height:100%;
  transform:scaleX(var(--progress,0));
  transform-origin:left;
  background:linear-gradient(90deg,var(--moss),var(--rarity-ancient));
}

.collection-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.collection-mark{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:5px 9px;
  border:1px solid rgba(233,224,203,.12);
  border-radius:5px;
  color:var(--bone-dim);
  font-size:11px;
  letter-spacing:.06em;
}

.collection-mark.found{
  color:var(--bone);
  border-color:rgba(95,208,196,.34);
  background:rgba(95,208,196,.06);
}

.collection-mark i,
.cosmetic-swatch{
  width:9px;
  height:9px;
  flex:none;
  border-radius:2px;
  background:var(--mark-color,#625e58);
}

.achievement.done{
  border-color:rgba(95,208,196,.33);
}

.achievement.done h3::after{
  content:"Complete";
  float:right;
  color:var(--rarity-ancient);
  font-family:var(--ui);
  font-size:9px;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.achievement:not(.done){
  opacity:.76;
}

.settings-band{
  margin-top:24px;
  padding:14px 0;
  border-top:1px solid var(--panel-edge);
  border-bottom:1px solid var(--panel-edge);
}

.settings-band h2{
  margin:0 0 5px;
  font-family:var(--display);
  font-size:15px;
  font-weight:500;
}

.segmented{
  display:inline-flex;
  max-width:100%;
  margin-top:9px;
  border:1px solid rgba(233,224,203,.17);
  border-radius:7px;
  overflow:auto;
}

.segmented button{
  min-width:70px;
  border:0;
  border-right:1px solid rgba(233,224,203,.12);
  border-radius:0;
  padding:8px 10px;
  background:rgba(233,224,203,.03);
  color:var(--bone-dim);
  font-family:var(--ui);
  font-size:11px;
  letter-spacing:.09em;
  text-transform:uppercase;
  cursor:pointer;
}

.segmented button:last-child{
  border-right:0;
}

.segmented button.on{
  color:var(--bone);
  background:rgba(255,122,47,.12);
  box-shadow:inset 0 -2px var(--ui-accent);
}

.toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:42px;
  border-top:1px solid rgba(233,224,203,.08);
}

.toggle-row:first-of-type{
  margin-top:11px;
}

.toggle-row span{
  color:var(--bone-dim);
  font-size:12px;
  letter-spacing:.05em;
}

.switch{
  position:relative;
  width:38px;
  height:21px;
  flex:none;
}

.switch input{
  position:absolute;
  opacity:0;
}

.switch i{
  position:absolute;
  inset:0;
  border:1px solid rgba(233,224,203,.2);
  border-radius:11px;
  background:rgba(0,0,0,.42);
  cursor:pointer;
}

.switch i::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:13px;
  height:13px;
  border-radius:50%;
  background:var(--bone-dim);
  transition:transform .16s ease,background .16s ease;
}

.switch input:checked + i{
  border-color:rgba(255,122,47,.5);
}

.switch input:checked + i::after{
  transform:translateX(17px);
  background:var(--ui-accent);
}

#title .t-in{
  position:relative;
}

#title h1{
  text-shadow:0 16px 45px rgba(0,0,0,.7);
}

#title .lede{
  max-width:480px;
  margin-left:auto;
  margin-right:auto;
}

@media (max-width:760px){
  .journal-summary{
    grid-template-columns:repeat(3,1fr);
  }

  .journal-summary > div:first-child{
    grid-column:1/-1;
    border-right:0;
    border-bottom:1px solid var(--panel-edge);
  }
}

@media (max-width:560px){
  :root{--hud-pad:8px}

  .hud-tl{
    gap:8px;
  }

  #hearth{
    transform:scale(.86);
    transform-origin:top left;
    margin-right:-10px;
  }

  .world-status{
    max-width:46vw;
    margin-left:auto;
    flex-wrap:wrap;
    gap:4px 7px;
  }

  .world-status span{
    font-size:9px;
  }

  #menu{
    gap:4px;
    max-width:64vw;
  }

  .mbtn{
    min-height:34px;
    padding:7px 8px;
    font-size:10px;
  }

  .sheet header{
    top:calc(-18px - env(safe-area-inset-top));
  }

  .grid{
    grid-template-columns:1fr;
  }

  .card{
    min-height:0;
  }

  .journal-summary > div{
    padding:10px 8px;
  }

  .acct-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }

  .acct-row input,
  .acct-row button{
    width:100%;
    min-width:0;
  }

  .journal-summary b{
    font-size:14px;
  }

  .segmented{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    width:100%;
  }

  .segmented button{
    min-width:0;
    border-bottom:1px solid rgba(233,224,203,.12);
  }
}

@media (prefers-reduced-motion:reduce){
  #grain{display:none}
  .mbtn:hover,
  .act button:hover:not(:disabled),
  .close:hover{transform:none}
}

/* Unified resource archive. The gameplay HUD intentionally stays clear. */
#hearth{cursor:pointer;border-radius:50%;pointer-events:auto}
#hearth:focus-visible{outline:2px solid var(--ui-accent);outline-offset:4px}
.resource-icon{
  --resource-color:#8a8275;
  --rarity-color:#b9b1a3;
  position:relative;
  display:grid;
  place-items:center;
  flex:0 0 38px;
  width:38px;
  height:38px;
  border:1px solid color-mix(in srgb,var(--rarity-color) 38%,rgba(233,224,203,.08));
  background:radial-gradient(circle at 50% 38%,color-mix(in srgb,var(--resource-color) 18%,transparent),rgba(8,8,7,.84) 68%);
  box-shadow:inset 0 0 14px rgba(0,0,0,.52),0 0 12px -8px var(--rarity-color);
}
.resource-icon > i{position:relative;display:block;width:19px;height:19px;background:var(--resource-color);filter:drop-shadow(0 0 5px color-mix(in srgb,var(--resource-color) 62%,transparent))}
.resource-icon > b{position:absolute;right:2px;bottom:1px;color:#e9e0cb;font:700 6px var(--ui);letter-spacing:0}
.resource-icon.small{flex-basis:27px;width:27px;height:27px}.resource-icon.small > i{width:13px;height:13px}.resource-icon.small > b{font-size:5px}
.resource-icon.ore > i{clip-path:polygon(13% 76%,23% 31%,57% 5%,91% 38%,80% 86%,43% 100%)}
.resource-icon.crystal > i{clip-path:polygon(50% 0,88% 35%,69% 100%,31% 100%,11% 35%)}
.resource-icon.essence > i{clip-path:polygon(50% 0,79% 40%,91% 68%,75% 94%,50% 100%,25% 94%,9% 68%,21% 40%);border-radius:45% 45% 52% 52%}
.resource-icon.plant > i{border-radius:70% 10% 70% 10%;transform:rotate(-35deg)}
.resource-icon.wood > i{width:22px;height:10px;border-radius:7px;transform:rotate(-25deg);box-shadow:inset 0 0 0 2px rgba(28,17,10,.35)}
.resource-icon.bone > i{width:24px;height:7px;border-radius:7px;transform:rotate(-28deg)}
.resource-icon.bone > i::before,.resource-icon.bone > i::after{content:"";position:absolute;top:-2px;width:9px;height:11px;border-radius:50%;background:var(--resource-color)}
.resource-icon.bone > i::before{left:-3px}.resource-icon.bone > i::after{right:-3px}
.resource-icon.relic > i{width:16px;height:16px;transform:rotate(45deg);box-shadow:inset 0 0 0 3px rgba(15,13,11,.45)}
.resource-icon.hide > i{clip-path:polygon(19% 2%,83% 8%,96% 39%,77% 92%,38% 100%,5% 64%)}

.inventory-materials{margin:0 0 22px;border-top:1px solid rgba(233,224,203,.14);border-bottom:1px solid rgba(233,224,203,.14);background:#0b0b09}
.inventory-materials > header{position:static;display:flex;align-items:center;justify-content:space-between;margin:0;padding:13px 15px;border:0;border-bottom:1px solid rgba(213,154,76,.17);background:#0d0c0a}
.inventory-materials > header h2{margin:0;font:500 17px var(--display);letter-spacing:0;text-transform:uppercase}
.inventory-materials > header p{margin:3px 0 0;color:#80776a;font:9px var(--ui);letter-spacing:.08em;text-transform:uppercase}
.inventory-materials header span{color:#a9916d;font-size:9px;letter-spacing:.12em;text-transform:uppercase}
.inventory-resource-group{border-bottom:1px solid rgba(233,224,203,.08)}
.inventory-resource-group > header{position:static;display:flex;align-items:center;justify-content:space-between;margin:0;padding:9px 14px 7px;border:0;background:rgba(255,255,255,.012)}
.inventory-resource-group > header h3{margin:0;color:#d5ad73;font:600 10px var(--ui);letter-spacing:.11em;text-transform:uppercase}
.inventory-resource-group.rare > header h3{color:#4eb8e8}.inventory-resource-group.magical > header h3{color:#b979df}.inventory-resource-group.legendary > header h3{color:#ef9c3c}
.inventory-resource-group > div{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr))}
.inventory-resource{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:61px;padding:9px 11px;border-right:1px solid rgba(233,224,203,.06);border-top:1px solid rgba(233,224,203,.045);background:rgba(255,255,255,.008)}
.inventory-resource > div{min-width:0}.inventory-resource > div span{display:block;overflow:hidden;color:#cfc3ae;font:10px var(--display);text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}
.inventory-resource > div small{display:block;margin-top:3px;color:var(--rarity-color,#70695e);font-size:7px;letter-spacing:.11em;text-transform:uppercase}
.inventory-resource > b{color:#eadbc1;font:500 17px var(--display);font-variant-numeric:tabular-nums}
.inventory-resource.undiscovered{opacity:.32;filter:grayscale(1)}

@media (max-width:760px){
  .inventory-resource-group > div{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inventory-resource{grid-template-columns:31px minmax(0,1fr) auto;min-width:0;padding:7px 8px}.inventory-resource .resource-icon{width:31px;height:31px;flex-basis:31px}
}

/* Hearth upgrade selection */
#panel.hearth-open{overflow:hidden;padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));background:#070706}
#panel.hearth-open .sheet{position:relative;width:100%;max-width:1480px;height:100%;margin:0 auto}
#panel.hearth-open .sheet > header{position:absolute;z-index:30;top:12px;right:12px;margin:0;padding:0;border:0}
#panel.hearth-open #pTitle{display:none}
#panel.hearth-open #pClose{width:38px;height:38px;overflow:hidden;padding:0;font-size:0;background:rgba(8,8,7,.92)}
#panel.hearth-open #pClose::before{content:"X";font-size:13px}
#panel.hearth-open #pBody{height:100%}
.hearth-upgrade-shell{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-height:0;overflow-x:hidden;overflow-y:auto;color:#e9e0cb;border:1px solid rgba(209,139,61,.3);border-radius:6px;background:#0a0908;box-shadow:0 22px 80px rgba(0,0,0,.74),inset 0 0 80px rgba(104,42,11,.05)}
.hearth-upgrade-shell::before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 50% 40%,rgba(185,71,18,.08),transparent 45%)}
.hearth-upgrade-head{position:static;display:flex;align-items:center;justify-content:space-between;min-height:86px;margin:0;padding:16px 66px 14px 24px;border:0;border-bottom:1px solid rgba(213,154,76,.19);background:#0d0c0a}
.hearth-upgrade-head > div:first-child span{color:#c27b36;font:9px var(--ui);letter-spacing:.13em;text-transform:uppercase}
.hearth-upgrade-head h2{margin:3px 0 0;font:500 clamp(24px,3vw,38px) var(--display);letter-spacing:0;text-transform:uppercase}
.hearth-upgrade-head p{margin:3px 0 0;color:#83796b;font:11px var(--display)}
.hearth-level-seal{display:grid;place-items:center;width:60px;height:60px;border:1px solid #9c5727;transform:rotate(45deg);background:#17100b;box-shadow:0 0 28px rgba(230,117,41,.12)}
.hearth-level-seal b,.hearth-level-seal span{transform:rotate(-45deg)}.hearth-level-seal b{color:#f1a54c;font:26px var(--display)}.hearth-level-seal span{position:absolute;margin-top:42px;color:#8f7860;font:7px var(--ui);text-transform:uppercase}
.hearth-compare{display:grid;grid-template-columns:minmax(300px,1fr) 94px minmax(300px,1fr);align-items:center;min-height:310px;padding:10px clamp(18px,4vw,62px);border-bottom:1px solid rgba(233,224,203,.08);background:linear-gradient(90deg,rgba(0,0,0,.2),rgba(60,25,10,.08),rgba(0,0,0,.2))}
.hearth-compare > article{display:grid;grid-template-columns:minmax(210px,1fr) auto;align-items:center;min-width:0}
.hearth-compare > article > span{grid-column:1/-1;color:#938675;font:9px var(--ui);letter-spacing:.13em;text-align:center;text-transform:uppercase}
.hearth-preview{position:relative;width:230px;height:225px;margin:0 auto;transform:scale(calc(.76 + var(--hearth-level) * .035));transform-origin:center bottom}
.hearth-aura{position:absolute;inset:45px 18px 5px;border-radius:50%;background:radial-gradient(circle,rgba(255,130,43,.28),rgba(153,45,10,.06) 52%,transparent 72%);filter:blur(3px)}
.hearth-stones{position:absolute;left:50%;bottom:25px;width:1px;height:1px}
.hearth-stones i{position:absolute;left:-16px;top:-10px;width:32px;height:21px;border:1px solid rgba(210,153,85,.22);border-radius:6px;background:linear-gradient(140deg,#5d5549,#302c27 62%,#1d1b19);transform:rotate(calc(var(--i) * 1turn / var(--n))) translateY(-64px) rotate(calc(var(--i) * -1turn / var(--n)));box-shadow:inset 0 2px 3px rgba(255,255,255,.05)}
.hearth-logs{position:absolute;left:50%;bottom:36px}.hearth-logs i{position:absolute;left:-43px;top:-6px;width:86px;height:12px;border-radius:6px;background:linear-gradient(#3c2417,#17100c);box-shadow:inset 0 0 0 2px rgba(130,75,38,.25)}
.hearth-logs i:nth-child(1){transform:rotate(28deg)}.hearth-logs i:nth-child(2){transform:rotate(-28deg)}.hearth-logs i:nth-child(3){transform:translateY(-8px)}
.hearth-flame{position:absolute;left:50%;bottom:48px;width:1px;height:1px;filter:drop-shadow(0 0 16px rgba(255,91,22,.62))}
.hearth-flame i{position:absolute;left:-25px;bottom:-3px;width:50px;height:108px;clip-path:polygon(50% 0,76% 31%,67% 53%,92% 72%,74% 100%,25% 100%,7% 73%,36% 50%,27% 29%);border-radius:44% 44% 38% 38%;background:linear-gradient(90deg,#c22e14,#ff7725 43%,#ffd27d 57%,#f44d18);transform-origin:50% 100%;animation:hearthFlame 1.35s ease-in-out infinite alternate}
.hearth-flame i:nth-child(2){left:-15px;width:30px;height:82px;background:linear-gradient(#fff1b4,#ff9b35 62%,#ed3b16);animation-delay:-.55s}.hearth-flame i:nth-child(3){left:-9px;width:18px;height:55px;background:#ffe7a2;animation-delay:-.9s}
.hearth-smoke{position:absolute;left:50%;bottom:140px}.hearth-smoke i{position:absolute;width:42px;height:68px;border-radius:50%;background:rgba(89,85,81,.12);filter:blur(8px);animation:hearthSmoke 3.6s ease-in-out infinite}
.hearth-smoke i:nth-child(2){animation-delay:-1.2s}.hearth-smoke i:nth-child(3){animation-delay:-2.4s}
.hearth-embers i{position:absolute;left:50%;bottom:72px;width:2px;height:2px;border-radius:50%;background:#ffb152;box-shadow:0 0 6px #ff6a22;animation:hearthEmber calc(1.4s + var(--i)*.08s) linear infinite;animation-delay:calc(var(--i)*-.17s)}
.hearth-runes{position:absolute;left:50%;bottom:27px}.hearth-runes i{position:absolute;left:-4px;top:-4px;width:8px;height:8px;border:1px solid #f08432;transform:rotate(calc(var(--i)*1turn/4)) translateY(-80px) rotate(45deg);box-shadow:0 0 8px rgba(240,132,50,.6);animation:hearthRune 1.8s ease-in-out infinite alternate}
.stage-4 .hearth-stones i,.stage-5 .hearth-stones i,.stage-6 .hearth-stones i{border-color:rgba(218,133,50,.5);box-shadow:inset 0 0 0 2px rgba(126,66,27,.25)}
.stage-5 .hearth-flame i,.stage-6 .hearth-flame i{height:128px}.stage-6 .hearth-aura{background:radial-gradient(circle,rgba(255,156,56,.38),rgba(122,44,15,.12) 54%,transparent 75%)}
.hearth-metrics{display:grid;grid-template-columns:auto 1fr;gap:7px 9px;min-width:112px}.hearth-metrics b{color:#e6b679;font:18px var(--display);font-weight:500;text-align:right}.hearth-metrics span{align-self:center;color:#786f63;font:8px var(--ui);letter-spacing:.09em;text-transform:uppercase}
.hearth-transform-arrow{display:grid;place-items:center;color:#a16a37}.hearth-transform-arrow i{width:44px;height:1px;background:#8a5026;box-shadow:0 0 8px rgba(224,112,41,.25)}.hearth-transform-arrow i::after{content:"";display:block;width:7px;height:7px;margin:-4px auto 0;border-top:1px solid #d18c42;border-right:1px solid #d18c42;transform:rotate(45deg)}.hearth-transform-arrow span{margin-top:12px;font:8px var(--ui);letter-spacing:.13em;text-transform:uppercase}
.hearth-offering{display:grid;grid-template-columns:1.35fr 1fr;gap:0;border-bottom:1px solid rgba(233,224,203,.08)}
.hearth-offering > section{padding:15px 20px}.hearth-offering > section+section{border-left:1px solid rgba(233,224,203,.08)}
.hearth-offering section > header{position:static;display:flex;align-items:center;justify-content:space-between;margin:0 0 10px;padding:0;border:0}.hearth-offering section > header span{color:#d5ad73;font:10px var(--ui);letter-spacing:.12em;text-transform:uppercase}.hearth-offering section > header b{color:#7f7568;font:8px var(--ui);font-weight:500;text-transform:uppercase}
.hearth-requirements{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.hearth-requirement{display:grid;grid-template-columns:38px minmax(0,1fr) auto 14px;align-items:center;gap:8px;min-height:51px;padding:6px 8px;border:1px solid rgba(233,224,203,.075);background:#0d0d0b}.hearth-requirement > div b,.hearth-requirement > div span{display:block}.hearth-requirement > div b{overflow:hidden;color:#cfc3ae;font:9px var(--display);text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.hearth-requirement > div span{margin-top:3px;color:#756c60;font:7px var(--ui);text-transform:uppercase}.hearth-requirement > strong{color:#d9c9ae;font:11px var(--display);font-weight:500;font-variant-numeric:tabular-nums}.hearth-requirement > i{color:#79b66b;font-style:normal}.hearth-requirement.missing > i,.hearth-requirement.missing > strong{color:#c65d52}.hearth-requirement.missing{border-color:rgba(168,54,43,.18)}
.hearth-benefits > div{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.hearth-benefits article{display:flex;align-items:center;gap:7px;min-height:51px;padding:7px 9px;border:1px solid rgba(230,138,50,.11);background:rgba(83,39,12,.08)}.hearth-benefits article i{color:#ed9340;font-style:normal}.hearth-benefits article span{color:#b9ad99;font:9px/1.3 var(--display);text-transform:uppercase}
.hearth-upgrade-button{display:flex;align-items:center;justify-content:center;gap:18px;width:min(520px,calc(100% - 30px));min-height:54px;margin:14px auto;border:1px solid #b96528;border-radius:3px;background:#2d160d;color:#f4dfbd;cursor:pointer;box-shadow:inset 0 0 28px rgba(230,102,28,.09),0 0 24px rgba(173,64,17,.08);text-transform:uppercase}.hearth-upgrade-button span{font:500 15px var(--display);letter-spacing:.08em}.hearth-upgrade-button small{color:#a78561;font:8px var(--ui);letter-spacing:.1em}.hearth-upgrade-button:hover:not(:disabled),.hearth-upgrade-button.controller-focus{border-color:#f08c38;background:#3a1c0e;box-shadow:inset 0 0 28px rgba(239,115,37,.14),0 0 26px rgba(216,91,24,.16)}.hearth-upgrade-button:disabled{opacity:.38;cursor:not-allowed}
.hearth-tree{position:static;display:grid;grid-template-columns:repeat(6,1fr);margin-top:auto;padding:0;border:0;border-top:1px solid rgba(213,154,76,.18);background:#0d0c0a}.hearth-tree-tier{position:relative;display:grid;grid-template-columns:35px 1fr;grid-template-rows:auto auto;align-items:center;min-height:63px;padding:8px 10px;border-right:1px solid rgba(233,224,203,.07);opacity:.33}.hearth-tree-tier > span{grid-row:1/3;display:grid;place-items:center;width:30px;height:30px;border:1px solid #65564a;transform:rotate(45deg);color:#87796a;font:14px var(--display)}.hearth-tree-tier > b,.hearth-tree-tier > small{margin-left:8px}.hearth-tree-tier > b{font:9px var(--display);font-weight:500;text-transform:uppercase}.hearth-tree-tier > small{color:#766d61;font:7px var(--ui);text-transform:uppercase}.hearth-tree-tier.unlocked,.hearth-tree-tier.current{opacity:1}.hearth-tree-tier.current{background:rgba(116,51,16,.13)}.hearth-tree-tier.current > span{border-color:#e78532;color:#ffad55;box-shadow:0 0 16px rgba(230,120,45,.2)}
.hearth-upgrade-status{min-height:18px;color:#e4b477;font:9px var(--ui);letter-spacing:.1em;text-align:center;text-transform:uppercase}.hearth-offering-motes{position:absolute;inset:0;pointer-events:none;overflow:hidden}.hearth-offering-motes i{position:absolute;top:72%;width:7px;height:7px;background:var(--resource-color);transform:rotate(45deg);opacity:0;box-shadow:0 0 12px var(--resource-color)}
.hearth-upgrade-shell.upgrading{animation:hearthShake .12s linear 7}.hearth-upgrade-shell.upgrading .hearth-compare article.next .hearth-preview{animation:hearthTransform 1.55s ease-in-out both}.hearth-upgrade-shell.upgrading .hearth-offering-motes i{animation:hearthOffering 1.2s calc((var(--i) % 8)*.045s) ease-in both}.hearth-upgrade-shell.upgrading .hearth-upgrade-button{pointer-events:none;opacity:.45}
.hearth-unlocked{margin:8px 18px 14px;padding:14px;border:1px solid rgba(239,142,54,.36);background:rgba(91,38,12,.15);animation:hearthReveal .55s ease-out}.hearth-unlocked > span{display:block;color:#ffb45f;font:20px var(--display);text-align:center;text-transform:uppercase}.hearth-unlocked > div{display:flex;justify-content:center;gap:7px;margin-top:10px}.hearth-unlocked article{padding:7px 11px;border:1px solid rgba(233,224,203,.1);color:#bfae95;font:8px var(--ui);text-transform:uppercase}.hearth-mastered{margin:14px auto;padding:18px 28px;border:1px solid rgba(242,220,131,.32);text-align:center}.hearth-mastered b,.hearth-mastered span{display:block}.hearth-mastered b{color:#f2dc83;font:20px var(--display);text-transform:uppercase}.hearth-mastered span{margin-top:5px;color:#978b77;font:9px var(--ui);text-transform:uppercase}
@keyframes hearthFlame{to{transform:scaleX(.84) rotate(3deg)}}
@keyframes hearthSmoke{0%{opacity:0;transform:translate(-18px,14px) scale(.65)}45%{opacity:.7}100%{opacity:0;transform:translate(16px,-82px) scale(1.45)}}
@keyframes hearthEmber{0%{opacity:0;transform:translate(calc((var(--i) - 6)*3px),0)}20%{opacity:1}100%{opacity:0;transform:translate(calc((var(--i) - 6)*6px),-105px)}}
@keyframes hearthRune{to{opacity:.35;filter:brightness(1.7)}}
@keyframes hearthOffering{0%{opacity:0;transform:translateY(0) rotate(45deg)}25%{opacity:1}100%{opacity:0;left:50%;top:42%;transform:translateY(-50px) rotate(225deg) scale(.35)}}
@keyframes hearthTransform{45%{transform:scale(1.13);filter:brightness(1.7)}100%{transform:scale(1.02);filter:brightness(1)}}
@keyframes hearthShake{25%{transform:translateX(-2px)}75%{transform:translateX(2px)}}
@keyframes hearthReveal{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

@media (max-width:900px){
  #panel.hearth-open{overflow:auto}.hearth-upgrade-shell{height:auto;min-height:100%}.hearth-compare{grid-template-columns:1fr 54px 1fr;padding:8px 10px}.hearth-compare > article{display:block}.hearth-preview{width:190px;height:205px}.hearth-metrics{grid-template-columns:repeat(3,auto);justify-content:center}.hearth-metrics span{display:none}.hearth-requirements{grid-template-columns:repeat(2,1fr)}.hearth-benefits > div{grid-template-columns:1fr}.hearth-tree-tier{grid-template-columns:29px 1fr;padding:7px 5px}.hearth-tree-tier > small{display:none}
}
@media (max-width:620px){
  #panel.hearth-open{padding:0}.hearth-upgrade-shell{border:0;border-radius:0}.hearth-upgrade-head{padding:13px 54px 11px 14px}.hearth-level-seal{width:46px;height:46px}.hearth-level-seal b{font-size:20px}.hearth-compare{grid-template-columns:1fr;gap:0}.hearth-transform-arrow{height:30px}.hearth-transform-arrow i{transform:rotate(90deg)}.hearth-transform-arrow span{display:none}.hearth-preview{width:180px;height:190px}.hearth-compare > article .hearth-metrics{margin-top:12px}.hearth-compare > article.next{border-top:1px solid rgba(233,224,203,.06);padding-top:8px}.hearth-offering{grid-template-columns:1fr}.hearth-offering > section{padding:12px 10px}.hearth-offering > section+section{border-left:0;border-top:1px solid rgba(233,224,203,.08)}.hearth-requirements{grid-template-columns:1fr 1fr}.hearth-requirement{grid-template-columns:31px minmax(0,1fr) auto 12px;gap:5px}.hearth-requirement .resource-icon{width:31px;height:31px;flex-basis:31px}.hearth-tree{grid-template-columns:repeat(6,80px);overflow-x:auto}.hearth-upgrade-button{flex-direction:column;gap:3px}.hearth-unlocked > div{flex-wrap:wrap}
}
@media (prefers-reduced-motion:reduce){
  .hearth-flame i,.hearth-smoke i,.hearth-embers i,.hearth-runes i,.hearth-upgrade-shell,.hearth-preview,.hearth-offering-motes i,.hearth-unlocked{animation:none!important}
}

/* Workbench progression tree */
#panel.workbench-open{
  overflow:hidden;
  padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));
  background:#080807;
}

#panel.workbench-open .sheet{
  position:relative;
  width:100%;
  max-width:1560px;
  height:100%;
}

#panel.workbench-open .sheet > header{
  position:absolute;
  z-index:20;
  top:10px;
  right:12px;
  margin:0;
  padding:0;
  border:0;
  background:none;
}

#panel.workbench-open #pTitle{display:none}
#panel.workbench-open #pClose{
  width:38px;
  height:38px;
  overflow:hidden;
  padding:0;
  font-size:0;
  background:rgba(8,8,7,.9);
}
#panel.workbench-open #pClose::before{content:"X";font-size:13px}
#panel.workbench-open #pBody{height:100%}

.workbench-shell{
  --wb-orange:#e68a32;
  --wb-cyan:#45bed9;
  --wb-violet:#a56bdd;
  display:grid;
  grid-template-columns:174px minmax(460px,1fr) 326px;
  grid-template-rows:auto minmax(0,1fr) auto auto;
  grid-template-areas:
    "top top top"
    "nav tree detail"
    "footer footer detail"
    "controls controls controls";
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
  color:#e9e0cb;
  border:1px solid rgba(202,143,72,.28);
  border-radius:6px;
  background:#0b0b09;
  box-shadow:0 20px 70px rgba(0,0,0,.72),inset 0 0 0 1px rgba(255,255,255,.018);
}

.wb-top{
  grid-area:top;
  display:grid;
  grid-template-columns:minmax(290px,1.15fr) auto minmax(480px,2fr);
  align-items:stretch;
  min-height:94px;
  padding-right:52px;
  border-bottom:1px solid rgba(213,154,76,.2);
  background:#0d0c0a;
}

.wb-brand,.wb-vitals,.wb-resources{display:flex;align-items:center;min-width:0}
.wb-brand{gap:14px;padding:13px 20px}
.wb-anvil{
  display:grid;
  place-items:center;
  flex:0 0 58px;
  width:58px;
  height:58px;
  color:#f0a14b;
  border:1px solid rgba(230,138,50,.42);
  transform:rotate(45deg);
  font-size:29px;
  box-shadow:inset 0 0 18px rgba(230,138,50,.1);
}
.wb-anvil::first-line{transform:rotate(-45deg)}
.wb-brand h2{
  margin:0;
  font-family:var(--display);
  font-size:clamp(22px,2vw,33px);
  font-weight:500;
  letter-spacing:0;
  text-transform:uppercase;
  white-space:nowrap;
}
.wb-brand p{margin:4px 0 0;color:#b79a6a;font:13px/1.35 var(--display);letter-spacing:0}

.wb-vitals{border-left:1px solid rgba(233,224,203,.08);border-right:1px solid rgba(233,224,203,.08)}
.wb-vital{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:84px;
  height:100%;
  padding:12px 14px;
  border:0;
  border-right:1px solid rgba(233,224,203,.08);
  background:none;
  color:inherit;
  text-align:left;
}
.wb-vital span,.wb-resource small,.wb-level > span,.wb-recent > span,.wb-bonuses > span{
  color:#a99a82;
  font:10px var(--ui);
  letter-spacing:.08em;
  text-transform:uppercase;
}
.wb-vital b{margin-top:6px;color:#f0c181;font:25px var(--display);font-weight:500}
.wb-vital.mastery b{color:#cba2ee}
.wb-vital.mastery::after{
  content:"";
  width:100%;
  height:3px;
  margin-top:7px;
  background:linear-gradient(90deg,var(--wb-violet) var(--mastery),rgba(165,107,221,.15) var(--mastery));
}
.wb-hearth{cursor:pointer}
.wb-hearth:hover,.wb-hearth.selected{background:rgba(230,138,50,.07)}

.wb-resources{justify-content:flex-end;overflow:hidden}
.wb-resource{
  display:grid;
  grid-template-columns:30px minmax(0,auto);
  grid-template-rows:auto auto;
  column-gap:5px;
  align-content:center;
  min-width:82px;
  height:100%;
  padding:9px 9px;
  border-right:1px solid rgba(233,224,203,.07);
}
.wb-resource > .resource-icon{
  grid-row:1/3;
  align-self:center;
}
.wb-resource > b{font:15px var(--display);font-weight:500;font-variant-numeric:tabular-nums}
.wb-resource > small{margin-top:2px;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.wb-nav{
  grid-area:nav;
  min-height:0;
  overflow:auto;
  border-right:1px solid rgba(233,224,203,.1);
  background:#0d0c0b;
}
.wb-nav-target{border-bottom:1px solid rgba(233,224,203,.075)}
.wb-nav-target button{
  display:grid;
  grid-template-columns:32px minmax(0,1fr) auto;
  align-items:center;
  width:100%;
  min-height:61px;
  padding:10px 13px;
  border:0;
  border-left:3px solid transparent;
  background:none;
  color:#bcb19e;
  cursor:pointer;
  text-align:left;
}
.wb-nav-target button span{font-size:20px;color:#8e8372}
.wb-nav-target button b{font:12px var(--display);font-weight:500;letter-spacing:0;text-transform:uppercase}
.wb-nav-target button i{font:10px var(--ui);font-style:normal;color:#736b60}
.wb-nav-target:hover button,.wb-nav-target.selected button{
  color:#f1dfbf;
  border-left-color:var(--wb-orange);
  background:rgba(230,138,50,.08);
}
.wb-nav-target.selected button span{color:#ef9d47;text-shadow:0 0 14px rgba(230,138,50,.48)}

.wb-tree{
  grid-area:tree;
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:#0a0b0a;
}
.wb-tier-tabs{display:grid;grid-template-columns:repeat(6,minmax(84px,1fr));border-bottom:1px solid rgba(233,224,203,.1)}
.wb-tier-target button{
  position:relative;
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:6px;
  width:100%;
  min-height:47px;
  padding:8px 6px;
  border:0;
  border-right:1px solid rgba(233,224,203,.07);
  border-bottom:2px solid transparent;
  background:#0d0d0c;
  color:#9f927d;
  cursor:pointer;
}
.wb-tier-target button span{font:10px var(--display);letter-spacing:0;text-transform:uppercase}
.wb-tier-target button b{font:17px var(--display);font-weight:500}
.wb-tier-target button i{position:absolute;right:7px;font-size:8px;font-style:normal;opacity:.6}
.wb-tier-target.selected button{color:#f0bd79;border-bottom-color:var(--wb-orange);background:rgba(230,138,50,.07)}
.wb-tier-target.locked button{color:#71685c}

.wb-lanes{min-height:0;overflow:auto;padding:14px 16px 18px;scrollbar-color:#6a482d #111}
.wb-lane{--lane-color:var(--wb-orange);margin-bottom:16px}
.wb-lane.armor{--lane-color:var(--wb-cyan)}
.wb-lane.spells{--lane-color:var(--wb-violet)}
.wb-lane.structures{--lane-color:#d1643c}
.wb-lane.accessories{--lane-color:#d4b256}
.wb-lane.materials{--lane-color:#7ea267}
.wb-lane.consumables{--lane-color:#aa8fb2}
.wb-lane > header{display:flex;align-items:center;gap:8px;margin-bottom:8px;color:var(--lane-color)}
.wb-lane > header span{font-size:14px}
.wb-lane > header h3{margin:0;font:12px var(--ui);font-weight:600;letter-spacing:.1em;text-transform:uppercase}
.wb-lane > header i{margin-left:auto;color:#726a5d;font:9px var(--ui);font-style:normal;text-transform:uppercase}
.wb-node-track{display:flex;align-items:center;gap:34px;min-height:118px;padding:7px 4px 9px;overflow-x:auto;overflow-y:hidden}
.wb-node{
  --rarity-color:var(--rarity-common);
  position:relative;
  display:grid;
  grid-template-rows:auto 34px auto auto;
  place-items:center;
  flex:0 0 132px;
  width:132px;
  height:108px;
  padding:8px 9px;
  border:1px solid color-mix(in srgb,var(--rarity-color) 34%,rgba(233,224,203,.1));
  border-radius:6px;
  background:#121210;
  color:#e9e0cb;
  cursor:pointer;
  text-align:center;
  outline:none;
  transition:border-color .15s ease,background .15s ease,transform .15s ease;
}
.wb-node + .wb-node::before{
  content:"";
  position:absolute;
  right:calc(100% + 1px);
  top:50%;
  width:34px;
  height:1px;
  background:var(--lane-color);
  opacity:.62;
}
.wb-node + .wb-node::after{
  content:"";
  position:absolute;
  right:calc(100% + 15px);
  top:calc(50% - 3px);
  width:6px;
  height:6px;
  border-top:1px solid var(--lane-color);
  border-right:1px solid var(--lane-color);
  transform:rotate(45deg);
}
.wb-node:hover,.wb-node.selected,.wb-node.controller-focus{
  border-color:var(--rarity-color);
  background:#181613;
  transform:translateY(-2px);
  box-shadow:0 0 22px -13px var(--rarity-color);
}
.wb-node.locked{opacity:.48;filter:saturate(.55)}
.wb-node.made{border-color:#c8a658}
.wb-node-tier{position:absolute;top:5px;right:7px;color:#776d60;font:9px var(--ui)}
.wb-node-icon{font-size:27px;color:var(--rarity-color);line-height:1;text-shadow:0 0 14px color-mix(in srgb,var(--rarity-color) 55%,transparent)}
.wb-canvas-art{display:block;position:relative;inset:auto;max-width:100%;pointer-events:none;image-rendering:auto}
.wb-canvas-art.card{width:112px;height:76px;margin-top:2px}
.wb-canvas-art.hero{width:100%;height:100%;min-height:176px}
.wb-canvas-art.badge{width:52px;height:42px}
.wb-canvas-art.burst{width:92px;height:68px}
.wb-lane.spells .wb-node-track,.wb-lane.armor .wb-node-track{align-items:stretch;min-height:178px}
.wb-lane.spells .wb-node,.wb-lane.armor .wb-node{
  grid-template-rows:minmax(0,1fr) 24px 15px;
  flex-basis:142px;width:142px;height:164px;padding:7px 8px 9px;overflow:hidden;
  background:radial-gradient(circle at 50% 35%,color-mix(in srgb,var(--rarity-color) 13%,transparent),transparent 58%),#0d0f0f
}
.wb-lane.spells .wb-node.selected,.wb-lane.armor .wb-node.selected{
  border-color:#e7953d;background:radial-gradient(circle at 50% 35%,rgba(177,88,24,.24),transparent 58%),#15110e;
  box-shadow:inset 0 -3px #e7953d,0 0 22px -8px rgba(238,139,51,.7)
}
.wb-lane.spells .wb-node.craftable:not(.selected),.wb-lane.armor .wb-node.craftable:not(.selected){border-color:#3aa99f;animation:wb-craftable-pulse 2.2s ease-in-out infinite}
.wb-lane.spells .wb-node.locked,.wb-lane.armor .wb-node.locked{opacity:.34;filter:grayscale(.7) saturate(.35)}
.wb-detail-icon .wb-canvas-art.badge{margin:-8px}
.wb-detail-art.spells,.wb-detail-art.armor{position:relative;display:grid;place-items:center;overflow:hidden}
.wb-detail-art.spells::after,.wb-detail-art.armor::after{content:"";position:absolute;inset:auto 12% 5%;height:1px;background:linear-gradient(90deg,transparent,var(--rarity-color),transparent);opacity:.5}
.crafting-burst .wb-canvas-art{position:relative;z-index:2}
.wb-node h4{width:100%;margin:0;overflow:hidden;color:#ddd1bc;font:11px var(--display);font-weight:500;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap;text-transform:uppercase}
.wb-node p{margin:2px 0 0;color:#83796b;font:9px var(--ui);letter-spacing:.08em;text-transform:uppercase}
.wb-node-action{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.wb-lane.weapons .wb-node-track{align-items:stretch;gap:22px;min-height:224px;padding:8px 4px 12px}
.wb-lane.weapons .wb-node{
  grid-template-rows:minmax(0,1fr) 28px 17px;
  flex-basis:154px;
  width:154px;
  height:208px;
  padding:7px 8px 9px;
  overflow:hidden;
  background:radial-gradient(circle at 50% 34%,rgba(39,54,59,.28),transparent 52%),#0d0f0f;
  border-radius:3px;
}
.wb-lane.weapons .wb-node + .wb-node::before{width:22px;background:linear-gradient(90deg,var(--lane-color),#58bbca);transition:opacity .22s ease,filter .22s ease}
.wb-lane.weapons .wb-node + .wb-node::after{right:calc(100% + 8px)}
.wb-lane.weapons .wb-node.path-past{opacity:.62;filter:saturate(.66)}
.wb-lane.weapons .wb-node.path-future::before{opacity:.2;filter:saturate(.35)}
.wb-lane.weapons .wb-node.path-future{animation:wb-node-emerge .48s ease-out both}
.wb-lane.weapons .wb-node.available:hover,.wb-lane.weapons .wb-node.controller-focus{
  border-color:#51bfd8;background:radial-gradient(circle at 50% 34%,rgba(27,115,143,.23),transparent 55%),#101315;
  box-shadow:0 0 18px -7px rgba(55,190,225,.58);transform:translateY(-3px)
}
.wb-lane.weapons .wb-node.selected{opacity:1;filter:none;border-color:#e7953d;background:radial-gradient(circle at 50% 36%,rgba(177,88,24,.27),transparent 56%),#15110e;box-shadow:inset 0 -3px #e7953d,0 0 22px -8px rgba(238,139,51,.7)}
.wb-lane.weapons .wb-node.locked{opacity:.3;filter:grayscale(.92) saturate(.2)}
.wb-lane.weapons .wb-node.locked:hover{opacity:.48}
.wb-lane.weapons .wb-node.craftable:not(.selected){border-color:#3aa99f;animation:wb-craftable-pulse 2.2s ease-in-out infinite}
.wb-lane.weapons .wb-node.crafting{opacity:1;filter:none;border-color:#50d7e5;pointer-events:none}
.wb-lane.weapons .wb-node.craft-complete{opacity:1;filter:none;animation:wb-complete-burst .9s ease-out both}
.wb-lane.weapons .wb-node h4{font-size:10px;line-height:1.1}
.wb-lane.weapons .wb-node p{font-size:8px}
.wb-node-lock{position:absolute;right:8px;bottom:8px;color:#867d72;font-size:10px;opacity:.74}
.wb-node-progress{position:absolute;left:8px;right:8px;bottom:0;height:3px;background:#112329;overflow:hidden}
.wb-node-progress i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#3aa8bd,#d89438);transform-origin:left;animation:wb-forge-progress .9s linear both;box-shadow:0 0 10px #54d3e8}
.wb-weapon-art{position:relative;display:grid;place-items:center;isolation:isolate;pointer-events:none}
.wb-weapon-art img{position:relative;z-index:2;display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 8px rgba(0,0,0,.68));transition:filter .2s ease,transform .2s ease}
.wb-weapon-art.card{width:134px;height:145px;margin-top:4px}
.wb-node:hover .wb-weapon-art img,.wb-node.controller-focus .wb-weapon-art img{filter:drop-shadow(0 0 9px rgba(74,193,225,.42)) drop-shadow(0 8px 8px rgba(0,0,0,.68));transform:scale(1.025)}
.wb-node.selected .wb-weapon-art img{filter:drop-shadow(0 0 10px rgba(235,137,54,.46)) drop-shadow(0 9px 8px rgba(0,0,0,.72));transform:scale(1.04)}
.wb-weapon-fx{position:absolute;z-index:3;inset:10%;overflow:visible;pointer-events:none}
.wb-weapon-fx i{position:absolute;width:3px;height:3px;border-radius:50%;opacity:0}
.wb-weapon-art.effect-stone img{animation:wb-heavy-pulse 3.1s ease-in-out infinite}
.wb-weapon-art.effect-stone .wb-weapon-fx i{left:calc(18% + var(--i)*8%);bottom:12%;background:#9ca2a0;animation:wb-stone-dust 2.8s calc(var(--i)*-.21s) ease-out infinite}
.wb-weapon-art.effect-bone .wb-weapon-fx i{left:calc(20% + var(--i)*8%);top:calc(18% + var(--i)*7%);background:#e7dfc8;clip-path:polygon(50% 0,100% 48%,50% 100%,0 52%);animation:wb-bone-align 3.2s calc(var(--i)*-.18s) ease-in-out infinite}
.wb-weapon-art.effect-flint .wb-weapon-fx i,.wb-weapon-art.effect-spear .wb-weapon-fx i{left:18%;bottom:18%;background:#ffd27b;box-shadow:0 0 5px #f49a39;animation:wb-edge-spark 2.15s calc(var(--i)*-.19s) linear infinite}
.wb-weapon-art.effect-spear .wb-weapon-fx i{background:#8beeff;box-shadow:0 0 6px #4dd8ff;animation-duration:2.8s}
.wb-weapon-art.effect-ember-axe .wb-weapon-fx i,.wb-weapon-art.effect-brand .wb-weapon-fx i{left:calc(44% + var(--i)*4%);top:calc(14% + var(--i)*5%);background:#ff8a2f;box-shadow:0 0 7px #ff5e20;animation:wb-ember-gather 2.3s calc(var(--i)*-.2s) ease-in-out infinite}
.wb-weapon-art.effect-brand img{animation:wb-ember-breathe 2.5s ease-in-out infinite}
.wb-weapon-art.effect-iron img{animation:wb-metal-pulse 3.6s ease-in-out infinite}
.wb-weapon-art.effect-cinder .wb-weapon-fx i{right:calc(14% + var(--i)*7%);top:calc(8% + var(--i)*8%);background:#9d6a49;animation:wb-ash-rise 3s calc(var(--i)*-.25s) linear infinite}
.wb-weapon-art.effect-root img{animation:wb-root-breathe 4.2s ease-in-out infinite}
.wb-weapon-art.effect-root .wb-weapon-fx i{left:calc(22% + var(--i)*7%);top:calc(18% + var(--i)*8%);background:#73b85c;box-shadow:0 0 7px #69a954;animation:wb-root-wisp 3.4s calc(var(--i)*-.28s) ease-in-out infinite}
.wb-detail-icon.weapon-badge{padding:3px;overflow:hidden;background:#080a0a}.wb-weapon-art.badge{width:38px;height:38px}
.wb-detail-art.weapons{height:238px;background:radial-gradient(circle at 50% 48%,rgba(38,83,90,.24),transparent 44%),radial-gradient(circle at 50% 100%,rgba(176,83,24,.14),transparent 55%),#080a0a}
.wb-detail-art.weapons::before{width:144px;height:144px;border-color:rgba(139,116,77,.18)}.wb-detail-art.weapons::after{width:104px;height:104px;border-color:rgba(52,171,193,.12)}
.wb-weapon-art.hero{z-index:2;width:94%;height:224px}.wb-weapon-art.hero img{filter:drop-shadow(0 14px 12px rgba(0,0,0,.82))}
.wb-detail-copy.weapon-tagline{color:#c4b49e;font-size:12px;text-transform:uppercase}
.wb-detail-stats.weapon-stats{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:0}.wb-detail-stats.weapon-stats span{display:flex;justify-content:space-between;gap:8px;padding:7px 9px;border-right:1px solid rgba(233,224,203,.06);border-bottom:1px solid rgba(233,224,203,.06)}.wb-detail-stats.weapon-stats span:last-child{grid-column:1/-1}
.wb-craft-button{position:relative;overflow:hidden}.wb-craft-button > span{position:relative;z-index:2}.wb-craft-button > i{position:absolute;z-index:1;left:0;bottom:0;width:0;height:3px;background:linear-gradient(90deg,#39a9c5,#f0a148);box-shadow:0 0 10px #53d7ea}.wb-craft-button.crafting > i{animation:wb-forge-button .9s linear both}.wb-craft-button.craft-complete{border-color:#64dcd0;box-shadow:inset 0 0 22px rgba(68,216,208,.18),0 0 18px -8px #62dbd3}
.wb-detail-art.craft-complete::after{animation:wb-inspector-complete .9s ease-out both}
.crafting-burst.weapon-burst .wb-weapon-art.burst{z-index:2;width:190px;height:190px}.crafting-burst.weapon-burst .wb-weapon-art.burst img{filter:drop-shadow(0 0 20px var(--craft-rarity))}.crafting-burst.weapon-burst > div{position:absolute;top:calc(54% + 106px);z-index:3;text-align:center}
@keyframes wb-node-emerge{from{opacity:0;transform:translateX(10px)}to{transform:none}}
@keyframes wb-craftable-pulse{50%{box-shadow:0 0 20px -7px rgba(64,218,201,.8),inset 0 0 12px rgba(56,182,171,.09)}}
@keyframes wb-forge-progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes wb-forge-button{from{width:0}to{width:100%}}
@keyframes wb-complete-burst{0%{box-shadow:0 0 0 #58e3da}35%{box-shadow:0 0 32px #58e3da;transform:scale(1.035)}100%{box-shadow:0 0 0 transparent;transform:none}}
@keyframes wb-inspector-complete{0%{transform:rotate(45deg) scale(.25);opacity:1}100%{transform:rotate(225deg) scale(1.8);opacity:0}}
@keyframes wb-heavy-pulse{50%{transform:translateY(2px) scale(1.018)}}
@keyframes wb-stone-dust{0%,58%{opacity:0;transform:translate(0,0) scale(.4)}68%{opacity:.72}100%{opacity:0;transform:translate(calc((var(--i) - 4)*4px),-18px) scale(1.25)}}
@keyframes wb-bone-align{0%,35%{opacity:0;transform:translate(calc((var(--i) - 4)*5px),14px) rotate(45deg)}55%,76%{opacity:.68;transform:translate(0,0) rotate(45deg)}100%{opacity:0}}
@keyframes wb-edge-spark{0%{opacity:0;transform:translate(0,0)}12%{opacity:1}75%{opacity:.78}100%{opacity:0;transform:translate(78px,-92px)}}
@keyframes wb-ember-gather{0%{opacity:0;transform:translate(calc((var(--i) - 4)*7px),28px)}45%{opacity:.9}100%{opacity:0;transform:translate(0,0) scale(.3)}}
@keyframes wb-ember-breathe{50%{filter:drop-shadow(0 0 13px rgba(255,107,36,.7))}}
@keyframes wb-metal-pulse{50%{filter:brightness(1.18) contrast(1.08) drop-shadow(0 10px 10px rgba(0,0,0,.78))}}
@keyframes wb-ash-rise{0%{opacity:0;transform:translate(0,12px)}30%{opacity:.5}100%{opacity:0;transform:translate(-12px,-42px)}}
@keyframes wb-root-breathe{50%{filter:drop-shadow(0 0 10px rgba(91,166,75,.42)) brightness(1.08)}}
@keyframes wb-root-wisp{0%,100%{opacity:0;transform:translate(-8px,6px)}50%{opacity:.7;transform:translate(8px,-12px)}}
.wb-lane.spells .wb-node{flex-basis:118px;width:118px;height:118px;border-radius:50%}
.wb-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:108px;color:#756d61;border:1px dashed rgba(233,224,203,.1)}
.wb-empty span{font-size:16px}.wb-empty b{margin-top:6px;font:11px var(--display);font-weight:500}.wb-empty small{margin-top:3px;font:9px var(--ui)}
.wb-tree-note{padding:9px 16px;border-top:1px solid rgba(233,224,203,.08);color:#a9916d;font:11px var(--display);text-align:center}

.wb-detail{
  grid-area:detail;
  min-height:0;
  overflow:auto;
  padding:24px 22px 18px;
  border-left:1px solid rgba(213,154,76,.22);
  background:#0e0d0b;
}
.wb-detail-head{display:flex;align-items:center;gap:11px;padding-right:28px}
.wb-detail-head > div{min-width:0}
.wb-detail-head p{margin:0;color:var(--rarity-color,#a9916d);font:10px var(--ui);letter-spacing:.1em;text-transform:uppercase}
.wb-detail-head h3{margin:3px 0 0;font:24px var(--display);font-weight:500;letter-spacing:0;text-transform:uppercase;overflow-wrap:anywhere}
.wb-detail-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;color:var(--rarity-color,#e68a32);border:1px solid currentColor;font-size:22px}
.wb-detail-art{
  position:relative;
  display:grid;
  place-items:center;
  height:176px;
  margin:18px 0;
  overflow:hidden;
  border-top:1px solid rgba(233,224,203,.08);
  border-bottom:1px solid rgba(233,224,203,.08);
  background:#090908;
}
.wb-detail-art::before,.wb-detail-art::after{content:"";position:absolute;border:1px solid rgba(230,138,50,.42);transform:rotate(45deg)}
.wb-detail-art::before{width:92px;height:92px}.wb-detail-art::after{width:64px;height:64px;border-color:rgba(233,224,203,.16)}
.wb-detail-art > span{z-index:1;color:#f09a42;font-size:48px;text-shadow:0 0 22px rgba(230,138,50,.42)}
.wb-detail-art.armor > span{color:var(--wb-cyan)}.wb-detail-art.spells > span{color:var(--wb-violet)}
.wb-detail-art.materials > span{color:#7ea267}.wb-detail-art.structures > span{color:#d1643c}
.wb-detail-copy{margin:0 0 16px;color:#b7aa96;font:12px/1.55 var(--display)}
.wb-detail h4{margin:18px 0 8px;color:#d5ad73;font:11px var(--ui);letter-spacing:.12em;text-transform:uppercase}
.wb-detail-stats{display:flex;flex-direction:column;gap:6px;padding:10px;border:1px solid rgba(233,224,203,.08);color:#8f8578;font:10px/1.4 var(--ui);text-transform:uppercase}
.wb-detail-stats b{color:#d8cbb6;font-weight:500}
.wb-requirements{display:flex;flex-direction:column}
.wb-requirement{display:grid;grid-template-columns:28px minmax(0,1fr) auto 16px;align-items:center;gap:6px;min-height:31px;border-bottom:1px solid rgba(233,224,203,.06);color:#a99d8b;font:10px var(--ui)}
.wb-requirement b{color:#d8cbb6;font-weight:500;font-variant-numeric:tabular-nums}.wb-requirement i{color:#78b56a;font-style:normal}.wb-requirement.missing i,.wb-requirement.missing b{color:#c36056}
.wb-resource-glyph{color:#e19342;font-size:9px;font-weight:700}
.wb-craft-button{
  width:100%;
  min-height:44px;
  margin-top:18px;
  border:1px solid #a85b25;
  border-radius:3px;
  background:#2b160d;
  color:#f2dfc3;
  font:12px var(--display);
  letter-spacing:.08em;
  text-transform:uppercase;
  cursor:pointer;
  box-shadow:inset 0 0 18px rgba(230,138,50,.08);
}
.wb-craft-button:hover:not(:disabled){background:#3a1d0f;border-color:#e68a32}
.wb-craft-button:disabled{opacity:.38;cursor:not-allowed}
.wb-detail > small{display:block;margin-top:8px;color:#756b5e;font:9px var(--ui);text-align:center;text-transform:uppercase}
.wb-mastered{margin-top:18px;padding:12px;border:1px solid rgba(95,208,196,.42);color:#8fd8d0;font:10px var(--ui);text-align:center;text-transform:uppercase}

.wb-footer{
  grid-area:footer;
  display:grid;
  grid-template-columns:1.1fr 1fr 1.05fr 1fr;
  min-height:83px;
  border-top:1px solid rgba(213,154,76,.18);
  background:#0d0c0a;
}
.wb-footer > div{min-width:0;padding:12px 16px;border-right:1px solid rgba(233,224,203,.07)}
.wb-level{display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px 10px}
.wb-level > b{grid-row:1/4;grid-column:2;color:#e4a354;font:32px var(--display);font-weight:500}
.wb-level > div{height:4px;background:#24201a}.wb-level > div i{display:block;height:100%;background:#d57831}
.wb-level small{color:#756b5f;font:9px var(--ui)}
.wb-recent > div{display:flex;gap:5px;margin-top:8px}.wb-recent i{display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(233,224,203,.1);color:#d39a53;font-style:normal}.wb-recent small{color:#756b5f;font:10px var(--ui)}
.wb-next{display:flex;align-items:center;justify-content:center;gap:12px}.wb-next .wb-flame{color:#e78831;font-size:30px}.wb-next b,.wb-next small{display:block}.wb-next b{font:12px var(--display);font-weight:500;text-transform:uppercase}.wb-next small{margin-top:4px;color:#887b69;font:9px var(--ui)}
.wb-bonuses{display:flex;flex-direction:column;gap:6px}.wb-bonuses b{color:#aaa08f;font:10px var(--ui);font-weight:400}
.wb-controls{grid-area:controls;display:flex;justify-content:flex-end;gap:22px;min-height:27px;padding:7px 16px;border-top:1px solid rgba(233,224,203,.07);color:#756c60;font:9px var(--ui);text-transform:uppercase}

body.using-gamepad .wb-nav-target.controller-focus button,
body.using-gamepad .wb-tier-target.controller-focus button,
body.using-gamepad .wb-hearth.controller-focus{outline:2px solid var(--ui-accent);outline-offset:-3px}

@media (max-width:1180px){
  .workbench-shell{grid-template-columns:148px minmax(420px,1fr) 286px}
  .wb-top{grid-template-columns:270px 250px minmax(360px,1fr)}
  .wb-brand{padding-left:14px}.wb-anvil{flex-basis:48px;width:48px;height:48px;font-size:24px}
  .wb-resource{min-width:62px;padding:8px 6px}.wb-resource small{display:none}
  .wb-detail{padding-left:17px;padding-right:17px}
}

@media (max-width:900px){
  #panel.workbench-open{overflow:auto}
  #panel.workbench-open .sheet,#panel.workbench-open #pBody{height:auto;min-height:100%}
  .workbench-shell{
    grid-template-columns:124px minmax(0,1fr);
    grid-template-rows:auto minmax(430px,58vh) auto auto auto;
    grid-template-areas:"top top" "nav tree" "detail detail" "footer footer" "controls controls";
    height:auto;
    min-height:calc(100vh - 16px);
    overflow:visible;
  }
  .wb-top{grid-template-columns:minmax(230px,.8fr) 1fr;grid-template-rows:auto auto;padding-right:48px}
  .wb-resources{grid-column:1/-1;min-height:62px;border-top:1px solid rgba(233,224,203,.07);justify-content:stretch}
  .wb-resource{flex:1;min-width:0}.wb-resource small{display:block}
  .wb-nav-target button{grid-template-columns:27px minmax(0,1fr);padding:8px}.wb-nav-target button i{display:none}.wb-nav-target button b{font-size:10px}
  .wb-detail{min-height:460px;border-left:0;border-top:1px solid rgba(213,154,76,.22)}
  .wb-detail-art{height:145px}.wb-footer{grid-template-columns:1fr 1fr}
}

@media (max-width:620px){
  #panel.workbench-open{padding:0}
  .workbench-shell{grid-template-columns:1fr;grid-template-rows:auto auto minmax(460px,64vh) auto auto auto;grid-template-areas:"top" "nav" "tree" "detail" "footer" "controls";border:0;border-radius:0}
  .wb-top{display:block;padding-right:42px}.wb-brand{min-height:73px}.wb-brand h2{font-size:22px}.wb-brand p{font-size:11px}.wb-anvil{flex-basis:42px;width:42px;height:42px}
  .wb-vitals{min-height:66px;border-top:1px solid rgba(233,224,203,.07)}.wb-vital{flex:1;min-width:0;padding:8px}.wb-vital b{font-size:20px}
  .wb-resources{display:grid;grid-template-columns:repeat(4,1fr);min-height:104px}.wb-resource{height:52px;border-bottom:1px solid rgba(233,224,203,.07)}
  .wb-nav{display:flex;overflow-x:auto;border-right:0;border-bottom:1px solid rgba(233,224,203,.1)}.wb-nav-target{flex:0 0 108px;border-bottom:0;border-right:1px solid rgba(233,224,203,.07)}.wb-nav-target button{grid-template-columns:24px 1fr;min-height:48px;border-left:0;border-bottom:2px solid transparent}.wb-nav-target.selected button{border-left:0;border-bottom-color:var(--wb-orange)}
  .wb-tier-tabs{grid-template-columns:repeat(6,76px);overflow-x:auto}.wb-tier-target button{min-height:44px}
  .wb-lanes{padding:12px 10px}.wb-node-track{gap:26px}.wb-node{flex-basis:118px;width:118px}.wb-node + .wb-node::before{width:26px}.wb-node + .wb-node::after{right:calc(100% + 11px)}
  .wb-footer{grid-template-columns:1fr}.wb-controls{justify-content:flex-start;gap:12px;overflow-x:auto;white-space:nowrap}
  #panel.workbench-open,.workbench-shell,.wb-nav,.wb-tier-tabs,.wb-resources,.wb-controls,.wb-tree,
  #panel.hearth-open,.hearth-upgrade-shell,.hearth-tree{scrollbar-width:none}
  #panel.workbench-open::-webkit-scrollbar,.workbench-shell::-webkit-scrollbar,.wb-nav::-webkit-scrollbar,
  .wb-tier-tabs::-webkit-scrollbar,.wb-resources::-webkit-scrollbar,.wb-controls::-webkit-scrollbar,
  .wb-tree::-webkit-scrollbar,#panel.hearth-open::-webkit-scrollbar,.hearth-upgrade-shell::-webkit-scrollbar,
  .hearth-tree::-webkit-scrollbar{width:0;height:0;display:none}
}

@media (prefers-reduced-motion:reduce){
  .wb-node,.wb-craft-button{transition:none}
  .wb-lane.weapons .wb-node,.wb-weapon-art img,.wb-weapon-fx i,.wb-node-progress i,.wb-craft-button > i{animation:none!important}
}

/* Craft completion is a brief UI flourish; the gameplay state is committed first. */
.crafting-burst{
  --craft-rarity:#e68a32;
  position:fixed;
  inset:0;
  z-index:30;
  display:grid;
  place-items:center;
  pointer-events:none;
  overflow:hidden;
  background:radial-gradient(circle at 50% 54%,color-mix(in srgb,var(--craft-rarity) 18%,transparent),transparent 31%);
  animation:craft-burst-fade 1.45s ease-out both;
}
.crafting-burst::before,.crafting-burst::after{
  content:"";
  position:absolute;
  left:50%;
  top:54%;
  width:92px;
  height:92px;
  border:2px solid var(--craft-rarity);
  border-radius:50%;
  box-shadow:0 0 24px color-mix(in srgb,var(--craft-rarity) 58%,transparent),inset 0 0 20px color-mix(in srgb,var(--craft-rarity) 32%,transparent);
  transform:translate(-50%,-50%) scale(.18);
  animation:craft-ring 1.05s cubic-bezier(.16,.72,.26,1) both;
}
.crafting-burst::after{animation-delay:.13s;opacity:.55}
.crafting-burst-card{
  position:relative;
  z-index:2;
  min-width:min(340px,82vw);
  padding:20px 28px 18px;
  border:1px solid color-mix(in srgb,var(--craft-rarity) 68%,#3b2a1d);
  border-radius:4px;
  background:rgba(10,9,8,.92);
  color:#f1e5d1;
  text-align:center;
  box-shadow:0 0 44px color-mix(in srgb,var(--craft-rarity) 24%,transparent);
  transform:translateY(18px) scale(.94);
  animation:craft-card-rise 1.3s cubic-bezier(.18,.82,.28,1) both;
}
.crafting-burst-card i{
  display:block;
  margin-bottom:7px;
  color:var(--craft-rarity);
  font:24px var(--display);
  font-style:normal;
  text-shadow:0 0 20px currentColor;
}
.crafting-burst-card b{display:block;font:18px var(--display);font-weight:500;text-transform:uppercase}
.crafting-burst-card small{display:block;margin-top:5px;color:#a99b87;font:9px var(--ui);letter-spacing:.14em;text-transform:uppercase}
.crafting-spark{
  position:absolute;
  left:50%;
  top:54%;
  width:4px;
  height:4px;
  border-radius:50%;
  background:var(--craft-rarity);
  box-shadow:0 0 8px currentColor;
  transform:rotate(calc(var(--i) * 30deg)) translateY(-8px);
  animation:craft-spark-flight .9s cubic-bezier(.15,.7,.22,1) both;
  animation-delay:calc(var(--i) * 18ms);
}
@keyframes craft-burst-fade{0%,67%{opacity:1}100%{opacity:0}}
@keyframes craft-ring{0%{transform:translate(-50%,-50%) scale(.18);opacity:1}100%{transform:translate(-50%,-50%) scale(5.2);opacity:0}}
@keyframes craft-card-rise{0%{transform:translateY(18px) scale(.94);opacity:0}18%,70%{transform:translateY(0) scale(1);opacity:1}100%{transform:translateY(-8px) scale(.98);opacity:0}}
@keyframes craft-spark-flight{0%{transform:rotate(calc(var(--i) * 30deg)) translateY(-8px) scale(1);opacity:1}100%{transform:rotate(calc(var(--i) * 30deg)) translateY(-190px) scale(.2);opacity:0}}
@media (prefers-reduced-motion:reduce){
  .crafting-burst{animation-duration:.8s}
  .crafting-burst::before,.crafting-burst::after,.crafting-spark{display:none}
  .crafting-burst-card{animation:craft-burst-fade .8s ease-out both}
}

/* Combat progression */
.combat-rites{max-width:1180px;margin:0 auto;color:#d9cfbd}
.rites-head{display:grid;grid-template-columns:minmax(260px,1.35fr) minmax(210px,.8fr) minmax(160px,.5fr);gap:12px;align-items:stretch;margin-bottom:18px;border-bottom:1px solid rgba(174,75,54,.3);padding-bottom:16px}
.rites-head>div{padding:14px 16px;border:1px solid rgba(199,145,99,.2);background:rgba(9,8,8,.72)}
.rites-head span,.rites-head small{color:#a99078;font:600 9px var(--ui);letter-spacing:.14em;text-transform:uppercase}
.rites-head h2{margin:4px 0 2px;color:#f0dfc5;font:500 30px var(--display);letter-spacing:0}
.rites-head h2 small{font-size:12px}.rites-head p{margin:3px 0 0;color:#948a7d;font-size:11px;line-height:1.45}
.rites-xp{display:flex;flex-direction:column;justify-content:center}.rites-xp i{height:8px;margin-top:10px;border:1px solid rgba(82,190,220,.34);background:#080c0e;overflow:hidden}.rites-xp i b{display:block;height:100%;background:linear-gradient(90deg,#176b88,#50c8e2);box-shadow:0 0 12px rgba(57,196,224,.35)}
.rites-points{text-align:center}.rites-points>b{display:block;margin:5px 0;color:#66564d;font:500 34px var(--display)}.rites-points.available{border-color:rgba(242,115,52,.58);box-shadow:inset 0 0 24px rgba(219,67,26,.08)}.rites-points.available>b{color:#ff8a43;text-shadow:0 0 15px rgba(255,86,35,.45)}
.rites-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.rite-node{position:relative;display:grid;grid-template-columns:48px 1fr auto;grid-template-areas:"icon copy rank" "track track track" "button button button";gap:8px 10px;min-height:164px;padding:14px;border:1px solid rgba(132,107,85,.26);background:linear-gradient(145deg,rgba(23,18,16,.92),rgba(8,8,9,.94));overflow:hidden}
.rite-node::before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:#9a4f34;opacity:.7}.rite-node:nth-child(2n)::before{background:#4d879d}.rite-node:nth-child(3n)::before{background:#8061a2}
.rite-icon{grid-area:icon;display:grid;place-items:center;width:46px;height:46px;border:1px solid rgba(219,107,59,.34);color:#e27440;font-size:23px;background:#120d0b}
.rite-copy{grid-area:copy;min-width:0}.rite-copy h3{margin:0;color:#e5d5be;font:500 16px var(--display);letter-spacing:0}.rite-copy p{margin:5px 0;color:#9d9284;font-size:10px;line-height:1.4}.rite-copy small{color:#bd8062;font-size:9px;line-height:1.3}
.rite-rank{grid-area:rank;text-align:right}.rite-rank b{display:block;color:#f0b06b;font:500 25px var(--display)}.rite-rank span{color:#756c63;font-size:9px}
.rite-track{grid-area:track;height:4px;background:#070707;border:1px solid rgba(229,216,191,.09)}.rite-track i{display:block;height:100%;background:#ba5c35;box-shadow:0 0 9px rgba(232,91,40,.38)}
.rite-node>button{grid-area:button;min-height:34px;border:1px solid rgba(211,110,66,.35);background:rgba(108,43,27,.18);color:#d8b091;font:600 9px var(--ui);letter-spacing:.13em;text-transform:uppercase;cursor:pointer}.rite-node>button:disabled{opacity:.36;cursor:not-allowed}.rite-node.mastered{border-color:rgba(196,156,84,.45)}.rite-node.mastered::before,.rite-node.mastered .rite-track i{background:#d0a652}
.rites-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:14px;padding:12px;border-top:1px solid rgba(212,136,80,.18);color:#8e8275;font-size:10px}.rites-footer button{min-height:34px}

/* Night 25 house creation and personal interior management */
.house-screen{max-width:1180px;margin:0 auto;color:#ded1bd}.house-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px;padding:16px 18px;border-bottom:1px solid rgba(206,125,64,.38);background:linear-gradient(90deg,rgba(45,25,16,.62),rgba(7,8,8,.74))}.house-head span,.house-head small{color:#c08053;font:600 9px var(--ui);letter-spacing:.15em;text-transform:uppercase}.house-head h2{margin:4px 0 2px;color:#f0dfc4;font:500 27px var(--display)}.house-head p{margin:0;color:#9b8d7c;font-size:11px}.house-seal{min-width:118px;text-align:center;border-left:1px solid rgba(217,135,74,.26)}.house-seal b{display:block;color:#ef9d55;font:500 32px var(--display)}
.house-builder{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(270px,.72fr);gap:14px}.house-options{display:grid;gap:10px}.house-options fieldset{margin:0;padding:10px 12px 12px;border:1px solid rgba(142,112,83,.23);background:rgba(9,9,9,.62)}.house-options legend{padding:0 7px;color:#cda16f;font:600 9px var(--ui);letter-spacing:.12em;text-transform:uppercase}
.house-choice-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.house-choice-row button,.house-room-grid button{min-height:39px;border:1px solid rgba(183,145,107,.2);background:rgba(28,23,20,.82);color:#afa18e;font:500 10px var(--ui);cursor:pointer}.house-choice-row button.selected,.house-room-grid button.selected{border-color:#d67b3d;background:rgba(111,50,25,.35);color:#f2ceb0;box-shadow:inset 0 -2px #d67b3d}.house-room-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.house-room-grid button{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:7px}.house-room-grid small{color:#817366;font-size:8px}.house-room-grid .selected small{color:#c99973}
.house-preview{min-height:420px;padding:14px;border:1px solid rgba(209,128,65,.26);background:radial-gradient(circle at 50% 44%,rgba(114,55,27,.26),transparent 47%),#090a09;text-align:center}.house-preview h3{margin:13px 0 4px;color:#e9d5b6;font:500 20px var(--display)}.house-preview p{margin:0 auto;max-width:270px;color:#958979;font-size:10px;line-height:1.45}.house-summary{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;margin-top:13px}.house-summary span{padding:4px 6px;border:1px solid rgba(199,148,94,.2);color:#ab8c6b;font-size:8px;text-transform:uppercase}
.house-preview-scene{position:relative;width:250px;height:205px;max-width:100%;margin:35px auto 0;filter:drop-shadow(0 18px 16px rgba(0,0,0,.65))}.preview-wall{position:absolute;left:28px;right:28px;bottom:15px;height:106px;display:flex;align-items:center;justify-content:space-around;border:3px solid #221915;background:#635343}.dark-stone .preview-wall{background:#3d3b3c}.ancient-bone .preview-wall{background:#776e5b}.preview-roof{position:absolute;z-index:2;left:12px;right:12px;top:10px;height:100px;clip-path:polygon(50% 0,100% 72%,94% 100%,6% 100%,0 72%);background:#30333b;border-bottom:5px solid #1a1818}.preview-roof.timber{background:#49392d}.preview-roof.stone{background:#37383b}.preview-wall i{width:29px;height:37px;border:3px solid #302116;background:#e6964e;box-shadow:0 0 15px rgba(255,127,51,.58)}.preview-wall i.round{height:29px;border-radius:50%}.preview-wall i.arched{border-radius:13px 13px 1px 1px}.preview-wall b{align-self:flex-end;width:42px;height:72px;border:3px solid #211611;background:#503526}.preview-wall b.iron{background:#343437}.preview-wall b.rune{background:#592b22;box-shadow:inset 0 0 10px #c6492f}.house-preview-scene.tower{width:205px}.house-preview-scene.courtyard{width:285px}.house-preview-scene.small{transform:scale(.86)}.house-preview-scene.large{transform:scale(1.04)}
.house-build{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px;padding:14px 16px;border:1px solid rgba(211,119,54,.28);background:rgba(25,15,11,.82)}.house-build span{color:#cb8f5c;font-size:9px;text-transform:uppercase;letter-spacing:.12em}.house-build p{margin:5px 0 0;color:#b9a48a;font-size:11px}.house-build button,.house-built-actions button{min-height:44px;padding:8px 18px;border:1px solid rgba(236,123,49,.55);background:rgba(113,47,22,.42);color:#f0c49a;font:600 10px var(--ui);letter-spacing:.12em;text-transform:uppercase;cursor:pointer}.house-build button:disabled,.house-built-actions button:disabled{opacity:.34;cursor:not-allowed}
.house-built-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:18px}.house-section-title{display:flex;justify-content:space-between;align-items:end;gap:12px;margin:10px 0;padding-bottom:8px;border-bottom:1px solid rgba(200,130,78,.2)}.house-section-title span{color:#dfb27c;font:500 17px var(--display)}.house-section-title small{color:#7f756b;font-size:9px}.house-decor-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.house-decor{display:grid;grid-template-columns:44px 1fr auto;gap:9px;align-items:center;min-height:74px;padding:10px;border:1px solid rgba(143,112,84,.22);background:rgba(10,10,10,.72)}.house-decor>i{font-style:normal;text-align:center;color:#b59b77;font-size:23px}.house-decor b,.house-decor span{display:block}.house-decor b{color:#d6c5ad;font:500 13px var(--display)}.house-decor span{margin-top:3px;color:#7e756b;font-size:8px;text-transform:uppercase}.house-decor button{min-height:32px;border:1px solid rgba(203,128,71,.32);background:#1a1210;color:#c49369;font-size:8px;text-transform:uppercase}.house-decor.locked{opacity:.38}.house-decor.placed{border-color:rgba(211,142,75,.58);box-shadow:inset 2px 0 #dc803f}.house-note{margin-top:14px;padding:10px 12px;border-left:2px solid #8f5b38;background:rgba(29,20,15,.58);color:#958779;font-size:9px}

body.using-gamepad .rite-node button.controller-focus,body.using-gamepad .house-screen button.controller-focus{outline:2px solid #f1904d;outline-offset:2px;box-shadow:0 0 18px rgba(239,103,45,.3)}
@media(max-width:860px){.rites-head{grid-template-columns:1fr 1fr}.rites-head>div:first-child{grid-column:1/-1}.rites-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.house-builder{grid-template-columns:1fr}.house-preview{min-height:320px}.house-decor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.rites-head,.rites-grid{grid-template-columns:1fr}.rite-node{grid-template-columns:42px 1fr auto}.rites-footer,.house-head,.house-build,.house-section-title{align-items:stretch;flex-direction:column}.house-choice-row,.house-room-grid,.house-built-actions,.house-decor-grid{grid-template-columns:1fr 1fr}.house-decor{grid-template-columns:38px 1fr}.house-decor button{grid-column:1/-1}.house-preview-scene.large{transform:scale(.9)}}

/* Workbench motion language: physical tools, restrained forge energy, fast input. */
.wb-node-track{scroll-behavior:smooth;scroll-snap-type:x proximity;overscroll-behavior-inline:contain}
.wb-lane.weapons .wb-node{scroll-snap-align:center;transform-style:preserve-3d;transition:transform 160ms cubic-bezier(.2,.8,.2,1),border-color 160ms ease,background 180ms ease,box-shadow 220ms ease,filter 180ms ease,opacity 180ms ease}
.wb-lane.weapons .wb-node:hover,.wb-lane.weapons .wb-node.controller-focus{transform:translateY(-4px) translateZ(10px) scale(1.035)}
.wb-lane.weapons .wb-node.selected{transform:translateY(-5px) translateZ(14px) scale(1.045)}
.wb-node-track.is-scrolling .wb-node:not(.selected){transform:scale(.975);filter:saturate(.72) brightness(.8)}
.wb-weapon-art.card{animation:wb-physical-idle 8.7s cubic-bezier(.45,0,.55,1) infinite;transform-origin:50% 64%}
.wb-weapon-art.hero{animation:wb-physical-hero 7.2s cubic-bezier(.45,0,.55,1) infinite;transform-origin:50% 62%}
.wb-weapon-art img{transition:filter 160ms ease,transform 180ms cubic-bezier(.2,.8,.2,1)}
.wb-weapon-shadow{position:absolute;z-index:0;left:24%;right:24%;bottom:10%;height:10%;border-radius:50%;background:rgba(0,0,0,.7);filter:blur(5px);transform-origin:center;animation:wb-shadow-breathe 8.7s ease-in-out infinite}
.wb-weapon-sheen{position:absolute;z-index:4;inset:8% 17%;opacity:.16;mix-blend-mode:screen;background:linear-gradient(112deg,transparent 26%,rgba(238,246,238,.42) 44%,transparent 60%);transform:translateX(-145%) skewX(-8deg);animation:wb-material-sheen 7.9s ease-in-out infinite;pointer-events:none}
.wb-weapon-art.effect-bone .wb-weapon-sheen{opacity:.11;filter:sepia(.25)}
.wb-weapon-art.effect-iron .wb-weapon-sheen{opacity:.23;animation-duration:6.8s}
.wb-weapon-art.effect-ember-axe .wb-weapon-sheen,.wb-weapon-art.effect-brand .wb-weapon-sheen,.wb-weapon-art.effect-spear-ember .wb-weapon-sheen{opacity:.18;background:linear-gradient(112deg,transparent 22%,rgba(255,129,48,.54) 46%,transparent 63%)}
.wb-node.locked .wb-weapon-art{animation-duration:16s}.wb-node.locked .wb-weapon-fx,.wb-node.locked .wb-weapon-sheen{opacity:.08;animation-play-state:paused}.wb-node.locked .wb-weapon-art img{filter:grayscale(.38) saturate(.45) brightness(.62) drop-shadow(0 8px 8px rgba(0,0,0,.76))}
.wb-node.locked:hover .wb-weapon-art img,.wb-node.locked.controller-focus .wb-weapon-art img{filter:grayscale(.24) saturate(.62) brightness(.77) drop-shadow(0 0 8px rgba(80,177,205,.22))}
.wb-node.locked:hover .wb-node-lock,.wb-node.locked.controller-focus .wb-node-lock{animation:wb-lock-emphasis .42s ease-out}
.wb-weapon-art.effect-spear-ember .wb-weapon-fx i{left:18%;bottom:18%;background:#ff9138;box-shadow:0 0 7px #ff5d20;animation:wb-edge-spark 2.45s calc(var(--i)*-.19s) linear infinite}
.wb-detail.wb-detail-leave>*{animation:wb-detail-leave 90ms ease-in both}.wb-detail.wb-detail-enter>*{animation:wb-detail-enter 220ms cubic-bezier(.2,.8,.2,1) both}
.wb-detail.wb-detail-enter>*:nth-child(2){animation-delay:18ms}.wb-detail.wb-detail-enter>*:nth-child(3){animation-delay:32ms}.wb-detail.wb-detail-enter>*:nth-child(n+4){animation-delay:45ms}
.wb-resource b,.wb-requirement b,.wb-detail-stats b{transition:color .2s ease,text-shadow .2s ease}.wb-requirement.met i{animation:wb-requirement-ok .36s ease-out}
.wb-vital.mastery::after,.wb-level>div i{transition:width .55s cubic-bezier(.2,.8,.2,1);box-shadow:0 0 7px rgba(224,126,45,.4)}
@keyframes wb-physical-idle{0%,100%{transform:translate3d(0,0,0) rotate(-.35deg)}45%{transform:translate3d(1px,-2.5px,0) rotate(.55deg)}72%{transform:translate3d(-.5px,-1px,0) rotate(.08deg)}}
@keyframes wb-physical-hero{0%,100%{transform:translate3d(0,1px,0) rotate(-.22deg) scale(.985)}48%{transform:translate3d(1.5px,-4px,0) rotate(.48deg) scale(1.01)}}
@keyframes wb-shadow-breathe{0%,100%{transform:scaleX(.94);opacity:.58}48%{transform:scaleX(1.04);opacity:.42}}
@keyframes wb-material-sheen{0%,67%{transform:translateX(-145%) skewX(-8deg)}82%,100%{transform:translateX(145%) skewX(-8deg)}}
@keyframes wb-detail-leave{to{opacity:0;transform:translateX(-9px) scale(.985)}}
@keyframes wb-detail-enter{from{opacity:0;transform:translateX(12px) scale(.975)}to{opacity:1;transform:none}}
@keyframes wb-lock-emphasis{50%{transform:scale(1.28);color:#d3a15f;text-shadow:0 0 9px rgba(229,145,64,.7)}}
@keyframes wb-requirement-ok{from{transform:scale(.55);opacity:.25}70%{transform:scale(1.24)}to{transform:none;opacity:1}}
@media(prefers-reduced-motion:reduce){.wb-weapon-art,.wb-weapon-art img,.wb-weapon-shadow,.wb-weapon-sheen,.wb-weapon-fx i,.wb-node,.wb-node-track{animation:none!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
