/* 1. Theme Tokens, Typography & Base Reset */
:root {
    color-scheme: dark;
    --ow-background: #0b0d11;
    --ow-on-background: #f3efe6;
    --ow-surface: #14181f;
    --ow-surface-variant: #1e242e;
    --ow-surface-elevated: #28303d;
    --ow-on-surface: #f3efe6;
    --ow-on-surface-variant: #9ca3af;
    --ow-primary: #c5a059;
    --ow-primary-hover: #dfba70;
    --ow-on-primary: #0b0d11;
    --ow-primary-container: #2b2416;
    --ow-on-primary-container: #ffde94;
    --ow-secondary: #9e1a1a;
    --ow-secondary-hover: #bd2d2d;
    --ow-secondary-container: #331212;
    --ow-outline: #363c48;
    --ow-outline-variant: #8c713b;
    --ow-disabled: #656b77;
    --ow-error: #9e1a1a;
    --ow-error-container: #331212;
    --ow-on-error-container: #ffa3a3;
    --ow-gold-glow: rgba(197, 160, 89, 0.25);
    --ow-gold-glow-strong: rgba(197, 160, 89, 0.45);
    --ow-crimson-glow: rgba(158, 26, 26, 0.35);
    --ow-shadow-dialog: 0 24px 70px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(197, 160, 89, 0.28), 0 0 28px rgba(197, 160, 89, 0.1);
}

@font-face {
    font-family: "Maitree";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("./composeResources/kananek.top.oldworldtools.resources/font/maitree_semibold.ttf") format("truetype");
}

@font-face {
    font-family: "Maitree";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("./composeResources/kananek.top.oldworldtools.resources/font/maitree_bold.ttf") format("truetype");
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--ow-background);
    color: var(--ow-on-background);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Witcher Gothic Dark Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0b0e13;
}

::-webkit-scrollbar-thumb {
    background: #252e3b;
    border-radius: 4px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: #394659;
    border-color: var(--ow-primary);
}

* {
    scrollbar-width: thin;
    scrollbar-color: #252e3b #0b0e13;
}

/* Atmospheric Keyframe Animations */
@keyframes dialogBackdropFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
}

@keyframes dialogEntrance {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes goldShimmer {
    0% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(197, 160, 89, 0.25);
    }
    50% {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 24px rgba(197, 160, 89, 0.45);
    }
    100% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(197, 160, 89, 0.25);
    }
}

@keyframes victoryPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(74, 222, 128, 0.3), inset 0 0 4px rgba(74, 222, 128, 0.2);
    }
    50% {
        box-shadow: 0 0 16px rgba(74, 222, 128, 0.6), inset 0 0 8px rgba(74, 222, 128, 0.4);
    }
}

@keyframes tokenReveal {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    60% {
        transform: scale(1.03);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

#compose-host {
    width: 100%;
    height: 100dvh;
    min-width: 0;
    min-height: 100dvh;
    overflow: hidden;
    touch-action: manipulation;
}

#compose-host.native-dom-host {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--ow-background);
    color: var(--ow-on-background);
    overscroll-behavior-y: contain;
    scroll-padding-block: 24px 112px;
}

img {
    display: block;
    max-width: 100%;
}

img.is-missing {
    min-height: 48px;
    border: 1px dashed var(--ow-outline);
    background: var(--ow-surface-variant);
    color: var(--ow-on-surface-variant);
    object-fit: contain;
}

/* 2. Layout Shell, Header & Breadcrumb Trail */
.native-dom-shell {
    width: min(calc(100% - 64px), 1280px);
    margin: 0 auto;
    padding: 24px 0 96px;
}

.native-dom-header {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--ow-outline-variant);
    padding: 12px 0 16px;
}

.native-dom-header::before {
    width: 4px;
    align-self: stretch;
    background: var(--ow-primary);
    content: "";
}

.native-dom-header-copy {
    flex: 1;
    min-width: 0;
}

.native-dom-logo {
    flex: 0 0 76px;
    width: 76px;
    height: 50px;
    object-fit: contain;
}

.native-dom-header-copy > * {
    margin: 0;
}

.native-dom-progress-count {
    color: var(--ow-on-surface-variant);
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.native-dom-header-actions button {
    border: 1px solid var(--ow-outline);
    border-radius: 4px;
    background: transparent;
    color: var(--ow-on-surface-variant);
    cursor: pointer;
    font: 700 0.7rem monospace;
    padding: 8px 10px;
}

.native-dom-header-actions button:focus {
    outline: 3px solid var(--ow-primary);
    outline-offset: 2px;
}

.native-dom-trail {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 4px;
    margin: 14px 0 28px;
}

.native-dom-trail-item {
    min-width: 0;
    border-top: 2px solid var(--ow-outline-variant);
    color: var(--ow-disabled);
    font-family: monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.3;
    padding-top: 7px;
    text-transform: uppercase;
}

.native-dom-trail-item.is-current {
    border-color: var(--ow-primary);
    color: var(--ow-primary);
}

.native-dom-trail-item.is-complete {
    border-color: var(--ow-secondary);
    color: var(--ow-secondary);
}

.native-dom-content {
    position: relative;
    display: grid;
    gap: 16px;
    max-width: 1280px;
    margin: 0 auto;
}

.native-dom-table-watermark {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.native-dom-table-watermark-image {
    width: min(600px, 80%);
    opacity: 0.1;
}

.native-dom-content > *:not(.native-dom-table-watermark) {
    position: relative;
    z-index: 1;
}

/* 3. Typography & Common UI Components */
.native-dom-eyebrow,
.native-dom-kicker {
    margin: 0 0 8px;
    color: var(--ow-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.native-dom-title,
.native-dom-heading {
    margin: 0 0 16px;
    color: var(--ow-on-background);
    font-family: "Maitree", Georgia, serif;
    line-height: 1.08;
    text-wrap: balance;
}

.native-dom-title,
.native-dom-heading,
.native-dom-section-title {
    font-family: Cinzel, "Trajan Pro", "Maitree", Georgia, serif;
    letter-spacing: 0.04em;
}

.native-dom-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

.native-dom-heading {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.native-dom-copy {
    max-width: 58ch;
    color: var(--ow-on-surface-variant);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.native-dom-header-subtitle {
    flex: 0 1 300px;
    margin: 0;
    color: var(--ow-on-surface-variant);
    font-family: monospace;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.45;
    text-align: right;
}

.native-dom-muted {
    color: var(--ow-on-surface-variant);
    line-height: 1.55;
}

.native-dom-field {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.native-dom-label,
.native-dom-meta,
.native-dom-recorded {
    color: var(--ow-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.native-dom-field input,
.native-dom-field select,
.native-dom-player-card input,
.native-dom-player-card select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--ow-outline);
    border-radius: 6px;
    background: var(--ow-surface);
    color: var(--ow-on-surface);
    font: inherit;
    padding: 0 14px;
}

.native-dom-field input:focus,
.native-dom-field select:focus,
.native-dom-player-card input:focus,
.native-dom-player-card select:focus,
.native-dom-actions button:focus,
.native-dom-inline button:focus,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--ow-primary);
    outline-offset: 2px;
}

.native-dom-card,
.native-dom-player-card,
.native-dom-issues {
    position: relative;
    border: 2px solid var(--ow-outline-variant);
    border-radius: 4px;
    background: var(--ow-surface-variant);
    padding: 16px;
}

.native-dom-issues {
    background: var(--ow-error-container);
}

.native-dom-card::before,
.native-dom-player-card::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    border-radius: 6px 0 0 6px;
    background: var(--ow-primary);
    content: "";
}

.native-dom-player-card.has-character {
    background: color-mix(in srgb, var(--player-accent) 10%, var(--ow-surface-variant));
}

.native-dom-player-card.has-character::before {
    background: var(--player-accent);
}

.native-dom-card-title,
.native-dom-section-title {
    margin: 0 0 10px;
    color: var(--ow-on-surface);
    font-family: Cinzel, "Trajan Pro", "Maitree", Georgia, serif;
    font-size: 1.15rem;
}

/* 4. Configuration Steps (Table, Scenario, Content, Modules, Expansions, Party) */
.native-dom-expansion-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
    grid-template-areas: "catalog manifest";
    gap: 16px;
    align-items: start;
}

.native-dom-expansion-catalog {
    grid-area: catalog;
    display: grid;
    gap: 16px;
    min-width: 0;
}

.native-dom-expansion-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.native-dom-table-manifest {
    grid-area: manifest;
    position: sticky;
    top: 16px;
}

.native-dom-manifest-item {
    border-top: 1px solid var(--ow-outline-variant);
    color: var(--ow-primary);
    font-weight: 700;
    margin: 0;
    padding: 8px 0 2px;
}

.native-dom-manifest-subitem {
    color: var(--ow-on-surface-variant);
    font-size: 0.85rem;
    margin: 0;
    padding: 2px 0 2px 12px;
}

.native-dom-player-count {
    display: block;
    margin: 4px 0 8px;
    color: var(--ow-primary);
    font-family: "Maitree", Georgia, serif;
    font-size: 2.25rem;
    line-height: 1;
}

.native-dom-dashboard-stat {
    display: grid;
    gap: 4px;
    min-width: 0;
    border-left: 1px solid var(--ow-outline-variant);
    padding: 8px 12px;
}

.native-dom-dashboard-label {
    color: var(--ow-on-surface-variant);
    font-family: monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.native-dom-dashboard-value {
    color: var(--ow-on-surface);
    font-family: "Maitree", Georgia, serif;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.native-dom-section-title {
    margin-top: 12px;
    color: var(--ow-primary);
}

.native-dom-choice-grid,
.native-dom-inline,
.native-dom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.native-dom-choice-grid {
    gap: 8px;
    margin-top: 12px;
}

.native-dom-step-list-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.native-dom-dossier-header {
    display: grid;
    gap: 6px;
}

.native-dom-dossier-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.native-dom-seat-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.native-dom-seat-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ow-primary) 18%, var(--ow-surface));
    color: var(--ow-primary);
    border: 1px solid color-mix(in srgb, var(--ow-primary) 36%, transparent);
}

.native-dom-seat-resources {
    font-size: 0.8125rem;
    color: var(--ow-on-surface-variant);
}

.native-dom-step-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.native-dom-step-complete {
    flex: 0 0 auto;
    min-height: 40px !important;
    padding: 0 12px !important;
    font-size: 0.78rem !important;
}

.native-dom-step-complete.is-recorded {
    border-color: var(--ow-secondary);
    background: var(--ow-secondary-container);
    color: var(--ow-on-surface);
}

.native-dom-mark-all {
    margin-top: 4px;
}

.native-dom-player-dossier {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    gap: 8px;
    min-height: 276px;
    box-sizing: border-box;
}

.native-dom-dossier-divider {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--ow-outline-variant);
    margin: 0;
}

.native-dom-dossier-body {
    position: relative;
    z-index: 2;
    display: block;
    min-height: 220px;
}

.native-dom-dossier-artwork {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    pointer-events: none;
    opacity: 0.42;
}

.native-dom-dossier-artwork::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        transparent 0%,
        color-mix(in srgb, var(--ow-surface) 92%, transparent) 28%,
        color-mix(in srgb, var(--ow-surface) 96%, transparent) 50%,
        color-mix(in srgb, var(--ow-surface) 92%, transparent) 72%,
        transparent 100%
    );
}

