/* 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: 11px; 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: 11px; 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: 8px; stroke-linejoin: round; 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: 11px; 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: 11px; 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: 11px; 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; } }

@media (max-width: 960px) {
 .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: 11px; 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: 11px; 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-sbs { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 4px 0 10px; font-size: 12px; }
.eqd-sbs th, .eqd-sbs td { padding: 5px 6px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.eqd-sbs thead th { font-weight: normal; border-bottom: 1px solid #332624; }
.eqd-sbs thead th:first-child { width: 34%; }
.eqd-sbs thead small { display: block; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: #8f7e74; }
.eqd-sbs thead b { display: block; font-size: 12px; line-height: 1.25; }
.eqd-sbs thead em { font-style: normal; font-size: 11px; color: #8f7e74; }
.eqd-sbs tbody th { font-weight: normal; color: #a8968a; }
.eqd-sbs tbody tr + tr > * { border-top: 1px solid #1f1817; }
.eqd-sbs td { color: #ecdcc8; font-variant-numeric: tabular-nums; }
.eqd-sbs td.sbs-up { color: #7fd18b; }
.eqd-sbs td.sbs-down { color: #d97a6c; }
.eqd-sbs td.sbs-none { color: #5c4f48; }
.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: 11px; 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: 11px; 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; }
.nav-feedback { display: block; width: 100%; margin-top: 8px; padding: 5px 8px; border-radius: 8px; border: 1px solid #3a3128; background: transparent; color: #cbb999; font-size: 11.5px; letter-spacing: .3px; }
.nav-feedback:hover { border-color: #7a6448; color: #f1e2c4; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.fb-kind { padding: 6px 11px; border-radius: 999px; border: 1px solid #3a3128; background: #15110d; color: #cbb999; font-size: 12.5px; }
.fb-kind.on { border-color: #c2372a; background: #2c1310; color: #fbe6d4; }
.fb-label { display: block; margin-bottom: 5px; color: #d9c9ab; font-size: 12.5px; }
.fb-text { box-sizing: border-box; width: 100%; min-height: 128px; resize: vertical; padding: 10px 11px; border-radius: 8px; border: 1px solid #3a3128; background: #0f0c0a; color: #efe4d0; font: inherit; font-size: 14px; line-height: 1.45; }
.fb-text:focus { outline: none; border-color: #c2372a; }
.fb-context { margin: 7px 0 0; overflow-wrap: anywhere; }

/* ---- 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 { position: static; left: auto; top: auto; width: 78%; height: 78%; margin: 0; object-fit: contain; object-position: center; transform: none; transition: transform .2s; 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); }
.lore-skip:focus-visible { outline: none; text-decoration: underline; }

/* Start screen: account or guest */
.start-choices{display:grid;gap:10px;margin:20px 0 6px}
.start-choice{display:grid;gap:5px;text-align:left;padding:16px 18px;border-radius:9px;background:linear-gradient(145deg,#3e3030,#281f1f);border:1px solid #5b4442}
.start-choice strong{font-family:var(--title);font-size:15px;font-weight:500;color:#e6dbcf}
.start-choice small{font-size:11px;color:var(--muted);line-height:1.5;font-weight:400}
.start-choice.primary{background:linear-gradient(145deg,#7d1c22,#4a1418);border-color:#c0393f}
.start-choice.primary small{color:#e4c7bd}
.start-choice:hover{border-color:#a8807b}
.onboard-foot .ac-link{margin-left:6px}

/* Landing page: the front door (logo, sign in / create account, or guest) */
.overlay:has(.landing){padding:0;background:#0a0707}
.dialog:has(.landing){width:100%;max-width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:0;background:#0b0808;box-shadow:none;overflow:auto}
.landing{position:relative;min-height:100%;display:grid;place-items:center;padding:28px 16px 40px;isolation:isolate}
.landing-art{position:fixed;inset:0;z-index:-1;background:linear-gradient(180deg,#0b080899 0%,#0b0808d9 45%,#0b0808 85%),url('assets/combat/regions/09-the-ninth-grave.webp') center 20%/cover no-repeat;animation:landingDrift 30s ease-in-out infinite alternate}
@keyframes landingDrift{from{transform:scale(1.04)}to{transform:scale(1.12) translateY(-1.5%)}}
@media (prefers-reduced-motion:reduce){.landing-art{animation:none}}
.landing-inner{width:min(420px,100%);display:grid;gap:14px;justify-items:center}
.landing-logo{width:min(250px,46vw);height:auto;filter:drop-shadow(0 10px 40px #000) drop-shadow(0 0 24px #9e1f2740);animation:landingIn .9s ease both}
.landing-tag{font-family:var(--title);font-size:14px;color:#cdbca3;text-align:center;letter-spacing:.4px;margin:-4px 0 6px;animation:landingIn .9s .15s ease both}
.landing-card{width:100%;border:1px solid #5b4442;border-radius:12px;background:linear-gradient(160deg,#2a2020f2,#181212f2);backdrop-filter:blur(6px);padding:20px 20px 16px;box-shadow:0 24px 70px #000c;animation:landingIn .9s .25s ease both}
.landing-card .ac h2{font-size:20px}
.landing-or{width:100%;display:flex;align-items:center;gap:12px;color:var(--muted);font-size:11px;letter-spacing:2px;text-transform:uppercase}
.landing-or::before,.landing-or::after{content:'';flex:1;height:1px;background:#3f3030}
.landing-guest{width:100%;text-align:center;justify-items:center;animation:landingIn .9s .35s ease both}
@keyframes landingIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* Settings dialog */
.st{display:grid;gap:12px}
.st h2{margin:4px 0 2px}
.st-card{border:1px solid #4a3838;border-radius:10px;background:#1b1414cc;padding:6px 14px}
.st-card h3{font-size:11px;letter-spacing:1.8px;text-transform:uppercase;color:var(--gold);font-family:var(--font);font-weight:600;margin:10px 0 2px}
.st-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid #2f2424}
.st-row:last-child{border-bottom:0}
.st-row>div{display:grid;gap:3px;min-width:0}
.st-row b{font-weight:600;font-size:13px;color:#e6dbcf}
.st-row small{font-size:11px;color:var(--muted);line-height:1.45}
.st-row button{flex-shrink:0}
.st-account{display:flex;align-items:center;gap:12px;padding:14px}
.st-account .ac-avatar{flex-shrink:0}
.st-who{display:grid;gap:2px;flex:1;min-width:0}
.st-who b{font-family:var(--title);font-size:16px;font-weight:500;color:#e6dbcf;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-who small{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-note{font-size:11px;color:#cdbca3;margin:-4px 2px 0;line-height:1.5}
.st-help{font-size:12px;color:var(--muted);margin:4px 0 10px}
.st-actions{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:12px}
.st-switch{width:44px;height:26px;padding:0;border-radius:20px;background:#2c2222;border:1px solid #5a4545;position:relative}
.st-switch .st-knob{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#8c7f7a;transition:transform .2s,background .2s}
.st-switch.on{background:#7d1c22;border-color:#c0393f}
.st-switch.on .st-knob{transform:translateX(18px);background:#f1e4d6}
@media (max-width:520px){.st-account{flex-wrap:wrap}.st-account>button{width:100%}}
/* Messages always sit above dialogs so errors are readable */
#toasts{z-index:300}
.ch-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}
.ch-delete{background:transparent;border-color:#5a3a3a;color:#d99a92}
.ch-delete:hover{background:#3a1d1d;border-color:#a8453f}

/* Item hover card */
.item-tip{position:fixed;z-index:500;width:290px;max-width:calc(100vw - 16px);padding:12px 14px;border:1px solid #5b4442;border-radius:10px;background:linear-gradient(160deg,#241a1a,#130e0e);box-shadow:0 18px 50px #000d;pointer-events:none;font-size:12px;color:#d9cdc0;animation:tipIn .12s ease-out}
@keyframes tipIn{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.item-tip{animation:none}}
.item-tip .tip-head{display:grid;gap:2px;margin-bottom:8px}
.item-tip .tip-head b{font-family:var(--title);font-size:15px;font-weight:500}
.item-tip .tip-head small{color:var(--muted);font-size:11px}
.item-tip .tip-rows{display:grid;gap:3px;padding:8px 0;border-top:1px solid #33272699;border-bottom:1px solid #33272699}
.item-tip .tip-row{display:flex;justify-content:space-between;gap:10px}
.item-tip .tip-row b{color:#efe4d6;font-weight:600}
.item-tip .tip-sub{margin:8px 0 4px;color:var(--muted);font-size:11px}
.item-tip .tip-note{margin:8px 0 0;color:#9fd1a0;font-size:11px}
.item-tip .tip-note.warn{color:#e0a07a}
.item-tip .tip-sig{margin:8px 0 0;color:#e6c37a}
.item-tip .stat-diff{width:100%;font-size:11px;border-collapse:collapse}
.item-tip .stat-diff caption{display:none}
.item-tip .stat-diff th{text-align:left;font-weight:500;color:var(--muted);padding:1px 0}
.item-tip .stat-diff td{text-align:right;padding:1px 0 1px 6px}
.item-tip .stat-diff tr.gain .delta{color:#7fd08a}
.item-tip .stat-diff tr.loss .delta{color:#e0716b}
.item-tip .tip-hint{margin:8px 0 0;color:#7d706a;font-size:11px;letter-spacing:.4px;text-transform:uppercase}
.item-tip .stat-diff tr:not(.gain):not(.loss){display:none} /* only what changes */
/* Press-and-hold on touch: no text selection or system menu on item tiles */
[data-action="item"][data-id]{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.item-tip.touch .tip-hint{display:none}
/* Auto-salvage: one control */
.salvage-now{display:inline-flex;flex-direction:column;align-items:flex-start;gap:1px;line-height:1.2}
.salvage-now small{font-size:11px;color:#cdbca3;font-weight:400}
.salvage-clear{display:block;font-size:11px;color:#9fd1a0;margin-top:8px}
.salvage-note{font-size:11px;color:var(--muted);margin:6px 0 0}
.salvage-opts button{white-space:nowrap}
/* Random stats with rerolls (item window, Gravesmithing tab) */
.random-stats{display:grid;gap:6px;margin:8px 0 14px}
.random-stat{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;padding:8px 10px;border:1px solid #3a2e2d;border-radius:8px;background:#161212}
.random-stat span{color:#d9cdc0;font-size:13px}
.random-stat b{color:#efe4d6;font-size:13px}

/* Talent dialog: opened by tapping a node */
.tl-modal .tl-inspect { border: 0; border-left: 0; background: none; padding: 4px 2px 2px; }
.tl-modal .tl-inspect-icon { width: 58px; height: 58px; box-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); }
.tl-modal .tl-inspect-icon svg { width: 30px; height: 30px; }
.tl-modal .tl-inspect h3 { font-size: 24px; }
.tl-modal .tl-lines p { font-size: 15px; }
.tl-modal-points { margin: 14px 0 0; color: #b9a698; font-size: 13px; }
.tl-modal-points b { color: #f3dca8; font-size: 15px; }
.tl-inspect-act .tl-done { flex: none; }
.tl-modal .tl-inspect-act { margin-top: 10px; }
.tl-modal .tl-learn { min-height: 48px; font-size: 16px; }
.tl-modal .tl-learned { flex: 1; text-align: center; color: var(--c); font-weight: 700; }
.tl-side .tl-modal-points { display: none; }
.tl-hint { position: absolute; left: 50%; top: 10px; z-index: 2; margin: 0; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; background: #0d0909d9; border: 1px solid #3d2c2a; color: #cdbda8; font-size: 12px; white-space: nowrap; pointer-events: none; }
@media (min-width: 900px) { .tl-hint { display: none; } }

/* ---- Build tree: weapon heart, abilities, upgrades and shared abilities (skill-tree-view.mjs) ---- */
.sk-bloodring { fill: none; stroke: #cd3039; stroke-opacity: .35; stroke-width: 3; stroke-dasharray: 2 9; pointer-events: none; }
.sk-link { stroke: #2e2321; stroke-width: 4; stroke-linecap: round; pointer-events: none; }
.sk-link.on { stroke: #8d7b6c; }
.sk-link.up.on { stroke: #ddd3bb; stroke-width: 5; filter: drop-shadow(0 0 5px #ddd3bb88); }
.sk-node, .sk-up, .sk-heart { cursor: pointer; outline: none; }
.sk-node .sk-back { fill: #120c0c; }
.sk-node .sk-rim { fill: none; stroke: #ddd3bb; stroke-width: 4; }
.sk-node.k-ult .sk-rim { stroke: #e2b45a; stroke-width: 5; }
.sk-node.k-shared .sk-rim { stroke: #9fa9b5; stroke-width: 3; }
.sk-node.s-slotted .sk-rim { stroke: #cd3039; stroke-width: 6; filter: drop-shadow(0 0 8px #cd303999); }
.sk-node.s-locked image { opacity: .28; filter: grayscale(1); }
.sk-node.s-locked .sk-rim { stroke: #5f3333; stroke-dasharray: 6 6; }
.sk-node:hover .sk-rim, .sk-node:focus-visible .sk-rim { stroke-width: 7; }
.sk-node .sk-name { fill: #e6d6c4; font-family: var(--title); font-size: 21px; paint-order: stroke; stroke: #0b0707; stroke-width: 6px; pointer-events: none; }
.sk-node.k-shared .sk-name { font-size: 15px; fill: #b9c1ca; }
.sk-node.s-locked .sk-name { fill: #8a7a70; }
.sk-node .sk-name:not([text-anchor]) { text-anchor: middle; }
.sk-node .sk-rank { fill: #f6ead6; font-size: 17px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: #0b0707; stroke-width: 5px; pointer-events: none; }
.sk-node .sk-slot { fill: #fff; font-size: 16px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: #cd3039; stroke-width: 7px; pointer-events: none; }
.sk-up rect { fill: #0f0b0b; stroke: #5b4741; stroke-width: 3; }
.sk-up.s-open rect { stroke: #ddd3bb; stroke-width: 4; animation: tl-open 1.8s ease-in-out infinite; }
.sk-up.s-on rect { fill: #ddd3bb; stroke: #fff4e2; filter: drop-shadow(0 0 6px #ddd3bbaa); }
.sk-up:hover rect, .sk-up:focus-visible rect { stroke-width: 6; }
.sk-heart .sk-heart-ring { fill: none; stroke: #5f3333; stroke-width: 3; }
.sk-heart .sk-heart-core { fill: #2d0f0d; stroke: #cd3039; stroke-width: 4; filter: url(#tl-glow); }
.sk-heart:hover .sk-heart-core, .sk-heart:focus-visible .sk-heart-core { stroke-width: 7; }
.sk-heart text { text-anchor: middle; pointer-events: none; }
.sk-heart .sk-heart-name { fill: #f0e2c4; font-family: var(--title); font-size: 21px; letter-spacing: 2px; }
.sk-heart .sk-heart-sub { fill: #c9b8a8; font-size: 16px; }
.sk-heart .sk-heart-pts { fill: #fff; font-size: 15px; font-weight: 700; }
.tl-points.sk-pts small { margin-left: 4px; opacity: .7; }

.sk-dialog h3 small { font-family: inherit; font-size: 14px; color: #a99a86; margin-left: 6px; }
.sk-dhead { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.sk-dart { width: 64px; height: 64px; border-radius: 50%; border: 3px solid #ddd3bb; object-fit: cover; flex: none; }
.sk-dart.locked { filter: grayscale(1); opacity: .45; border-style: dashed; border-color: #5f3333; }
.sk-ranks, .sk-ups { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.sk-ranks li { font-size: 13px; color: #a99a86; }
.sk-ranks li.on { color: #ddd3bb; }
.sk-uphead { margin: 14px 0 4px; }
.sk-uprow { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid #3b2a28; border-radius: 8px; background: #150f0f; }
.sk-uprow > div { display: grid; gap: 2px; min-width: 0; }
.sk-uprow small { color: #a99a86; }
.sk-uprow .sk-reason { color: #d29a7a; }
.sk-updot { width: 12px; height: 12px; transform: rotate(45deg); border: 2px solid #ddd3bb; box-sizing: border-box; }
.sk-uprow.on .sk-updot { background: #ddd3bb; }
.sk-uprow.on { border-color: #6d5a4f; }
.sk-uprow button { min-height: 40px; }
.sk-points { font-size: 13px; color: #bfae98; }
.sk-points b { color: #fff; font-size: 16px; }
.sk-req { font-size: 13px; color: #a99a86; align-self: center; }
.sk-wpns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sk-wpn { min-height: 40px; }
span.sk-wpn.on { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid #cd3039; border-radius: 6px; color: #fff; font-size: 13px; }
.bd-skillbar, .bd-passives { margin-top: 16px; }
@media (max-width: 640px) { .sk-uprow { grid-template-columns: 14px minmax(0, 1fr); } .sk-uprow button { grid-column: 1 / -1; width: 100%; } }
/* Phase 2: tags, Resonances, Armoury */
.sk-up.s-on rect { fill: var(--c, #ddd3bb); filter: drop-shadow(0 0 6px var(--c, #ddd3bb)); }
.sk-res { cursor: pointer; outline: none; }
.sk-res .sk-res-shape { fill: #140d0d; stroke: #5a4646; stroke-width: 3; }
.sk-res .sk-res-a { fill: var(--a); opacity: .35; }
.sk-res .sk-res-b { fill: var(--b); opacity: .35; }
.sk-res.s-on .sk-res-shape { stroke: #f0e2c4; stroke-width: 4; filter: url(#tl-glow); }
.sk-res.s-on .sk-res-a, .sk-res.s-on .sk-res-b { opacity: 1; }
.sk-res:hover .sk-res-shape, .sk-res:focus-visible .sk-res-shape { stroke-width: 6; }
.sk-res .sk-name { fill: #e6d6c4; font-family: var(--title); font-size: 21px; text-anchor: middle; paint-order: stroke; stroke: #0b0707; stroke-width: 6px; pointer-events: none; }
.sk-res .sk-res-prog { fill: #a99a86; font-size: 15px; text-anchor: middle; paint-order: stroke; stroke: #0b0707; stroke-width: 5px; pointer-events: none; }
.sk-res.s-on .sk-res-prog { fill: #f0e2c4; font-weight: 700; }
.sk-uprow .sk-updot { border-color: var(--c, #ddd3bb); }
.sk-uprow.on .sk-updot { background: var(--c, #ddd3bb); }
.sk-tag { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); margin-left: 6px; }
.sk-need { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
.sk-need li { display: grid; gap: 4px; font-size: 13px; }
.sk-bar { display: block; height: 6px; border-radius: 3px; background: #2a1d1b; overflow: hidden; }
.sk-bar i { display: block; height: 100%; background: #ddd3bb; }
.sk-armoury { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
.sk-armoury li { display: grid; grid-template-columns: 116px auto minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; }
.sk-armoury small { color: #bfae98; }
.sk-pips { display: inline-flex; gap: 4px; }
.sk-pips i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #6d5a4f; box-sizing: border-box; }
.sk-pips i.on { background: #e2b45a; border-color: #e2b45a; }
.bd-armoury { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; font-size: 11px; color: #bfae98; }
.bd-armoury i { width: 8px; height: 8px; border-radius: 50%; border: 2px solid #6d5a4f; box-sizing: border-box; }
.bd-armoury i.on { background: #e2b45a; border-color: #e2b45a; }
.bd-armoury small { width: 100%; text-align: center; }
.sk-borrow { display: grid; gap: 6px; margin: 8px 0; }
.sk-borrow > div { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-borrow button { min-height: 40px; }
.sk-borrow button.active { border-color: #cd3039; color: #fff; }
.bf-panel { margin-bottom: 16px; padding: 14px 16px; border: 1px solid rgba(201,168,106,.35); }
.bf-panel h3 { margin: 4px 0 10px; }
.bf-row { margin: 10px 0; }
.bf-row h4 { margin: 0 0 6px; }
.bf-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.bf-choice { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.25); }
.bf-choice small { color: #b9ad97; }
.bf-choice button { align-self: flex-start; margin-top: 4px; }
/* Phone: when the side-by-side table is shown it already lists both items' stats, so the separate list is skipped. */
@media (max-width: 560px) { .eqd.has-sbs .eqd-props { display: none; } }

/* Grave Arts: abilities in the Bloodline, drawn bolder than the passives around them */
.tl-node.k-art .tl-shape { stroke: var(--c); stroke-opacity: .8; stroke-width: 5; fill: #231512; }
.tl-node.k-art .tl-ring { stroke: var(--c); opacity: .6; stroke-width: 3; }
.tl-node.k-art .tl-icon { fill: var(--c); }
.tl-node.k-art .tl-name { font-size: 30px; fill: #f6e6d2; }
.tl-node.k-art.s-locked .tl-name { fill: #cdb9a6; }
.tl-node.k-art.s-on .tl-icon { fill: #fff4e2; }

.tl-node.k-mod .tl-shape { stroke: var(--c); stroke-opacity: .55; stroke-width: 3; fill: #1b1210; }
.tl-node.k-mod.s-on .tl-shape { fill: var(--c); stroke-opacity: .9; }
.tl-node.k-mod .tl-icon { fill: var(--c); }
.role-readout{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:10px 14px}
.role-chips{display:flex;gap:8px;flex-wrap:wrap}
.role-chip{border:1px solid var(--line,#3a3340);border-radius:999px;padding:4px 12px;font-size:.85rem;opacity:.7}
.role-chip.some{opacity:.9}.role-chip.strong{opacity:1;border-color:var(--gold,#b8923c)}
.role-chip b{margin-right:4px}

/* Painted art on Art and keystone nodes: round crop, dimmed until the node is reachable or learned. */
.tl-node .tl-art { pointer-events: none; clip-path: circle(50%); filter: grayscale(.55) brightness(.6); transition: filter .2s; }
.tl-node.s-reach .tl-art { filter: grayscale(.3) brightness(.78); }
.tl-node.s-open .tl-art, .tl-node.s-part .tl-art { filter: saturate(.9) brightness(.85); }
.tl-node.s-on .tl-art { filter: none; }
.tl-node .tl-roman { font-size: 16px; font-weight: 700; letter-spacing: .5px; fill: #d9c6b0; paint-order: stroke; stroke: #0b0606; stroke-width: 3px; }

/* Weapon upgrade nodes carry their ability's art, with I / II for the first and second upgrade. */
.sk-up .sk-up-art { pointer-events: none; filter: grayscale(.55) brightness(.6); }
.sk-up.s-open .sk-up-art { filter: saturate(.9) brightness(.85); }
.sk-up.s-on .sk-up-art { filter: none; }
.sk-up.s-on rect { fill: var(--c, #ddd3bb); }
.sk-up .sk-up-roman { fill: #d9c6b0; font-size: 15px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: #0b0606; stroke-width: 4px; pointer-events: none; }

/* Resonances: painted hexagon, dim until active. */
.sk-res .sk-res-art { pointer-events: none; clip-path: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%); filter: grayscale(.55) brightness(.6); }
.sk-res.s-on .sk-res-art { filter: none; }
.sk-res .sk-res-rim { fill: none; stroke: var(--a); stroke-opacity: .6; stroke-width: 3; pointer-events: none; }
.sk-res .sk-res-shape { fill: #140d0d; }
.tl-inspect-art { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.tl-intro .tl-origin { float: right; width: 72px; height: 72px; margin: 0 0 6px 10px; border-radius: 50%; border: 1px solid #5a4646; }
.tl-inspect-icon { overflow: hidden; }
.tl-inspect.k-keystone .tl-inspect-art { transform: rotate(-45deg) scale(1.45); }

/* ---- List view: the Bloodline without panning and zooming ---- */
.tl-viewtoggle { display: inline-flex; margin: 0 0 12px; border: 1px solid #4a3a35; border-radius: 999px; overflow: hidden; background: #120b0b; }
.tl-viewtoggle button { appearance: none; border: 0; background: transparent; color: #a99a86; font: inherit; font-size: 15px; letter-spacing: 1px; padding: 9px 22px; min-height: 42px; cursor: pointer; }
.tl-viewtoggle button.on { background: #3a1a17; color: #f6e6d2; box-shadow: inset 0 0 0 1px #cd3039; }
.tl-body-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 900px) { .tl-body-list { grid-template-columns: minmax(0, 1fr) 320px; } }
.tl-list { min-width: 0; }
.tl-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.tl-tab { appearance: none; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 6px 4px; border: 1px solid color-mix(in srgb, var(--c) 45%, #2a1d1b); border-radius: 10px; background: #130c0c; color: #cdbfae; font: inherit; font-size: 14px; letter-spacing: .5px; cursor: pointer; }
.tl-tab b { font-size: 13px; color: var(--c); }
.tl-tab.on { background: color-mix(in srgb, var(--c) 22%, #130c0c); border-color: var(--c); color: #fff4e2; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 35%, transparent); }
.tl-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tl-filter { appearance: none; border: 1px solid #44352f; border-radius: 999px; background: #120b0b; color: #a99a86; font: inherit; font-size: 13px; padding: 7px 14px; min-height: 36px; cursor: pointer; }
.tl-filter.on { border-color: #ddd3bb; color: #f6e6d2; background: #2a1a17; }
.tl-role-blurb { margin: 0 0 10px; }
.tl-notables { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.tl-notable { appearance: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border: 1px solid #3b2a28; border-radius: 10px; background: #130c0c; color: #e6d6c4; font: inherit; text-align: center; cursor: pointer; }
.tl-notable .tl-card-icon img, .tl-notable .tl-card-noart { width: 40px; height: 40px; }
.tl-notable b { font-size: 13px; font-weight: 600; }
.tl-notable small { font-size: 11px; color: #a99a86; line-height: 1.25; }
.tl-notable.s-locked, .tl-notable.s-reach { opacity: .6; }
.tl-notable.s-on { border-color: #ddd3bb; box-shadow: 0 0 10px #ddd3bb44; }
.tl-notable.s-open { border-color: #cd3039; }
.tl-branch { margin: 0 0 18px; padding: 12px; border: 1px solid color-mix(in srgb, var(--c) 35%, #2a1d1b); border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, #110a0a), #0e0808); }
.tl-branch > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tl-branch h3 { margin: 0; font-family: var(--title); font-size: 20px; letter-spacing: 1.5px; color: var(--c); }
.tl-bridge-tag { margin: 10px 2px 4px; letter-spacing: 1px; text-transform: uppercase; }
.tl-card { margin: 0 0 10px; border: 1px solid #3b2a28; border-radius: 12px; background: #150d0d; overflow: hidden; }
.tl-card.s-open { border-color: #cd3039; box-shadow: 0 0 12px #cd303944; }
.tl-card.s-on { border-color: color-mix(in srgb, var(--c, #ddd3bb) 80%, #fff); box-shadow: 0 0 12px color-mix(in srgb, var(--c, #ddd3bb) 30%, transparent); background: color-mix(in srgb, var(--c, #ddd3bb) 9%, #150d0d); }
.tl-card.s-locked, .tl-card.s-reach { opacity: .78; }
.tl-card.k-keystone { border-style: double; border-width: 3px; }
.tl-card-main { appearance: none; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 10px 12px; border: 0; background: transparent; color: #f0e2cf; font: inherit; text-align: left; cursor: pointer; }
.tl-card-icon img, .tl-card-noart { display: block; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid #5a4646; }
.tl-card-noart { background: #1d1212; }
.tl-card.s-locked .tl-card-icon img, .tl-card.s-reach .tl-card-icon img { filter: grayscale(.55) brightness(.7); }
.tl-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-card-text b { font-family: var(--title); font-size: 18px; font-weight: 600; letter-spacing: .5px; }
.tl-card-text small { font-size: 12px; color: #a99a86; }
.tl-card-text em { font-style: normal; font-size: 13px; color: #cdbfae; line-height: 1.3; }
.tl-card-state { align-self: start; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid #4a3a35; color: #a99a86; white-space: nowrap; }
.tl-card.s-on .tl-card-state { color: #fff4e2; border-color: #ddd3bb; background: #3a2a1f; }
.tl-card.s-open .tl-card-state { color: #fff; border-color: #cd3039; background: #3a1214; }
.tl-card-need { margin: -4px 14px 8px; }
.tl-card-ups { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 10px 10px; }
.tl-card-ups:empty { display: none; }
.tl-up { appearance: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border: 1px solid #3b2a28; border-radius: 9px; background: #100909; color: #cdbfae; font: inherit; font-size: 12px; text-align: left; line-height: 1.25; cursor: pointer; }
.tl-up b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #2a1c1a; color: #e6d6c4; font-size: 12px; }
.tl-up.s-open { border-color: #cd3039; color: #fff4e2; }
.tl-up.s-on { border-color: #ddd3bb; background: #2a1f17; color: #fff4e2; }
.tl-up.s-on b { background: #ddd3bb; color: #1b0e0c; }
.tl-up.s-locked, .tl-up.s-reach { opacity: .65; }
.tl-empty { margin: 4px 2px; }
@media (max-width: 420px) { .tl-card-main { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; } .tl-card-icon img, .tl-card-noart { width: 48px; height: 48px; } .tl-card-ups { grid-template-columns: 1fr; } .tl-tab { font-size: 13px; } }

/* Equip a learned Art from its card */
.tl-equip{margin:10px 0 2px}
.tl-equip>small{display:block;margin-bottom:6px;opacity:.75}
.tl-equip-slots{display:grid;grid-template-columns:repeat(auto-fit,minmax(84px,1fr));gap:6px}
.tl-equip-slot{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 4px;font-size:.78rem;line-height:1.15}
.tl-equip-slot b{font-size:1rem}.tl-equip-slot span{opacity:.8;text-align:center}
.tl-equip-slot.on{border-color:var(--c,#d9b48a)}
