/* Zeyra Wiki: component density, native geometry and semantic reading. */
:root {
    --bg: #141413;
    --rail: #1a1a19;
    --surface: #20201f;
    --raised: #282827;
    --text: #e8e1cf;
    --secondary: #c8c2af;
    --muted: #aaa894;
    --accent: #d1b278;
    --bright: #eed6a8;
    --border: #454333;
    --header: 58px;
    --rail-width: 184px;
}
html {
    scroll-padding-top: 78px;
}
body.wiki-compact {
    background:
        radial-gradient(ellipse at 90% 0, #34332444, transparent 45%), var(--bg);
    font:
        14px/1.5 "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;
}
h1,
h2,
h3 {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    letter-spacing: 0;
}
h1 {
    font-size: 28px;
    line-height: 1.2;
}
h2 {
    font-size: 18px;
}
h3 {
    font-size: 14px;
}
button,
input,
select {
    font: inherit;
}
button {
    color: var(--text);
}
.button {
    color: #1a1a19;
}
button,
.button,
.quiet-button {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 30px;
    border-radius: 2px;
    box-shadow: none;
}
input,
select {
    padding: 6px 9px;
    border: 1px solid #55523c;
    background: #181817;
    color: var(--text);
    border-radius: 2px;
    min-height: 32px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 2px solid #dfc18b;
    outline-offset: 3px;
}
.eyebrow {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--accent);
}
.notice {
    padding: 9px 12px;
    margin: 10px 0;
    font-size: 12px;
    border-radius: 2px;
}
.muted,
.source-caption {
    color: var(--muted);
    font-size: 12px;
}
[hidden] {
    display: none !important;
}
.wiki-header {
    height: 58px;
    padding: 0 24px;
    gap: 16px;
    background: #1b1b1a;
    border-bottom: 1px solid #574c35;
}
.wiki-brand {
    width: 150px;
    flex: 0 0 150px;
    gap: 8px;
}
.wiki-brand img {
    width: 29px;
    height: 29px;
}
.wiki-brand > span {
    font-size: 16px;
}
.wiki-brand small {
    font-size: 9px;
}
.wiki-primary {
    display: flex;
    gap: 2px;
}
.wiki-primary a {
    padding: 7px 8px;
    font-size: 12px;
}
.wiki-primary a.active {
    color: #f2d8a6;
    background: #2c2c2b;
    box-shadow: inset 0 -2px #b99b65;
}
.ecosystem {
    display: none;
}
.header-search {
    max-width: 292px;
    min-width: 160px;
    height: 34px;
    padding: 0 10px;
    background: #161615;
    border-color: #4a4a49;
}
.header-search input {
    font-size: 12px;
    min-height: 28px;
}
.header-search kbd {
    font-size: 10px;
}
.language-switch a {
    font-size: 11px;
    padding: 6px;
}
.menu-toggle,
.drawer-close {
    display: none;
}
.wiki-layout {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 184px minmax(0, 1fr);
    gap: 24px;
    padding: 22px 24px 0;
}
.wiki-main {
    min-width: 0;
    padding: 0 0 28px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.wiki-main:before,
.wiki-main:after {
    display: none;
}
.wiki-rail {
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 98px);
    overflow: auto;
    padding: 12px 15px 16px 0;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: none;
    box-shadow: none;
}
.rail-top {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 12px;
}
.rail-global {
    display: none;
}
.rail-context a {
    display: block;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.4;
    border-left: 2px solid transparent;
    color: #c4c3af;
}
.rail-context a:hover,
.rail-context a[aria-current] {
    background: #2c2c2b;
    border-left-color: #c4a66f;
    color: #ecd6ad;
}
.rail-caption {
    font-size: 11px;
    color: #c4b087;
    padding: 3px 10px;
}
.rail-divider {
    margin: 17px 0;
}
.rail-link.quiet {
    display: flex;
    gap: 6px;
    padding: 7px 10px;
    font-size: 12px;
    border: 0;
    background: none;
    color: #aaa991;
}
.rail-bottom {
    display: none;
}
.breadcrumbs {
    font-size: 11px;
    margin: 0 0 12px;
    gap: 10px;
}
.back-results {
    display: inline-block;
    font-size: 11px;
    color: #c9ad76;
    margin-bottom: 9px;
}
.page-heading {
    margin: 0 0 16px;
}
.page-heading h1 {
    font-size: 28px;
    margin: 0;
}
.page-heading .eyebrow {
    display: none;
}
.wiki-footer {
    margin-top: 30px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    font-size: 11px;
}
.wiki-footer p {
    font-size: 11px;
}
.entity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--border);
    background: var(--surface);
}
.entity-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 38px 9px;
    grid-template-rows: auto auto;
    gap: 2px 9px;
    align-items: center;
    padding: 11px 10px;
    min-height: 72px;
    border: 0;
    border-right: 1px solid #3c3c3b;
    border-bottom: 1px solid #3c3c3b;
    border-radius: 0;
    background: none;
    box-shadow: none;
    transform: none;
    overflow: visible;
}
.entity-card:hover {
    transform: none;
    background: #2e2e2d;
}
.entity-card:before,
.entity-card:after {
    display: none;
}
.item-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 38px;
    min-width: 0;
    flex: none;
    padding: 2px;
    border: 1px solid #62563a;
    border-radius: 1px;
    background: #181817;
    box-shadow: none;
}
.item-icon img {
    width: auto;
    height: auto;
    max-width: 26px;
    max-height: 32px;
    object-fit: contain;
}
.entity-card-copy {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 0;
}
.entity-card-copy strong {
    font:
        600 13px/1.4 "Segoe UI",
        sans-serif;
    white-space: normal;
    overflow-wrap: anywhere;
}
.entity-card-copy small {
    font-size: 11px;
    line-height: 1.35;
    color: #a9ae96;
    margin-top: 3px;
    letter-spacing: 0;
}
.card-stat {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    gap: 6px;
    font-size: 12px;
    color: #b8c69f;
}
.card-stat small {
    font-size: 10px;
}
.card-level {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    border: 0;
    background: none;
    padding: 0;
}
.card-level small {
    font-size: 10px;
    color: var(--muted);
}
.grade-badge {
    grid-column: 3;
    grid-row: 2;
    font-size: 10px;
    padding: 2px 5px;
    border: 1px solid #5b5439;
    border-radius: 2px;
    white-space: nowrap;
    background: #292928;
}
.card-arrow {
    grid-column: 4;
    grid-row: 1 / span 2;
    color: #ba9f69;
    font-size: 17px;
}
.card-cost {
    grid-column: 2 / span 2;
    grid-row: 2;
    font-size: 12px;
}
.card-sigil {
    font-size: 21px;
}
.scene-row {
    grid-template-columns: 76px minmax(0, 1fr) 32px 8px;
}
.card-scene {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 76px;
    height: auto;
    aspect-ratio: 732/564;
    border: 1px solid #554e38;
    background: none;
    overflow: hidden;
}
.card-scene img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 732/564;
    object-fit: contain;
}
.card-map {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 62px;
    height: 48px;
    overflow: hidden;
}
.card-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.map-row {
    grid-template-columns: 62px minmax(0, 1fr) 40px 8px;
}
.guide-range-art {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 54px;
    height: 44px;
    font-size: 13px;
    border: 1px solid #62583b;
    background: #2e2e2d;
}
.kind-guide {
    grid-template-columns: 54px minmax(0, 1fr) 24px 8px;
}
.guide-card-art {
    width: 72px;
    height: 48px;
    object-fit: cover;
}
.kind-guide:has(.guide-card-art) {
    grid-template-columns: 72px minmax(0, 1fr) 22px 8px;
}
.relation-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--border);
}
.relation-row {
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid #3b3b3a;
    border-radius: 0;
    background: #212120;
}
.relation-row > .entity-card {
    padding: 0;
    min-height: 54px;
    border: 0;
}
.relation-meta,
.spawn-points {
    font-size: 11px;
    gap: 8px;
}
.relation-prices {
    font-size: 12px;
}
.spawn-points,
.relation-prices {
    background: #212120;
    border-color: var(--border);
    border-radius: 2px;
}
.spawn-points {
    padding: 8px 10px;
}
.spawn-points a {
    display: inline-block;
    padding: 4px 6px;
    color: var(--accent);
}
.catalogue-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    padding: 13px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
}
.catalogue-filters > div {
    min-width: 80px;
    flex: 1;
}
.catalogue-filters .filter-search {
    flex: 2;
    min-width: 170px;
}
.catalogue-filters label {
    font-size: 11px;
    margin-bottom: 4px;
}
.catalogue-filters input,
.catalogue-filters select {
    background: #181817;
    border-color: #55523c;
    color: var(--text);
    font-size: 12px;
    min-height: 32px;
    width: 100%;
}
.catalogue-filters .filter-checks {
    display: flex;
    flex-basis: 100%;
    gap: 20px;
    align-items: center;
}
.filter-checks label {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    margin: 0;
    font-size: 12px;
}
.catalogue-filters input[type="checkbox"] {
    width: 14px;
    height: 14px;
    min-height: 14px;
    padding: 0;
    flex: 0 0 14px;
    accent-color: #bea572;
}
.filter-actions {
    display: flex;
    gap: 9px;
    align-items: center;
}
.filter-actions a {
    font-size: 11px;
}
.category-tabs,
.domain-switch {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}
.category-tabs a,
.domain-switch a {
    font-size: 12px;
    padding: 6px 9px;
    border: 1px solid #4d4d4c;
    border-radius: 2px;
    background: #20201f;
}
.category-tabs a[aria-current],
.domain-switch a[aria-current] {
    color: #efd9ad;
    background: #353534;
    border-color: #aa8e5b;
}
.category-tabs small {
    font-size: 10px;
}
.result-count {
    font-size: 11px;
    margin: 11px 0;
}
.feed-controls {
    padding: 16px;
    text-align: center;
    font-size: 12px;
}
.entity-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 110px;
    padding: 15px 18px;
    border: 1px solid #625437;
    border-radius: 2px;
    background: linear-gradient(110deg, #262625, #1e1e1d);
    box-shadow: none;
    margin: 0 0 10px;
    overflow: hidden;
}
.entity-hero:before,
.entity-hero:after {
    content: none;
}
.entity-hero-copy {
    padding: 0;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.facts-panel > h2,
.relation-group > h3,
.section-heading h2 {
    font-family:
        Segoe UI,
        sans-serif;
}
.entity-hero h1 {
    font:
        600 27px/1.2 "Segoe UI",
        sans-serif;
    margin: 4px 0 8px;
}
.entity-hero-copy > .eyebrow {
    margin: 0 0 6px;
    line-height: 1.3;
}
.entity-hero-copy > p:not(.eyebrow) {
    font-size: 12px;
    line-height: 1.45;
    max-width: 590px;
    margin: 6px 0;
}
.entity-actions {
    margin-top: 0;
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
}
.entity-actions .button,
.entity-actions button {
    min-height: 29px;
    font-size: 11px;
    padding: 5px 8px;
}
.entity-vnum {
    display: none;
}
.inline-model {
    width: 100%;
    max-width: 400px;
    margin: 16px auto;
}
.inline-model .native-stage,
.item-appearance .native-stage {
    min-height: 0;
    height: auto;
    aspect-ratio: 732/564;
    background: none;
}
.inline-model .native-stage > img,
.item-appearance .native-stage > img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.entity-hero > .native-viewer {
    width: 130px;
    flex: 0 0 130px;
    margin: 0;
    background: none;
    border: 0;
    border-radius: 0;
}
.entity-hero .native-stage {
    height: auto;
    aspect-ratio: 732/564;
    border: 1px solid #6c5a3b;
    background: none;
}
.entity-hero .native-stage > img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.entity-hero .native-viewer figcaption {
    display: none;
    padding: 3px 0;
    background: none;
    border: 0;
    font-size: 9px;
    min-height: 0;
}
.entity-hero .media-view-controls {
    display: none;
}
.entity-hero .media-expand {
    padding: 1px 4px;
    min-height: 18px;
    right: 3px;
    top: 3px;
    font-size: 11px;
}
.entity-hero .entity-icon-display {
    min-height: 42px;
    height: 42px;
    width: 44px;
    flex: 0 0 44px;
    padding: 5px;
    border: 1px solid #66573a;
    background: #191918;
    border-radius: 1px;
    box-shadow: none;
    transform: none;
}
.entity-icon-display:before,
.entity-icon-display:after {
    display: none;
}
.entity-icon-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none;
}
.entity-guide-diagram {
    width: 250px;
    height: auto;
    flex: 0 0 250px;
}
.entity-hero-map {
    min-height: 0;
    width: 120px;
    height: 88px;
    object-fit: cover;
}
.hero-map-detail {
    min-height: 66px;
    padding: 10px 14px;
}
.hero-map-detail h1 {
    font-size: 25px;
}
.hero-map-detail .entity-actions,
.hero-map-detail .eyebrow,
.hero-map-detail .entity-hero-copy > p {
    display: none;
}
.hero-map-detail .entity-hero-map {
    width: 74px;
    height: 47px;
}
.has-chapter-cover {
    min-height: 152px;
}
.has-chapter-cover .guide-lead-art {
    width: 166px;
    height: auto;
    min-height: 0;
    max-height: 80px;
    flex: 0 0 166px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    border: 1px solid #776746;
}
.kind-guide:has(.guide-card-art) .guide-range-art {
    width: 72px;
    height: 48px;
    border: 0;
    background: none;
}
.chapter-cover {
    position: absolute;
    right: 0;
    top: 0;
    width: 70%;
    height: 100%;
    object-fit: cover;
    object-position: 75% 50%;
    z-index: -2;
}
.has-chapter-cover:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #242423 10%,
        #242423ef 34%,
        #24242300 82%
    );
    z-index: -1;
}
.has-chapter-cover .entity-hero-copy {
    max-width: 70%;
}
.entity-tabs {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 5px 0 7px;
    border-bottom: 1px solid var(--border);
    background: none;
}
.entity-tabs a {
    padding: 0;
    font-size: 12px;
    border: 0;
    background: none;
}
.facts-panel {
    padding: 12px 14px;
    margin: 12px 0;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--surface);
    box-shadow: none;
}
.facts-panel > h2 {
    font-size: 15px;
    margin-bottom: 9px;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}
