:root {
  --ink: #061018;
  --night: #08131c;
  --panel: #0d202c;
  --panel-2: #122b38;
  --line: rgba(214, 244, 248, .16);
  --paper: #edf6f6;
  --muted: #9fb3b8;
  --glass: #78d8e8;
  --glass-bright: #d9fbff;
  --orange: #ff9b36;
  --orange-deep: #dc6c18;
  --safe: #66d6a6;
  --warn: #ffd166;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--ink); }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 10% 0%, rgba(38, 110, 125, .24), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(255, 155, 54, .11), transparent 26rem),
    var(--night);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.game-active {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.game-active .game-intro,
body.game-active .under-game,
body.game-active main > :not(.game-stage) {
  display: none;
}

body.game-active main,
body.game-active .game-stage {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body.game-active .game-frame {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--ink);
  background: var(--orange);
  font-weight: 900;
}
.skip-link:focus { transform: none; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.game-intro {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 38px) clamp(16px, 3vw, 42px) clamp(16px, 2.5vw, 30px);
  text-align: center;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: inherit;
  text-decoration: none;
}
.brand-lockup:hover .eyebrow { color: #ffd09b; }

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  transform: rotate(-2deg);
}
.brand-mark i {
  position: absolute;
  inset: 3px;
  border: 3px solid var(--glass-bright);
  background: rgba(120, 216, 232, .18);
  box-shadow: inset 8px 0 0 rgba(255, 255, 255, .07);
}
.brand-mark i::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 4px;
  width: 25px;
  height: 2px;
  transform: rotate(48deg);
  background: rgba(217, 251, 255, .75);
}
.brand-mark b { position: relative; z-index: 1; color: var(--orange); font: 22px/1 var(--display); }
.brand-mark.small { width: 32px; height: 32px; }
.brand-mark.small b { font-size: 17px; }

.eyebrow,
.section-number,
.modal-kicker {
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 1180px;
  margin: 0 auto;
  text-wrap: balance;
  color: #fff;
  font: 400 clamp(40px, 6.4vw, 94px)/.92 var(--display);
  letter-spacing: -.025em;
  text-transform: uppercase;
  text-shadow: 0 5px 0 rgba(0, 0, 0, .16);
}
h1 span { display: block; margin-top: 8px; color: var(--glass-bright); font-size: .38em; letter-spacing: .045em; }
.intro-line { margin: 14px auto 15px; color: #bcd0d3; font-size: clamp(14px, 1.5vw, 18px); }

.launch-row { display: flex; justify-content: center; align-items: stretch; gap: 10px; }

.primary-button,
.secondary-button,
.text-button {
  border: 0;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 950;
  letter-spacing: .06em;
}

.primary-button {
  display: inline-flex;
  min-width: 210px;
  min-height: 64px;
  padding: 10px 26px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 2px solid #ffc47d;
  border-radius: 9px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffb558, var(--orange));
  box-shadow: 0 8px 0 #9d4611, 0 15px 35px rgba(255, 155, 54, .22);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.primary-button span { font: 400 27px/1 var(--display); letter-spacing: .08em; }
.primary-button small { margin-top: 4px; font-size: 10px; letter-spacing: .06em; }
.primary-button:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 10px 0 #9d4611, 0 18px 40px rgba(255, 155, 54, .28); }
.primary-button:active { transform: translateY(5px); box-shadow: 0 3px 0 #9d4611; }
.primary-button.small { min-width: 150px; min-height: 48px; padding: 10px 18px; box-shadow: 0 5px 0 #9d4611; }

.secondary-button {
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid rgba(217, 251, 255, .25);
  border-radius: 8px;
  color: var(--paper);
  background: #15303d;
}
.secondary-button:hover { border-color: var(--glass); background: #1b3d4b; }
.text-button { padding: 10px; color: var(--muted); background: transparent; text-decoration: underline; text-underline-offset: 3px; }

.challenge-banner {
  width: max-content;
  margin: 17px auto 0;
  padding: 7px 12px;
  border: 1px solid rgba(255, 155, 54, .42);
  border-radius: 5px;
  background: rgba(7, 17, 25, .72);
}
.challenge-banner span { margin-right: 9px; color: #bdcdd0; font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.challenge-banner strong { color: var(--orange); }

main { display: block; }

.game-stage {
  width: min(100%, 1700px);
  margin: 0 auto;
  padding: 0 clamp(8px, 1.5vw, 24px);
}

.game-frame {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: min(76vh, 880px);
  min-height: 540px;
  max-height: 880px;
  overflow: hidden;
  border: 2px solid rgba(217, 251, 255, .22);
  border-radius: 13px;
  background:
    linear-gradient(rgba(120, 216, 232, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 216, 232, .035) 1px, transparent 1px),
    linear-gradient(145deg, #15313d, #07131c 58%);
  background-size: 36px 36px, 36px 36px, auto;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, .55);
  touch-action: none;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
}
#game-canvas:focus-visible { box-shadow: inset 0 0 0 4px var(--orange); }

.boot-card {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(55, 133, 151, .25), transparent 34%), rgba(5, 15, 22, .86);
  pointer-events: none;
  transition: opacity .3s ease;
}
.boot-card[hidden] { display: none; }
.boot-card p { margin: 18px 0 4px; color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: .2em; }
.boot-card strong { font-size: clamp(17px, 2vw, 25px); }
.boot-art { position: relative; width: 230px; height: 100px; }
.boot-glass {
  position: absolute;
  left: 60px;
  top: 0;
  width: 130px;
  height: 82px;
  border: 3px solid var(--glass-bright);
  background: linear-gradient(126deg, rgba(255,255,255,.2) 0 8%, transparent 9% 42%, rgba(255,255,255,.13) 43% 49%, transparent 50%), rgba(120,216,232,.19);
  box-shadow: 12px 14px 0 rgba(0,0,0,.2);
}
.boot-worker { position: absolute; z-index: 1; left: 14px; top: 18px; width: 31px; height: 55px; border-radius: 16px 16px 8px 8px; background: #ff9b36; box-shadow: 0 45px 0 -10px #172e3a; }
.boot-worker::before { content: ""; position: absolute; left: 5px; top: -15px; width: 21px; height: 21px; border-radius: 50%; background: #efbd93; border-top: 7px solid #f0b339; }
.boot-worker::after { content: ""; position: absolute; left: 21px; top: 15px; width: 55px; height: 8px; transform: rotate(-8deg); transform-origin: left; border-radius: 8px; background: #efbd93; }

.hud { position: absolute; z-index: 4; inset: 0 0 auto; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(240px, 2.4fr) minmax(150px, 1fr); align-items: start; gap: 10px; padding: 12px; pointer-events: none; }
.hud[hidden] { display: none; }
.hud-rank,
.objective-card,
.hud-actions { min-height: 54px; border: 1px solid rgba(217, 251, 255, .18); border-radius: 7px; background: rgba(4, 14, 21, .86); backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(0,0,0,.17); }
.hud-rank { padding: 8px 10px; }
.hud-rank > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; font-size: 11px; font-weight: 950; letter-spacing: .08em; }
.meter { height: 7px; margin-top: 7px; overflow: hidden; border-radius: 10px; background: #203640; }
.meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange-deep), var(--orange)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.objective-card { justify-self: center; width: min(100%, 650px); padding: 7px 15px 8px; text-align: center; border-color: rgba(255, 155, 54, .4); }
.objective-card small { display: block; margin-bottom: 1px; color: var(--orange); font-size: 9px; font-weight: 950; letter-spacing: .17em; }
.objective-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: white; font-size: clamp(13px, 1.5vw, 18px); letter-spacing: .05em; }
.hud-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 6px; pointer-events: auto; }
.icon-button { min-width: 62px; border: 1px solid rgba(217,251,255,.12); border-radius: 5px; color: #c8d8da; background: #102632; font-size: 9px; font-weight: 950; letter-spacing: .08em; cursor: pointer; }
.icon-button:hover { color: #fff; border-color: var(--glass); }

.control-hint {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border: 1px solid rgba(217, 251, 255, .18);
  border-radius: 5px;
  color: #fff;
  background: rgba(4, 14, 21, .86);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  white-space: nowrap;
  pointer-events: none;
}
.touch-hint { display: none; }

.context-action {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  min-width: 170px;
  padding: 11px 16px;
  border: 2px solid #ffc47d;
  border-radius: 7px;
  color: var(--ink);
  background: var(--orange);
  box-shadow: 0 5px 0 #934211;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  pointer-events: none;
}

.skip-dialogue {
  position: absolute;
  z-index: 7;
  right: 18px;
  bottom: 23%;
  padding: 7px 12px;
  border: 1px solid rgba(217,251,255,.3);
  border-radius: 5px;
  color: #dce7e8;
  background: rgba(5,16,24,.9);
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}

.mobile-controls { display: none; }

.toast-stack { position: absolute; z-index: 8; top: 82px; right: 14px; display: grid; gap: 7px; width: min(300px, 68%); pointer-events: none; }
.toast {
  padding: 9px 12px;
  border-left: 4px solid var(--orange);
  border-radius: 5px;
  color: #f8ffff;
  background: rgba(6, 19, 27, .93);
  box-shadow: 0 9px 30px rgba(0,0,0,.24);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .035em;
  animation: toast-in .25s both;
}
.toast.achievement { border-color: var(--safe); }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } }

.game-modal {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
  background: rgba(3, 10, 15, .8);
  backdrop-filter: blur(7px);
  touch-action: pan-y;
}
.game-modal[hidden] { display: none; }
.modal-card {
  width: min(680px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: clamp(20px, 3.5vw, 38px);
  border: 1px solid rgba(217,251,255,.25);
  border-top: 4px solid var(--orange);
  border-radius: 10px;
  color: var(--paper);
  background: linear-gradient(150deg, #173341, #091923 78%);
  box-shadow: var(--shadow);
  text-align: center;
}
.modal-card h2 { margin: 6px 0 20px; font: 400 clamp(34px, 6vw, 64px)/.95 var(--display); letter-spacing: .03em; }
.compact-card { width: min(420px, 100%); display: grid; gap: 10px; }
.toggle-row { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 8px 0; color: #c5d3d5; font-size: 12px; }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--orange); }

.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-grid button,
.job-grid button {
  position: relative;
  min-height: 94px;
  padding: 16px;
  border: 1px solid rgba(217,251,255,.18);
  border-radius: 8px;
  color: #fff;
  background: #102733;
  text-align: left;
  cursor: pointer;
}
.mode-grid button:hover,
.job-grid button:hover { transform: translateY(-2px); border-color: var(--orange); background: #173541; }
.mode-grid b { display: block; color: var(--orange); font-size: 14px; letter-spacing: .06em; }
.mode-grid span { display: block; margin-top: 5px; color: #b9cacd; font-size: 11px; }
.mode-grid i { position: absolute; top: 8px; right: 8px; padding: 3px 5px; border-radius: 3px; color: #788b90; background: #091821; font-size: 8px; font-style: normal; font-weight: 900; }
.mode-grid button:not(.locked) i { display: none; }
.mode-grid button.locked { cursor: not-allowed; opacity: .48; }

.job-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.job-grid button { min-height: 80px; }
.job-grid b { display: block; color: #fff; font-size: 12px; }
.job-grid span { color: #92a7ac; font-size: 10px; }
.job-grid button.locked { opacity: .35; cursor: not-allowed; }

.result-card { width: min(720px, 100%); }
.result-rank,
.score-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid rgba(217,251,255,.13); text-align: left; }
.result-rank span,
.score-total span { color: #8da3a8; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.result-rank strong { color: var(--orange); font-size: clamp(14px, 2.5vw, 22px); }
.score-total strong { color: #fff; font: 400 36px/1 var(--display); }
.score-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0; }
.score-bar { min-width: 0; }
.score-bar i { display: block; height: 58px; border-radius: 4px; background: linear-gradient(to top, var(--glass) var(--score), #19333e var(--score)); }
.score-bar span { display: block; overflow: hidden; margin-top: 5px; color: #9eb1b5; font-size: 8px; font-weight: 900; letter-spacing: .05em; text-overflow: ellipsis; }
#result-line { color: #dae7e8; font-size: 14px; }
.nickname-field { display: block; margin: 16px 0; color: #8fa3a8; font-size: 9px; font-weight: 900; letter-spacing: .13em; text-align: left; }
.nickname-field input { width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid rgba(217,251,255,.2); border-radius: 6px; outline: none; color: #fff; background: #071722; font-weight: 800; }
.nickname-field input:focus { border-color: var(--orange); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }

.under-game { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 17px 6px 4px; color: #a9bdc0; }
.under-game p { max-width: 650px; margin: 0; font-size: 13px; }
.micro-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.micro-controls span { padding: 6px 9px; border: 1px solid rgba(217,251,255,.13); border-radius: 4px; background: rgba(9,28,38,.75); font-size: 9px; letter-spacing: .05em; }
.micro-controls b { color: var(--orange); }

.content-section,
.trade-section,
.tools-section,
.faq-section,
.screenshot-section {
  width: min(calc(100% - 32px), 1280px);
  margin: 0 auto;
  padding: clamp(74px, 10vw, 140px) 0;
}

.content-section { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); gap: clamp(35px, 8vw, 110px); border-bottom: 1px solid var(--line); }
.content-section h2,
.section-heading h2,
.trade-title h2 { margin: 10px 0 0; color: #fff; font: 400 clamp(38px, 5vw, 70px)/.97 var(--display); letter-spacing: -.01em; text-transform: uppercase; }
.prose { color: #b9cbce; font-size: clamp(16px, 1.4vw, 19px); }
.prose p { margin-bottom: 1.2em; }
.prose strong { color: var(--glass-bright); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-heading h2 { max-width: 850px; }

.screenshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shot { position: relative; margin: 0; overflow: hidden; border: 1px solid rgba(217,251,255,.16); border-radius: 8px; background: #102733; box-shadow: 0 18px 50px rgba(0,0,0,.23); }
.shot-wide { grid-column: 1 / -1; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; background: linear-gradient(145deg, #173442, #071720); }
.shot figcaption { position: absolute; left: 10px; bottom: 10px; padding: 6px 9px; border-radius: 4px; color: #fff; background: rgba(4,15,22,.86); font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }

.job-list { display: grid; gap: 0; }
.job-list article { display: grid; grid-template-columns: 46px minmax(150px, .6fr) 1.3fr; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line); }
.job-list article > span { color: var(--orange); font: 400 24px/1 var(--display); }
.job-list h3 { margin: 2px 0 0; color: #fff; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.job-list p { margin: 0; color: #aabdc0; font-size: 13px; }
.mode-note { margin-top: 28px; padding: 24px; border-left: 4px solid var(--orange); background: #102631; }
.mode-note h3 { margin-bottom: 7px; color: #fff; }
.mode-note p { margin: 0; color: #afc2c5; }

.trade-section { border-bottom: 1px solid var(--line); }
.trade-title { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: end; margin-bottom: 55px; }
.trade-title .section-number { grid-column: 1 / -1; }
.trade-title p { margin: 0; color: #9fb4b8; font-size: 18px; }
.trade-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.trade-grid article { padding: clamp(24px, 4vw, 46px); background: #0b1d27; }
.trade-grid h3 { color: var(--orange); font-size: 17px; letter-spacing: .03em; }
.trade-grid p { color: #adbec1; font-size: 14px; }
.trade-grid p:last-child { margin-bottom: 0; }

.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); }
.glossary div { padding: 24px; background: #0b1d27; }
.glossary dt { margin-bottom: 6px; color: #fff; font-weight: 900; text-transform: uppercase; }
.glossary dd { margin: 0; color: #9fb2b6; font-size: 13px; }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 22px 46px 22px 0; color: #fff; font-weight: 800; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 10px; top: 15px; color: var(--orange); font: 400 30px/1 var(--display); }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { max-width: 850px; padding: 0 40px 20px 0; color: #a8bbbe; }

footer { width: min(calc(100% - 32px), 1280px); margin: 0 auto; padding: 40px 0 max(40px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: #8fa4a8; font-size: 12px; }
.footer-mark { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #fff; letter-spacing: .06em; }
footer p { margin-bottom: 5px; }
footer a { color: var(--glass-bright); text-underline-offset: 3px; }
.game-site-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.game-site-links a { color: #c9dadd; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.safety-note { color: #70868b; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .game-intro { padding-top: 14px; }
  .game-frame { height: min(72svh, 720px); min-height: 560px; }
  .content-section { grid-template-columns: 1fr; gap: 24px; }
  .trade-title { grid-template-columns: 1fr; }
  .trade-title .section-number { grid-column: auto; }
  .under-game { align-items: flex-start; flex-direction: column; gap: 12px; }
  .micro-controls { justify-content: flex-start; }
}

@media (max-width: 650px), (pointer: coarse) {
  body { line-height: 1.58; }
  .game-intro { padding-inline: 12px; padding-bottom: 12px; }
  .brand-lockup { margin-bottom: 6px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-mark b { font-size: 18px; }
  .eyebrow { font-size: 9px; }
  h1 { font-size: clamp(36px, 11vw, 54px); }
  h1 span { font-size: .34em; }
  .intro-line { margin: 9px auto 11px; font-size: 12px; }
  .primary-button { min-width: 180px; min-height: 54px; }
  .primary-button span { font-size: 23px; }
  .game-stage { padding-inline: 0; }
  .game-frame { min-height: 570px; height: 72svh; max-height: 720px; border-left: 0; border-right: 0; border-radius: 0; }
  .hud { grid-template-columns: 88px minmax(0, 1fr) 78px; gap: 5px; padding: max(7px, env(safe-area-inset-top)) max(7px, env(safe-area-inset-right)) 7px max(7px, env(safe-area-inset-left)); }
  .hud-rank, .objective-card, .hud-actions { min-height: 49px; }
  .hud-rank { padding: 7px; }
  .hud-rank > span { font-size: 8px; }
  .meter { height: 5px; margin-top: 5px; }
  .objective-card { padding: 6px; }
  .objective-card small { font-size: 7px; }
  .objective-card strong { font-size: 11px; }
  .hud-actions { gap: 3px; padding: 4px; }
  .icon-button { min-width: 33px; padding: 0 3px; font-size: 0; }
  .icon-button::before { font-size: 15px; }
  #mute-button::before { content: "♪"; }
  #pause-button::before { content: "Ⅱ"; }
  .keyboard-hint { display: none; }
  .touch-hint { display: inline; }
  .control-hint { bottom: calc(136px + max(12px, env(safe-area-inset-bottom))); }
  .context-action { display: none !important; }
  .mobile-controls { position: absolute; z-index: 6; inset: auto 0 0; display: flex; align-items: flex-end; justify-content: space-between; height: 136px; padding: 0 max(14px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); pointer-events: none; }
  .mobile-controls[hidden] { display: none; }
  .joystick { position: relative; width: 112px; height: 112px; border-radius: 50%; pointer-events: auto; touch-action: none; transition: opacity .14s ease; }
  .joystick-ring { position: absolute; inset: 10px; border: 2px solid rgba(217,251,255,.25); border-radius: 50%; background: rgba(6,18,26,.52); box-shadow: inset 0 0 25px rgba(0,0,0,.24); }
  .joystick-ring::before, .joystick-ring::after { content: ""; position: absolute; left: 50%; top: 14%; width: 1px; height: 72%; background: rgba(217,251,255,.08); }
  .joystick-ring::after { transform: rotate(90deg); }
  .joystick-thumb { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px; border: 2px solid rgba(255,255,255,.45); border-radius: 50%; background: linear-gradient(#f2a64d, #ca641d); box-shadow: 0 8px 18px rgba(0,0,0,.35); transform: translate(0,0); }
  .right-controls { display: grid; justify-items: end; gap: 8px; pointer-events: auto; }
  .rotate-controls { display: flex; gap: 8px; }
  .rotate-controls button { width: 48px; height: 44px; border: 1px solid rgba(217,251,255,.25); border-radius: 8px; color: #fff; background: rgba(12,36,48,.9); font-size: 24px; font-weight: 900; }
  .action-button { width: 98px; min-height: 64px; padding: 7px; border: 3px solid #ffc47d; border-radius: 16px; color: #08131c; background: var(--orange); box-shadow: 0 7px 0 #8f4213, 0 10px 24px rgba(0,0,0,.25); font-size: 12px; line-height: 1.05; font-weight: 950; letter-spacing: .045em; }
  .action-button:active, .rotate-controls button:active { transform: translateY(4px); }
  .game-frame.dialogue-open .mobile-controls { height: 94px; }
  .game-frame.dialogue-open .joystick { visibility: hidden; opacity: 0; pointer-events: none; }
  .game-frame.dialogue-open .rotate-controls { display: none !important; }
  .game-frame.dialogue-open .right-controls { margin-left: auto; }
  .game-frame.dialogue-open .skip-dialogue { right: max(9px, env(safe-area-inset-right)); bottom: 250px; }
  .game-frame.minigame-suction .mobile-controls { height: 108px; }
  .game-frame.minigame-suction .joystick { visibility: hidden; opacity: 0; pointer-events: none; }
  .game-frame.minigame-suction .rotate-controls { display: none !important; }
  .game-frame.minigame-suction .right-controls { margin-left: auto; }
  .game-frame.minigame-suction .action-button { width: 124px; min-height: 72px; }
  .toast-stack { top: 65px; right: 7px; }
  .game-modal { align-items: start; padding: 10px; }
  .modal-card { margin: auto 0; padding: 18px; }
  .modal-card h2 { margin-bottom: 13px; }
  .mode-grid, .job-grid { grid-template-columns: 1fr; }
  .mode-grid button { min-height: 70px; padding: 12px; }
  .result-card { padding-top: 14px; }
  .score-bars { margin: 10px 0; }
  .score-bar i { height: 38px; }
  .nickname-field { margin: 10px 0; }
  .result-actions { gap: 7px; }
  .result-actions .primary-button, .result-actions .secondary-button { flex: 1 1 130px; min-height: 44px; }
  .under-game { padding: 13px 16px 0; }
  .micro-controls { display: none; }
  .content-section, .trade-section, .tools-section, .faq-section, .screenshot-section { width: min(calc(100% - 32px), 1280px); padding-block: 74px; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .screenshot-grid { grid-template-columns: 1fr; }
  .shot-wide { grid-column: auto; }
  .job-list article { grid-template-columns: 36px 1fr; }
  .job-list article p { grid-column: 2; }
  .trade-grid, .glossary { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .launch-row { flex-direction: column; align-items: center; }
  .secondary-button#continue-button { min-height: 40px; }
  .game-frame { min-height: 545px; }
  .mobile-controls { padding-inline: max(10px, env(safe-area-inset-left)); }
  .joystick { width: 108px; height: 108px; }
  .action-button { width: 92px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .game-intro { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 14px; }
  .brand-lockup { margin: 0; }
  .game-intro h1 { font-size: 31px; text-align: left; }
  .game-intro h1 span { display: inline; margin: 0; font-size: .45em; }
  .intro-line { display: none; }
  .launch-row { grid-column: 3; grid-row: 1; }
  .primary-button { min-width: 120px; min-height: 44px; padding: 7px 14px; }
  .primary-button small { display: none; }
  .challenge-banner { display: none !important; }
  .game-frame { height: calc(100svh - 76px); min-height: 340px; }
  body.game-active .game-frame { height: 100dvh; min-height: 0; }
  .mobile-controls { height: 130px; }
  .joystick { width: 108px; height: 108px; }
  .action-button { height: 58px; }
  .game-frame.dialogue-open .skip-dialogue { bottom: 166px; }
}

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

@media (forced-colors: active) {
  .objective-card, .context-action, .action-button, .primary-button { border: 2px solid ButtonText; }
}