.native-dom-dossier-artwork .native-dom-dossier-symbol,
.native-dom-dossier-artwork .native-dom-dossier-trophy {
    position: relative;
    z-index: 0;
    width: auto;
    height: 100%;
    max-width: 30%;
    aspect-ratio: 2 / 3;
    object-fit: contain;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.native-dom-dossier-header,
.native-dom-dossier-divider,
.native-dom-dossier-footer {
    position: relative;
    z-index: 2;
}

.native-dom-seat-identity {
    width: min(100%, 620px);
    margin: 0 auto;
    display: grid;
    gap: 8px;
    align-content: start;
    min-width: 0;
}

.native-dom-seat-identity > .native-dom-card-title {
    min-height: 1.4em;
}

.native-dom-seat-identity > .native-dom-inline {
    min-height: 48px;
    align-items: center;
}

.native-dom-special-ability {
    min-height: 44px;
}

.native-dom-player-card input.is-invalid {
    border-color: var(--ow-error);
}

.native-dom-field-error {
    display: block;
    font-size: 0.8125rem;
    color: var(--ow-error);
    margin-top: -2px;
}

.native-dom-dossier-ability-box {
    display: grid;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ow-surface) 65%, transparent);
    border-left: 3px solid var(--player-accent, var(--ow-primary));
}

.native-dom-dossier-story-box {
    display: grid;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ow-surface) 40%, transparent);
    border: 1px dashed var(--ow-outline-variant);
    font-style: italic;
}

.native-dom-footer-spacer {
    flex: 1 1 auto;
}

.native-dom-dossier-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 700px) {
    .native-dom-player-dossier {
        min-height: 252px;
    }

    .native-dom-dossier-artwork {
        opacity: 0.28;
    }

    .native-dom-dossier-artwork .native-dom-dossier-symbol,
    .native-dom-dossier-artwork .native-dom-dossier-trophy {
        max-width: 34%;
    }

    .native-dom-dossier-body {
        min-height: 196px;
    }

    .native-dom-seat-identity {
        width: 100%;
    }
}

/* Configuration Review and Table Readiness */

.native-dom-review-hero {
    position: relative;
    border: 2px solid var(--ow-outline-variant);
    border-radius: 6px;
    background: var(--ow-surface-variant);
    padding: 20px;
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.native-dom-review-hero.is-ready {
    border-color: color-mix(in srgb, var(--ow-primary) 50%, var(--ow-outline-variant));
    background: color-mix(in srgb, var(--ow-primary) 8%, var(--ow-surface-variant));
}

.native-dom-review-hero.is-blocked {
    border-color: color-mix(in srgb, var(--ow-error) 50%, var(--ow-outline-variant));
    background: color-mix(in srgb, var(--ow-error) 8%, var(--ow-surface-variant));
}

.native-dom-review-kicker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.native-dom-readiness-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 4px;
}

.native-dom-readiness-badge.is-ready {
    background: color-mix(in srgb, var(--ow-primary) 22%, var(--ow-surface));
    color: var(--ow-primary);
    border: 1px solid color-mix(in srgb, var(--ow-primary) 40%, transparent);
}

.native-dom-readiness-badge.is-blocked {
    background: color-mix(in srgb, var(--ow-error) 20%, var(--ow-surface));
    color: var(--ow-error);
    border: 1px solid color-mix(in srgb, var(--ow-error) 40%, transparent);
}

.native-dom-review-quick-fixes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--ow-outline-variant);
}

.native-dom-review-card {
    margin-bottom: 20px;
}

.native-dom-review-section-header {
    display: flex;
    justify-content: flex-end;
    margin-top: -32px;
    margin-bottom: 12px;
}

.native-dom-review-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.native-dom-review-box {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ow-surface) 65%, transparent);
    border: 1px solid var(--ow-outline-variant);
}

.native-dom-review-goal-box {
    border-left: 3px solid var(--ow-primary);
}

.native-dom-inline-spread {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.native-dom-pill-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.native-dom-pill {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    background: color-mix(in srgb, var(--ow-surface) 90%, transparent);
    color: var(--ow-on-surface);
    border: 1px solid var(--ow-outline-variant);
}

.native-dom-pill-primary {
    background: color-mix(in srgb, var(--ow-primary) 18%, var(--ow-surface));
    color: var(--ow-primary);
    border-color: color-mix(in srgb, var(--ow-primary) 35%, transparent);
}

.native-dom-pill-accent {
    background: color-mix(in srgb, var(--ow-secondary) 18%, var(--ow-surface));
    color: var(--ow-secondary);
    border-color: color-mix(in srgb, var(--ow-secondary) 35%, transparent);
}

.native-dom-review-roster {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.native-dom-review-player-item {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ow-surface) 65%, transparent);
    border: 1px solid var(--ow-outline-variant);
    border-left: 3px solid var(--player-accent, var(--ow-primary));
}

.native-dom-review-player-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.native-dom-review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--player-accent, var(--ow-primary));
    object-fit: cover;
    flex-shrink: 0;
}

.native-dom-review-identity {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.native-dom-review-player-meta {
    display: grid;
    gap: 4px;
}

.native-dom-special-ability-snippet {
    font-size: 0.8125rem;
    line-height: 1.35;
    font-style: italic;
}

.native-dom-review-next-step {
    display: grid;
    gap: 6px;
    padding: 14px 18px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--ow-primary) 12%, var(--ow-surface-variant));
    border: 1px dashed color-mix(in srgb, var(--ow-primary) 40%, transparent);
    margin-bottom: 20px;
}

/* Guided Physical Setup and Monster Placements */

.native-dom-setup-hero {
    position: relative;
    border: 2px solid var(--ow-outline-variant);
    border-radius: 6px;
    background: var(--ow-surface-variant);
    padding: 20px;
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.native-dom-setup-kicker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.native-dom-setup-brief-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ow-surface) 65%, transparent);
    border: 1px solid var(--ow-outline-variant);
    margin-top: 4px;
}

.native-dom-setup-tip {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--ow-on-surface-variant);
    font-style: italic;
    margin: 0;
}

.native-dom-step-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.native-dom-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ow-outline-variant);
    color: var(--ow-on-surface);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.native-dom-step-desc {
    line-height: 1.45;
    margin-top: 6px;
}

.native-dom-monster-level-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 3px;
    border: 1px solid transparent;
}

