/* Translate the compact fire label without changing the weapon name. */
:root:lang(en) { --mars-fire-label:'FIRE'; }
:root { --mars-mint:#a4ffdc; --hud-silver:#b8c0cd; --hud-amber:#ffb327; }
.hud-life-readout { display:flex;flex-direction:column;align-items:center;gap:3px; }
#hud-lives { font:800 9px system-ui;color:#ffe1b0;white-space:nowrap; }
.mars-game-over #result-title { color:#ff776b;letter-spacing:.1em;text-shadow:0 3px 22px #e5473e44; }
#screen-result.mars-game-over { background:linear-gradient(#060d19df,#0c1220eb),url('art/martian-crater-painted-v2.png') center/cover;border-inline:1px solid #ee826629; }
.mars-death { position:absolute;inset:0;z-index:20;display:flex;justify-content:center;align-items:flex-start;padding-top:28px;box-sizing:border-box;background:linear-gradient(#100811a0,transparent 35%,transparent 80%,#05080c60);text-align:center;animation:mars-death-fade 1.4s ease-out both;pointer-events:none; }
.mars-death[hidden] { display:none; }
.mars-death span { display:block;color:#bbafa9;font:600 clamp(10px,2vw,15px) system-ui;letter-spacing:.3em; }
.mars-death strong { display:block;margin-top:9px;color:#ff8876;font:850 clamp(20px,4vw,38px) system-ui;letter-spacing:.12em;text-shadow:0 3px 30px #b7312255; }
.is-dying .mars-touch,.is-dying #btn-map,.is-dying #btn-pause { pointer-events:none;opacity:.45; }
@keyframes mars-death-fade { from { opacity:0; } to { opacity:1; } }
@media (prefers-reduced-motion:reduce) { .mars-death { animation:none; } }
#mars-world-overlay { position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1; }
.mars-arrival { position:absolute;inset:0;z-index:8;pointer-events:none;color:#edf1e9; }
.mars-arrival[hidden] { display:none; }
.mars-arrival-copy { position:absolute;left:24px;bottom:calc(env(safe-area-inset-bottom,0px) + 56px);max-width:calc(100% - 48px);text-shadow:0 2px 6px #000; }
#arrival-title { font:750 clamp(12px,2vw,21px) system-ui;letter-spacing:.16em;color:#f9d5af; }
#arrival-caption { margin:7px 0 0;font:500 clamp(10px,1.2vw,13px) system-ui;color:#c7d7dc; }
.mars-arrival[data-shot="cockpit"] .mars-arrival-copy { bottom:43%; }
#btn-skip-arrival { position:absolute;right:14px;top:calc(env(safe-area-inset-top,0px) + 48px);pointer-events:auto;min-height:44px;padding:8px 14px;border:1px solid #8198aa66;border-radius:5px;background:#0b1727ad;color:#dce9ed;font:600 12px system-ui;cursor:pointer; }
#btn-skip-arrival span { margin-left:8px;color:#849aab; }
#btn-skip-arrival:focus-visible { outline:2px solid #f6ce92;outline-offset:3px; }
.is-arriving #mars-message { visibility:hidden; }
html.game-cursor-hidden #game-frame.is-arriving,html.game-cursor-hidden #game-frame.is-arriving * { cursor:auto !important; }
html.game-cursor-hidden .is-arriving #btn-skip-arrival { cursor:pointer !important; }
#screen-play { max-width:none;animation:none; }
#screen-title { background:var(--result-veil);gap:9px; }
.mars-logo { width:min(580px,90vw);max-height:43dvh;object-fit:contain;border-radius:12px;box-shadow:0 12px 40px #0007; }
.mars-title { font-size:clamp(1.4rem,5vw,2.4rem);letter-spacing:.09em;color:#ffe3c4;margin:0 0 12px; }
.mars-tagline { margin:0 0 8px;color:#d6d7cb;font-size:.9rem; }
.mars-link { background:none;border:0;color:#a5c4c5;text-decoration:underline;padding:10px;font:inherit;cursor:pointer; }
.mars-avatar-label { display:flex;align-items:center;justify-content:center;gap:10px;margin:10px;color:#bed4dc; }
.mars-avatar-label select { background:#182b39;color:#eef4ef;border:1px solid #536a75;border-radius:8px;padding:8px 12px; }
.mars-result { font:850 clamp(3rem,14vw,5rem) system-ui;color:var(--mars-mint); }
/* Keep the entire mission summary and its actions inside the viewport. */
#screen-result.screen { max-width:520px;gap:8px;padding:calc(68px + env(safe-area-inset-top,0px)) 20px calc(16px + env(safe-area-inset-bottom,0px)); }
#screen-result.screen .back-link { margin:0;min-height:40px;padding:7px 13px;font-size:12px; }
#screen-result .series-badge { font-size:9px;line-height:1.3;letter-spacing:.25em; }
#screen-result #result-title { font-size:clamp(26px,4.5vw,40px);line-height:1.08; }
#screen-result .mars-result { font-size:clamp(42px,8dvh,64px);line-height:1; }
#screen-result :is(#result-stats,#result-phrase,#result-rank,#record-note) { margin:0;max-width:100%; }
#screen-result #result-stats { font-size:12px;line-height:1.4; }
#screen-result #result-phrase { max-width:42ch;font-size:13px;line-height:1.4; }
#screen-result #result-rank:empty { display:none; }
#screen-result .record-note { font-size:12px;line-height:1.3;letter-spacing:.04em; }
#screen-result.screen .actions { display:grid;grid-template-columns:1fr 1fr;width:min(360px,100%);margin:4px 0 0;gap:7px; }
#screen-result .actions #btn-again { grid-column:1 / -1; }
#screen-result .actions .btn { width:100%;min-width:0;min-height:44px;padding:9px 12px;font-size:12px;line-height:1.25;letter-spacing:.04em; }
#screen-result .game-guest-notice { margin:4px 0 0;padding:6px 10px;font-size:10px;line-height:1.35; }
@media (max-height:700px) {
 #screen-result.screen { gap:6px;padding-top:calc(62px + env(safe-area-inset-top,0px));padding-bottom:calc(12px + env(safe-area-inset-bottom,0px)); }
 #screen-result .series-badge { display:none; }#screen-result #result-title { font-size:30px; }#screen-result .mars-result { font-size:48px; }
 #screen-result #result-stats { font-size:11px; }#screen-result #result-phrase { font-size:12px; }
}
@media (max-height:580px) and (orientation:portrait) {
 #screen-result.screen { gap:5px; }#screen-result #result-title { font-size:26px; }#screen-result .mars-result { font-size:40px; }
}
@media (orientation:landscape) and (max-height:500px) {
 #screen-result.screen { max-width:900px;display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,240px);align-content:center;justify-items:center;gap:5px 24px;padding:calc(60px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px)); }
 #screen-result > :is(.series-badge,#result-title,#result-rescued,#result-stats,#result-phrase,#result-rank,#record-note) { grid-column:1;min-width:0;max-width:100%;margin:0; }
 #screen-result .series-badge { font-size:10px; }
 #screen-result #result-title { font-size:clamp(24px,7vh,34px);line-height:1.1; }
 #screen-result .mars-result { font-size:clamp(32px,12vh,48px);line-height:1; }
 #screen-result #result-stats { font-size:12px;line-height:1.3; }
 #screen-result #result-phrase { font-size:12px;line-height:1.35; }
 #screen-result #result-rank:empty { display:none; }
 #screen-result .record-note { font-size:11px;letter-spacing:.04em;line-height:1.3; }
 #screen-result.screen .actions { display:flex;grid-column:2;grid-row:1 / span 7;align-self:center;width:100%;margin:0;gap:8px; }
 #screen-result .actions .btn { width:100%;min-width:0;min-height:44px;padding:10px 12px;font-size:12px;letter-spacing:.04em; }
 #screen-result .back-link { position:absolute;left:50%;right:auto;top:calc(12px + env(safe-area-inset-top,0px));transform:translateX(-50%);margin:0;min-height:40px; }
 #screen-result .game-guest-notice { grid-column:1 / -1;grid-row:8;margin:0;padding:4px 8px;font-size:10px;line-height:1.3; }
}
@media (orientation:landscape) and (max-height:280px) {
 #screen-result.screen { gap:3px 18px;padding-top:calc(56px + env(safe-area-inset-top,0px));padding-bottom:calc(8px + env(safe-area-inset-bottom,0px)); }
 #screen-result .series-badge { display:none; }
 #screen-result #result-title { font-size:22px; }
 #screen-result .mars-result { font-size:30px; }
}
.mars-hud { position:absolute;inset:0;pointer-events:none;font-family:'Arial Narrow',Arial,sans-serif;font-variant-numeric:tabular-nums;z-index:5; }
.hud-defs { position:absolute;width:0;height:0;overflow:hidden; }
.hud-vitals { position:absolute;top:calc(env(safe-area-inset-top,0px) + 10px);left:12px;display:flex;gap:8px;align-items:flex-start;filter:drop-shadow(0 3px 6px #000c); }
.hud-portrait { width:68px;height:70px; }
.hud-art { display:block;width:100%;height:100%;pointer-events:none;filter:drop-shadow(0 2px 2px #0008); }
.hud-vital-bars { padding-top:5px; }
.hud-hearts { display:flex;gap:3px;height:24px; }
.hud-heart { width:24px;height:24px;overflow:visible;filter:drop-shadow(0 2px 2px #0009); }
.heart-shell { fill:#32232c;stroke:#100b10;stroke-width:2; }
.heart-fill { stroke:#ff777844;stroke-width:1; }
.heart-shine { fill:none;stroke:#fff2ec;stroke-width:3;stroke-linecap:round;opacity:.8; }
.hud-heart.is-empty .heart-shine { opacity:.08; }
.hud-jet-row { margin-top:6px;display:flex;align-items:flex-start;gap:5px; }
.hud-jet-row > svg { width:12px;height:24px; }
.hud-jet-row > div { flex:1; }
.hud-gauge { display:block;overflow:hidden;background:#060b13;border:2px solid #677080;box-shadow:0 0 0 2px #03060e,inset 0 2px 3px #000b;border-radius:5px; }
.hud-gauge > span { display:block;height:100%;width:0;transition:width .12s linear; }
.hud-jet { width:128px;height:11px;padding:1px;box-sizing:content-box; }
.hud-jet > span { width:100%;background:linear-gradient(#66dcff,#09b4ef 55%,#007cba);box-shadow:inset 0 1px #cff7ff9c,0 0 8px #12bfff80; }
.hud-jet-label { display:block;margin-top:4px;font-size:10px;font-weight:800;letter-spacing:.06em;color:#e2e1dc;text-shadow:0 2px 2px #000; }
.jet-locked .hud-jet > span { background:linear-gradient(#ffd27b,#fa752f); }
.jet-locked .hud-jet-label { color:#ffac69; }
.is-critical .hud-portrait { filter:drop-shadow(0 0 6px #fa3c30); }
.is-critical .hud-hearts { animation:hud-critical 1.1s ease-in-out infinite; }
@keyframes hud-critical { 50% { filter:drop-shadow(0 0 5px #ff4437); } }
.hud-mission { position:absolute;right:12px;top:calc(env(safe-area-inset-top,0px) + 10px);display:flex;gap:6px;align-items:stretch; }
.hud-mission-readouts { display:grid;grid-template-columns:minmax(0,1fr);gap:4px;width:106px;min-width:0; }
.hud-instrument,.hud-map-button,.equipment-card { border:2px solid #66707e;border-radius:7px;background:linear-gradient(145deg,#18202bbf,#060a12ee 62%);box-shadow:inset 0 0 0 2px #070a13,inset 0 3px 7px #b9c3d915,0 2px 5px #000a; }
.hud-instrument { padding:4px 6px;text-align:center;min-width:0; }
.hud-caption { display:block;color:#bfc5cd;letter-spacing:.05em;font-size:9px;font-weight:800;line-height:1.2; }
.hud-instrument strong { display:block;font-size:22px;line-height:1.12;font-weight:850;color:var(--hud-amber);text-shadow:0 2px 2px #000;white-space:nowrap;margin-top:2px; }
#hud-depth small { font-size:.62em;font-weight:750;margin-left:4px; }
.hud-crew > div { display:flex;align-items:center;justify-content:center;gap:6px; }
.hud-crew svg { width:12px;height:18px;fill:#d6dbe2;filter:drop-shadow(0 2px 1px #000); }
.hud-crew strong { font-size:20px; }
.hud-crew small { font-size:.8em;font-weight:800; }
.hud-map-button { position:relative;display:block;width:124px;height:99px;overflow:hidden;padding:4px;pointer-events:auto;cursor:pointer; }
.hud-map-button canvas { display:block;width:100%;height:100%;border-radius:2px; }
.hud-map-button > span { position:absolute;bottom:5px;right:8px;font-size:8px;letter-spacing:.1em;font-weight:700;color:#a5afbf;background:#080c14bb;padding:2px 3px; }
.hud-map-button kbd { color:#6e788a;font:inherit;margin-left:4px; }
.hud-map-button:hover { border-color:#c1c8d1; }
.hud-location { position:absolute;bottom:17px;right:14px;display:flex;flex-direction:column;gap:4px;align-items:flex-end;text-shadow:0 2px 3px #000;font-size:10px;font-weight:800;letter-spacing:.08em;color:#b5bdca;max-width:calc(100% - 280px); }
#hud-radar { color:#d3b28c;font-size:10px; }
.hud-radiation { position:absolute;left:88px;top:82px;font-size:9px;letter-spacing:.08em;color:#cae28d;background:#101b12cc;padding:4px 6px;border-left:2px solid #b5d079; }
.hud-radiation[hidden] { display:none; }
#screen-play .game-controls { top:calc(env(safe-area-inset-top,0px) + 118px);right:12px;bottom:auto;left:auto;transform:none;flex-direction:column;padding:0;border:0;background:none;gap:5px; }
#screen-play .game-controls > button { width:36px;height:36px;min-height:36px;flex-basis:36px;border-radius:6px;padding:7px;border:2px solid #596271;background:linear-gradient(145deg,#29313dd9,#080d16ec);color:#bbc5d3;box-shadow:inset 0 0 0 1px #0b101c,0 2px 4px #0007; }
#screen-play .game-controls svg { width:19px;height:19px; }
#screen-play #btn-mute[hidden] { display:none; }
#screen-play #btn-master-mute[aria-pressed="true"] { border-color:#a06b61;color:#e6aa99; }
#mars-message { position:absolute;z-index:6;top:calc(env(safe-area-inset-top,0px) + 117px);left:50%;transform:translateX(-50%);width:max-content;max-width:min(620px,80%);padding:6px 10px;border:1px solid #766958;border-left:3px solid #bc9060;border-radius:4px;background:linear-gradient(110deg,#11151deb,#17191dcc);box-shadow:0 3px 12px #0006;color:#dedbd4;font:650 11px/1.45 Arial,sans-serif;text-align:center;pointer-events:none;opacity:0;transition:opacity .2s; }
#mars-message.visible { opacity:1; }
.mars-touch { position:absolute;z-index:7;bottom:calc(env(safe-area-inset-bottom,0px) + 12px);left:14px;right:14px;display:flex;align-items:flex-end;justify-content:flex-start;gap:9px;pointer-events:none; }
.action-buttons { position:relative;display:flex;gap:6px;align-items:flex-end; }
.mars-touch .weapon-switch { position:absolute;bottom:calc(100% + 7px);left:0;height:25px;min-height:25px;padding:3px 10px;border:1px solid #78858d;border-radius:5px;background:#15222ee8;color:#d8dce2;font-size:10px;font-weight:800;letter-spacing:.035em; }
.weapon-switch kbd { margin-left:8px;color:#9caebc;font:9px Arial,sans-serif; }
.hud-health-number { color:#e3dbce;font:700 11px Arial,sans-serif;align-self:center;margin-left:5px; }
@media(max-width:600px){.hud-health-number{font-size:8px;margin-left:2px}.mars-touch .weapon-switch{width:100%;height:24px;font-size:9px}.weapon-switch kbd{display:none}}
.movement-buttons { display:none;gap:5px; }
.mars-touch button { position:relative;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;cursor:pointer;color:#bfc7d4;font-family:'Arial Narrow',Arial,sans-serif; }
.mars-touch .equipment-card { width:72px;height:90px;padding:4px 5px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px; }
.equipment-card::before,.equipment-card::after { content:'';position:absolute;top:4px;width:3px;height:3px;background:#a0a5ac;border-radius:50%;box-shadow:0 1px 1px #000; }
.equipment-card::before { left:4px; }.equipment-card::after { right:4px; }
.equipment-title { font-size:9px;line-height:12px;font-weight:800;letter-spacing:.035em; }
.equipment-card .hud-art { height:42px;flex:0 0 42px;width:56px; }
.equipment-card .hud-art-grenade,.equipment-card .hud-art-portal { width:32px; }
.equipment-amount { font:800 20px/1 Arial,sans-serif;text-shadow:0 2px 1px #000; }
.equipment-card[data-action="fire"] .equipment-amount { font-size:24px;line-height:.82; }
.equipment-status { font-size:9px;line-height:20px;letter-spacing:.06em; }
.equipment-card kbd { position:absolute;right:6px;bottom:7px;font:700 8px Arial,sans-serif;color:#707c8d; }
.hud-laser { position:absolute;bottom:3px;left:7px;right:7px;height:3px;border:0;border-radius:1px;background:#394453;box-shadow:none; }
.hud-laser > span { background:linear-gradient(90deg,#c17c46,#ff563b); }
.equipment-card.is-locked { border-color:#ac614b;color:#ffa16f; }
.equipment-card.is-ready { border-color:#779e9e; }.equipment-card.is-ready .equipment-status { color:#9fe7df; }
.equipment-card.pressed,.mars-touch button:active { transform:translateY(2px);border-color:#d3c5ad;background:linear-gradient(145deg,#4a4334d9,#121720ee); }
.mars-touch button:disabled { opacity:.58;cursor:default; }
.mars-touch .jet-button { display:none; }
.hud-map-button:focus-visible,.mars-touch button:focus-visible { outline:2px solid #f6ce92;outline-offset:3px; }
.mars-map { position:fixed;inset:0;margin:auto;width:min(540px,calc(100vw - 28px));max-height:85dvh;overflow:auto;padding:22px;box-sizing:border-box;border:2px solid #67717f;border-radius:9px;background:linear-gradient(145deg,#1e2630f5,#0d121af5);color:#ecede7;box-shadow:inset 0 0 0 2px #070b13,0 20px 90px #0008; }
.mars-map::backdrop { background:#040a16aa; }.mars-map h2 { margin:0 0 10px; }.mars-map p { color:#b4c0cd;font-size:13px;line-height:1.5; }.mars-map-list { display:grid;gap:7px; }
.mars-map-list button { display:flex;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #566473;border-radius:5px;background:#252f3b;color:#e0e5e9;text-align:left;font:600 13px system-ui;cursor:pointer; }.mars-map-list button:disabled { opacity:.4;cursor:default; }
.mars-map .actions { display:flex;gap:8px;margin-top:15px; }.mars-map .btn { padding:10px 14px;font-size:13px;min-height:44px; }.mars-map button:focus-visible { outline:2px solid #ffd99b;outline-offset:3px; }
@media (pointer:coarse), (max-width:760px) {
 .mars-touch { left:10px;right:10px;bottom:calc(env(safe-area-inset-bottom,0px) + 12px);justify-content:space-between;gap:8px; }
 .movement-buttons { display:flex; }
 .movement-buttons button { width:44px;height:49px;border:2px solid #69717e;border-radius:7px;background:linear-gradient(145deg,#28323dc9,#080d15de);box-shadow:inset 0 0 0 1px #04070e,0 3px 5px #0007;font-size:19px; }
 .action-buttons { display:grid;grid-template-columns:52px 52px;gap:5px; }
 .mars-touch .equipment-card { width:52px;height:62px;gap:1px;padding:3px; }
 .equipment-title { font-size:7px;line-height:11px; }
 .equipment-card .hud-art { height:24px;flex-basis:24px;width:39px; }
 .equipment-card .hud-art-grenade,.equipment-card .hud-art-portal { width:22px; }
 .equipment-amount { font-size:17px;line-height:17px; }
 .equipment-card[data-action="fire"] .equipment-amount { font-size:22px;line-height:17px; }
 .equipment-status { font-size:7px;line-height:16px; }
 .equipment-card kbd { display:none; }.equipment-card::before,.equipment-card::after { width:2px;height:2px;top:3px; }
 .weapon-switch kbd { display:none; }
 .mars-touch .jet-button { display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;width:52px;height:62px;border:2px solid #657d84;border-radius:7px;background:linear-gradient(145deg,#30454ace,#0b1922ee);box-shadow:inset 0 0 0 1px #071018; }
 .jet-button svg { width:17px;height:24px; }.jet-button span { font-size:9px;font-weight:800;letter-spacing:.1em; }
 .hud-location { bottom:180px;right:12px;max-width:210px;font-size:9px;gap:4px; }#hud-radar { font-size:8px; }
}
@media (max-width:600px) {
 .hud-vitals { top:calc(env(safe-area-inset-top,0px) + 8px);left:8px;gap:5px; }.hud-portrait { width:43px;height:46px; }.hud-vital-bars { padding-top:1px; }
 .hud-hearts { gap:2px;height:18px; }.hud-heart { width:17px;height:18px; }
 .hud-jet-row { margin-top:5px;gap:4px; }.hud-jet-row > svg { width:9px;height:17px; }.hud-jet { width:78px;height:8px;padding:1px;border-width:1px;box-shadow:0 0 0 1px #000; }
 .hud-jet-label { font-size:8px;margin-top:4px;letter-spacing:.06em; }
 .hud-mission { top:calc(env(safe-area-inset-top,0px) + 8px);right:8px;gap:4px; }.hud-mission-readouts { width:78px;gap:4px; }.hud-instrument { padding:3px;border-width:1px;border-radius:5px; }
 .hud-caption { font-size:7px;letter-spacing:.045em; }.hud-instrument strong { font-size:20px;margin-top:1px; }.hud-crew strong { font-size:18px; }.hud-crew > div { gap:4px; }.hud-crew svg { width:10px;height:14px; }
 .hud-map-button { width:68px;height:73px;padding:3px;border-width:1px;border-radius:5px; }.hud-map-button > span { right:3px;bottom:3px;font-size:6px; }.hud-map-button kbd { display:none; }
 .hud-location { top:66px;bottom:auto;left:10px;right:auto;max-width:165px;align-items:flex-start;gap:4px;font-size:8px;letter-spacing:.06em; }#hud-radar { font-size:8px; }
 .hud-radiation { top:93px;left:10px;font-size:8px;padding:3px 5px; }
 #screen-play .game-controls { top:calc(env(safe-area-inset-top,0px) + 89px);right:8px;flex-direction:row;gap:5px; }#screen-play .game-controls > button { width:32px;height:32px;min-height:32px;flex-basis:32px;padding:5px;border-width:1px; }
 #mars-message { top:calc(env(safe-area-inset-top,0px) + 130px);font-size:10px;padding:6px 9px;max-width:88%; }
}
@media (max-width:360px) {
 .hud-portrait { width:38px;height:41px; }.hud-vitals { gap:4px; }.hud-heart { width:16px;height:17px; }.hud-hearts { height:17px;gap:1px; }.hud-jet { width:70px; }
 .hud-mission-readouts { width:72px; }.hud-map-button { width:59px; }.hud-caption { font-size:6.5px; }.hud-instrument strong { font-size:19px; }.hud-location { max-width:140px;font-size:7px; }
 .movement-buttons button { width:40px;height:46px; }
}
@media (max-height:480px) and (min-width:601px) {
 .hud-vitals { top:7px;left:10px;gap:6px; }.hud-portrait { width:44px;height:47px; }.hud-vital-bars { padding-top:0; }.hud-hearts { height:18px;gap:3px; }.hud-heart { width:18px;height:18px; }
 .hud-jet-row { margin-top:5px;gap:4px; }.hud-jet-row > svg { width:9px;height:18px; }.hud-jet { width:96px;height:8px;padding:1px;border-width:1px; }.hud-jet-label { font-size:9px;margin-top:3px; }
 .hud-mission { top:7px;right:10px;gap:5px; }.hud-mission-readouts { width:82px;gap:4px; }.hud-caption { font-size:8px; }.hud-instrument { padding:3px; }.hud-instrument strong { font-size:20px; }.hud-crew strong { font-size:18px; }.hud-crew svg { width:10px;height:14px; }.hud-map-button { width:90px;height:78px;padding:3px; }
 .hud-location { bottom:180px;right:12px;font-size:8px;gap:3px; }#hud-radar { font-size:8px; }.hud-radiation { left:60px;top:61px;font-size:8px; }
 #screen-play .game-controls { top:94px;right:10px;flex-direction:row;gap:5px; }#screen-play .game-controls > button { width:30px;height:30px;min-height:30px;flex-basis:30px;border-width:1px;padding:5px; }
 #mars-message { top:84px;max-width:55%;font-size:9px;padding:5px 8px; }
 .mars-logo { max-height:35dvh; }.mars-tagline { font-size:12px; }
}
@media (prefers-reduced-motion:reduce) { .hud-gauge > span,#mars-message { transition:none; }.is-critical .hud-hearts { animation:none; } }

/* Brazilian rescue mission: a compact briefing, with the same marked ship as gameplay. */
#screen-title.screen { max-width:820px;display:flex;flex-direction:column;gap:10px;padding:62px 20px 22px; }
#screen-title .mars-title { margin:0;font-size:clamp(24px,4vw,38px);letter-spacing:.06em; }
.mars-operation { display:flex;align-items:center;justify-content:center;gap:8px;margin:0;color:#dcc396;font:750 11px Arial,sans-serif;letter-spacing:.1em; }
.mars-operation img { width:27px;height:27px;object-fit:contain; }
.mars-operation > span { padding-left:8px;border-left:1px solid #938667;color:#a8c6b3; }
.mars-language { display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;width:100%;margin:2px 0;color:#b9cbd0;font-size:12px; }
.mars-language > span { flex-basis:100%;font-weight:700; }
.mars-language button { padding:7px 10px;border:1px solid #617c88;border-radius:5px;background:#101c27;color:#d4e3e8;font:inherit;cursor:pointer; }
.mars-language button[aria-pressed="true"] { border-color:#64d7dd;background:#183d45;color:#e6ffff;box-shadow:inset 0 0 0 1px #64d7dd; }
.mars-language button:focus-visible { outline:2px solid #ffd58a;outline-offset:3px; }
.mars-graphics-notice { width:100%;max-width:640px;padding:12px 16px;border:1px solid #bc8a46;border-left:4px solid #efb65f;border-radius:6px;background:#211c16;color:#eed5ae;text-align:left;font-size:13px;line-height:1.5; }
.mars-graphics-notice strong { color:#ffcf86; }
.mars-graphics-notice p { margin:6px 0; }
.mars-graphics-notice button { min-height:44px;padding:6px 0;border:0;background:transparent;color:#ffcf86;font:700 13px Arial,sans-serif;text-decoration:underline;text-underline-offset:3px;cursor:pointer; }
.mars-graphics-notice button:focus-visible { outline:2px solid #ffd58a;outline-offset:3px; }
.mars-graphics-notice [hidden] { display:none; }
#screen-title.screen > .mars-mission-cover { width:min(100%,640px);max-width:640px;max-height:none;aspect-ratio:8/3;height:auto;border:1px solid #6e715b;border-radius:7px;box-shadow:0 6px 25px #0007; }
.hud-art-portrait { object-fit:contain; }
.hud-portrait::after { content:'CANÁRIO';display:block;margin-top:-4px;text-align:center;color:#d9d3bd;font:800 7px Arial,sans-serif;letter-spacing:.08em;text-shadow:0 1px 2px #000; }
.mars-arrival-copy { max-width:min(680px,calc(100% - 48px)); }
#arrival-caption { line-height:1.55; }
@media (max-width:600px) {
 #screen-title.screen { gap:8px;padding:64px 16px 18px; }
 #screen-title .mars-title { font-size:clamp(20px,6.65vw,26px); }
 .mars-operation { font-size:9px;gap:6px; }
 .mars-operation img { width:24px;height:24px; }
 .hud-portrait::after { font-size:5px;margin-top:-2px; }
 .mars-arrival-copy { left:16px;max-width:calc(100% - 32px); }
}
@media (min-width:760px) and (max-height:520px) {
 #screen-title.screen { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 22px;padding:58px 24px 12px; }
 #screen-title.screen > .back-link { grid-column:1;grid-row:1;margin-bottom:0; }
 #screen-title.screen > .mars-mission-cover { grid-column:1;grid-row:2 / span 3;max-height:none;width:100%; }
 #screen-title .mars-title { grid-row:1; }
 #screen-title .mars-operation { grid-row:2;font-size:9px; }.mars-operation img { width:23px;height:23px; }
 #screen-title #btn-start { grid-row:4; }
 #screen-title .mars-language { grid-column:2;grid-row:3;font-size:10px;gap:4px; }
 #screen-title .mars-language button { padding:5px 6px; }
 #screen-title #btn-how-to { grid-row:5; }
 #screen-title .game-menu-links { grid-column:2;grid-row:5; }
 #screen-title #guest-notice-title { grid-column:1;grid-row:5;margin:0;padding:5px 9px;font-size:10px; }
 #screen-title .mars-graphics-notice { grid-column:1 / -1;grid-row:6;max-width:none;margin-top:8px; }
 #screen-title .mars-title { font-size:24px; }
 .hud-portrait::after { font-size:5px; }
}
.mars-fps { position:absolute;z-index:12;top:10px;left:50%;transform:translateX(-50%);padding:3px 7px;border:1px solid #7de3bf55;border-radius:4px;background:#081217bf;color:#b4ffdb;font:700 11px/1.2 monospace;pointer-events:none;font-variant-numeric:tabular-nums; }
.mars-fps.is-slow { color:#ffd185;border-color:#ffd18566; }
.mars-fps[hidden] { display:none; }
.equipment-card.is-empty { border-color:#dc8968;color:#ffb494; }
.mars-hud.is-poisoned .hud-hearts { filter:drop-shadow(0 0 5px #9de864); }
@media (pointer:coarse), (max-width:760px) {
 .mars-touch { left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));gap:14px; }
 .movement-buttons { display:grid;grid-template-columns:54px 54px;grid-template-rows:42px 58px;gap:7px; }
 .movement-buttons button { width:54px;height:58px;font-size:23px;border-radius:14px; }
 .movement-buttons [data-action="left"] { grid-column:1;grid-row:2; }
 .movement-buttons [data-action="right"] { grid-column:2;grid-row:2; }
 .movement-buttons [data-action="drop"] { grid-column:1 / -1;grid-row:1;justify-self:center;width:44px;height:42px;font-size:19px; }
 .action-buttons { grid-template-columns:62px 62px;grid-template-rows:68px 58px;gap:7px; }
 .mars-touch .equipment-card { width:62px;height:58px;border-radius:12px; }
 .mars-touch [data-action="fire"] { grid-column:2;grid-row:1;height:68px;border-color:#ba936e; }
 .mars-touch [data-action="jump"] { grid-column:1;grid-row:1;width:62px;height:68px;border-radius:12px; }
 .mars-touch [data-action="interact"] { grid-column:1;grid-row:2; }
 .mars-touch [data-action="grenade"] { grid-column:2;grid-row:2; }
 .mars-touch [data-action="interact"] .hud-art { display:none; }
 .mars-touch [data-action="interact"] { justify-content:center;gap:5px; }
 .mars-touch .weapon-switch { height:28px;min-height:28px;width:131px;border-radius:8px; }
 .equipment-title { font-size:8px;max-width:100%;line-height:11px; }
 .equipment-card[data-action="fire"] .hud-art { height:22px;flex-basis:22px; }
 .equipment-card[data-action="fire"] .equipment-title { font-size:0;line-height:11px; }
 .equipment-card[data-action="fire"] .equipment-title::after { content:var(--mars-fire-label,'ATIRAR');font-size:9px; }
 .equipment-card[data-action="fire"] .equipment-amount { font-size:19px; }
 .jet-button span { font-size:10px; }
 .hud-location { bottom:185px; }
}
@media (max-width:360px) {
 .mars-touch { gap:8px; }
 .movement-buttons { grid-template-columns:48px 48px; }
 .movement-buttons button { width:48px; }
 .action-buttons { grid-template-columns:58px 58px; }
 .mars-touch .equipment-card,.mars-touch [data-action="jump"] { width:58px; }
 .mars-touch .weapon-switch { width:123px; }
}
