/* Build page */
.build-page { padding-bottom: 18px; }
.bd-panel { padding: 14px 16px 16px; border: 1px solid #433433; border-radius: 12px; background: linear-gradient(170deg, #1d1818, #110d0d); }
.bd-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.bd-panel-head h3 { margin: 0 0 4px; font-family: var(--title); font-size: 15px; letter-spacing: 1.6px; text-transform: uppercase; color: #d9c9b2; }
.bd-panel-head p { margin: 0; max-width: 620px; line-height: 1.45; }
.bd-bar { height: 6px; overflow: hidden; border-radius: 4px; background: #2e2424; }
.bd-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7a161c, #e5dacd); }
.bd-bar.mastery i { background: linear-gradient(90deg, #5d7a46, #b6e08f); }

/* Hero */
.bd-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 10px 18px 10px 10px;
  border: 1px solid #4d3a38;
  border-radius: 14px;
  background: radial-gradient(120% 140% at 0% 50%, #3a1a1c 0%, #140f0f 55%, #0e0b0b 100%);
  box-shadow: 0 6px 22px #0008;
}
.bd-hero-art { display: grid; place-items: end center; height: 150px; overflow: hidden; }
.bd-hero-art img { height: 170px; width: auto; margin-bottom: -14px; filter: drop-shadow(0 6px 8px #000c); }
.bd-hero-name { display: flex; align-items: center; gap: 12px; }
.bd-hero-name h2 { margin: 4px 0; font-family: var(--title); font-size: 30px; letter-spacing: 1px; color: #ebe2d7; }
.bd-level { display: flex; align-items: center; gap: 12px; max-width: 520px; margin-top: 8px; }
.bd-level-ring { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border: 2px solid #b3262e; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #5a1a1e, #151111); color: #e0d3c4; font-family: var(--title); font-size: 18px; font-weight: 700; box-shadow: 0 0 12px #b3262e44; }
.bd-level-bar { flex: 1; display: grid; gap: 4px; }
.bd-level-bar small { color: #a8998c; font-size: 11px; font-variant-numeric: tabular-nums; }
.bd-hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 180px; }
.bd-hero-actions button { min-height: 34px; }
.bd-points { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 12px; border: 1px solid #433433; border-radius: 14px; color: #a8998c; font-size: 12px; white-space: nowrap; }
.bd-points b { color: #cfc2b0; font-size: 14px; }
.bd-points.has-points { border-color: #b3262e; background: linear-gradient(#4a1418, #2a1012); color: #e9dfd3; box-shadow: 0 0 12px #b3262e33; }
.bd-points.has-points b { color: #efe8df; }

/* Two-column area */
.bd-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }

/* Attributes */
.bd-attr-list { display: grid; gap: 6px; }
.bd-attr {
  --tone: #e1d4c5;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #362b2a;
  border-radius: 10px;
  background: #171313;
}
.bd-attr.tone-blood { --tone: #f27c6c; }
.bd-attr.tone-hunt { --tone: #c9e292; }
.bd-attr.tone-heal { --tone: #d6c5b0; }
.bd-attr.tone-guard { --tone: #d3c1ab; }
.bd-attr.tone-energy { --tone: #7fe0cf; }
.bd-attr-glyph { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid color-mix(in srgb, var(--tone) 45%, #433433); border-radius: 9px; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--tone) 22%, transparent), #100d0d 75%); color: var(--tone); font-size: 18px; text-shadow: 0 0 8px var(--tone); }
.bd-attr-body { display: grid; gap: 2px; min-width: 0; }
.bd-attr-title { display: flex; align-items: baseline; gap: 10px; }
.bd-attr-title h4 { margin: 0; color: #ebe2d7; font-size: 14px; }
.bd-attr-title b { color: var(--tone); font-size: 16px; font-variant-numeric: tabular-nums; }
.bd-attr-alloc { margin-left: auto; color: #8e7776; font-size: 11px; }
.bd-attr p { margin: 0; }
.attribute-preview { color: #baab9a; }
.attribute-preview span { color: #8e7776; }
.attribute-preview b { color: #b6e08f; }
.bd-attr-buttons { display: flex; gap: 5px; }
.build-page .bd-attr-buttons button { min-width: 40px; min-height: 32px; padding: 0 8px; font-weight: 700; }
.build-page .bd-attr-buttons button:not(:disabled) { border-color: #b3262e; color: #e9dfd3; }
.bd-respec { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #332828; }

/* Combat sheet */
.bd-sheet-group + .bd-sheet-group { margin-top: 12px; }
.bd-sheet-group h4 { margin: 0 0 6px; color: #b4484d; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.bd-sheet-group dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 0; }
.bd-sheet-group dl > div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid #2a2222; font-size: 12.5px; }
.bd-sheet-group dt { color: #a8998c; }
.bd-sheet-group dd { margin: 0; color: #e7dcd0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Mastery */
.bd-mastery { margin-bottom: 14px; }
.bd-mastery-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #362b2a; border-radius: 10px; background: #171313; }
.bd-mastery-bonus { margin: 4px 0 0; color: #cfc2b0; font-size: 12.5px; }
.bd-unlocks { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bd-unlock { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid #362b2a; border-radius: 9px; opacity: .55; }
.bd-unlock.open { opacity: 1; border-color: #5d7a46; }
.bd-unlock .bd-unlock-icon { display: grid; place-items: center; width: 34px; height: 34px; padding: 5px; border: 1px solid #4d3a38; border-radius: 7px; background: #100d0d; }
.bd-unlock:not(.open) .bd-unlock-icon { filter: grayscale(1); }
.bd-unlock .bd-unlock-icon svg { width: 100%; height: 100%; }
.bd-unlock strong { display: block; color: #ebe2d7; font-size: 12px; white-space: nowrap; }
.bd-unlock small { color: #8e7776; font-size: 10.5px; white-space: nowrap; }
.bd-unlock.open small { color: #b6e08f; }
.bd-weapons { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.bd-weapon { display: grid; grid-template-rows: auto auto auto; justify-items: stretch; gap: 6px; padding: 10px; border: 1px solid #362b2a; border-radius: 10px; background: #171313; }
.bd-weapon.active { border-color: #b3262e; background: linear-gradient(170deg, #251d1d, #100d0d); box-shadow: 0 0 0 1px #b3262e44; }
.bd-weapon-art { display: grid; place-items: center; height: 64px; }
.bd-weapon-art img { max-height: 60px; width: auto; filter: drop-shadow(0 3px 4px #000c); }
.bd-weapon-body { display: grid; gap: 4px; }
.bd-weapon-title { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.bd-weapon-title strong { overflow: hidden; color: #ebe2d7; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.bd-weapon-title span { flex: 0 0 auto; color: #b6e08f; font-size: 11px; font-weight: 700; }
.bd-weapon small { color: #8e7776; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.bd-equipped { align-self: center; justify-self: center; color: #e5dacd; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.build-page .bd-weapon button { min-height: 28px; }
.bd-weapon-note { margin: 10px 0 0; }

/* Loadouts and sets */
.bd-bottom { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); }
.bd-loadouts .loadout-panel, .bd-sets > .panel { height: 100%; margin: 0 !important; padding: 14px 16px 16px; border: 1px solid #433433; border-radius: 12px; background: linear-gradient(170deg, #1d1818, #110d0d); }
.bd-loadouts h3, .bd-sets h3 { margin: 0 0 4px; font-family: var(--title); font-size: 15px; letter-spacing: 1.6px; text-transform: uppercase; color: #d9c9b2; }
.bd-loadouts .loadout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.bd-loadouts .loadout-card { padding: 10px; border: 1px solid #362b2a; border-radius: 10px; background: #171313; }
.bd-loadouts .loadout-card h4 { margin: 0; color: #ebe2d7; font-size: 13px; }
.bd-loadouts .loadout-card p { margin: 4px 0 8px; color: #a8998c; font-size: 12px; }
.bd-sets p { margin: 6px 0 0; padding: 6px 0; border-bottom: 1px solid #2a2222; color: #cfc2b0; font-size: 12.5px; }

@media (max-width: 1500px) and (min-width: 961px) {
  .bd-weapons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bd-unlocks { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 1200px) {
  .bd-grid, .bd-bottom { grid-template-columns: minmax(0, 1fr); }
  .bd-mastery-current { flex-direction: column; align-items: stretch; }
  .bd-unlocks { flex-wrap: wrap; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .bd-hero { grid-template-columns: 90px minmax(0, 1fr); padding-right: 12px; }
  .bd-hero-art { height: 110px; }
  .bd-hero-art img { height: 124px; }
  .bd-hero-name h2 { font-size: 24px; }
  .bd-hero-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .bd-weapons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-sheet-group dl { grid-template-columns: 1fr; }
  .bd-loadouts .loadout-grid { grid-template-columns: 1fr; }
  .bd-attr { grid-template-columns: 34px minmax(0, 1fr); }
  .bd-attr-glyph { width: 34px; height: 34px; }
  .bd-attr-buttons { grid-column: 2; }
}
.bd-weapon-art { color: #dfd1c1; font-size: 40px; line-height: 1; text-shadow: 0 2px 6px #000; }

/* ---- The Bloodline talent tree ---- */
.tl-section { margin: 0 0 14px; padding: 16px 16px 16px; border: 1px solid #47302d; border-radius: 14px; background: radial-gradient(120% 90% at 50% 0%, #2a1413 0%, #140d0d 55%, #0d0909 100%); box-shadow: inset 0 1px 0 #ffffff0d, 0 18px 40px #0007; }
.tl-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.tl-head h2 { margin: 4px 0 2px; font-family: var(--title); font-size: 26px; letter-spacing: 1.5px; color: #f1e2cf; text-shadow: 0 0 22px #c2372a55; }
.tl-head p { margin: 0; }
.tl-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.tl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--c) 45%, #3a2b29); border-radius: 999px; background: color-mix(in srgb, var(--c) 10%, #120c0c); font-size: 12px; color: #dccbb8; }
.tl-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.tl-chip b { color: #fff3e3; font-variant-numeric: tabular-nums; }
.tl-points { padding: 7px 14px; border-radius: 999px; border: 1px solid #4b3734; color: #b8a597; font-size: 13px; background: #140d0d; }
.tl-points b { font-size: 16px; color: #efe0cd; margin-right: 3px; }
.tl-points.has { border-color: #e0533f; color: #ffe2cf; background: linear-gradient(180deg, #4a1712, #2a0d0b); animation: tl-pulse 2.2s ease-in-out infinite; }
.tl-points.has b { color: #fff; }
@keyframes tl-pulse { 0%,100% { box-shadow: 0 0 0 0 #e0533f00; } 50% { box-shadow: 0 0 18px 2px #e0533f66; } }

.tl-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: stretch; }
.tl-canvas { position: relative; height: clamp(480px, 66vh, 760px); border: 1px solid #3b2a28; border-radius: 12px; overflow: hidden; background: radial-gradient(60% 60% at 50% 52%, #241111 0%, #0f0a0a 70%, #090606 100%); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.tl-canvas:active { cursor: grabbing; }
.tl-canvas::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px 20px #000a; border-radius: inherit; }
.tl-svg { display: block; width: 100%; height: 100%; }
.tl-orbit { fill: none; stroke: #ffffff0d; stroke-width: 2; stroke-dasharray: 4 14; }
.tl-pathlabel { fill: var(--c); font-family: var(--title); font-size: 34px; letter-spacing: 6px; text-anchor: middle; opacity: .5; pointer-events: none; }
.tl-pathpts { fill: var(--c); font-family: var(--title); font-size: 26px; text-anchor: middle; opacity: .7; pointer-events: none; }

.tl-link { stroke: #2e2321; stroke-width: 5; stroke-linecap: round; }
.tl-link.reach { stroke: #5b4741; stroke-dasharray: 2 10; }
.tl-link.on { stroke-width: 7; }
.tl-link.on.p-butcher { stroke: #e0533f; filter: drop-shadow(0 0 6px #e0533f); }
.tl-link.on.p-occultist { stroke: #9b6bff; filter: drop-shadow(0 0 6px #9b6bff); }
.tl-link.on.p-warden { stroke: #d9a441; filter: drop-shadow(0 0 6px #d9a441); }
.tl-link.on.p-bridge { stroke: #d8c4b0; filter: drop-shadow(0 0 6px #d8c4b0aa); }

.tl-node { cursor: pointer; outline: none; }
.tl-node .tl-shape { fill: #171010; stroke: #44352f; stroke-width: 3; transition: stroke-width .15s, fill .2s; }
.tl-node .tl-icon { fill: #55463f; pointer-events: none; }
.tl-node .tl-ring { fill: none; stroke: #4a3a35; stroke-width: 2; opacity: .8; }
.tl-node:hover .tl-shape, .tl-node:focus-visible .tl-shape { stroke-width: 6; }
.tl-node.s-reach .tl-shape { stroke: var(--c); stroke-opacity: .45; }
.tl-node.s-reach .tl-icon { fill: #8b7a70; }
.tl-node.s-open .tl-shape { stroke: var(--c); stroke-width: 4; animation: tl-open 1.8s ease-in-out infinite; }
.tl-node.s-open .tl-icon { fill: var(--c); }
.tl-node.s-open .tl-ring { stroke: var(--c); opacity: .55; }
@keyframes tl-open { 0%,100% { stroke-opacity: .55; } 50% { stroke-opacity: 1; } }
.tl-node.s-part .tl-shape { fill: #2b1a18; stroke: var(--c); stroke-width: 4; }
.tl-node.s-part .tl-icon { fill: var(--c); }
.tl-node.s-on .tl-shape { fill: var(--c); stroke: #fff4e2; stroke-opacity: .55; stroke-width: 3; filter: url(#tl-glow); }
.tl-node.s-on .tl-icon { fill: #1b0e0c; }
.tl-node.s-on .tl-ring { stroke: var(--c); opacity: 1; filter: url(#tl-glow); }
.tl-node.k-root .tl-shape { fill: #2d0f0d; stroke: #e0533f; stroke-width: 4; filter: url(#tl-glow); }
.tl-node.k-root .tl-icon { fill: #f0c9a8; }
.tl-node .tl-sel { fill: none; stroke: #fff; stroke-width: 2.5; stroke-dasharray: 7 7; opacity: .9; }
.tl-node .tl-name { fill: #e6d6c4; font-family: var(--title); font-size: 23px; text-anchor: middle; paint-order: stroke; stroke: #0b0707; stroke-width: 6px; pointer-events: none; }
.tl-node.s-locked .tl-name { fill: #8a7a70; }
.tl-node.k-keystone .tl-name { font-size: 26px; fill: #f6e6d2; }
.tl-node .tl-rank { fill: #a6958a; font-size: 16px; text-anchor: middle; font-weight: 700; paint-order: stroke; stroke: #0b0707; stroke-width: 4px; pointer-events: none; }
.tl-node.s-on .tl-rank, .tl-node.s-part .tl-rank { fill: #f1e0cc; }

.tl-tools { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.tl-tools button { width: 34px; height: 34px; padding: 0; border-radius: 9px; font-size: 18px; line-height: 1; background: #1a1212e6; }
.tl-legend { position: absolute; left: 12px; bottom: 10px; display: flex; gap: 12px; font-size: 11px; color: #9c8b80; z-index: 2; pointer-events: none; }
.tl-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 2px solid #4a3a35; background: #171010; }
.tl-legend .s-on::before { background: #e0533f; border-color: #ffd8c6; box-shadow: 0 0 6px #e0533f; }
.tl-legend .s-open::before { border-color: #e0533f; }

.tl-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tl-inspect { --c: #d9b48a; padding: 14px; border: 1px solid #3d2c2a; border-left: 3px solid var(--c); border-radius: 12px; background: linear-gradient(170deg, #1f1716, #120d0d); }
.tl-inspect h3 { margin: 3px 0 0; font-family: var(--title); font-size: 20px; color: #f3e4d1; }
.tl-inspect-head { display: flex; gap: 12px; align-items: center; }
.tl-inspect-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, #140d0d); border: 2px solid var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); }
.tl-inspect.k-keystone .tl-inspect-icon { border-radius: 10px; transform: rotate(45deg); }
.tl-inspect.k-keystone .tl-inspect-icon svg { transform: rotate(-45deg); }
.tl-inspect-icon svg { width: 24px; height: 24px; fill: var(--c); }
.tl-flavor { margin: 10px 0 0; font-style: italic; color: #a8968a; font-size: 13px; }
.tl-lines { margin-top: 10px; padding: 9px 11px; border-radius: 9px; background: #0e0a0a; border: 1px solid #2e2220; }
.tl-lines small { display: block; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: #8f7e74; margin-bottom: 4px; }
.tl-lines p { margin: 3px 0; font-size: 13.5px; color: #e8d9c7; }
.tl-lines.next p { color: color-mix(in srgb, var(--c) 70%, #fff); }
.tl-gate { margin-top: 10px; font-size: 12px; color: #b9a698; }
.tl-gate-bar { height: 6px; margin-top: 5px; border-radius: 3px; background: #241a19; overflow: hidden; }
.tl-gate-bar i { display: block; height: 100%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.tl-reason { margin: 10px 0 0; font-size: 12.5px; color: #d58f80; }
.tl-inspect-act { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.tl-learn { flex: 1; }
.tl-learned { flex: 1; text-align: center; padding: 8px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c) 50%, #3a2b29); color: var(--c); font-weight: 700; letter-spacing: .5px; }
.tl-intro p { margin: 8px 0; }
.tl-paths { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.tl-paths li { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 8px 10px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--c) 35%, #2e2220); background: color-mix(in srgb, var(--c) 7%, #100b0b); }
.tl-paths b { color: var(--c); font-family: var(--title); letter-spacing: 1px; }
.tl-paths small { grid-column: 1; color: #8f7e74; font-size: 11px; }
.tl-paths span { grid-column: 1 / -1; font-size: 12.5px; color: #cdbcad; }
.tl-paths em { grid-row: 1; grid-column: 2; font-style: normal; font-size: 12px; color: #e9d7c4; }
.tl-bonuses { padding: 12px 14px; border: 1px solid #3a2a28; border-radius: 12px; background: #110c0c; }
.tl-bonuses h4 { margin: 0 0 8px; font-family: var(--title); font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: #d9c9b2; }
.tl-bonus { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: #e2d3c1; }
.tl-bonus li::before { content: "◆"; color: #e0533f; font-size: 9px; margin-right: 7px; vertical-align: 2px; }
.tl-bonus li.special { color: #f1d8a6; }
.tl-bonus li.special::before { color: #d9a441; }

.bd-attr-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 12px; }
.bd-attr-chips span { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border: 1px solid #332624; border-radius: 8px; background: #120d0d; }
.bd-attr-chips small { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: #8d7c71; }
.bd-attr-chips b { font-size: 16px; color: #efdfcb; font-variant-numeric: tabular-nums; }
.bd-wstrip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bd-wcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border: 1px solid #3a2b29; border-radius: 10px; background: #130e0e; text-align: center; }
.bd-wcard.active { border-color: #c2372a; background: linear-gradient(180deg, #2a1110, #140d0d); box-shadow: 0 0 16px #c2372a33; }
.bd-wart { display: grid; place-items: center; width: 54px; height: 54px; }
.bd-wart img { width: 54px; height: 54px; object-fit: contain; }
.bd-wcard strong { font-size: 13px; color: #ecdcc8; }
.bd-wm { font-size: 11px; color: #9eb78a; }
.bd-wcard .bd-bar { width: 100%; }
.bd-wcard button { width: 100%; margin-top: 2px; }
.bd-wcard .bd-equipped { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: #e0533f; margin-top: 4px; }

@media (max-width: 1200px) { .tl-body { grid-template-columns: minmax(0, 1fr) 280px; } }

.tl-quick { display: none; }
@media (max-width: 960px) {
 .tl-quick { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 55%, #3a2b29); border-left: 3px solid var(--c); background: #120c0cf2; box-shadow: 0 10px 30px #000c; }
 .tl-quick > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
 .tl-quick b { color: #f2e2cf; font-family: var(--title); font-size: 15px; }
 .tl-quick small { color: #8f7e74; font-size: 11px; }
 .tl-quick span { color: color-mix(in srgb, var(--c) 70%, #fff); font-size: 12.5px; }
 .tl-quick button { flex: none; min-width: 84px; }
 .tl-quick em { font-style: normal; color: var(--c); font-weight: 700; font-size: 13px; }
 .tl-canvas:has(.tl-quick) .tl-legend { display: none; }
 .tl-body { grid-template-columns: 1fr; }
 .tl-canvas { height: min(62vh, 560px); }
 .tl-head h2 { font-size: 22px; }
 .tl-head-right { justify-content: flex-start; }
}
@media (max-width: 760px) {
 .tl-section { padding: 12px 10px; border-radius: 12px; }
 .bd-attr-chips { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
 .bd-attr-chips b { font-size: 14px; }
 .bd-attr-chips small { font-size: 8.5px; letter-spacing: .4px; }
}

/* ---- Item modal ---- */
.overlay { cursor: pointer; backdrop-filter: blur(3px); }
.overlay .dialog { cursor: auto; }
.dialog:has(.eqd) { width: min(560px, calc(100vw - 24px)); padding: 0; border: 1px solid color-mix(in srgb, var(--rc, #6b4b45) 40%, #3a2a28); border-radius: 16px; background: linear-gradient(180deg, #1c1414 0%, #120d0d 100%); box-shadow: 0 30px 80px #000c, 0 0 0 1px #ffffff08 inset; overflow-x: hidden; }
.dialog:has(.eqd) .close-row { position: sticky; top: 0; z-index: 3; height: 0; display: flex; justify-content: flex-end; padding: 0; }
.dialog:has(.eqd) .close-row .close { margin: 12px 12px 0 0; width: 34px; height: 34px; border-radius: 50%; background: #0f0a0acc; }
.eqd { padding: 0 0 4px; }
.eqd-head { display: flex; gap: 16px; align-items: center; padding: 22px 56px 18px 20px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--rc) 22%, transparent) 0%, transparent 60%); border-bottom: 1px solid #2e2220; }
.eqd-art { flex: none; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 14px; border: 2px solid color-mix(in srgb, var(--rc) 70%, #3a2a28); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 22%, #1b1313), #0d0909); box-shadow: 0 0 22px color-mix(in srgb, var(--rc) 35%, transparent), inset 0 0 18px #000a; overflow: hidden; }
.eqd-art img, .eqd-art .equipment-art { width: 76px !important; height: 76px !important; object-fit: contain; }
.eqd-title { min-width: 0; }
.eqd-rarity { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--rc); font-weight: 700; }
.eqd-title h2 { margin: 3px 0 8px; font-family: var(--title); font-size: 24px; line-height: 1.15; color: #f4e6d4; }
.eqd-plus { color: #f2c46a; }
.eqd-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.eqd-chip { padding: 3px 8px; border-radius: 999px; border: 1px solid #3a2b29; background: #140e0e; font-size: 11px; color: #c9b8a9; }
.eqd-chip.bad { border-color: #8a3a30; color: #f09a8a; }
.eqd-chip.bound { border-color: #6b4b8a; color: #c8a8f0; }
.eqd-chip.locked { border-color: #7a6a3a; color: #e6cf8a; }
.eqd-chip.worn { border-color: #3f6b48; color: #9fd8a8; }
.eqd-primary { display: flex; gap: 8px; padding: 14px 20px 0; }
.eqd-primary div { flex: 1; padding: 10px 12px; border-radius: 10px; background: #0f0b0b; border: 1px solid #2e2220; }
.eqd-primary small { display: block; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: #8f7e74; }
.eqd-primary b { font-size: 20px; color: #f1e2cf; font-variant-numeric: tabular-nums; }
.eqd-props { list-style: none; margin: 10px 20px 0; padding: 0; display: grid; gap: 0; border-radius: 10px; border: 1px solid #2e2220; overflow: hidden; }
.eqd-props li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 13px; background: #130e0e; }
.eqd-props li + li { border-top: 1px solid #241b1a; }
.eqd-props span { color: #b5a497; }
.eqd-props b { color: #9fd8a8; font-weight: 600; text-align: right; }
.eqd-props li.empty b { color: #6f6159; font-weight: 400; font-style: italic; }
.eqd-signature { margin: 10px 20px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid #7a5a2a; background: linear-gradient(180deg, #2a1d0e, #160f09); color: #f2d49a; font-size: 13px; }
.eqd > p.small { margin: 8px 20px 0; }
.eqd-warn { margin: 10px 0 0; padding: 9px 12px; border-radius: 9px; border: 1px solid #6b2a24; background: #2a100e; color: #f0b3a8 !important; font-size: 12.5px; }
.eqd > .eqd-warn { margin: 10px 20px 0; }
.eqd-note { margin: 8px 0 0; font-size: 11.5px; color: #8f7e74 !important; }
.eqd-section { padding: 16px 20px 4px; }
.eqd-section h3, .eqd-panel h3 { margin: 0 0 10px; font-family: var(--title); font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: #d9c9b2; }
.eqd-compare { padding: 12px; border-radius: 12px; border: 1px solid #332624; background: #0f0b0b; }
.eqd-compare + .eqd-compare { margin-top: 8px; }
.eqd-compare-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.eqd-compare-head small { display: block; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: #8f7e74; }
.eqd-compare-head b { font-size: 14px; color: #ecdcc8; }
.eqd-compare-head em { font-style: normal; font-size: 11px; margin-left: 6px; }
.eqd-equip { flex: none; min-width: 110px; }
.eqd .stat-diff { width: 100%; border-collapse: collapse; font-size: 13px; }
.eqd .stat-diff caption { display: none; }
.eqd .stat-diff th { text-align: left; font-weight: 500; color: #b9a89b; padding: 5px 0; }
.eqd .stat-diff td { text-align: right; padding: 5px 0 5px 10px; color: #d8c8b6; font-variant-numeric: tabular-nums; }
.eqd .stat-diff td[aria-hidden] { color: #5d4f48; }
.eqd .stat-diff tr + tr th, .eqd .stat-diff tr + tr td { border-top: 1px solid #211918; }
.eqd .stat-diff tr.gain td.delta { color: #7fd08f; font-weight: 700; }
.eqd .stat-diff tr.loss td.delta { color: #ef7d6d; font-weight: 700; }
.eqd .stat-diff td.delta { min-width: 64px; color: #5d4f48; }
.eqd-tabs { display: flex; gap: 4px; margin: 14px 20px 0; padding: 4px; border-radius: 12px; background: #0d0909; border: 1px solid #2a201e; }
.eqd-tabs button { flex: 1; min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: #a8968a; font-size: 13px; font-weight: 600; }
.eqd-tabs button.active { background: linear-gradient(180deg, #3a1714, #241010); color: #fbe6d4; box-shadow: inset 0 0 0 1px #6b2a24; }
.eqd-panel { padding: 14px 20px 6px; }
.eqd-panel > h3:first-child { display: none; }
.eqd-panel .modifier-slots { display: grid; gap: 8px; margin: 10px 0; }
.eqd-augs { display: grid; gap: 8px; }
.eqd-aug { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid #2e2220; background: #110c0c; }
.eqd-aug b { color: #ecdcc8; font-size: 13.5px; }
.eqd-aug span { grid-column: 1; font-size: 12px; color: #a8968a; }
.eqd-aug button, .eqd-aug em { grid-row: 1 / 3; grid-column: 2; }
.eqd-aug em { font-style: normal; font-size: 12px; font-weight: 700; color: #9fd8a8; }
.eqd-aug.on { border-color: #3f6b48; background: #0f160f; }
.eqd-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 20px; border-top: 1px solid #2a201e; background: linear-gradient(180deg, #120d0df0, #0d0909); }
.eqd-bind { margin-left: auto; font-size: 11px; color: #7f6f66; }
@media (max-width: 560px) {
 .eqd-head { padding: 18px 50px 14px 14px; gap: 12px; }
 .eqd-art { width: 68px; height: 68px; }
 .eqd-art img, .eqd-art .equipment-art { width: 58px !important; height: 58px !important; }
 .eqd-title h2 { font-size: 20px; }
 .eqd-primary, .eqd-section, .eqd-panel { padding-left: 14px; padding-right: 14px; }
 .eqd-props, .eqd-tabs, .eqd-signature { margin-left: 14px; margin-right: 14px; }
 .eqd-foot { padding: 10px 14px; }
 .eqd-bind { display: none; }
}
#modal .overlay { z-index: 200; }
.dialog:has(.eqd) .close-row .close:focus { outline: none; }
.dialog:has(.eqd) .close-row .close:focus-visible { outline: 2px solid #e0533f; outline-offset: 2px; }

/* ---- Bag tiles: quality readable at a glance ---- */
.item-grid .item-tile { position: relative; overflow: hidden; border: 2px solid color-mix(in srgb, var(--rarity) 85%, #000); border-radius: 8px; background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--rarity) 30%, transparent) 0%, transparent 62%), linear-gradient(180deg, #1a1414, #0e0a0a); box-shadow: inset 0 0 14px color-mix(in srgb, var(--rarity) 22%, transparent); }
.item-grid .item-tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--rarity); box-shadow: 0 0 8px var(--rarity); }
.item-grid .item-tile .item-tier { position: absolute; top: 3px; left: 3px; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--rarity) 35%, #0c0808); color: #fff; font-weight: 700; font-size: 9px; line-height: 1.3; }
.item-grid .item-tile:hover { border-color: var(--rarity); background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--rarity) 42%, transparent) 0%, transparent 65%), #1c1515; }
.item-grid .item-tile[data-r="0"] { border-color: #4a4644; box-shadow: none; background: linear-gradient(180deg, #181414, #0e0a0a); }
.item-grid .item-tile[data-r="0"]::after { opacity: .45; box-shadow: none; }
.item-grid .item-tile[data-r="0"] .item-tier { background: #2a2525; color: #c9c2bb; }
.item-grid .item-tile[data-r="3"] { box-shadow: inset 0 0 18px color-mix(in srgb, var(--rarity) 35%, transparent), 0 0 10px color-mix(in srgb, var(--rarity) 45%, transparent); }
.item-grid .item-tile[data-r="4"], .item-grid .item-tile[data-r="5"] { box-shadow: inset 0 0 20px color-mix(in srgb, var(--rarity) 45%, transparent), 0 0 14px color-mix(in srgb, var(--rarity) 60%, transparent); animation: tile-glow 2.6s ease-in-out infinite; }
@keyframes tile-glow { 50% { box-shadow: inset 0 0 26px color-mix(in srgb, var(--rarity) 55%, transparent), 0 0 20px color-mix(in srgb, var(--rarity) 75%, transparent); } }
@media (prefers-reduced-motion: reduce) { .item-grid .item-tile { animation: none !important; } }

/* ---- Auto-salvage strip ---- */
.salvage-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; padding: 8px 10px; border: 1px solid #332624; border-radius: 10px; background: #110c0c; }
.salvage-label { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: #9c8b80; }
.salvage-opts { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: #0b0808; border: 1px solid #2a201e; }
.salvage-opts button { min-height: 28px; padding: 3px 10px; border: 0; border-radius: 7px; background: transparent; color: #b4a296; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.salvage-opts button i { width: 8px; height: 8px; border-radius: 50%; }
.salvage-opts button.active { background: linear-gradient(180deg, #3a1714, #241010); color: #fbe6d4; box-shadow: inset 0 0 0 1px #6b2a24; }
.salvage-now { margin-left: auto; }
.salvage-now b { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #c2372a; color: #fff; font-size: 11px; }
.salvage-hint { margin-left: auto; font-size: 11px; color: #7f6f66; }
@media (max-width: 560px) { .salvage-now, .salvage-hint { margin-left: 0; } .salvage-opts { width: 100%; } .salvage-opts button { flex: 1; justify-content: center; padding: 3px 4px; } }

/* ---- Characters ---- */
.nav-hero-wrap { position: relative; }
.nav-hero-wrap .nav-hero { width: 100%; padding-right: 44px; }
.nav-switch { position: absolute; z-index: 2; right: 8px; top: 50%; transform: translateY(-50%); margin-top: 4px; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border-radius: 8px; border: 1px solid #4a3532; background: #1a1212; }
.nav-switch svg { width: 16px; height: 16px; fill: #d9b48a; }
.nav-switch:hover { border-color: #c2372a; }
.nav-switch:hover svg { fill: #fff; }
.dialog:has(.ch) { width: min(620px, calc(100vw - 24px)); }
.ch h2 { margin: 4px 0 6px; font-family: var(--title); }
.ch-list { display: grid; gap: 10px; margin-top: 14px; }
.ch-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px 10px 10px; border: 1px solid #3a2a28; border-radius: 12px; background: linear-gradient(90deg, #1d1515, #110c0c); text-align: left; }
.ch-card.current { border-color: #c2372a; box-shadow: 0 0 18px #c2372a33; background: linear-gradient(90deg, #2c1312, #130d0d); }
.ch-portrait { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #3a1714, #0d0909); border: 1px solid #4a3532; display: grid; place-items: center; }
.ch-portrait img, .ch-portrait .sprite { width: 64px; height: 64px; object-fit: cover; object-position: top; }
.ch-info { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ch-info b { font-family: var(--title); font-size: 17px; color: #f2e2cf; }
.ch-info span { font-size: 13px; color: #d4c2b0; }
.ch-info small { font-size: 11.5px; color: #8f7e74; }
.ch-playing { font-style: normal; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: #e0533f; font-weight: 700; }
.ch-new { cursor: pointer; border-style: dashed; background: #100b0b; color: inherit; }
.ch-new:hover { border-color: #c2372a; }
.ch-plus { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 10px; border: 1px dashed #5a403c; font-size: 30px; color: #d9b48a; }
.ch-name { display: grid; gap: 6px; margin: 14px 0 12px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #9c8b80; }
.ch-name input { padding: 10px 12px; font-size: 15px; border-radius: 9px; }
.ch-weapons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ch-weapon { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid #3a2a28; border-radius: 10px; background: #120d0d; color: #d8c8b6; }
.ch-weapon span { width: 52px; height: 52px; display: grid; place-items: center; }
.ch-weapon span img { width: 52px; height: 52px; object-fit: contain; }
.ch-weapon.active { border-color: #c2372a; background: linear-gradient(180deg, #2c1312, #130d0d); box-shadow: 0 0 14px #c2372a44; color: #fff; }
@media (max-width: 520px) { .ch-portrait, .ch-plus { width: 52px; height: 52px; } .ch-portrait img { width: 52px; height: 52px; } }
.ch-locked { opacity: .6; border-style: dashed; }
.ch-locked .ch-plus svg { width: 22px; height: 22px; fill: #8f7e74; }
.nav-save { display: block; width: 100%; margin-top: 8px; padding: 6px 8px; border-radius: 8px; border: 1px solid #c2372a; background: linear-gradient(180deg, #3a1714, #241010); color: #fbe6d4; font-size: 11.5px; font-weight: 600; letter-spacing: .3px; }
.nav-save:hover { background: #4a1a16; }

/* ---- Account screens ---- */
.dialog:has(.ac) { width: min(460px, calc(100vw - 24px)); }
.dialog:has(.ac-settings) { width: min(680px, calc(100vw - 24px)); }
.ac h2 { margin: 6px 0 4px; font-family: var(--title); font-size: 26px; color: #f4e6d4; }
.ac-sub { margin: 0 0 16px; color: #a8968a !important; font-size: 14px; }
.ac-field { display: grid; gap: 6px; margin-bottom: 12px; }
.ac-field > span:first-child { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: #9c8b80; }
.ac-field input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid #3f2e2b; background: #0f0b0b; color: #f1e2cf; font-size: 15px; }
.ac-field input:focus { outline: none; border-color: #c2372a; box-shadow: 0 0 0 3px #c2372a33; }
.ac-pw { position: relative; display: block; }
.ac-pw input { padding-right: 44px; }
.ac-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; }
.ac-eye svg { width: 18px; height: 18px; fill: #7f6f66; }
.ac-eye.on svg { fill: #e0533f; }
.ac-meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 4px; align-items: center; margin: -4px 0 12px; }
.ac-meter i { height: 4px; border-radius: 2px; background: #2a201e; }
.ac-meter small { margin-left: 8px; font-size: 11px; color: #8f7e74; }
.ac-meter[data-score="1"] i:nth-child(-n+1) { background: #c2372a; }
.ac-meter[data-score="2"] i:nth-child(-n+2) { background: #d98a3a; }
.ac-meter[data-score="3"] i:nth-child(-n+3) { background: #c9b24a; }
.ac-meter[data-score="4"] i { background: #5fb36e; }
.ac-row { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 14px; }
.ac-check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #cdbcab; }
.ac-check input { width: 16px; height: 16px; min-height: 0; }
.ac-link { padding: 0; min-height: 0; border: 0; background: none; color: #e98a7c; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.ac-actions button.primary { width: 100%; min-height: 44px; font-size: 15px; }
.ac-switch { margin: 14px 0 0; text-align: center; font-size: 13px; color: #8f7e74 !important; }
.ac-hero { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid #2e2220; }
.ac-hero > div { flex: 1; min-width: 0; }
.ac-hero h2 { margin: 2px 0; }
.ac-hero .ac-sub { margin: 0; }
.ac-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--title); font-size: 24px; color: #fff; background: radial-gradient(circle at 40% 35%, #c2372a, #4a1210); box-shadow: 0 0 18px #c2372a55; }
.ac-tabs { display: flex; gap: 4px; margin: 14px 0; padding: 4px; border-radius: 12px; background: #0d0909; border: 1px solid #2a201e; overflow-x: auto; }
.ac-tabs button { flex: 1; white-space: nowrap; min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: #a8968a; font-size: 13px; font-weight: 600; }
.ac-tabs button.active { background: linear-gradient(180deg, #3a1714, #241010); color: #fbe6d4; box-shadow: inset 0 0 0 1px #6b2a24; }
.ac-tabs .danger-tab { color: #d07a6c; }
.ac-card { padding: 16px; border-radius: 12px; border: 1px solid #332523; background: #120d0d; }
.ac-card + .ac-card { margin-top: 12px; }
.ac-card h3 { margin: 0 0 4px; font-family: var(--title); font-size: 15px; letter-spacing: 1px; color: #ecdcc8; }
.ac-help { margin: 0 0 12px; font-size: 13px; color: #8f7e74 !important; }
.ac-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ac-inline { display: flex; gap: 8px; align-items: flex-end; }
.ac-inline .ac-field { flex: 1; margin-bottom: 0; }
.ac-inline button { min-height: 44px; }
.ac-email { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.ac-email b { color: #f1e2cf; }
.ac-badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.ac-badge.ok { color: #9fd8a8; border: 1px solid #3f6b48; }
.ac-badge.warn { color: #e6cf8a; border: 1px solid #7a6a3a; }
.ac-sessions, .ac-chars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ac-sessions li, .ac-chars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: 9px; background: #0d0909; border: 1px solid #2a201e; }
.ac-sessions small { grid-column: 1; color: #8f7e74; font-size: 12px; }
.ac-sessions em, .ac-chars em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 11px; font-weight: 700; color: #e0533f; letter-spacing: 1px; text-transform: uppercase; }
.ac-chars li { grid-template-columns: 1fr auto auto; align-items: center; }
.ac-chars em { grid-row: auto; grid-column: auto; }
.ac-chars span { color: #a8968a; font-size: 13px; }
.ac-danger { border-color: #6b2a24; background: #1a0d0c; }
@media (max-width: 520px) { .ac-inline { flex-direction: column; align-items: stretch; } .ac-hero { flex-wrap: wrap; } }
.ac-check input { accent-color: #c2372a; }

/* ---- Onboarding: story intro ---- */
.dialog:has(.lore) { width: min(760px, calc(100vw - 20px)); padding: 0; overflow: hidden; border: 1px solid #5a2a24; border-radius: 18px; background: #0b0707; }
.dialog:has(.lore) .close-row { display: none; }
.lore { position: relative; min-height: min(560px, 82vh); display: flex; align-items: flex-end; }
.lore-art { position: absolute; inset: 0; background: var(--art) center/cover no-repeat; animation: lore-drift 14s ease-out both; }
@keyframes lore-drift { from { transform: scale(1.12); filter: brightness(.55); } to { transform: scale(1); filter: brightness(.85); } }
.lore-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #0b070700 20%, #0b0707cc 58%, #0b0707 88%), radial-gradient(120% 80% at 50% 0%, transparent, #0b070799); }
.lore-body { position: relative; padding: 32px 34px 26px; animation: lore-in .9s ease-out both; }
@keyframes lore-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.lore-body .eyebrow { color: #e0533f; letter-spacing: 3px; }
.lore-body h2 { margin: 8px 0 10px; font-family: var(--title); font-size: clamp(26px, 4.4vw, 38px); line-height: 1.1; color: #f6e8d6; text-shadow: 0 2px 18px #000; }
.lore-body p { max-width: 560px; margin: 0; font-size: 16px; line-height: 1.6; color: #d9c8b6; }
.lore-foot { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.lore-dots { display: flex; gap: 6px; margin-right: auto; }
.lore-dots i { width: 22px; height: 4px; border-radius: 2px; background: #ffffff22; }
.lore-dots i.on { background: #e0533f; box-shadow: 0 0 8px #e0533f; }
.lore-skip { border: 0; background: none; color: #a8968a; min-height: 40px; }
.lore-next { min-width: 170px; min-height: 44px; font-size: 15px; }
@media (max-width: 560px) { .lore-body { padding: 24px 20px 20px; } .lore-body p { font-size: 15px; } .lore-next { min-width: 0; flex: 1; } }
@media (prefers-reduced-motion: reduce) { .lore-art, .lore-body { animation: none; } }

/* ---- Onboarding: spotlight tour ---- */
.tour { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px #000000b8, 0 0 0 2px #e0533f, 0 0 24px 4px #e0533f88; transition: all .35s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.tour-card { position: fixed; pointer-events: auto; padding: 16px 16px 14px; border-radius: 14px; border: 1px solid #6b2a24; background: linear-gradient(180deg, #221615, #140d0d); box-shadow: 0 18px 50px #000c; transition: left .35s, top .35s; animation: lore-in .35s ease-out both; }
.tour-count { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: #e0533f; font-weight: 700; }
.tour-card h3 { margin: 4px 0 6px; font-family: var(--title); font-size: 19px; color: #f4e6d4; }
.tour-card p { margin: 0; font-size: 14px; line-height: 1.5; color: #cdbcab; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.tour-skip { border: 0; background: none; color: #8f7e74; min-height: 36px; padding: 0; }
.tour-actions .primary { min-width: 110px; }
.lore-skip:focus { outline: none; } .lore-skip:focus-visible { outline: 2px solid #e0533f; border-radius: 6px; } .lore-skip:hover { color: #f1e2cf; }
.dust-icon { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: 3px; }

/* Phone: the logo menu sits at the left of the top bar on every screen (combat has its own header). */
.status-brand { display: none; }
@media (max-width: 760px) {
 #app:not([data-view="combat"]) .status-brand { display: grid; place-items: center; flex: none; width: 40px; height: 32px; padding: 0; margin-right: 6px; border: 0; background: none; }
 #app:not([data-view="combat"]) .status-brand img { width: 40px; height: auto; filter: drop-shadow(0 0 6px #c2372a66); }
}

/* Profession hub: item art instead of the character figure */
.pf-card-art.pf-card-item { display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #4a1d19 0%, #1c1212 62%, #120c0c 100%); }
.pf-card-art.pf-card-item img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 4px 10px #000c); }
.pf-card:hover .pf-card-art.pf-card-item img, .pf-card.is-active .pf-card-art.pf-card-item img { transform: scale(1.06); transition: transform .2s; }
.lore-skip:focus-visible { outline: none; text-decoration: underline; }