.native-dom-monster-level-badge.is-level-1 {
    background: color-mix(in srgb, #cd7f32 20%, var(--ow-surface));
    color: #df9e55;
    border-color: color-mix(in srgb, #cd7f32 40%, transparent);
}

.native-dom-monster-level-badge.is-level-2 {
    background: color-mix(in srgb, #c0c0c0 20%, var(--ow-surface));
    color: #e0e0e0;
    border-color: color-mix(in srgb, #c0c0c0 40%, transparent);
}

.native-dom-monster-level-badge.is-level-3 {
    background: color-mix(in srgb, #ffd700 20%, var(--ow-surface));
    color: #ffd700;
    border-color: color-mix(in srgb, #ffd700 40%, transparent);
}

.native-dom-monster-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
}

.native-dom-monster-status.is-placed {
    background: color-mix(in srgb, var(--ow-primary) 20%, var(--ow-surface));
    color: var(--ow-primary);
}

.native-dom-monster-status.is-pending {
    background: color-mix(in srgb, var(--ow-error) 20%, var(--ow-surface));
    color: var(--ow-error);
}

.native-dom-monster-terrain-pill {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 3px;
    background: color-mix(in srgb, var(--ow-surface-variant) 80%, transparent);
    color: var(--ow-on-surface);
    border: 1px solid var(--ow-outline-variant);
}

.native-dom-monster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.native-dom-monster-dossier {
    display: grid;
    gap: 8px;
    min-width: 0;
    border: 1px solid var(--ow-outline-variant);
    border-top: 3px solid var(--ow-primary);
    border-radius: 6px;
    background: var(--ow-surface);
    padding: 14px;
}

.native-dom-monster-dossier select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--ow-outline);
    border-radius: 6px;
    background: var(--ow-surface-variant);
    color: var(--ow-on-surface);
    font: inherit;
    padding: 0 10px;
}

.native-dom-fixed-terrain {
    color: var(--ow-on-primary-container);
    font-family: monospace;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.native-dom-randomize-all {
    border-color: var(--ow-primary) !important;
    background: var(--ow-primary-container) !important;
    color: var(--ow-on-primary-container) !important;
}

.native-dom-readiness-card {
    border-left-width: 5px;
}

.native-dom-readiness-card.is-ready {
    border-color: var(--ow-primary);
}

.native-dom-readiness-card.is-attention {
    border-color: var(--ow-error);
}

/* 6. Session Entry & Restore Screen */
.native-dom-session-entry-card {
    max-width: 680px;
}

.native-dom-host button {
    min-height: 44px;
    border: 1px solid var(--ow-outline);
    border-radius: 2px;
    background: transparent;
    color: var(--ow-on-surface);
    cursor: pointer;
    font-family: Cinzel, "Trajan Pro", "Maitree", Georgia, serif;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0 16px;
    transition: background-color 120ms ease, border-color 120ms ease, opacity 120ms ease, transform 80ms ease;
}

.native-dom-host button:hover:not(:disabled) {
    border-color: var(--ow-primary);
    background: var(--ow-surface-variant);
}

.native-dom-host button:active:not(:disabled) {
    transform: translateY(1px);
    background: var(--ow-primary-container);
}

.native-dom-inline input {
    flex: 1 1 180px;
    min-height: 48px;
    border: 1px solid var(--ow-outline);
    border-radius: 6px;
    background: var(--ow-surface);
    color: var(--ow-on-surface);
    font: inherit;
    padding: 0 14px;
}

.native-dom-inline button,
.native-dom-actions button,
.native-dom-choice-grid button {
    min-height: 48px;
    border: 1px solid var(--ow-outline);
    border-radius: 2px;
    background: transparent;
    color: var(--ow-on-surface);
    cursor: pointer;
    font-family: Cinzel, "Trajan Pro", "Maitree", Georgia, serif;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0 18px;
}

.native-dom-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--ow-outline-variant);
    margin-top: 8px;
    padding-top: 12px;
}

.native-dom-actions.native-dom-sticky-actions {
    justify-content: flex-start;
}

.native-dom-sticky-actions > button:last-child {
    margin-left: auto;
}

.native-dom-actions button.is-selected,
.native-dom-choice-grid button.is-selected,
.native-dom-inline button.is-selected {
    border-color: var(--ow-primary);
    background: var(--ow-primary-container);
    color: var(--ow-on-primary-container);
}

.native-dom-actions button:first-child:last-child,
.native-dom-actions button:not(.is-outline) {
    border-color: var(--ow-primary);
}

.native-dom-actions button:disabled,
.native-dom-inline button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.native-dom-disclaimer {
    border-top: 1px solid var(--ow-outline-variant);
    color: var(--ow-on-surface-variant);
    font-size: 0.85rem;
    line-height: 1.55;
    padding: 14px 8px 0;
    text-align: center;
}

.native-dom-module {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 10px;
    align-items: start;
    border-top: 1px solid var(--ow-outline-variant);
    padding: 12px 0;
}

.native-dom-module input[type="checkbox"],
.native-dom-player-card select {
    accent-color: var(--ow-primary);
}

.native-dom-module small {
    display: block;
    margin-top: 4px;
}

.native-dom-module-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.native-dom-module-badges span {
    border: 1px solid color-mix(in srgb, var(--ow-primary) 55%, transparent);
    border-radius: 999px;
    color: var(--ow-primary);
    font: 700 0.62rem monospace;
    letter-spacing: 0.06em;
    padding: 3px 6px;
    text-transform: uppercase;
}

/* 7. Dialogs, Modals, Overlays & Expansion Cards */
.native-dom-expansion-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ow-outline-variant);
    border-radius: 8px;
    background: var(--ow-surface-variant);
}

.native-dom-expansion-card.is-complete {
    border-color: var(--ow-secondary);
}

.native-dom-expansion-hero {
    position: relative;
    border-bottom: 1px solid var(--ow-outline-variant);
    background: var(--ow-surface);
}

.native-dom-expansion-card.is-blocked .native-dom-expansion-image {
    filter: grayscale(0.7);
    opacity: 0.4;
}

.native-dom-expansion-status {
    position: absolute;
    right: 12px;
    bottom: 10px;
    border: 1px solid var(--ow-outline);
    background: rgba(10, 16, 15, 0.82);
    color: var(--ow-on-surface-variant);
    font: 700 0.66rem monospace;
    letter-spacing: 0.08em;
    padding: 5px 7px;
}

.native-dom-expansion-status.is-complete {
    border-color: color-mix(in srgb, var(--ow-secondary) 60%, transparent);
    color: var(--ow-secondary);
}

.native-dom-expansion-status.is-custom {
    border-color: color-mix(in srgb, var(--ow-primary) 60%, transparent);
    color: var(--ow-primary);
}

.native-dom-expansion-status.is-unavailable {
    border-color: color-mix(in srgb, var(--ow-error) 60%, transparent);
    color: var(--ow-error);
}

.native-dom-expansion-readiness-badge {
    position: absolute;
    top: 10px;
    left: 12px;
    border: 1px solid color-mix(in srgb, var(--ow-primary) 60%, transparent);
    background: rgba(10, 16, 15, 0.82);
    color: var(--ow-primary);
    font: 700 0.66rem monospace;
    letter-spacing: 0.08em;
    padding: 5px 7px;
}

.native-dom-expansion-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.native-dom-expansion-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.native-dom-expansion-name {
    min-width: 0;
    margin: 0;
    color: var(--ow-on-surface);
    font-family: "Maitree", Georgia, serif;
    font-size: 1.25rem;
    line-height: 1.15;
}

.native-dom-expansion-count {
    flex: 0 0 auto;
    color: var(--ow-on-surface-variant);
    font: 700 0.8rem monospace;
    white-space: nowrap;
}

.is-complete .native-dom-expansion-count {
    color: var(--ow-secondary);
}

.native-dom-expansion-purpose {
    margin: 0;
    color: var(--ow-on-surface-variant);
    line-height: 1.55;
}

.native-dom-expansion-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.native-dom-expansion-types span {
    border: 1px solid color-mix(in srgb, var(--ow-secondary) 55%, transparent);
    border-radius: 999px;
    background: var(--ow-secondary-container);
    color: var(--ow-on-surface);
    font: 700 0.67rem monospace;
    padding: 4px 7px;
}

.is-blocked .native-dom-expansion-types span {
    border-color: var(--ow-outline-variant);
    background: var(--ow-surface-variant);
    color: var(--ow-on-surface-variant);
}

.native-dom-expansion-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    border-top: 1px solid var(--ow-outline-variant);
    border-bottom: 1px solid var(--ow-outline-variant);
    padding: 10px 0;
}

.native-dom-expansion-fact {
    min-width: 0;
}

.native-dom-expansion-fact p {
    margin: 4px 0 0;
    color: var(--ow-on-surface);
    font-size: 0.83rem;
    line-height: 1.45;
}

.native-dom-expansion-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.native-dom-expansion-actions button {
    width: 100%;
}

.native-dom-expansion-footer {
    display: grid;
    gap: 8px;
    margin-top: auto;
}

.native-dom-primary-action {
    border-color: var(--ow-primary) !important;
    background: var(--ow-primary-container) !important;
    color: var(--ow-on-primary-container) !important;
}

.native-dom-source {
    color: var(--ow-disabled);
    font-family: monospace;
    font-size: 0.68rem;
}

.native-dom-monster-terrain-token {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    border-top: 1px solid var(--ow-outline-variant);
    border-bottom: 1px solid var(--ow-outline-variant);
    padding: 8px 0;
}

.native-dom-monster-terrain-token .native-dom-location-image {
    width: 56px;
    height: 56px;
}


.native-dom-fight-dialog {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--ow-outline-variant);
    border-top: 3px solid #b3261e;
    background: var(--ow-surface);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(179, 38, 30, 0.12);
}

.native-dom-player-fight-dialog {
    border-top-color: var(--ow-primary);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(218, 165, 32, 0.12);
}

.native-dom-fight-dialog > h2,
.native-dom-fight-dialog > p {
    margin: 0;
}

.native-dom-fight-choice-list,
.native-dom-fight-monster-list {
    display: grid;
    gap: 12px;
}

/* 8. Combat & Fights (PvP Duels, Monster Battles, Arena Banners) */
.native-dom-fight-pvp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--ow-outline-variant);
    border-left: 4px solid var(--player-accent, var(--ow-primary));
    background: color-mix(in srgb, var(--ow-surface) 80%, transparent);
    overflow: hidden;
    transition: all 0.2s ease;
}

.native-dom-fight-pvp-card:hover {
    border-color: var(--player-accent, var(--ow-primary));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.native-dom-pvp-bg-symbol {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%) rotate(10deg);
    width: 130px;
    height: 130px;
    opacity: 0.15;
    object-fit: contain;
    pointer-events: none;
    z-index: 0;
    filter: grayscale(40%);
}

.native-dom-pvp-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.native-dom-pvp-card-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.native-dom-pvp-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--player-accent, var(--ow-primary));
    object-fit: cover;
    background: var(--ow-surface);
}

.native-dom-fight-choice {
    width: 100%;
    text-align: left;
}

.native-dom-fight-pvp-card .native-dom-fight-choice {
    width: auto;
    min-width: 120px;
    text-align: center;
}

