@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=&display=swap');

/* ============================================================
   SUMINISTROS — "Night Freight Dispatch"
   Asphalt navy · sodium amber · manifest paper · signal mint
   ============================================================ */

:root {
    --su-ink: #070d14;
    --su-navy: #0b1623;
    --su-panel: #0e1c2c;
    --su-panel-2: #122337;
    --su-paper: #f3e7cf;
    --su-paper-deep: #e4d3b2;
    --su-paper-ink: #2a2a25;
    --su-amber: #f2b04a;
    --su-amber-deep: #c97c1f;
    --su-mint: #5fe0a6;
    --su-mint-deep: #2c9b70;
    --su-coral: #ff6b5e;
    --su-cyan: #77d5e6;
    --su-muted: #9fb3c4;
    --su-muted-dark: #6d7f8f;
    --su-line: rgba(242, 176, 74, 0.22);
    --su-line-soft: rgba(159, 179, 196, 0.15);
    --su-glass: rgba(10, 23, 37, 0.86);
    --su-font-ui: 'Outfit', system-ui, sans-serif;
    --su-font-display: 'Barlow Condensed', 'Outfit', sans-serif;
    --su-radius: 14px;
    --su-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
    --su-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.suministros-body {
    min-height: 100vh;
    padding-top: var(--app-header-h, 72px);
    overflow-y: auto;
    color: var(--su-paper);
    font-family: var(--su-font-ui);
    background:
        radial-gradient(900px 520px at 12% -10%, rgba(242, 176, 74, 0.11), transparent 62%),
        radial-gradient(760px 560px at 100% 108%, rgba(95, 224, 166, 0.08), transparent 64%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 46px),
        linear-gradient(180deg, #08121d 0%, #050a11 100%);
}

body.suministros-body.playing {
    overflow: hidden;
}

/* ── shell ─────────────────────────────────────────────────── */

.suministros-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1320px, calc(100% - 16px));
    height: calc(100vh - var(--app-header-h, 72px) - 16px);
    height: calc(100dvh - var(--app-header-h, 72px) - 16px);
    min-height: 540px;
    margin: 8px auto;
    padding: 10px;
    gap: 8px;
    overflow: hidden;
    border: 1px solid var(--su-line);
    border-radius: 20px;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(242, 176, 74, 0.05), transparent 64%),
        linear-gradient(160deg, #0b1623 0%, #070d14 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 30px 70px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(0, 0, 0, 0.4);
}

.hidden { display: none !important; }

/* ── topbar ────────────────────────────────────────────────── */

.suministros-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    min-height: 42px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.brand-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 9px;
    object-fit: cover;
    border: 1px solid rgba(242, 176, 74, 0.4);
    box-shadow: 0 0 16px rgba(242, 176, 74, 0.2);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    line-height: 1.05;
}

