@font-face {
  font-family: system-display;
  src: local("Bahnschrift");
}
* {
  box-sizing: border-box;
}
html {
  background: #151918;
  color-scheme: dark;
}
body {
  margin: 0;
  color: #eeeade;
  font:
    14px/1.5 system-ui,
    "Microsoft JhengHei",
    sans-serif;
  background: #181c1b;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
button:focus-visible {
  outline: 2px solid #f6b36a;
  outline-offset: 4px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 0;
}
a {
  color: inherit;
}
svg.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon-library {
  width: 0;
  height: 0;
  position: absolute;
}
p,
h1,
h2,
h3 {
  margin: 0;
}
small,
.eyebrow,
.mono {
  font-family: system-display, "Courier New", monospace;
  letter-spacing: 1.5px;
}
.muted {
  color: #8e9690;
}
.eyebrow {
  font-size: 10px;
  color: #9ca69d;
  text-transform: uppercase;
}
.boot {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.brand-mark {
  font-size: 32px;
  background: #d65e43;
  color: #f4eee2;
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  transform: skew(-7deg);
}
.shell {
  max-width: 1500px;
  margin: auto;
  padding: 0 40px;
}
.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #353b36;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand strong {
  font-family: system-display, sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  line-height: 1.15;
  display: block;
}
.brand span {
  font-size: 9px;
  letter-spacing: 4px;
  color: #8e9690;
}
.resource-bar {
  display: flex;
  gap: 27px;
}
.resource {
  display: flex;
  align-items: center;
  gap: 10px;
}
.resource .ico {
  width: 16px;
  height: 16px;
  color: #a5b39b;
}
.resource b {
  font:
    17px system-display,
    monospace;
}
.resource small {
  display: block;
  font-size: 9px;
  color: #899087;
  letter-spacing: 1px;
}
.top-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.online {
  font-size: 10px;
  letter-spacing: 1px;
  color: #b0bba4;
}
.online:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #a6b58a;
  margin-right: 8px;
  border-radius: 50%;
}
.icon-button {
  background: none;
  border: 1px solid #3c443b;
  width: 34px;
  height: 34px;
  color: #b3b9ac;
}
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 36px 0 25px;
}
.page-intro h1 {
  font:
    italic 48px/0.95 system-display,
    Impact,
    sans-serif;
  letter-spacing: 1px;
  margin-top: 12px;
}
.page-intro h1 span {
  color: #b1b9a1;
}
.page-intro > p {
  font-size: 11px;
  color: #8e9690;
  max-width: 225px;
  text-align: right;
}
.workspace {
  display: grid;
  grid-template-columns: 230px minmax(290px, 1fr) 280px;
  gap: 32px;
  min-height: 500px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #3a4239;
  padding: 0 0 14px;
  font-size: 10px;
  letter-spacing: 2px;
  color: #aeb7a6;
}
.section-label span {
  color: #5d685b;
}
.mission-thumb {
  height: 128px;
  position: relative;
  overflow: hidden;
  margin: 20px 0;
  background: #3c483b;
  background-image:
    linear-gradient(
      31deg,
      transparent 42%,
      #b7ae8960 42%,
      #b7ae8960 46%,
      transparent 46%
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 21px,
      #91a47718 22px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 21px,
      #91a47718 22px
    );
}
.mission-thumb:before,
.mission-thumb:after {
  content: "";
  position: absolute;
  border: 1px solid #91a47780;
  border-radius: 50%;
  width: 90px;
  height: 90px;
  top: 16px;
  left: 30px;
}
.mission-thumb:after {
  width: 30px;
  height: 30px;
  top: 46px;
  left: 60px;
}
.mission-thumb i {
  position: absolute;
  right: 15px;
  bottom: 12px;
  font: 24px system-display;
  color: #dcd8bf;
}
.mission-brief h2 {
  font-size: 23px;
  margin: 12px 0;
}
.mission-brief p {
  color: #9ca395;
  font-size: 12px;
  line-height: 1.9;
}
.mission-brief .reward-inline {
  display: flex;
  gap: 15px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid #353d33;
  color: #c7c5a5;
  font: 12px system-display;
}
.text-button {
  background: none;
  color: #bdc3b2;
  padding: 17px 0;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.text-button .ico {
  width: 16px;
}
.hangar-view {
  background: #202620;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid #394133;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      #9aaf8210 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      #9aaf8210 40px
    );
}
.hangar-corner {
  position: absolute;
  top: 18px;
  left: 20px;
  font: 10px system-display;
  color: #8d9b83;
  letter-spacing: 2px;
}
.hangar-corner.right {
  left: auto;
  right: 20px;
  text-align: right;
}
.hangar-corner em {
  font-style: normal;
  display: block;
  font-size: 8px;
  letter-spacing: 1px;
  margin-top: 5px;
  color: #56654c;
}
.hangar-grid {
  position: absolute;
  width: 310px;
  height: 310px;
  border: 1px solid #5b684430;
  border-radius: 50%;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.hangar-grid:before {
  content: "";
  position: absolute;
  inset: 27px;
  border: 1px dashed #717d4550;
  border-radius: 50%;
}
.hangar-grid:after {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  height: 360px;
  width: 1px;
  background: #81965830;
}
.aircraft-hero {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 90%;
  max-width: 360px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(6px 20px 8px #0009);
  z-index: 1;
}
.hangar-bottom {
  position: absolute;
  bottom: 18px;
  left: 20px;
  right: 20px;
  border-top: 1px solid #56614d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
}
.hangar-bottom strong {
  font: 20px system-display;
  letter-spacing: 2px;
}
.hangar-bottom p {
  font-size: 10px;
  color: #9ca58f;
}
.status-pill {
  font: 9px system-display;
  letter-spacing: 1px;
  border: 1px solid #7d8a5f;
  padding: 4px 8px;
  color: #b6c390;
}
.gear-list {
  margin-top: 8px;
}
.gear-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  background: none;
  border-bottom: 1px solid #353d33;
  text-align: left;
}
.gear-row .slot-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #252c24;
  color: #c5ceac;
  border: 1px solid #404936;
}
.gear-row .gear-title {
  flex: 1;
}
.gear-row b {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.gear-row small {
  font-size: 8px;
  color: #899780;
  letter-spacing: 1px;
}
.gear-row .level {
  font: 17px system-display;
  color: #d2d2ba;
}
.gear-row .chevron {
  font-size: 20px;
  color: #737f65;
}
.gear-row:hover .slot-icon {
  border-color: #c5ceac;
}
.stats-bar {
  margin-top: 25px;
  border-top: 1px solid #3b4337;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-top: 18px;
}
.stat small {
  font-size: 8px;
  color: #87917f;
  letter-spacing: 1px;
}
.stat b {
  display: block;
  font: 22px system-display;
}
.stat em {
  font-style: normal;
  color: #768369;
  font-size: 10px;
  margin-left: 3px;
}
.launch-row {
  display: grid;
  grid-template-columns: 230px 1fr 280px;
  gap: 32px;
  margin-top: 24px;
  align-items: center;
}
.launch-meta {
  color: #86917b;
  font-size: 10px;
  letter-spacing: 1px;
}
.launch-meta b {
  color: #bdc6ac;
  font-weight: 400;
  display: block;
  font-size: 12px;
  letter-spacing: 0;
}
.launch-button {
  background: #d65e43;
  color: #fff3de;
  padding: 18px 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  letter-spacing: 3px;
  box-shadow: 0 4px 0 #973f2e;
}
.launch-button small {
  font-size: 9px;
  letter-spacing: 2px;
  display: block;
  margin-top: 3px;
  font-weight: 400;
  opacity: 0.7;
}
.launch-button:hover {
  background: #e76b4e;
}
.launch-tip {
  font-size: 10px;
  color: #909984;
  display: flex;
  gap: 12px;
  align-items: center;
}
.launch-tip .ico {
  color: #bdc6ac;
}
.navigation {
  display: flex;
  justify-content: center;
  gap: 55px;
  border-top: 1px solid #353d33;
  margin-top: 36px;
  padding: 20px 0 22px;
}
.nav-item {
  background: none;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #829079;
  font-size: 12px;
  position: relative;
}
.nav-item.active {
  color: #eeeade;
}
.nav-item.active:before {
  content: "";
  position: absolute;
  top: -21px;
  left: 0;
  right: 0;
  background: #d65e43;
  height: 2px;
}
.nav-item .ico {
  width: 18px;
  height: 18px;
}
.footer {
  display: flex;
  justify-content: space-between;
  color: #66715f;
  font: 9px system-display;
  letter-spacing: 1px;
  padding-bottom: 20px;
}
.panel {
  min-height: 520px;
}
.panel-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}
.panel-heading h2 {
  font-size: 25px;
}
.panel-heading p {
  color: #8d9883;
  font-size: 12px;
}
.stage-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}
.stage-card {
  background: #242b23;
  border: 1px solid #3f4838;
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  position: relative;
}
.stage-card .stage-number {
  font: 52px system-display;
  color: #717e62;
}
.stage-card h3 {
  font-size: 17px;
  margin: 16px 0 5px;
}
.stage-card p {
  font-size: 10px;
  color: #96a086;
  flex: 1;
}
.stage-card .stars {
  color: #d7b778;
  font-size: 16px;
  letter-spacing: 5px;
  margin-top: 25px;
}
.stage-card.selected {
  border-color: #d65e43;
}
.stage-card.selected:before {
  content: "準備出擊";
  position: absolute;
  right: 12px;
  top: 12px;
  color: #e27a61;
  font-size: 9px;
}
.stage-card.locked {
  opacity: 0.5;
}
.chapter-next {
  margin-top: 22px;
  padding: 20px;
  border-top: 1px solid #37402f;
  font-size: 12px;
  color: #7f8b72;
  display: flex;
  justify-content: space-between;
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.tech-column > h3 {
  font-size: 13px;
  color: #a5b392;
  padding-bottom: 14px;
  border-bottom: 1px solid #424f36;
}
.tech-card {
  border: 1px solid #3e4935;
  padding: 18px;
  margin-top: 15px;
  background: #22291f;
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
  width: 100%;
}
.tech-card > div {
  flex: 1;
}
.tech-card h3 {
  font-size: 14px;
}
.tech-card p {
  font-size: 11px;
  color: #91a080;
  margin-top: 4px;
}
.tech-card small {
  font-size: 8px;
  color: #717e62;
}
.tech-card .level {
  color: #cbd7b9;
  font: 20px system-display;
}
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.inventory-resource {
  border: 1px solid #404a36;
  padding: 30px;
  background: #22291f;
}
.inventory-resource b {
  display: block;
  font: 40px system-display;
  margin: 20px 0 8px;
}
.inventory-resource h3 {
  font-size: 13px;
}
.inventory-resource p {
  font-size: 11px;
  color: #859574;
  margin-top: 8px;
}
.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-bottom: 1px solid #39432f;
  gap: 20px;
}
.task-row h3 {
  font-size: 17px;
}
.task-row p {
  font-size: 12px;
  color: #8d9c7c;
  margin-top: 5px;
}
.small-button {
  padding: 10px 18px;
  background: #465038;
  font-size: 12px;
  color: #e4e9d9;
  white-space: nowrap;
}
.notice {
  padding: 17px 20px;
  border-left: 2px solid #c16c4e;
  background: #292c23;
  color: #a9b49a;
  font-size: 12px;
  margin: 24px 0;
  line-height: 1.8;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #090d0bbd;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  width: 440px;
  max-width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #526145 #252c23;
  background: #252c23;
  border: 1px solid #596347;
  padding: 30px;
  box-shadow: 0 25px 80px #0009;
}
.modal-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 25px;
}
.modal-title h2 {
  font-size: 23px;
  margin: 7px 0;
}
.modal-close {
  font-size: 24px;
  color: #9aa98b;
  background: none;
  padding: 0 0 10px 20px;
}
.modal-icon {
  width: 65px;
  height: 65px;
  border: 1px solid #71835d;
  display: grid;
  place-items: center;
  color: #d0dabd;
  margin: 0 auto 20px;
}
.modal-icon .ico {
  width: 34px;
  height: 34px;
}
.upgrade-value {
  display: flex;
  justify-content: space-around;
  text-align: center;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid #445038;
  border-bottom: 1px solid #445038;
}
.upgrade-value b {
  font: 37px system-display;
  display: block;
}
.upgrade-value span {
  font-size: 11px;
  color: #a0ad90;
}
.upgrade-value .new {
  color: #d1dca7;
}
.costs {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 12px;
  color: #9aa98a;
}
.modal .launch-button {
  width: 100%;
  justify-content: center;
  gap: 14px;
  font-size: 15px;
  padding: 15px;
}
.branch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.branch-button {
  min-width: 0;
  background: #303a28;
  border: 1px solid #506040;
  text-align: left;
  padding: 12px;
  font-size: 11px;
}
.branch-button strong {
  display: block;
  color: #d4dec4;
  margin-bottom: 5px;
}
.branch-button span {
  color: #8f9e7d;
}
.modal p.help {
  font-size: 11px;
  color: #8f9c7e;
  line-height: 1.8;
  margin-top: 17px;
}
.error-text {
  color: #e4967e;
  font-size: 12px;
  margin-top: 14px;
  min-height: 18px;
}
.result-stars {
  font-size: 40px;
  letter-spacing: 14px;
  text-align: center;
  color: #d4b97c;
  margin: 15px 0;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.result-grid > div {
  border: 1px solid #48543c;
  padding: 14px;
  text-align: center;
}
.result-grid b {
  font: 25px system-display;
  display: block;
}
.result-grid small {
  font-size: 10px;
  color: #9caa8c;
}
#toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: #e4e7d3;
  color: #242c20;
  font-size: 12px;
  padding: 12px 20px;
  max-width: 90%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#toast.show {
  opacity: 1;
}
#battle {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #0b100e;
  display: flex;
  align-items: center;
  justify-content: center;
}
#battle[hidden],
#battle-overlay[hidden] {
  display: none;
}
.battle-frame {
  position: relative;
  aspect-ratio: 9/16;
  height: 100dvh;
  max-width: 100vw;
  max-height: 177.777vw;
  background: #283d2b;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
#battle-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#pause-button {
  position: absolute;
  right: 3.8%;
  top: 1.2%;
  width: 8%;
  height: 4.5%;
  background: #14271dc9;
  border: 1px solid #889a6b;
  font-size: 18px;
  color: #e2e7d3;
}
#virtual-stick {
  position: absolute;
  width: 104px;
  height: 104px;
  margin: -52px 0 0 -52px;
  border-radius: 50%;
  border: 2px solid rgba(122, 243, 255, 0.35);
  background: rgba(53, 230, 255, 0.06);
  pointer-events: none;
}
#virtual-stick[hidden] {
  display: none;
}
#virtual-stick i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(53, 230, 255, 0.35);
  border: 2px solid rgba(122, 243, 255, 0.8);
}
#skill-button {
  position: absolute;
  right: max(4.5%, env(safe-area-inset-right));
  bottom: max(3%, env(safe-area-inset-bottom));
  width: 20%;
  aspect-ratio: 1;
  min-width: 44px;
  border: 1px solid #e59665;
  border-radius: 50%;
  background: #bd5538e6;
  color: #eceddb;
  font-size: 35px;
  touch-action: none;
}
#skill-button span {
  display: block;
  line-height: 0.9;
}
#skill-button small {
  display: block;
  font-size: 8px;
  letter-spacing: 1px;
  margin-top: 5px;
}
#skill-button.unavailable {
  background: #30372c;
  border-color: #677357;
  color: #88947b;
}
#battle-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #101a14c9;
  padding: 25px;
  z-index: 2;
}
#battle-overlay > div {
  text-align: center;
  width: 100%;
}
#battle-overlay h2 {
  font-size: 26px;
  margin: 15px 0;
}
#battle-overlay p {
  font-size: 12px;
  color: #abb69c;
  margin-bottom: 24px;
}
#battle-overlay button {
  display: block;
  width: 100%;
  padding: 15px;
  background: #d65e43;
  margin-top: 12px;
}
#battle-overlay button.secondary {
  background: #37452d;
}
.connection-error {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 30px;
}
.connection-error h1 {
  font-size: 28px;
  margin: 15px 0;
}
.connection-error p {
  color: #91a27f;
  margin-bottom: 20px;
}
/* All screens share the portrait layout, including desktop previews. */
:root {
  --portrait-width: 480px;
  --nav-height: 76px;
}
html {
  scrollbar-gutter: stable;
}
body {
  min-height: 100svh;
  -webkit-text-size-adjust: 100%;
}
button {
  min-height: 44px;
  touch-action: manipulation;
}
.shell {
  width: 100%;
  max-width: var(--portrait-width);
  min-height: 100svh;
  padding: env(safe-area-inset-top) max(18px, env(safe-area-inset-right))
    calc(var(--nav-height) + env(safe-area-inset-bottom) + 20px)
    max(18px, env(safe-area-inset-left));
  background: #181c1b;
  border-inline: 1px solid #353b3655;
}
.shell main,
.workspace > *,
.resource,
.gear-title,
.tech-card > div,
.panel-heading > *,
.task-row > *,
.stat,
.inventory-resource {
  min-width: 0;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  height: auto;
  gap: 14px;
  padding: 16px 0;
}
.brand {
  gap: 10px;
}
.brand-mark {
  width: 36px;
  height: 38px;
  font-size: 28px;
}
.brand strong {
  font-size: 16px;
  letter-spacing: 3px;
}
.brand span {
  font-size: 9px;
  letter-spacing: 3px;
}
.top-actions {
  grid-column: 2;
  grid-row: 1;
  gap: 10px;
}
.online {
  font-size: 8px;
  letter-spacing: 0.5px;
}
.icon-button {
  width: 44px;
  height: 44px;
  font-size: 20px;
}
.resource-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.resource {
  gap: 7px;
}
.resource > div {
  min-width: 0;
}
.resource b {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.resource small {
  font-size: 8px;
  letter-spacing: 0.6px;
}
.resource .ico {
  width: 15px;
  height: 15px;
}
.page-intro {
  padding: 24px 0 20px;
  display: block;
}
.page-intro h1 {
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.05;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.page-intro > p {
  max-width: none;
  text-align: left;
  margin-top: 10px;
  font-size: 11px;
}
.eyebrow {
  font-size: 9px;
}
.workspace {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
}
.mission-brief {
  display: none;
}
.hangar-view {
  height: clamp(250px, 38svh, 340px);
  min-height: 0;
}
.aircraft-hero {
  width: 280px;
  max-width: 80%;
  top: 44%;
}
.hangar-grid {
  width: 260px;
  height: 260px;
  top: 44%;
}
.hangar-grid:after {
  height: 300px;
}
.hangar-bottom {
  bottom: 12px;
  padding-top: 9px;
  gap: 8px;
}
.hangar-bottom strong {
  font-size: 19px;
}
.hangar-bottom p {
  font-size: 10px;
}
.hangar-corner {
  top: 12px;
  left: 14px;
  font-size: 9px;
}
.hangar-corner.right {
  right: 14px;
}
.stats-bar {
  margin-top: 14px;
  padding-top: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.stat b {
  font-size: 23px;
}
.stat small {
  font-size: 9px;
  letter-spacing: 0.3px;
  overflow-wrap: anywhere;
}
.equipment .section-label {
  padding-bottom: 10px;
}
.gear-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  margin-top: 0;
}
.gear-row {
  padding: 14px 0;
  min-height: 72px;
  gap: 8px;
}
.gear-row .slot-icon {
  width: 30px;
  height: 34px;
  flex: none;
}
.slot-icon .ico {
  width: 19px;
  height: 19px;
}
.gear-row b {
  font-size: 12px;
}
.gear-row small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.3px;
  overflow-wrap: anywhere;
}
.gear-row .level {
  font-size: 17px;
}
.gear-row .chevron {
  display: none;
}
.launch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.launch-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 9px;
}
.launch-meta b {
  font-size: 13px;
  text-align: right;
}
.launch-button {
  width: 100%;
  padding: 16px 20px;
  font-size: 17px;
  min-height: 60px;
}
.launch-tip {
  font-size: 11px;
  gap: 10px;
}
.launch-tip br {
  display: none;
}
.launch-tip .ico {
  width: 18px;
}
.navigation {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--portrait-width));
  bottom: 0;
  z-index: 20;
  background: #181c1bf5;
  backdrop-filter: blur(10px);
  gap: 0;
  justify-content: space-around;
  margin: 0;
  padding: 8px max(8px, env(safe-area-inset-right))
    calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