.stat-grid > div {
    border: 0;
    border-right: 1px solid #444443;
    padding: 0 10px 0 0;
}
.stat-grid dt {
    font-size: 10px;
    color: #b8b59b;
}
.stat-grid dd {
    font-size: 16px;
    color: #e8cea1;
    margin: 4px 0 0;
}
.entity-kind-mob .entity-tabs {
    display: none;
}
.entity-kind-mob .entity-hero {
    padding: 10px 14px;
}
.entity-kind-mob .inline-model {
    width: 100%;
    max-width: 400px;
    margin: 16px auto;
}
.inline-model .native-stage,
.item-appearance .native-stage {
    min-height: 0;
    height: auto;
    aspect-ratio: 732/564;
    background: none;
}
.inline-model .native-stage > img,
.item-appearance .native-stage > img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.entity-hero > .native-viewer {
    width: 100px;
    flex-basis: 100px;
}
.entity-kind-mob .facts-panel > h2 {
    display: none;
}
.entity-kind-mob .facts-panel {
    padding: 8px 12px;
}
.entity-kind-mob .connections > .section-heading {
    display: none;
}
.connections {
    margin: 12px 0;
}
.section-heading {
    margin: 0 0 8px;
    gap: 12px;
}
.section-heading h2 {
    font-size: 16px;
}
.relation-group {
    margin: 0 0 17px;
}
.relation-group > h3 {
    margin: 0;
    padding: 8px 10px;
    border-left: 3px solid #b89b62;
    background: #2a2a29;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.guide-related {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    font-size: 13px;
}
.guide-related > summary {
    color: var(--accent);
    cursor: pointer;
}
.guide-related .connections > .section-heading {
    display: none;
}
.loot-module {
    border: 1px solid var(--border);
    background: #212120;
}
.loot-toolbar {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-bottom: 1px solid #424241;
}
.loot-toolbar label {
    flex: 1;
    max-width: 300px;
}
.loot-toolbar input {
    width: 100%;
    height: 29px;
    min-height: 29px;
    font-size: 12px;
    background: #1b1b1a;
}
.loot-mode {
    display: flex;
    gap: 4px;
}
.loot-mode button {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 11px;
    background: transparent;
    border-color: transparent;
}
.loot-mode button[aria-pressed="true"] {
    border-color: #6a5c3c;
    color: #e6d0a3;
    background: #353534;
}
.loot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 0;
}
.loot-entry {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(32px, auto) auto;
    align-content: center;
    gap: 0 8px;
    min-height: 51px;
    padding: 6px 10px;
    border: 0;
    border-bottom: 1px solid #3f3f3e;
    border-right: 1px solid #3f3f3e;
    background: none;
    border-radius: 0;
}
.loot-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    grid-column: 1;
    grid-row: 1 / span 2;
}
.loot-slot {
    width: 30px;
    height: 32px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border: 1px solid #6b5d3e;
    background: #181817;
    box-shadow: inset 0 0 0 2px #252524;
}
.loot-slot img {
    width: auto;
    height: auto;
    max-width: 26px;
    max-height: 28px;
    object-fit: contain;
}
.loot-item strong {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.loot-count {
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: #d7cca9;
    white-space: nowrap;
}
.loot-grade,
.loot-price {
    grid-column: 2;
    font-size: 11px;
    color: #b9ad89;
}
.loot-variants {
    grid-column: 1 / span 2;
    font-size: 11px;
    margin: 2px 0 0 39px;
}
.loot-variants > summary {
    cursor: pointer;
    color: #bda470;
    padding: 2px 0;
    line-height: 1.3;
}
.loot-quantities {
    display: block;
    font-size: 12px;
    background: #1b1b1a;
    border: 1px solid #515150;
    margin: 5px 0 0;
    padding: 6px;
}
.loot-source-row {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #3a3a39;
}
.loot-source-row .entity-reference {
    font-size: 12px;
}
.loot-entry:has(.loot-variants[open]) {
    grid-column: span 2;
}
.loot-grid[data-loot-layout="inventory"] {
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    align-items: start;
    gap: 8px;
    padding: 12px;
}
.loot-grid[data-loot-layout="inventory"] .loot-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    min-height: calc(var(--slots) * 34px + 28px);
    padding: 0;
    border: 0;
}
.loot-grid[data-loot-layout="inventory"] .loot-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 100%;
}
.loot-grid[data-loot-layout="inventory"] .loot-slot {
    width: 34px;
    height: calc(var(--slots) * 34px);
    background: repeating-linear-gradient(
        0deg,
        #1e1e1d 0,
        #1e1e1d 32px,
        #6a5b3b 33px,
        #2e2e2d 34px
    );
}
.loot-grid[data-loot-layout="inventory"] .loot-slot img {
    max-height: calc(var(--slots) * 30px);
    max-width: 30px;
}
.loot-grid[data-loot-layout="inventory"] .loot-item strong {
    font-size: 10px;
    line-height: 1.25;
    text-align: center;
}
.loot-grid[data-loot-layout="inventory"] .loot-count {
    font-size: 11px;
}
.loot-grid[data-loot-layout="inventory"] .loot-variants {
    margin: 3px 0 0;
    font-size: 10px;
}
.loot-grid[data-loot-layout="inventory"] .loot-entry:has(details[open]) {
    grid-column: span 4;
}
.entity-reference {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: #d7bd87;
    max-width: 100%;
    vertical-align: baseline;
    font-size: inherit;
    line-height: inherit;
}
.entity-reference > span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.reference-icon {
    display: inline-block;
    width: 18px !important;
    height: 19px !important;
    object-fit: contain;
    vertical-align: -4px;
    align-self: center;
    flex: 0 0 18px;
}
.item-group-reference .reference-icon + .reference-icon {
    margin-left: -8px;
}
.unresolved-reference {
    color: #b1aa90;
    font-size: 12px;
    border-bottom: 1px dotted #73613f;
}
.guide-layout {
    display: block;
    margin-top: 16px;
}
.guide-prose .entity-reference {
    font-size: inherit;
}
.guide-prose {
    font-size: 14px;
    line-height: 1.6;
    min-width: 0;
}
.guide-prose p {
    font-size: 14px;
    line-height: 1.6;
    margin: 9px 0 15px;
    max-width: 90ch;
}
.guide-prose h2 {
    font-family:
        Segoe UI,
        sans-serif;
    font-size: 19px;
    line-height: 1.4;
    padding: 0 0 8px;
    margin: 26px 0 12px;
    border-bottom: 1px solid var(--border);
    clear: both;
}
.guide-prose h2:before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 16px;
    margin-right: 9px;
    background: #b5975b;
    vertical-align: -1px;
}
.guide-prose h2#overview {
    font-size: 15px;
    margin-top: 14px;
}
.anchor-link {
    font-size: 12px;
    opacity: 0.5;
    margin-left: 8px;
}
.guide-note {
    border: 1px solid #494948;
    background: #242423;
    padding: 11px 14px;
    margin: 12px 0;
    border-radius: 2px;
}
.guide-note h3 {
    font-size: 12px;
    color: #d1bf96;
    margin: 0 0 7px;
}
.guide-note > div {
    font-size: 13px;
    line-height: 1.55;
}
.guide-prose .guide-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #212120;
}
.guide-prose .guide-data-table th,
.guide-prose .guide-data-table td {
    border: 1px solid #494948;
    padding: 10px 11px;
    vertical-align: middle;
    text-align: center;
    line-height: 1.55;
    font-size: 13px;
}
.guide-prose .guide-data-table th {
    font-size: 11px;
    background: #2e2e2d;
    color: #c9b88f;
    font-weight: 600;
}
.guide-prose .guide-data-table td.cell-prose {
    text-align: left;
    min-width: 210px;
    max-width: 680px;
}
.guide-prose .guide-data-table td.cell-item {
    min-width: 150px;
}
.guide-prose .guide-data-table td.cell-value {
    font-variant-numeric: tabular-nums;
}
.guide-prose .guide-data-table .entity-reference {
    justify-content: center;
    text-align: center;
}
.table-scroll {
    width: 100%;
    overflow: auto;
    margin: 12px 0;
    border: 0;
    border-radius: 0;
    overscroll-behavior-x: contain;
}
.guide-cell-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}
.guide-cell-image {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.guide-entity-row {
    padding: 7px 10px;
    margin: 7px 0;
    background: #242423;
    border: 1px solid #474746;
    font-size: 13px;
}
.guide-figure {
    padding: 0;
    background: none;
    border: 0;
    margin: 16px 0;
    max-width: 100%;
    text-align: center;
}
.guide-figure img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 540px;
    object-fit: contain;
    border: 1px solid #525251;
}
.guide-reference-board {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid #484847;
    background: #232322;
    margin: 13px 0;
}
.guide-reference-diagram {
    width: 215px;
    height: auto;
    aspect-ratio: 600/112;
    flex: 0 0 215px;
}
.guide-reference-board .eyebrow {
    margin: 0 0 6px;
}
.guide-reference-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
}
.guide-reference-items .entity-reference {
    font-size: 12px;
}
.reading-mode {
    margin-left: auto;
    white-space: nowrap;
    font-size: 10px;
}
.guide-mobile-contents {
    display: none;
}
.reading-focus .wiki-layout {
    grid-template-columns: 1fr;
    max-width: 1080px;
}
.reading-focus .wiki-rail {
    display: none;
}
.guide-checklist {
    padding: 14px;
    border: 1px solid var(--border);
    margin-top: 24px;
    background: #222221;
}
.guide-checklist summary {
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
}
.guide-checklist label {
    display: flex;
    align-items: start;
    gap: 8px;
    font-size: 13px;
    padding: 6px 0;
}
.guide-checklist input {
    min-height: 0;
    margin-top: 4px;
    accent-color: #baa272;
}
.guide-checklist p {
    font-size: 11px;
    color: var(--muted);
}
.item-sheet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 18px;
    align-items: start;
}
.item-sheet-main .facts-panel {
    margin-top: 0;
}
.item-sheet-aside {
    position: sticky;
    top: 76px;
}
.item-summary {
    padding: 12px;
    border: 1px solid #64583a;
    background: #292928;
    border-radius: 2px;
}
.summary-icon {
    width: 58px;
    height: 64px;
    margin: 0 auto 10px;
    border: 1px solid #746341;
    background: #181817;
}
.summary-icon img {
    width: auto;
    height: auto;
    max-width: 44px;
    max-height: 56px;
    object-fit: contain;
}
.metin-card {
    border: 1px solid #8d7750;
    background: #161615;
    padding: 12px 10px;
    text-align: center;
    font:
        12px/1.5 Tahoma,
        sans-serif;
}
.metin-card strong {
    display: block;
    color: #e6c782;
    font-size: 13px;
    margin-bottom: 9px;
}
.upgrade-selector {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
}
.upgrade-selector a {
    font-size: 11px;
    padding: 4px 6px;
    border: 1px solid #5e5c3e;
    background: #212120;
    border-radius: 2px;
}
.upgrade-selector a[aria-current] {
    color: #1f1f1e;
    background: #c6ac73;
}
.summary-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 8px;
    font-size: 11px;
    margin: 12px 0;
}
.summary-meta dd {
    margin: 0;
    text-align: right;
}
.item-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}
.item-meta dt {
    font-size: 11px;
    color: var(--muted);
}
.item-meta dd {
    font-size: 13px;
    margin: 4px 0 0;
}
.metin-card p {
    font:
        12px/1.6 Tahoma,
        sans-serif;
    margin: 4px 0;
}
.native-viewer figcaption {
    flex-wrap: wrap;
    background: #242423;
    border-color: var(--border);
}
.media-view-controls {
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}
.media-angles {
    flex-wrap: wrap;
}
.media-view-controls select {
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
}
.media-angles button {
    font-size: 10px;
    min-height: 26px;
    padding: 4px 7px;
}
.item-appearance .native-viewer figcaption {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    padding: 7px;
}
.item-appearance .media-caption {
    font-size: 9px;
    white-space: nowrap;
}
.item-appearance {
    font-size: 11px;
    margin-top: 12px;
}
.grade-table {
    padding: 10px;
}
.grade-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #222221;
}
.grade-table th,
.grade-table td {
    padding: 8px 7px;
    border: 1px solid #474746;
    text-align: center;
    vertical-align: middle;
}
.grade-table th {
    font-size: 10px;
    color: #c3b58d;
    background: #30302f;
}
.grade-table .selected-grade {
    background: #3e3e3d;
}
.grade-stat {
    font-size: 12px;
}
.craft-workbench {
    border: 1px solid #655a3b;
    background: #282827;
    padding: 14px;
    margin: 12px 0 18px;
}
.craft-workbench > h2 {
    font-family:
        Segoe UI,
        sans-serif;
    font-size: 17px;
}
.craft-equation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(160px, 0.55fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: #1f1f1e;
    border: 1px solid #525251;
}
.craft-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.craft-ingredients > span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.craft-result {
    font-size: 14px;
    text-align: center;
}
.craft-result .reference-icon {
    width: 28px !important;
    height: 32px !important;
    flex-basis: 28px;
}
.craft-arrow {
    font-size: 25px;
    color: #c7ac72;
}
.craft-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #c9ba91;
    margin: 12px 0;
}
.craft-calculator {
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.craft-calculator > summary {
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
}
.craft-calculator .material-plan > h2 {
    display: none;
}
.plan-total-cost {
    font:
        600 20px/1.3 Segoe UI,
        sans-serif;
    margin: 14px 0 8px;
}
.craft-workbench .material-plan {
    border: 0;
    background: transparent;
    padding: 8px 0;
    margin: 0;
}
.material-plan {
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    margin: 15px 0;
    border-radius: 2px;
}
.material-plan h2 {
    font-family:
        Segoe UI,
        sans-serif;
    font-size: 16px;
}
.material-plan label {
    font-size: 11px;
}
.material-token {
    background: #20201f;
    border-color: #575756;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 2px;
}
.material-token img {
    width: 18px;
    height: 20px;
    object-fit: contain;
}
#wiki-item-tooltip {
    position: fixed;
    z-index: 2600;
    width: 300px;
    max-width: calc(100vw - 20px);
    background: #161615;
    border: 1px solid #a48a57;
    outline: 1px solid #323231;
    outline-offset: -4px;
    box-shadow: 0 10px 30px #0007;
    padding: 17px 15px 13px;
    text-align: center;
    overflow: auto;
    font:
        12px/1.6 Tahoma,
        "Segoe UI",
        sans-serif;
    border-radius: 1px;
}
#wiki-item-tooltip strong {
    color: #e5c783;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 8px;
}
#wiki-item-tooltip p {
    font-size: 12px;
    margin: 2px 0;
}
#wiki-item-tooltip .tt-positive,
#wiki-item-tooltip .tt-bonus {
    color: #83c778;
}
#wiki-item-tooltip .tooltip-context {
    display: block;
    border-top: 1px solid #474746;
    margin-top: 10px;
    padding-top: 7px;
    color: #bbae8a;
    font:
        11px/1.4 "Segoe UI",
        sans-serif;
}
.tooltip-close {
    position: absolute;
    top: 2px;
    right: 3px;
    min-height: 23px;
    font-size: 18px;
    line-height: 1;
    padding: 1px 6px;
    border: 0;
    background: none;
    color: #c7bd9f;
}
.tooltip-open-link {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--accent);
}
.metin-card .tt-bonus,
.metin-card .tt-positive {
    color: #83c778;
}
.tooltip-sources {
    font:
        12px "Segoe UI",
        sans-serif;
    display: block;
    margin: 9px auto 0;
    background: #2c2c2b;
    border: 1px solid #6c6846;
    color: #d4b77c;
    padding: 6px 12px;
    min-height: 28px;
}
.item-inspector {
    width: min(650px, calc(100vw - 28px));
    max-height: 88vh;
    padding: 0;
    border: 1px solid #9d8658;
    background: #20201f;
    color: var(--text);
    border-radius: 2px;
    box-shadow: 0 30px 80px #0008;
}
.item-inspector::backdrop {
    background: #0c0c0bbb;
    backdrop-filter: blur(3px);
}
.item-inspector > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #30302f;
    border-bottom: 1px solid var(--border);
}
.item-inspector h2 {
    font-size: 17px;
    margin: 0;
}
.inspector-content {
    padding: 18px;
    min-height: 130px;
}
.inspector-root {
    font-size: 17px;
    display: flex;
    margin-bottom: 15px;
}
.inspector-guides {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.inspector-guides h3 {
    width: 100%;
    font-size: 13px;
    margin: 0 0 3px;
    color: var(--accent);
}
.inspector-guides a {
    font-size: 12px;
}
.inspector-sources {
    display: grid;
    border: 1px solid #494948;
}
.inspector-source {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #2a2a29;
    border-bottom: 1px solid #494948;
}
.inspector-source small {
    font-size: 11px;
}
.source-map-link {
    margin-left: auto;
    color: var(--accent);
    font-size: 12px;
}
.atlas-shell {
    border: 1px solid #62593c;
    border-radius: 2px;
    margin: 20px 0;
    background: #1f1f1e;
}
.atlas-heading {
    padding: 12px 14px;
    background: #2c2c2b;
}
.atlas-heading h2 {
    font-size: 18px;
}
.atlas-heading p:not(.eyebrow) {
    font-size: 12px;
}
.atlas-heading .eyebrow {
    display: none;
}
.atlas-controls {
    padding: 9px 12px;
    gap: 8px;
}
.atlas-controls label {
    font-size: 10px;
}
.atlas-controls select {
    background: #191918;
    border-color: #55523c;
    font-size: 12px;
    min-height: 31px;
    padding: 4px 7px;
}
.atlas-layers {
    padding: 0 12px 9px;
    gap: 5px;
    flex-wrap: wrap;
}
.layer-chip {
    font-size: 10px;
    padding: 4px 6px;
    border-radius: 2px;
}
.layer-chip input {
    min-height: 0;
}
.atlas-canvas {
    height: 450px;
    min-height: 300px;
}
.entity-kind-map .atlas-canvas {
    height: 560px;
}
.atlas-coordinate-bar {
    background: #232322;
    border-color: var(--border);
    padding: 8px 12px;
    font-size: 11px;
    flex-wrap: wrap;
}
.atlas-list {
    background: #232322;
    border-color: var(--border);
}
.atlas-coordinate-bar input {
    background: #191918;
    border-color: #55523c;
    width: 83px;
    min-height: 29px;
    font-size: 12px;
}
.atlas-coordinate-bar button {
    font-size: 11px;
    padding: 5px 8px;
    min-height: 29px;
}
.atlas-status,
.atlas-footnote {
    font-size: 11px;
    padding: 0 12px;
    margin: 5px 0;
}
.mode-home .wiki-layout {
    display: block;
}
.mode-home .wiki-rail {
    display: none;
}
.intro-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 17px 20px;
    border: 1px solid #6b5c3b;
    background: linear-gradient(105deg, #2c2c2b, #1f1f1e);
    min-height: 162px;
    margin-bottom: 18px;
}
.intro-cover {
    position: absolute;
    right: 0;
    top: 0;
    width: 65%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    pointer-events: none;
}
.intro-panel:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #282827f2 15%, #28282700 96%);
    pointer-events: none;
}
.intro-copy,
.intro-scene {
    position: relative;
    z-index: 1;
}
.intro-scene {
    width: 160px;
    height: auto;
    aspect-ratio: 732/564;
    object-fit: contain;
    border: 1px solid #786441;
}
.intro-copy {
    flex: 1;
    min-width: 0;
}
.intro-copy h1 {
    font-size: 31px;
    margin: 3px 0 6px;
}
.intro-copy > p:not(.eyebrow) {
    font-size: 13px;
    margin: 6px 0 10px;
}
.large-search {
    height: 39px;
    border: 1px solid #857048;
    border-radius: 2px;
    background: #191918;
    box-shadow: none;
    max-width: 640px;
}
.large-search input {
    font-size: 13px;
}
.large-search button {
    padding: 3px 12px;
    min-height: 30px;
}
.hero-shortcuts {
    gap: 10px;
    font-size: 11px;
    margin-top: 9px;
}
.home-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 18px;
}
.home-panel,
.home-aside-panel {
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #232322;
    margin-bottom: 14px;
}
.home-panel > h2,
.home-aside-panel > h2 {
    font:
        600 12px/1.4 "Segoe UI",
        sans-serif;
    color: #ccb383;
    background: #30302f;
    padding: 11px 13px;
    margin: 0;
    border-bottom: 1px solid var(--border);
}
.home-entry {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 55px;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 0;
    border-bottom: 1px solid #424241;
    min-height: 76px;
}
.home-entry h3 {
    font-size: 14px;
    margin: 0 0 4px;
}
.home-entry p {
    font-size: 12px;
    line-height: 1.4;
    margin: 0 0 6px;
}
.home-mark {
    width: 32px;
    height: 35px;
    display: grid;
    place-items: center;
    font-size: 20px;
    border: 1px solid #685e3c;
    background: #1e1e1d;
}
.home-category-icon {
    width: 24px;
    height: 29px;
    object-fit: contain;
}
.entry-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    font-size: 11px;
}
.entry-count {
    font-size: 13px;
    text-align: right;
}
.entry-count small {
    display: block;
    font-size: 10px;
    color: var(--muted);
}
.home-aside-panel {
    padding: 0;
}
.home-aside-panel a {
    font-size: 12px;
}
@media (max-width: 1150px) {
    .wiki-header {
        gap: 10px;
        padding: 0 17px;
    }
    .wiki-brand {
        width: 135px;
        flex-basis: 135px;
    }
    .wiki-primary a {
        font-size: 11px;
        padding: 7px;
    }
    .header-search {
        min-width: 140px;
        max-width: 230px;
    }
    .header-search kbd {
        display: none;
    }
    .wiki-layout {
        gap: 18px;
        grid-template-columns: 166px minmax(0, 1fr);
        padding: 19px 18px 0;
    }
    .entity-grid,
    .loot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .guide-reference-diagram {
        width: 175px;
        flex-basis: 175px;
    }
    .reading-mode {
        display: none;
    }
}
@media (max-width: 760px) {
    :root {
        --header: 54px;
    }
    .wiki-header {
        height: 54px;
        padding: 0 12px;
        gap: 10px;
    }
    .menu-toggle {
        display: block;
        padding: 3px 5px;
    }
    .wiki-brand {
        flex-basis: 28px;
        width: 28px;
    }
    .wiki-brand > span {
        display: none;
    }
    .wiki-brand img {
        width: 28px;
        height: 28px;
    }
    .wiki-primary {
        display: none;
    }
    .header-search {
        min-width: 0;
        flex: 1;
        margin: 0;
        max-width: none;
        height: 32px;
        padding: 0 7px;
    }
    .language-switch a {
        font-size: 10px;
        padding: 6px 5px;
    }
    .wiki-layout {
        display: block;
        padding: 14px 14px 0;
    }
    .wiki-rail {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1100;
        width: min(300px, 85vw);
        height: 100dvh;
        max-height: none;
        padding: 18px;
        background: #20201f;
        transform: translateX(-105%);
        visibility: hidden;
        overflow: auto;
    }
    .nav-open .wiki-rail {
        transform: none;
        visibility: visible;
    }
    .drawer-close {
        display: block;
        font-size: 21px;
    }
    .rail-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .rail-global {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
        border-bottom: 1px solid var(--border);
        padding-bottom: 12px;
    }
    .rail-global .rail-link {
        padding: 8px;
        font-size: 13px;
    }
    .mode-home .wiki-rail {
        display: block;
    }
    .breadcrumbs {
        font-size: 10px;
        margin-bottom: 10px;
    }
    .entity-grid,
    .loot-grid,
    .relation-list {
        grid-template-columns: 1fr;
    }
    .entity-card {
        min-height: 65px;
        padding: 10px;
        border-right: 0;
    }
    .entity-card-copy strong {
        font-size: 14px;
    }
    .scene-row {
        grid-template-columns: 72px minmax(0, 1fr) 37px 8px;
    }
    .card-scene {
        width: 72px;
    }
    .catalogue-filters {
        gap: 9px;
        padding: 11px;
    }
    .catalogue-filters > div {
        min-width: 110px;
    }
    .catalogue-filters .filter-search {
        flex-basis: 100%;
    }
    .catalogue-filters input,
    .catalogue-filters select {
        background: #181817;
        border-color: #55523c;
        color: var(--text);
        font-size: 13px;
        min-height: 35px;
    }
    .category-tabs a {
        font-size: 11px;
        padding: 6px 8px;
    }
    .entity-hero {
        padding: 12px;
        min-height: 104px;
        gap: 10px;
    }
    .has-chapter-cover .guide-lead-art {
        width: 86px;
        flex-basis: 86px;
        max-height: 58px;
        align-self: end;
    }
    .entity-hero h1 {
        font-size: 24px;
        margin: 3px 0 7px;
    }
    .inline-model {
        width: 100%;
        max-width: 400px;
        margin: 16px auto;
    }
    .inline-model .native-stage,
    .item-appearance .native-stage {
        min-height: 0;
        height: auto;
        aspect-ratio: 732/564;
        background: none;
    }
    .inline-model .native-stage > img,
    .item-appearance .native-stage > img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
    }
    .entity-hero > .native-viewer {
        width: 90px;
        flex-basis: 90px;
    }
    .entity-hero .entity-actions button {
        font-size: 10px;
        padding: 5px 6px;
    }
    .entity-guide-diagram {
        width: 110px;
        flex-basis: 110px;
    }
    .has-chapter-cover {
        min-height: 136px;
    }
    .has-chapter-cover .entity-hero-copy {
        max-width: 94%;
    }
    .chapter-cover {
        width: 100%;
        opacity: 0.55;
    }
    .has-chapter-cover:after {
        background: linear-gradient(90deg, #242423ef, #2424236a);
    }
    .entity-tabs {
        gap: 13px;
        padding: 7px 0 9px;
    }
    .entity-tabs a {
        font-size: 11px;
    }
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 11px;
    }
    .facts-panel {
        padding: 10px 12px;
        margin: 10px 0;
    }
    .entity-kind-mob .facts-panel > h2 {
        display: none;
    }
    .entity-kind-mob .stat-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
    }
    .entity-kind-mob .stat-grid > div {
        padding-right: 3px;
    }
    .entity-kind-mob .stat-grid dt {
        font-size: 10px;
    }
    .entity-kind-mob .stat-grid dd {
        font-size: 12px;
    }
    .connections > .section-heading {
        display: none;
    }
    .loot-entry {
        min-height: 49px;
        border-right: 0;
        padding: 7px 10px;
    }
    .loot-entry:has(.loot-variants[open]) {
        grid-column: auto;
    }
    .loot-toolbar {
        gap: 6px;
        padding: 7px;
    }
    .loot-toolbar label {
        min-width: 0;
    }
    .loot-toolbar input {
        min-width: 0;
        height: 31px;
    }
    .loot-mode button {
        font-size: 10px;
        padding: 4px 5px;
    }
    .loot-grid[data-loot-layout="inventory"] {
        grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    }
    .guide-reference-board {
        padding: 9px;
        display: block;
        margin: 10px 0;
    }
    .guide-reference-diagram {
        width: 100%;
        height: 42px;
        object-fit: contain;
        display: block;
        margin-bottom: 7px;
    }
    .guide-reference-items {
        gap: 5px 9px;
    }
    .guide-reference-items .entity-reference {
        font-size: 11px;
    }
    .guide-mobile-contents {
        display: block;
        border: 1px solid var(--border);
        padding: 8px 10px;
        margin: 12px 0;
        background: #292928;
        font-size: 12px;
    }
    .guide-mobile-contents nav {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding-top: 10px;
    }
    .guide-prose h2 {
        font-family:
            Segoe UI,
            sans-serif;
        font-size: 18px;
        margin-top: 23px;
    }
    .guide-note {
        padding: 10px 12px;
    }
    .guide-prose .guide-data-table td,
    .guide-prose .guide-data-table th {
        padding: 9px 8px;
    }
    .guide-prose .guide-data-table td {
        min-width: 95px;
    }
    .guide-prose .guide-data-table td.cell-item {
        min-width: 155px;
    }
    .guide-prose .guide-data-table td.cell-prose {
        min-width: 220px;
    }
    .item-sheet-grid {
        display: flex;
        flex-direction: column-reverse;
        gap: 14px;
    }
    .item-sheet-aside {
        position: static;
        width: 100%;
    }
    .item-summary {
        display: grid;
        grid-template-columns: 62px 1fr;
        gap: 8px 12px;
        padding: 12px;
    }
    .summary-icon {
        grid-column: 1;
        grid-row: 1;
        width: 54px;
        height: 62px;
        margin: 0;
    }
    .upgrade-selector {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        margin: 0;
    }
    .metin-card {
        grid-column: 1 / span 2;
        padding: 10px;
    }
    .summary-meta {
        display: none;
    }
    .item-appearance {
        grid-column: 1 / span 2;
    }
    .item-sheet-main {
        width: 100%;
        min-width: 0;
    }
    .craft-workbench {
        padding: 11px;
    }
    .craft-equation {
        grid-template-columns: 1fr 20px 1fr;
        gap: 8px;
        padding: 10px;
    }
    .craft-ingredients > span {
        display: block;
        font-size: 12px;
    }
    .craft-result {
        font-size: 12px;
    }
    .craft-meta {
        gap: 9px 14px;
        font-size: 12px;
    }
    .atlas-heading {
        padding: 10px 12px;
    }
    .atlas-heading h2 {
        font-size: 17px;
    }
    .atlas-controls {
        padding: 9px;
        gap: 7px;
    }
    .atlas-layers {
        padding: 0 9px 9px;
        gap: 4px;
    }
    .layer-chip {
        font-size: 9px;
        padding: 4px;
    }
    .atlas-canvas,
    .entity-kind-map .atlas-canvas {
        height: 380px;
        min-height: 300px;
    }
    .atlas-coordinate-bar {
        gap: 7px;
        padding: 8px 9px;
    }
    .atlas-list {
        background: #232322;
        border-color: var(--border);
    }
    .atlas-coordinate-bar input {
        background: #191918;
        border-color: #55523c;
        width: 61px;
        font-size: 12px;
    }
    .atlas-footnote,
    .atlas-status {
        font-size: 10px;
    }
    .intro-panel {
        padding: 14px;
        gap: 12px;
        min-height: 143px;
    }
    .intro-scene {
        width: 87px;
        flex: 0 0 87px;
    }
    .intro-copy h1 {
        font-size: 25px;
    }
    .intro-copy > p:not(.eyebrow) {
        font-size: 12px;
        line-height: 1.4;
    }
    .large-search {
        height: 36px;
    }
    .large-search input {
        font-size: 12px;
    }
    .hero-shortcuts {
        font-size: 10px;
        gap: 6px;
        flex-wrap: wrap;
    }
    .home-columns {
        display: block;
    }
    .home-entry {
        padding: 11px;
        grid-template-columns: 30px minmax(0, 1fr) 44px;
        gap: 10px;
    }
    .home-columns > aside {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 14px;
    }
    .item-inspector {
        max-height: 90dvh;
    }
    .inspector-content {
        padding: 12px;
    }
    .inspector-source {
        display: block;
    }
    .inspector-source small,
    .source-map-link {
        display: block;
        margin: 7px 0 0;
    }
    .reading-focus .wiki-rail {
        display: block;
    }
    .wiki-footer,
    .wiki-footer p {
        font-size: 10px;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        transition: none !important;
    }
}