.brand-kicker {
    overflow: hidden;
    color: var(--su-amber);
    font-size: 0.50rem;
    font-weight: 700;
    letter-spacing: 0.20em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy strong {
    overflow: hidden;
    color: var(--su-paper);
    font-family: var(--su-font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suministros-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid rgba(119, 213, 230, 0.26);
    border-radius: 999px;
    background: rgba(119, 213, 230, 0.07);
    color: var(--su-cyan);
    font-size: 0.60rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    white-space: nowrap;
}

.chip strong {
    color: var(--su-amber);
    font-variant-numeric: tabular-nums;
}

.chip-target {
    border-color: rgba(242, 176, 74, 0.34);
    background: rgba(242, 176, 74, 0.08);
    color: var(--su-amber);
}

.chip-target-icon { font-size: 0.72rem; line-height: 1; }

.hud-btn {
    min-width: 38px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--su-line-soft);
    border-radius: 9px;
    background: rgba(243, 231, 207, 0.04);
    color: var(--su-paper);
    font-family: var(--su-font-ui);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: border-color 0.16s var(--su-ease), background 0.16s var(--su-ease), transform 0.12s var(--su-ease);
}

.hud-btn:hover:not(:disabled) {
    border-color: var(--su-amber);
    background: rgba(242, 176, 74, 0.1);
    transform: translateY(-1px);
}

.hud-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.pause-btn {
    width: 38px;
    padding: 0;
    font-size: 0.88rem;
    color: var(--su-amber);
}

/* ── HUD ───────────────────────────────────────────────────── */

.hud-top {
    display: flex;
    align-items: stretch;
    gap: 5px;
    flex: 0 0 auto;
    padding: 6px;
    border: 1px solid var(--su-line-soft);
    border-radius: 12px;
    background: rgba(7, 13, 20, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.hud-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 4px 10px;
    border-left: 1px solid var(--su-line-soft);
}

.hud-stat:first-child { border-left: 0; }

.hud-stat-cash { flex: 1.25 1 0; }

.hud-label {
    overflow: hidden;
    color: var(--su-muted-dark);
    font-size: 0.46rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.2;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hud-value {
    overflow: hidden;
    color: var(--su-paper);
    font-family: var(--su-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hud-stat-cash .hud-value { color: var(--su-amber); }

.target-meter {
    height: 4px;
    margin-top: 3px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(159, 179, 196, 0.14);
}

.target-meter-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--su-amber-deep), var(--su-amber));
    box-shadow: 0 0 8px rgba(242, 176, 74, 0.45);
    transition: width 0.35s var(--su-ease), background 0.25s var(--su-ease);
}

.target-meter.is-met .target-meter-fill {
    background: linear-gradient(90deg, var(--su-mint-deep), var(--su-mint));
    box-shadow: 0 0 9px rgba(95, 224, 166, 0.5);
}

.round-track {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    padding: 0 8px;
    border-left: 1px solid var(--su-line-soft);
}

.round-track span {
    display: block;
    width: 5px;
    height: 13px;
    border-radius: 2px;
    background: rgba(159, 179, 196, 0.18);
    transition: background 0.2s var(--su-ease), box-shadow 0.2s var(--su-ease);
}

.round-track span.is-past { background: rgba(242, 176, 74, 0.42); }
.round-track span.is-current {
    background: var(--su-amber);
    box-shadow: 0 0 7px rgba(242, 176, 74, 0.55);
}

/* ── main grid ─────────────────────────────────────────────── */

.play-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
}

/* ── board panel ───────────────────────────────────────────── */

.board-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    min-height: 0;
    padding: 8px;
    border: 1px solid var(--su-line-soft);
    border-radius: var(--su-radius);
    background: rgba(8, 18, 30, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 0 0 auto;
    padding: 0 3px;
}

.section-label {
    color: var(--su-amber);
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

.shift-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border: 1px solid rgba(95, 224, 166, 0.28);
    border-radius: 999px;
    background: rgba(95, 224, 166, 0.08);
    color: var(--su-mint);
    font-size: 0.50rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.shift-status::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 7px currentColor;
}

.shift-status.is-paused {
    border-color: rgba(242, 176, 74, 0.3);
    background: rgba(242, 176, 74, 0.08);
    color: var(--su-amber);
}

.shift-status.is-over {
    border-color: rgba(255, 107, 94, 0.3);
    background: rgba(255, 107, 94, 0.08);
    color: var(--su-coral);
}

.board-wrap {
    position: relative;
    display: grid;
    place-items: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(119, 213, 230, 0.16);
    border-radius: 10px;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(18, 46, 66, 0.9), rgba(4, 10, 17, 0.98) 72%),
        #04101c;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
}

#gameCanvas {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 9px;
    background: #04101c;
    touch-action: none;
    cursor: default;
}

.board-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 16px;
    flex: 0 0 auto;
    padding: 1px 4px 0;
    color: var(--su-muted);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.board-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-depot { background: var(--su-amber); box-shadow: 0 0 6px rgba(242, 176, 74, 0.6); }