.native-dom-fight-monster-choice {
    position: relative;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 6px 14px;
    align-items: center;
    border: 1px solid var(--ow-outline-variant);
    border-left: 4px solid #b3261e;
    border-radius: 8px;
    background: color-mix(in srgb, var(--ow-surface) 80%, transparent);
    padding: 12px 14px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.native-dom-fight-monster-choice:hover {
    border-color: #b3261e;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.native-dom-monster-bg-card {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%) rotate(8deg);
    width: 120px;
    height: 120px;
    opacity: 0.15;
    object-fit: contain;
    pointer-events: none;
    z-index: 0;
    filter: grayscale(25%);
}

.native-dom-fight-monster-choice .native-dom-monster-image,
.native-dom-fight-monster-choice h3,
.native-dom-fight-monster-choice p,
.native-dom-fight-monster-choice button {
    position: relative;
    z-index: 1;
}

.native-dom-fight-monster-choice .native-dom-monster-image {
    grid-row: span 3;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    border: 1px solid var(--ow-outline-variant);
    background: var(--ow-surface);
    object-fit: contain;
}

.native-dom-fight-monster-choice h3,
.native-dom-fight-monster-choice p {
    margin: 0;
}

.native-dom-fight-monster-choice button {
    grid-column: 2;
    width: 100%;
}

.native-dom-fight-arena-banner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--ow-outline-variant);
    background: color-mix(in srgb, var(--ow-surface) 85%, transparent);
    overflow: hidden;
    margin: 8px 0;
}

.native-dom-fight-arena-bg {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 160px;
    opacity: 0.14;
    object-fit: contain;
    pointer-events: none;
    filter: grayscale(35%);
}

.native-dom-fight-combatant {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.native-dom-fight-combatant-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--player-accent, var(--ow-primary));
    object-fit: cover;
    background: var(--ow-surface);
}

.native-dom-fight-vs-badge {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: color-mix(in srgb, #b3261e 25%, var(--ow-surface));
    border: 2px solid #b3261e;
    color: #ff897d;
    font-size: 1.1rem;
    font-weight: 800;
}

.native-dom-fight-authority {
    border-left: 3px solid var(--ow-secondary);
    background: var(--ow-secondary-container);
    padding: 10px 12px;
    color: var(--ow-on-surface);
    font-weight: 700;
    border-radius: 0 6px 6px 0;
}

.native-dom-fight-result {
    border: 1px solid var(--ow-primary);
    background: var(--ow-primary-container);
    padding: 14px;
    color: var(--ow-on-surface);
    font-family: var(--ow-display-font, serif);
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 8px;
}

/* 9. Exploration Dialogs & Presentation */
.native-dom-exploration-assistant {
    display: grid;
    gap: 12px;
}

.native-dom-exploration-pending {
    margin: 0;
    color: var(--ow-primary);
    font-weight: 700;
}

.native-dom-exploration-physical {
    margin: 0;
    color: var(--ow-on-surface);
    font-weight: 700;
}

.native-dom-switch {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--ow-outline-variant);
    background: var(--ow-surface);
    color: var(--ow-on-surface);
    padding: 12px 14px;
    text-align: left;
}

.native-dom-switch[aria-checked="true"] {
    border-color: var(--ow-primary);
}

.native-dom-switch-state {
    color: var(--ow-primary);
    font-weight: 700;
    text-transform: uppercase;
}

.native-dom-dialog-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid var(--ow-outline-variant);
    padding-bottom: 12px;
}

.native-dom-dialog-title-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.native-dom-dialog-title-col > h2,
.native-dom-dialog-title-col > p {
    margin: 0;
}

/* Sizing for Round Tracker Tool Panels */
.native-dom-dialog.native-dom-panel,
.native-dom-panel {
    width: min(60vw, 760px) !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 0;
    max-height: min(90vh, 800px);
    overflow-y: auto;
    box-sizing: border-box;
}

/* Unified Sizing for Phase II, Exploration, and Combat Modals (60vw with matched height bounds) */
.native-dom-dialog.native-dom-exploration-dialog,
.native-dom-exploration-dialog,
.native-dom-dialog.native-dom-phase-two-dialog,
.native-dom-phase-two-dialog,
.native-dom-dialog.native-dom-fight-dialog,
.native-dom-fight-dialog,
.native-dom-dialog.native-dom-trophy-claim-dialog,
.native-dom-trophy-claim-dialog,
.native-dom-dialog.native-dom-fatigue-dialog,
.native-dom-fatigue-dialog,
.native-dom-dialog.native-dom-vs-modal,
.native-dom-vs-modal {
    width: 60vw !important;
    max-width: 60vw !important;
    min-width: min(100%, 320px);
    min-height: min(85vh, 620px);
    max-height: min(90vh, 800px);
    overflow-y: auto;
    box-sizing: border-box;
}

.native-dom-dialog.native-dom-exploration-dialog,
.native-dom-exploration-dialog {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 28px;
    border: 1px solid var(--ow-outline);
    border-top: 3px solid var(--ow-primary);
    background: radial-gradient(circle at 50% 0%, #1e2632 0%, #13171f 100%);
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(197, 160, 89, 0.25), 0 0 28px rgba(197, 160, 89, 0.1);
}

.native-dom-exploration-dialog .native-dom-dialog-header-row {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    margin-bottom: 4px;
}

.native-dom-exploration-dialog #native-dom-exploration-title {
    font-family: "Cinzel", "Maitree", Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ow-primary);
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.native-dom-exploration-dialog > h2,
.native-dom-exploration-dialog > h3,
.native-dom-exploration-dialog > p {
    margin: 0;
}

.native-dom-explore-deck-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 14px;
    margin-bottom: 8px;
    align-items: stretch;
}

.native-dom-explore-card-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 20px 18px 18px;
    background: linear-gradient(180deg, #202733 0%, #151A22 100%);
    border: 1px solid var(--ow-outline);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.native-dom-explore-card-btn:hover {
    border-color: var(--ow-primary);
    background: linear-gradient(180deg, #283241 0%, #1B212B 100%);
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.6), 0 0 22px rgba(197, 160, 89, 0.25);
}

.native-dom-explore-card-btn:focus-visible {
    outline: 2px solid var(--ow-primary);
    outline-offset: 2px;
}

.native-dom-explore-deck-image {
    width: min(100%, 190px);
    aspect-ratio: 2 / 3;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid rgba(197, 160, 89, 0.35);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
    pointer-events: none;
    transition: transform 0.25s ease;
}

.native-dom-explore-card-btn:hover .native-dom-explore-deck-image {
    transform: scale(1.03);
}

.native-dom-explore-card-label {
    font-family: "Cinzel", "Maitree", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ow-on-surface);
    letter-spacing: 0.04em;
    pointer-events: none;
}

.native-dom-explore-card-btn[data-count]::after {
    content: attr(data-count);
    display: inline-block;
    font-family: var(--ow-font-sans, inherit);
    font-size: 0.85rem;
    font-weight: 600;
    color: #FFDE94;
    background: rgba(11, 13, 17, 0.85);
    border: 1px solid rgba(197, 160, 89, 0.4);
    padding: 4px 14px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.native-dom-explore-card-btn.is-exhausted {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.native-dom-explore-card-btn.is-exhausted[data-count]::after {
    color: var(--ow-on-error-container);
    border-color: rgba(255, 107, 107, 0.4);
    background: var(--ow-error-container);
}

.native-dom-exploration-card {
    width: min(100%, 190px);
    height: auto;
    aspect-ratio: 2 / 3;
    align-self: center;
    border: 1px solid #8C713B;
    border-radius: 4px;
    background: var(--ow-surface-variant);
    object-fit: contain;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(197, 160, 89, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.native-dom-exploration-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.8), 0 0 28px rgba(197, 160, 89, 0.3);
}

.native-dom-exploration-title {
    color: var(--ow-primary);
    font-family: "Cinzel", "Maitree", Georgia, serif;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.03em;
    margin-top: 4px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.native-dom-exploration-intro-box {
    padding: 22px 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(30, 37, 48, 0.96) 0%, rgba(18, 22, 30, 0.98) 100%);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-left: 4px solid var(--ow-primary);
    line-height: 1.8;
    font-size: 1.06rem;
    font-style: italic;
    color: #ede7d4;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.native-dom-exploration-choices-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 14px 0;
}

@media (max-width: 600px) {
    .native-dom-exploration-choices-grid {
        grid-template-columns: 1fr;
    }
}

.native-dom-exploration-choice-a,
.native-dom-exploration-choice-b {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px 22px;
    min-height: 104px;
    border-radius: 6px;
    border: 1px solid var(--ow-outline);
    background: linear-gradient(180deg, #202733 0%, #151A22 100%);
    color: var(--ow-on-surface);
    font-size: 1.02rem;
    line-height: 1.6;
    text-align: left;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s ease,
                background 0.22s ease,
                box-shadow 0.22s ease;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.native-dom-exploration-choice-a {
    border-top: 3px solid var(--ow-primary);
}

.native-dom-exploration-choice-b {
    border-top: 3px solid #8C713B;
}

.native-dom-exploration-choice-a:hover,
.native-dom-exploration-choice-b:hover {
    border-color: var(--ow-primary);
    background: linear-gradient(180deg, #293444 0%, #1c232e 100%);
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), 0 0 24px rgba(197, 160, 89, 0.28);
}

.native-dom-exploration-choice-a:active,
.native-dom-exploration-choice-b:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.native-dom-exploration-choice-a:focus-visible,
.native-dom-exploration-choice-b:focus-visible {
    outline: 2px solid var(--ow-primary);
    outline-offset: 3px;
}

.native-dom-exploration-reveal,
.native-dom-exploration-resolve {
    align-self: center;
    min-width: 240px;
    min-height: 44px;
    text-align: center;
    padding: 12px 32px;
    font-family: "Cinzel", "Maitree", Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 5px;
    margin-top: 14px;
    background: linear-gradient(180deg, #DFBA70 0%, #C5A059 100%);
    color: #0B0D11;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(197, 160, 89, 0.3);
    animation: goldShimmer 3s ease-in-out infinite;
}

.native-dom-exploration-reveal:hover,
.native-dom-exploration-resolve:hover {
    background: #DFBA70;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 24px rgba(197, 160, 89, 0.45);
}

.native-dom-exploration-dialog.native-dom-exploration-city::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at 85% 15%, rgba(197, 160, 89, 0.1) 0%, rgba(197, 160, 89, 0.02) 45%, transparent 70%);
    pointer-events: none;
    border-radius: 0 4px 0 0;
}

.native-dom-exploration-dialog.native-dom-exploration-wild::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at 85% 15%, rgba(74, 158, 107, 0.1) 0%, rgba(74, 158, 107, 0.02) 45%, transparent 70%);
    pointer-events: none;
    border-radius: 0 4px 0 0;
}

.native-dom-exploration-deck-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: "Cinzel", "Maitree", Georgia, serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 4px 0 6px;
}

