/* Direction A — Classic Fields tokens */
:root {
    --bt-bg: #EDE4D3;
    --bt-surface: #F7F1E5;
    --bt-surface-variant: #E2D6C2;
    --bt-primary: #5C6B3A;
    --bt-secondary: #A67C52;
    --bt-tertiary: #8B5E3C;
    --bt-appbar: #3D2B1F;
    --bt-text: #2C2416;
    --bt-text-muted: #5C5346;
    --bt-border: #D4C4A8;
    --bt-wood: #5D8A4A;
    --bt-clay: #C4784A;
    --bt-iron: #7A8494;
    --bt-crop: #C9A227;
}

html, body {
    font-family: "Source Sans 3", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background: var(--bt-bg);
    color: var(--bt-text);
}

/* Brand / shell */
.bt-brand-title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif !important;
    letter-spacing: 0.02em;
    font-weight: 600 !important;
}

.bt-main {
    max-width: 1280px;
    margin: 0 auto;
}

.bt-nav-btn {
    text-transform: none;
    letter-spacing: 0.01em;
}

.bt-player-chip {
    border-color: rgba(247, 241, 229, 0.45) !important;
    color: #F7F1E5 !important;
    background: rgba(247, 241, 229, 0.08) !important;
}

.bt-logout-btn {
    border-color: rgba(247, 241, 229, 0.55) !important;
    color: #F7F1E5 !important;
    text-transform: none;
}

.bt-nav-drawer {
    background: var(--bt-surface) !important;
}

/* Cards & sections */
.bt-card {
    background: var(--bt-surface);
    border: 1px solid var(--bt-border);
    border-radius: 8px;
    padding: 1rem;
}

.bt-section-title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 600;
    color: var(--bt-text);
    margin: 0 0 0.75rem 0;
    letter-spacing: 0.01em;
}

/* Resource accents (left border) */
.bt-resource-wood,
.bt-resource-clay,
.bt-resource-iron,
.bt-resource-crop {
    background: var(--bt-surface);
    border: 1px solid var(--bt-border);
    border-radius: 8px;
    border-left-width: 4px;
    padding: 0.75rem 1rem;
}

.bt-resource-wood { border-left-color: var(--bt-wood); }
.bt-resource-clay { border-left-color: var(--bt-clay); }
.bt-resource-iron { border-left-color: var(--bt-iron); }
.bt-resource-crop { border-left-color: var(--bt-crop); }

/* Auth shell stub (UI-2 will flesh out) */
.bt-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(92, 107, 58, 0.18), transparent 55%),
        radial-gradient(ellipse at 70% 80%, rgba(166, 124, 82, 0.2), transparent 50%),
        linear-gradient(160deg, #c8b896 0%, var(--bt-bg) 45%, #d4c4a0 100%);
}

/* World event banner */
.bt-event-banner {
    border: 1px solid var(--bt-border) !important;
    border-left: 4px solid var(--bt-secondary) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

/* Loading (Blazor bootstrap) */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 0;
    margin: auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--bt-surface-variant);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--bt-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 600;
    color: var(--bt-text);
    inset: calc(50% - 1.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

#blazor-error-ui {
    background: #f5e6a8;
    color: var(--bt-text);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(44, 36, 22, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Map canvas foundation (UI-4 extends below) */
.map-canvas-wrap {
    position: relative;
    width: 100%;
    height: min(72vh, 720px);
    min-height: 420px;
    overflow: hidden;
    background: #d9ccb0;
    border-radius: 4px;
    touch-action: none;
}

.map-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
}

.map-canvas:active {
    cursor: grabbing;
}

/* === UI-2 auth === */
/* Extends .bt-auth-shell stub from UI-0/1 (fields-at-dusk gradient). */
.bt-auth-shell {
    box-sizing: border-box;
    width: 100%;
    min-height: 100dvh;
    /* Stronger dusk field layers on top of UI-0 base gradients */
    background:
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(61, 43, 31, 0.22), transparent 55%),
        radial-gradient(ellipse at 25% 15%, rgba(92, 107, 58, 0.28), transparent 50%),
        radial-gradient(ellipse at 78% 75%, rgba(166, 124, 82, 0.28), transparent 48%),
        radial-gradient(ellipse at 50% 40%, rgba(201, 162, 39, 0.08), transparent 60%),
        linear-gradient(165deg, #b8a57a 0%, #c8b896 22%, var(--bt-bg) 52%, #c4b48a 78%, #a89068 100%);
}

.bt-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bt-surface) !important;
    border: 1px solid var(--bt-border);
    border-radius: 8px;
    box-shadow:
        0 1px 0 rgba(247, 241, 229, 0.65) inset,
        0 8px 28px rgba(44, 36, 22, 0.14);
}

.bt-auth-brand {
    text-align: center;
}

.bt-auth-brand-icon {
    color: var(--bt-secondary) !important;
    font-size: 2rem !important;
    margin-bottom: 0.35rem;
}

.bt-auth-title {
    color: var(--bt-appbar) !important;
    line-height: 1.25 !important;
    margin-bottom: 0.25rem !important;
}

.bt-auth-subtitle {
    color: var(--bt-text-muted) !important;
}

.bt-auth-submit {
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.02em;
    min-height: 2.75rem;
}

@media (max-width: 360px) {
    .bt-auth-shell {
        padding: 1rem 0.75rem;
    }

    .bt-auth-card {
        max-width: 100%;
    }

    .bt-auth-title {
        font-size: 1.35rem !important;
    }
}

/* === PR-R3 register sector wizard === */
.bt-auth-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.bt-auth-step {
    color: var(--bt-text-muted);
    font-weight: 500;
}

.bt-auth-step-active {
    color: var(--bt-appbar);
    font-weight: 700;
}

.bt-auth-step-sep {
    color: var(--bt-border);
}

.bt-auth-sector-help {
    display: block;
    line-height: 1.4;
}

/* Name-position grid: NW NE / SW SE / Random full width — not enum order */
.bt-auth-sector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.bt-auth-sector-btn {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 2.75rem;
    padding: 0.65rem 0.5rem;
    margin: 0;
    border: 1px solid var(--bt-border);
    border-radius: 6px;
    background: var(--bt-surface-variant);
    color: var(--bt-text);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition:
        border-color 0.12s ease,
        background 0.12s ease,
        box-shadow 0.12s ease;
}

.bt-auth-sector-btn:hover:not(:disabled) {
    border-color: var(--bt-secondary);
    background: var(--bt-surface);
}

.bt-auth-sector-btn:focus-visible {
    outline: 2px solid var(--bt-primary);
    outline-offset: 2px;
}

.bt-auth-sector-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.bt-auth-sector-btn-selected {
    border-color: var(--bt-secondary);
    background: var(--bt-surface);
    box-shadow:
        0 0 0 1px var(--bt-secondary),
        0 2px 8px rgba(166, 124, 82, 0.22);
    font-weight: 600;
}