.legend-post { background: var(--su-cyan); }
.legend-truck { background: var(--su-paper); }
.legend-route { background: var(--su-mint); }

/* ── side panel ────────────────────────────────────────────── */

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    min-height: 0;
}

.panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--su-line-soft);
    border-radius: 12px;
    background: rgba(8, 18, 30, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.contracts-panel {
    flex: 1 1 auto;
    min-height: 0;
}

.transit-panel { flex: 0 1 auto; }
.feed-panel { flex: 0 0 auto; }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 0 0 auto;
    margin-bottom: 7px;
}

.panel-title {
    color: var(--su-amber);
    font-family: var(--su-font-display);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    line-height: 1;
    text-transform: uppercase;
}

.panel-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 1px solid rgba(242, 176, 74, 0.3);
    border-radius: 6px;
    background: rgba(242, 176, 74, 0.08);
    color: var(--su-amber);
    font-family: var(--su-font-display);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

/* ── contract manifests ────────────────────────────────────── */

.contract-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(242, 176, 74, 0.35) transparent;
}

.contract-list::-webkit-scrollbar { width: 5px; }
.contract-list::-webkit-scrollbar-thumb { background: rgba(242, 176, 74, 0.35); border-radius: 99px; }

.contract-card {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 5px;
    padding: 9px 10px 8px 13px;
    overflow: hidden;
    border: 1px solid rgba(42, 42, 37, 0.22);
    border-radius: 8px;
    background:
        repeating-linear-gradient(0deg, rgba(42, 42, 37, 0.035) 0 1px, transparent 1px 4px),
        linear-gradient(150deg, #fbf4e6 0%, #efe1c7 100%);
    color: var(--su-paper-ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s var(--su-ease), box-shadow 0.15s var(--su-ease);
}

.contract-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--su-amber-deep);
}

.contract-card.is-urgent::before { background: var(--su-coral); }
.contract-card.is-late-risk::before { background: var(--su-coral); }
.contract-card.is-sent::before { background: var(--su-mint-deep); }

.contract-card.is-sent {
    opacity: 0.68;
    filter: saturate(0.8);
}

.contract-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.contract-post {
    overflow: hidden;
    font-family: var(--su-font-display);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.05;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contract-route {
    flex: 0 0 auto;
    padding: 2px 6px;
    border: 1px solid rgba(42, 42, 37, 0.24);
    border-radius: 999px;
    color: #6d5b40;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.contract-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.67rem;
    line-height: 1.35;
}

.contract-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.67rem;
    line-height: 1.35;
}

.row-label {
    color: #7a6a52;
    font-weight: 500;
}

.row-value {
    color: #2a2a25;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.contract-deadline {
    color: #9a5b1f;
    font-weight: 800;
}

.contract-eta {
    color: #7a6a52;
}

.contract-eta strong { color: #2a2a25; }

.contract-risk {
    align-self: flex-start;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 107, 94, 0.14);
    color: #a83028;
    font-size: 0.50rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.contract-risk.is-ok {
    background: rgba(44, 155, 112, 0.14);
    color: #1f6f52;
}

.send-btn {
    width: 100%;
    margin-top: 1px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--su-amber), #d8892a);
    color: #2a1b06;
    font-family: var(--su-font-ui);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.15s var(--su-ease), transform 0.12s var(--su-ease);
}

.send-btn:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.send-btn:disabled {
    background: rgba(42, 42, 37, 0.18);
    color: #6d5b40;
    cursor: not-allowed;
}

.contract-card.is-sent .send-btn {
    background: rgba(44, 155, 112, 0.16);
    color: #1f6f52;
}

.send-reason {
    color: #a83028;
    font-size: 0.56rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

/* ── transit ───────────────────────────────────────────────── */

.transit-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 148px;
    overflow-y: auto;
    list-style: none;
    scrollbar-width: thin;
}

.transit-empty {
    padding: 2px 0;
    color: var(--su-muted-dark);
    font-size: 0.60rem;
    font-style: italic;
}