.native-dom-exploration-deck-pill.native-dom-deck-city {
    background: rgba(197, 160, 89, 0.15);
    border: 1px solid rgba(197, 160, 89, 0.45);
    color: #FFDE94;
}

.native-dom-exploration-deck-pill.native-dom-deck-wild {
    background: rgba(74, 158, 107, 0.15);
    border: 1px solid rgba(74, 158, 107, 0.45);
    color: #98E0B0;
}

.native-dom-exploration-narrative-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 4px;
    background: rgba(197, 160, 89, 0.12);
    border: 1px solid rgba(197, 160, 89, 0.35);
    color: #FFDE94;
    font-family: "Cinzel", "Maitree", Georgia, serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 6px;
    margin-bottom: 2px;
}

.native-dom-exploration-choices-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    margin-bottom: -4px;
}

.native-dom-kbd-hint {
    font-size: 0.78rem;
    font-family: "Cinzel", "Maitree", Georgia, serif;
    color: #C5A059;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(197, 160, 89, 0.12);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.native-dom-exploration-resolution {
    border-radius: 4px;
    border: 1px solid var(--ow-outline);
    border-top: 3px solid var(--ow-primary);
    background: linear-gradient(180deg, #1C222C 0%, #14181F 100%);
    padding: 24px 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.native-dom-exploration-resolution > p {
    margin: 0 0 10px;
}

.native-dom-exploration-resolution > p:last-child {
    margin-bottom: 0;
}

.native-dom-exploration-reward {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(43, 36, 22, 0.95) 0%, rgba(30, 24, 14, 0.98) 100%);
    border: 1px solid rgba(197, 160, 89, 0.45);
    color: #FFDE94;
    font-weight: 700;
    font-size: 1.05rem;
    margin-top: 6px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 14px rgba(197, 160, 89, 0.15);
}

.native-dom-exploration-reward-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.native-dom-exploration-reward-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(197, 160, 89, 0.12);
    border: 1px solid rgba(197, 160, 89, 0.35);
    color: #FFDE94;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.native-dom-exploration-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    width: 100%;
}

.native-dom-exploration-change-choice-btn {
    min-height: 44px;
    padding: 12px 24px;
    font-family: "Cinzel", "Maitree", Georgia, serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1px solid rgba(197, 160, 89, 0.5);
    color: #DFBA70;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.native-dom-exploration-change-choice-btn:hover {
    background: rgba(197, 160, 89, 0.15);
    border-color: #FFDE94;
    color: #FFDE94;
    transform: translateY(-1px);
}

.native-dom-exploration-event-callout,
.native-dom-exploration-quest-callout {
    border-radius: 4px;
    border: 1px solid var(--ow-outline);
    background: linear-gradient(180deg, #202733 0%, #151A22 100%);
    padding: 18px 22px;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.native-dom-exploration-event-callout {
    border-left: 4px solid var(--ow-secondary, #9E1A1A);
}

.native-dom-exploration-quest-callout {
    border-left: 4px solid var(--ow-primary);
}

.native-dom-exploration-event-callout .native-dom-card-title,
.native-dom-exploration-quest-callout .native-dom-card-title {
    margin: 0;
    font-family: "Cinzel", "Maitree", Georgia, serif;
    font-size: 1.2rem;
    color: var(--ow-primary);
}

.native-dom-exploration-inline-event {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--ow-outline);
}

.native-dom-exploration-open-event-btn,
.native-dom-exploration-quest-preview-btn {
    margin-top: 6px;
    min-height: 40px;
}

.native-dom-exploration-quest-tracked {
    color: var(--ow-primary);
    font-weight: 600;
}

.native-dom-active-quests-section {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.native-dom-active-quest-item {
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--ow-primary) 40%, var(--ow-outline-variant));
    background: color-mix(in srgb, var(--ow-primary) 6%, var(--ow-surface));
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.native-dom-quest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.native-dom-quest-target {
    color: var(--ow-primary);
    font-size: 1rem;
}

.native-dom-quest-destination {
    color: var(--ow-primary);
    font-weight: 500;
}

.native-dom-exploration-checklist {
    border-radius: 4px;
    border: 1px solid var(--ow-outline);
    background: linear-gradient(180deg, #202733 0%, #151A22 100%);
    padding: 16px 20px;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border-left: 4px solid var(--ow-primary);
}

.native-dom-exploration-checklist-list {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.native-dom-exploration-destination-helper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--ow-outline);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.native-dom-exploration-confirmed-destination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(229, 169, 59, 0.08);
    border: 1px solid var(--ow-primary);
    border-radius: 4px;
    padding: 10px 14px;
    gap: 8px;
}

.native-dom-exploration-drawn-result,
.native-dom-exploration-known-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ow-outline);
    border-radius: 4px;
    padding: 10px 14px;
    gap: 8px;
}

.native-dom-exploration-manual-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.native-dom-exploration-manual-input {
    flex: 1;
    min-width: 0;
}

.native-dom-exploration-destination-error {
    margin: 0;
    font-size: 0.875rem;
}


/* 10. Character Picker Dialog & Roster Gallery */
.native-dom-phase-two-choices,
.native-dom-character-choice-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0;
}

.native-dom-character-choice-grid button {
    display: grid;
    min-height: 128px;
    gap: 6px;
    justify-items: center;
    align-content: center;
    text-align: center;
}

.native-dom-picker-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
}

.native-dom-picker-filters button {
    min-height: 40px;
    padding: 0 14px;
}

.native-dom-character-picker-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    gap: 16px;
    align-items: start;
    margin-top: 16px;
}

.native-dom-character-picker {
    display: flex;
    max-height: min(90vh, 820px);
    flex-direction: column;
    overflow: hidden;
}

.native-dom-character-picker > .native-dom-picker-filters {
    flex: 0 0 auto;
}

.native-dom-character-picker > .native-dom-character-picker-layout {
    min-height: 0;
    overflow: auto;
}

.native-dom-picker-gallery {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.native-dom-picker-cell {
    display: grid;
    gap: 4px;
    justify-items: center;
    text-align: center;
}

.native-dom-picker-tile {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-color: var(--ow-outline-variant);
    background: var(--ow-surface);
    padding: 0;
}

.native-dom-picker-tile::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(8, 10, 14, 0.86) 70%, rgba(8, 10, 14, 0.96));
    content: "";
}

.native-dom-picker-card-image {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.native-dom-picker-card-name {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 8px;
    left: 8px;
    color: var(--ow-on-surface);
    font-family: Cinzel, "Trajan Pro", "Maitree", Georgia, serif;
    font-size: clamp(0.78rem, 1.8vw, 1.05rem);
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    transform: translateY(-50%);
}

.native-dom-picker-tile.is-taken,
.native-dom-picker-tile.is-unavailable {
    opacity: 0.55;
}

.native-dom-picker-tile.is-selected {
    border: 2px solid var(--character-accent, var(--ow-primary));
    background: color-mix(in srgb, var(--character-accent, var(--ow-primary)) 12%, var(--ow-surface));
}

.native-dom-picker-status {
    position: absolute;
    z-index: 2;
    right: 8px;
    bottom: 8px;
    left: 8px;
    font: 700 0.62rem monospace;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.native-dom-picker-status.is-selected {
    color: var(--ow-secondary);
}

.native-dom-picker-status.is-taken {
    color: var(--ow-error);
}

.native-dom-picker-status.is-unavailable {
    color: var(--ow-on-surface-variant);
}

.native-dom-picker-status.is-available {
    color: var(--ow-primary);
}

.native-dom-picker-details {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 8px;
    border: 1px solid var(--ow-outline-variant);
    border-radius: 6px;
    background: var(--ow-surface);
    padding: 14px;
}

.native-dom-picker-details.has-character {
    border-color: var(--character-accent, var(--ow-primary));
}

.native-dom-picker-preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.native-dom-picker-preview-symbol {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--character-accent, var(--ow-primary));
    object-fit: cover;
    flex-shrink: 0;
}

.native-dom-picker-preview-title {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.native-dom-picker-badge {
    display: inline-block;
    width: fit-content;
    padding: 2px 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 3px;
    background: color-mix(in srgb, var(--character-accent, var(--ow-primary)) 20%, transparent);
    color: var(--character-accent, var(--ow-primary));
    border: 1px solid color-mix(in srgb, var(--character-accent, var(--ow-primary)) 40%, transparent);
}

.native-dom-picker-school-box,
.native-dom-picker-ability-box,
.native-dom-picker-story-box {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ow-surface) 60%, transparent);
    border-left: 2px solid var(--character-accent, var(--ow-primary));
}

.native-dom-picker-story-box p {
    font-style: italic;
}

.native-dom-picker-empty-notice {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px dashed var(--ow-outline-variant);
    border-radius: 6px;
    background: color-mix(in srgb, var(--ow-surface) 40%, transparent);
    text-align: center;
    margin-top: 8px;
}

.native-dom-picker-hint-note {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--ow-on-surface-variant);
    font-style: italic;
}

.native-dom-picker-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
    background: var(--ow-surface);
    border-top: 1px solid var(--ow-outline-variant);
    padding-top: 12px;
}

.native-dom-tool-trophy-row,
.native-dom-tool-attribute-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.native-dom-tool-trophy-row button,
.native-dom-tool-attribute-row button {
    min-width: 44px;
    min-height: 44px;
}

