/* Keep the existing site's palette and shared header/sidebar. */
:root { scrollbar-gutter:stable; }
.stage-page { --stage-entry-gap:12px; }
.stage-page :is(.header-inner,.topnav,.workspace) { width:var(--page-width); }
.stage-page .workspace { align-items:start; }
.stage-page .main { min-width:0; }
/* Keep Stage icons at 30% of their intrinsic size even with a stale shared stylesheet. */
:root .stage-page img[src*="/Icon/" i] { width:auto; height:auto; min-width:0; min-height:0; max-width:none; max-height:none; zoom:.30; }
:root .stage-page .stage-other-icon { width:auto; height:auto; min-width:0; min-height:0; max-width:none; max-height:none; zoom:1; object-fit:contain; flex:none; user-select:none; -webkit-user-drag:none; }
:root .stage-page .stage-other-icon[src*="/Other/Treasure_"] { zoom:.75; }
:root .stage-page .stage-other-icon[src*="/Other/star_"] { zoom:.75; }
.stage-difficulty-stars { display:inline-flex; align-items:center; gap:3px; flex-wrap:wrap; vertical-align:middle; }
.stage-difficulty-stars > span { display:inline-flex; }
.stage-difficulty-stars > .is-inactive { pointer-events:none; }
.stage-difficulty-stars > .is-active:hover { filter:brightness(1.15); }
.stage-difficulty-badge { display:inline-flex; align-items:flex-end; gap:0; margin-inline-start:16px; flex:none; }
.stage-difficulty-number { display:inline-flex; align-items:flex-end; gap:0; }
:root .stage-page .stage-difficulty-digit { display:block; width:auto; height:auto; min-width:0; min-height:0; max-width:none; max-height:none; object-fit:contain; zoom:.5; user-select:none; -webkit-user-drag:none; }
.stage-treasure-quality { display:inline-flex; align-items:center; gap:8px; vertical-align:middle; }
.stage-page .stage-crowns button { display:inline-flex; align-items:center; justify-content:center; width:33px; height:30px; padding:2px; border:0; background:transparent; border-radius:3px; }
.stage-crowns button:hover { filter:brightness(1.15); }
.stage-crown-percent { margin-inline-start:18px; color:var(--text); font-variant-numeric:tabular-nums; white-space:nowrap; }
.stage-crown-percent.is-abyss { white-space:pre-line; line-height:15px; }
.stage-crowns .stage-crown-gold { display:none; }
.stage-crowns button[data-crown-filled="true"] .stage-crown-gold { display:block; }
.stage-crowns button[data-crown-filled="true"] .stage-crown-grey { display:none; }
.stage-page-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; min-height:50px; padding:10px 18px; margin-bottom:var(--section-gap); background:var(--heading); border-radius:8px; box-shadow:var(--shadow); }
.stage-page h1 { flex:0 1 auto; margin:0; font-size:20px; font-weight:500; }
.stage-page-bar:has(.stage-crowns,.stage-difficulty-stars) { justify-content:flex-start; }
.stage-page-bar > [data-stage-time] { margin-left:auto; }
.stage-crowns { display:flex; gap:6px; align-items:center; margin-inline-start:8px; }
.stage-material-note { margin:10px 14px; font-size:11px; line-height:1.7; color:rgb(224 224 224 / 85%); }
.stage-page button { padding:6px 12px; border:1px solid var(--line); border-radius:5px; background:var(--heading-2); color:var(--factor); cursor:pointer; white-space:nowrap; }
.stage-page :is(button,a,input):focus-visible { outline:2px solid var(--factor); outline-offset:3px; }
.stage-links { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:4px; margin-bottom:18px; }
.stage-links .stage-name-image { display:block; width:100%; max-width:none; height:auto; }
.stage-links .stage-name-image-link { width:100%; justify-content:center; }
.stage-links .stage-name-fallback { min-width:0; overflow-wrap:anywhere; }
.stage-links .stage-name-fallback { display:none; }
.stage-links .stage-name-image.is-image-missing { display:none; }
.stage-links .is-image-missing + .stage-name-fallback { display:inline; }
.stage-links > a,.stage-links > .stage-nav-item { display:inline-flex; align-items:center; justify-content:center; min-width:0; box-sizing:border-box; gap:.5em; padding:3px 2px; background:var(--cell); border:1px solid var(--line); border-radius:5px; text-decoration:none; }
.stage-links > [aria-current] { color:var(--factor); background:var(--heading); }
.stage-card { overflow:hidden; margin:0 0 var(--section-gap); background:var(--card); border:1px solid #b06000; border-radius:8px; box-shadow:var(--shadow); }
.stage-card > .stage-page-bar { margin:0; border-radius:0; box-shadow:none; }
.stage-overview-content { display:flex; flex-direction:column; gap:10px; padding:18px; }
.stage-overview-content .stage-links { margin-bottom:0; }
.stage-card h2 { padding:12px 16px; margin:0; color:var(--text); background:var(--heading); font-size:17px; font-weight:500; }
.stage-card h2 a { text-decoration:none; }
.stage-number { color:#e0e0e0; font-variant-numeric:tabular-nums; }
.stage-card h2 .stage-number { margin-inline-end:.55em; }
.stage-card h2 .stage-number,.stage-links .stage-number { color:#e0e0e0; }
.stage-treasure { margin:0; }
.stage-treasure-title { display:flex; align-items:center; min-height:var(--row-height); margin:0; padding:10px 12px; background:var(--heading); font:inherit; border-bottom:1px solid var(--line); }
.stage-treasure-heading { display:flex; align-items:center; justify-content:flex-start; gap:16px; flex-wrap:wrap; min-height:50px; box-sizing:border-box; padding:7px 12px; }
.stage-treasure-set { display:inline-flex; align-items:center; gap:8px; }
:root .stage-page .stage-treasure-set-icon { height:30px; width:auto; zoom:1; object-fit:contain; }
.stage-treasure-owned-slot { display:inline-flex; align-items:center; justify-content:center; width:34px; height:30px; flex:0 0 34px; }
:root .stage-page .stage-treasure-owned-slot .stage-other-icon { height:30px; width:auto; zoom:1; }
.stage-treasure-map-guide { margin-top:12px; }
.stage-treasure-guide-body h4 { margin:12px 0 6px; font:inherit; }
.stage-treasure-heading select { font:inherit; color:var(--text); background:#803300; border:1px solid #b0640c; border-radius:4px; padding:5px 8px; }
.stage-treasure-note { font-size:12px; line-height:1.7; color:#e0e0e0; margin:0; padding:8px 12px; }
.stage-treasure-guide { border-top:1px solid var(--line); overflow:hidden; }
.stage-treasure-guide > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:var(--row-height); padding:10px 12px; background:var(--heading-2); color:var(--text); cursor:pointer; list-style:none; }
.stage-treasure-guide > summary::-webkit-details-marker { display:none; }
.stage-treasure-guide > summary::after { content:""; width:7px; height:7px; margin-right:3px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); flex:0 0 auto; }
.stage-treasure-guide[open] > summary::after { transform:rotate(225deg); }
.stage-treasure-guide > summary:focus-visible { outline:2px solid var(--factor); outline-offset:-3px; }
.stage-treasure-guide-body { padding:10px 12px; border-top:1px solid var(--line); font-size:12px; line-height:1.8; }
.stage-treasure-guide p { margin:0; }
.stage-treasure-guide ul { margin:5px 0; padding-left:1.5em; }
.stage-treasure-table td { text-align:right; }
.stage-treasure-table tbody th { font-weight:normal; white-space:nowrap; background:transparent; }
.stage-detail-card > h2 { display:flex; flex-wrap:wrap; align-items:center; min-height:var(--row-height); padding:10px 18px; }
.stage-card-body { display:grid; grid-template-columns:280px minmax(0,1fr); align-items:start; gap:18px; padding:18px; }
.stage-entry-conditions:empty,[data-labyrinth-notice]:empty { display:none; }
.stage-summary,.stage-content { min-width:0; display:flex; flex-direction:column; gap:var(--section-gap); }
.stage-labyrinth-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px 18px 0; }
.stage-labyrinth-controls select { font:inherit; color:var(--text); background:var(--heading-2); border:1px solid var(--line); border-radius:4px; padding:6px 10px; }
.stage-labyrinth-guide { margin:8px 18px 0; border:1px solid var(--line); border-radius:var(--disclosure-panel-radius); background:var(--cell); }
.stage-panel,.stage-stats { overflow:hidden; border:1px solid var(--line); border-radius:6px; background:var(--cell); }
details.stage-panel,.stage-panel:has(> details),.excavation-guide-sections > .stage-panel { border-radius:var(--disclosure-panel-radius); }
.stage-panel > .stage-info-row:first-child { border-top:0; }
.stage-restrictions { overflow:hidden; flex:none; }
.stage-restriction-content { padding:10px 12px; line-height:1.8; color:var(--text); }
/* Match the source canvas: no cropping or per-card zoom. The image loader
   also adopts the intrinsic ratio if future backgrounds use another size. */
.stage-visual { position:relative; background:var(--heading-2); border-radius:6px; isolation:isolate; overflow:hidden; }
.stage-visual,.stage-visual * { user-select:none; -webkit-user-select:none; -webkit-user-drag:none; }
.stage-visual-art { position:relative; width:100%; aspect-ratio:770 / 512; overflow:hidden; }
.stage-background { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; }
.stage-castle-slot { position:absolute; inset:0; display:grid; grid-template:100% / 100%; place-items:center; }
.stage-castle { display:block; height:75%; width:auto; max-width:none; filter:drop-shadow(0 3px 3px #0004); }
.stage-stats { margin:0; }
.stage-stats > div { display:grid; grid-template-columns:145px minmax(0,1fr); min-height:var(--row-height); border-bottom:1px solid var(--line); }
.stage-stats > div:last-child { border:0; }
.stage-stats dt,.stage-stats dd { display:flex; align-items:center; padding:10px 14px; margin:0; }
.stage-stats dd { justify-content:flex-end; }
.stage-catamin-cost dd { flex-direction:column; align-items:flex-end; justify-content:center; gap:2px; padding-block:4px; text-align:right; white-space:nowrap; }
.stage-stats dt { background:var(--heading-2); }
.stage-stats dd { color:var(--text); font-variant-numeric:tabular-nums; }
.stage-info-row { display:grid; grid-template-columns:110px minmax(0,1fr); min-height:var(--row-height); border-top:1px solid var(--line); background:var(--cell); }
.stage-info-label { padding:14px 16px; background:var(--heading-2); }
.stage-info-value { min-width:0; padding:10px 16px; }
.stage-class-tags .stage-info-value { padding-block:0; }
.stage-class-tags .stage-info-label { line-height:1.6; padding-block:calc((var(--row-height) - 1.6em) / 2); }
.stage-reward-icon { display:block; flex:0 0 auto; object-fit:contain; }
.stage-table-scroll { overflow-x:auto; }
.stage-table { border-collapse:collapse; width:100%; margin:0; font-variant-numeric:tabular-nums; }
.stage-table th { background:var(--heading-2); font-weight:400; text-align:left; white-space:nowrap; }
.stage-table th,.stage-table td { padding:8px 12px; border-bottom:1px solid var(--line); }
.stage-table td { height:50px; padding-block:1px; vertical-align:middle; }
.stage-table td:not(:first-child) { white-space:nowrap; color:var(--text); }
.stage-table th { height:var(--row-height); padding-block:1px; vertical-align:middle; }
/* Keep data columns beside the name; only the empty trailing cell stretches. */
.stage-table :is(th,td) { width:1%; }
.stage-table .stage-table-fill { width:auto; min-width:0; padding:0; }
.stage-table td:nth-child(2),.stage-table td:nth-child(3) { text-align:right; }
.stage-table tr:last-child td { border-bottom:0; }
/* Header stays darkest; data rows alternate medium/light from the first row. */
.stage-table tbody tr:nth-child(odd) { background:#8a3a00; }
.stage-table tbody tr:nth-child(even) { background:var(--cell); }
.stage-enemy-link { display:inline-flex; vertical-align:middle; align-items:center; gap:10px; text-decoration:none; white-space:nowrap; }
.stage-table td:first-child { min-width:210px; }
.stage-enemy-icon { display:block; flex:0 0 auto; object-fit:contain; }
.stage-enemy-text { display:flex; flex-direction:column; align-items:flex-start; gap:2px; line-height:1.4; }
.stage-enemy-badges { display:flex; gap:8px; }
.stage-boss { color:var(--factor); font-size:11px; }
.stage-map-image { display:block; width:100%; height:auto; margin:0; aspect-ratio:1; object-fit:contain; }
.stage-map-visual { width:100%; max-width:280px; margin-inline:auto; background:var(--heading-2); border-radius:6px; overflow:hidden; }
.stage-map-visual:has(.stage-map-image.is-image-missing) { display:none; }
.stage-map-overview .stage-links { margin-bottom:0; }
.stage-map-overview:has(.stage-map-image.is-image-missing) .stage-card-body { grid-template-columns:minmax(0,1fr); }
.stage-map-image.is-image-missing { display:none; }
.stage-map-list { background:var(--cell); }
.stage-page a:hover { text-decoration:underline; text-underline-offset:.15em; }
.stage-muted { color:var(--text-orange-light); font-size:12px; }
.stage-music-heading { display:flex; align-items:center; min-height:var(--row-height); margin:0; padding:10px 12px; background:var(--heading-2); font:inherit; border-bottom:1px solid var(--line); }
.stage-music-track { display:flex; flex-direction:column; gap:9px; margin:0; padding:10px; border:0; border-radius:0; background:var(--heading-2); }
.stage-music-track + .stage-music-track { border-top:1px solid var(--line); }
.stage-music-player { display:flex; align-items:center; gap:10px; min-width:0; }
.stage-music-caption { display:flex; flex-direction:column; gap:3px; min-width:0; }
.stage-music-name { min-width:0; overflow-wrap:anywhere; }
.stage-music-note,.stage-audio-status { display:block; padding:0 12px 10px; }
.stage-music-condition,.stage-music-note,.stage-audio-status { font-size:11px; line-height:1.5; }
.stage-music .stage-audio-toggle { display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; padding:7px; border:1px solid var(--line); border-radius:50%; color:var(--text); background:var(--heading); cursor:pointer; }
.stage-audio-toggle svg { display:block; width:18px; height:18px; fill:currentColor; }
.stage-audio-toggle .stage-audio-pause,.stage-audio-toggle[aria-pressed="true"] .stage-audio-play { display:none; }
.stage-audio-toggle[aria-pressed="true"] .stage-audio-pause { display:block; }
.stage-music .stage-audio-toggle:hover,.stage-music .stage-audio-toggle[aria-pressed="true"] { color:#f0c030; border-color:#f0c030; }
.stage-audio-toggle[aria-busy="true"] { opacity:.6; }
.stage-audio-timeline { display:flex; align-items:center; gap:9px; min-width:0; }
.stage-audio-time { flex:none; font-size:10px; line-height:18px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.stage-music .stage-audio-seek { appearance:none; -webkit-appearance:none; flex:1 1 0; min-width:0; width:0; height:18px; margin:0; padding:0; border:0; border-radius:0; background:transparent; color:#f0c030; cursor:pointer; }
.stage-audio-seek::-webkit-slider-runnable-track { height:4px; border-radius:2px; background:linear-gradient(to right,#f0c030 var(--audio-progress,0%),var(--heading) var(--audio-progress,0%)); }
.stage-audio-seek::-moz-range-track { height:4px; border-radius:2px; background:linear-gradient(to right,#f0c030 var(--audio-progress,0%),var(--heading) var(--audio-progress,0%)); }
.stage-audio-seek::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:10px; height:10px; margin-top:-3px; border:0; border-radius:50%; background:currentColor; }
.stage-audio-seek::-moz-range-thumb { width:10px; height:10px; border:0; border-radius:50%; background:currentColor; }
.stage-music .stage-audio-seek:disabled { opacity:.5; cursor:default; }
.stage-audio-toggle:focus-visible,.stage-audio-seek:focus-visible { outline:2px solid #f0c030; outline-offset:3px; }
.stage-audio-status:empty { display:none; }
.stage-search-filter { margin:0 0 var(--section-gap); background:var(--heading-2); border:1px solid var(--line); border-radius:var(--disclosure-panel-radius); box-shadow:var(--shadow); overflow:hidden; }
.stage-search-filter>summary { display:flex; align-items:center; gap:18px; min-height:50px; box-sizing:border-box; padding:10px 18px; color:var(--text-white); background:var(--heading-2); cursor:pointer; }
.stage-search-filter>summary:focus-visible { outline:2px solid var(--text-cyan-light); outline-offset:-2px; }
.stage-filter-label { display:inline-flex; align-items:center; gap:8px; white-space:nowrap; }
.stage-search-mark { display:block; width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.stage-search { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:0; padding:14px 18px; background:var(--heading-2); }
.stage-search input { width:230px; max-width:100%; min-width:0; padding:8px 12px; font:inherit; color:var(--text); background:var(--cell); border:1px solid var(--line); border-radius:5px; }
.stage-search input::placeholder { color:var(--text-white); }
.stage-empty { padding:16px; }
.stage-page [hidden] { display:none!important; }
.stage-page img.is-image-missing { visibility:hidden; }
.stage-xp-settings,.stage-settings-panel { display:flex; flex-direction:column; gap:10px; min-width:0; }
/* Reuse the Unit/Enemy controls, overriding only Stage's generic button rule. */
.stage-xp-settings .treasure-toggle-control { padding:0; border:0; color:var(--text); background:var(--heading-2); border-radius:5px; }
.stage-xp-settings .treasure-toggle-factor { color:var(--text); }
.stage-settings-panel .treasure-name { padding-inline:8px; }
.stage-settings-panel .treasure-input-wrap { padding-inline:6px; }
.stage-settings-panel .stage-treasure-name { flex-direction:column; align-items:flex-start; justify-content:center; white-space:normal; line-height:1.4; }
.stage-treasure-name small { font-size:10px; color:var(--text); }
.stage-settings-panel .treasure-input-wrap input { width:3ch; min-width:2ch; padding:3px 0; font:inherit; text-align:right; color:var(--text); }
.stage-settings-panel .upgrade-level-editor input { width:2ch; }
.stage-settings-panel input[type=number] { appearance:textfield; -moz-appearance:textfield; }
.stage-settings-panel input::-webkit-inner-spin-button,.stage-settings-panel input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.stage-stats select { max-width:100%; color:var(--text); background:var(--heading-2); border:1px solid var(--line); border-radius:4px; padding:4px; font:inherit; }
.stage-clear-control { position:relative; background:var(--cell); }
.stage-stats .stage-clear-control dt { position:relative; z-index:1; pointer-events:none; background:var(--heading-2); }
.stage-clear-control dd > select,.stage-clear-control .site-select { position:absolute; inset:0; width:100%; }
.stage-clear-control .site-select { align-items:stretch; }
:root .stage-page .stage-clear-control select { width:100%; height:100%; padding:0 8px!important; border:0; border-radius:0; background:transparent; color:var(--text); text-align:right; text-align-last:right; direction:rtl; cursor:pointer; }
.stage-clear-control option { direction:rtl; text-align:right; background:var(--cell); }
.stage-clear-control select:focus-visible { outline:2px solid var(--factor); outline-offset:-3px; }
.stage-clear-control .site-select-icon { right:calc(6em + 12px); }




/* Keep identity, artwork and target attributes together in each enemy row. */
.stage-enemy-entry,.stage-enemy-name-line{display:flex;align-items:center;gap:10px;white-space:nowrap}
.stage-enemy-number{font-variant-numeric:tabular-nums;white-space:nowrap}
.stage-enemy-entry{gap:var(--stage-entry-gap)}
.stage-enemy-portrait-link{flex:none;width:90px}
.stage-enemy-attributes{display:inline-flex;align-items:center;width:72px;min-width:72px;flex:0 0 72px}
.stage-enemy-attributes .enemy-attribute-icons{grid-template-columns:repeat(3,22px);grid-auto-rows:22px;column-gap:3px;row-gap:0}
/* The status attribute column must also fit its two-character heading (26px). */
.stage-detail-card .stage-enemy-table .stage-enemy-attributes{width:max(2em,calc(var(--stage-attribute-columns,3) * 25px - 3px));min-width:0;flex-basis:max(2em,calc(var(--stage-attribute-columns,3) * 25px - 3px))}
.stage-detail-card .stage-enemy-table .stage-enemy-attributes .enemy-attribute-icons{grid-template-columns:repeat(var(--stage-attribute-columns,3),22px)}
.stage-enemy-attributes .enemy-attribute-name{display:none}
.stage-enemy-attributes .enemy-attribute{gap:0}
.stage-enemy-entry:has(.stage-enemy-portrait-link:is(:hover,:focus-visible)) .stage-enemy-name{text-decoration:underline;text-underline-offset:.15em}

/* Pack data at the left, keeping numeric cells right-aligned within their columns. */
.stage-enemy-table :is(th,td):not(.stage-table-fill) { width:1px; }
.stage-enemy-table :is(th,td) { padding-inline:6px; }
.stage-enemy-table .stage-table-fill { padding:0; }
.stage-enemy-entry { justify-content:flex-start; }

.stage-page .stage-analysis-open { position:absolute; inset:0; width:100%; height:100%; padding:0; border:0; background:transparent; color:var(--text); border-radius:inherit; cursor:pointer; }
.stage-analysis-open:focus-visible { outline-offset:-3px; }
.stage-castle-slot { z-index:1; pointer-events:none; }
.stage-castle-link { pointer-events:auto; }
/* Match the detail radar: the image contributes 10%, labels/bars remain opaque. */
.stage-analysis-panel { position:absolute; inset:0; z-index:2; display:block; padding:8px 10px; border-radius:inherit; overflow:hidden; color:var(--text); background:color-mix(in srgb,var(--heading-2) 90%,transparent); cursor:pointer; }
.stage-analysis-panel:focus-visible { outline:2px solid var(--factor); outline-offset:-3px; }
.stage-analysis-bars { display:grid; grid-template-rows:repeat(6,minmax(0,1fr)); gap:4px; height:100%; min-height:0; }
.stage-analysis-bar { display:flex; flex-direction:column; justify-content:center; gap:3px; min-height:0; }
.stage-analysis-label { display:flex; align-items:center; justify-content:space-between; gap:5px; font-size:11px; line-height:1.2; white-space:nowrap; }
.stage-analysis-label > :last-child { font-variant-numeric:tabular-nums; }
.stage-analysis-track { position:relative; height:3px; min-height:3px; flex:none; border-radius:1px; overflow:hidden; background:var(--cell); }
.stage-analysis-fill,.stage-analysis-segment { display:block; height:100%; flex:none; }
.stage-analysis-composition { display:flex; }
/* Nine 10% boundaries, with a lightly emphasized middle boundary. */
.stage-analysis-track::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(to right,transparent calc(50% - .5px),#38150080 calc(50% - .5px),#38150080 calc(50% + .5px),transparent calc(50% + .5px)),repeating-linear-gradient(to right,transparent 0,transparent calc(10% - 1px),#38150066 calc(10% - 1px),#38150066 10%); }

.stage-reward-table :is(th,td) { padding-inline:6px; }
.stage-reward-table :is(th,td):not(.stage-table-fill) { width:1px; }
.stage-reward-table .stage-table-fill { padding:0; }
.stage-reward-table .stage-reward-note { text-align:left; padding-inline:14px; }
.stage-reward-table td.stage-reward-note { text-align:right; }
.stage-reward { vertical-align:middle; white-space:nowrap; display:inline-grid; grid-template-columns:var(--stage-reward-image-width,90px) auto; gap:var(--stage-entry-gap); align-items:center; padding-inline-start:var(--stage-reward-leading,70px); }
.stage-reward > .stage-reward-icon { grid-column:1; grid-row:1; justify-self:start; }
.stage-reward > span { grid-column:2; grid-row:1; }
.stage-reward-heading,.stage-enemy-heading { display:grid; grid-template-columns:calc(var(--stage-reward-leading,70px) + var(--stage-reward-image-width,90px) + var(--stage-entry-gap)) auto; align-items:center; }
.stage-reward-heading > :first-child,.stage-enemy-heading > :first-child { justify-self:start; }
.stage-enemy-identity-heading { display:grid; grid-template-columns:4ch auto; column-gap:var(--stage-entry-gap); align-items:center; font-variant-numeric:tabular-nums; }
[data-material-help] { cursor:help; }
[data-material-help]:focus-visible { outline:1px solid var(--text); outline-offset:3px; }
.stage-hover-note { max-width:36em; white-space:pre-line; margin-top:8px; }


.stage-analysis-bar:focus-visible { outline:1px solid var(--factor); outline-offset:2px; }
.stage-analysis-tooltip { position:fixed; z-index:10000; max-width:calc(100vw - 16px); padding:8px 10px; border:1px solid var(--line); border-radius:5px; background:var(--heading); color:#e0e0e0; box-shadow:var(--shadow); pointer-events:none; font-size:12px; line-height:1.6; }
.stage-analysis-tooltip[hidden] { display:none; }
.stage-analysis-tooltip.is-reward { white-space:pre-line; }
.stage-analysis-tooltip.is-material .stage-hover-note { max-width:none; margin-top:0; }
.stage-analysis-tooltip-heading { font-size:11px; margin-bottom:5px; }
.stage-analysis-tooltip-grid { display:grid; grid-template-columns:max-content minmax(5em,1fr); column-gap:18px; }
.stage-analysis-tooltip-grid > span { white-space:nowrap; }
.stage-analysis-tooltip-grid > :nth-child(even) { text-align:right; font-variant-numeric:tabular-nums; }

.stage-material-rate-heading { display:block; line-height:1.4; text-align:right; }
.stage-material-disclosure { border-top:0; border-radius:inherit; }
.stage-material-disclosure > summary {
  display:grid; grid-template-columns:var(--stage-identity-column-width,310px) var(--stage-numeric-column-2,90px) minmax(0,1fr);
  gap:0; padding:1px 0; min-height:var(--row-height); border-bottom:1px solid transparent;
}
.stage-material-disclosure > summary > :is(.stage-reward-heading,.stage-material-summary-rate) { padding-inline:6px; min-width:0; }
.stage-material-summary-label { opacity:0; visibility:hidden; transition:opacity 420ms ease-in-out,visibility 0s 420ms; }
.stage-material-disclosure:is([data-site-expanded="true"],[open]:not([data-site-expanded="false"])) > summary { border-bottom-color:var(--line); }
.stage-material-disclosure:is([data-site-expanded="true"],[open]:not([data-site-expanded="false"])) .stage-material-summary-label { opacity:1; visibility:visible; transition-delay:0s; }
/* Preserve table header semantics without a second visible header row. */
.stage-material-disclosure thead,details:is(.stage-ex,.stage-ex-sources) thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(prefers-reduced-motion:reduce) { .stage-material-summary-label { transition:none; } }

.stage-enemy-table td:nth-child(n+3):nth-child(-n+5):not(.stage-table-fill) { text-align:right; }

.stage-rewards th:nth-child(2),
.stage-rewards table[aria-label="クリア報酬"] th:nth-child(3),
.stage-enemy-table th:nth-child(n+2):nth-child(-n+5) { text-align:right; }

/* Match the name columns across enemy, reward and material tables in each stage card. */
.stage-card :is(.stage-enemy-table,.stage-reward-table) :is(th,td):first-child {
  box-sizing:border-box;
  width:var(--stage-identity-column-width,auto);
  min-width:var(--stage-identity-column-width,210px);
}

/* Share the reward rate width with the combined enemy magnification column. */
.stage-card .stage-reward-table :is(th,td):nth-child(2):not(.stage-table-fill) {
  box-sizing:border-box; width:var(--stage-numeric-column-1,auto); min-width:var(--stage-numeric-column-1,0px);
}
.stage-card .stage-enemy-table :is(th,td):nth-child(2):not(.stage-table-fill),
.stage-card .stage-reward-table :is(th,td):nth-child(3):not(.stage-table-fill) {
  box-sizing:border-box; width:var(--stage-numeric-column-2,auto); min-width:var(--stage-numeric-column-2,0px);
}

/* Align the first line of entry-condition labels and values, including wrapped text. */
.stage-entry-conditions { overflow:hidden; border-radius:5px; }
.stage-entry-conditions .stage-info-row:first-child { border-top:0; }
.stage-entry-conditions :is(.stage-info-label,.stage-info-value) { padding-block:14px; line-height:22px; }
.stage-map-clear-list { display:flex; flex-wrap:wrap; }
.stage-map-clear-list > span { max-width:100%; overflow-wrap:anywhere; }

/* Abyss is a separate mode, not a second enemy-magnification crown. */
.stage-crowns button[data-stage-abyss][aria-pressed="false"] { opacity:.45; }
.stage-crowns button[data-stage-abyss][aria-pressed="true"] { opacity:1; }

/* EX destinations share the reward panels' stripes and compact, left-packed layout. */
.stage-ex-table :is(th,td):not(.stage-table-fill) { width:1px; }
.stage-ex-table :is(th,td):nth-child(2) { text-align:right; }
.stage-ex-table .stage-table-fill { padding:0; }
.stage-ex-destination { display:inline-flex; align-items:center; gap:10px; white-space:nowrap; }
.stage-ex-number { color:var(--text); font-variant-numeric:tabular-nums; }

/* The disclosure summary is the visible header; both it and the table use the same tracks. */
details:is(.stage-ex,.stage-ex-sources) { --ex-source-width:32em; --ex-rate-width:6.5em; }
details:is(.stage-ex,.stage-ex-sources) > summary {
  display:grid; grid-template-columns:var(--ex-source-width) var(--ex-rate-width) 1fr;
  gap:0; padding:1px 0; min-height:var(--row-height);
}
details:is(.stage-ex,.stage-ex-sources) > summary > :is(span:first-child,.stage-ex-summary-rate) { padding-inline:12px; }
details:is(.stage-ex,.stage-ex-sources) > summary::after { justify-self:end; margin-right:13px; }
.stage-ex-summary-rate { text-align:right; visibility:hidden; }
details:is(.stage-ex,.stage-ex-sources):is([data-site-expanded="true"],[open]:not([data-site-expanded="false"])) .stage-ex-summary-rate { visibility:visible; }
details:is(.stage-ex,.stage-ex-sources) table { table-layout:fixed; }
.stage-ex-source-col { width:var(--ex-source-width); }
.stage-ex-rate-col { width:var(--ex-rate-width); }
details:is(.stage-ex,.stage-ex-sources) .stage-ex-destination { white-space:normal; }

/* Fixed content columns pack metadata to the left; only the trailing cell expands. */
.stage-map-table { table-layout:auto; }
.stage-map-table:not(:has(tr:not([hidden]) > [data-map-has="ex"])) .map-col-ex,
.stage-map-table:not(:has(tr:not([hidden]) > [data-map-has="drops"])) .map-col-drops,
.stage-map-table:not(:has(tr:not([hidden]) > [data-map-has="limit"])) .map-col-limit,
.stage-map-table:not(:has(tr:not([hidden]) > [data-map-has="score"])) .map-col-score { display:none; }
.stage-map-table.stage-table :is(th,td) { color:var(--text); text-align:left; }
.stage-map-table.stage-table :is(th,td):not(.stage-table-fill) { width:1px; white-space:nowrap; }
.stage-map-table.stage-table .stage-table-fill { width:auto; padding:0; }
:root .stage-page .stage-map-table .stage-other-icon { zoom:.5; }
.stage-map-table td:first-child { min-width:0; }
.stage-map-table tbody tr:nth-child(n) { background:#8a3a00; }
.stage-map-table tbody tr.is-map-even { background:var(--cell); }
.stage-map-link { width:max-content; }
.stage-map-name { display:block; clear:both; white-space:nowrap; }
.stage-map-crowns { display:inline-flex; align-items:center; gap:3px; vertical-align:middle; }
.stage-map-table .stage-difficulty-stars { float:left; flex-wrap:nowrap; gap:2px; margin:0 0 2px 1em; transform:translate(-.5em,2px); }
:root .stage-table.stage-map-table > tbody > tr:has(.stage-difficulty-stars) > :is(td:nth-child(-n+3),.map-col-ex,.map-col-limit,.map-col-score) { vertical-align:baseline; }
:root .stage-page .stage-map-table .stage-difficulty-stars .stage-other-icon { zoom:.4; }
.stage-map-table .stage-difficulty-stars > .is-inactive { opacity:.5; }
.stage-map-table .stage-difficulty-stars > .is-active img { opacity:.75; }
.stage-map-abyss-label { display:block; }
.stage-map-table:not(:has(tr:not([hidden]) > [data-map-has="abyss"])) .stage-map-abyss-label { display:none; }

.stage-restriction-units { display:flex; flex-wrap:wrap; gap:4px 16px; }
.stage-restriction-scope { margin-bottom:4px; }
.stage-restriction-scope:empty { display:none; }

/* Conditional selections are separate from percentage-based EX lotteries. */
.stage-transition-table :is(th,td):first-child { width:1px; white-space:nowrap; }
.stage-transition-table :is(th,td):nth-child(2) { width:auto; text-align:left; white-space:normal; min-width:220px; }

.stage-music .stage-audio-repeat{display:grid;place-items:center;flex:none;width:28px;height:28px;padding:4px;border:1px solid var(--line);border-radius:5px;background:var(--heading);color:var(--text);cursor:pointer}
.stage-audio-repeat svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.stage-music .stage-audio-repeat[aria-pressed="true"]{color:#f0c030;border-color:#f0c030}
.stage-audio-repeat:focus-visible{outline:2px solid #f0c030;outline-offset:2px}

.stage-enemy-table :is(th,td).stage-score-cell { text-align:right; }
.stage-score-cell > span { cursor:help; }

.stage-map-system{margin-block:var(--section-gap)}
.stage-content>.stage-map-system{margin-block:0}
.stage-point-table th:first-child,.stage-point-table td:first-child,.stage-point-table th:nth-child(3),.stage-point-table td:nth-child(3){text-align:right}
.stage-point-table .stage-reward{padding-left:0}
.stage-point-table :is(th,td):not(.stage-table-fill){width:1px}.stage-point-table :is(th,td):nth-child(2){text-align:left}

/* Full-stage animation uses the enemy-table width; scene geometry controls height. */
.stage-page .stage-background-toggle{margin-left:auto;flex:none;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:5px;color:var(--text);background:transparent;cursor:pointer}
.stage-page .stage-background-toggle:hover{color:var(--text);background:var(--heading-2)}
.stage-background-animation{overflow:hidden;border-radius:6px;min-width:0;isolation:isolate;background:var(--heading-2)}
.stage-background-animation[hidden]{display:none}
.stage-background-scene{position:relative;width:100%;aspect-ratio:var(--stage-scene-ratio);background:#241507;overflow:hidden;}
.stage-background-scene>:is(.stage-scene-base,canvas){position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}
.stage-background-scene>p{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:12px;color:#e0e0e0;text-align:center;background:#241507b3;z-index:3}

.stage-background-scene>.stage-scene-castle{position:absolute;max-width:none;height:auto;transform:translate(-50%,-100%);pointer-events:none;user-select:none}
.stage-scene-castle[hidden]{display:none}

/* Cumulative rewards: one shared header line, matching the list row columns. */
.stage-point-rewards { --point-title:180px; --point-value:130px; --point-name:300px; --point-amount:90px; overflow:hidden; }
.stage-point-rewards > summary { position:relative; display:grid; grid-template-columns:var(--point-title) var(--point-value) var(--point-name) minmax(0,1fr); gap:0; padding:1px 0; min-height:var(--row-height); background:var(--heading-2); }
.stage-point-rewards > summary > span { padding:0 12px; white-space:nowrap; }
.stage-point-rewards > summary > span:first-child { padding-right:26px; }
.stage-point-rewards > summary::after { position:absolute; left:150px; right:auto; }
.stage-point-rewards > summary > .stage-point-heading { opacity:0; visibility:hidden; transition:opacity 420ms ease-in-out,visibility 0s 420ms; }
.stage-point-rewards:is([data-site-expanded="true"],[open]:not([data-site-expanded="false"])) > summary > .stage-point-heading { opacity:1; visibility:visible; transition-delay:0s; }
.stage-point-rewards .stage-point-body,.stage-point-rewards .stage-treasure-guide-body { margin:0; padding:0; border:0; }
.stage-point-rewards .stage-point-table { width:100%; table-layout:fixed; border:0; border-radius:0; box-shadow:none; }
.stage-point-title-col { width:var(--point-title); }.stage-point-value-col { width:var(--point-value); }.stage-point-name-col { width:var(--point-name); }.stage-point-amount-col { width:var(--point-amount); }
.stage-point-rewards thead { display:none; } /* Compatibility with already generated pages. */
.stage-point-rewards .stage-point-table :is(th,td) { width:auto; padding:8px 12px; text-align:left; }
.stage-point-rewards .stage-point-table td:nth-child(2),.stage-point-rewards .stage-point-table td:nth-child(4),.stage-point-rewards > summary > span:nth-child(2),.stage-point-rewards > summary > span:nth-child(4) { text-align:right; }
.stage-point-rewards .stage-point-table tr { height:var(--row-height); }
.stage-point-rewards .stage-point-table td { border-bottom:0; }
.stage-point-rewards.site-disclosure > summary { padding-right:0!important; }
.stage-point-rewards.site-disclosure > summary > .site-select-icon { left:150px; right:auto; width:14px; height:14px; padding:0; }

/* Transparent keyboard-accessible hit area; artwork stays on the native canvas. */
.stage-background-scene>.stage-castle-attack{position:absolute;z-index:2;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;cursor:pointer;min-width:0;min-height:0;opacity:1}
.stage-background-scene>.stage-castle-attack:hover{background:transparent;box-shadow:none}
.stage-background-scene>.stage-castle-attack:disabled{cursor:default;background:transparent;opacity:1}
.stage-background-scene>.stage-castle-attack:focus-visible{outline:2px solid #e0e0e0;outline-offset:2px}
.stage-castle-notice{position:absolute;bottom:4px;left:4px;right:4px;color:#e0e0e0;font-size:12px;pointer-events:none;z-index:3}


/* Encounter and status tables share one position in the right-hand column. */
.stage-enemy-views{display:grid;min-width:0}
.stage-status-panel{margin:0;min-width:0}
.stage-enemy-views > :is(.stage-status-panel,.stage-enemies){grid-area:1 / 1;align-self:start;min-width:0;box-sizing:border-box;width:100%;max-width:100%;margin-inline:0}
.stage-status-panel{border:1px solid var(--line);border-radius:7px;overflow:hidden;background:var(--cell)}
.stage-status-scroll{overflow-x:auto}
.stage-title-actions{display:flex;align-items:center;gap:6px;margin-left:auto}
.stage-page .stage-title-actions .stage-background-toggle{margin-left:0}
.stage-page .stage-status-toggle{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;background:transparent;color:var(--text);border-radius:5px}
/* Shared header control remains available while the two tables crossfade. */
.stage-page .stage-enemy-views > .stage-status-toggle{grid-area:1 / 1;align-self:start;justify-self:end;z-index:2;margin:7px 7px 0 0}
.stage-page .stage-enemy-views > .stage-favorite-enemies{grid-area:1/1;align-self:start;justify-self:end;z-index:2;margin:8px 51px 0 0;padding:0;border:0;background:transparent;box-shadow:none}
.stage-page .stage-enemy-views .stage-enemy-table .stage-table-fill{min-width:87px}
.stage-page [data-stage-favorite-result]{margin:4px 0;text-align:right;font-size:13px}
/* The empty trailing cell may shrink without moving the status data columns. */
.stage-page .stage-enemy-views .stage-status-table .list-fill{min-width:0}
/* Detail status columns share 5px gutters; the empty trailing filler has no padding. */
.stage-page .stage-detail-card{--stage-entry-gap:10px}
.stage-page .stage-detail-card .stage-status-table :is(th,td):not(.list-fill){padding-inline:5px}
.stage-page .stage-detail-card .stage-enemy-table :is(th,td):first-child{padding-inline:5px}
.stage-page .stage-detail-card .stage-enemy-heading{grid-template-columns:calc(var(--stage-enemy-leading,70px) + var(--stage-reward-image-width,90px) + var(--stage-entry-gap)) auto}
/* Both enemy views share the measured identity boundary and magnification column. */
:root .stage-page .stage-detail-card .stage-enemy-table :is(th,td):first-child{width:var(--stage-enemy-identity-width,auto);min-width:var(--stage-enemy-identity-width,210px)}
:root .stage-page .stage-detail-card .stage-status-table :is(th,td):nth-child(4){width:calc(var(--stage-enemy-identity-width) - var(--stage-enemy-leading) - var(--stage-reward-image-width) - var(--stage-entry-gap));min-width:calc(var(--stage-enemy-identity-width) - var(--stage-enemy-leading) - var(--stage-reward-image-width) - var(--stage-entry-gap))}
:root .stage-page .stage-detail-card .stage-status-table :is(th,td).enemy-list-magnifications,
:root .stage-page .stage-detail-card .stage-enemy-table :is(th,td).stage-magnifications{width:var(--stage-enemy-magnification-width,auto);min-width:var(--stage-enemy-magnification-width,0px)}
.stage-page .stage-detail-card .stage-enemy-table :is(th,td).stage-magnifications{padding-inline:5px}
/* Give encounter timing columns more breathing room after the shared identity/magnification block. */
.stage-page .stage-detail-card .stage-enemy-table :is(th,td):nth-child(n+3):nth-child(-n+5):not(.stage-table-fill){padding-inline:16px}
/* Fit the current formation's maximum attribute count; all other tables keep three slots. */
.stage-page .stage-detail-card .stage-status-table .enemy-list-attributes .enemy-attribute-icons{grid-template-columns:repeat(var(--status-attribute-columns,3),22px);width:calc(var(--status-attribute-columns,3) * 25px - 3px)}
.stage-page .stage-detail-card .stage-status-table .list-status-traits{grid-template-columns:repeat(var(--status-trait-columns,5),22px);width:calc(var(--status-trait-columns,5) * 25px - 3px)}
.stage-page .stage-status-toggle:hover,.stage-page .stage-status-toggle[aria-pressed="true"]{background:var(--heading-2)}
.stage-page .enemy-status-table .list-sort{padding:0;border:0;border-radius:0;background:none;color:inherit;font:inherit}
.stage-page .enemy-status-table .list-status-trait{padding:0;border:0;background:none}
.stage-page .stage-treasure-gauge-guide{flex:none;border:1px solid var(--line);border-radius:6px}


/* Compact crowns embedded in map/stage condition sentences. */
.stage-condition-crowns{display:inline-flex;align-items:center;gap:2px;vertical-align:middle;margin-inline:3px;white-space:nowrap}
:root .stage-page .stage-condition-crowns .stage-other-icon{width:16.5px;height:15px;zoom:1;object-fit:contain}

.stage-material-summary-rate { grid-column:2; }
:root .stage-page .stage-condition-crown-number { width:auto; height:15px; min-width:0; max-width:none; max-height:none; zoom:1; object-fit:contain; }

/* Reward name and quantity share one cell; probability retains its aligned position. */
:root .stage-card .stage-reward-combined :is(th,td):first-child {
  width:var(--stage-identity-column-width,310px);
  min-width:var(--stage-identity-column-width,310px);
}
:root .stage-card .stage-reward-combined :is(th,td):first-child + :is(th,td) {
  width:var(--stage-numeric-column-2,90px); min-width:var(--stage-numeric-column-2,90px); text-align:right;
}
:root .stage-card .stage-reward-combined :is(th,td):first-child ~ .stage-reward-note { width:1%; min-width:0; text-align:right; }

/* One image frame rule: 5px inset and 5px feather, independent of viewport size. */
:is(.stage-map-visual,.stage-visual,.stage-background-animation){padding:5px;box-sizing:border-box;}
:is(.stage-map-image,.stage-visual-art,.stage-background-scene){mask-image:linear-gradient(to right,transparent,#000 5px,#000 calc(100% - 5px),transparent),linear-gradient(to bottom,transparent,#000 5px,#000 calc(100% - 5px),transparent);mask-composite:intersect;}
.stage-content>.stage-background-animation{flex:none;}

/* Name brackets remain text, outside the destination links. */
.stage-nav-item > a { display:inline-flex; align-items:center; }
.stage-nav-item:has(.stage-name-image.is-image-missing) .stage-name-image-link { display:none; }
.stage-nav-item:has(.stage-name-image.is-image-missing) .stage-name-fallback { display:inline; }

/* Mission rewards share the reward image/name columns; conditions use the remaining width. */
:root .stage-card .stage-mission-table :is(th,td).stage-mission-condition { width:auto; min-width:0; white-space:normal; text-align:left; line-height:1.5; padding:5px 12px; }
.stage-mission-table tbody tr:nth-child(n) { background:#8a3a00; }
.stage-mission-table tbody tr.is-mission-even { background:var(--cell); }

/* Keep the castle condition and initial delay together in the shared encounter row. */
.stage-initial-time { display:inline-block; white-space:nowrap; line-height:20px; }

.stage-initial-castle { color:#f0f080; }

.stage-enemy-table .stage-magnifications { line-height:20px; }
.stage-magnifications > span:not([hidden]) { display:block; }

/* Mission rewards use the shared disclosure motion and a single aligned header. */
.stage-mission-disclosure { border-top:0; border-radius:inherit; }
.stage-mission-disclosure > summary { background:var(--heading); display:grid; grid-template-columns:var(--stage-identity-column-width,310px) var(--stage-numeric-column-2,90px) minmax(0,1fr); gap:0; padding:1px 0; min-height:var(--row-height); border-bottom:1px solid transparent; }
.stage-mission-disclosure > summary > :is(.stage-reward-heading,.stage-mission-summary-number) { padding-inline:6px; min-width:0; }
.stage-mission-summary-number { text-align:right; line-height:20px; }
.stage-mission-summary-condition { padding-inline:12px; }
.stage-mission-summary-label { opacity:0; visibility:hidden; transition:opacity 420ms ease-in-out,visibility 0s 420ms; }
.stage-mission-disclosure:is([data-site-expanded="true"],[open]:not([data-site-expanded="false"])) > summary { border-bottom-color:var(--line); }
.stage-mission-disclosure:is([data-site-expanded="true"],[open]:not([data-site-expanded="false"])) .stage-mission-summary-label { opacity:1; visibility:visible; transition-delay:0s; }
.stage-mission-disclosure thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(prefers-reduced-motion:reduce) { .stage-mission-summary-label { transition:none; } }

/* Treasure columns use their own content widths, independent of reward/enemy columns. */
:root .stage-treasure-table :is(th,td):not(.stage-table-fill) { width:1px; min-width:0; white-space:nowrap; text-align:left; }
:root .stage-treasure-table td[data-treasure-quality] { text-align:right; }

/* Treasure uses the shared disclosure animation without rebuilding its controls. */
.stage-treasure > summary { cursor:pointer; }
.stage-treasure > summary:focus-visible { outline:2px solid var(--factor); outline-offset:-3px; }

/* Event-only formations and bonus lists share stage table spacing and zebra colors. */
.stage-roguelike-section > summary { background:var(--heading-2); }
:root .stage-roguelike-table :is(th,td):not(.stage-table-fill) { width:1px; min-width:0; white-space:nowrap; text-align:left; }
.stage-roguelike-table .stage-table-fill { width:auto; }
:root .stage-roguelike-table td:nth-child(2),.stage-point-table td.stage-roguelike-bonus { white-space:normal; }
.stage-roguelike-table .stage-reward { white-space:nowrap; padding-inline-start:0; }

#excavation-guide { margin-block-end:var(--section-gap); }
#excavation-guide > details { border:0; background:transparent; }
#excavation-guide > details > summary { border:1px solid var(--line); border-radius:var(--disclosure-panel-radius); }
.excavation-guide-sections { margin-block-start:var(--section-gap); line-height:1.8; }
.excavation-guide-sections h4 { margin:0 0 6px; font:inherit; }
.excavation-guide-sections .site-note p + p { margin-block-start:.5em; }
.stage-excavation .stage-table :is(th,td) { text-align:left; width:auto; min-width:0; white-space:normal; }
.stage-excavation .stage-treasure-guide-body .stage-table td { height:auto; padding:5px 12px; }
.stage-excavation .stage-treasure-guide-body .stage-table th { padding:5px 12px; }
.excavation-guide-sections .stage-table :is(th,td):not(:last-child) { width:1px; white-space:nowrap; }
.excavation-targets { display:flex; flex-wrap:wrap; align-content:center; }
.excavation-targets > span { white-space:nowrap; }
.excavation-guide-sections .excavation-targets { min-height:calc(var(--row-height) - 3px); }
.stage-excavation .stage-table > tbody > tr:has(.excavation-targets) > td { vertical-align:baseline; }
.stage-excavation .stage-info-value { overflow-wrap:anywhere; }