/* Portal sidebar is a single narrow catalogue, not the main three-column grid. */
.home-sidebar {
    min-width: 0;
}
.home-sidebar .entity-grid {
    grid-template-columns: 1fr;
    border: 0;
}
.home-sidebar .scene-row {
    grid-template-columns: 60px minmax(0, 1fr) 24px 8px;
    gap: 2px 6px;
    padding: 9px 8px;
}
.home-sidebar .card-scene {
    width: 60px;
}
.home-sidebar .entity-card-copy strong {
    font-size: 12px;
}
.home-sidebar .card-level {
    font-size: 12px;
}
.home-sidebar .entity-card-copy small {
    font-size: 10px;
}
.home-statistics {
    padding: 6px 12px;
}
.home-statistics > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #424241;
}
.home-statistics > div:last-child {
    border-bottom: 0;
}
.home-statistics strong {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
}
.home-guide-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #424241;
    font-size: 12px;
}
.home-guide-link:last-child {
    border-bottom: 0;
}
.home-guide-link > span {
    margin-left: auto;
    color: var(--accent);
}
.range-pill {
    font-size: 11px;
    font-weight: 500;
    color: #d4bf8e;
    min-width: 58px;
}
.catalogue-date {
    font-size: 11px;
    color: var(--muted);
    padding: 8px 0;
}
.home-columns > div {
    min-width: 0;
}
@media (max-width: 760px) {
    .home-sidebar > .home-panel:last-child {
        grid-column: 1 / span 2;
    }
    .home-sidebar .home-statistics {
        padding: 5px 9px;
    }
    .home-statistics > div {
        font-size: 11px;
    }
    .home-guide-link {
        padding: 8px;
        font-size: 11px;
        gap: 5px;
    }
    .home-guide-link .range-pill {
        min-width: 45px;
        font-size: 10px;
    }
    .intro-cover {
        width: 100%;
    }
}