.bt-auth-sector-code {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--bt-appbar);
}

.bt-auth-sector-label {
    font-size: 0.78rem;
    color: var(--bt-text-muted);
    text-align: center;
    line-height: 1.25;
}

.bt-auth-sector-btn-selected .bt-auth-sector-label {
    color: var(--bt-text);
}

.bt-auth-sector-random {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 0.4rem;
    min-height: 2.75rem;
}

.bt-auth-sector-random .bt-auth-sector-label {
    font-size: 0.9rem;
}

/* Spawn-preview candidate chips (coords only; PR-R4) */
.bt-auth-candidates-label {
    display: block;
    line-height: 1.4;
}

.bt-auth-candidate-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.bt-auth-candidate-chip {
    box-sizing: border-box;
    min-height: 2.25rem;
    min-width: 4.5rem;
    padding: 0.35rem 0.65rem;
    margin: 0;
    border: 1px solid var(--bt-border);
    border-radius: 999px;
    background: var(--bt-surface-variant);
    color: var(--bt-text);
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition:
        border-color 0.12s ease,
        background 0.12s ease,
        box-shadow 0.12s ease;
}

.bt-auth-candidate-chip:hover:not(:disabled) {
    border-color: var(--bt-secondary);
    background: var(--bt-surface);
}

.bt-auth-candidate-chip:focus-visible {
    outline: 2px solid var(--bt-primary);
    outline-offset: 2px;
}

.bt-auth-candidate-chip:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.bt-auth-candidate-chip-selected {
    border-color: var(--bt-secondary);
    background: var(--bt-surface);
    box-shadow:
        0 0 0 1px var(--bt-secondary),
        0 2px 6px rgba(166, 124, 82, 0.2);
    font-weight: 600;
}

/* === UI-3 village === */
.bt-page-header {
    margin-bottom: 0.75rem;
}

.bt-page-title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    color: var(--bt-text);
}

.bt-coords-chip {
    border-color: var(--bt-border) !important;
    background: var(--bt-surface-variant) !important;
    color: var(--bt-text) !important;
}

.bt-page-header-link {
    color: var(--bt-primary) !important;
    font-weight: 600;
    text-decoration: none;
}

.bt-page-header-link:hover {
    text-decoration: underline;
}

.bt-resource-strip .mud-paper {
    min-height: 100%;
}

.bt-res-bar {
    border-radius: 4px;
    height: 6px !important;
    background: var(--bt-surface-variant) !important;
}

.bt-res-bar .mud-progress-linear-bar {
    border-radius: 4px;
}

.bt-res-bar-wood .mud-progress-linear-bar { background-color: var(--bt-wood) !important; }
.bt-res-bar-clay .mud-progress-linear-bar { background-color: var(--bt-clay) !important; }
.bt-res-bar-iron .mud-progress-linear-bar { background-color: var(--bt-iron) !important; }
.bt-res-bar-crop .mud-progress-linear-bar { background-color: var(--bt-crop) !important; }

.bt-status-banner {
    border: 1px solid var(--bt-border) !important;
    border-left: 4px solid var(--bt-primary) !important;
    border-radius: 8px !important;
    background: var(--bt-surface) !important;
}

.bt-village-tabs {
    background: transparent;
}

.bt-village-tabs .mud-tabs-toolbar {
    background: var(--bt-surface);
    border: 1px solid var(--bt-border);
    border-radius: 8px;
    min-height: 44px;
}

.bt-village-tabs .mud-tab {
    text-transform: none;
    min-height: 44px;
    font-weight: 600;
    color: var(--bt-text-muted);
}

.bt-village-tabs .mud-tab.mud-tab-active {
    color: var(--bt-primary);
}

.bt-overview-row {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--bt-border);
}

.bt-overview-row:last-child {
    border-bottom: none;
}

.bt-build-table {
    background: transparent;
}

.bt-train-card {
    background: var(--bt-surface);
    border: 1px solid var(--bt-border);
    border-radius: 8px;
}

/* Army tab — read-only training status + recruit guide (no inline Train) */
.bt-army-train-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.bt-army-train-list__job {
    padding: 0.5rem 0.65rem;
    background: var(--bt-surface);
    border: 1px solid var(--bt-border);
    border-radius: 8px;
}

.bt-army-recruit-guide {
    margin: 0;
    padding-left: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    line-height: 1.45;
}

.bt-move-toggle {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.bt-touch-btn {
    min-height: 36px;
    min-width: 88px;
}

.bt-hero-card .bt-hero-hp {
    border-radius: 4px;
    max-width: 28rem;
}

/* === UI-5 social === */
.bt-page-header {
    gap: 0.5rem 1rem;
}

.bt-page-title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    color: var(--bt-text);
    margin: 0 !important;
}

.bt-page-subtitle {
    margin-top: 0.15rem !important;
    color: var(--bt-text-muted) !important;
}

.bt-page-header__actions .mud-button-root {
    text-transform: none;
}

.bt-card--inset {
    background: var(--bt-surface-variant);
    border-style: dashed;
    padding: 0.85rem 1rem;
}

.bt-social-table .mud-table-head {
    background: rgba(226, 214, 194, 0.45);
}

.bt-social-table .mud-table-row:hover {
    background: rgba(92, 107, 58, 0.06);
}

/* Role chips: Leader gold, Officer clay, Member muted (Mud Color + fallbacks) */
.bt-role-chip.mud-chip-color-warning {
    background: #C4A35A !important;
    color: #2C2416 !important;
}

.bt-role-chip.mud-chip-color-secondary {
    background: rgba(166, 124, 82, 0.28) !important;
    color: var(--bt-text) !important;
}

.bt-role-chip.mud-chip-color-default {
    background: var(--bt-surface-variant) !important;
    color: var(--bt-text-muted) !important;
}

/* Inbox unread: primary olive left border + weight */
.bt-inbox-table .mud-table-row {
    cursor: pointer;
}

.bt-inbox-row--unread > td:first-child,
.bt-inbox-table tbody tr.bt-inbox-row--unread td:first-child {
    box-shadow: inset 4px 0 0 var(--bt-primary);
}

.bt-inbox-row--unread {
    font-weight: 600;
    background: rgba(92, 107, 58, 0.05);
}

.bt-inbox-unread-dot {
    color: var(--bt-primary);
    font-size: 0.75rem;
}

/* Battle report victory / defeat strips */
.bt-report-detail {
    border-left-width: 4px;
    border-left-style: solid;
    padding: 1rem 1.15rem 1.15rem;
}

.bt-report-detail--victory {
    border-left-color: #5C8A4A;
    background: linear-gradient(90deg, rgba(92, 138, 74, 0.08), var(--bt-surface) 28%);
}

