/* Adventure uses the raid client's graphite, condensed type and straight-edged
   controls. This is a standalone surface; legacy adventure styles are not loaded. */
:root {
    color-scheme: dark;
    --gs-ink: #080b0e;
    --gs-surface: #10161b;
    --gs-surface-raised: #192127;
    --gs-silver: #f3f0e8;
    --gs-muted: #9aa4ab;
    --gs-line: #2c353d;
    --gs-ghost: #98c9b2;
    --gs-silk: #b6a5c9;
    --gs-silk-bright: #dacde7;
    --gs-candle: #c9aa6a;
    --gs-danger: #df9185;
    --gs-font: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif;
    --gs-font-ui: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-family: var(--gs-font);
    background: var(--gs-ink);
    color: var(--gs-silver);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .45; }
button, a, [tabindex] { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--gs-ghost); }
[hidden] { display: none !important; }
::selection { color: var(--gs-ink); background: var(--gs-ghost); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.adventure-shell {
    --topbar-height: 76px;
    --rail-width: 280px;
    --mobile-nav-height: 64px;
    position: relative;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background: var(--gs-ink);
}
.adventure-topbar {
    position: absolute;
    z-index: 50;
    inset: 0 0 auto;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gs-line);
    background: #0b1014;
}
.adventure-brand, .adventure-topbar-status { display: flex; align-items: center; }
.adventure-brand { min-width: 0; }
.adventure-back-button {
    display: flex;
    align-items: center;
    gap: 16px;
    width: var(--rail-width);
    height: var(--topbar-height);
    flex-shrink: 0;
    padding: 0 28px;
    border: 0;
    border-right: 1px solid var(--gs-line);
    background: transparent;
    color: #b8c0c5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .09em;
}
.adventure-back-button:hover { background: var(--gs-surface-raised); color: white; }
.adventure-brand-copy { padding: 0 30px; min-width: 0; }
.adventure-kicker { color: var(--gs-ghost); font-size: 10px; font-weight: 600; letter-spacing: .14em; line-height: 1.4; }
.adventure-brand .adventure-kicker { color: var(--gs-muted); font-size: 9px; letter-spacing: .16em; }
.adventure-brand h1 { margin: 4px 0 0; font-size: 21px; font-weight: 500; line-height: 1.2; }
.adventure-topbar-status { padding: 0 28px; gap: 22px; color: var(--gs-muted); font-size: 11px; }
.adventure-mobile-progress { display: none; }
.adventure-no-modifiers { border-left: 1px solid var(--gs-line); padding-left: 22px; }
.adventure-icon-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--gs-line); background: #10161b; color: var(--gs-silver); font: 26px/1 var(--gs-font); }
.adventure-icon-button:hover { border-color: var(--gs-ghost); background: #22312c; }

/* The character and campaign controls occupy one uninterrupted sidebar. */
.adventure-command-rail {
    position: absolute;
    z-index: 40;
    inset: var(--topbar-height) auto 0 0;
    width: var(--rail-width);
    display: flex;
    flex-direction: column;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gs-line) transparent;
    border-right: 1px solid var(--gs-line);
    background: #0c1115;
}
.adventure-character-medallion { position: relative; min-height: 190px; height: clamp(190px, 27vh, 300px); flex-shrink: 0; overflow: hidden; }
.adventure-character-medallion > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 23%; }
.adventure-character-medallion::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #0c1115 0%, rgba(12,17,21,.85) 10%, transparent 65%); pointer-events: none; }
.adventure-character-copy { position: absolute; z-index: 1; inset: auto 26px 16px; display: grid; justify-items: start; }
.adventure-character-copy > span { color: #d5c9e0; font-size: 12px; text-transform: uppercase; letter-spacing: .23em; }
.adventure-character-copy > strong { margin: 4px 0; font-size: 47px; font-weight: 600; line-height: 1; letter-spacing: -.035em; text-transform: uppercase; }
.adventure-character-copy > small { color: #a3a7b0; font: 10px/1.6 var(--gs-font-ui); }
.adventure-navigation { display: grid; margin: 0 15px; padding: 8px 0 16px; border-bottom: 1px solid var(--gs-line); }
.adventure-rail-button { position: relative; display: flex; align-items: center; gap: 13px; min-height: 47px; width: 100%; padding: 0 13px; border: 0; border-left: 2px solid transparent; background: transparent; color: var(--gs-muted); text-align: left; }
.adventure-rail-button > span { display: flex; }
.adventure-rail-button svg { width: 19px; height: 19px; }
.adventure-rail-button small { font-size: 12px; font-weight: 500; letter-spacing: .035em; }
.adventure-rail-button em { margin-left: auto; color: #77828b; font: normal 10px/1 Consolas, monospace; }
.adventure-rail-button b { display: none; min-width: 19px; padding: 3px 5px; color: #b3d5c5; background: #284035; font-size: 10px; text-align: center; }
.adventure-rail-button b.has-points, #story-entry-badge:not([hidden]) { display: block; }
.adventure-rail-button:hover { background: #151e23; color: var(--gs-silver); }
.adventure-rail-button.is-active { border-left-color: var(--gs-ghost); background: linear-gradient(90deg, #20332c, #141d1c); color: #d8e9df; }
.adventure-objective-card { display: grid; gap: 9px; margin: 0; padding: 23px 26px; }
.adventure-objective-card > strong { font-size: 23px; font-weight: 500; line-height: 1.15; }
.adventure-objective-card > p { min-height: 38px; margin: 0 0 5px; color: var(--gs-muted); font: 12px/1.65 var(--gs-font-ui); }
.gravesilk-action-button, .gravesilk-secondary-button {
    min-height: 44px;
    padding: 12px 20px;
    border: 1px solid #a8c8b7;
    background: #a8c8b7;
    color: #101b16;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    transition: background .16s, border-color .16s;
}
.gravesilk-action-button:hover:not(:disabled) { background: #c3dfcf; border-color: #c3dfcf; }
.gravesilk-secondary-button { color: var(--gs-silver); background: transparent; border-color: #414c54; }
.gravesilk-secondary-button:hover:not(:disabled) { background: #24302e; border-color: var(--gs-ghost); }
.adventure-inspect-button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding-inline: 13px; }
.adventure-inspect-button svg { width: 18px; height: 18px; }
.adventure-campaign-progress { margin-top: auto; padding: 18px 26px 23px; border-top: 1px solid var(--gs-line); }
.gravesilk-objective-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.gravesilk-objective-meta > span { display: flex; flex-direction: column; gap: 5px; }
.gravesilk-objective-meta b { color: #d2d9d7; font-size: 26px; font-weight: 500; line-height: 1; }
.gravesilk-objective-meta small { color: var(--gs-muted); font-size: 10px; }
.gravesilk-progress-chip { display: grid; grid-template-columns: 1fr auto; gap: 9px; font-size: 10px; }
.gravesilk-progress-label { color: var(--gs-muted); }
.gravesilk-progress-chip strong { color: var(--gs-silk-bright); font-weight: 500; }
.gravesilk-progress-track { grid-column: 1 / -1; height: 3px; background: #2b3039; overflow: hidden; }
.gravesilk-progress-track i { display: block; height: 100%; width: 0; background: var(--gs-silk); transition: width .3s; }

/* Map UI stays at a legible screen size while the authored map scales. */
.adventure-map-region { position: absolute; z-index: 1; inset: var(--topbar-height) 0 0 var(--rail-width); overflow: hidden; background: #0a1015; }
.gravesilk-map-heading { position: absolute; z-index: 10; inset: 0 0 auto; height: 104px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 25px 30px; pointer-events: none; background: linear-gradient(#0a1015 38%, rgba(10,16,21,.8) 70%, transparent); }
.gravesilk-map-heading h2 { margin: 0; font-size: clamp(25px, 2.7vw, 42px); font-weight: 500; letter-spacing: -.025em; line-height: 1.1; }
.gravesilk-map-heading p { margin: 9px 0 0; color: #9aa4ac; font-size: 10px; letter-spacing: .075em; text-transform: uppercase; }
.gravesilk-map-heading p span { margin-inline: 8px; color: #58646c; }
.adventure-map-location-count { margin-top: 7px; color: var(--gs-muted); font: 10px/1.4 var(--gs-font-ui); white-space: nowrap; }
.adventure-map-viewport { position: absolute; inset: 95px 0 66px; overflow: hidden; cursor: grab; touch-action: none; user-select: none; }
.adventure-map-viewport.is-dragging { cursor: grabbing; }
.adventure-map-viewport:focus-visible { outline-offset: -3px; }
.adventure-map-canvas { position: absolute; width: 2400px; height: 1500px; transform-origin: 0 0; will-change: transform; background: url("../images/adventure/gravesilk_kindra/vesper_hollow_map.png") center / cover no-repeat; }
.adventure-map-canvas::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse, transparent 55%, rgba(10,16,21,.55) 88%, #0a1015 100%); }
.gravesilk-map-routes { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gravesilk-map-routes path { fill: none; stroke: #aab9b2; stroke-width: 1.4; stroke-dasharray: 3 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.gravesilk-map-routes path.is-locked { stroke: #8c939d; opacity: .55; }
.gravesilk-map-routes path.is-complete { stroke: #a6d8ba; stroke-dasharray: none; }
.gravesilk-map-routes path.is-optional-route { stroke-dasharray: 1 6; }
.gravesilk-map-routes path.route-shadow { stroke: #060a0d; stroke-width: 4px; stroke-dasharray: none; opacity: .55; }
.adventure-poi {
    --poi-color: #c9cfd0;
    position: absolute;
    z-index: 3;
    top: var(--poi-y);
    left: var(--poi-x);
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--poi-color);
    transform: translate(-50%, -50%) scale(var(--map-ui-scale, 1));
    transform-origin: center;
}
.adventure-poi-icon { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--poi-color); background: #121b21; box-shadow: 0 0 0 3px rgba(6,10,13,.65); transform: rotate(45deg); transition: background .16s, border-color .16s; }
.adventure-poi-icon svg { width: 17px; height: 17px; transform: rotate(-45deg); }
.adventure-poi.is-boss { --poi-color: #d49a8b; }
.adventure-poi.is-boss .adventure-poi-icon { width: 34px; height: 34px; border-width: 2px; }
.adventure-poi.is-optional .adventure-poi-icon { border-style: dashed; }
.adventure-poi.is-locked { --poi-color: #8d959d; }
.adventure-poi.is-locked.is-boss { --poi-color: #aa827d; }
.adventure-poi.is-complete { --poi-color: #91c6ac; }
.adventure-poi.is-active-thread { --poi-color: #cee5b9; z-index: 5; }
.adventure-poi.is-active-thread .adventure-poi-icon { background: #2b4031; box-shadow: 0 0 0 4px #0c1411, 0 0 0 5px #9caf85, 0 0 24px #a3c99230; }
.adventure-poi.is-focused, .adventure-poi:hover, .adventure-poi:focus-visible { z-index: 9; --poi-color: #edf4e9; }
.adventure-poi:is(:hover, :focus-visible, .is-focused) .adventure-poi-icon { background: #344b40; }
.adventure-poi:focus-visible { outline: none; }
.adventure-poi:focus-visible .adventure-poi-icon { outline: 2px solid #edf4e9; outline-offset: 4px; }
.adventure-poi-state { position: absolute; right: -4px; top: -4px; display: grid; place-items: center; width: 15px; height: 15px; background: #172019; color: #b7d9bc; border: 1px solid #738979; font-size: 10px; }
.adventure-poi-state:empty { display: none; }
.adventure-poi-state svg { width: 10px; height: 10px; }
.adventure-poi.is-locked .adventure-poi-state { background: #11191e; border-color: #4f5a63; color: #a0a9b0; }
.adventure-poi-copy { position: absolute; top: calc(100% + 6px); left: 50%; display: grid; width: max-content; max-width: 135px; gap: 3px; padding: 3px 5px; color: #d4d9da; background: rgba(8,14,19,.86); text-align: center; pointer-events: none; transform: translateX(-50%); }
.adventure-poi-copy strong { font-size: 10px; font-weight: 500; line-height: 1.25; }
.adventure-poi-copy small { display: none; font-size: 9px; line-height: 1.4; color: #b0bdc0; }
.adventure-poi.is-locked .adventure-poi-copy { color: #b5bec4; }
.adventure-poi.is-active-thread .adventure-poi-copy { color: #e0edcf; border-bottom: 1px solid #a2b68e; }
.adventure-poi.is-label-hidden .adventure-poi-copy { opacity: 0; }
.adventure-poi:is(:hover, :focus-visible, .is-focused) .adventure-poi-copy { max-width: 210px; padding: 9px 12px; opacity: 1; background: #101a20; border: 1px solid #81968b; box-shadow: 0 6px 16px #0008; }
.adventure-poi:is(:hover, :focus-visible, .is-focused) .adventure-poi-copy strong { font-size: 12px; }
.adventure-poi:is(:hover, :focus-visible, .is-focused) .adventure-poi-copy small { display: block; }
.is-map-distant .adventure-poi { width: 26px; height: 26px; }
.is-map-distant .adventure-poi-icon { width: 17px; height: 17px; box-shadow: 0 0 0 2px #080e13b3; }
.is-map-distant .adventure-poi-icon svg { width: 11px; height: 11px; }
.is-map-distant .adventure-poi.is-boss .adventure-poi-icon { width: 20px; height: 20px; border-width: 1px; }
.is-map-distant .adventure-poi.is-locked .adventure-poi-state { display: none; }
.adventure-map-legend { position: absolute; bottom: 24px; left: 30px; display: flex; gap: 18px; color: #adb7bc; font-size: 10px; }
.adventure-map-legend > span { display: flex; align-items: center; gap: 7px; }
.adventure-map-legend i { display: block; width: 7px; height: 7px; border: 1px solid #93a0ab; transform: rotate(45deg); }
.adventure-map-legend .legend-current { background: #b8cfa3; border-color: #b8cfa3; }
.adventure-map-legend .legend-complete { background: #85b79e; border-color: #85b79e; }
.adventure-map-legend .legend-optional { border-style: dashed; border-color: #c3add2; }
.adventure-map-controls { position: absolute; bottom: 58px; left: 30px; display: flex; gap: 16px; color: #8f9ba4; font-size: 9px; pointer-events: none; }
.adventure-zoom-controls { position: absolute; right: 24px; bottom: 15px; display: flex; align-items: center; border: 1px solid var(--gs-line); background: #0d141a; }
.adventure-zoom-controls button { width: 38px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #b7c2c7; }
.adventure-zoom-controls button:hover { background: #24332c; color: #d9ecdf; }
.adventure-zoom-controls button svg { width: 17px; height: 17px; }
.adventure-zoom-controls button:first-child { border-right: 1px solid var(--gs-line); }
.adventure-zoom-controls button:last-child { border-left: 1px solid var(--gs-line); }
.adventure-zoom-controls output { width: 42px; text-align: center; font: 10px/1 Consolas, monospace; color: var(--gs-muted); }

/* Journal and talents replace the map workspace, keeping navigation in place. */
.adventure-side-panel { position: absolute; z-index: 30; inset: var(--topbar-height) 0 0 var(--rail-width); display: flex; flex-direction: column; overflow: hidden; background: #0d1318; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .18s, transform .18s, visibility .18s; }
.adventure-side-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.adventure-side-panel > header { display: flex; justify-content: space-between; align-items: center; height: 104px; flex-shrink: 0; padding: 22px 34px; border-bottom: 1px solid var(--gs-line); }
.adventure-side-panel h2 { margin: 5px 0 0; font-size: 32px; font-weight: 500; letter-spacing: -.025em; }
.adventure-side-panel-body { flex: 1; min-height: 0; overflow: auto; padding: 28px 34px 40px; scrollbar-width: thin; scrollbar-color: #49545b #0d1318; }
.gravesilk-panel-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--gs-line); }
.gravesilk-panel-intro h3 { margin: 0 0 9px; font-size: 24px; font-weight: 500; }
.gravesilk-panel-intro p { max-width: 620px; margin: 0; color: var(--gs-muted); font: 12px/1.7 var(--gs-font-ui); }
.gravesilk-count-seal { display: grid; justify-items: end; gap: 7px; flex-shrink: 0; }
.gravesilk-count-seal strong { color: var(--gs-ghost); font-size: 33px; font-weight: 400; line-height: 1; }
.gravesilk-count-seal small { color: var(--gs-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.gravesilk-story-tabs { display: flex; gap: 30px; margin-bottom: 30px; border-bottom: 1px solid var(--gs-line); }
.gravesilk-tab { padding: 0 0 13px; border: 0; border-bottom: 2px solid transparent; color: var(--gs-muted); background: transparent; font-size: 13px; }
.gravesilk-tab:is(:hover, .is-active) { border-bottom-color: var(--gs-ghost); color: var(--gs-silver); }
.gravesilk-entry-list { display: grid; grid-template-columns: 1fr; }
.gravesilk-entry-card { position: relative; display: block; width: 100%; padding: 19px 18px; border: 0; border-bottom: 1px solid #293139; color: var(--gs-silver); background: transparent; text-align: left; transition: background .15s; }
.gravesilk-entry-card::after { position: absolute; right: 17px; top: 26px; content: ""; width: 7px; height: 7px; border-top: 1px solid #b5c9bd; border-right: 1px solid #b5c9bd; transform: rotate(45deg); }
.gravesilk-entry-card:hover { background: #192520; }
.gravesilk-entry-card small { display: block; margin-bottom: 7px; color: var(--gs-ghost); font-size: 9px; letter-spacing: .08em; }
.gravesilk-entry-card strong { display: block; padding-right: 20px; font-size: 18px; font-weight: 500; }
.gravesilk-entry-card p { margin: 7px 0 0; color: var(--gs-muted); font: 12px/1.6 var(--gs-font-ui); }
.gravesilk-entry-card.is-locked { color: #939fa8; }
.gravesilk-entry-card.is-locked small { color: #87939e; }
.gravesilk-entry-card.is-locked::after { border: 1px solid #687480; transform: none; }
.gravesilk-entry-card.is-locked:hover { background: #131a20; }
.gravesilk-act-timeline { display: grid; gap: 35px; }
.gravesilk-act-section { display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 26px; }
.gravesilk-act-heading { padding-top: 19px; }
.gravesilk-act-heading small { color: var(--gs-silk); font-size: 9px; letter-spacing: .12em; }
.gravesilk-act-heading h4 { margin: 8px 0 12px; font-size: 19px; font-weight: 500; line-height: 1.3; }
.gravesilk-act-progress { color: #89969f; font-size: 10px; }
.gravesilk-entry-reader { max-width: 780px; margin: 0 auto; padding: 0 10px 25px; }
.gravesilk-reader-back { padding: 9px 0; margin-bottom: 28px; border: 0; color: var(--gs-ghost); background: transparent; font-size: 12px; }
.gravesilk-reader-breadcrumb, .gravesilk-reader-category { display: block; color: var(--gs-muted); font-size: 10px; letter-spacing: .075em; line-height: 1.6; text-transform: uppercase; }
.gravesilk-entry-reader h3 { margin: 12px 0; font-size: clamp(28px, 3vw, 43px); font-weight: 500; line-height: 1.1; }
.gravesilk-reader-category { color: var(--gs-silk); margin-bottom: 34px; }
.gravesilk-entry-reader p { color: #c9ced0; font: 15px/1.85 var(--gs-font-ui); }
.gravesilk-entry-reader blockquote { margin: 28px 0; padding: 9px 0 9px 24px; border-left: 2px solid #788f83; color: #e6ece7; }
.gravesilk-dialogue cite { color: var(--gs-ghost); font-size: 10px; font-weight: 600; letter-spacing: .12em; font-style: normal; text-transform: uppercase; }
.gravesilk-dialogue p { margin: 8px 0 0; }
.gravesilk-stage-direction p, .gravesilk-narration { color: #97a3ac; font-style: italic; }
.gravesilk-stage-direction { padding-block: 4px; }
.gravesilk-reader-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--gs-line); }
.gravesilk-reader-navigation button { text-align: left; line-height: 1.5; }
.gravesilk-reader-navigation button:last-child { text-align: right; }

.gravesilk-talent-tree-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gravesilk-talent-tree { --tree-color: #b6a5c9; min-width: 0; border-top: 2px solid var(--tree-color); background: #121a20; }
.gravesilk-talent-tree[data-tree="needle"] { --tree-color: #d3a0bf; }
.gravesilk-talent-tree[data-tree="wing"] { --tree-color: #bda3d7; }
.gravesilk-talent-tree[data-tree="lantern"] { --tree-color: #7fe0c3; }
.gravesilk-tree-heading { position: relative; min-height: 145px; padding: 25px 20px 20px; border-bottom: 1px solid var(--gs-line); }
.gravesilk-tree-heading > span { position: absolute; top: 20px; right: 18px; color: var(--tree-color); font-size: 27px; }
.gravesilk-tree-heading h4 { margin: 0 25px 10px 0; font-size: 23px; font-weight: 500; }
.gravesilk-tree-heading p { max-width: 270px; margin: 0; color: var(--gs-muted); font: 11px/1.6 var(--gs-font-ui); }
.gravesilk-tier { padding: 18px 16px; border-bottom: 1px solid var(--gs-line); }
.gravesilk-tier-label { display: flex; justify-content: space-between; gap: 7px; margin-bottom: 17px; color: #acb7c0; font-size: 9px; letter-spacing: .08em; }
.gravesilk-tier-label em { font-style: normal; color: var(--tree-color); font-size: 8px; }
.gravesilk-talent-pair { display: grid; grid-template-columns: minmax(0, 1fr) 15px minmax(0, 1fr); gap: 6px; }
.gravesilk-talent-or { align-self: center; color: #77858d; font-size: 8px; text-align: center; }
.gravesilk-talent-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 12px 9px; border: 1px solid #36434a; background: #0d1419; color: var(--gs-silver); text-align: left; }
.gravesilk-talent-card:hover { border-color: var(--tree-color); background: #1b242b; }
.gravesilk-talent-card.is-selected { border-color: var(--tree-color); background: #24272e; }
.gravesilk-talent-card.is-selected::after { content: "✓"; position: absolute; right: 8px; top: 8px; color: var(--tree-color); font-size: 14px; }
.gravesilk-talent-card:is(.is-tier-locked, .is-locked-out) .gravesilk-talent-icon { filter: saturate(.3); opacity: .7; }
.gravesilk-talent-card[aria-disabled="true"] { cursor: help; }
.gravesilk-talent-icon { display: block; width: 52px; height: 52px; margin-bottom: 13px; }
.gravesilk-talent-card strong { font-size: 12px; font-weight: 500; line-height: 1.4; }
.gravesilk-talent-card p { margin: 8px 0 12px; color: #aab4bc; font: 10px/1.6 var(--gs-font-ui); overflow-wrap: anywhere; }
.gravesilk-talent-details { width: 100%; margin-top: auto !important; padding-top: 9px; border-top: 1px solid #2b343d; line-height: 1.5; }
.gravesilk-tree-switcher { position: sticky; z-index: 2; top: -1px; padding-block: 8px; background: #0d1318; }
.gravesilk-restitch { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; margin-top: 30px; padding: 22px 0 0; border-top: 1px solid var(--gs-line); }
.gravesilk-restitch strong { font-size: 17px; font-weight: 500; }
.gravesilk-restitch p { max-width: 610px; margin: 8px 0 0; color: var(--gs-muted); font: 11px/1.6 var(--gs-font-ui); }
.gravesilk-restitch button { grid-column: 2; grid-row: 1 / 3; align-self: center; }

/* Encounters are location dossiers: scene on the left, briefing on the right. */
.adventure-modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 32px; background: rgba(3,7,10,.85); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .18s, visibility .18s; }
.adventure-modal-backdrop.is-open { opacity: 1; visibility: visible; }
.adventure-modal { position: relative; width: min(1120px, 100%); max-height: calc(100dvh - 64px); overflow: hidden; border: 1px solid #45514f; background: #10171c; box-shadow: 0 28px 100px #0009; }
#adventure-modal-content { max-height: calc(100dvh - 66px); overflow: auto; scrollbar-width: thin; scrollbar-color: #46504e #10171c; }
.adventure-modal:focus { outline: none; }
.adventure-modal:not(:has(.gravesilk-dialog-hero)) { width: min(720px, 100%); }
.adventure-modal-close { position: absolute; right: 14px; top: 14px; z-index: 3; background: #0c141a; }
.gravesilk-poi-dialog { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); }
.gravesilk-poi-dialog:not(:has(.gravesilk-dialog-hero)) { display: block; max-width: 720px; margin: auto; }
.gravesilk-dialog-hero { position: relative; min-height: 480px; overflow: hidden; }
.gravesilk-dialog-hero img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.gravesilk-dialog-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,12,16,.95), transparent 55%); }
.gravesilk-dialog-hero span { position: absolute; z-index: 1; inset: auto 28px 30px; max-width: 340px; color: #f3eee2; font-size: 29px; font-weight: 500; line-height: 1.2; }
.gravesilk-poi-dialog-body { padding: 39px 34px 30px; }
.gravesilk-dialog-kicker { display: block; padding-right: 36px; color: var(--gs-ghost); font-size: 10px; letter-spacing: .14em; }
.gravesilk-dialog-kicker i { display: none; }
.gravesilk-poi-dialog h2 { margin: 12px 0 14px; font-size: 39px; font-weight: 500; letter-spacing: -.025em; line-height: 1.05; }
.gravesilk-poi-dialog-body > p { color: #b0bbc2; margin: 0 0 24px; font: 13px/1.7 var(--gs-font-ui); }
.gravesilk-dialog-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 17px 0; margin-bottom: 23px; border-block: 1px solid var(--gs-line); }
.gravesilk-dialog-stat small { display: block; margin-bottom: 9px; color: #97a4ad; font-size: 9px; letter-spacing: .12em; }
.gravesilk-dialog-stat strong { font-size: 19px; font-weight: 400; }
.gravesilk-enemy-roster { margin-bottom: 21px; }
.gravesilk-enemy-roster > small { display: block; margin-bottom: 11px; color: #aa9e99; font-size: 9px; letter-spacing: .12em; }
.gravesilk-enemy-roster > div { display: grid; gap: 8px; }
.gravesilk-enemy-roster span { color: #d0d2d0; font-size: 12px; }
.gravesilk-enemy-roster b { display: inline-block; min-width: 30px; color: #ae867b; font: normal 10px/1 Consolas, monospace; }
.gravesilk-mechanic-box, .gravesilk-lock-box, .gravesilk-story-excerpt { margin-block: 18px; padding: 0 0 0 15px; border-left: 2px solid #617c6e; color: #b9c3c9; font: 12px/1.7 var(--gs-font-ui); }
.gravesilk-lock-box { border-color: var(--gs-danger); color: #dcaaa0; }
.gravesilk-story-excerpt { border-color: #7c718e; color: #bfb5cd; font-style: italic; }
.gravesilk-reward-box { margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--gs-line); }
.gravesilk-reward-box small { display: block; max-width: 380px; color: #a9a080; font-size: 8px; letter-spacing: .08em; line-height: 1.7; }
.gravesilk-reward-box strong { display: block; margin-top: 8px; color: #e0cc9f; font-size: 15px; font-weight: 500; line-height: 1.5; }
.gravesilk-dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.gravesilk-dialog-actions .gravesilk-action-button { flex: 1; }
.gravesilk-complete-label { display: block; margin-bottom: 14px; color: var(--gs-ghost); font-size: 9px; letter-spacing: .09em; }
.gravesilk-loading, .gravesilk-empty { padding: 30px; color: #a6b7b4; text-align: center; font-size: 14px; }
.adventure-toast { position: fixed; z-index: 120; left: calc(50% + var(--rail-width) / 2); bottom: 82px; max-width: min(580px, calc(100vw - 32px)); padding: 14px 20px; border: 1px solid #687f72; background: #15231d; color: #e1eae2; font: 13px/1.5 var(--gs-font-ui); opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: opacity .18s, transform .18s, visibility .18s; pointer-events: none; }
.adventure-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.adventure-toast.is-error { border-color: #9d6a60; background: #281d1b; }
.adventure-sr-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (min-width: 1600px) {
    .adventure-shell { --rail-width: 320px; }
    .adventure-character-medallion { height: 31vh; }
    .adventure-poi-copy strong { font-size: 12px; }
    .adventure-poi-copy { max-width: 155px; }
    .gravesilk-talent-card { padding: 18px 13px; }
    .gravesilk-talent-card strong { font-size: 14px; }
    .gravesilk-talent-card p { font-size: 12px; }
}
@media (max-width: 1180px) {
    .adventure-shell { --rail-width: 240px; }
    .adventure-topbar-status { gap: 12px; padding-inline: 20px; }
    .adventure-no-modifiers { padding-left: 12px; }
    .adventure-back-button { padding-inline: 23px; }
    .adventure-objective-card { padding-inline: 23px; }
    .adventure-map-controls { display: none; }
    .adventure-map-legend { gap: 12px; left: 24px; }
    .adventure-zoom-controls { right: 18px; }
    .adventure-side-panel-body { padding-inline: 24px; }
    .gravesilk-talent-tree-grid { grid-template-columns: 1fr; }
    .gravesilk-talent-tree { display: grid; grid-template-columns: 180px repeat(3, minmax(0, 1fr)); }
    .gravesilk-tree-heading { min-height: 0; padding: 19px 16px; }
    .gravesilk-tree-heading > span { position: static; display: block; margin-bottom: 15px; }
    .gravesilk-tree-heading h4 { margin-right: 0; font-size: 20px; }
    .gravesilk-tier { padding: 18px 10px; border-left: 1px solid var(--gs-line); }
    .gravesilk-talent-pair { display: flex; flex-direction: column; }
    .gravesilk-talent-card { flex: 1; width: 100%; }
    .gravesilk-talent-or { padding: 5px; }
    .gravesilk-restitch { display: block; }
    .gravesilk-restitch button { margin-top: 15px; }
    .gravesilk-act-section { grid-template-columns: 145px minmax(0, 1fr); gap: 15px; }
}
@media (max-width: 980px) and (min-width: 761px) {
    .adventure-topbar-status { display: none; }
    .adventure-map-legend { bottom: 66px; }
    .adventure-map-viewport { bottom: 105px; }
    .gravesilk-talent-tree { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gravesilk-tree-heading { grid-column: 1 / -1; }
    .gravesilk-tree-heading > span { float: right; }
    .gravesilk-tree-heading p { max-width: none; }
    .gravesilk-talent-tree-grid { gap: 30px; }
}
@media (max-height: 820px) and (min-width: 761px) {
    .adventure-character-medallion { height: 190px; min-height: 190px; }
    .adventure-character-copy > strong { font-size: 39px; }
    .adventure-navigation { padding-block: 0 10px; }
    .adventure-rail-button { min-height: 42px; }
    .adventure-objective-card { padding-block: 18px; gap: 7px; }
    .adventure-objective-card > strong { font-size: 21px; }
    .adventure-campaign-progress { padding-block: 15px 19px; }
    .gravesilk-objective-meta { margin-bottom: 15px; }
}
@media (max-width: 760px) {
    .adventure-shell { --topbar-height: 68px; --rail-width: 0px; --mobile-nav-height: calc(64px + env(safe-area-inset-bottom)); }
    .adventure-topbar { padding-right: 16px; }
    .adventure-back-button { width: 52px; height: 40px; padding: 0; justify-content: center; border: 0; }
    .adventure-back-button span, .adventure-topbar-status { display: none; }
    .adventure-brand-copy { padding: 0 8px; }
    .adventure-brand h1 { font-size: 18px; }
    .adventure-brand .adventure-kicker { font-size: 8px; }
    .adventure-mobile-progress { display: grid; gap: 4px; flex-shrink: 0; margin-left: 6px; text-align: right; }
    .adventure-mobile-progress small { color: var(--gs-muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
    .adventure-mobile-progress output { color: var(--gs-silk-bright); font-size: 13px; }
    .adventure-command-rail { inset: auto 0 0; width: 100%; height: var(--mobile-nav-height); overflow: visible; border: 0; border-top: 1px solid var(--gs-line); background: #0c1217; }
    .adventure-character-medallion, .adventure-campaign-progress { display: none; }
    .adventure-navigation { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin: 0; padding: 0 8px env(safe-area-inset-bottom); border: 0; }
    .adventure-rail-button { min-height: 63px; padding: 8px 4px; flex-direction: column; justify-content: center; gap: 7px; border-left: 0; border-top: 2px solid transparent; }
    .adventure-rail-button.is-active { border-top-color: var(--gs-ghost); background: #1a2923; }
    .adventure-rail-button small { font-size: 10px; }
    .adventure-rail-button em { display: none; }
    .adventure-rail-button b { position: absolute; top: 8px; right: calc(50% - 28px); font-size: 9px; padding: 2px 4px; }
    .adventure-objective-card { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 12px); padding: 15px 16px; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; border: 1px solid #45564c; background: #101c18f5; }
    .adventure-objective-card .adventure-kicker { font-size: 8px; }
    .adventure-objective-card > strong { font-size: 19px; }
    .adventure-objective-card > p { display: none; }
    .adventure-inspect-button { grid-column: 2; grid-row: 1 / 3; width: 44px; height: 44px; padding: 0; justify-content: center; align-self: center; }
    .adventure-inspect-button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .adventure-shell:not([data-panel="map"]) .adventure-objective-card { display: none; }
    .adventure-map-region { bottom: var(--mobile-nav-height); }
    .gravesilk-map-heading { padding: 22px 20px; height: 97px; }
    .gravesilk-map-heading h2 { font-size: 29px; }
    .gravesilk-map-heading p { font-size: 8px; }
    .gravesilk-map-heading p span { margin-inline: 3px; }
    .adventure-map-location-count { font-size: 9px; }
    .adventure-map-viewport { inset: 91px 0 145px; }
    .adventure-map-legend { bottom: 107px; left: 19px; gap: 11px; font-size: 8px; }
    .adventure-map-legend > span { gap: 5px; }
    .adventure-zoom-controls { right: 12px; bottom: 136px; }
    .adventure-zoom-controls button { width: 36px; height: 40px; }
    .adventure-map-controls { display: none; }
    .adventure-side-panel { bottom: var(--mobile-nav-height); }
    .adventure-side-panel > header { height: 93px; padding: 20px; }
    .adventure-side-panel h2 { font-size: 28px; }
    .adventure-side-panel-body { padding: 20px 18px 30px; }
    .gravesilk-panel-intro { gap: 16px; margin-bottom: 20px; padding-bottom: 20px; }
    .gravesilk-panel-intro h3 { font-size: 21px; }
    .gravesilk-panel-intro p { font-size: 11px; }
    .gravesilk-count-seal strong { font-size: 27px; }
    .gravesilk-count-seal small { font-size: 8px; }
    .gravesilk-act-section { display: block; }
    .gravesilk-act-heading { padding: 0 0 12px; border-bottom: 1px solid var(--gs-line); }
    .gravesilk-act-heading h4 { margin-bottom: 6px; }
    .gravesilk-entry-card { padding: 19px 12px; }
    .gravesilk-entry-card strong { font-size: 17px; }
    .gravesilk-entry-reader { padding-inline: 2px; }
    .gravesilk-entry-reader p { font-size: 14px; }
    .gravesilk-reader-navigation { grid-template-columns: 1fr; }
    .gravesilk-reader-navigation button:last-child { text-align: left; }
    .gravesilk-talent-tree { display: block; }
    .gravesilk-tree-heading { padding: 22px 18px; }
    .gravesilk-tree-heading > span { float: right; }
    .gravesilk-tree-heading p { max-width: none; }
    .gravesilk-tier { padding: 20px 15px; border-left: 0; }
    .gravesilk-talent-pair { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); }
    .gravesilk-talent-card { padding: 15px 11px; }
    .gravesilk-talent-card strong { font-size: 13px; }
    .gravesilk-talent-card p { font-size: 11px; }
    .gravesilk-talent-icon { width: 56px; height: 56px; }
    .gravesilk-talent-or { padding: 0; }
    .adventure-modal-backdrop { padding: 12px; }
    .adventure-modal { max-height: calc(100dvh - 24px); }
    #adventure-modal-content { max-height: calc(100dvh - 26px); }
    .gravesilk-poi-dialog { display: block; }
    .gravesilk-dialog-hero { min-height: 0; height: 210px; }
    .gravesilk-dialog-hero span { inset: auto 20px 20px; font-size: 24px; }
    .gravesilk-poi-dialog-body { padding: 26px 20px; }
    .gravesilk-poi-dialog h2 { font-size: 32px; }
    .gravesilk-dialog-stat strong { font-size: 17px; }
    .gravesilk-dialog-actions { flex-direction: column; }
    .adventure-toast { bottom: calc(var(--mobile-nav-height) + 104px); width: calc(100vw - 32px); font-size: 12px; }
}
@media (max-height: 560px) {
    .adventure-shell { --topbar-height: 56px; }
    .adventure-character-medallion { height: 135px; min-height: 135px; }
    .adventure-map-viewport { top: 65px; }
    .gravesilk-map-heading { height: 74px; padding-top: 14px; }
    .gravesilk-map-heading h2 { font-size: 23px; }
    .gravesilk-map-heading p { margin-top: 5px; }
    .adventure-modal-backdrop { padding: 12px; }
    .adventure-modal { max-height: calc(100dvh - 24px); }
    #adventure-modal-content { max-height: calc(100dvh - 26px); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
