/* ============================================================
   RoboKyle: Grand Heist - stylesheet

   Deliberately NOT the Undead Nightmare palette. That game is
   black/blood/ember with a hell-glow. This one is cold steel,
   deep navy and vault gold: a bank at 3am, not a graveyard.
   ============================================================ */

:root {
    --bg:        #0B0F14;
    --panel:     #141C24;
    --panel-2:   #1A242E;
    --line:      #26333F;
    --line-soft: #1B2530;
    --ink:       #E8EDF2;
    --ink-soft:  #9FB0BF;
    --ink-mute:  #6B7C8B;
    --gold:      #E0B44C;
    --gold-hot:  #F5CF72;
    --gold-deep: #8A6520;
    --teal:      #4FB3C4;
    --green:     #5FBF87;
    --red:       #C4453A;
    --red-deep:  #7E2019;
    --steel:     #4C5A66;
}

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

body.gh-body {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* cold light from above-left, not fire from below */
body.gh-body::before {
    content: "";
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(60% 45% at 18% -8%, rgba(79,179,196,.13) 0%, transparent 62%),
        radial-gradient(70% 50% at 82% 108%, rgba(224,180,76,.10) 0%, transparent 66%);
}

.skip-link {
    position: absolute; top: -100px; left: 12px; z-index: 200;
    background: var(--ink); color: var(--bg);
    padding: .6rem .9rem; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }
.gh-body :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.game-shell {
    position: relative; z-index: 1;
    /* Wide enough to use a big monitor, capped so the text does not end
       up a metre apart on an ultrawide. */
    width: min(1800px, 98vw);
    margin: 0 auto;
    padding: clamp(.4rem, 1.4vw, 1rem) clamp(.4rem, 1.4vw, 1rem) clamp(.6rem, 1.6vw, 1.2rem);
    display: flex; flex-direction: column;
    /* the whole page fits the window: game, then the site strip */
    min-height: 100vh; min-height: 100dvh;
}
/* Nothing inside the frame is draggable or selectable. */
.game-frame img,
.game-frame canvas { -webkit-user-drag: none; user-select: none; }

.game-frame {
    position: relative;
    background: linear-gradient(180deg, #131B23, #0D131A);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    /* Take the height that is going, less the site strip below it, and
       never so little that the HUD has nowhere to sit. */
    flex: 1 1 auto;
    min-height: min(560px, 78vh);
    display: flex; flex-direction: column;
}

.ico { width: 1em; height: 1em; flex: none; vertical-align: -.14em; }

/* ---------- screens ---------- */
.screen { display: none; padding: clamp(1rem, 2.6vw, 2rem); min-height: 0; }
/* the active screen fills the frame and scrolls inside it if it must,
   rather than growing the page and pushing the game off the bottom */
.screen.active { display: block; flex: 1 1 auto; overflow-y: auto; }
.screen.is-heist { padding: 0; }
.screen.is-title.active { display: grid; }

/* ============================================================
   TITLE - vault door + stencilled plate
   ============================================================ */
.screen.is-title {
    grid-template-columns: 1fr;
    align-content: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(90% 70% at 70% 50%, rgba(38,51,63,.55) 0%, transparent 70%),
        linear-gradient(180deg, #0D141B, #080C11);
}
.title-art { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.vault-door {
    width: min(78vh, 560px); height: auto;
    opacity: .5;
    transform: translateX(26%);
    filter: drop-shadow(0 30px 60px rgba(0,0,0,.7));
}
.vd-ring { transform-origin: 200px 200px; animation: vdSpin 46s linear infinite; }
.vd-dial { transform-origin: 200px 200px; animation: vdDial 9s cubic-bezier(.6,0,.3,1) infinite; }
@keyframes vdSpin { to { transform: rotate(360deg); } }
@keyframes vdDial {
    0%, 42%  { transform: rotate(0deg); }
    58%, 72% { transform: rotate(-118deg); }
    92%,100% { transform: rotate(-42deg); }
}
.searchlight {
    position: absolute; inset: -20% -10%;
    background: linear-gradient(102deg, transparent 42%, rgba(224,180,76,.10) 50%, transparent 58%);
    animation: sweep 11s ease-in-out infinite;
}
@keyframes sweep { 0%,100% { transform: translateX(-28%); } 50% { transform: translateX(28%); } }

.title-panel { position: relative; z-index: 2; padding: clamp(1rem, 4vw, 3rem); max-width: 560px; }
.title-kicker {
    font-family: 'Oswald', Impact, sans-serif;
    text-transform: uppercase; letter-spacing: .42em;
    font-size: .74rem; color: var(--teal); margin: 0 0 .5rem;
}
.gh-logo {
    margin: 0 0 .6rem;
    font-family: 'Big Shoulders Display', 'Oswald', Impact, sans-serif;
    font-weight: 800; line-height: .82; text-transform: uppercase; display: grid;
}
.gh-logo .l1 {
    font-size: clamp(3rem, 9vw, 5.6rem); color: var(--ink); letter-spacing: .04em;
    text-shadow: 0 2px 0 #05080B, 0 0 40px rgba(232,237,242,.14);
}
.gh-logo .l2 {
    font-size: clamp(3.6rem, 11vw, 7rem); letter-spacing: .01em; margin-top: -.10em;
    background: linear-gradient(178deg, var(--gold-hot) 12%, var(--gold) 46%, var(--gold-deep) 96%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 0 #05080B) drop-shadow(0 0 26px rgba(224,180,76,.35));
}
.title-strap {
    color: var(--ink-soft); font-size: .95rem; line-height: 1.6;
    margin: 0 0 1.8rem; max-width: 34ch;
    padding-left: .9rem; border-left: 2px solid var(--gold-deep);
}

/* ---------- buttons ---------- */
.menu-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; max-width: 330px; }
.menu-btn {
    width: 100%; text-align: left; cursor: pointer;
    font-family: 'Oswald', Impact, sans-serif;
    text-transform: uppercase; letter-spacing: .09em; font-size: .92rem;
    color: var(--ink); background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line); border-left: 3px solid var(--steel);
    border-radius: 6px; padding: .8rem 1rem;
    transition: border-color .14s, background .14s, transform .14s;
    display: inline-flex; align-items: center; gap: .5rem;
}
.menu-btn:hover:not(:disabled) { border-left-color: var(--gold); background: #1E2A35; transform: translateX(3px); }
.menu-btn.is-primary { background: linear-gradient(180deg, var(--gold-hot), var(--gold)); color: #14100A; border-color: var(--gold); border-left-color: #fff5d6; }
.menu-btn.is-primary:hover:not(:disabled) { background: var(--gold-hot); }
.menu-btn.is-danger { color: #FFD9D4; border-left-color: var(--red); }
.menu-btn.is-danger:hover:not(:disabled) { background: #2A1614; border-left-color: var(--red); }
.menu-btn.is-go {
    background: linear-gradient(180deg, #6ACB94, var(--green)); color: #06120B;
    border-color: var(--green); border-left-color: #CFF3DF;
    font-size: .95rem; padding: .7rem 1.2rem; width: auto; justify-content: center;
}
.menu-btn.is-go:hover:not(:disabled) { background: #7CD9A2; }
.menu-btn:disabled { opacity: .38; cursor: not-allowed; }
.menu-btn.small { width: auto; font-size: .78rem; padding: .45rem .75rem; }

.menu-back, .ghost-btn {
    background: none; border: 1px solid var(--line); color: var(--ink-soft);
    border-radius: 6px; padding: .42rem .8rem; cursor: pointer; font-size: .8rem;
    font-family: inherit; transition: color .14s, border-color .14s;
}
.menu-back:hover, .ghost-btn:hover { color: var(--gold); border-color: var(--gold); }
.ghost-btn { display: block; margin: 1rem auto 0; }
.ghost-btn.small { display: inline-block; margin: 0; }

/* ============================================================
   INTERFACE FEEL
   Hover lifts and lights a control; pressing it gives a short,
   physical squash. Applied to every interactive class so new UI
   inherits it rather than feeling dead.
   ============================================================ */
.menu-btn, .menu-back, .ghost-btn, .bank-card, .mate-card, .item,
.ltab, .atab, .bench-chip, .btn-edit, .btn-bench, .btn-heal {
    position: relative;
    will-change: transform;
}

/* a highlight that sweeps across on hover */
.menu-btn::after, .bank-card::after, .item::after, .mate-card.is-offer::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.10) 50%, transparent 62%);
    background-size: 260% 100%;
    background-position: 130% 0;
    opacity: 0;
    transition: opacity .18s ease, background-position .55s ease;
}
.menu-btn:hover:not(:disabled)::after,
.bank-card:hover:not(:disabled)::after,
.item:hover::after,
.mate-card.is-offer:hover::after {
    opacity: 1;
    background-position: -30% 0;
}

.menu-back:hover, .ghost-btn:hover,
.btn-edit:hover, .btn-bench:hover, .btn-heal:hover,
.ltab:hover, .atab:hover, .bench-chip:hover:not(:disabled) {
    transform: translateY(-1px);
}
.item:hover { transform: translateY(-1px); }

/* press: quick squash, then settle */
.is-pressed { animation: pressPop .18s cubic-bezier(.3,.9,.4,1); }
@keyframes pressPop {
    0%   { transform: scale(1); }
    38%  { transform: scale(.955); }
    100% { transform: scale(1); }
}
.menu-btn.is-pressed { animation-name: pressPopBtn; }
@keyframes pressPopBtn {
    0%   { transform: translateX(0) scale(1); }
    38%  { transform: translateX(1px) scale(.97); }
    100% { transform: translateX(0) scale(1); }
}
.bank-card.is-pressed, .mate-card.is-pressed, .item.is-pressed {
    animation-name: pressPopCard;
}
@keyframes pressPopCard {
    0%   { transform: translateY(0) scale(1); }
    38%  { transform: translateY(1px) scale(.985); }
    100% { transform: translateY(-3px) scale(1); }
}
button:active:not(:disabled) { filter: brightness(1.08); }

/* ---------- top bar ---------- */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
    padding-bottom: .8rem; border-bottom: 1px solid var(--line-soft);
}
.topbar-mid { flex: 1; min-width: 200px; }
.topbar-right { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.screen-title {
    font-family: 'Big Shoulders Display', 'Oswald', Impact, sans-serif;
    font-weight: 800; font-size: clamp(1.4rem, 3.4vw, 2.1rem);
    margin: 0; text-transform: uppercase; letter-spacing: .02em;
}
.screen-title .accent { color: var(--gold); }
.screen-title.good { color: var(--green); }
.screen-title.bad  { color: var(--red); }
.topbar-note { margin: .15rem 0 0; font-size: .8rem; color: var(--ink-mute); }
.intel-line { display: flex; gap: .9rem; flex-wrap: wrap; }
.intel-line span { position: relative; }
.intel-line span + span::before {
    content: ""; position: absolute; left: -.5rem; top: .35em;
    width: 3px; height: 3px; border-radius: 50%; background: var(--line);
}
.cash-pill {
    font-size: .82rem; color: var(--ink-mute); white-space: nowrap;
    background: rgba(95,191,135,.08); border: 1px solid rgba(95,191,135,.28);
    border-radius: 5px; padding: .34rem .7rem;
}
.cash-pill b { color: var(--green); font-variant-numeric: tabular-nums; }
.warn-note {
    color: var(--gold); font-size: .82rem; margin: 0 0 1rem;
    border-left: 3px solid var(--gold-deep); padding: .4rem .7rem;
    background: rgba(224,180,76,.06);
}
.flash-bad { animation: badflash .5s ease; }
@keyframes badflash { 0%,100% { color: inherit; } 30% { color: var(--red); transform: scale(1.06); } }
.sec-title {
    font-family: 'Oswald', Impact, sans-serif; font-size: .8rem;
    letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
    margin: 1.4rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line-soft);
}
.body-text { color: var(--ink-soft); font-size: .9rem; line-height: 1.65; max-width: 72ch; }
.body-text.muted { color: var(--ink-mute); font-size: .8rem; }
code { background: var(--panel); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; }

/* ---------- bank cards ---------- */
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; align-items: start; }
.bank-card {
    text-align: left; cursor: pointer; color: inherit;
    background: linear-gradient(180deg, var(--panel), #111820);
    border: 1px solid var(--line-soft); border-radius: 9px;
    padding: .85rem .95rem; display: flex; flex-direction: column; gap: .4rem;
    transition: border-color .14s, transform .14s, box-shadow .14s;
}
.bank-card:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.5); }
.bank-card:disabled { opacity: .34; cursor: not-allowed; }
.bank-card.is-next { border-color: var(--green); box-shadow: 0 0 0 1px rgba(95,191,135,.25); }
.bank-card.is-boss { border-color: rgba(224,180,76,.45); background: linear-gradient(180deg, #241E12, #12171E); }
.bank-card.is-cleared { opacity: .82; }
.bank-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.bank-no { font-family: 'Oswald', Impact, sans-serif; font-size: .7rem; letter-spacing: .14em; color: var(--gold); }
.bank-tag { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; padding: .16rem .45rem; border-radius: 3px; }
.bank-tag.next { color: #06120B; background: var(--green); font-weight: 700; }
.bank-tag.done { color: var(--green); border: 1px solid rgba(95,191,135,.4); }
.bank-tag.lock { color: var(--ink-mute); border: 1px solid var(--line); }
.bank-card h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }
.bank-blurb { margin: 0; font-size: .78rem; color: var(--ink-mute); line-height: 1.5; }
.bank-intel { display: flex; gap: .5rem; margin-top: .2rem; }
.intel { flex: 1; background: rgba(0,0,0,.28); border-radius: 5px; padding: .35rem .45rem; display: flex; flex-direction: column; gap: .1rem; }
.intel .lbl { font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.intel b { font-size: .84rem; font-variant-numeric: tabular-nums; }
.intel.take b { color: var(--green); }
.bank-police { margin: 0; font-size: .74rem; color: var(--ink-soft); }
.bank-police .lbl { color: var(--ink-mute); text-transform: uppercase; font-size: .6rem; letter-spacing: .1em; }
.bank-unlock { font-size: .7rem; color: var(--ink-mute); display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.unlock-chip {
    display: inline-flex; align-items: center; gap: .25rem;
    color: var(--teal); border: 1px solid rgba(79,179,196,.3);
    border-radius: 999px; padding: .1rem .45rem; font-size: .68rem;
}

/* ---------- the jobs board ---------- */
/* The board spans the grid, so the acts and the progress bar break the
   cards into a campaign instead of one long undifferentiated wall. */
.campaign-bar, .act-head { grid-column: 1 / -1; }

.campaign-bar {
    display: flex; align-items: center; gap: .7rem;
    padding: .1rem .1rem .4rem;
}
.cb-track {
    flex: 1; height: 5px; border-radius: 999px;
    background: rgba(0,0,0,.42); border: 1px solid var(--line-soft);
    overflow: hidden;
}
.cb-track i {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--green), var(--gold));
}
.cb-text {
    font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-mute); font-variant-numeric: tabular-nums; white-space: nowrap;
}

.act-head {
    display: flex; align-items: baseline; gap: .6rem;
    margin: .7rem 0 -.1rem; padding-bottom: .35rem;
    border-bottom: 1px solid var(--line-soft);
}
.act-head .act-no {
    font-family: 'Oswald', Impact, sans-serif; text-transform: uppercase;
    letter-spacing: .18em; font-size: .68rem; color: var(--gold);
}
.act-head .act-name { font-size: .82rem; color: var(--ink-soft); flex: 1; }
.act-head .act-count {
    font-size: .64rem; color: var(--ink-mute); font-variant-numeric: tabular-nums;
}
.act-head.is-done .act-no { color: var(--green); }

/* the crest, and the name beside it */
.bank-head { display: flex; gap: .7rem; align-items: flex-start; }
.bank-id { min-width: 0; flex: 1; }
.bank-mark {
    width: 46px; height: 46px; flex: none; display: block; border-radius: 7px;
}
.bank-card.is-locked .bank-mark { filter: grayscale(1) brightness(.7); }
.bank-sub {
    margin: .1rem 0 0; font-size: .68rem; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .08em;
}

/* how much room the job gives you */
.bank-heat {
    display: flex; align-items: center; gap: .5rem;
    font-size: .68rem; color: var(--ink-mute);
}
.bank-heat .lbl {
    text-transform: uppercase; letter-spacing: .1em; font-size: .58rem; white-space: nowrap;
}
.bank-heat .heat-track {
    flex: 1; height: 4px; border-radius: 999px;
    background: rgba(0,0,0,.45); overflow: hidden;
}
.bank-heat .heat-track i { display: block; height: 100%; background: var(--heat, var(--gold)); }
.bank-heat b { color: var(--heat, var(--ink)); font-size: .68rem; white-space: nowrap; }

.bank-intel { flex-wrap: wrap; }

/* ---------- squad row ---------- */
.squad-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.mate-card {
    background: linear-gradient(180deg, var(--panel), #111820);
    border: 1px solid var(--line-soft); border-radius: 9px;
    padding: .75rem .8rem; display: flex; flex-direction: column; gap: .55rem;
    transition: border-color .14s;
}
.mate-card.is-editing { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(224,180,76,.22); }
.mate-card.is-robo { background: linear-gradient(180deg, #17212B, #101820); }
.mate-card.is-empty { border-style: dashed; align-items: center; justify-content: center; text-align: center; }
.mate-card.is-offer { cursor: pointer; text-align: left; color: inherit; }
.mate-card.is-offer:hover { border-color: var(--gold); }
.empty-slot { font-family: 'Oswald', Impact, sans-serif; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .1em; margin: 0; font-size: .8rem; }
.empty-note { margin: .2rem 0 0; font-size: .7rem; color: var(--ink-mute); }

.mate-head { display: flex; gap: .6rem; align-items: flex-start; }
.mate-id { min-width: 0; flex: 1; }
.mate-card h4 { margin: 0; font-size: .95rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.mate-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* the weapon, next to the name, because that is the fact most people
   are actually scanning for when they pick a crew */
.weapon-tag {
    display: inline-flex; align-items: center; gap: .3rem;
    background: rgba(224,180,76,.10); border: 1px solid rgba(224,180,76,.42);
    border-radius: 5px; padding: .12rem .4rem .12rem .3rem;
    font-family: 'Oswald', Impact, sans-serif; text-transform: uppercase;
    letter-spacing: .05em; font-size: .66rem; color: var(--gold);
}
.weapon-tag .ico { color: var(--gold); font-size: 1.15rem; }
.weapon-tag b { font-weight: 600; color: var(--gold); }

/* morale at a glance, same colour ramp as the stat meters */
.morale-pip {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .6rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--cond, var(--ink-mute));
}
.morale-pip .pip-dot {
    width: 7px; height: 7px; border-radius: 50%; flex: none;
    background: var(--cond, var(--ink-mute));
    box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}
.mate-card h4 .you { font-size: .56rem; letter-spacing: .12em; background: var(--gold); color: #14100A; border-radius: 3px; padding: .08rem .3rem; font-weight: 700; }
.mate-sub { margin: .12rem 0 0; font-size: .72rem; color: var(--ink-soft); display: flex; align-items: center; gap: .3rem; }
.mate-sub b { color: var(--teal); }
.trait-note { margin: .18rem 0 0; font-size: .66rem; color: var(--ink-mute); line-height: 1.4; }

/* drawn portrait bust, one per character */
.portrait {
    width: 36px; height: 36px; flex: none; display: block;
    border-radius: 7px; border: 1px solid var(--line);
}
.portrait.big { width: 50px; height: 50px; border-radius: 8px; }
.atab .portrait { width: 24px; height: 24px; border-radius: 5px; }
.bench-chip .portrait { width: 24px; height: 24px; border-radius: 5px; }
.loadout-who .portrait { width: 26px; height: 26px; border-radius: 5px; }

/* ---------- readable stat rows ----------
   Icon, the stat's actual name, its value, and a plain note about what
   it changes. The old three-letter chips meant nothing to a new player. */
.stat-rows {
    display: grid; gap: 1px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    border-radius: 7px; overflow: hidden;
}
.stat-row {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    grid-template-areas: "ico name val" ".  note note";
    align-items: center;
    gap: 0 .5rem;
    background: rgba(8,12,16,.55);
    padding: .4rem .55rem;
}
.stat-ico  { grid-area: ico; display: grid; place-items: center; color: var(--teal); }
.stat-ico .ico { font-size: 1.05rem; }
.stat-name { grid-area: name; font-size: .78rem; color: var(--ink-soft); }
.stat-val  {
    grid-area: val; font-size: .85rem; font-weight: 700;
    color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat-note {
    grid-area: note; font-size: .65rem; color: var(--ink-mute);
    margin-top: .1rem; line-height: 1.35;
}
/* a filled meter behind the row, tinted by how bad things are */
.stat-row.has-meter { position: relative; overflow: hidden; }
.stat-meter {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: var(--cond);
    opacity: .20;
    border-right: 2px solid var(--cond);
    pointer-events: none;
    transition: width .25s ease;
}
.stat-row.has-meter .stat-ico,
.stat-row.has-meter .stat-val { color: var(--cond); position: relative; }
.stat-row.has-meter .stat-name,
.stat-row.has-meter .stat-note { position: relative; }

/* whole card selects the character */
.mate-card.is-selectable { cursor: pointer; }
.mate-card.is-selectable:hover { border-color: var(--gold); }
.mate-card.is-editing { box-shadow: 0 0 0 1px rgba(224,180,76,.30), 0 8px 22px rgba(0,0,0,.4); }

/* equipment category picker */
.loadout-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .4rem; }
.ltab {
    display: flex; align-items: center; gap: .55rem; text-align: left;
    padding: .5rem .6rem; border-radius: 7px;
    background: var(--panel); border: 1px solid var(--line-soft);
    color: var(--ink-soft); cursor: pointer;
    font-family: inherit; text-transform: none; letter-spacing: 0;
}
.ltab-ico {
    display: grid; place-items: center; width: 30px; height: 30px; flex: none;
    border-radius: 6px; background: rgba(0,0,0,.32); color: var(--ink-mute);
}
.ltab-ico .ico { font-size: 1.3rem; }
.ltab-text { display: flex; flex-direction: column; min-width: 0; }
.ltab-text small {
    font-family: 'Oswald', Impact, sans-serif; font-size: .58rem;
    letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute);
}
.ltab-text b {
    font-size: .8rem; color: var(--ink-soft);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ltab.is-on { border-color: var(--gold); background: #1E2630; }
.ltab.is-on .ltab-ico { color: var(--gold); background: rgba(224,180,76,.12); }
.ltab.is-on .ltab-text small { color: var(--gold); }
.ltab.is-on .ltab-text b { color: var(--ink); }

.loadout-heading {
    margin: .7rem 0 .5rem; font-size: .76rem; color: var(--ink-mute);
    padding-bottom: .4rem; border-bottom: 1px solid var(--line-soft);
}
.loadout-heading b { color: var(--gold); }

.stat-row.is-warn .stat-ico { color: var(--gold); }
.stat-row.is-warn .stat-val { color: var(--gold); }
.stat-row.is-warn .stat-note { color: var(--gold); opacity: .85; }
.stat-row.is-bad  { background: rgba(196,69,58,.10); }
.stat-row.is-bad .stat-ico,
.stat-row.is-bad .stat-val { color: var(--red); }
.stat-row.is-bad .stat-note { color: #FFAFA6; }

/* the one-line primer above the squad */
.crew-primer {
    margin: 0 0 .9rem; font-size: .76rem; line-height: 1.6;
    color: var(--ink-mute);
    background: rgba(8,12,16,.45); border-left: 2px solid var(--teal);
    border-radius: 0 6px 6px 0; padding: .5rem .7rem;
}
.crew-primer b { color: var(--ink-soft); }

.recruit-note {
    margin: .1rem 0 0; font-size: .66rem; color: var(--ink-mute); line-height: 1.4;
}

/* empty squad slot is a button now */
.mate-card.is-empty {
    cursor: pointer; color: inherit; gap: .2rem;
    transition: border-color .14s, background .14s;
}
.mate-card.is-empty:hover { border-color: var(--gold); background: rgba(224,180,76,.05); }
.empty-plus {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-size: 2rem; line-height: 1; color: var(--ink-mute);
}
.mate-card.is-empty:hover .empty-plus { color: var(--gold); }

.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: .25rem;
    background: rgba(0,0,0,.3); border: 1px solid var(--line-soft);
    border-radius: 5px; padding: .25rem .45rem; font-size: .72rem; color: var(--ink-soft);
}
.chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chip small { font-size: .58rem; letter-spacing: .08em; color: var(--ink-mute); }
.chip .ico { color: var(--teal); }

.gear-row { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; }
.gear { display: flex; align-items: center; gap: .3rem; font-size: .68rem; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear .ico { color: var(--gold); font-size: 1.05rem; }

.mate-actions { display: flex; gap: .4rem; margin-top: auto; }
.btn-edit, .btn-bench {
    flex: 1; cursor: pointer; font-family: 'Oswald', Impact, sans-serif;
    text-transform: uppercase; letter-spacing: .08em; font-size: .7rem;
    padding: .42rem .5rem; border-radius: 5px; text-align: center;
    background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-soft);
    transition: border-color .14s, color .14s;
}
.btn-edit:hover, .btn-bench:hover { border-color: var(--gold); color: var(--gold); }
.mate-card.is-editing .btn-edit { border-color: var(--gold); color: var(--gold); }

/* While the opening look round plays, the HUD and the key hint get out
   of the way - they were sitting on top of the letterbox and the caption. */
.heist-wrap.is-intro .hud,
.heist-wrap.is-intro .heist-hint,
.heist-wrap.is-intro .tl,
.heist-wrap.is-cine .hud,
.heist-wrap.is-cine .heist-hint,
.heist-wrap.is-cine .tl { opacity: 0; pointer-events: none; }
.heist-wrap .hud,
.heist-wrap .heist-hint { transition: opacity .28s ease; }

/* ---------- who is on offer ---------- */
.tier-tag {
    font-family: 'Oswald', Impact, sans-serif; font-size: .56rem;
    letter-spacing: .14em; text-transform: uppercase;
    border-radius: 3px; padding: .1rem .34rem; border: 1px solid;
}
.tier-tag.t-street  { color: var(--ink-mute); border-color: var(--line); }
.tier-tag.t-pro     { color: var(--teal); border-color: rgba(79,179,196,.45); }
.tier-tag.t-veteran { color: var(--gold); border-color: rgba(224,180,76,.5); }
.tier-tag.t-elite   { color: #14100A; border-color: var(--gold); background: var(--gold); font-weight: 700; }

.rare-tag {
    margin-left: .35rem; font-size: .54rem; letter-spacing: .14em;
    text-transform: uppercase; color: #E08C82;
    border: 1px solid rgba(224,140,130,.5); border-radius: 3px; padding: .04rem .26rem;
}
.mate-card.is-rare { border-color: rgba(224,140,130,.45); }
.mate-card.is-dear .hire-btn { color: var(--red); border-color: rgba(196,69,58,.4); }
.hire-btn { font-variant-numeric: tabular-nums; }

/* what low morale is actually costing somebody */
.morale-cost {
    display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
    margin-top: .1rem; padding: .3rem .45rem;
    background: rgba(196,69,58,.10); border: 1px solid rgba(196,69,58,.28);
    border-radius: 5px;
}
.morale-cost .lbl {
    font-size: .55rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-mute);
}
.mor-cost {
    font-size: .62rem; font-variant-numeric: tabular-nums;
    color: #E08C82; border: 1px solid rgba(224,140,130,.35);
    border-radius: 3px; padding: .04rem .3rem;
}

/* ---------- the debrief ---------- */
.db-in { opacity: 0; transform: translateY(10px); transition: opacity .32s ease, transform .32s ease; }
.db-in.is-shown { opacity: 1; transform: none; }

.debrief-head {
    border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px;
    padding: .8rem .95rem; margin-bottom: .7rem;
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.18));
}
.debrief-head.good { border-left-color: var(--green); }
.debrief-head.warn { border-left-color: var(--gold); }
.debrief-head.bad  { border-left-color: var(--red); }
.db-verdict { margin: 0 0 .5rem; font-size: .84rem; color: var(--ink-soft); }
.db-take { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.db-take .k {
    font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute);
}
.db-take .v {
    font-family: 'Oswald', Impact, sans-serif; font-size: 1.9rem;
    font-variant-numeric: tabular-nums; color: var(--green);
    transition: text-shadow .3s ease;
}
.debrief-head.bad .db-take .v, .debrief-head.warn .db-take .v { color: var(--gold); }
.db-take .v.is-landed { text-shadow: 0 0 18px rgba(95,191,135,.45); }

.db-bar {
    position: relative; height: 16px; margin-top: .55rem; border-radius: 999px;
    background: rgba(0,0,0,.38); border: 1px solid var(--line-soft); overflow: hidden;
}
.db-bar i {
    display: block; height: 100%;
    background: linear-gradient(90deg, rgba(95,191,135,.75), rgba(224,180,76,.75));
    animation: dbFill .9s cubic-bezier(.2,.8,.3,1) both;
}
.db-bar span {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: .58rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink); text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
@keyframes dbFill { from { width: 0 !important; } }

.debrief-tiles {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: .45rem; margin-bottom: .8rem;
}
.db-tile {
    background: rgba(0,0,0,.28); border: 1px solid var(--line-soft);
    border-radius: 6px; padding: .4rem .5rem;
    display: flex; flex-direction: column; gap: .12rem;
}
.db-tile .lbl {
    font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute);
}
.db-tile b { font-size: .84rem; font-variant-numeric: tabular-nums; }
.db-tile.good { border-color: rgba(95,191,135,.35); }
.db-tile.good b { color: var(--green); }
.db-tile.warn { border-color: rgba(224,180,76,.35); }
.db-tile.warn b { color: var(--gold); }
.db-tile.bad  { border-color: rgba(196,69,58,.4); }
.db-tile.bad b { color: var(--red); }

.debrief-note {
    margin: .5rem 0 0; font-size: .68rem; line-height: 1.5; color: var(--ink-mute);
}

@media (prefers-reduced-motion: reduce) {
    .db-in { opacity: 1; transform: none; transition: none; }
    .db-bar i { animation: none; }
}

/* ---------- putting the word out again ---------- */
.reroll-btn {
    display: inline-flex; align-items: center; gap: .7rem; cursor: pointer;
    background: linear-gradient(180deg, rgba(224,180,76,.12), rgba(0,0,0,.22));
    border: 1px solid rgba(224,180,76,.42); border-radius: 8px;
    padding: .5rem .8rem; color: var(--ink); text-align: left;
    transition: border-color .15s, transform .12s, box-shadow .15s, background .15s;
}
.reroll-btn:hover:not(:disabled) {
    border-color: var(--gold); transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,.45);
    background: linear-gradient(180deg, rgba(224,180,76,.2), rgba(0,0,0,.2));
}
.reroll-btn:active:not(:disabled) { transform: translateY(0); }
.reroll-btn:disabled { cursor: not-allowed; opacity: .55; border-color: var(--line); }

.reroll-btn .rr-ico {
    font-size: 1.25rem; line-height: 1; color: var(--gold);
    transition: transform .4s cubic-bezier(.2,.8,.3,1);
}
.reroll-btn:hover:not(:disabled) .rr-ico { transform: rotate(-180deg); }

.reroll-btn .rr-text { display: flex; flex-direction: column; gap: .1rem; }
.reroll-btn .rr-text b {
    font-family: 'Oswald', Impact, sans-serif; font-size: .84rem;
    letter-spacing: .04em; font-weight: 600;
}
.reroll-btn .rr-text small { font-size: .62rem; color: var(--ink-mute); }

.reroll-btn .rr-price {
    margin-left: auto; font-family: 'Oswald', Impact, sans-serif;
    font-variant-numeric: tabular-nums; font-size: .92rem; color: var(--gold);
    border-left: 1px solid rgba(224,180,76,.3); padding-left: .7rem;
}
.reroll-btn.is-broke .rr-price { color: var(--red); }
.reroll-btn.is-broke { border-color: rgba(196,69,58,.4); }

/* ---------- fullscreen ---------- */
.fs-btn {
    position: absolute; top: .6rem; right: .6rem; z-index: 60;
    display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
    background: rgba(8,12,16,.82); border: 1px solid var(--line);
    border-radius: 6px; padding: .3rem .55rem; color: var(--ink-soft);
    font-family: 'Oswald', Impact, sans-serif; font-size: .64rem;
    letter-spacing: .12em; text-transform: uppercase;
    transition: border-color .14s, color .14s, background .14s;
}
.fs-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(8,12,16,.95); }
.fs-btn svg { width: 13px; height: 13px; }
/* out of the way while a cutscene is running */
.heist-wrap.is-intro ~ .fs-btn, .heist-wrap.is-cine ~ .fs-btn { opacity: 0; pointer-events: none; }

/* ===== Fullscreen =====
   The canvas already sizes itself off its wrapper, so the only job here is
   making sure the wrapper genuinely gets the whole screen, and that the
   menus do not spread from one corner of a wide display to the other. */
.game-frame.is-fullscreen,
.game-frame:fullscreen,
.game-frame.is-maxed {
    border-radius: 0; border: 0;
    width: 100vw; height: 100vh; height: 100dvh;
    max-width: none; max-height: none;
    min-height: 0;
    display: flex; flex-direction: column;
}
.game-frame.is-maxed { position: fixed; inset: 0; z-index: 999; }

.game-frame.is-fullscreen .screen.active,
.game-frame:fullscreen .screen.active,
.game-frame.is-maxed .screen.active {
    flex: 1 1 auto;
    min-height: 0;
    padding-inline: max(clamp(1rem, 2.6vw, 2rem), calc((100% - 1240px) / 2));
    /* Centre the column vertically too, or a short screen sits in the top
       third with a void under it. "safe" so anything taller than the
       display still scrolls from its top. */
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-content: safe center;
}
/* The arena is the exception: it takes everything. */
.game-frame.is-fullscreen .screen.is-heist.active,
.game-frame:fullscreen .screen.is-heist.active,
.game-frame.is-maxed .screen.is-heist.active {
    padding: 0;
    overflow: hidden;
    justify-content: stretch;
}
.game-frame.is-fullscreen .heist-wrap,
.game-frame:fullscreen .heist-wrap,
.game-frame.is-maxed .heist-wrap {
    flex: 1 1 auto;
    min-height: 0;
}

/* Short windows: the site strip is the first thing to give. */
@media (max-height: 620px) {
    .back-strip { display: none; }
    .game-shell { padding-bottom: .3rem; }
}

/* ---------- bench ---------- */
.bench {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    background: rgba(0,0,0,.22); border: 1px solid var(--line-soft);
    border-radius: 8px; padding: .5rem .7rem; margin-bottom: 1rem;
}
.bench-label { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); display: flex; flex-direction: column; gap: .1rem; }
.bench-label small { font-size: .54rem; letter-spacing: .06em; color: var(--ink-mute); opacity: .7; text-transform: none; }
.bench-strip { display: flex; gap: .4rem; flex-wrap: wrap; flex: 1; }
.bench-chip {
    display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
    padding: .25rem .5rem; color: var(--ink-soft); font-size: .74rem;
}
.bench-chip:hover:not(:disabled) { border-color: var(--gold); color: var(--ink); }
.bench-chip:disabled { opacity: .4; cursor: not-allowed; }

.bench-chip small { color: var(--ink-mute); font-size: .62rem; }
.bench-id { display: flex; flex-direction: column; align-items: flex-start; gap: .08rem; line-height: 1.15; }
.bench-name { font-size: .74rem; }
/* what clicking this chip would do */
.bench-gun {
    display: inline-flex; align-items: center; gap: .25rem;
    font-style: normal; font-size: .6rem; letter-spacing: .05em;
    text-transform: uppercase; color: var(--gold);
    border-left: 1px solid var(--line); padding-left: .45rem; margin-left: .1rem;
}
.bench-gun .ico { color: var(--gold); font-size: 1rem; }

/* ---------- loadout ---------- */
.loadout { background: rgba(0,0,0,.24); border: 1px solid var(--line-soft); border-radius: 10px; padding: .8rem .9rem; }
.loadout-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .7rem; }
.loadout-who {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: 'Oswald', Impact, sans-serif; text-transform: uppercase;
    letter-spacing: .08em; font-size: .95rem;
}
.loadout-readout { display: flex; gap: .5rem; margin: 0; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.loadout-readout div { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 5px; padding: .3rem .55rem; display: flex; flex-direction: column; }
.loadout-readout dt { font-size: .56rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.loadout-readout dd { margin: 0; font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.loadout-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .6rem; }
.ltab {
    display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
    background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px;
    padding: .38rem .65rem; color: var(--ink-mute); font-size: .78rem;
    font-family: 'Oswald', Impact, sans-serif; text-transform: uppercase; letter-spacing: .06em;
}
.ltab .ico { font-size: 1.15rem; }
.ltab.is-on { border-color: var(--gold); color: var(--gold); background: #1E2630; }

.loadout-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .4rem; }
.item {
    display: flex; align-items: center; gap: .55rem; cursor: pointer; text-align: left;
    background: var(--panel); border: 1px solid var(--line-soft); border-radius: 7px;
    padding: .45rem .55rem; color: inherit; transition: border-color .14s;
}
.item:hover { border-color: var(--gold); }
.item.is-equipped { border-color: var(--green); background: linear-gradient(180deg, #14261C, var(--panel)); }
.item.is-poor { opacity: .55; }
.item-ico { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 5px; background: rgba(0,0,0,.32); color: var(--gold); }
.item-ico .ico { font-size: 1.35rem; }
.item.is-equipped .item-ico { color: var(--green); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-main b { font-size: .8rem; }
.item-main small { font-size: .66rem; color: var(--ink-mute); }
.item-act { font-size: .68rem; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.item.is-equipped .item-act { color: var(--green); }
.loadout-future { margin: .6rem 0 0; font-size: .72rem; color: var(--ink-mute); }
.loadout-future b { color: var(--teal); }

/* ============================================================
   MODAL - replaces every browser confirm()
   ============================================================ */
.modal { position: absolute; inset: 0; z-index: 60; display: none; place-items: center; background: rgba(6,9,13,.82); backdrop-filter: blur(3px); }
.modal.active { display: grid; animation: modalIn .18s ease; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line); border-top: 3px solid var(--gold);
    border-radius: 10px; padding: 1.4rem 1.5rem; max-width: 460px; margin: 1rem;
    box-shadow: 0 30px 70px rgba(0,0,0,.7);
}
.modal-card h3 { margin: 0 0 .6rem; font-family: 'Oswald', Impact, sans-serif; text-transform: uppercase; letter-spacing: .06em; font-size: 1.15rem; }
.modal-card p { margin: 0 0 1.2rem; color: var(--ink-soft); font-size: .86rem; line-height: 1.6; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions .menu-btn { width: auto; min-width: 130px; justify-content: center; text-align: center; }

/* ============================================================
   TRANSITION - curtain wipe + title card
   ============================================================ */
.transition { position: absolute; inset: 0; z-index: 70; pointer-events: none; display: grid; place-items: center; }
.curtain {
    position: absolute; left: 0; right: 0; height: 52%;
    background: linear-gradient(180deg, #0A0F14, #060A0E);
    transform: translateY(-102%);
    transition: transform .34s cubic-bezier(.7,0,.3,1);
}
.curtain.c-top { top: 0; border-bottom: 1px solid var(--gold-deep); }
.curtain.c-bottom { bottom: 0; transform: translateY(102%); border-top: 1px solid var(--gold-deep); }
.transition.is-in .curtain { transform: translateY(0); }
.transition.is-out .curtain { transform: translateY(-102%); transition-duration: .3s; }
.transition.is-out .curtain.c-bottom { transform: translateY(102%); }

.transition-card { position: relative; z-index: 2; text-align: center; opacity: 0; transition: opacity .2s ease .2s; }
.transition.has-card.is-in .transition-card { opacity: 1; }
.t-title {
    margin: 0; font-family: 'Big Shoulders Display', 'Oswald', Impact, sans-serif;
    font-weight: 800; font-size: clamp(1.8rem, 5vw, 3rem);
    text-transform: uppercase; letter-spacing: .03em; color: var(--ink);
}
.t-sub { margin: .3rem 0 0; font-family: 'Oswald', Impact, sans-serif; text-transform: uppercase; letter-spacing: .26em; font-size: .74rem; color: var(--gold); }

/* ============================================================
   HEIST
   ============================================================ */
/* The mission canvas takes the whole frame; the frame is what decides
   how big that is, so one rule covers every monitor and fullscreen too. */
.heist-wrap { position: relative; width: 100%; flex: 1 1 auto; min-height: 0; background: #06090C; }
.screen.is-heist.active { display: flex; flex-direction: column; overflow: hidden; }
#heist-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }

.hud {
    position: absolute; inset: 0;
    pointer-events: none;
    display: flex; justify-content: space-between; align-items: flex-start;
    /* Anchored to the corners; the inset grows a little on a wide display
       rather than the whole HUD being pulled toward the middle. */
    padding: clamp(.6rem, 1.4vh, 1.1rem) clamp(.7rem, 1.4vw, 1.9rem);
    gap: .7rem;
}
.hud-left, .hud-right { display: grid; gap: .4rem; }
.hud-right { justify-items: end; }
.hud-mid { display: grid; gap: .35rem; justify-items: center; }
.hud-block { background: rgba(8,12,16,.8); border: 1px solid var(--line-soft); border-radius: 6px; padding: .35rem .55rem; display: flex; align-items: center; gap: .45rem; font-size: .72rem; }
.hud-block.col { flex-direction: column; align-items: flex-end; gap: .05rem; }
.hud-block .k { color: var(--ink-mute); text-transform: uppercase; letter-spacing: .1em; font-size: .58rem; }
.hud-block .v { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.hud-block .v.big { font-family: 'Oswald', Impact, sans-serif; font-size: .92rem; letter-spacing: .04em; }
.hud-bar { display: block; width: 112px; height: 7px; background: rgba(255,255,255,.09); border-radius: 3px; overflow: hidden; }
.hud-bar.big { width: 136px; height: 9px; }
.hud-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-deep), var(--red)); transition: width .12s linear; }
.hud-bar i.cash { background: linear-gradient(90deg, #2F6B47, var(--green)); }

.hud-crew { display: grid; gap: .22rem; }
.hud-mate { display: flex; align-items: center; gap: .4rem; background: rgba(8,12,16,.74); border: 1px solid var(--line-soft); border-radius: 5px; padding: .24rem .45rem; font-size: .66rem; }
.hud-mate .nm { width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.hud-mate .hud-bar { width: 56px; height: 5px; }
.hud-mate .cash { color: var(--green); font-variant-numeric: tabular-nums; }
.hud-mate.is-down { border-color: var(--gold); }
.hud-mate.is-down .nm { color: var(--gold); }
.hud-mate.is-dead { opacity: .42; }
.hud-mate.is-dead .cash { color: var(--red); }

/* The status and its countdown are the two numbers you look up at mid
   firefight, so they are sized to be read at a glance rather than squinted at. */
.hud-alarm { display: flex; gap: .55rem; align-items: baseline; border-radius: 5px; padding: .4rem 1rem; font-size: 1.15rem; border: 1px solid; }
.hud-alarm .k { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; opacity: .85; }
.hud-alarm .v { font-family: 'Oswald', Impact, sans-serif; font-variant-numeric: tabular-nums; font-size: 1.3rem; font-weight: 600; letter-spacing: .02em; }
.hud-alarm.quiet { color: var(--green); background: rgba(10,28,18,.8); border-color: rgba(95,191,135,.3); }
.hud-alarm.warn  { color: var(--gold);  background: rgba(34,26,8,.85); border-color: rgba(224,180,76,.4); }
.hud-alarm.bad   { color: #FF7B6E; background: rgba(38,10,8,.88); border-color: rgba(196,69,58,.5); animation: pulseBad 1s ease-in-out infinite; }
@keyframes pulseBad { 0%,100% { opacity: 1; } 50% { opacity: .7; } }
.hud-objective { margin: 0; font-size: .72rem; color: var(--ink-soft); background: rgba(8,12,16,.72); border-radius: 4px; padding: .22rem .55rem; }

.heist-hint { position: absolute; left: 0; right: 0; bottom: .4rem; margin: 0; text-align: center; font-size: .62rem; color: var(--ink-mute); pointer-events: none; }

.overlay { position: absolute; inset: 0; display: none; place-items: center; background: rgba(6,9,13,.88); text-align: center; z-index: 30; }
.overlay.active { display: grid; }
.overlay h2 { font-family: 'Big Shoulders Display', Impact, sans-serif; font-weight: 800; font-size: 2.2rem; margin: 0 0 1.2rem; text-transform: uppercase; }
.overlay .buttons { display: grid; gap: .5rem; min-width: 250px; }
.overlay .menu-btn { justify-content: center; text-align: center; }

.touch-ui { display: none; position: absolute; right: .6rem; bottom: 3rem; z-index: 20; }
.touch-ui button {
    display: block; width: 52px; height: 52px; margin-bottom: .4rem;
    border-radius: 50%; border: 1px solid var(--line);
    background: rgba(16,22,28,.85); color: var(--ink);
    font-family: 'Oswald', Impact, sans-serif; font-size: .72rem;
}

/* ---------- debrief ---------- */
.debrief-body { display: grid; gap: .35rem; margin-bottom: 1.2rem; max-width: 660px; }
.debrief-haul {
    display: flex; justify-content: space-between; align-items: baseline;
    background: rgba(95,191,135,.07); border: 1px solid rgba(95,191,135,.28);
    border-radius: 8px; padding: .8rem 1rem; margin-bottom: .4rem;
}
.debrief-haul .k { color: var(--ink-soft); font-size: .8rem; }
.debrief-haul .v { font-family: 'Big Shoulders Display', Impact, sans-serif; font-weight: 800; font-size: 1.7rem; color: var(--green); }
.debrief-row { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: baseline; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px; padding: .45rem .75rem; font-size: .82rem; }
.debrief-row .xp { color: var(--teal); font-size: .76rem; }
.debrief-row .lv { color: var(--ink-soft); font-size: .76rem; }
.debrief-row .up { color: var(--gold); }
.debrief-row.is-dead { border-color: rgba(196,69,58,.4); }
.debrief-row.is-warn { border-color: rgba(224,180,76,.45); }
.debrief-row.is-warn .xp { color: var(--gold); }
.debrief-row.is-dead .xp { color: var(--red); }
.levelup { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin-bottom: .45rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.levelup h4 { margin: 0; font-size: .88rem; }
.levelup h4 span { color: var(--gold); font-size: .72rem; font-weight: 500; }
.levelup-btns { display: flex; gap: .35rem; flex-wrap: wrap; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.row-actions .menu-btn { width: auto; min-width: 170px; justify-content: center; text-align: center; }

/* ---------- how to / settings ---------- */
.controls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .45rem 1rem; font-size: .82rem; color: var(--ink-soft); }
kbd { display: inline-block; background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: .08rem .38rem; font-family: inherit; font-size: .72rem; color: var(--ink); margin-right: .18rem; }
.tips { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: .85rem; line-height: 1.75; max-width: 74ch; }
.tips b { color: var(--ink); }
.settings-grid { display: grid; gap: 1rem; max-width: 420px; margin-bottom: 1.4rem; }
.setting label { display: block; font-size: .82rem; color: var(--ink-soft); margin-bottom: .3rem; }
.setting input[type="range"] { width: 100%; accent-color: var(--gold); }
.setting input[type="checkbox"] { accent-color: var(--gold); margin-right: .4rem; }

/* ---------- footer ---------- */
.back-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 4vw, 2.2rem); margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); }
.back-strip a { color: var(--ink-soft); text-decoration: none; font-size: .84rem; }
.back-strip a:hover { color: var(--gold); }

@media (max-width: 720px) {
    .screen.is-title { text-align: center; }
    .vault-door { transform: none; opacity: .28; }
    .title-panel { max-width: none; }
    .title-strap { border-left: 0; padding-left: 0; margin-inline: auto; }
    .menu-list { margin-inline: auto; }
    .heist-wrap { height: min(70vh, 560px); }
    .hud { flex-direction: column; align-items: stretch; }
    .hud-right { justify-items: start; }
    .heist-hint { display: none; }
    .gear-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .vd-ring, .vd-dial, .searchlight, .hud-alarm.bad { animation: none; }
    .menu-btn, .bank-card, .mate-card, .item, .curtain { transition: none; }
}


/* ===== Touch =====
   The shared layer, in the game's own colours. */
.tl.heist-touch {
  --tl-line: rgba(224, 180, 76, .55);
  --tl-fill: rgba(16, 12, 10, .5);
  --tl-knob: rgba(224, 180, 76, .92);
  --tl-ink: #F1E4D2;
}
.tl.heist-touch .tl-btn.is-on { color: #14100A; }
.heist-wrap .tl { transition: opacity .4s ease; }