.bt-report-detail--defeat {
    border-left-color: #A65A4A;
    background: linear-gradient(90deg, rgba(166, 90, 74, 0.1), var(--bt-surface) 28%);
}

.bt-report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.bt-report-head__titles {
    min-width: 0;
    flex: 1 1 12rem;
}

.bt-report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-bottom: 0.85rem;
}

.bt-report-meta__item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 6rem;
}

.bt-report-meta__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a7355;
    font-weight: 600;
}

.bt-report-meta__value {
    font-size: 0.92rem;
    font-weight: 600;
    color: #2c2416;
}

.bt-report-power {
    margin: 0.25rem 0 0.5rem;
}

.bt-report-power__labels {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    font-size: 0.82rem;
    color: #5c5346;
    margin-bottom: 0.35rem;
}

.bt-report-power__track {
    display: flex;
    height: 0.55rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(166, 90, 74, 0.35);
    border: 1px solid var(--bt-border);
}

.bt-report-power__att {
    height: 100%;
    background: linear-gradient(90deg, #6a8f4e, #5C8A4A);
    min-width: 0;
    transition: width 0.25s ease;
}

.bt-report-sides {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 720px) {
    .bt-report-sides {
        grid-template-columns: 1fr 1fr;
    }
}

.bt-report-side {
    padding: 0.65rem 0.75rem;
    background: rgba(247, 241, 229, 0.75);
    border: 1px solid #d4c4a8;
    border-radius: 10px;
}

.bt-report-side__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.bt-report-side__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c2416;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bt-report-side__you {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(122, 90, 48, 0.12);
    color: #7a5a30;
}

.bt-report-side__totals {
    font-size: 0.75rem;
}

.bt-report-side__empty {
    margin: 0;
    font-size: 0.85rem;
    color: #8a7355;
}

.bt-report-units {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.bt-report-units th {
    text-align: left;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a7355;
    font-weight: 600;
    padding: 0.2rem 0.35rem 0.35rem 0;
    border-bottom: 1px solid #d4c4a8;
}

.bt-report-units th:not(:first-child),
.bt-report-units td:not(:first-child) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.bt-report-units td {
    padding: 0.3rem 0.35rem 0.3rem 0;
    border-bottom: 1px solid rgba(212, 196, 168, 0.45);
    color: #2c2416;
}

.bt-report-units tr:last-child td {
    border-bottom: none;
}

.bt-report-units__lost td {
    background: rgba(166, 90, 74, 0.06);
}

.bt-report-list-summary {
    max-width: 18rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-report-place {
    font-weight: 600;
    color: #2c2416;
}

.bt-report-place-coords {
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.bt-report-row--victory > td:first-child,
.bt-reports-table tbody tr.bt-report-row--victory td:first-child {
    box-shadow: inset 3px 0 0 #5C8A4A;
}

.bt-report-row--defeat > td:first-child,
.bt-reports-table tbody tr.bt-report-row--defeat td:first-child {
    box-shadow: inset 3px 0 0 #A65A4A;
}

.bt-report-row--unread {
    font-weight: 600;
}

.bt-text-victory {
    color: #4A7A3A;
    font-weight: 600;
}

.bt-text-defeat {
    color: #A65A4A;
    font-weight: 600;
}

/* Loot resource text accents (pair with UI-0 resource border colors) */
.bt-loot-row {
    padding: 0.55rem 0.75rem;
    background: rgba(226, 214, 194, 0.35);
    border-radius: 8px;
    border: 1px solid var(--bt-border);
}

.bt-loot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.bt-loot-item {
    font-weight: 600;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.bt-text-wood { color: var(--bt-wood); }
.bt-text-clay { color: var(--bt-clay); }
.bt-text-iron { color: var(--bt-iron); }
.bt-text-crop { color: var(--bt-crop); }

/* Scout detail surface */
.bt-scout-detail {
    border-left: 4px solid var(--bt-secondary);
    padding: 1rem 1.15rem 1.15rem;
}

.bt-scout-payload {
    white-space: pre-wrap;
    word-break: break-all;
    display: block;
    padding: 0.5rem 0.75rem;
    background: rgba(226, 214, 194, 0.35);
    border-radius: 6px;
    border: 1px solid var(--bt-border);
    margin-top: 0.35rem;
}

/* === UI-6 polish === */
.bt-brand-mark {
    display: block;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.bt-section-card {
    margin-bottom: 1rem;
}

.bt-section-card__header .bt-section-title {
    margin-bottom: 0;
}

.bt-empty-state {
    border-style: dashed;
}

.bt-loading {
    display: block;
    margin: 2rem auto;
}

/* Loading progress (index.html splash) — olive ring */
.loading-progress circle:last-child {
    stroke: var(--bt-primary, #5C6B3A);
}

/* === Classic village overview v2 (fix broken absolute-hex layout) === */

/* Wood resource bar — horizontal strip */
.bt-res-bar-strip {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 0.85rem;
    background: linear-gradient(180deg, #5a3f2a 0%, #3d2b1f 55%, #2f2118 100%);
    border: 2px solid #2a1c14;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.12), 0 3px 8px rgba(44, 36, 22, 0.25);
    padding: 0.5rem 0.65rem;
    overflow-x: auto;
}

.bt-res-bar-strip__inner {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.45rem;
}

.bt-res-pill {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 8.5rem;
    min-width: 8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    background: linear-gradient(180deg, #f3e8d4 0%, #e6d7bc 100%);
    border: 1px solid #c9b896;
    color: #2c2416;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    box-sizing: border-box;
}

.bt-res-pill__emoji {
    font-size: 1.05rem;
    line-height: 1;
}

.bt-res-pill__amt {
    font-variant-numeric: tabular-nums;
}

.bt-res-pill__rate {
    color: #3f6b45;
    font-size: 0.72rem;
    font-weight: 700;
}

.bt-res-pill__bonus {
    color: #6b4f1d;
    background: linear-gradient(180deg, #f5e6b8 0%, #e8d48b 100%);
    border: 1px solid #c9a227;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.05rem 0.35rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.bt-res-pill__cap {
    color: #5c5346;
    font-size: 0.72rem;
    font-weight: 500;
}

.bt-res-pill--upkeep {
    flex: 0 1 auto;
    min-width: auto;
    background: linear-gradient(180deg, #f0e0d0 0%, #e2cfc0 100%);
}

.bt-res-pill--upkeep .bt-res-pill__amt {
    color: #9b3b2e;
}

.bt-res-pill--cranny {
    flex: 0 1 auto;
    min-width: auto;
    background: linear-gradient(180deg, #e0dcd4 0%, #cfc8bc 100%);
}

.bt-res-pill--cranny .bt-res-pill__amt {
    color: #4a4438;
    font-size: 0.78rem;
}

/* Overview: board left, hero right */
.bt-overview-classic {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    width: 100%;
}

@media (min-width: 900px) {
    .bt-overview-classic {
        flex-direction: row;
        align-items: flex-start;
    }

    .bt-overview-classic__board {
        flex: 1 1 auto;
        min-width: 0;
    }

    .bt-overview-classic__side {
        flex: 0 0 260px;
        width: 260px;
        max-width: 260px;
    }
}

.bt-overview-classic__side {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Parchment field board */
.bt-village-board {
    box-sizing: border-box;
    width: 100%;
    background: linear-gradient(165deg, #f3ead8 0%, #e8dcc4 45%, #d9ccb0 100%);
    border: 3px solid #3d2b1f;
    border-radius: 14px;
    box-shadow:
        inset 0 0 0 1px #a67c52,
        0 6px 18px rgba(44, 36, 22, 0.16);
    padding: 0.75rem;
    position: relative;
}

/* Construction ribbon */
.bt-build-ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    margin: 0 auto 0.85rem;
    max-width: 36rem;
    padding: 0.5rem 0.85rem;
    background: linear-gradient(180deg, #6b7d45 0%, #5c6b3a 100%);
    color: #f7f1e5;
    border-radius: 8px;
    border: 1px solid #3d2b1f;
    box-shadow: 0 2px 6px rgba(44, 36, 22, 0.25);
    font-size: 0.85rem;
}

.bt-build-ribbon__icon { color: #f0e6c8 !important; }
.bt-build-ribbon__text { flex: 1 1 auto; min-width: 10rem; }
.bt-build-ribbon__pct { font-weight: 700; font-variant-numeric: tabular-nums; }

.bt-build-ribbon__track {
    flex: 1 1 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    overflow: hidden;
}

.bt-build-ribbon__fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a227, #e8d48b);
    border-radius: 4px;
}

/* Dense building tile grid */
.bt-tile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 520px) {
    .bt-tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bt-tile-cell {
        grid-row: auto !important;
        grid-column: auto !important;
        max-width: none !important;
    }
}

.bt-tile-cell {
    min-width: 0;
}

.bt-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    width: 100%;
    min-height: 5.5rem;
    margin: 0;
    padding: 0.55rem 0.35rem;
    border: 2px solid #3d2b1f;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(44, 36, 22, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: #2c2416;
    font-family: "Source Sans 3", Roboto, Helvetica, Arial, sans-serif;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    box-sizing: border-box;
}

.bt-tile--clickable:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(44, 36, 22, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.bt-tile--locked,
.bt-tile:disabled {
    cursor: default;
    opacity: 0.95;
}

.bt-tile--busy {
    outline: 3px solid #c9a227;
    outline-offset: 1px;
    box-shadow: 0 0 12px rgba(201, 162, 39, 0.55);
}

.bt-tile__icon {
    font-size: 1.35rem;
    line-height: 1;
}

.bt-tile__name {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bt-tile__level {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.92;
}

.bt-tile__timer {
    font-size: 0.65rem;
    font-weight: 700;
    color: #5c3a10;
    background: rgba(247, 241, 229, 0.9);
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-tile__hint {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(44, 36, 22, 0.75);
}

.bt-village-board__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.bt-pop-chip,
.bt-upkeep-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: #5c5346;
    background: rgba(247, 241, 229, 0.9);
    border: 1px solid #d4c4a8;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}

/* Hero side card */
.bt-hero-panel {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    background: linear-gradient(180deg, #f7f1e5 0%, #ebe0cc 100%);
    border: 2px solid #3d2b1f;
    border-radius: 10px;
    padding: 0.85rem 0.9rem 1rem;
    box-shadow: inset 0 0 0 1px #c9b896, 0 4px 12px rgba(44, 36, 22, 0.15);
}

.bt-hero-panel__seal {
    position: absolute;
    top: 0.5rem;
    right: 0.55rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #d4a84b, #8b5e3c);
    border: 2px solid #3d2b1f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.bt-hero-panel__eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5c5346;
    font-weight: 600;
}

.bt-hero-panel__title,
.bt-hero-panel__name {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: #2c2416;
    margin: 0.15rem 0 0.65rem;
    padding-right: 1.6rem;
    line-height: 1.2;
}

.bt-hero-panel__portrait {
    position: relative;
    width: 100%;
    height: 140px;
    margin: 0 0 0.75rem;
    border-radius: 8px;
    border: 2px solid #3d2b1f;
    background: linear-gradient(145deg, #8fa86a 0%, #5c6b3a 55%, #3d4a28 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bt-hero-panel__avatar {
    font-size: 3.5rem;
    line-height: 1;
    opacity: 0.85;
}

.bt-hero-panel__trait-badge {
    position: absolute;
    bottom: 0.4rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(61, 43, 31, 0.88);
    color: #f7f1e5;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.bt-hero-panel__hp-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #2c2416;
    margin-bottom: 0.25rem;
}

.bt-hero-panel__heart { color: #9b3b2e; }

.bt-hero-panel__hp-track {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #e2d6c2;
    border: 1px solid #d4c4a8;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.bt-hero-panel__hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #9b3b2e, #c45a4a);
    border-radius: 5px;
    min-width: 2px;
}

.bt-hero-panel__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.55rem;
    margin-bottom: 0.65rem;
}

.bt-hero-stat {
    display: flex;
    flex-direction: column;
    background: rgba(226, 214, 194, 0.55);
    border-radius: 6px;
    padding: 0.3rem 0.45rem;
    border: 1px solid #d4c4a8;
}

.bt-hero-stat__label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5c5346;
}

.bt-hero-stat__value {
    font-weight: 700;
    font-size: 0.9rem;
    color: #2c2416;
}

.bt-hero-panel__muted {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: #5c5346;
}

.bt-hero-panel__btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid #3d2b1f;
    border-radius: 8px;
    background: linear-gradient(180deg, #6b7d45 0%, #5c6b3a 100%);
    color: #f7f1e5;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.bt-hero-panel__btn:hover {
    filter: brightness(1.06);
}

/* Garrison mini under hero */
.bt-garrison-mini {
    box-sizing: border-box;
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: #f7f1e5;
    border: 1px solid #d4c4a8;
    border-radius: 8px;
}

.bt-garrison-mini__title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #2c2416;
    margin-bottom: 0.45rem;
}

.bt-garrison-mini__row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #2c2416;
    padding: 0.2rem 0;
    border-bottom: 1px solid #e2d6c2;
}

.bt-garrison-mini__row:last-of-type {
    border-bottom: none;
}

.bt-garrison-mini__empty {
    margin: 0;
    font-size: 0.8rem;
    color: #5c5346;
}

.bt-garrison-mini__link {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0;
    border: none;
    background: none;
    color: #5c6b3a;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
}

.bt-garrison-mini__link:hover {
    text-decoration: underline;
}

/* Training ribbon (matches construction bar math) */
.bt-train-ribbons {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bt-train-ribbons__meta {
    font-size: 0.8rem;
    color: var(--mud-palette-text-secondary, #5c4a3a);
    padding: 0 0.15rem;
}

.bt-train-ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    padding: 0.45rem 0.85rem;
    background: linear-gradient(180deg, #6b8cae 0%, #4a6fa5 100%);
    color: #f7f1e5;
    border-radius: 8px;
    border: 1px solid #3d2b1f;
    font-size: 0.85rem;
}

.bt-train-ribbon__text { flex: 1 1 auto; min-width: 10rem; }
.bt-train-ribbon__pct { font-weight: 700; font-variant-numeric: tabular-nums; }

.bt-train-ribbon__track {
    flex: 1 1 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    overflow: hidden;
}

.bt-train-ribbon__fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a227, #e8d48b);
    border-radius: 4px;
    transition: width 0.4s linear;
}

.bt-build-ribbon__fill {
    transition: width 0.4s linear;
}

/* Hero trait sprites */
.bt-hero-sprite {
    position: relative;
    display: inline-block;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #3d2b1f;
    box-shadow: 0 3px 10px rgba(44, 36, 22, 0.22);
    background: #3d4a28;
}

.bt-hero-sprite__img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
}

.bt-hero-sprite__badge {
    position: absolute;
    bottom: 0.4rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(61, 43, 31, 0.9);
    color: #f7f1e5;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.2;
}

.bt-hero-panel__portrait-wrap {
    width: 100%;
    margin: 0 0 0.75rem;
}

.bt-hero-panel__portrait-wrap .bt-hero-sprite__img {
    width: 100%;
    height: auto;
}

/* Remove old portrait box if still referenced */
.bt-hero-panel__portrait {
    display: none;
}

/* === Classic hex map (mockup 05) === */
.bt-map-page {
    width: 100%;
    max-width: 100%;
}

.bt-map-page__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}

.bt-map-page__title {
    margin: 0;
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: #2c2416;
}

.bt-map-page__hint {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: #5c5346;
}

.bt-map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    padding: 0.4rem 0.65rem;
    background: linear-gradient(180deg, #f3ead8, #e6d7bc);
    border: 1px solid #c9b896;
    border-radius: 8px;
}

.bt-map-legend__title {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5c5346;
    margin-right: 0.25rem;
}

.bt-map-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2c2416;
}

.bt-map-legend__swatch {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 1px solid #3d2b1f;
    display: inline-block;
}

.bt-map-stage {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: stretch;
}

@media (min-width: 960px) {
    .bt-map-stage {
        flex-direction: row;
        align-items: stretch;
    }

    .bt-map-scroll {
        flex: 0 0 280px;
        width: 280px;
        max-width: 280px;
    }

    .bt-map-viewport {
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* Scroll / parchment tile panel */
.bt-map-scroll {
    box-sizing: border-box;
    background:
        linear-gradient(90deg, rgba(61,43,31,0.06), transparent 12px),
        linear-gradient(180deg, #f7f1e5 0%, #ebe0cc 100%);
    border: 3px solid #3d2b1f;
    border-radius: 6px 14px 14px 6px;
    box-shadow:
        inset 0 0 0 1px #a67c52,
        0 4px 14px rgba(44, 36, 22, 0.16);
    position: relative;
}

.bt-map-scroll::before,
.bt-map-scroll::after {
    content: "";
    position: absolute;
    left: 0.55rem;
    right: 0.55rem;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        #8b5e3c 0 6px,
        #a67c52 6px 12px
    );
    border-radius: 4px;
    opacity: 0.55;
    pointer-events: none;
}
.bt-map-scroll::before { top: 0.4rem; }
.bt-map-scroll::after { bottom: 0.4rem; }

.bt-map-scroll__inner {
    padding: 1.35rem 1rem 1rem;
}

.bt-map-scroll__title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #2c2416;
    margin-bottom: 0.65rem;
    text-align: center;
    letter-spacing: 0.04em;
}

.bt-map-scroll__coords {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c5346;
    text-align: center;
    margin-bottom: 0.35rem;
}

.bt-map-scroll__village {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: #2c2416;
    text-align: center;
    margin-bottom: 0.55rem;
}

.bt-map-scroll__meta {
    font-size: 0.88rem;
    color: #2c2416;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.65rem;
    padding: 0.5rem 0.6rem;
    background: rgba(226, 214, 194, 0.45);
    border: 1px solid #d4c4a8;
    border-radius: 8px;
}

.bt-map-scroll__label {
    display: inline-block;
    min-width: 4.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5c5346;
}

.bt-map-scroll__muted {
    margin: 0;
    font-size: 0.85rem;
    color: #5c5346;
    text-align: center;
}

.bt-map-scroll__empty-art {
    text-align: center;
    font-size: 2.5rem;
    margin: 1rem 0;
    opacity: 0.7;
}

.bt-map-tag {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    border-radius: 4px;
    background: rgba(92, 107, 58, 0.15);
    border: 1px solid #c9b896;
    font-weight: 700;
    font-size: 0.82rem;
}

.bt-map-relation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0.5rem auto 0.75rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 2px solid #3d2b1f;
    font-weight: 700;
    font-size: 0.85rem;
    max-width: 14rem;
}

.bt-map-scroll__actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.bt-map-scroll__foot {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #c9b896;
}

.bt-map-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #3d2b1f;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}

.bt-map-btn--primary {
    background: linear-gradient(180deg, #6b7d45, #5c6b3a);
    color: #f7f1e5;
}

.bt-map-btn--scout {
    background: linear-gradient(180deg, #6b8cae, #4a6fa5);
    color: #f7f1e5;
}

.bt-map-btn--attack {
    background: linear-gradient(180deg, #b04a3c, #9b3b2e);
    color: #f7f1e5;
}

.bt-map-btn--reinforce {
    background: linear-gradient(180deg, #6b9b6e, #4f7d52);
    color: #f7f1e5;
}

.bt-map-btn--ghost {
    background: transparent;
    color: #2c2416;
    border-style: dashed;
}

.bt-map-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
}

.bt-map-btn--wood {
    background: linear-gradient(180deg, #a67c52, #8b5e3c);
    color: #f7f1e5;
}

.bt-map-btn:hover {
    filter: brightness(1.05);
}

/* Wood frame around canvas */
.bt-map-frame {
    border: 4px solid #3d2b1f !important;
    border-radius: 10px !important;
    box-shadow:
        inset 0 0 0 2px #a67c52,
        0 6px 20px rgba(44, 36, 22, 0.22) !important;
    background: #d9ccb0;
}

.bt-map-controls {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    z-index: 2;
}

.bt-map-ctrl {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    border: 2px solid #3d2b1f;
    background: linear-gradient(180deg, #f3ead8, #e2d6c2);
    color: #2c2416;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.18);
    appearance: none;
}

.bt-map-ctrl:hover {
    background: linear-gradient(180deg, #fff8ea, #f3ead8);
}

.bt-map-compass {
    position: absolute;
    right: 0.85rem;
    top: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid #3d2b1f;
    background: radial-gradient(circle at 40% 35%, #f7f1e5, #d4c4a8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Cinzel, serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #9b3b2e;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 2;
    pointer-events: none;
}

.bt-map-help { /* legacy class keep harmless */
    padding: 0.75rem 1rem;
}

/* PR-M1 — map troop dispatch modal */
.bt-dispatch-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(44, 36, 22, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.bt-dispatch-modal {
    position: relative;
    width: min(28rem, 100%);
    max-height: min(90vh, 40rem);
    overflow: auto;
    background:
        linear-gradient(180deg, #f7f1e5 0%, #efe4d0 100%);
    border: 3px solid #3d2b1f;
    border-radius: 12px;
    box-shadow:
        inset 0 0 0 2px #c4a35a,
        0 12px 40px rgba(0, 0, 0, 0.35);
    padding: 1.1rem 1.15rem 1.15rem;
}

.bt-dispatch-modal__close {
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #5c5346;
    cursor: pointer;
    border-radius: 6px;
}

.bt-dispatch-modal__close:hover {
    background: rgba(61, 43, 31, 0.08);
    color: #2c2416;
}

.bt-dispatch {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bt-dispatch__header {
    padding-right: 1.5rem;
}

.bt-dispatch__title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--bt-text);
    margin-bottom: 0.25rem;
}

.bt-dispatch__target {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.bt-dispatch__coords {
    color: var(--bt-text-muted);
    font-variant-numeric: tabular-nums;
}

.bt-dispatch__relation {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.bt-dispatch__loading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--bt-text-muted);
    padding: 0.5rem 0;
}

.bt-dispatch__empty {
    margin: 0.25rem 0;
    color: var(--bt-text-muted);
    font-size: 0.92rem;
}

.bt-dispatch__section {
    border-top: 1px dashed #c9b896;
    padding-top: 0.65rem;
}

.bt-dispatch__label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bt-text-muted);
    margin-bottom: 0.4rem;
}

.bt-dispatch__forced {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    background: linear-gradient(180deg, #6b9b6e, #4f7d52);
    color: #f7f1e5;
    font-weight: 700;
    font-size: 0.9rem;
}

.bt-dispatch__toggle {
    width: 100%;
}

.bt-dispatch__hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--bt-text-muted);
    line-height: 1.35;
}

.bt-dispatch__units-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.bt-dispatch__units {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bt-dispatch__unit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid var(--bt-border);
    border-radius: 8px;
}

.bt-dispatch__unit-meta {
    display: flex;
    flex-direction: column;
    min-width: 7rem;
}

.bt-dispatch__unit-name {
    font-weight: 700;
    font-size: 0.92rem;
}

.bt-dispatch__unit-have {
    font-size: 0.75rem;
    color: var(--bt-text-muted);
}

.bt-dispatch__unit-ctrl {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bt-dispatch__qty {
    width: 5.5rem;
    max-width: 5.5rem;
}

.bt-dispatch__chip {
    appearance: none;
    border: 1px solid #3d2b1f;
    background: linear-gradient(180deg, #f3ead8, #e2d6c2);
    color: #2c2416;
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.bt-dispatch__chip:hover:not(:disabled) {
    filter: brightness(1.05);
}

.bt-dispatch__chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.bt-dispatch__hero {
    margin: 0 !important;
}

.bt-dispatch__eta {
    font-size: 0.85rem;
    color: var(--bt-text-muted);
    padding: 0.45rem 0.55rem;
    background: rgba(92, 107, 58, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(92, 107, 58, 0.2);
}

.bt-dispatch__actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 0.5rem;
    margin-top: 0.15rem;
}

@media (max-width: 380px) {
    .bt-dispatch__actions {
        grid-template-columns: 1fr;
    }
}

/* ── PR-V4: village slot management ───────────────────────────────────────── */

.bt-board-section {
    margin-bottom: 0.85rem;
}

.bt-board-section__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5c5346;
    margin: 0 0 0.45rem 0.15rem;
}

.bt-tile-grid--infra {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 720px) {
    .bt-tile-grid--infra {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .bt-tile-grid--infra .bt-tile-cell {
        grid-row: auto !important;
        grid-column: auto !important;
    }
}

@media (max-width: 520px) {
    .bt-tile-grid--infra {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Locked / empty tile chrome */
.bt-tile--state-locked {
    opacity: 0.72;
    filter: grayscale(0.35);
}

.bt-tile--state-locked .bt-tile__name {
    font-size: 0.72rem;
}

.bt-tile--state-empty {
    border-style: dashed !important;
    box-shadow: none;
}

.bt-tile--state-empty .bt-tile__icon--empty {
    opacity: 0.55;
    font-size: 1.5rem;
}

.bt-tile--state-empty:hover:not(:disabled) {
    border-style: solid !important;
    background: linear-gradient(165deg, #f7f1e5, #e8dcc4) !important;
}

/* Castle unlock card */
.bt-castle-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #f7f1e5 0%, #ebe0cc 55%, #e0d0b0 100%);
    border: 2px solid #3d2b1f;
    border-radius: 12px;
    box-shadow:
        inset 0 0 0 1px #c9b896,
        0 3px 10px rgba(44, 36, 22, 0.12);
}

.bt-castle-card__icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 35% 30%, #e8d4b0, #a67c52);
    border: 2px solid #5c3d1f;
    border-radius: 50%;
}

.bt-castle-card__body {
    min-width: 0;
    flex: 1;
}

.bt-castle-card__title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #2c2416;
    margin-bottom: 0.15rem;
}

.bt-castle-card__stats {
    font-size: 0.85rem;
    color: #5c5346;
}

.bt-castle-card__max {
    opacity: 0.75;
}

.bt-castle-card__next {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #5c6b3a;
}

.bt-castle-card__next--done {
    color: #8b7355;
    font-weight: 500;
}

/* Slot state badges (build table + panel) */
.bt-slot-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.bt-slot-badge--locked {
    background: #e0d8d0;
    color: #5c5346;
    border-color: #b0a898;
}

.bt-slot-badge--empty {
    background: #f0e8d0;
    color: #8a7010;
    border-color: #c9a227;
    border-style: dashed;
}

.bt-slot-badge--occupied {
    background: rgba(92, 107, 58, 0.15);
    color: #3d4a28;
    border-color: #5c6b3a;
}

.bt-slot-badge--busy {
    background: rgba(201, 162, 39, 0.25);
    color: #5c3a10;
    border-color: #c9a227;
}

/* Slot detail overlay panel */
.bt-slot-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(44, 36, 22, 0.45);
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    animation: bt-slot-fade 0.15s ease;
}

@keyframes bt-slot-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bt-slot-panel {
    width: min(22rem, 100vw);
    max-width: 100%;
    background: linear-gradient(180deg, #f7f1e5 0%, #ebe0cc 100%);
    border-left: 3px solid #3d2b1f;
    box-shadow: -6px 0 24px rgba(44, 36, 22, 0.28);
    padding: 1rem 1.1rem 1.25rem;
    overflow-y: auto;
    animation: bt-slot-slide 0.18s ease;
}

.bt-slot-panel.bt-slot-panel--train {
    width: min(26rem, 100vw);
}

@keyframes bt-slot-slide {
    from { transform: translateX(1rem); opacity: 0.85; }
    to { transform: translateX(0); opacity: 1; }
}

/* PR-E2c: refinement building passive bonus */
.bt-slot-bonus {
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid #d4c4a8;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bt-slot-bonus__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.bt-slot-bonus__title {
    margin: 0;
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: #2c2416;
}

.bt-slot-bonus__pct {
    font-size: 0.85rem;
    font-weight: 700;
    color: #3f6b45;
    font-variant-numeric: tabular-nums;
}

.bt-slot-bonus__body {
    margin: 0;
    font-size: 0.85rem;
    color: #2c2416;
    line-height: 1.35;
}

.bt-slot-train {
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid #d4c4a8;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.bt-slot-train__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.bt-slot-train__title {
    margin: 0;
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: #2c2416;
}

.bt-slot-train__queues {
    font-size: 0.75rem;
    color: #5c5346;
}

.bt-slot-train__active {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bt-slot-train__job {
    padding: 0.4rem 0.5rem;
    background: linear-gradient(180deg, #6b8cae 0%, #4a6fa5 100%);
    color: #f7f1e5;
    border-radius: 8px;
    border: 1px solid #3d2b1f;
    font-size: 0.8rem;
}

.bt-slot-train__job-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.bt-slot-train__eta {
    font-variant-numeric: tabular-nums;
    opacity: 0.95;
}

.bt-slot-train__track {
    height: 5px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    overflow: hidden;
}

.bt-slot-train__fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a227, #e8d48b);
    border-radius: 4px;
    transition: width 0.4s linear;
}

.bt-slot-train__list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bt-slot-train__card {
    padding: 0.5rem 0.55rem;
    background: rgba(247, 241, 229, 0.85);
    border: 1px solid #d4c4a8;
    border-radius: 8px;
}

.bt-slot-train__card--locked {
    opacity: 0.78;
    border-style: dashed;
}

.bt-slot-train__locked-req {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: #8a7355;
}

.bt-slot-train__card-top {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-bottom: 0.35rem;
}

.bt-slot-train__unit {
    font-weight: 700;
    font-size: 0.9rem;
    color: #2c2416;
}

.bt-slot-train__cost {
    font-size: 0.72rem;
    color: #5c5346;
}

.bt-slot-train__card-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.bt-slot-train__qty {
    flex: 1 1 auto;
    max-width: 6.5rem;
}

.bt-slot-train__qty .mud-input-control {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Marketplace NPC trade (PR-E1c) — parchment Direction A, parallel to train */
.bt-slot-market {
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid #d4c4a8;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bt-slot-market__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.bt-slot-market__title {
    margin: 0;
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: #2c2416;
}

.bt-slot-market__quota {
    font-size: 0.75rem;
    color: #5c5346;
}

.bt-slot-market__quota-bar {
    height: 6px;
    background: rgba(61, 43, 31, 0.12);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #d4c4a8;
}

.bt-slot-market__quota-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b6b3d, #c9a227);
    border-radius: 4px;
    transition: width 0.35s ease;
}

.bt-slot-market__remaining {
    margin: 0;
    font-size: 0.82rem;
    color: #2c2416;
}

.bt-slot-market__rate {
    margin: 0;
    font-size: 0.78rem;
    color: #5c5346;
}

.bt-slot-market__rate-note {
    display: block;
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 0.15rem;
}

.bt-slot-market__form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0.55rem;
    background: rgba(247, 241, 229, 0.85);
    border: 1px solid #d4c4a8;
    border-radius: 8px;
}

.bt-slot-market__row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.bt-slot-market__row--amount {
    align-items: center;
}

.bt-slot-market__select {
    flex: 1 1 6.5rem;
    min-width: 6rem;
}

.bt-slot-market__select .mud-input-control,
.bt-slot-market__amount .mud-input-control {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.bt-slot-market__amount {
    flex: 1 1 auto;
    max-width: 9rem;
}

.bt-slot-market__trade-btn {
    flex: 0 0 auto;
}

.bt-slot-market__preview {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #3d5a3a;
}

.bt-slot-market__stock {
    font-size: 0.72rem;
    color: #5c5346;
    line-height: 1.35;
}

/* Merchant send form + active caravans (PR-E4c) */
.bt-slot-market__send {
    margin-top: 0.55rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #d4c4a8;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bt-slot-market__row--cargo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.bt-slot-market__coord {
    flex: 1 1 5.5rem;
    min-width: 5rem;
}

.bt-slot-market__cargo {
    min-width: 0;
}

.bt-slot-market__coord .mud-input-control,
.bt-slot-market__cargo .mud-input-control {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.bt-slot-market__shipments {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bt-slot-market__shipment {
    padding: 0.4rem 0.5rem;
    background: rgba(247, 241, 229, 0.9);
    border: 1px solid #d4c4a8;
    border-radius: 8px;
}

.bt-slot-market__shipment-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #2c2416;
}

.bt-slot-market__shipment-eta {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bt-slot-market__shipment-detail {
    font-size: 0.7rem;
    color: #5c5346;
    margin: 0.15rem 0 0.3rem;
}

/* Global merchant ribbons under training ribbons */
.bt-merchant-ribbons {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bt-merchant-ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    padding: 0.4rem 0.85rem;
    background: linear-gradient(180deg, #c9a66b 0%, #a67c3d 100%);
    color: #2c2416;
    border-radius: 8px;
    border: 1px solid #3d2b1f;
    font-size: 0.85rem;
}

.bt-merchant-ribbon__fill {
    height: 100%;
    background: linear-gradient(90deg, #5c3d1f, #8b5a2b);
    border-radius: 4px;
    transition: width 0.4s linear;
}

.bt-slot-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.bt-slot-panel__eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5c5346;
    font-weight: 600;
}

.bt-slot-panel__title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #2c2416;
    margin: 0.1rem 0 0;
    line-height: 1.25;
}

.bt-slot-panel__close {
    appearance: none;
    border: 1px solid #d4c4a8;
    background: rgba(247, 241, 229, 0.9);
    color: #2c2416;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.bt-slot-panel__close:hover:not(:disabled) {
    background: #e8dcc4;
}

.bt-slot-panel__close:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bt-slot-panel__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.bt-slot-panel__level {
    font-size: 0.85rem;
    font-weight: 600;
    color: #5c5346;
}

.bt-slot-panel__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bt-slot-panel__msg {
    margin: 0;
    font-size: 0.9rem;
    color: #2c2416;
    line-height: 1.4;
}

.bt-slot-panel__hint {
    margin: 0;
    font-size: 0.78rem;
    color: #5c5346;
}

.bt-slot-panel__occupied {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: rgba(247, 241, 229, 0.7);
    border: 1px solid #d4c4a8;
    border-radius: 10px;
}

.bt-slot-panel__emoji {
    font-size: 1.75rem;
    line-height: 1;
}

.bt-slot-panel__type {
    font-weight: 700;
    font-size: 0.95rem;
}

.bt-slot-panel__sub {
    font-size: 0.8rem;
    color: #5c5346;
}

.bt-slot-panel__actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.bt-slot-panel__found-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bt-slot-found-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    margin: 0;
    padding: 0.65rem 0.85rem;
    text-align: left;
    font: inherit;
    font-weight: 600;
    color: #2c2416;
    background: linear-gradient(180deg, #f7f1e5, #e8dcc4);
    border: 2px solid #3d2b1f;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.bt-slot-found-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(44, 36, 22, 0.18);
}

.bt-slot-found-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.bt-slot-found-btn--unaffordable {
    border-style: dashed;
    opacity: 0.72;
}

.bt-slot-found-btn__emoji {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bt-slot-found-btn__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.bt-slot-found-btn__name {
    font-weight: 700;
}

.bt-slot-upgrade-cost {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
    margin-bottom: 0.35rem;
    padding: 0.5rem 0.65rem;
    background: rgba(247, 241, 229, 0.85);
    border: 1px solid #d4c4a8;
    border-radius: 8px;
}

.bt-slot-upgrade-cost--train {
    margin: 0.25rem 0 0.4rem;
}

.bt-slot-train__card--unaffordable {
    border-color: #c9a090;
}

.bt-slot-train__time {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.bt-slot-upgrade-cost__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a7355;
}

.bt-slot-cost {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bt-slot-cost--compact {
    font-size: 0.72rem;
    font-weight: 600;
    gap: 0.25rem 0.5rem;
}

/* PR-D3 / K16: locked foundable rows (Requires Castle Lx) */
.bt-slot-panel__locked-found {
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(61, 43, 31, 0.25);
}

.bt-slot-panel__locked-found-title {
    margin: 0 0 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #6b5a45;
}

.bt-slot-found-locked {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.85rem;
    font: inherit;
    color: #6b5a45;
    background: rgba(120, 100, 70, 0.08);
    border: 1px dashed rgba(61, 43, 31, 0.35);
    border-radius: 10px;
    opacity: 0.85;
    cursor: not-allowed;
}

.bt-slot-found-locked__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.bt-slot-found-locked__name {
    font-weight: 600;
    color: #4a3d2c;
}

.bt-slot-found-locked__req {
    font-size: 0.8rem;
    font-weight: 600;
    color: #8a6a2a;
}

.bt-slot-found-locked__note {
    font-size: 0.75rem;
    color: #7a6a55;
}

.bt-slot-panel__confirm {
    padding: 0.55rem 0.65rem;
    background: rgba(180, 60, 40, 0.08);
    border: 1px solid rgba(180, 60, 40, 0.25);
    border-radius: 8px;
}

@media (max-width: 480px) {
    .bt-slot-overlay {
        align-items: flex-end;
    }

    .bt-slot-panel {
        width: 100%;
        max-height: 85vh;
        border-left: none;
        border-top: 3px solid #3d2b1f;
        border-radius: 14px 14px 0 0;
        animation: bt-slot-slide-up 0.18s ease;
    }

    @keyframes bt-slot-slide-up {
        from { transform: translateY(1rem); opacity: 0.85; }
        to { transform: translateY(0); opacity: 1; }
    }
}

.bt-queue-chip {
    font-size: 0.85rem;
    color: #3d3428;
    background: rgba(196, 163, 90, 0.2);
    border: 1px solid rgba(92, 61, 31, 0.25);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
}

/* ── Army tab troop movements ─────────────────────────────────────────────── */
.bt-movements-table {
    background: transparent;
}

.bt-move-dir {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    white-space: nowrap;
}

.bt-move-dir--outgoing {
    background: rgba(92, 107, 58, 0.18);
    color: #3d4a24;
}

.bt-move-dir--incoming {
    background: rgba(155, 59, 46, 0.15);
    color: #7a2a1f;
}

.bt-move-type {
    font-weight: 600;
    font-size: 0.85rem;
}

.bt-move-type--attack,
.bt-move-type--aggressive {
    color: #9b3b2e;
}

.bt-move-type--raid {
    color: #a65d2e;
}

.bt-move-type--reinforcement,
.bt-move-type--return {
    color: #3d6b4a;
}

.bt-move-type--scout {
    color: #3d5a7a;
}

.bt-move-hero {
    margin-left: 0.25rem;
    opacity: 0.85;
}

.bt-move-route {
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    white-space: nowrap;
}

.bt-move-units {
    font-size: 0.85rem;
}

.bt-move-loot {
    font-size: 0.72rem;
    margin-top: 0.15rem;
}

.bt-move-eta-abs {
    font-size: 0.72rem;
}

/* ── First-session onboarding checklist (PR-R6) ───────────────────────────── */
.bt-onboarding {
    border-left: 4px solid var(--bt-primary, #5C6B3A);
    padding: 0.65rem 0.85rem;
}

.bt-onboarding__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bt-onboarding__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: 0;
    padding: 0.15rem 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
    text-align: left;
    min-width: 0;
}

.bt-onboarding__toggle:focus-visible {
    outline: 2px solid var(--bt-primary, #5C6B3A);
    outline-offset: 2px;
    border-radius: 4px;
}

.bt-onboarding__chevron {
    flex-shrink: 0;
    opacity: 0.75;
}

.bt-onboarding__title {
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.bt-onboarding__count {
    font-size: 0.8rem;
    white-space: nowrap;
}

.bt-onboarding__skip {
    flex-shrink: 0;
    text-transform: none;
    opacity: 0.85;
}

.bt-onboarding__list {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bt-onboarding__item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    line-height: 1.35;
}

.bt-onboarding__item--done .bt-onboarding__label {
    text-decoration: line-through;
    opacity: 0.65;
}

.bt-onboarding__icon {
    flex-shrink: 0;
}

.bt-onboarding__label {
    flex: 1 1 auto;
    min-width: 0;
}

.bt-onboarding__link {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .bt-onboarding {
        padding: 0.55rem 0.7rem;
    }

    .bt-onboarding__header {
        gap: 0.25rem;
    }

    .bt-onboarding__skip {
        margin-left: auto;
    }
}