.transit-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    padding: 5px 7px;
    border: 1px solid var(--su-line-soft);
    border-radius: 7px;
    background: rgba(243, 231, 207, 0.03);
    font-size: 0.62rem;
}

.transit-dest {
    overflow: hidden;
    color: var(--su-paper);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transit-arrives {
    color: var(--su-muted-dark);
    font-size: 0.56rem;
    font-variant-numeric: tabular-nums;
}

.transit-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.transit-item.is-transit .transit-status { color: var(--su-cyan); background: rgba(119, 213, 230, 0.1); }
.transit-item.is-delivered .transit-status { color: var(--su-mint); background: rgba(95, 224, 166, 0.1); }
.transit-item.is-late .transit-status { color: var(--su-coral); background: rgba(255, 107, 94, 0.1); }

.transit-progress {
    grid-column: 1 / -1;
    height: 2px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(159, 179, 196, 0.14);
}

.transit-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--su-cyan);
}

.transit-item.is-delivered .transit-progress span { background: var(--su-mint); }
.transit-item.is-late .transit-progress span { background: var(--su-coral); }

/* ── radio feed ────────────────────────────────────────────── */

.feed {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 104px;
    overflow-y: auto;
    font-family: ui-monospace, 'Cascadia Mono', 'Courier New', monospace;
    scrollbar-width: thin;
}

.feed-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 2px 0;
    border-bottom: 1px dashed rgba(159, 179, 196, 0.12);
    font-size: 0.60rem;
    line-height: 1.35;
}

.feed-item:last-child { border-bottom: 0; }

.feed-round {
    flex: 0 0 auto;
    color: var(--su-muted-dark);
    font-size: 0.50rem;
    letter-spacing: 0.05em;
}