.native-dom-attribute-level {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.native-dom-trophy-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--ow-surface-variant);
    border: 1px solid var(--ow-outline-variant);
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--ow-primary);
}

.native-dom-trophy-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #1a202a 0%, #12161f 100%);
    border: 1px solid var(--ow-outline);
    border-top: 2px solid rgba(197, 160, 89, 0.4);
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.native-dom-trophy-card:hover {
    border-color: rgba(197, 160, 89, 0.65);
}

.native-dom-trophy-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.native-dom-trophy-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    border-radius: 5px;
    border: 1px solid var(--ow-outline);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--ow-surface-variant);
    color: var(--ow-on-surface-variant);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.18s ease,
                border-color 0.18s ease,
                box-shadow 0.18s ease;
}

.native-dom-trophy-slot:hover {
    border-color: var(--ow-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.native-dom-trophy-slot:active {
    transform: translateY(0);
}

.native-dom-trophy-slot.is-claimed {
    background: linear-gradient(135deg, #382c16 0%, #221a0c 100%);
    border-color: var(--ow-primary);
    color: #ffde94;
    font-weight: 700;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.4), inset 0 1px 0 rgba(255, 222, 148, 0.3);
}

.native-dom-trophy-slot.is-claimed:hover {
    box-shadow: 0 0 16px rgba(197, 160, 89, 0.55), inset 0 1px 0 rgba(255, 222, 148, 0.4);
}

.native-dom-trophy-slot.is-empty {
    opacity: 0.65;
    border-style: dashed;
}

.native-dom-trophy-status {
    font-size: 0.82rem;
    margin: 0;
    padding-top: 2px;
}

.native-dom-trophy-status.is-victory {
    color: #4ade80;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.native-dom-trophy-status.is-fatigue {
    color: var(--ow-secondary-hover, #dfba70);
    font-weight: 500;
}

.native-dom-trophy-status.is-none {
    color: var(--ow-on-surface-variant);
}

/* 11. Tracker Tools (Location & Token Pickers) */
.native-dom-image-frame {
    background: var(--ow-surface);
    object-fit: contain;
}

.native-dom-expansion-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    min-height: 132px;
    object-fit: contain;
    background: var(--ow-surface);
    padding: 10px;
}

.native-dom-expansion-facts.is-single {
    grid-template-columns: 1fr;
}

.native-dom-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
    align-items: stretch;
}

.native-dom-mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 130px;
    border-radius: 8px;
    gap: 8px;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid var(--ow-outline-variant);
    background: var(--ow-surface);
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.native-dom-mode-card:hover {
    border-color: color-mix(in srgb, var(--ow-primary) 60%, var(--ow-outline-variant));
}

.native-dom-mode-card.is-selected {
    border: 2px solid var(--ow-primary);
    background: color-mix(in srgb, var(--ow-primary) 12%, var(--ow-surface));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ow-primary) 35%, transparent);
    height: 130px;
    padding: 12px 10px;
}

.native-dom-mode-icon {
    display: inline-flex;
    width: 88px;
    height: 52px;
    flex: 0 0 auto;
    border: 1px solid var(--ow-outline-variant);
    border-radius: 6px;
    background: color-mix(in srgb, var(--ow-surface-variant) 70%, transparent);
    object-fit: contain;
    padding: 4px;
    box-sizing: border-box;
}

.native-dom-mode-card.is-selected .native-dom-mode-icon {
    width: 88px;
    height: 52px;
    border-color: color-mix(in srgb, var(--ow-primary) 50%, var(--ow-outline-variant));
    background: color-mix(in srgb, var(--ow-surface) 80%, transparent);
    object-fit: contain;
    padding: 4px;
}

.native-dom-mode-card .native-dom-mode-label {
    overflow-wrap: anywhere;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.native-dom-mode-selected-label {
    color: var(--ow-primary);
    font: 700 0.6875rem monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.native-dom-quick-names {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.native-dom-suggestion-chip {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 14px;
}

.native-dom-pacing-dossier {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--ow-surface) 60%, transparent);
    border: 1px solid var(--ow-outline-variant);
}

.native-dom-seats-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.native-dom-seat-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    border-radius: 4px;
    text-align: center;
    gap: 2px;
    border: 1px solid var(--ow-outline-variant);
    background: color-mix(in srgb, var(--ow-surface) 40%, transparent);
}

.native-dom-seat-indicator.is-active {
    border-color: var(--ow-primary);
    background: color-mix(in srgb, var(--ow-primary) 12%, var(--ow-surface));
}

.native-dom-seat-num {
    font-weight: 700;
    font-size: 0.8125rem;
}

.native-dom-seat-status {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ow-muted);
}

.native-dom-seat-indicator.is-active .native-dom-seat-status {
    color: var(--ow-primary);
}

.native-dom-scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
    align-items: stretch;
}

.native-dom-scenario-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px 14px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--ow-surface) 65%, transparent);
    border: 1px solid var(--ow-outline-variant);
    border-top: 3px solid var(--ow-primary);
    box-sizing: border-box;
}

.native-dom-scenario-box-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ow-primary);
    margin-bottom: 6px;
}

.native-dom-scenario-box .native-dom-card-title {
    margin: 0 0 8px;
    font-size: 0.9375rem;
    line-height: 1.3;
    min-height: 2.8em;
    display: flex;
    align-items: center;
}

.native-dom-scenario-box-desc {
    flex: 1;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--ow-muted);
    margin: 0 0 12px;
}

.native-dom-scenario-box-footer {
    font-size: 0.75rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--ow-primary) 85%, white);
    padding-top: 8px;
    border-top: 1px dashed var(--ow-outline-variant);
    margin-top: auto;
}

.native-dom-party-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
    margin-top: 12px;
}

.native-dom-monster-image {
    width: 112px;
    height: 112px;
    border: 1px solid var(--ow-outline-variant);
    border-radius: 8px;
    padding: 6px;
    background: radial-gradient(circle, rgba(158, 26, 26, 0.18) 0%, rgba(20, 24, 31, 0.95) 75%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 0 12px rgba(0, 0, 0, 0.6);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    animation: tokenReveal 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.native-dom-monster-image:hover {
    transform: scale(1.03);
    border-color: var(--ow-primary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 16px rgba(158, 26, 26, 0.3);
}

.native-dom-location-image {
    width: 120px;
    height: 120px;
    border: 1px solid var(--ow-outline-variant);
    border-radius: 6px;
    padding: 6px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.15) 0%, rgba(20, 24, 31, 0.95) 75%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 0 12px rgba(0, 0, 0, 0.6);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    animation: tokenReveal 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.native-dom-location-image:hover {
    transform: scale(1.03);
    border-color: var(--ow-primary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 16px rgba(197, 160, 89, 0.25);
}

.native-dom-step-card.is-recorded {
    background: var(--ow-surface-variant);
}

.native-dom-step-card:not(.is-recorded) {
    background: var(--ow-surface);
}

.native-dom-step-origins {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 10px;
}

.native-dom-step-origin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    border: 1px solid var(--ow-outline-variant);
    border-radius: 4px;
    background: var(--ow-surface-variant);
    padding: 4px 8px 4px 4px;
}

.native-dom-step-origin-image {
    width: 64px;
    height: 48px;
    border-radius: 2px;
    background: var(--ow-surface);
    object-fit: contain;
    padding: 4px;
}

.native-dom-market-preview {
    margin-top: 12px;
    padding: 10px;
    background: var(--ow-surface-variant);
    border: 1px solid var(--ow-outline-variant);
    border-radius: 6px;
}

.native-dom-market-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.native-dom-market-slot-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: var(--ow-surface);
    border: 1px solid var(--ow-outline-variant);
    border-radius: 4px;
    text-align: center;
    gap: 2px;
}

.native-dom-market-slot-modifier {
    font-weight: 700;
    color: var(--ow-primary);
    font-size: 0.9rem;
}

.native-dom-tracker-party-rail {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--ow-surface-container-low, #1e1e1e);
    border: 1px solid var(--ow-outline-variant);
    border-radius: 8px;
    margin-bottom: 16px;
}

.native-dom-tracker-active-player {
    display: grid;
    gap: 12px;
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--ow-surface) 75%, transparent);
    border: 1px solid var(--ow-outline-variant);
    border-left: 4px solid var(--player-accent, var(--ow-primary));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.native-dom-tracker-active-player-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.native-dom-tracker-active-player-artwork {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 12. Round Tracker (Hero Banner, Active Player, Trophy Track, Phase II Actions) */
.native-dom-tracker-active-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.native-dom-active-player-label {
    display: inline-block;
    border: 1px solid var(--player-accent, var(--ow-primary));
    border-radius: 999px;
    background: color-mix(in srgb, var(--player-accent, var(--ow-primary)) 20%, var(--ow-surface));
    color: var(--ow-on-surface);
    padding: 3px 8px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.native-dom-tracker-active-player-identity {
    display: grid;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
}

.native-dom-tracker-active-player-meta {
    display: grid;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--ow-outline-variant);
}

.native-dom-tracker-party-rail-item {
    display: flex;
    flex: 1 1 140px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 8px 16px;
    border: 1px solid color-mix(in srgb, var(--player-accent, var(--ow-outline-variant)) 45%, var(--ow-outline-variant));
    border-radius: 6px;
    background: color-mix(in srgb, var(--player-accent, var(--ow-outline-variant)) 8%, var(--ow-surface));
    color: var(--ow-on-surface-variant);
    opacity: 0.68;
    transition: all 0.2s ease;
}

.native-dom-tracker-party-rail-item.is-active {
    border-color: var(--player-accent, var(--ow-primary));
    background: color-mix(in srgb, var(--player-accent, var(--ow-primary)) 18%, var(--ow-surface-variant));
    color: var(--ow-on-surface);
    opacity: 1;
    box-shadow: 0 0 8px color-mix(in srgb, var(--player-accent, var(--ow-primary)) 25%, transparent);
}

.native-dom-tracker-player-symbol,
.native-dom-tracker-player-trophy {
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    border: 1px solid var(--player-accent, var(--ow-outline));
    border-radius: 6px;
    background: var(--ow-surface);
    object-fit: contain;
    padding: 4px;
}

.native-dom-tracker-party-rail-item .native-dom-tracker-player-symbol {
    width: 48px;
    height: 48px;
}

.native-dom-tracker-character-name {
    color: var(--ow-on-surface-variant);
    font-size: 0.82rem;
    text-align: center;
}

.native-dom-player-status {
    color: var(--ow-on-surface-variant);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.native-dom-active-badge {
    margin-top: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--player-accent, var(--ow-primary));
    text-transform: uppercase;
}

.native-dom-ruleset-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--ow-primary) 8%, var(--ow-surface));
    border: 1px solid color-mix(in srgb, var(--ow-primary) 28%, var(--ow-outline-variant));
    margin-bottom: 16px;
}