/* Product system: scoped to the Wiki document. Native asset geometry is unchanged. */
:root {
    --bg: #111312;
    --rail: #171918;
    --surface: #1c1f1d;
    --raised: #272a25;
    --text: #ece8dd;
    --secondary: #d0cec2;
    --muted: #b5b6ab;
    --accent: #d5b77e;
    --bright: #f0d9aa;
    --border: #494a40;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --radius: 3px;
    --header: 60px;
    --rail-width: 190px;
    --z-header: 100;
    --z-backdrop: 1090;
    --z-navigation: 1100;
}
body.wiki-compact {
    background: var(--bg);
    color: var(--text);
}
.wiki-compact :is(button, input, select) {
    font: inherit;
}
.wiki-header {
    height: var(--header);
    background: var(--rail);
    z-index: var(--z-header);
    gap: 20px;
}
.wiki-brand {
    flex: 0 0 166px;
    width: 166px;
}
.header-search {
    flex: 1;
    max-width: 520px;
    margin-left: auto;
    min-width: 0;
    height: 38px;
}
.ecosystem {
    display: flex;
    gap: 16px;
    font-size: 12px;
    white-space: nowrap;
}
.wiki-layout,
.mode-home .wiki-layout {
    display: grid;
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
    max-width: 1420px;
    gap: 26px;
    padding-top: 22px;
}
.mode-home .wiki-rail {
    display: block;
}
.wiki-rail {
    top: 82px;
    max-height: calc(100dvh - 100px);
}
.rail-global {
    display: grid;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
    padding-bottom: 12px;
    gap: 2px;
}
.rail-global .rail-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    padding: 7px 10px;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
    background: none;
}
.rail-global .rail-link[aria-current] {
    color: var(--bright);
    background: var(--raised);
    border-left-color: var(--accent);
}
.rail-context a {
    font-size: 12px;
    padding: 6px 10px;
    color: var(--secondary);
}
.rail-link.quiet,
.entity-card-copy small,
.card-stat {
    color: var(--muted);
}
.breadcrumbs {
    flex-wrap: wrap;
    font-size: 12px;
    overflow-wrap: anywhere;
}
.intro-panel {
    min-height: 0;
    padding: 22px;
    margin-bottom: 16px;
    background: var(--surface);
    overflow: visible;
    border-color: var(--border);
    border-radius: var(--radius);
}
.intro-panel::after {
    background: linear-gradient(90deg, #1c1f1df5 25%, #1c1f1d66);
    border-radius: var(--radius);
}
.intro-cover {
    border-radius: var(--radius);
    opacity: 0.3;
}
.intro-copy h1 {
    font-size: 30px;
}
.intro-copy > p:not(.eyebrow) {
    font-size: 14px;
}
.large-search {
    height: 44px;
    max-width: 100%;
    background: var(--bg);
}
.large-search input {
    font-size: 14px;
}
.large-search button {
    min-width: 44px;
    min-height: 38px;
}
.home-tasks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.home-tasks > a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px;
    border: 1px solid var(--border);
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius);
}
.home-tasks strong {
    font-size: 14px;
}
.home-tasks span {
    grid-row: 2;
    color: var(--secondary);
    font-size: 13px;
}
.home-tasks b {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--accent);
}
.home-tasks a:hover,
.home-category:hover {
    background: var(--raised);
    border-color: var(--accent);
}
.home-panel,
.home-aside-panel {
    background: var(--surface);
    border-color: var(--border);
    border-radius: var(--radius);
}
.home-panel > h2 {
    color: var(--bright);
    background: var(--raised);
    font-size: 13px;
    padding: 11px 14px;
}
.home-columns {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 18px;
}
.home-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-category {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.home-category strong {
    font-size: 13px;
    font-weight: 500;
}
.home-category small {
    margin-left: auto;
    color: var(--muted);
}
.home-category img {
    width: 24px;
    height: 30px;
    object-fit: contain;
}
.home-more {
    display: block;
    color: var(--accent);
    font-size: 13px;
    padding: 10px 14px;
}
.home-progression {
    margin-bottom: 20px;
}
.progression-path {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.progression-path a {
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px;
    border-right: 1px solid var(--border);
}
.progression-path b {
    color: var(--accent);
    font-size: 18px;
    font-weight: 500;
}
.progression-path a > span:first-of-type {
    grid-row: 2;
    color: var(--secondary);
    font-size: 12px;
}
.progression-path a > span:last-child {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
}
.snapshot-details {
    font-size: 12px;
    color: var(--muted);
    margin: 16px 0;
}
.snapshot-details summary {
    cursor: pointer;
    padding: 8px 0;
}
.snapshot-details p {
    max-width: 75ch;
}
.filter-disclosure > summary {
    display: none;
}
.catalogue-filters {
    background: var(--surface);
    padding: 14px;
    gap: 12px;
}
.catalogue-filters label {
    font-size: 12px;
}
.catalogue-filters .filter-search {
    min-width: 180px;
}
.catalogue-filters .filter-actions {
    min-width: 190px;
}
.category-tabs {
    gap: 5px;
    flex-wrap: wrap;
}
.category-tabs a {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
}
.category-tabs small {
    color: var(--muted);
}
.entity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.entity-card {
    min-height: 72px;
}
.entity-card-copy strong {
    font-size: 14px;
}
.entity-card-copy small {
    font-size: 12px;
}
.entity-card:hover {
    background: var(--raised);
}
.entity-hero {
    background: var(--surface);
    border-color: var(--border);
}
.entity-kind-item .entity-hero {
    min-height: 0;
    padding: 16px;
}
.entity-kind-item .entity-icon-display {
    flex: 0 0 54px;
    width: 54px;
    height: 70px;
    background: none;
    border: 0;
}
.entity-kind-item .entity-icon-display img {
    width: auto;
    height: auto;
    max-width: 42px;
    max-height: 64px;
    object-fit: contain;
}
.entity-kind-item .entity-tabs {
    display: none;
}
.entity-kind-item .entity-actions [data-acquisition] {
    display: none;
}
.entity-hero h1,
.compact-title h1 {
    overflow-wrap: anywhere;
}
.entity-actions :is(button, a) {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}
.entity-tabs {
    flex-wrap: wrap;
}
.item-descriptor {
    color: var(--secondary);
    font-size: 13px;
    margin: 4px 0 10px;
}
.selected-equipment {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 18px;
    align-items: start;
    margin: 14px 0 22px;
}
.selected-equipment > .item-summary {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px 18px;
    background: var(--surface);
    text-align: left;
    padding: 16px;
}
.selected-equipment .summary-icon {
    margin: 0;
    width: 54px;
    height: 70px;
    grid-row: 1;
}
.selected-equipment-copy h2 {
    margin: 0 0 4px;
    font-size: 18px;
}
.selected-equipment .item-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.item-meta dt {
    color: var(--muted);
    font-size: 12px;
}
.item-meta dd {
    font-size: 14px;
}
.selected-equipment .upgrade-selector {
    grid-column: 1/-1;
    margin: 5px 0 0;
    justify-content: flex-start;
}
.upgrade-selector a {
    font-size: 13px;
    min-width: 36px;
    min-height: 36px;
}
.selected-equipment .item-description,
.selected-equipment .notice {
    grid-column: 1/-1;
}
.selected-item-stats {
    margin-top: 12px;
}
.selected-item-stats p {
    font-size: 14px;
    margin: 4px 0;
}
.selected-item-stats strong {
    color: var(--bright);
    margin-left: 8px;
}
.tt-bonus {
    color: #a7d79a;
}
.selected-equipment .item-appearance {
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 12px;
    font-size: 13px;
}
.item-paths {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 18px 0 24px;
}
.item-paths:has(> section:only-child) {
    grid-template-columns: 1fr;
}
.item-paths > section {
    min-width: 0;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.item-paths h2 {
    font-size: 17px;
    margin: 0 0 12px;
}
.path-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.path-row a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bright);
    font-size: 14px;
    overflow-wrap: anywhere;
}
.path-row img {
    width: 22px;
    height: 28px;
    object-fit: contain;
}
.path-row small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
}
.equipment-progression {
    margin: 18px 0;
}
.equipment-progression > summary {
    padding: 12px 0;
    color: var(--bright);
    cursor: pointer;
}
.grade-table th,
.grade-table td {
    font-size: 13px;
    min-width: 64px;
}
.grade-table th {
    color: var(--bright);
}
.table-scroll {
    overscroll-behavior-x: contain;
    border-radius: var(--radius);
}
.relation-meta {
    position: static;
    transform: none;
    pointer-events: auto;
    text-align: left;
    flex-direction: row;
    margin-top: 5px;
}
.connections {
    margin-top: 20px;
}
.connections h3 {
    color: var(--bright);
}
.relation-row {
    background: var(--surface);
}
.relation-row .entity-card {
    padding-right: 0;
}
.dungeon-brief {
    scroll-margin-top: 82px;
}
.dungeon-brief .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.dungeon-brief .stat-grid dd {
    font-size: 18px;
}
.dungeon-brief h3 {
    font-size: 14px;
    margin: 12px 0 6px;
}
.dungeon-access,
.entry-policy {
    border-top: 1px solid var(--border);
    margin-top: 14px;
    padding-top: 4px;
}
.dungeon-access p,
.entry-policy p {
    margin: 6px 0;
    font-size: 13px;
}
.preparation-note p {
    margin: 6px 0 0;
}
.dungeon-rewards {
    margin: 18px 0;
    scroll-margin-top: 82px;
}
.dungeon-rewards h2 {
    font-size: 18px;
}
.reading-plan {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    margin: 18px 0;
}
.reading-plan h2 {
    margin: 0 0 8px;
    font-size: 18px;
}
.reading-plan p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--secondary);
    max-width: 80ch;
}
.reading-plan ol {
    padding-left: 22px;
    columns: 2;
    column-gap: 32px;
    margin: 10px 0;
}
.reading-plan li {
    padding: 5px 0;
    break-inside: avoid;
    font-size: 14px;
}
.text-link {
    color: var(--bright);
    font-size: 13px;
}
.guide-prose {
    max-width: 86ch;
    font-size: 15px;
    line-height: 1.65;
    color: var(--secondary);
}
.guide-prose h2 {
    font-size: 22px;
    line-height: 1.35;
}
.guide-prose .guide-data-table :is(td, th) {
    font-size: 13px;
}
.guide-checklist label {
    min-height: 40px;
    font-size: 14px;
}
.guide-checklist input {
    width: 18px;
    height: 18px;
}
.guide-checklist button {
    margin-top: 14px;
}
.suggestions {
    min-width: 0;
    background: var(--surface);
    max-height: min(420px, 65dvh);
    border-color: var(--accent);
}
.suggestions a {
    min-width: 0;
    min-height: 56px;
}
.suggestions img {
    width: 28px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}
