/* Shared visual language: graphite, machined edges and safety orange. */
:root { --bg: #101619; --panel: #151d21; --card: #1b252a; --line: #344148; --text: #ecf0ed; --muted: #a0afb5; --accent: #ff854c; --accent-2: #f7bc83; }
body { font-size: 14px; }
body.screen-open { overflow: hidden; }
button, select, input { transition: border-color .16s, background-color .16s, box-shadow .16s; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #ffc18e; outline-offset: 3px; }
button[hidden] { display: none !important; }
button { touch-action: manipulation; }
button, .card, .layer, .lg-block, select, input[type=number], .seg { border-radius: 5px; }
select, input[type=number] { min-height: 36px; background: #10191e; }
input[type=range] { accent-color: var(--accent); }
.screen { background: radial-gradient(ellipse at 78% 43%, #26383d66, transparent 55%), #101619; }
.menu-art { display: none; }
.menu-masthead { display: flex; justify-content: space-between; gap: 20px; margin: 0 5vw; padding: 25px 0; border-bottom: 1px solid var(--line); font: 10px/1.5 Consolas, monospace; letter-spacing: 2px; color: var(--muted); }
.menu-masthead b { color: var(--accent); font-size: 15px; margin-right: 12px; }
.menu-inner { width: 48%; max-width: 670px; padding: clamp(30px, 6vh, 70px) 0 38px 7vw; gap: 18px; }
.eyebrow { font: 11px/1.5 Consolas, monospace; letter-spacing: 2px; color: #b8c6c8; display: flex; align-items: center; gap: 10px; }
.eyebrow i, .armor-study figcaption i { width: 6px; height: 6px; background: var(--accent); display: inline-block; }
.menu-title { font-size: clamp(46px, 6.6vw, 92px); line-height: .96; font-weight: 900; letter-spacing: -3px; color: var(--text); background: none; margin: 3px 0; }
.menu-title span { display: block; color: var(--accent); }
.menu-tag { max-width: 310px; font-size: 16px; line-height: 1.6; margin: 0 0 6px; color: #b7c4c8; }
.menu-btns { gap: 8px; width: min(100%, 415px); }
.mbtn { min-height: 66px; padding: 12px 17px; background: #1b252a; border-color: #36434a; border-radius: 5px; backdrop-filter: none; gap: 15px; }
.mbtn .mi { width: 26px; display: grid; place-items: center; color: #b5c4ca; }
.ui-icon { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex-shrink: 0; }
.mbtn b { font-size: 15px; font-weight: 650; }
.mbtn small { font-size: 12px; }
.mbtn::after { content: '↗'; margin-left: auto; color: #95a5ac; font-size: 19px; }
.mbtn.hero, .primary { background: #ff854c; color: #1b1713; border: 1px solid #ff9b69; box-shadow: none; }
.mbtn.hero .mi, .mbtn.hero small, .mbtn.hero::after { color: #472d1e; }
.mbtn.hero:hover:not(:disabled), .primary:hover:not(:disabled) { background: #ffa16f; filter: none; }
.mbtn.ghost { min-height: 48px; border: 0; padding-top: 7px; padding-bottom: 7px; }
.mbtn.ghost small { display: none; }
.mbtn:hover:not(:disabled) { transform: translateX(3px); border-color: #c2805b; }
.ui-switch { border-top: 1px solid var(--line); padding-top: 17px; width: min(100%, 415px); margin-top: 0; font-size: 12px; }
.ui-switch small { font-size: 11px; line-height: 1.5; }
.seg { background: #101619; }
.seg button { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.seg button.on { background: #344047; box-shadow: none; color: #fff; }
.armor-study { position: absolute; top: 140px; right: 4vw; width: 45%; margin: 0; }
.study-heading { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 0 13px; color: #9dabb1; font: 10px Consolas, monospace; letter-spacing: 1.5px; }
.armor-study svg { width: 100%; display: block; }
.armor-study figcaption { border-top: 1px solid var(--line); padding-top: 19px; }
.armor-study figcaption span { font: 10px Consolas, monospace; letter-spacing: 1.4px; color: #c1cdce; }
.armor-study figcaption i { margin-right: 9px; }
.armor-study figcaption p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 10px 0 0; }
#app { grid-template-columns: 360px minmax(0, 1fr); height: 100dvh; }
#panel { padding: 20px 16px; gap: 15px; scrollbar-width: thin; scrollbar-color: #485860 #151d21; }
.brand { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.logo { background: var(--accent); color: #201b17; border-radius: 4px; width: 40px; height: 40px; }
.brand h1 { letter-spacing: .6px; text-transform: uppercase; font-size: 16px; }
.sub { font-size: 11px; letter-spacing: 1.5px; margin-top: 2px; }
.topbar { gap: 6px; flex-wrap: wrap; }
.topbar button { padding: 8px; font-size: 12px; min-height: 36px; background: #1b252a; }
.card { padding: 14px; box-shadow: 0 3px 12px #00000010; }
.card-h { margin-bottom: 12px; }
h2 { color: #bdc9cc; font-size: 11px; letter-spacing: 1.6px; }
.layer { padding: 10px; background: #141e23; }
.layer-nums { gap: 8px; flex-wrap: wrap; }
.layer-top .icon { width: 34px; height: 34px; }
.lnum { border-radius: 3px; }
#addLayer { min-height: 36px; }
.primary { min-height: 48px; border-radius: 5px; font-size: 14px; letter-spacing: 2px; }
#again, .io button { min-height: 36px; }
#modes { padding: 12px; background: #151d21; gap: 12px; }
#modeBtns { gap: 5px; }
#modeBtns button { min-height: 34px; background: transparent; border-color: transparent; color: #aebcc2; }
#modeBtns button.on { background: #34291f; border-color: #a86d47; color: #ffc19b; }
#viewport { background-color: #10181d; background-image: linear-gradient(#7896a008 1px, transparent 1px), linear-gradient(90deg, #7896a008 1px, transparent 1px); background-size: 40px 40px; }
#empty { padding: 150px 24px 80px; line-height: 1.8; font-size: 16px; color: #becace; }
#empty::before { content: '+'; color: #ff854c; border: 1px solid #51646d; width: 58px; height: 58px; line-height: 54px; font: 42px/54px Consolas, monospace; margin: 0 auto 22px; border-radius: 50%; }
#empty span { color: var(--muted); line-height: 1.6; max-width: 440px; margin: 8px auto 0; }
#empty b { color: var(--accent); font-size: 13px; letter-spacing: 2px; }
#empty p { margin: 0; }
#missionCard .mc-top { flex-wrap: wrap; }
#missionCard .mc-top .back { min-height: 32px; }
#missionCard .mc-top h2 { flex-basis: 65%; order: 2; }
#missionCard .mc-top .stars { margin-left: auto; }
.lg-block { background: #151e24e8; padding: 10px 12px; }
#viewBtns button { min-height: 34px; }
#timeline { padding: 12px; background: #151d21; }
#play { width: 42px; height: 36px; color: var(--accent); }
#scrub { min-width: 30px; }
#tlabel { min-width: 66px; }
#missions .ms-inner { max-width: 1200px; padding: 48px 32px; }
#missions .ms-head { margin-bottom: 18px; gap: 20px; }
#missions .ms-head h2 { font-size: clamp(24px, 4vw, 38px); font-weight: 750; }
#missions p.lead { max-width: 880px; font-size: 14px; line-height: 1.8; margin-bottom: 30px; }
.mgrid { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 16px; }
.mcard { border-radius: 5px; padding: 22px; min-height: 240px; gap: 10px; position: relative; background: linear-gradient(135deg, #223036, #172126); }
.mcard:not(:disabled) { border-top: 2px solid var(--accent); }
.mcard .ic { color: var(--accent); display: flex; align-items: center; height: 28px; }
.mcard .num { font: 10px Consolas, monospace; letter-spacing: 1.8px; text-transform: uppercase; }
.mcard b { font-size: 18px; }
.mcard .ms { line-height: 1.6; }
.mcard .reward { line-height: 1.6; color: #c2aa86; }
.mcard:disabled { opacity: .65; background: #182126; }
.mcard:disabled .ic { color: #84959d; }
.stars { margin-top: 4px; font-size: 18px; }
.stars .off { color: #647078; }
.status-good { color: var(--good); }
.status-warn { color: var(--warn); }
.status-bad { color: var(--bad); }
.threat .st > span { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 3px; font: bold 14px/1 Consolas, monospace; }
/* Главы кампании */
.chapter { margin-bottom: 34px; }
.chapter .ch-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 8px; }
.chapter .ch-num { font: 10px Consolas, monospace; letter-spacing: 1.8px; text-transform: uppercase; color: var(--accent); }
.chapter h3 { margin: 0; font-size: 20px; font-weight: 700; }
.chapter .ch-stars { margin-left: auto; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chapter .ch-lead { color: var(--muted); margin: 0 0 14px; max-width: 880px; line-height: 1.6; }
.chapter.locked h3 { color: var(--muted); }
/* Серия попаданий: кружок на каждый выстрел, по нажатию — повтор этого выстрела */
.threat-wrap { display: flex; flex-direction: column; gap: 3px; }
.hit-dots { display: flex; gap: 4px; padding-left: 28px; }
.hit-dots .hd { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; background: #131820; border: 1px solid var(--line); border-radius: 3px; font: 11px Consolas, monospace; color: var(--muted); }
.hit-dots button.hd { cursor: pointer; }
.hit-dots button.hd:hover { border-color: var(--muted); }
.hit-dots .hd.cur { border-color: var(--accent); }
.threat .hits { color: var(--accent-2); font-weight: 600; }
.rules { line-height: 1.5; }
.back-btn { min-height: 40px; }
.about-box { border-radius: 6px; padding: 30px; }
.about-box p { line-height: 1.8; }
.about-close { width: 36px; height: 36px; }
@media (min-width: 1500px) { .armor-study { max-width: 680px; right: 8vw; } }
@media (max-width: 1000px) { .menu-inner { padding-left: 5vw; } .menu-title { font-size: 64px; } .armor-study { top: 175px; right: 3vw; } }
@media (max-width: 820px) {
  #app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; height: auto; }
  #main { height: 80dvh; min-height: 510px; }
  #panel { padding: 18px; overflow: visible; }
  .menu-masthead { padding: 18px 0; font-size: 9px; letter-spacing: 1px; }
  .menu-masthead > span:last-child { display: none; }
  .menu-inner { width: 100%; max-width: 540px; padding: 30px 26px; margin: auto; }
  .menu-title { font-size: clamp(56px, 12vw, 80px); }
  .menu-btns, .ui-switch { width: 100%; }
  .armor-study { position: relative; top: auto; right: auto; width: calc(100% - 52px); max-width: 488px; margin: 0 auto 32px; }
  .armor-study svg { max-height: 350px; }
  #missions .ms-inner { padding: 25px 20px; }
  #missions .ms-head { gap: 12px; flex-wrap: wrap; }
  #missions p.lead { font-size: 13px; }
  #empty { font-size: 14px; padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } .mbtn:hover:not(:disabled), .mcard:hover:not(:disabled) { transform: none; } }