.native-dom-ruleset-summary-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.native-dom-tracker-hero {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding: 18px 20px;
    border-radius: 8px;
    border: 1px solid var(--ow-outline-variant);
    background:
        radial-gradient(
            circle at 100% 0%,
            color-mix(in srgb, var(--ow-primary) 12%, transparent),
            transparent 60%
        ),
        var(--ow-surface);
}

.native-dom-tracker-kicker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.native-dom-tracker-trophy-track {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--ow-outline-variant);
}

.native-dom-tracker-trophy-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ow-primary);
}

.native-dom-tracker-trophy-slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.native-dom-tracker-trophy-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 6px;
    text-align: center;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.18s ease,
                border-color 0.18s ease;
}

.native-dom-tracker-trophy-slot.is-claimed {
    border: 1px solid var(--ow-primary);
    background: linear-gradient(135deg, #382c16 0%, #221a0c 100%);
    color: #ffde94;
    transform: scale(1.04);
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.4), inset 0 1px 0 rgba(255, 222, 148, 0.3);
}

.native-dom-tracker-trophy-slot.is-empty {
    border: 1px dashed var(--ow-outline-variant);
    background: color-mix(in srgb, var(--ow-surface) 40%, transparent);
    color: var(--ow-muted);
    opacity: 0.65;
}

.native-dom-trophy-count {
    min-width: 88px;
    color: var(--ow-on-surface);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.native-dom-market-slots {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 10px;
}

.native-dom-market-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border: 1px solid var(--ow-outline-variant);
    border-radius: 6px;
    background: var(--ow-surface);
    text-align: center;
    gap: 3px;
}

.native-dom-market-slot.is-free {
    border-color: var(--ow-primary);
    background: color-mix(in srgb, var(--ow-primary) 15%, var(--ow-surface));
}

.native-dom-market-slot-pos {
    font-size: 0.6875rem;
    color: var(--ow-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.native-dom-market-slot-cost {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ow-on-surface);
}

.native-dom-market-slot.is-free .native-dom-market-slot-cost {
    color: var(--ow-primary);
}

.native-dom-market-helper {
    margin: 4px 0 10px;
    font-size: 0.8125rem;
}

.native-dom-tracker-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
}

.native-dom-tools-speed-dial {
    position: fixed;
    z-index: 20;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(84px, calc(72px + env(safe-area-inset-bottom)));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-width: calc(100vw - 32px - env(safe-area-inset-right));
}

.native-dom-tools-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    display: flex;
    width: min(280px, calc(100vw - 32px - env(safe-area-inset-right)));
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.98);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
    visibility: hidden;
}

.native-dom-tools-menu[hidden] {
    display: none;
}

.native-dom-tools-speed-dial.is-expanded .native-dom-tools-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.native-dom-tools-menu button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 44px;
    min-height: 44px;
    max-width: 100%;
    border-color: var(--ow-outline-variant);
    border-radius: 4px;
    background: var(--ow-surface-elevated);
    color: var(--ow-on-surface);
    overflow-wrap: break-word;
    padding: 8px 14px;
    text-align: left;
    white-space: normal;
}

.native-dom-tool-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
}

.native-dom-tool-label {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: break-word;
    word-break: normal;
}

.native-dom-tools-speed-dial > button {
    display: inline-flex;
    width: 58px;
    min-width: 58px;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    border: 2px solid var(--ow-primary);
    border-radius: 50%;
    background: var(--ow-primary-container);
    color: var(--ow-on-primary-container);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    padding: 0 8px;
}

.native-dom-tools-speed-dial > button:hover:not(:disabled),
.native-dom-tools-speed-dial > button:focus-visible {
    background: var(--ow-primary);
    color: var(--ow-on-primary);
}

.native-dom-phase-instructions {
    margin: 12px 0;
    padding-left: 20px;
    color: var(--ow-on-surface-variant);
    line-height: 1.6;
}

.native-dom-phase-instructions li {
    margin-bottom: 8px;
}

.native-dom-phase-two-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
    align-items: stretch;
}

.native-dom-phase-two-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 108px;
    padding: 16px 12px;
    border-radius: 8px;
    border: 1px solid var(--ow-outline-variant);
    background: var(--ow-surface);
    color: var(--ow-on-surface);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-sizing: border-box;
}

.native-dom-phase-two-btn:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--ow-primary) 60%, var(--ow-outline-variant));
    background: color-mix(in srgb, var(--ow-primary) 8%, var(--ow-surface));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.native-dom-phase-two-btn.is-selected {
    border: 2px solid var(--ow-primary);
    background: color-mix(in srgb, var(--ow-primary) 16%, var(--ow-surface));
    color: var(--ow-primary);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ow-primary) 40%, transparent), 0 4px 14px rgba(0, 0, 0, 0.25);
}

.native-dom-phase-two-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#phase-two-explore::before {
    content: "🧭";
    font-size: 1.85rem;
    margin-bottom: 8px;
    display: block;
    line-height: 1;
}

#phase-two-fight::before {
    content: "⚔️";
    font-size: 1.85rem;
    margin-bottom: 8px;
    display: block;
    line-height: 1;
}

#phase-two-meditate::before {
    content: "🧘";
    font-size: 1.85rem;
    margin-bottom: 8px;
    display: block;
    line-height: 1;
}

.native-dom-phase-two-helper-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--ow-primary) 10%, var(--ow-surface));
    border: 1px solid color-mix(in srgb, var(--ow-primary) 25%, var(--ow-outline-variant));
    color: var(--ow-on-surface);
    font-size: 0.8125rem;
    margin-top: 10px;
}

.native-dom-recorded,
.native-dom-success {
    color: var(--ow-primary);
}

.native-dom-error {
    color: var(--ow-error);
    line-height: 1.5;
}

.native-dom-warning {
    color: var(--ow-on-primary-container);
    line-height: 1.5;
}

.native-dom-issue-row {
    display: grid;
    gap: 8px;
    border-top: 1px solid color-mix(in srgb, var(--ow-on-error-container) 28%, transparent);
    padding: 10px 0;
}

.native-dom-issue-row p {
    margin: 0;
}

.native-dom-warning-action {
    justify-self: start;
}

.native-dom-issue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.native-dom-issue-actions button {
    min-height: 44px;
    border-color: var(--ow-on-error-container);
    color: var(--ow-on-error-container);
}

.native-dom-issues {
    border-color: var(--ow-error-container);
    background: var(--ow-error-container);
}

.native-dom-dialog-backdrop {
    position: fixed;
    z-index: 30;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: dialogBackdropFadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    padding: 20px;
}

.native-dom-dialog:not(.native-dom-exploration-dialog):not(.native-dom-fight-dialog):not(.native-dom-event-card-dialog):not(.native-dom-phase-two-dialog):not(.native-dom-panel):not(.native-dom-trophy-claim-dialog):not(.native-dom-fatigue-dialog):not(.native-dom-vs-modal) {
    width: min(100%, 480px);
}