.nav-item {
  flex: 1;
  min-width: 0;
  min-height: 58px;
  font-size: 11px;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  padding: 5px;
}
.nav-item.active:before {
  top: -9px;
  left: 10px;
  right: 10px;
}
.nav-item .ico {
  width: 21px;
  height: 21px;
}
.footer {
  margin-top: 24px;
  font-size: 8px;
  letter-spacing: 0.4px;
  padding-bottom: 0;
  gap: 10px;
  flex-wrap: wrap;
}
.panel {
  min-height: 0;
}
.panel-heading {
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 20px;
}
.panel-heading h2 {
  font-size: 22px;
}
.panel-heading p {
  font-size: 11px;
}
.stage-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.stage-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 56px;
  gap: 4px 12px;
  padding: 16px 12px;
  align-items: center;
}
.stage-card .stage-number {
  font-size: 32px;
  grid-column: 1;
  grid-row: 1 / 3;
}
.stage-card h3 {
  margin: 0;
  font-size: 15px;
  grid-column: 2;
  grid-row: 1;
}
.stage-card p {
  font-size: 11px;
  grid-column: 2;
  grid-row: 2;
  overflow-wrap: anywhere;
}
.stage-card .stars {
  margin: 0;
  font-size: 14px;
  letter-spacing: 1px;
  grid-column: 3;
  grid-row: 1 / 3;
}
.stage-card.selected:before {
  right: 12px;
  top: auto;
  bottom: 6px;
  font-size: 8px;
}
.chapter-next {
  font-size: 11px;
  padding: 16px 0;
  gap: 10px;
  flex-wrap: wrap;
}
.tech-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.tech-column > h3 {
  font-size: 13px;
}
.tech-card {
  padding: 16px;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: nowrap;
}
.tech-card .ico {
  width: 22px;
  height: 22px;
}
.tech-card h3 {
  font-size: 15px;
}
.tech-card p {
  font-size: 12px;
}
.tech-card .level {
  font-size: 21px;
  flex: none;
}
.tech-card small {
  font-size: 10px;
  letter-spacing: 0.2px;
}
.inventory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.inventory-resource {
  padding: 18px 14px;
  overflow-wrap: anywhere;
}
.inventory-resource b {
  font-size: 30px;
}
.inventory-resource small {
  font-size: 9px;
  letter-spacing: 0.4px;
}
.inventory-resource p {
  font-size: 12px;
}
.task-row {
  gap: 12px;
  padding: 20px 0;
}
.task-row h3 {
  font-size: 15px;
}
.task-row p {
  font-size: 12px;
}
.task-row > .muted {
  font-size: 10px;
  flex: none;
}
.small-button {
  padding: 10px 12px;
  flex: none;
}
.notice {
  font-size: 12px;
  padding: 15px;
  margin: 20px 0;
}
body.modal-open {
  overflow: hidden;
}
.modal-backdrop {
  padding: max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}