.feed-post {
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--su-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-delta {
    flex: 0 0 auto;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.feed-item.is-gain .feed-delta { color: var(--su-mint); }
.feed-item.is-loss .feed-delta { color: var(--su-coral); }
.feed-item.is-expired .feed-delta { color: var(--su-amber); }

.feed-empty {
    color: var(--su-muted-dark);
    font-size: 0.60rem;
    font-style: italic;
}

/* ── command bar ───────────────────────────────────────────── */

.command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    padding: 6px 8px 6px 12px;
    border: 1px solid var(--su-line-soft);
    border-radius: 11px;
    background: rgba(7, 13, 20, 0.86);
}

.command-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.command-kicker {
    color: var(--su-amber);
    font-size: 0.46rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.command-hint {
    overflow: hidden;
    color: var(--su-muted);
    font-size: 0.64rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hud-btn-wide {
    min-width: 150px;
    min-height: 38px;
    padding: 0 18px;
    border-color: rgba(242, 176, 74, 0.38);
    background: linear-gradient(135deg, rgba(242, 176, 74, 0.16), rgba(242, 176, 74, 0.06));
    color: var(--su-amber);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.advance-btn {
    flex: 0 0 auto;
}

/* ── overlays ──────────────────────────────────────────────── */

.overlay {
    position: fixed;
    inset: var(--app-header-h, 72px) 0 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow-y: auto;
    background: rgba(3, 7, 12, 0.82);
    backdrop-filter: blur(9px);
}

.overlay.hidden { display: none !important; }

.overlay-card {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100vh - var(--app-header-h, 72px) - 30px);
    max-height: calc(100dvh - var(--app-header-h, 72px) - 30px);
    margin: auto;
    padding: 26px 28px;
    overflow-y: auto;
    border: 1px solid var(--su-line);
    border-radius: 16px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(242, 176, 74, 0.08), transparent 70%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px),
        linear-gradient(160deg, #0d1a2a 0%, #070d14 100%);
    color: var(--su-paper);
    box-shadow: var(--su-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.overlay-card::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(242, 176, 74, 0.1);
    border-radius: 10px;
    pointer-events: none;
}

.overlay-card > * { position: relative; z-index: 1; }

.overlay-kicker {
    color: var(--su-amber);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.overlay-card h2 {
    margin: 4px 0 8px;
    color: var(--su-paper);
    font-family: var(--su-font-display);
    font-size: clamp(2.1rem, 4.4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 0.95;
    text-transform: uppercase;
    text-wrap: balance;
}

.overlay-sub {
    margin: 0 0 14px;
    color: var(--su-muted);
    font-size: 0.86rem;
    font-weight: 300;
    line-height: 1.6;
}

/* start card */

.overlay-card.start-card {
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    padding: 0;
    overflow: hidden;
}

.start-scroll {
    min-height: 0;
    padding: 26px 28px 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.start-hero { margin-bottom: 14px; }

.briefing-block {
    position: relative;
    margin-bottom: 14px;
    padding: 14px 16px 12px;
    border: 1px solid rgba(42, 42, 37, 0.24);
    border-radius: 9px;
    background:
        repeating-linear-gradient(0deg, rgba(42, 42, 37, 0.04) 0 1px, transparent 1px 4px),
        linear-gradient(150deg, #fbf4e6 0%, #efe1c7 100%);
    color: var(--su-paper-ink);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.briefing-block .section-label { color: #9a5b1f; }

.briefing-block p {
    margin: 7px 0 10px;
    color: #403b31;
    font-size: 0.80rem;
    line-height: 1.55;
}

.brief-facts {
    display: flex;
    gap: 5px;
}

.brief-facts > div {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex: 1 1 0;
    padding: 5px 7px;
    border: 1px solid rgba(122, 106, 82, 0.22);
    border-radius: 6px;
    background: rgba(255, 252, 245, 0.45);
}

.brief-facts strong {
    color: #9a5b1f;
    font-family: var(--su-font-display);
    font-size: 1.2rem;
    line-height: 1;
}

.brief-facts span {
    color: #7a6a52;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.difficulty-section { margin-bottom: 14px; }

.difficulty-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 7px;
}

.option-btn {
    border: 1px solid var(--su-line-soft);
    background: rgba(243, 231, 207, 0.04);
    color: var(--su-paper);
    font-family: var(--su-font-ui);
    cursor: pointer;
    transition: border-color 0.16s var(--su-ease), background 0.16s var(--su-ease), transform 0.12s var(--su-ease);
}

.diff-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 9px 10px;
    border-radius: 8px;
    text-align: left;
}

.diff-card:hover { border-color: rgba(242, 176, 74, 0.5); }

.diff-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.diff-top strong {
    font-family: var(--su-font-display);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.diff-target {
    color: var(--su-amber);
    font-family: var(--su-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.diff-meta {
    color: var(--su-muted-dark);
    font-size: 0.55rem;
    line-height: 1.3;
}

.diff-card.active {
    border-color: var(--su-amber);
    background: linear-gradient(150deg, rgba(242, 176, 74, 0.16), rgba(242, 176, 74, 0.05));
    box-shadow: 0 0 0 1px rgba(242, 176, 74, 0.15) inset;
}

.diff-card.active .diff-top strong { color: var(--su-amber); }

.diff-brief {
    min-height: 2.5em;
    margin: 7px 0 0;
    color: var(--su-muted);
    font-size: 0.68rem;
    line-height: 1.45;
}

.target-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 7px 10px;
    border: 1px solid rgba(242, 176, 74, 0.26);
    border-radius: 7px;
    background: rgba(242, 176, 74, 0.06);
}

.option-label {
    color: var(--su-muted);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.target-line strong {
    color: var(--su-amber);
    font-family: var(--su-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.how-to {
    padding: 12px 14px;
    border: 1px solid var(--su-line-soft);
    border-radius: 8px;
    background: rgba(243, 231, 207, 0.025);
}

.how-to h3 {
    margin-bottom: 6px;
    color: var(--su-amber);
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.how-to ul {
    display: flex;
    flex-direction: column;
    gap: 5px;
    list-style: none;
}

.how-to li {
    position: relative;
    padding-left: 14px;
    color: var(--su-muted);
    font-size: 0.70rem;
    line-height: 1.45;
}

.how-to li::before {
    content: "";
    position: absolute;
    top: 0.5em;
    left: 1px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--su-amber);
}

.start-actions {
    flex: 0 0 auto;
    padding: 10px 28px 20px;
    border-top: 1px solid var(--su-line-soft);
    background: linear-gradient(180deg, rgba(7, 13, 20, 0.86), #070d14);
}

.start-meta {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid rgba(242, 176, 74, 0.28);
    border-radius: 999px;
    color: var(--su-amber);
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.meta-pill strong { color: var(--su-paper); font-variant-numeric: tabular-nums; }

.start-hint {
    margin: 6px 0 0;
    color: var(--su-muted-dark);
    font-size: 0.58rem;
    text-align: center;
}

.btn-primary,
.btn-secondary {
    display: block;
    width: 100%;
    padding: 11px 18px;
    border-radius: 8px;
    font-family: var(--su-font-ui);
    font-size: 0.80rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.16s var(--su-ease), transform 0.12s var(--su-ease), border-color 0.16s var(--su-ease);
}

.btn-primary {
    border: 1px solid rgba(242, 176, 74, 0.4);
    background: linear-gradient(135deg, var(--su-amber), #d8892a);
    color: #2a1b06;
    box-shadow: 0 8px 22px rgba(242, 176, 74, 0.24);
    margin-bottom: 8px;
}

.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn-secondary {
    border: 1px solid var(--su-line-soft);
    background: transparent;
    color: var(--su-muted);
    font-size: 0.72rem;
    margin-bottom: 7px;
}

.btn-secondary:hover { border-color: var(--su-amber); color: var(--su-paper); }
.btn-primary:last-child, .btn-secondary:last-child { margin-bottom: 0; }

/* pause + result cards */

.pause-card { width: min(440px, 100%); }

.overlay-card.fail-card,
.overlay-card.victory-card {
    width: min(520px, 100%);
}

.overlay-card.victory-card { border-color: rgba(242, 176, 74, 0.45); }
.overlay-card.fail-card { border-color: rgba(255, 107, 94, 0.38); }

.overlay-card.victory-card h2 { color: var(--su-amber); }
.overlay-card.fail-card h2 { color: var(--su-coral); }

.stat-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 10px 0 14px;
    padding: 8px 12px;
    border: 1px solid var(--su-line-soft);
    border-radius: 8px;
    background: rgba(243, 231, 207, 0.025);
    font-size: 0.76rem;
}

.stat-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(159, 179, 196, 0.12);
    color: var(--su-muted);
}

.stat-row:last-child { border-bottom: 0; }

.stat-row strong {
    color: var(--su-amber);
    font-family: var(--su-font-display);
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ── focus ─────────────────────────────────────────────────── */

button:focus-visible,
a:focus-visible,
.option-btn:focus-visible {
    outline: 2px solid var(--su-amber);
    outline-offset: 2px;
}

/* ── responsive ────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .play-grid { grid-template-columns: minmax(0, 1fr) 340px; }
}

@media (max-width: 980px) {
    .suministros-shell { overflow: hidden; }
    .play-grid { display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
    .board-panel { flex: 0 0 auto; }
    .board-wrap {
        flex: 0 0 auto;
        height: min(62vw, 430px);
    }
    #gameCanvas { width: min(100%, 430px); height: auto; }
    .side-panel { flex: 0 0 auto; }
    .contracts-panel { flex: 0 0 auto; }
    .contract-list { max-height: none; }
    .transit-list { max-height: none; }
    .feed { max-height: none; }
}

@media (max-width: 760px) {
    .suministros-shell {
        height: calc(100vh - var(--app-header-h, 56px) - 8px);
        height: calc(100dvh - var(--app-header-h, 56px) - 8px);
        min-height: 420px;
        width: calc(100% - 8px);
        margin: 4px auto;
        padding: 7px;
        gap: 6px;
        border-radius: 13px;
    }

    .brand-icon { width: 30px; height: 30px; }
    .brand-kicker { font-size: 0.42rem; }
    .brand-copy strong { font-size: 1rem; }
    .chip { padding: 3px 7px; font-size: 0.52rem; }
    .hud-btn { min-height: 30px; }
    .pause-btn { width: 32px; min-width: 32px; }

    .hud-top { padding: 4px; gap: 2px; }
    .hud-stat { padding: 3px 6px; }
    .hud-stat:nth-child(5) { display: none; }
    .hud-label { font-size: 0.40rem; }
    .hud-value { font-size: 1.02rem; }
    .target-meter { height: 3px; }
    .round-track { padding: 0 4px; gap: 2px; }
    .round-track span { width: 3px; height: 10px; }

    .board-panel { padding: 6px; }
    .board-wrap { height: min(92vw, 390px); }
    .board-legend { gap: 4px 10px; font-size: 0.52rem; }
    .board-head { padding: 0; }

    .side-panel { gap: 6px; }
    .panel { padding: 8px; }
    .panel-title { font-size: 0.82rem; }
    .transit-list { max-height: 120px; }
    .feed { max-height: 92px; }
    .contract-card { padding: 8px 8px 7px 11px; }
    .contract-post { font-size: 0.92rem; }
    .send-btn { padding: 6px 8px; }

    .command-bar { padding: 5px 6px 5px 9px; }
    .command-hint { font-size: 0.56rem; }
    .hud-btn-wide { min-width: 120px; min-height: 34px; font-size: 0.60rem; padding: 0 10px; }

    .overlay { padding: 8px; }
    .overlay-card {
        max-height: calc(100dvh - var(--app-header-h, 56px) - 16px);
        padding: 20px 16px;
        border-radius: 12px;
    }
    .overlay-card.start-card { padding: 0; }
    .start-scroll { padding: 18px 14px 6px; }
    .start-actions { padding: 8px 14px 14px; }
    .overlay-card h2 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
    .overlay-sub { font-size: 0.78rem; }
    .briefing-block p { font-size: 0.74rem; }
    .difficulty-grid { grid-template-columns: 1fr; }
    .diff-card { padding: 7px 9px; }
    .diff-meta { display: none; }
    .how-to li { font-size: 0.66rem; }
    .start-actions .btn-primary { min-height: 38px; }
}

@media (max-width: 420px) {
    .suministros-chips { gap: 4px; }
    .chip-target span[data-i18n] { display: none; }
    .hud-value { font-size: 0.92rem; }
    .hud-stat:nth-child(5) { display: none; }
    .round-track { display: none; }
    .command-kicker { display: none; }
    .command-hint { white-space: normal; }
    .board-wrap { height: min(78vw, 330px); }
    .board-legend span:nth-child(4) { display: none; }
}

@media (max-height: 640px) and (orientation: landscape) {
    .suministros-shell {
        height: calc(100dvh - var(--app-header-h, 56px) - 8px);
        min-height: 0;
        overflow: hidden;
        padding: 4px;
        gap: 4px;
    }
    .suministros-topbar { min-height: 28px; }
    .brand-kicker { display: none; }
    .brand-copy strong { font-size: 0.92rem; }
    .brand-icon { width: 24px; height: 24px; }
    .suministros-chips { gap: 4px; }
    .chip { padding: 2px 6px; font-size: 0.48rem; }
    .hud-btn { min-height: 26px; }
    .pause-btn { width: 28px; min-width: 28px; }
    .hud-top { padding: 3px; gap: 2px; }
    .hud-stat { padding: 1px 5px; }
    .hud-label { display: block; font-size: 0.34rem; letter-spacing: 0.08em; }
    .hud-value { font-size: 0.84rem; }
    .target-meter { height: 2px; margin-top: 1px; }
    .round-track { display: none; }
    .play-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
        gap: 4px;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }
    .board-panel { padding: 3px; min-height: 0; }
    .board-head, .board-legend { display: none; }
    .board-wrap { flex: 1 1 auto; min-height: 0; }
    #gameCanvas { max-width: 100%; max-height: 100%; }
    .side-panel { display: grid; grid-template-rows: minmax(0, 1fr); gap: 0; min-height: 0; }
    .contracts-panel { min-height: 0; padding: 5px; display: flex; flex-direction: column; }
    .contract-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
    .transit-panel, .feed-panel { display: none; }
    .panel-title { font-size: 0.72rem; }
    .panel-head { margin-bottom: 3px; }
    .contract-card { padding: 5px 6px 4px 9px; gap: 2px; }
    .contract-post { font-size: 0.82rem; }
    .contract-route { padding: 1px 4px; font-size: 0.42rem; }
    .contract-row-goods,
    .contract-eta,
    .contract-risk { display: none; }
    .contract-row { font-size: 0.56rem; }
    .send-btn { margin-top: 2px; padding: 4px; font-size: 0.50rem; min-height: 24px; }
    .send-reason { font-size: 0.46rem; }
    .command-bar { padding: 3px 6px; min-height: 32px; }
    .command-kicker { display: none; }
    .command-hint { font-size: 0.50rem; }
    .hud-btn-wide { min-height: 28px; min-width: 110px; font-size: 0.52rem; }
    .overlay { padding: 4px; }
    .overlay-card { max-height: calc(100dvh - var(--app-header-h, 56px) - 8px); padding: 12px 14px; }
    .overlay-card.start-card { padding: 0; }
    .start-scroll { padding: 10px 14px 4px; }
    .start-actions { padding: 5px 14px 8px; }
    .overlay-card h2 { font-size: 1.6rem; margin-bottom: 4px; }
    .overlay-sub { margin-bottom: 6px; font-size: 0.68rem; }
    .briefing-block { margin-bottom: 6px; padding: 7px 9px; }
    .briefing-block p { font-size: 0.64rem; margin: 4px 0 5px; }
    .brief-facts { display: none; }
    .brief-facts strong { font-size: 0.92rem; }
    .difficulty-section { margin-bottom: 6px; }
    .difficulty-grid { gap: 4px; }
    .diff-card { padding: 5px 6px; }
    .diff-top strong { font-size: 0.72rem; }
    .diff-meta, .diff-brief, .how-to, .target-line { display: none; }
    .start-actions .meta-pill { display: none; }
    .start-hint { display: none; }
    .btn-primary, .btn-secondary { padding: 7px 10px; font-size: 0.68rem; }
}

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

/* ── visible game guide ───────────────────────────────────── */

#suministrosGuide {
    width: min(1100px, 100%);
    margin: 18px auto 0;
    padding: 0 18px 40px;
    color: rgba(243, 231, 207, 0.72);
}

#suministrosGuide .guide-breadcrumb,
#suministrosGuide .guide-breadcrumb a {
    color: rgba(243, 231, 207, 0.50);
}

#suministrosGuide .guide-breadcrumb a:hover { color: var(--su-amber); }

#suministrosGuide h1,
#suministrosGuide h2 {
    margin: 16px 0 10px;
    color: var(--su-paper);
    font-family: var(--su-font-display);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

#suministrosGuide p {
    color: rgba(243, 231, 207, 0.62);
    font-size: 0.82rem;
    line-height: 1.65;
}

#suministrosGuide a { color: var(--su-amber); }
#suministrosGuide .related-games { color: rgba(243, 231, 207, 0.62); }

@media (max-width: 760px) {
    #suministrosGuide { padding: 0 12px 28px; }
    #suministrosGuide h1,
    #suministrosGuide h2 { font-size: 1.2rem; }
}