.suggestion-name {
    min-width: 0;
    overflow-wrap: anywhere;
}
.suggestion-descriptor {
    display: block;
    font-size: 12px;
    color: var(--secondary);
    margin-top: 3px;
}
.suggestions small {
    font-size: 11px;
    flex-shrink: 0;
}
.suggestions a[aria-selected="true"],
.suggestions a:hover {
    background: var(--raised);
}
.comparison-table img {
    width: 32px;
    height: 48px;
    object-fit: contain;
}
.comparison-dialog-content .table-scroll {
    margin: 12px 0;
}
.comparison-tray {
    max-width: calc(100vw - 24px);
    z-index: 90;
}
.comparison-tray > span {
    overflow-wrap: anywhere;
    min-width: 0;
}
.plan-controls {
    flex-wrap: wrap;
}
.plan-controls label {
    font-size: 13px;
    max-width: 100%;
}
.plan-controls select {
    max-width: 100%;
}
.plan-note {
    color: var(--secondary);
    font-size: 13px;
    max-width: 85ch;
}
@media (min-width: 1500px) {
    .section-items .entity-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 1200px) {
    .home-columns {
        grid-template-columns: minmax(0, 1fr) 235px;
    }
    .home-tasks {
        gap: 8px;
    }
    .home-tasks > a {
        padding: 12px;
    }
    .ecosystem {
        display: none;
    }
    .selected-equipment {
        grid-template-columns: minmax(0, 1fr);
    }
    .selected-equipment .item-appearance {
        max-width: 360px;
    }
}
@media (max-width: 960px) {
    .wiki-layout,
    .mode-home .wiki-layout {
        display: block;
        padding: 18px 20px 0;
    }
    .menu-toggle {
        display: block;
    }
    .wiki-brand {
        flex: 0 0 132px;
        width: 132px;
    }
    .wiki-rail,
    .mode-home .wiki-rail {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, 88vw);
        height: 100dvh;
        max-height: none;
        padding: 18px;
        background: var(--rail);
        z-index: var(--z-navigation);
        transform: translateX(-105%);
        visibility: hidden;
    }
    .nav-open .wiki-rail {
        transform: none;
        visibility: visible;
    }
    .drawer-close {
        display: block;
    }
    .rail-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .rail-global {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .drawer-backdrop {
        inset: 0;
        z-index: var(--z-backdrop);
    }
    body.nav-open {
        overflow: hidden;
    }
    .home-columns {
        grid-template-columns: minmax(0, 1fr) 250px;
    }
}
@media (max-width: 640px) {
    :root {
        --header: 60px;
    }
    .wiki-header {
        padding: 0 10px;
        gap: 7px;
    }
    .wiki-brand {
        width: 28px;
        flex-basis: 28px;
    }
    .wiki-brand > span {
        display: none;
    }
    .header-search {
        min-width: 0;
        height: 38px;
        padding: 0 7px;
    }
    .header-search input {
        font-size: 16px;
        width: 100%;
    }
    .header-search kbd {
        display: none;
    }
    .language-switch {
        gap: 0;
        flex-shrink: 0;
    }
    .language-switch a {
        min-width: 30px;
        min-height: 40px;
        display: grid;
        place-items: center;
        font-size: 12px;
        padding: 4px;
    }
    .wiki-layout,
    .mode-home .wiki-layout {
        padding: 16px 12px 0;
    }
    .intro-panel {
        padding: 16px;
    }
    .intro-copy h1 {
        font-size: 26px;
    }
    .intro-copy > p:not(.eyebrow) {
        font-size: 14px;
    }
    .home-tasks {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .home-tasks > a {
        padding: 13px 14px;
    }
    .home-tasks strong {
        font-size: 15px;
    }
    .home-columns {
        display: block;
    }
    .home-columns > aside {
        display: block;
    }
    .home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-category {
        padding: 10px;
        gap: 7px;
    }
    .home-category strong {
        font-size: 13px;
        overflow-wrap: anywhere;
    }
    .home-category small {
        font-size: 11px;
    }
    .home-category img {
        width: 20px;
    }
    .progression-path {
        grid-template-columns: 1fr;
    }
    .progression-path a {
        display: flex;
        align-items: center;
        gap: 15px;
        min-height: 48px;
        border-bottom: 1px solid var(--border);
    }
    .progression-path b {
        min-width: 70px;
    }
    .progression-path a > span:last-child {
        margin-left: auto;
    }
    .filter-disclosure {
        border: 1px solid var(--border);
        margin: 12px 0;
    }
    .filter-disclosure > summary {
        display: list-item;
        cursor: pointer;
        padding: 12px;
        font-size: 14px;
        background: var(--surface);
    }
    .filter-disclosure .catalogue-filters {
        margin: 0;
        border: 0;
    }
    .catalogue-filters > div {
        min-width: 0;
    }
    .catalogue-filters .filter-search {
        flex-basis: 100%;
    }
    .catalogue-filters .filter-actions {
        min-width: 100%;
    }
    .catalogue-filters input:not([type="checkbox"]),
    .catalogue-filters select {
        font-size: 16px;
        min-height: 44px;
    }
    .category-tabs a {
        font-size: 12px;
        min-height: 40px;
    }
    .entity-grid,
    .item-paths {
        grid-template-columns: 1fr;
    }
    .entity-card-copy strong {
        font-size: 14px;
    }
    .entity-card-copy small {
        font-size: 12px;
    }
    .entity-hero {
        display: block;
    }
    .entity-hero > .native-viewer {
        margin-top: 12px;
        width: 130px;
    }
    .entity-kind-item .entity-hero {
        display: flex;
        align-items: start;
    }
    .entity-hero .entity-actions button {
        font-size: 12px;
    }
    .entity-kind-item .entity-icon-display {
        display: none;
    }
    .entity-hero h1,
    .compact-title h1 {
        font-size: 25px;
    }
    .entity-actions :is(button, a),
    .quiet-button,
    .upgrade-selector a {
        min-height: 42px;
    }
    .upgrade-selector a {
        min-width: 40px;
    }
    .selected-equipment > .item-summary {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 12px;
        gap: 10px;
    }
    .selected-equipment .summary-icon {
        width: 40px;
    }
    .selected-equipment .upgrade-selector {
        grid-column: 1/-1;
        grid-row: auto;
        justify-content: flex-start;
    }
    .dungeon-brief .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    .dungeon-brief .stat-grid dd {
        font-size: 17px;
    }
    .reading-plan ol {
        columns: 1;
    }
    .reading-plan li a {
        display: inline-block;
        padding: 5px 0;
    }
    .comparison-tray {
        padding: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }
    .comparison-tray > span {
        flex-basis: 100%;
    }
    .media-lightbox {
        max-width: calc(100vw - 16px);
        padding: 12px;
    }
    .suggestions {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 62px;
        width: auto;
        max-height: 65dvh;
    }
    .intro-panel .suggestions {
        position: absolute;
        inset: calc(100% + 6px) 0 auto;
    }
    .suggestions a {
        gap: 8px;
    }
    .suggestions small {
        max-width: 85px;
        white-space: normal;
    }
    .plan-controls {
        display: grid;
        grid-template-columns: 1fr;
    }
    .plan-controls input,
    .plan-controls select {
        width: 100%;
        font-size: 16px;
        min-height: 44px;
    }
    .wiki-footer {
        gap: 12px;
        flex-wrap: wrap;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Keep resizing immediate and the selected native stat summary compact. */
.wiki-rail {
    transition: none;
}
.selected-item-stats .metin-card {
    background: none;
    border: 0;
    text-align: left;
    padding: 0;
}
.selected-item-stats .metin-card p {
    font:
        14px/1.6 Segoe UI,
        Tahoma,
        sans-serif;
}

.source-trace {
    margin-top: 12px;
}
.comparison-different th small {
    display: block;
    font-size: 12px;
    color: var(--bright);
    margin-top: 4px;
}
.comparison-different {
    border-left: 2px solid var(--accent);
}

/* Primary action labels use a measured dark foreground on the bronze fill. */
:is(.large-search, .filter-actions, .atlas-coordinate-bar, .comparison-tray)
    button:not(.quiet-button) {
    color: #141611;
}

.location-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 12px 0;
    font-size: 13px;
    color: var(--bright);
}
.map-access {
    font-size: 14px;
    margin: 8px 0;
}
@media (max-width: 640px) {
    .entity-kind-mob .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
    .entity-kind-mob .stat-grid dt {
        font-size: 12px;
    }
    .entity-kind-mob .stat-grid dd {
        font-size: 14px;
    }
}

.catalogue-filters .category-picker {
    display: none;
}
.dungeon-source {
    margin-top: 12px;
}
.dungeon-source summary {
    cursor: pointer;
}
@media (max-width: 640px) {
    .category-tabs {
        display: none;
    }
    .catalogue-filters .category-picker {
        display: block;
        flex: 1;
        min-width: 0;
    }
    .catalogue-filters .sort-picker {
        flex: 1;
        min-width: 0;
    }
    .catalogue-filters .level-filter {
        flex-basis: 100%;
    }
    .entity-kind-dungeon .entity-hero {
        display: flex;
        gap: 12px;
        align-items: start;
        padding: 12px;
    }
    .entity-kind-dungeon .entity-hero-copy {
        flex: 1;
        min-width: 0;
    }
    .entity-kind-dungeon .entity-hero > .native-viewer {
        width: 80px;
        flex: 0 0 80px;
        margin: 0;
    }
    .entity-kind-dungeon .entity-actions .button {
        display: none;
    }
}

.reading-reset-dialog {
    width: min(480px, calc(100vw - 24px));
    max-height: 90dvh;
    padding: 20px;
    border: 1px solid var(--accent);
    background: var(--surface);
    color: var(--text);
}
.reading-reset-dialog::backdrop {
    background: #000a;
}
.reading-reset-dialog h2 {
    font-size: 18px;
    margin: 0 0 18px;
}
.reading-reset-dialog button {
    margin-right: 10px;
    color: var(--text);
    background: var(--raised);
    min-height: 42px;
    border: 1px solid var(--border);
}

/* Text enlargement must wrap filter labels and promote selects to full rows. */
.filter-checks label {
    white-space: normal;
    min-width: 0;
    overflow-wrap: anywhere;
}
.filter-checks input {
    flex-shrink: 0;
}
.catalogue-filters .filter-actions {
    flex-wrap: wrap;
}
@media (max-width: 640px) {
    .catalogue-filters .category-picker,
    .catalogue-filters .sort-picker {
        flex: 1 1 9em;
        min-width: min(100%, 9em);
    }
}

.variant-reference {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

.reading-plan .text-link {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