.modal {
  width: 456px;
  --modal-pad: 22px;
  padding: var(--modal-pad);
  max-height: calc(
    100dvh - max(12px, env(safe-area-inset-top)) -
      max(12px, env(safe-area-inset-bottom))
  );
  overscroll-behavior: contain;
}
.modal-close {
  width: 44px;
  height: 44px;
  padding: 0;
  flex: none;
}
.modal-title {
  position: sticky;
  top: calc(-1 * var(--modal-pad));
  z-index: 1;
  background: #252c23;
  margin: calc(-1 * var(--modal-pad)) calc(-1 * var(--modal-pad)) 22px;
  padding: 14px var(--modal-pad) 10px;
  border-bottom: 1px solid #445038;
  gap: 10px;
}
.modal-title > div {
  min-width: 0;
}
.modal-title h2 {
  font-size: 23px;
  overflow-wrap: anywhere;
}
.modal .eyebrow {
  overflow-wrap: anywhere;
}
.modal p.help {
  font-size: 13px;
}
.costs {
  flex-wrap: wrap;
  gap: 8px;
}
.branch-row {
  grid-template-columns: minmax(0, 1fr);
}
.branch-button {
  font-size: 12px;
  min-height: 76px;
}
#toast {
  width: max-content;
  max-width: min(90%, 430px);
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px);
}
#battle {
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.battle-frame {
  width: min(
    100%,
    var(--portrait-width),
    calc(
      (100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 9 / 16
    )
  );
  height: auto;
  max-height: none;
  max-width: 100%;
  flex: none;
}
#pause-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  top: 0;
  right: 0;
  background: #14271d77;
  font-size: 20px;
}
#battle-overlay {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
}
#battle-overlay > div {
  margin-block: auto;
}
#battle-overlay p {
  font-size: 13px;
}
#skill-button small {
  font-size: 10px;
  letter-spacing: 0;
}
@media (max-width: 350px) {
  .shell {
    padding-inline: max(12px, env(safe-area-inset-left))
      max(12px, env(safe-area-inset-right));
  }
  .online {
    display: none;
  }
  .gear-list {
    gap: 0 10px;
  }
  .gear-row .slot-icon {
    display: none;
  }
  .gear-row b {
    font-size: 13px;
  }
  .stat small {
    font-size: 8px;
  }
  .modal {
    --modal-pad: 18px;
  }
}
#orientation-hint {
  display: none;
}
@media (orientation: landscape) and (pointer: coarse) {
  #orientation-hint {
    display: grid;
    position: fixed;
    inset: 0;
    z-index: 90;
    place-items: center;
    overflow-y: auto;
    padding: 24px;
    background: #101a14f5;
    text-align: center;
  }
  #orientation-hint span {
    font-size: 48px;
    color: #e28c67;
  }
  #orientation-hint h2 {
    margin: 8px 0 12px;
    font-size: 22px;
  }
  #orientation-hint p {
    color: #a9b49a;
    font-size: 13px;
    line-height: 1.8;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
