@font-face {
  font-family: Dalbit;
  src: url("assets/dalbit-serif.woff") format("woff");
  font-display: swap;
  font-weight: 100 900;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #101d27;
  color: #eee5d0;
  font-family:
    "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14px;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #e8bd6c;
  outline-offset: 4px;
}
button {
  touch-action: manipulation;
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 60% 50%,
    transparent 30%,
    #0a18257a 100%
  );
}
#app {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}
#app > * {
  pointer-events: auto;
}
[hidden] {
  display: none !important;
}
.serif,
h1,
h2,
h3 {
  font-family: Dalbit, "Noto Serif CJK KR", "Batang", serif;
}
button {
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s,
    color 0.15s;
}
button:active {
  transform: translateY(1px);
}
.gold {
  color: #e8bd6c;
}
.muted {
  color: #96a9ae;
}
.tag {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a9bec0;
  text-transform: uppercase;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 4px;
  color: #d8ba7c;
}
.btn {
  min-height: 46px;
  padding: 12px 23px;
  border: 1px solid #91a4a64a;
  color: #e8e1ce;
  background: #172c35e8;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
}
.btn:hover {
  background: #28434b;
  border-color: #9baea3;
}
.btn.primary {
  background: linear-gradient(115deg, #e2bd78, #bd9859);
  border-color: #e8c98c;
  color: #1c292d;
  box-shadow: 0 4px 25px #070f1944;
}
.btn.primary:hover {
  background: linear-gradient(115deg, #f0cd8b, #d0ab69);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: #b8c4bf;
}
.btn.danger {
  color: #e8a397;
  border-color: #985c5266;
}
.btn:disabled {
  opacity: 0.35;
}
.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.3vw;
  border-bottom: 1px solid #c0c4b022;
  gap: 20px;
}
.brand {
  background: none;
  color: #f1e6cf;
  font-family: Dalbit, "Batang", serif;
  font-size: 22px;
  letter-spacing: 4px;
  white-space: nowrap;
}
.topright {
  display: flex;
  gap: 12px;
  align-items: center;
}
.coins {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: #e7c580;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.coinmark {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 3px solid #d5b166;
  border-radius: 50%;
  position: relative;
}
.coinmark:after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #e7c780;
}
.home {
  min-height: 100%;
  position: relative;
  background: linear-gradient(
    90deg,
    #0c1e2af2 0%,
    #102632cf 33%,
    #13283333 70%,
    #11212e55
  );
  display: flex;
  flex-direction: column;
}
.home .topbar {
  border: 0;
}
.home-copy {
  margin: auto 0 auto 9vw;
  padding: 38px 0 60px;
  max-width: 540px;
  position: relative;
}
.seal-stamp {
  font-family: Dalbit, "Batang", serif;
  font-size: 15px;
  letter-spacing: 4px;
  writing-mode: vertical-rl;
  padding: 9px 6px;
  border: 1px solid #b96650;
  color: #e7a287;
  position: absolute;
  left: -48px;
  top: 89px;
}
.home h1 {
  font-size: clamp(62px, 6.7vw, 108px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 13px;
  margin: 24px 0 26px;
  text-shadow: 0 3px 30px #07121c;
  word-break: keep-all;
}
.home .lead {
  color: #c6cec5;
  line-height: 1.95;
  font-size: 15px;
  margin: 0 0 32px;
}
.home-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 430px;
}
.home-actions .primary {
  min-width: 255px;
  min-height: 55px;
  font-size: 16px;
}
.home-actions .resume {
  width: 255px;
  border-color: #78a6a080;
}
.home-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4.3vw;
  color: #90a3a8;
  font-size: 11px;
  letter-spacing: 1px;
  border-top: 1px solid #d3c9a71f;
  background: #0e22282e;
}
.home-progress {
  display: flex;
  gap: 28px;
}
.home-progress b {
  color: #d5c59e;
  font-weight: 500;
}
.screen {
  width: 100%;
  height: 100%;
  background: #0c1e2bed;
  backdrop-filter: blur(12px);
  overflow: auto;
  scrollbar-color: #3e575b #142530;
}
.screen .topbar {
  background: #112632b3;
  position: sticky;
  top: 0;
  z-index: 2;
}
.page {
  max-width: 1240px;
  margin: auto;
  padding: 28px 44px 50px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
  gap: 16px;
}
.page-head h2 {
  font-size: 29px;
  font-weight: 500;
  letter-spacing: 2px;
  margin: 7px 0;
}
.page-head p {
  color: #9caeaf;
  line-height: 1.8;
  margin: 0;
}
.tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding: 3px 0 18px;
  border-bottom: 1px solid #a8bdad22;
  margin-bottom: 28px;
}
.tabs button {
  padding: 11px 21px;
  background: none;
  border: 1px solid transparent;
  color: #a2b5b6;
  white-space: nowrap;
}
.tabs button.active {
  background: #2c4244;
  border-color: #d7bd784a;
  color: #edcea0;
}
.departure {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 45px;
}
.character-view {
  min-height: 320px;
  position: relative;
  border-bottom: 1px solid #acb39b25;
  display: flex;
  align-items: center;
}
.character-portrait {
  width: 190px;
  height: 245px;
  background-image: url("assets/characters.webp");
  background-size: 800% 600%;
  background-position: 0 0;
  filter: drop-shadow(0 10px 30px #030d1aa0);
  flex-shrink: 0;
  align-self: flex-end;
}
.char-copy h2 {
  font-size: 40px;
  letter-spacing: 5px;
  margin: 10px 0 14px;
}
.char-copy p {
  font-size: 13px;
  line-height: 1.9;
  color: #bac9c4;
}
.char-skill {
  color: #e4cb96 !important;
  border-left: 2px solid #a88b56;
  padding-left: 12px;
}
.char-quote {
  font-family: Dalbit, "Batang", serif;
  color: #96b9ba !important;
  font-size: 12px !important;
}
.character-list {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}
.character-card {
  position: relative;
  background: #1d333d;
  border: 1px solid #8ca4a635;
  color: #c6d1c7;
  flex: 1;
  padding: 8px 0 9px;
  border-radius: 3px;
}
.character-card.active {
  border-color: #dbbc79;
  background: #394845;
}
.character-card.locked {
  opacity: 0.45;
}
.char-mini {
  height: 66px;
  width: 66px;
  margin: 0 auto 6px;
  background: url("assets/characters.webp");
  background-size: 800% 600%;
  pointer-events: none;
}
.character-card small {
  font-size: 10px;
  display: block;
  color: #aeb7ab;
  margin-top: 5px;
}
.region-list {
  display: grid;
  gap: 8px;
}
.region {
  display: flex;
  align-items: center;
  padding: 11px 15px;
  text-align: left;
  background: #1c333e9c;
  border: 1px solid #a5b5a326;
  color: #e6decb;
  gap: 18px;
  position: relative;
  min-height: 81px;
}
.region:hover:not(.locked) {
  background: #2b434b;
}
.region.active {
  border-color: #d5b778;
  background: linear-gradient(90deg, #675e3e55, #263e44);
  box-shadow: inset 3px 0 #d4b879;
}
.region.locked {
  opacity: 0.4;
}
.region-num {
  font-family: Dalbit, serif;
  font-size: 22px;
  color: #8dabae;
}
.region.active .region-num {
  color: #edd09b;
}
.region h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  margin: 0 0 5px;
}
.region p {
  font-size: 11px;
  margin: 0;
  color: #9dafae;
}
.region img {
  width: 55px;
  height: 58px;
  object-fit: contain;
  margin-left: auto;
  filter: drop-shadow(0 4px 7px #091620);
}
.region-state {
  font-size: 10px;
  color: #90c9b0;
}
.departure-foot {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #b8c2ad26;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}
.segmented {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #102530;
  border: 1px solid #809b9c35;
  border-radius: 4px;
}
.segmented button {
  background: transparent;
  color: #9cb1b5;
  padding: 10px 17px;
  border-radius: 2px;
}
.segmented button.active {
  background: #365057;
  color: #eee2c5;
}
.tiny {
  font-size: 11px;
  color: #8da5ad;
  line-height: 1.8;
}
.departure-foot .primary {
  min-width: 245px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.panel {
  background: #1b333e;
  border: 1px solid #8fa39a32;
  padding: 23px;
  border-radius: 3px;
}
.panel h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 500;
}
.panel p {
  line-height: 1.9;
  color: #b5c6c2;
}
.training {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.train-card {
  padding: 26px 18px;
  background: linear-gradient(#253d44, #192e38);
  border: 1px solid #8daca634;
  text-align: center;
}
.train-card h3 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 1px;
  margin: 18px 0;
}
.train-card .train-value {
  font-size: 34px;
  font-family: Dalbit, serif;
  color: #e7c780;
  margin: 15px 0 5px;
}
.train-card p {
  font-size: 12px;
  color: #a2b5b6;
}
.train-card .btn {
  padding: 10px;
  width: 100%;
  margin-top: 22px;
}
.train-steps {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin: 22px 0;
}
.train-steps i {
  width: 15px;
  height: 4px;
  background: #4c6265;
}
.train-steps i.on {
  background: #d8b46c;
}
.section-note {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #a7bbb9;
  font-size: 12px;
}
.compendium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.weapon-entry {
  background: #19313b;
  border: 1px solid #879f9b32;
  padding: 17px;
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
}
.weapon-entry img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}
.weapon-entry h3 {
  font-size: 18px;
  margin: 2px 0 7px;
  font-weight: 500;
}
.weapon-entry p {
  font-size: 11px;
  line-height: 1.8;
  color: #b1c2bd;
  margin: 0;
}
.weapon-entry .recipe {
  grid-column: 1/-1;
  border-top: 1px solid #86a1a226;
  padding-top: 10px;
  color: #e0c996;
  font-size: 11px;
  line-height: 1.8;
}
.locked-entry {
  opacity: 0.44;
}
.enemy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.enemy-entry {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #19313b;
  border: 1px solid #8da49a22;
}
.enemy-art {
  width: 58px;
  height: 58px;
  background: url("assets/enemies.webp");
  background-size: 800% 600%;
  flex-shrink: 0;
}
.enemy-entry h3 {
  font-size: 14px;
  font-family: inherit;
  margin: 0 0 7px;
}
.enemy-entry p {
  font-size: 11px;
  line-height: 1.6;
  color: #a6bab9;
  margin: 0;
}
.records {
  display: grid;
  gap: 14px;
}
.record {
  display: grid;
  grid-template-columns: 85px 1fr auto;
  gap: 24px;
  align-items: center;
  background: #1a323d;
  border: 1px solid #8ba19d30;
  padding: 20px 25px;
}
.record img {
  width: 80px;
  height: 90px;
  object-fit: contain;
}
.record h3 {
  font-size: 21px;
  font-weight: 500;
  margin: 0 0 10px;
}
.record p {
  color: #a9bfbd;
  font-size: 12px;
  line-height: 1.9;
  margin: 0;
}
.record .record-label {
  color: #d2b879;
  font-size: 10px;
  margin-bottom: 8px;
}
.modal-shade {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  background: #091a26ad;
  backdrop-filter: blur(7px);
  overflow: auto;
}
.modal {
  width: min(920px, 100%);
  max-height: calc(100dvh - 50px);
  overflow: auto;
  background: linear-gradient(140deg, #243b46, #132b37);
  border: 1px solid #9aafac66;
  box-shadow: 0 30px 100px #07111eab;
  padding: 36px 40px;
  border-radius: 4px;
  position: relative;
}
.modal.narrow {
  max-width: 620px;
}
.modal .eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
}
.modal h2 {
  font-size: 31px;
  font-weight: 500;
  letter-spacing: 3px;
  margin: 13px 0;
}
.modal-desc {
  color: #a9bdbb;
  font-size: 13px;
  line-height: 1.9;
  margin: 0 0 24px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.close-btn {
  background: transparent;
  border: 1px solid #839c9e55;
  color: #d7ddcf;
  width: 38px;
  height: 38px;
  font-size: 19px;
  border-radius: 50%;
  flex-shrink: 0;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.choice-card {
  padding: 0;
  text-align: left;
  background: linear-gradient(155deg, #3b5156, #223c45);
  border: 1px solid #adc0b35c;
  color: #ebe5ce;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 285px;
}
.choice-card:hover {
  border-color: #e4c682;
  background: linear-gradient(155deg, #53605a, #2c4448);
  transform: translateY(-4px);
}
.choice-card.evolved {
  border-color: #dbb46a;
  background: linear-gradient(155deg, #60533c, #30434a);
}
.choice-top {
  display: flex;
  justify-content: space-between;
  padding: 17px 17px 0;
  font-size: 10px;
  letter-spacing: 1px;
  color: #c5c6a9;
}
.choice-card img {
  height: 83px;
  width: 83px;
  object-fit: contain;
  margin: 16px auto 8px;
  filter: drop-shadow(0 5px 10px #122630);
}
.choice-card h3 {
  font-size: 23px;
  font-weight: 500;
  margin: 12px 18px;
}
.choice-card p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0 18px 17px;
  color: #bccbc2;
  flex: 1;
}
.choice-bottom {
  padding: 11px 17px;
  background: #09202a44;
  color: #dfc795;
  font-size: 10px;
  line-height: 1.7;
}
.choice-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
  flex-wrap: wrap;
}
.choice-tools .btn {
  font-size: 12px;
  padding: 10px 15px;
  min-height: 40px;
}
.banish-list {
  display: flex;
  gap: 6px;
}
.banish-list button {
  font-size: 11px;
  color: #d5a99e;
  border: 1px solid #c68b7c40;
  background: none;
  padding: 8px;
}
.story-art {
  width: 145px;
  height: 150px;
  float: right;
  object-fit: contain;
  margin: -10px -5px 5px 20px;
}
.story-text {
  font-family: Dalbit, "Batang", serif;
  font-size: 17px;
  line-height: 2;
  color: #dcdccb;
  white-space: pre-line;
  margin: 22px 0 30px;
}
.tutorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0;
}
.tutorial-item {
  padding: 16px;
  background: #29414a;
  border: 1px solid #8eaaa331;
}
.tutorial-item b {
  display: block;
  margin-bottom: 9px;
  color: #e6d3a8;
}
.tutorial-item p {
  font-size: 12px;
  color: #acbfbd;
  line-height: 1.8;
  margin: 0;
}
.key {
  display: inline-flex;
  min-width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-family: inherit;
  font-size: 10px;
  color: #d7d9c7;
  border: 1px solid #91a8a557;
  border-bottom-width: 3px;
  background: #132c36;
  border-radius: 3px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}
.setting-row {
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #9fb5a222;
  font-size: 12px;
  color: #ccdacd;
}
.setting-row input[type="range"] {
  accent-color: #d7b77a;
  width: 130px;
}
.setting-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #c6ad75;
}
.setting-row select {
  max-width: 132px;
  color: #d4dfd2;
  background: #18323d;
  border: 1px solid #89a1a650;
  padding: 8px;
}
.settings-bottom {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 0;
}
.settings-bottom .btn {
  font-size: 11px;
  padding: 10px 14px;
}
.bindings {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.bind-btn {
  background: #213c47;
  border: 1px solid #9ab5ad3b;
  color: #c6d6ce;
  padding: 10px;
  font-size: 11px;
}
.result {
  max-width: 780px;
  text-align: center;
}
.result h2 {
  font-size: 44px;
  letter-spacing: 6px;
}
.result .result-copy {
  color: #c0cec4;
  line-height: 1.9;
  font-size: 13px;
  max-width: 540px;
  margin: 0 auto 25px;
}
.result-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 27px 0;
}
.result-numbers div {
  padding: 15px 5px;
  border-top: 1px solid #879f943f;
  border-bottom: 1px solid #879f943f;
}
.result-numbers strong {
  display: block;
  font:
    28px Dalbit,
    serif;
  color: #e3c780;
  margin-bottom: 7px;
}
.result-numbers span {
  font-size: 10px;
  letter-spacing: 1px;
  color: #9db4b4;
}
.result-reward {
  padding: 17px;
  background: #a3b48310;
  border: 1px solid #c5bf733a;
  color: #d5d5b7;
  font-size: 12px;
  line-height: 1.9;
  margin-bottom: 25px;
}
.result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.health-track { position: relative; }
#hp-fill { position: relative; z-index: 1; transition: width .12s ease-out; }
#hp-echo { position: absolute; inset: 0 auto 0 0; background: #ffd5a1; transition: width .65s .14s ease-out; }
.cinematic { position: absolute; inset: 0; color: #f4e6c7; pointer-events: none !important; }
.cinematic-caption { position: absolute; left: 8%; right: 8%; bottom: 15%; text-align: center;
  opacity: 0; animation: scene-caption .9s .45s ease-out forwards; text-shadow: 0 3px 20px #06111e, 0 2px 3px #06111e; }
.cinematic-caption span { font-size: 15px; letter-spacing: .26em; }
.cinematic-caption h1 { font-size: clamp(27px, 4.2vw, 56px); font-weight: 500; letter-spacing: .08em; margin: 15px 0; }
.cinematic-caption p { font-size: 15px; line-height: 1.8; margin: 0; }
.cinematic-win .cinematic-caption h1 { color: #ffe0a0; }
.cinematic-skip { position: absolute; right: 5%; bottom: 4%; pointer-events: auto;
  min-height: 44px; font-size: 14px; color: #e4d9c3; background: #0a182580; }
@keyframes scene-caption { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.debrief { width: 100%; height: 100%; height: 100dvh; overflow-y: auto; display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(330px,.9fr); align-content: center; gap: clamp(28px,5vw,80px);
  padding: clamp(30px,6vh,64px) clamp(28px,6vw,88px); color: #f2e8d3;
  background: linear-gradient(110deg,#07151ee8 12%,#0b1c26d9 53%,#091820fa 83%);
  animation: debrief-arrival .6s ease-out; }
.debrief-win { background: linear-gradient(110deg,#10232de5 12%,#132b30df 53%,#0b1d26fa 83%); }
.debrief-story { position: relative; align-self: center; }
.debrief-kicker { font-size: 14px; letter-spacing: .17em; color: #c6b787; margin-bottom: 40px; }
.debrief-seal { display: inline-grid; place-items: center; width: 55px; height: 55px; border: 1px solid #ce806557;
  color: #d4957d; font: 30px Dalbit,serif; margin-bottom: 22px; transform: rotate(-5deg); }
.debrief-win .debrief-seal { border-color: #e4c57570; color: #efd295; }
.debrief-story h1 { font-size: clamp(34px,4.7vw,66px); letter-spacing: .035em; font-weight: 500;
  line-height: 1.3; margin: 0 0 24px; word-break: keep-all; }
.debrief-copy { font-size: 16px; color: #c2cdc7; line-height: 1.95; max-width: 560px; margin: 0 0 32px; word-break: keep-all; }
.debrief-loadout { margin-top: 30px; }
.debrief-loadout h2 { font: 14px sans-serif; letter-spacing: .08em; font-weight: 400; color: #a5b8b6; margin: 0 0 17px; }
.debrief-loadout > div { display: flex; flex-wrap: wrap; gap: 13px; }
.debrief-loadout > div > span { display: flex; align-items: center; gap: 5px; font-size: 14px; }
.debrief-loadout .weapon-art { width: 37px; height: 37px; }
.debrief-loadout small { font-size: 14px; color: #ced6c9; }
.debrief-record { align-self: center; border-top: 2px solid #c7ae6b; }
.debrief-record-heading { display: flex; justify-content: space-between; gap: 14px; padding: 22px 0;
  font-size: 15px; color: #dfc98e; border-bottom: 1px solid #a9c0af29; }
.debrief-record-heading b { font-size: 14px; font-weight: 400; color: #a9bcbb; }
.debrief-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 25px 20px; padding: 27px 0; }
.debrief-stats span { display: block; color: #a2b5b3; font-size: 14px; margin-bottom: 9px; }
.debrief-stats strong { font: 35px Dalbit,serif; letter-spacing: .02em; }
.debrief-stats strong small { font-size: 19px; color: #809994; }
.debrief-coins { padding: 23px 0; border-top: 1px solid #a9c0af29; border-bottom: 1px solid #a9c0af29; }
.debrief-coins > div { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.debrief-coins span { font-size: 16px; color: #d9cfb0; }
.debrief-coins strong { font: 42px Dalbit,serif; color: #f1cf84; }
.debrief-coins strong b { font-weight: 500; }
.debrief-coins > small { display: block; margin-top: 8px; font-size: 13px; color: #88a9a0; }
.debrief-unlock { color: #b6c8bc; font-size: 14px; line-height: 1.85; margin: 23px 0; }
.debrief-unlock b { display: block; color: #e4ca91; font-weight: 500; margin-top: 8px; }
.debrief-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.debrief-actions .primary { grid-column: 1/-1; font-size: 16px; min-height: 54px; }
.debrief-actions .btn { font-size: 14px; }
@keyframes debrief-arrival { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 780px), (max-height: 620px) {
  .debrief { align-content: start; padding: 32px 26px; gap: 26px; }
  .debrief-kicker { margin-bottom: 22px; }
  .debrief-story h1 { font-size: 36px; }
  .debrief-copy { font-size: 15px; }
}
@media (max-width: 780px) {
  .debrief { grid-template-columns: minmax(0,1fr); }
  .debrief-seal { position: absolute; top: 0; right: 0; width: 38px; height: 38px; font-size: 24px; }
  .debrief-kicker { padding-right: 45px; font-size: 13px; }
  .debrief-story h1 { font-size: 34px; margin-top: 28px; }
  .debrief-copy { margin-bottom: 20px; }
  .debrief-loadout { margin-top: 20px; }
  .debrief-stats { padding: 22px 0; gap: 22px; }
  .cinematic-caption { bottom: 22%; left: 6%; right: 6%; }
  .cinematic-caption h1 { word-break: keep-all; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
  .cinematic-caption, .debrief { animation: none; opacity: 1; }
  #hp-fill, #hp-echo { transition: none; }
}
.pause-stats {
  display: flex;
  gap: 25px;
  margin: 20px 0;
  color: #b6c7bf;
  font-size: 12px;
}
.pause-buttons {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}
.equip-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.equip-small {
  width: 42px;
  height: 43px;
  background: #203842;
  border: 1px solid #b0b58c40;
  position: relative;
}
.equip-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.equip-small small {
  position: absolute;
  right: 2px;
  bottom: 0;
  font-size: 10px;
  color: #e5d3a0;
  background: #162831cc;
  padding: 1px 3px;
}
.equip-small.evo {
  border-color: #e0be74;
}
.loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #112733;
  text-align: center;
}
.loading h1 {
  font-size: 42px;
  letter-spacing: 8px;
  font-weight: 500;
}
.loading p {
  font-size: 12px;
  color: #9ab1b2;
}
.load-bar {
  height: 2px;
  width: 230px;
  background: #324950;
  margin: 30px auto;
}
.load-bar i {
  display: block;
  height: 100%;
  background: #d9bc7a;
  width: 0;
  transition: width 0.2s;
}
.history {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.history td,
.history th {
  padding: 14px 10px;
  border-bottom: 1px solid #819f9733;
  text-align: left;
}
.history th {
  color: #99b2b1;
  font-weight: 400;
}
#hud {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  color: #ebe7d5;
  font-variant-numeric: tabular-nums;
}
#hud button {
  pointer-events: auto;
}
.xp-track {
  height: 5px;
  background: #152d38;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}
.xp-track i {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #518889, #a3d9c1);
  box-shadow: 0 0 8px #86ccb377;
  transition: width 0.1s;
}
.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 21px 30px;
  gap: 20px;
  background: linear-gradient(#0c2332bf, transparent);
}
.hud-health {
  min-width: 185px;
  max-width: 260px;
  width: 23%;
}
.hud-name {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 9px;
}
.health-track {
  height: 11px;
  background: #142b36;
  border: 1px solid #a4b3a066;
  transform: skewX(-8deg);
  padding: 2px;
}
.health-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #925347, #cf9478);
  transition: width 0.12s;
}
.health-text {
  font-size: 10px;
  color: #c3cbbb;
  margin-top: 6px;
  letter-spacing: 1px;
}
.hud-time {
  text-align: center;
  font-family: Dalbit, serif;
  font-size: 32px;
  line-height: 1;
}
.hud-time small {
  display: block;
  font: 9px sans-serif;
  letter-spacing: 2px;
  color: #c8d0be;
  margin-top: 9px;
}
.hud-right {
  display: flex;
  align-items: center;
  gap: 23px;
  font-size: 13px;
  min-width: 185px;
  justify-content: end;
}
.hud-counter small {
  font-size: 9px;
  display: block;
  margin-bottom: 6px;
  color: #a3b9b9;
  letter-spacing: 1px;
}
.hud-pause {
  background: #1c3543b8;
  border: 1px solid #99b1aa5c;
  color: #e4dec5;
  width: 39px;
  height: 39px;
  font-size: 18px;
  border-radius: 50%;
}
.objective-hud {
  position: absolute;
  top: 110px;
  left: 30px;
  font-size: 11px;
  color: #c8d8c8;
  text-shadow: 0 2px 8px #0c2230;
}
.objective-hud b {
  font-size: 12px;
  font-weight: 500;
  color: #e7c685;
}
.objective-hud p {
  font-size: 10px;
  color: #b4c7c2;
  margin: 7px 0;
}
.seal-dots {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}
.seal-dots i {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  border: 1px solid #bcac76;
  background: #213742;
}
.seal-dots i.done {
  background: #d8bd7e;
  box-shadow: 0 0 7px #e9c67c66;
}
.minimap {
  position: absolute;
  right: 30px;
  top: 100px;
  width: 135px;
  height: 103px;
  border: 1px solid #879e9b4a;
  border-radius: 2px;
}
.equipment-hud {
  position: absolute;
  bottom: 23px;
  left: 50%;
  transform: translateX(-50%);
  background: #0e2530bb;
  padding: 9px 12px;
  border: 1px solid #aeb08b4d;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.equipment-hud .equip-row {
  flex-wrap: nowrap;
}
.equipment-hud .passive-row .equip-small {
  height: 25px;
  opacity: 0.85;
}
.equipment-hud .passive-row img {
  padding: 2px;
  filter: grayscale(0.8) sepia(0.3);
  opacity: 0.65;
}
.equip-hint {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  white-space: nowrap;
  letter-spacing: 1px;
  color: #9bb2b4;
}
.boss-hud {
  position: absolute;
  bottom: 142px;
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, 65vw);
  text-align: center;
}
.boss-name {
  font-family: Dalbit, serif;
  font-size: 17px;
  letter-spacing: 3px;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px #081b24;
}
.boss-track {
  height: 8px;
  background: #172c35;
  border: 1px solid #be9a695b;
  padding: 1px;
}
.boss-track i {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #996c47, #dab171);
}
.boss-info {
  font-size: 9px;
  color: #ddd2b3;
  margin-top: 5px;
}
.dash-status {
  position: absolute;
  bottom: 34px;
  right: 35px;
  color: #ccd7c9;
  font-size: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.dash-ring {
  width: 40px;
  height: 40px;
  border: 2px solid #bdc8ae88;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.run-tip {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 13px 22px;
  border: 1px solid #d2c89d77;
  background: #122f3aea;
  text-align: center;
  line-height: 1.8;
  font-size: 13px;
  color: #e3debd;
  animation: fadein 0.3s;
}
.run-tip small {
  display: block;
  color: #a1c1bc;
  font-size: 11px;
}
#toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: 100px;
  transform: translate(-50%, -15px);
  max-width: min(600px, 90vw);
  background: #183640f2;
  border: 1px solid #d0bc795e;
  color: #e5dcc0;
  padding: 14px 23px;
  line-height: 1.7;
  font-size: 12px;
  border-radius: 3px;
  box-shadow: 0 8px 40px #07141c55;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#touch {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
#stick {
  position: absolute;
  width: 108px;
  height: 108px;
  bottom: 35px;
  left: 40px;
  border-radius: 50%;
  border: 1px solid #c8d4b94d;
  background: #16323c52;
  opacity: 0.7;
}
#stick i {
  display: block;
  position: absolute;
  left: 31px;
  top: 31px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #d7dfc96b;
  background: #a1b8af35;
}
#dash {
  position: absolute;
  bottom: 55px;
  right: 43px;
  width: 77px;
  height: 77px;
  pointer-events: auto;
  border: 1px solid #d5cd9c9c;
  background: #193540b0;
  border-radius: 50%;
  color: #e9dcba;
  font-size: 15px;
}
#dash span {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  color: #a8bdb7;
  margin-top: 5px;
}
.fullscreen {
  position: absolute;
  left: 30px;
  bottom: 26px;
  font-size: 10px;
  color: #a7b9b8;
  background: #17313a99;
  border: 1px solid #9fb5ae33;
  padding: 9px 12px;
}
.control-note {
  font-size: 10px;
  line-height: 1.8;
  color: #8da7aa;
}
.footer-actions {
  display: flex;
  gap: 9px;
  margin-top: 25px;
  flex-wrap: wrap;
}
.empty {
  color: #95adae;
  padding: 35px;
  text-align: center;
}
.help-list {
  color: #bdcdc5;
  font-size: 12px;
  line-height: 2.1;
  padding-left: 20px;
}
.intro-actions {
  display: flex;
  gap: 10px;
  justify-content: end;
}
.mobile-only {
  display: none;
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: translate(-50%, -43%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
@media (max-width: 1000px) {
  .page {
    padding: 25px;
  }
  .departure {
    gap: 22px;
  }
  .character-portrait {
    width: 155px;
    height: 200px;
  }
  .char-copy h2 {
    font-size: 32px;
  }
  .training {
    grid-template-columns: repeat(3, 1fr);
  }
  .compendium {
    grid-template-columns: repeat(2, 1fr);
  }
  .enemy-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .home h1 {
    font-size: 75px;
  }
  .modal {
    padding: 28px;
  }
  .choice-card {
    min-height: 265px;
  }
}
@media (pointer: coarse) {
  .dash-status,
  .fullscreen,
  .equip-hint {
    display: none;
  }
  .mobile-only {
    display: block;
  }
  .desktop-only {
    display: none;
  }
  .equipment-hud {
    bottom: 15px;
  }
  .hud-pause {
    width: 46px;
    height: 46px;
  }
  .topbar .btn {
    min-height: 48px;
  }
  .choice-card {
    min-height: 250px;
  }
  #touch:not([hidden]) {
    display: block;
  }
}
@media (max-width: 700px) {
  .topbar {
    height: 66px;
    padding: 0 18px;
    gap: 10px;
  }
  .brand {
    font-size: 18px;
    letter-spacing: 2px;
  }
  .topright {
    gap: 6px;
  }
  .topright .btn {
    padding: 8px 10px;
    font-size: 11px;
  }
  .coins {
    font-size: 12px;
  }
  .home {
    background: linear-gradient(90deg, #0c1e2ae6, #10263288);
  }
  .home-copy {
    margin: auto 8vw;
    padding: 40px 0;
  }
  .home h1 {
    font-size: 67px;
    letter-spacing: 9px;
    margin: 22px 0;
  }
  .home .lead {
    font-size: 13px;
  }
  .seal-stamp {
    left: auto;
    right: 25px;
    top: 75px;
  }
  .home-foot {
    padding: 18px;
    font-size: 9px;
  }
  .home-progress {
    gap: 14px;
  }
  .home-foot > .tag {
    display: none;
  }
  .page {
    padding: 22px 18px 35px;
  }
  .page-head {
    align-items: start;
    gap: 12px;
    margin-bottom: 20px;
  }
  .page-head h2 {
    font-size: 24px;
  }
  .page-head p {
    font-size: 11px;
  }
  .tabs {
    gap: 2px;
    margin-bottom: 20px;
  }
  .tabs button {
    padding: 9px 12px;
    font-size: 12px;
  }
  .departure {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .character-view {
    min-height: 215px;
  }
  .character-portrait {
    width: 160px;
    height: 205px;
  }
  .char-copy h2 {
    font-size: 34px;
  }
  .char-copy p {
    font-size: 11px;
  }
  .character-list {
    gap: 6px;
  }
  .char-mini {
    width: 52px;
    height: 52px;
  }
  .character-card {
    font-size: 12px;
  }
  .character-card small {
    font-size: 8px;
  }
  .region {
    min-height: 73px;
    padding: 9px 12px;
  }
  .departure-foot {
    margin-top: 20px;
  }
  .departure-foot .primary {
    width: 100%;
  }
  .training {
    grid-template-columns: repeat(2, 1fr);
  }
  .train-card {
    padding: 16px 12px;
  }
  .train-card h3 {
    font-size: 18px;
  }
  .compendium {
    grid-template-columns: 1fr;
  }
  .enemy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .enemy-entry {
    padding: 9px;
  }
  .enemy-art {
    width: 42px;
    height: 52px;
  }
  .record {
    grid-template-columns: 50px 1fr;
    padding: 16px;
    gap: 15px;
  }
  .record img {
    width: 48px;
    height: 65px;
  }
  .record h3 {
    font-size: 18px;
  }
  .record > .btn {
    grid-column: 2;
    font-size: 11px;
    justify-self: start;
  }
  .modal-shade {
    padding: 12px;
  }
  .modal {
    max-height: calc(100dvh - 24px);
    padding: 23px 20px;
  }
  .modal h2 {
    font-size: 25px;
    letter-spacing: 2px;
  }
  .modal-desc {
    font-size: 11px;
    margin-bottom: 18px;
  }
  .choice-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .choice-card {
    min-height: 115px;
    display: grid;
    grid-template-columns: 75px 1fr;
    grid-template-rows: auto auto 1fr;
  }
  .choice-top {
    grid-column: 2;
    padding: 12px 12px 0;
    font-size: 9px;
  }
  .choice-card img {
    width: 62px;
    height: 62px;
    margin: 23px 8px;
    grid-row: 1/4;
    grid-column: 1;
  }
  .choice-card h3 {
    font-size: 20px;
    margin: 6px 12px;
  }
  .choice-card p {
    font-size: 11px;
    margin: 0 12px 8px;
  }
  .choice-bottom {
    grid-column: 1/-1;
    padding: 7px 12px;
    font-size: 9px;
  }
  .choice-tools {
    margin-top: 12px;
  }
  .choice-tools .btn {
    font-size: 10px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .setting-row {
    padding: 12px 0;
  }
  .result h2 {
    font-size: 33px;
    letter-spacing: 4px;
  }
  .result-numbers {
    gap: 6px;
  }
  .result-numbers strong {
    font-size: 24px;
  }
  .result-numbers span {
    font-size: 9px;
  }
  .result-actions {
    flex-wrap: wrap;
  }
  .result-actions .btn {
    flex: 1;
    white-space: nowrap;
  }
  .hud-top {
    padding: 20px 15px;
    gap: 10px;
  }
  .hud-health {
    min-width: 113px;
    width: 30%;
  }
  .hud-name {
    font-size: 10px;
  }
  .hud-time {
    font-size: 26px;
  }
  .hud-time small {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .hud-right {
    gap: 11px;
    min-width: 115px;
  }
  .hud-counter {
    font-size: 11px;
  }
  .hud-counter small {
    font-size: 8px;
  }
  .hud-right .coin-count {
    display: none;
  }
  .hud-pause {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  .objective-hud {
    left: 15px;
    top: 105px;
  }
  .objective-hud p {
    font-size: 9px;
    max-width: 180px;
  }
  .minimap {
    right: 15px;
    top: 102px;
    width: 91px;
    height: 70px;
    opacity: 0.85;
  }
  .equipment-hud {
    padding: 6px;
    bottom: 16px;
    gap: 3px;
  }
  .equip-small {
    width: 33px;
    height: 34px;
  }
  .equipment-hud .passive-row .equip-small {
    height: 20px;
  }
  .equip-row {
    gap: 3px;
  }
  .equipment-hud .equip-small small {
    font-size: 8px;
  }
  .boss-hud {
    bottom: 126px;
    width: 64vw;
  }
  .boss-name {
    font-size: 13px;
  }
  .boss-info {
    font-size: 8px;
  }
  .dash-status {
    right: 15px;
    bottom: 110px;
  }
  .fullscreen {
    left: 15px;
    bottom: 115px;
  }
  .story-text {
    font-size: 15px;
    line-height: 1.9;
  }
  .story-art {
    width: 110px;
    height: 115px;
  }
  .tutorial-grid {
    gap: 9px;
  }
  .tutorial-item {
    padding: 12px;
  }
  .tutorial-item p {
    font-size: 11px;
  }
  .history {
    font-size: 10px;
  }
  .history td,
  .history th {
    padding: 12px 6px;
  }
  #toast {
    top: 80px;
    font-size: 11px;
    padding: 12px 17px;
  }
  #stick {
    left: 22px;
    bottom: 115px;
    width: 96px;
    height: 96px;
  }
  #stick i {
    left: 25px;
    top: 25px;
  }
  #dash {
    right: 24px;
    bottom: 125px;
    width: 69px;
    height: 69px;
  }
}
@media (max-height: 540px) and (orientation: landscape) {
  .topbar {
    height: 55px;
  }
  .page {
    padding-top: 18px;
  }
  .home-copy {
    padding: 10px 0 20px;
  }
  .home h1 {
    font-size: 49px;
    letter-spacing: 6px;
    margin: 13px 0;
  }
  .home .lead {
    font-size: 11px;
    margin: 0 0 18px;
  }
  .home .eyebrow {
    font-size: 9px;
  }
  .home-actions .primary {
    min-height: 44px;
  }
  .home-foot {
    padding: 12px 4vw;
  }
  .seal-stamp {
    top: 38px;
  }
  .modal {
    padding: 20px 28px;
  }
  .modal h2 {
    font-size: 24px;
    margin: 9px 0;
  }
  .modal-desc {
    margin-bottom: 13px;
  }
  .choice-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .choice-card {
    display: flex;
    min-height: 210px;
  }
  .choice-card img {
    height: 48px;
    width: 48px;
    margin: 10px auto 0;
  }
  .choice-card h3 {
    font-size: 18px;
    margin: 8px 13px;
  }
  .choice-card p {
    font-size: 10px;
    margin: 0 13px 10px;
  }
  .choice-top {
    padding: 10px 13px 0;
  }
  .choice-bottom {
    font-size: 9px;
    padding: 8px 12px;
  }
  .choice-tools {
    margin-top: 12px;
  }
  .hud-top {
    padding: 16px 22px;
  }
  .hud-time {
    font-size: 26px;
  }
  .objective-hud {
    top: 92px;
  }
  .minimap {
    width: 105px;
    height: 80px;
    top: 85px;
  }
  .equipment-hud {
    bottom: 12px;
    padding: 5px;
    gap: 3px;
  }
  .equip-small {
    width: 32px;
    height: 33px;
  }
  .equipment-hud .passive-row .equip-small {
    height: 18px;
  }
  .boss-hud {
    bottom: 109px;
  }
  .boss-name {
    font-size: 13px;
  }
  .dash-status {
    bottom: 25px;
  }
  .tutorial-grid {
    margin: 12px 0;
  }
  .tutorial-item {
    padding: 10px;
  }
  .story-text {
    font-size: 14px;
    line-height: 1.8;
    margin: 15px 0;
  }
  .modal .footer-actions {
    margin-top: 15px;
  }
  #stick {
    bottom: 23px;
    left: 45px;
    width: 96px;
    height: 96px;
  }
  #stick i {
    left: 25px;
    top: 25px;
  }
  #dash {
    bottom: 30px;
    right: 45px;
    width: 70px;
    height: 70px;
  }
  .equipment-hud .equip-hint {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Readable text and reachable controls on compact and touch displays. */
html,
body {
  font-size: 16px;
}
.btn,
.tabs button,
.character-card,
.setting-row,
.bind-btn {
  font-size: 14px;
}
.tag,
.eyebrow,
.tiny,
.control-note,
.choice-top,
.choice-bottom,
.character-card small,
.region-state,
.record .record-label,
.result-numbers span,
.hud-time small,
.hud-counter small,
.health-text,
.equip-hint,
.boss-info {
  font-size: 12px;
}
.char-copy p,
.char-quote,
.region p,
.page-head p,
.modal-desc,
.tutorial-item p,
.weapon-entry p,
.weapon-entry .recipe,
.enemy-entry p,
.record p,
.choice-card p,
.train-card p,
.result-reward,
.section-note,
.history,
.pause-stats {
  font-size: 14px;
}
.char-quote {
  font-size: 14px !important;
}
.choice-tools .btn,
.settings-bottom .btn,
.topright .btn {
  font-size: 14px;
}
.hud-name,
.objective-hud b,
.objective-hud p {
  font-size: 13px;
}
.hud-pause,
.close-btn {
  min-width: 44px;
  min-height: 44px;
}
.home {
  height: 100%;
  overflow: auto;
}
.home .topbar,
.home-copy,
.home-foot {
  flex-shrink: 0;
}
.home-foot {
  font-size: 12px;
}
.modal .control-note {
  margin-top: 18px;
  line-height: 1.85;
}
.modal button {
  scroll-margin: 16px;
}
@media (max-width: 700px) {
  .page-head p,
  .region p,
  .char-copy p,
  .tutorial-item p,
  .choice-card p,
  .modal-desc {
    font-size: 14px;
  }
  .character-card small {
    font-size: 10px;
  }
  .home-progress {
    gap: 10px;
    flex-wrap: wrap;
  }
  .home-foot {
    font-size: 11px;
  }
  .home .lead {
    font-size: 15px;
  }
  .hud-time small {
    font-size: 10px;
    letter-spacing: 0;
  }
  .hud-health {
    min-width: 98px;
  }
  .hud-right {
    min-width: 90px;
    gap: 8px;
  }
  .hud-top {
    padding: 17px 12px;
  }
  .objective-hud p {
    font-size: 12px;
    max-width: 175px;
    line-height: 1.55;
  }
  .choice-bottom {
    font-size: 12px;
  }
  .character-portrait {
    width: 135px;
    height: 174px;
  }
  .char-mini {
    width: 44px;
    height: 44px;
  }
  .character-list {
    gap: 4px;
  }
  .brand {
    font-size: 16px;
  }
  .topbar {
    padding: 0 10px;
    gap: 4px;
  }
  .topright {
    gap: 2px;
  }
  .topright .btn {
    padding: 8px 7px;
    font-size: 12px;
  }
  .home .tag {
    letter-spacing: 1px;
    font-size: 10px;
  }
  .settings-grid {
    min-width: 0;
  }
  .setting-row input[type="range"] {
    width: 110px;
  }
}
@media (any-pointer: coarse) {
  .dash-status,
  .fullscreen,
  .equip-hint {
    display: none;
  }
  #touch:not([hidden]) {
    display: block;
  }
}
@media (max-width: 380px) {
  .home-copy {
    margin: auto 7vw;
  }
  .home-actions .primary {
    min-width: 0;
    width: 100%;
  }
  .character-portrait {
    width: 110px;
    height: 142px;
  }
  .modal {
    padding: 20px 15px;
  }
  .hud-time {
    font-size: 23px;
  }
}

.extra-art {
  display: inline-block;
  background-image: url("assets/weapons-extra.png");
  background-size: 200% 200%;
  background-repeat: no-repeat;
  flex-shrink: 0;
  width: 65px;
  height: 65px;
}
.choice-card > .extra-art {
  width: 83px;
  height: 83px;
  margin: 16px auto 8px;
  filter: drop-shadow(0 5px 10px #122630);
}
.equip-small > .extra-art {
  width: 100%;
  height: 100%;
}
.fused-icon {
  display: inline-block;
  position: relative;
  width: 83px;
  height: 83px;
  flex-shrink: 0;
}
.fused-icon > .weapon-art {
  position: absolute !important;
  object-fit: contain !important;
  width: 70% !important;
  height: 70% !important;
  margin: 0 !important;
  padding: 0 !important;
  left: 0;
  top: 0;
}
.fused-icon > .weapon-art + .weapon-art {
  left: auto;
  top: auto;
  right: 0;
  bottom: 0;
  width: 59% !important;
  height: 59% !important;
  filter: drop-shadow(0 1px 4px #0b1c29);
}
.equip-small .fused-icon {
  width: 100%;
  height: 100%;
}
.choice-card > .fused-icon {
  margin: 16px auto 8px;
}
.fusion-entry {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #83bfb966;
  background: #20404a;
  padding: 16px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.8;
}
.fusion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.fusion-recipe {
  border: 1px solid #86b2ab55;
  background: #15313d;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fusion-recipe.targeted {
  border-color: #e3c983;
  box-shadow: inset 0 3px #e3c983;
}
.fusion-recipe.ready {
  border-color: #a5e9d0;
}
.fusion-heading {
  display: flex;
  gap: 12px;
  align-items: center;
}
.fusion-heading > .fused-icon {
  width: 62px;
  height: 62px;
}
.fusion-heading h3 {
  margin: 5px 0;
  font-size: 23px;
  color: #f0d9ae;
}
.fusion-heading small {
  font-size: 12px;
  color: #a5d6cf;
}
.fusion-recipe p {
  font-size: 14px;
  line-height: 1.8;
  color: #bfd4d0;
  margin: 0;
}
.fusion-materials {
  display: grid;
  gap: 10px;
  margin-top: auto;
  font-size: 14px;
}
.fusion-materials > div {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px;
}
.fusion-materials b {
  font-size: 12px;
  font-weight: 400;
  color: #dacc9c;
}
.fusion-materials progress {
  width: 100%;
  height: 6px;
  border: 0;
  accent-color: #bcdfc8;
}
.fusion-recipe .btn {
  width: 100%;
  margin-top: 4px;
}
@media (max-width: 700px) {
  .choice-card > .extra-art,
  .choice-card > .fused-icon {
    width: 62px;
    height: 62px;
    margin: 23px 8px;
    grid-row: 1/4;
    grid-column: 1;
  }
  .fusion-grid {
    grid-template-columns: 1fr;
  }
  .fusion-entry {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .fusion-recipe {
    padding: 16px;
  }
}
@media (max-height: 540px) and (orientation: landscape) {
  .choice-card > .extra-art,
  .choice-card > .fused-icon {
    height: 48px;
    width: 48px;
    margin: 10px auto 0;
  }
}