.native-dom-dialog {
    border: 1px solid var(--ow-outline);
    border-top: 3px solid var(--ow-primary);
    border-radius: 6px;
    background: radial-gradient(ellipse at 50% 0%, #1e2634 0%, #131720 70%, #0c0e13 100%);
    box-shadow: var(--ow-shadow-dialog);
    padding: 22px;
    animation: dialogEntrance 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.native-dom-event-card-dialog {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    overflow-y: auto;
}

.native-dom-event-card-dialog > h2,
.native-dom-event-card-dialog > p {
    margin: 0;
}

.native-dom-event-card-back {
    width: min(100%, 300px);
    align-self: center;
}

.native-dom-quick-select-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0;
}

.native-dom-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.native-dom-chip {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--ow-surface-container, #1e242e);
    color: var(--ow-on-surface);
    border: 1px solid var(--ow-outline);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.18s ease,
                border-color 0.18s ease,
                box-shadow 0.18s ease;
}

.native-dom-chip:hover {
    background: var(--ow-primary);
    color: var(--ow-on-primary);
    border-color: var(--ow-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

.native-dom-chip:active {
    transform: translateY(0);
}

.native-dom-card-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.native-dom-warning-banner {
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    color: #fca5a5;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.native-dom-event-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 579 / 899;
    object-fit: contain;
}

.native-dom-event-card-content {
    width: min(100%, 65ch);
    min-width: 0;
    margin: 0 auto;
    overflow-wrap: anywhere;
}

.native-dom-event-card-title {
    margin: 0 0 8px;
    color: var(--ow-on-surface);
    font-family: "Maitree", Georgia, serif;
    font-size: 1.5rem;
    line-height: 1.2;
}

.native-dom-event-card-choice,
.native-dom-event-card-outcome {
    border-top: 1px solid var(--ow-outline-variant);
    padding: 12px 0 0;
}

.native-dom-event-card-choice + .native-dom-event-card-choice,
.native-dom-event-card-outcome + .native-dom-event-card-outcome {
    margin-top: 12px;
}

.native-dom-event-card-label {
    margin: 0 0 4px;
    color: var(--ow-primary);
    font-family: Cinzel, "Trajan Pro", "Maitree", Georgia, serif;
    font-size: 0.95rem;
}

.native-dom-event-card-choice p,
.native-dom-event-card-outcome p {
    margin: 0 0 8px;
}

.native-dom-event-card-reward {
    color: var(--ow-on-primary-container);
    font-weight: 700;
}

.native-dom-trophy-claim-dialog {
    overflow-y: auto;
}

.native-dom-trophy-claim-dialog > h2,
.native-dom-trophy-claim-dialog > h3,
.native-dom-trophy-claim-dialog > p {
    margin: 0 0 10px;
}

.native-dom-trophy-claim-dialog > .native-dom-actions {
    margin-top: 2px;
}

.native-dom-meditate-attribute-choices {
    display: grid;
    gap: 10px;
    margin: 6px 0 10px;
}

.native-dom-meditate-attribute {
    width: 100%;
}

.native-dom-meditate-attribute:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.native-dom-trophy-instruction {
    color: var(--ow-on-surface);
    font-weight: 700;
}

.native-dom-trophy-score {
    border: 1px solid var(--ow-outline-variant);
    background: var(--ow-surface);
    color: var(--ow-primary);
    font-family: "Maitree", Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 12px 14px;
}

.native-dom-character-picker {
    width: min(100%, 960px);
    max-height: min(100%, 780px);
    box-sizing: border-box;
    overflow: hidden;
}

.native-dom-module-dialog {
    width: min(100%, 560px);
    max-height: min(100%, 720px);
    overflow-y: auto;
}


.native-dom-fatigue-dialog {
    border-color: var(--ow-secondary);
}

.native-dom-fatigue-message {
    border-left: 4px solid var(--ow-secondary);
    background: var(--ow-surface-container-high, #2b2b2b);
    padding: 12px;
    color: var(--ow-on-surface);
    line-height: 1.5;
}

/* 13. System State, Issues & Victory Presentation */
.native-dom-victory-ledger {
    border-color: var(--ow-secondary);
}

.native-dom-victory-banner {
    display: grid;
    gap: 4px;
    border: 1px solid var(--ow-secondary);
    background: var(--ow-surface-container-high, #2b2b2b);
    padding: 18px;
}

.native-dom-victory-label {
    color: var(--ow-secondary);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.native-dom-victory-winner {
    color: var(--ow-on-surface);
    font-family: var(--ow-display-font, serif);
    font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.native-dom-standings {
    display: grid;
    gap: 8px;
    margin: 12px 0 18px;
    padding-left: 28px;
}

.native-dom-standings li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--ow-outline-variant);
    padding: 8px 0;
    color: var(--ow-on-surface-variant);
}

.native-dom-standings li.is-winner {
    color: var(--ow-on-surface);
}

.native-dom-victory-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.native-dom-panel {
    line-height: 1.5;
    overflow-y: auto;
    overflow-wrap: anywhere;
}

.native-dom-panel p,
.native-dom-panel li {
    font-size: 1rem;
    line-height: 1.5;
}

.native-dom-panel button {
    min-height: 48px;
    white-space: normal;
}

.native-dom-panel-close {
    float: right;
    margin: -8px -8px 8px 12px;
}

.native-dom-sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: rgba(10, 16, 15, 0.94);
    background: color-mix(in srgb, var(--ow-background) 94%, transparent);
    border-top: 1px solid var(--ow-outline-variant);
    box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.14);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* 14. Responsive Layout & Media Queries */
@media (max-width: 700px) {
    .native-dom-logo,
    .native-dom-header-subtitle {
        display: none;
    }

    .native-dom-shell {
        width: min(calc(100% - 24px), 960px);
        padding-top: 12px;
    }

    .native-dom-tools-speed-dial {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(88px, calc(76px + env(safe-area-inset-bottom)));
        max-width: calc(100vw - 24px - env(safe-area-inset-right));
    }

    .native-dom-tools-menu {
        width: min(280px, calc(100vw - 24px - env(safe-area-inset-right)));
        max-width: min(280px, calc(100vw - 24px - env(safe-area-inset-right)));
    }

    .native-dom-tools-menu button {
        font-size: 0.78rem;
        letter-spacing: 0.04em;
    }

    .native-dom-expansion-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "manifest" "catalog";
    }

    .native-dom-expansion-card-grid {
        grid-template-columns: 1fr;
    }

    .native-dom-mode-grid,
    .native-dom-scenario-grid {
        grid-template-columns: 1fr;
    }

    .native-dom-expansion-image {
        min-height: 128px;
    }

    .native-dom-monster-image {
        width: 88px;
        height: 88px;
    }

    .native-dom-location-image {
        width: 96px;
        height: 96px;
    }

    .native-dom-table-manifest {
        position: static;
    }

    .native-dom-trail {
        grid-template-columns: repeat(9, minmax(34px, 1fr));
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .native-dom-trail-item {
        min-width: 64px;
    }

    .native-dom-monster-grid {
        grid-template-columns: 1fr;
    }

    .native-dom-phase-two-choices,
    .native-dom-character-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .native-dom-character-picker-layout {
        grid-template-columns: 1fr;
    }

    .native-dom-picker-details {
        position: static;
    }

    .native-dom-step-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .native-dom-actions button {
        flex: 1 1 100%;
    }

    .native-dom-actions.native-dom-sticky-actions button {
        flex: 1 1 0;
    }
}

@media (min-width: 701px) and (max-width: 900px) and (orientation: landscape) {
    .native-dom-monster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (orientation: portrait) {
    .native-dom-expansion-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "manifest" "catalog";
    }

    .native-dom-table-manifest {
        position: static;
    }

    .native-dom-expansion-card-grid {
        grid-template-columns: 1fr;
    }

    .native-dom-monster-grid {
        grid-template-columns: 1fr;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .native-dom-shell {
        padding-top: 8px;
        padding-bottom: 72px;
    }

    .native-dom-header {
        padding-top: 6px;
        padding-bottom: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .native-dom-tools-menu {
        transition: none;
    }
}

.native-dom-vs-modal {
    border: 1px solid var(--ow-outline);
    border-radius: 6px;
    background: var(--ow-surface);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.native-dom-vs-header {
    text-align: center;
    border-bottom: 1px solid var(--ow-outline-variant);
    padding-bottom: 12px;
}

.native-dom-vs-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--ow-primary);
}

.native-dom-vs-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
}

.native-dom-vs-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--ow-surface-variant);
    border-radius: 4px;
    text-align: center;
    gap: 12px;
}

.native-dom-vs-role {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ow-outline);
}

.native-dom-vs-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--ow-on-surface);
}

.native-dom-vs-character {
    font-size: 1rem;
    color: var(--ow-secondary);
}

.native-dom-vs-trophies {
    font-size: 0.9rem;
    color: var(--ow-on-surface-variant);
}

.native-dom-vs-win-btn {
    width: 100%;
}

.native-dom-vs-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.native-dom-vs-label {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ow-primary);
    background: var(--ow-background);
    border: 1px solid var(--ow-outline-variant);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.native-dom-vs-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.native-dom-defender-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.native-dom-defender-choice {
    width: 100%;
    text-align: left;
}

.native-dom-fight-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.native-dom-fight-win {
    background-color: var(--ow-primary);
    color: var(--ow-on-primary);
}

.native-dom-fight-loss {
    border-color: var(--ow-error);
    color: var(--ow-error);
}

.native-dom-fight-outcome-container {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--ow-outline-variant);
}

@media (max-width: 600px) {
    .native-dom-vs-layout {
        flex-direction: column;
    }
    .native-dom-vs-center {
        margin: 8px 0;
    }
    .native-dom-explore-deck-choices {
        grid-template-columns: 1fr;
    }
    .native-dom-dialog.native-dom-exploration-dialog,
    .native-dom-exploration-dialog,
    .native-dom-dialog.native-dom-phase-two-dialog,
    .native-dom-phase-two-dialog,
    .native-dom-dialog.native-dom-fight-dialog,
    .native-dom-fight-dialog,
    .native-dom-dialog.native-dom-trophy-claim-dialog,
    .native-dom-trophy-claim-dialog,
    .native-dom-dialog.native-dom-fatigue-dialog,
    .native-dom-fatigue-dialog,
    .native-dom-dialog.native-dom-vs-modal,
    .native-dom-vs-modal {
        width: 60vw !important;
        max-width: 60vw !important;
        padding: 18px 16px;
    }

    .native-dom-dialog-backdrop {
        padding: max(12px, env(safe-area-inset-top))
                 max(12px, env(safe-area-inset-right))
                 max(12px, env(safe-area-inset-bottom))
                 max(12px, env(safe-area-inset-left));
    }

    .native-dom-dialog.native-dom-panel,
    .native-dom-panel {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100%;
        padding: 16px;
    }

    .native-dom-panel .native-dom-actions:not(.native-dom-sticky-actions) {
        flex-direction: column;
    }

    .native-dom-panel .native-dom-actions:not(.native-dom-sticky-actions) button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .native-dom-exploration-counts {
        grid-template-columns: 1fr;
    }

    .native-dom-exploration-dialog {
        padding: 16px;
    }

    .native-dom-fight-monster-choice {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .native-dom-fight-monster-choice .native-dom-monster-image {
        width: 56px;
        height: 56px;
    }
}

.native-dom-phase-one-mount-card {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--ow-primary) 35%, var(--ow-outline-variant));
    background: color-mix(in srgb, var(--ow-primary) 5%, var(--ow-surface));
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.native-dom-lost-mount-phase-btn {
    align-self: flex-start;
    margin-top: 4px;
}

.native-dom-mount-drawn-tokens-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.native-dom-mount-token-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--ow-outline-variant);
    background: var(--ow-surface-container);
}

.native-dom-mount-token-choice .native-dom-location-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
