@font-face {
  font-family: Cinzel;
  src: url(assets/fonts/cinzel.ttf) format('truetype');
  font-weight: 600 900;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url(assets/fonts/barlow.ttf) format('truetype');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: DM;
  src: url(assets/fonts/dm-sans.ttf) format('truetype');
  font-weight: 400 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --navy: #08232d;
  --panel: #0a2b33;
  --ink: #071c25;
  --cream: #fff1ce;
  --muted: #b0c7c7;
  --gold: #edc27a;
  --edge: #917b53;
  --aqua: #7be3d3;
  --s-top: max(12px, env(safe-area-inset-top));
  --s-bottom: max(12px, env(safe-area-inset-bottom));
  --s-left: max(14px, env(safe-area-inset-left));
  --s-right: max(14px, env(safe-area-inset-right));
}
* {
  box-sizing: border-box;
}
html,
body,
#game {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  background: #082c36;
  color: var(--cream);
  font-family: DM, system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#game {
  position: relative;
  isolation: isolate;
  touch-action: none;
}
button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: none;
  touch-action: manipulation;
}
button:focus-visible {
  outline: 2px solid #fff4bf;
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
}
[hidden] {
  display: none !important;
}
.ico {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: none;
  vertical-align: middle;
}
#world,
#title-screen,
.key-art,
.title-shade,
#motes,
#hud,
#overlay,
#transition {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#world {
  touch-action: none;
  background: #0b323c;
  cursor: crosshair;
}
#title-screen {
  overflow: hidden;
  background: #0a3540;
}
.key-art {
  background: url(assets/title.webp) 50% 50% / cover no-repeat;
}
.title-shade {
  background:
    linear-gradient(
      90deg,
      rgba(2, 20, 30, 0.78) 0%,
      rgba(3, 27, 36, 0.57) 25%,
      rgba(3, 26, 38, 0.22) 46%,
      transparent 62%
    ),
    linear-gradient(0deg, #02192388 0%, transparent 18%, transparent 88%, #041f3238 100%);
}
.title-frame {
  position: absolute;
  inset: max(15px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(15px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border: 1px solid #ecd7a43c;
  pointer-events: none;
}
.title-frame i {
  position: absolute;
  width: 24px;
  height: 24px;
  border: solid #d2bd86;
  border-width: 2px 0 0 2px;
  top: -1px;
  left: -1px;
  opacity: 0.85;
}
.title-frame i:before,
.title-frame i:after {
  content: '';
  position: absolute;
  background: #d1b77f;
}
.title-frame i:before {
  width: 4px;
  height: 4px;
  left: 4px;
  top: 4px;
  transform: rotate(45deg);
}
.title-frame i:after {
  width: 12px;
  height: 1px;
  top: 8px;
  left: 3px;
  transform: rotate(-45deg);
}
.title-frame i:nth-child(2) {
  left: auto;
  right: -1px;
  transform: rotate(90deg);
}
.title-frame i:nth-child(3) {
  left: auto;
  top: auto;
  bottom: -1px;
  right: -1px;
  transform: rotate(180deg);
}
.title-frame i:nth-child(4) {
  top: auto;
  bottom: -1px;
  transform: rotate(270deg);
}
.title-content {
  position: absolute;
  left: 7.8%;
  top: 48.6%;
  transform: translateY(-50%);
  padding: 11px 0 6px;
}
.overline,
.eyebrow,
.vital-name,
.location small,
.objective span,
.save-note,
.tag,
.section-label,
.kicker {
  font-family: Barlow, 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  font-size: 12px;
  line-height: 1.25;
}
.overline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f4cd8a;
  font-size: clamp(11px, 1vw, 15px);
  letter-spacing: 0.3em;
  text-shadow: 0 2px 6px #041e2a;
}
.overline span {
  width: 31px;
  height: 1px;
  background: #d6ad6d;
  margin-right: -7px;
}
.overline i {
  background: #e8bc78;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  margin-right: 2px;
}
h1,
.panel-head h2,
.choice-name,
.route-name,
.monster-name,
.hero-summary h3,
.chapter-name,
.intro-name {
  font-family: Cinzel, Georgia, serif;
}
h1 {
  font-size: clamp(65px, 8.35vw, 160px);
  letter-spacing: -0.055em;
  line-height: 1.08;
  margin: 5px 0 0 -4px;
  font-weight: 800;
  color: #fff0c8;
  background: linear-gradient(#fff9dc 18%, #ffedbe 64%, #e0b679 96%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #715d3f) drop-shadow(0 5px 4px #04192388);
  white-space: nowrap;
}
#title-rule {
  width: clamp(226px, 30.5vw, 550px);
  height: 16px;
  margin: 0 0 10px 1px;
  color: #d9b677;
}
.wave-rule {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.opening-line {
  color: #e2e8dd;
  font-size: clamp(15px, 1.14vw, 21px);
  line-height: 1.55;
  letter-spacing: 0.02em;
  margin: 19px 0 28px;
  text-shadow: 0 2px 5px #04232e;
}
.title-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  width: clamp(247px, 19.5vw, 323px);
}
.menu-btn {
  display: flex;
  align-items: center;
  position: relative;
  isolation: isolate;
  padding: 0 17px 0 18px;
  height: clamp(47px, 3.55vw, 59px);
  text-align: left;
  background: linear-gradient(100deg, #12383eea, #092735e8);
  border: 1px solid #b298685c;
  box-shadow:
    inset 0 0 0 3px #0e2e34,
    0 3px 8px #00182150;
  border-radius: 3px;
  font-family: Barlow, sans-serif;
  font-size: clamp(14px, 1.1vw, 19px);
  text-transform: uppercase;
  letter-spacing: 2.2px;
  font-weight: 600;
  transition:
    background 0.16s,
    filter 0.16s,
    transform 0.16s,
    border-color 0.16s;
  color: #e2dcc7;
}
.menu-btn > .ico:first-child {
  width: 21px;
  height: 21px;
  color: #d5b77c;
  margin-right: 15px;
}
.menu-btn .tail {
  margin-left: auto;
  width: 14px;
  height: 14px;
  opacity: 0.62;
}
.menu-btn.primary,
.gold-button {
  background: linear-gradient(110deg, #ffdd93 0%, #efbd68 65%, #e6a14e 100%);
  color: #322b23;
  border: 1px solid #ffe4a3;
  box-shadow:
    inset 0 0 0 3px #e6b35e,
    inset 0 0 0 4px #ffdfa256,
    0 3px 12px #04222b66;
}
.menu-btn.primary > .ico:first-child {
  color: #614020;
}
.menu-btn.primary .tail {
  color: #452f20;
  opacity: 1;
}
@media (hover: hover) {
  .menu-btn:hover,
  .gold-button:hover,
  .text-button:hover,
  .minor-button:hover,
  .choice:hover,
  .route-row:hover,
  .gear-row:hover,
  .menu-row:hover,
  .monster-card:hover {
    filter: brightness(1.13);
    border-color: #edce8f;
  }
  .menu-btn:hover {
    transform: translateX(3px);
  }
}
.menu-btn:active,
.gold-button:active,
.square-button:active,
.minor-button:active {
  filter: brightness(0.91);
}
.title-utilities,
.hud-tools {
  position: absolute;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.title-utilities {
  top: max(33px, calc(env(safe-area-inset-top) + 10px));
  right: max(36px, calc(env(safe-area-inset-right) + 14px));
}
.square-button,
.close-button {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #c0aa776c;
  color: #eadbb5;
  border-radius: 3px;
  background: linear-gradient(140deg, #12373edb, #08232dd9);
  box-shadow: inset 0 0 0 2px #0b2d3580;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.square-button .ico {
  width: 18px;
  height: 18px;
}
.square-button:hover,
.close-button:hover {
  border-color: var(--gold);
  background: #163b43;
}
.save-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d0d6cc;
  font-size: 11px;
  letter-spacing: 1.6px;
  position: absolute;
  left: calc(7.8% + 1px);
  bottom: max(36px, calc(env(safe-area-inset-bottom) + 12px));
  text-shadow: 0 2px 4px #031b27;
}
.save-note .ico {
  width: 15px;
  height: 15px;
  color: #dcbb7b;
}
.title-compass {
  position: absolute;
  width: 55px;
  right: 43px;
  bottom: 35px;
  color: #ffe1a0;
  opacity: 0.86;
  filter: drop-shadow(0 2px 6px #251d17);
}
.rose {
  width: 100%;
  height: auto;
  display: block;
}
#motes {
  pointer-events: none;
  overflow: hidden;
}
#motes i {
  width: 3px;
  height: 3px;
  position: absolute;
  background: #ffdd85;
  box-shadow: 0 0 7px #ffc45a;
  border-radius: 50%;
  animation: drift var(--duration) linear infinite;
  opacity: 0;
}
@keyframes drift {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  15% {
    opacity: 0.82;
  }
  70% {
    opacity: 0.56;
  }
  100% {
    opacity: 0;
    transform: translate(35px, -92px);
  }
}
#hud {
  pointer-events: none;
  overflow: hidden;
}
#hud button,
#move-pad {
  pointer-events: auto;
}
.vitals,
.objective,
.skill-box,
.location,
.hud-tools button,
#boss-hud {
  filter: drop-shadow(0 2px 3px #00152055);
}
.vitals {
  position: absolute;
  top: var(--s-top);
  left: var(--s-left);
  display: flex;
  align-items: center;
  min-height: 59px;
}
.portrait {
  position: relative;
  width: 56px;
  height: 56px;
  z-index: 1;
  border: 2px solid #d5b276;
  box-shadow:
    inset 0 0 0 2px #142b30,
    0 0 0 1px #36433e;
  background: radial-gradient(at 48% 65%, #776449, #173039 80%);
  border-radius: 8px 2px 8px 2px;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.portrait b {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  height: 17px;
  min-width: 22px;
  border: 1px solid #c9ab74;
  border-radius: 2px;
  background: #213a40;
  color: #f7dca2;
  text-align: center;
  font: 12px/15px Barlow;
}
.vital-body {
  margin-left: -2px;
  border: 1px solid #a68f626f;
  border-radius: 0 5px 5px 0;
  background: linear-gradient(90deg, #0b2932f2, #102b37e8);
  width: 163px;
  padding: 4px 10px 7px 10px;
}
.vital-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 1.4px;
  margin-bottom: 3px;
}
.vital-name strong {
  font-family: Cinzel, serif;
  font-size: 15px;
  letter-spacing: 0.8px;
}
.vital-name span {
  font-size: 10px;
  letter-spacing: 0.6px;
  color: #e3ddc8;
}
.hp-rail,
.xp-rail,
.boss-rail {
  overflow: hidden;
  background: #041b24;
  width: 100%;
  border: 1px solid #9a80624d;
  border-radius: 2px;
}
.hp-rail {
  height: 9px;
}
.xp-rail {
  margin-top: 3px;
  height: 4px;
  border: 0;
}
.hp-rail i,
.xp-rail i,
.boss-rail i {
  display: block;
  height: 100%;
  transition: width 0.14s;
  background: linear-gradient(#ef9b79, #d96b57);
  border-radius: 1px;
}
.xp-rail i {
  background: #e8bd6d;
}
.location {
  position: absolute;
  display: flex;
  align-items: center;
  flex-direction: column;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--s-top) + 1px);
  text-shadow:
    0 2px 3px #05131d,
    0 0 8px #031c24,
    0 2px 12px #00121e;
}
.location small {
  color: #ffe7ab;
  font-size: 10px;
  letter-spacing: 3.6px;
  line-height: 1.5;
}
.location strong {
  font:
    19px Cinzel,
    serif;
  color: #fff4d5;
}
.hud-tools {
  right: var(--s-right);
  top: calc(var(--s-top) + 3px);
  gap: 7px;
}
.hud-tools .square-button {
  background: #0b2a34e8;
}
.objective {
  position: absolute;
  bottom: calc(var(--s-bottom) + 6px);
  left: var(--s-left);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  padding: 9px 13px 10px;
  background: linear-gradient(105deg, #0a2733f5, #12333dd9);
  border: 1px solid #b49a666b;
  border-left: 3px solid #d4ae6e;
  border-radius: 2px 5px 5px 2px;
}
.objective-glyph {
  display: flex;
  color: #e6c27c;
}
.objective-glyph .ico {
  width: 22px;
  height: 22px;
}
.objective span {
  display: block;
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #e7c786;
}
.objective strong {
  display: block;
  font-family: Barlow, sans-serif;
  letter-spacing: 0.3px;
  font-size: 16px;
  line-height: 1.3;
}
.objective b {
  align-self: center;
  white-space: nowrap;
  font: 14px Barlow;
  color: #ffe5a7;
}
#boss-hud {
  position: absolute;
  top: calc(var(--s-top) + 55px);
  left: 50%;
  width: min(355px, 42%);
  transform: translateX(-50%);
  text-align: center;
}
.boss-name {
  font: small-caps bold 17px Cinzel;
  letter-spacing: 1px;
  text-shadow:
    0 2px 3px #260d15,
    0 1px 5px #240f1c;
}
.boss-rail {
  border: 2px solid #292a35;
  outline: 1px solid #e3c28d;
  height: 8px;
  margin-top: 3px;
  background: #291c2b;
}
.boss-rail i {
  background: linear-gradient(#f4a091, #d75a69);
}
#skills {
  position: absolute;
  bottom: calc(var(--s-bottom) + 7px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: end;
  gap: 9px;
}
.skill-box {
  isolation: isolate;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 62px;
  height: 57px;
  background: linear-gradient(145deg, #24484bee, #102b35ef);
  border: 1px solid #c6b082;
  box-shadow:
    inset 0 0 0 2px #0d2935,
    inset 0 0 0 3px #d4bc7b33;
  border-radius: 4px;
  color: #ffe6af;
  overflow: visible;
}
.skill-box .ico {
  width: 24px;
  height: 24px;
}
.skill-box[data-skill='flare'] {
  color: #ffcb7a;
}
.skill-box[data-skill='dodge'] {
  color: #99e5dd;
}
.skill-box small {
  font: 9px Barlow;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin-top: 2px;
}
.skill-box kbd {
  position: absolute;
  right: -4px;
  top: -6px;
  padding: 0 4px;
  min-width: 15px;
  border: 1px solid #9b966f;
  border-radius: 2px;
  background: #102732;
  color: #f4e3ba;
  font: 10px/13px Barlow;
  text-align: center;
}
.skill-box .cool {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  background: #031822ac;
  z-index: -1;
  pointer-events: none;
  border-top: 1px solid #f4cd7b66;
}
.skill-box.waiting > .ico {
  opacity: 0.38;
}
.skill-box .seconds {
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  text-shadow: 0 1px 2px #02131c;
  font: 18px Barlow;
  text-align: center;
  color: #fff1ce;
}
#move-reminder {
  position: absolute;
  right: var(--s-right);
  bottom: calc(var(--s-bottom) + 17px);
  font: 11px Barlow;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-shadow: 0 1px 5px #00101e;
  background: #082632c9;
  border: 1px solid #c7b88c4f;
  padding: 6px 9px;
  border-radius: 2px;
  color: #e5dfc8;
}
#move-pad {
  display: none;
  position: absolute;
  left: calc(var(--s-left) + 12px);
  bottom: calc(var(--s-bottom) + 10px);
  width: 96px;
  height: 96px;
  border: 1px solid #e5dfb971;
  border-radius: 50%;
  background: radial-gradient(circle, #193b4140, #08273385);
  box-shadow: inset 0 0 0 4px #17394438;
  touch-action: none;
}
#move-pad:before,
#move-pad:after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 67%;
  height: 1px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, #f3e7c275, transparent 30%, transparent 70%, #f3e7c275);
}
#move-pad:after {
  transform: translate(-50%, -50%) rotate(90deg);
}
#move-pad b {
  position: absolute;
  left: calc(50% - 17px);
  top: calc(50% - 17px);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #d6d2b88a;
  background: #b6c1a852;
  box-shadow: inset 0 0 0 3px #15353e33;
  z-index: 1;
}
#intro-banner,
#hint,
#battle-toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}
#intro-banner {
  top: 22%;
  text-shadow:
    0 2px 4px #0f1724,
    0 3px 14px #081c2e;
  white-space: nowrap;
  transition: opacity 0.45s;
}
#intro-banner .kicker {
  color: #ffe3a2;
  font-size: 12px;
  letter-spacing: 4px;
}
.intro-name {
  font-size: clamp(26px, 3.3vw, 51px);
  line-height: 1.3;
  color: #fff4d6;
}
.intro-rule {
  width: 90px;
  height: 6px;
  margin: 0 auto;
  border-top: 1px solid #e8ca85;
}
.intro-rule:after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #edcf8b;
  transform: translateY(-12px) rotate(45deg);
}
#hint {
  bottom: calc(var(--s-bottom) + 81px);
  width: max-content;
  max-width: min(86%, 540px);
  padding: 6px 12px;
  background: #08232ee8;
  border: 1px solid #cab07980;
  border-radius: 3px;
  color: #f7eaca;
  font-size: 12px;
  line-height: 1.4;
}
#hint:empty,
#battle-toast:empty {
  display: none;
}
#battle-toast {
  top: 17%;
  font: 16px Barlow;
  letter-spacing: 0.7px;
  color: #ffe3a2;
  text-shadow: 0 2px 4px #001a29;
  background: linear-gradient(90deg, transparent, #0b2836e6 20%, #0b2836e6 80%, transparent);
  padding: 6px 25px;
  white-space: nowrap;
}
#overlay {
  display: grid;
  place-items: center;
  z-index: 6;
  background: radial-gradient(ellipse at 50% 42%, #041f2d6e, #031820ba);
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  touch-action: pan-y;
}
#panel {
  position: relative;
  isolation: isolate;
  width: min(648px, 100%);
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #bf9f66;
  box-shadow:
    0 0 0 3px #08232ce8,
    0 0 0 4px #ab95605b,
    0 14px 80px #01101c99,
    inset 0 0 0 5px #0a2831,
    inset 0 0 0 6px #b89d6533;
  border-radius: 5px;
  background:
    radial-gradient(ellipse at 80% -20%, #23484a66, transparent 60%),
    linear-gradient(155deg, #12343d, #0a242f 85%);
  color: #edf0df;
  padding: 28px 30px 24px;
  scrollbar-color: #8e835d #0d2b34;
  scrollbar-width: thin;
}
#panel.compact {
  width: min(430px, 100%);
}
#panel.wide {
  width: min(760px, 100%);
}
.panel-head {
  position: relative;
  padding-right: 24px;
  margin-bottom: 19px;
}
.panel-head h2 {
  color: #ffedc5;
  font-size: clamp(25px, 3.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 5px 0 0;
}
.eyebrow,
.section-label,
.tag {
  font-size: 10px;
  letter-spacing: 2.4px;
  color: var(--gold);
  display: block;
}
.panel-head p,
.body-copy,
.choice-desc,
.journal-note {
  font-size: 14px;
  color: #ccd8d5;
  line-height: 1.55;
  margin: 9px 0 0;
}
.panel-head p {
  max-width: 570px;
}
.close-button {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 30px;
  width: 30px;
  height: 30px;
}
.close-button .ico {
  width: 15px;
  height: 15px;
}
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 0;
  border-top: 1px solid #a18b5f4d;
  padding-top: 16px;
}
.panel-foot:empty {
  display: none;
}
.gold-button,
.minor-button,
.text-button,
.tab-btn,
.menu-row {
  font-family: Barlow, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 13px;
  font-weight: 600;
}
.gold-button,
.minor-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  min-height: 40px;
  border-radius: 3px;
}
.gold-button .ico,
.minor-button .ico,
.text-button .ico {
  width: 16px;
  height: 16px;
}
.minor-button {
  border: 1px solid #a592696b;
  background: linear-gradient(120deg, #1d4248, #12343e);
  color: #eee2bc;
}
.minor-button:disabled {
  opacity: 0.49;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  color: #d9c99f;
}
.menu-stack {
  display: grid;
  gap: 7px;
}
.menu-row {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 13px;
  padding: 12px 14px;
  min-height: 44px;
  background: linear-gradient(90deg, #214248, #153540);
  border: 1px solid #af9a6f55;
  border-radius: 3px;
}
.menu-row > .ico:first-child {
  color: var(--gold);
  width: 18px;
}
.menu-row .tail {
  margin-left: auto;
  width: 14px;
  color: #d3bc89;
}
.control-row,
.setting-row,
.stat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #9db9af27;
}
.control-row:last-child,
.setting-row:last-child,
.stat-row:last-child {
  border-bottom: 0;
}
.control-row > .ico {
  color: var(--gold);
  width: 23px;
}
.control-row > div,
.setting-row > div {
  flex: 1;
  min-width: 0;
}
.control-row strong,
.setting-row strong,
.stat-row b {
  font: 17px Barlow;
  color: #f2e7cb;
  letter-spacing: 0.3px;
}
.control-row p,
.setting-row p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #becfcc;
  line-height: 1.45;
}
kbd {
  font: 12px Barlow;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #081f29;
  border: 1px solid #a195726b;
  border-radius: 3px;
  color: #ecdeba;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  line-height: 1.25;
}
.toggle {
  width: 46px;
  height: 26px;
  border-radius: 20px;
  border: 1px solid #7e8e87;
  background: #122e37;
  display: flex;
  align-items: center;
  padding: 3px;
  flex-shrink: 0;
}
.toggle i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #a7b3ad;
}
.toggle.on {
  justify-content: end;
  background: #396861;
  border-color: #95b9a2;
}
.toggle.on i {
  background: #f8e1aa;
}
.tabs {
  display: flex;
  gap: 3px;
  padding-bottom: 0;
  margin: 0 0 15px;
  border-bottom: 1px solid #b4a57b45;
  overflow-x: auto;
}
.tab-btn {
  position: relative;
  padding: 8px 10px 10px;
  min-height: 35px;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 1.2px;
  color: #b8c5c1;
}
.tab-btn.active {
  color: var(--gold);
}
.tab-btn.active:after {
  content: '';
  position: absolute;
  height: 2px;
  background: var(--gold);
  bottom: 0;
  left: 6px;
  right: 6px;
}
.sea-chart {
  width: 100%;
  height: clamp(122px, 23vh, 218px);
  display: block;
  object-fit: cover;
  object-position: 50% 51%;
  border: 1px solid #a18d625c;
  border-radius: 3px;
}
.route-list {
  display: grid;
  margin-top: 10px;
  gap: 5px;
}
.route-row,
.gear-row {
  color: inherit;
  text-align: left;
  border: 1px solid #72878240;
  background: #18394180;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 3px;
  padding: 8px 10px;
}
.route-row.current {
  border-color: #b89e68a6;
  background: #2943418c;
}
.route-number {
  font: 13px Cinzel;
  color: var(--gold);
  border: 1px solid #b9a47485;
  min-width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  margin: 2px 5px;
}
.route-number span {
  transform: rotate(-45deg);
}
.route-info,
.gear-info {
  flex: 1;
  min-width: 0;
}
.route-info strong,
.gear-info strong,
.monster-card strong {
  display: block;
  font: 16px Barlow;
  letter-spacing: 0.3px;
  color: #f1e7cd;
}
.route-info small,
.gear-info small,
.monster-card small {
  display: block;
  font: 11px Barlow;
  color: #a8c4c2;
  letter-spacing: 0.9px;
}
.route-state {
  font: 10px Barlow;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #cfba8e;
}
.route-state .ico {
  width: 16px;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.choice-grid.two {
  grid-template-columns: repeat(2, 1fr);
}
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  padding: 14px 13px 12px;
  border: 1px solid #ad936d70;
  background: linear-gradient(145deg, #1d4147b0, #102d37);
  border-radius: 4px;
  transition:
    transform 0.16s,
    border-color 0.16s;
}
.choice:hover {
  transform: translateY(-2px);
}
.choice:focus-visible {
  outline-offset: 0;
}
.choice-art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 74px;
  margin: 0 0 12px;
  background: radial-gradient(ellipse at center, #a7a97022, transparent 68%);
}
.choice-art img {
  height: 100%;
  max-width: 92%;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px #02151d);
}
.choice-art .ico {
  width: 36px;
  height: 36px;
  color: var(--card-color, var(--gold));
}
.talent-diamond {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  border: 1px solid var(--card-color, var(--gold));
  background: #0b2832;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 3px #254246;
}
.talent-diamond .ico {
  transform: rotate(-45deg);
  width: 27px;
  height: 27px;
}
.choice .tag {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: var(--card-color, var(--gold));
}
.choice-name {
  font-size: 18px;
  line-height: 1.3;
  color: #fff1cd;
  margin-top: 5px;
}
.choice-desc {
  font-size: 12px;
  margin: 6px 0 14px;
  line-height: 1.5;
}
.choice-action {
  align-self: stretch;
  margin-top: auto;
  border-top: 1px solid #8e9c7d40;
  padding-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 11px Barlow;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--gold);
}
.choice-action .ico {
  width: 14px;
  height: 14px;
}
.loot-line,
.stat-strip,
.little-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c5d5cd;
  font-size: 12px;
}
.loot-line .ico,
.stat-strip .ico,
.little-note .ico {
  color: #edc681;
  width: 16px;
  height: 16px;
}
.stat-strip {
  flex-wrap: wrap;
  gap: 9px 16px;
  margin: 8px 0 13px;
  color: #e8ddc1;
  font-family: Barlow;
  letter-spacing: 0.5px;
  font-size: 14px;
}
.stat-strip span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.gear-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0 0 13px;
}
.slot-tab {
  border: 1px solid #91a49255;
  background: #16323d;
  border-radius: 4px;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  font: 13px Barlow;
  color: #cbdbd0;
}
.slot-tab img {
  width: 35px;
  height: 37px;
  object-fit: contain;
}
.slot-tab.active {
  border-color: #d7b57b;
  background: #2c463f;
  color: #f7e2b4;
}
.gear-list {
  display: grid;
  gap: 7px;
}
.gear-row {
  padding: 9px;
}
.gear-row img {
  width: 40px;
  height: 45px;
  object-fit: contain;
}
.gear-row.active {
  border-color: #c3a7739c;
}
.gear-info small {
  line-height: 1.4;
  margin-top: 2px;
  letter-spacing: 0.3px;
  font-family: DM;
  font-size: 11px;
}
.gear-row .route-state {
  white-space: nowrap;
}
.gear-details {
  background: #0a242e8a;
  border: 1px solid #849b8842;
  padding: 12px 14px;
  border-radius: 3px;
  margin-top: 12px;
}
.folio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.monster-card {
  display: flex;
  min-width: 0;
  text-align: center;
  flex-direction: column;
  align-items: center;
  padding: 9px 4px;
  border: 1px solid #8a9e8d50;
  border-radius: 4px;
  background: radial-gradient(at 50% 0%, #214750, #122e38);
}
.monster-card img {
  height: 47px;
  width: 65px;
  object-fit: contain;
  margin: 1px 0 4px;
}
.undiscovered img {
  filter: brightness(0) opacity(0.52);
}
.monster-detail {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 12px;
  padding: 11px 14px;
  background: #0a242ebf;
  border: 1px solid #819b8640;
  border-radius: 4px;
}
.monster-detail img {
  width: 74px;
  height: 76px;
  object-fit: contain;
}
.monster-detail strong {
  font: 18px Cinzel;
  color: #f7e6bd;
}
.monster-detail p {
  font-size: 12px;
  line-height: 1.5;
  color: #c4d2cc;
  margin: 4px 0;
}
.stat-row {
  justify-content: space-between;
  font-size: 13px;
  color: #c0d0cc;
}
.stat-row b {
  color: #ebc986;
}
.shrine-art {
  display: block;
  max-height: 116px;
  max-width: 150px;
  object-fit: contain;
  margin: 4px auto 15px;
  filter: drop-shadow(0 0 19px #e6ca793e);
}
#transition {
  pointer-events: none;
  z-index: 9;
  background: #08242d;
  opacity: 0;
}
@keyframes arrive {
  0% {
    opacity: 0.94;
  }
  100% {
    opacity: 0;
  }
}
.touch #move-pad {
  display: block;
}
.touch #move-reminder {
  display: none;
}
.touch .objective {
  bottom: auto;
  top: calc(var(--s-top) + 69px);
  padding: 5px 8px;
  gap: 7px;
  max-width: 245px;
}
.touch .objective strong {
  font-size: 13px;
}
.touch .objective span {
  font-size: 8px;
}
.touch .objective-glyph .ico {
  width: 17px;
  height: 17px;
}
.touch #skills {
  left: auto;
  right: calc(var(--s-right) + 2px);
  bottom: calc(var(--s-bottom) + 6px);
  transform: none;
  width: 164px;
  height: 111px;
  display: block;
}
.touch .skill-box {
  position: absolute;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  overflow: hidden;
  background: linear-gradient(140deg, #24454add, #0d2b36dd);
  border-color: #d8c392b5;
}
.touch .skill-box small {
  font-size: 8px;
}
.touch .skill-box .ico {
  width: 23px;
  height: 23px;
}
.touch .skill-box kbd {
  display: none;
}
.touch .skill-box[data-skill='slash'] {
  width: 70px;
  height: 70px;
  bottom: 1px;
  right: 3px;
  color: #ffe3a9;
  background: linear-gradient(138deg, #5b5946de, #263b3bde);
}
.touch .skill-box[data-skill='slash'] .ico {
  width: 30px;
  height: 30px;
}
.touch .skill-box[data-skill='flare'] {
  right: 38px;
  top: 0;
}
.touch .skill-box[data-skill='dodge'] {
  left: 10px;
  bottom: 4px;
}
.touch .skill-box .seconds {
  top: 12px;
}
.touch .skill-box[data-skill='slash'] .seconds {
  top: 20px;
}
.touch #hint {
  bottom: calc(var(--s-bottom) + 122px);
  font-size: 11px;
  max-width: 80%;
}
@media (min-width: 1500px) {
  #panel {
    font-size: 16px;
  }
  .title-menu {
    gap: 12px;
  }
  .opening-line {
    margin-bottom: 34px;
  }
  .save-note {
    font-size: 12px;
  }
}
@media (max-width: 850px) {
  #move-reminder {
    display: none;
  }
  .objective {
    max-width: 233px;
    gap: 6px;
  }
  .objective strong {
    font-size: 13px;
  }
  .location strong {
    font-size: 16px;
  }
  .vital-body {
    width: 132px;
  }
  .choice-name {
    font-size: 17px;
  }
  .title-content {
    left: 6.8%;
  }
  .save-note {
    left: 6.8%;
  }
  .title-utilities {
    right: 29px;
    top: 26px;
  }
}
@media (max-aspect-ratio: 9/10) {
  .key-art {
    background-image: url(assets/title-portrait.webp);
    background-size: cover;
    background-position: 58% 36%;
    background-color: #082a35;
  }
  .title-shade {
    background: linear-gradient(0deg, #051d29d1 3%, #062834a8 28%, #06293551 46%, transparent 66%);
  }
  .title-content {
    top: auto;
    left: 8.5%;
    right: 7%;
    bottom: calc(11% + 3px);
    transform: none;
    padding: 0;
  }
  .title-frame {
    inset: 11px;
  }
  .title-frame i {
    width: 16px;
    height: 16px;
  }
  .title-utilities {
    top: max(24px, env(safe-area-inset-top));
    right: max(24px, env(safe-area-inset-right));
  }
  .title-utilities .square-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }
  h1 {
    font-size: clamp(53px, 15.2vw, 102px);
    margin-top: 4px;
    line-height: 1.12;
  }
  .overline {
    font-size: 10px;
    letter-spacing: 2.7px;
    gap: 10px;
  }
  #title-rule {
    width: 70%;
    margin-top: 0;
    margin-bottom: 0;
  }
  .opening-line {
    font-size: 14px;
    margin: 13px 0 19px;
    line-height: 1.45;
  }
  .title-menu {
    width: min(256px, 88%);
    gap: 7px;
  }
  .menu-btn {
    height: 43px;
    font-size: 13px;
    letter-spacing: 1.8px;
  }
  .menu-btn > .ico:first-child {
    width: 18px;
    height: 18px;
  }
  .save-note {
    bottom: calc(var(--s-bottom) + 13px);
    left: 8.5%;
    font-size: 9px;
    letter-spacing: 1.1px;
  }
  .title-compass {
    right: 23px;
    bottom: 22px;
    width: 38px;
  }
  .location {
    display: none;
  }
  .vitals {
    min-height: 45px;
  }
  .portrait {
    width: 44px;
    height: 44px;
  }
  .vital-body {
    width: 122px;
    padding: 3px 7px 5px;
  }
  .vital-name strong {
    font-size: 12px;
  }
  .vital-name span {
    font-size: 9px;
  }
  .hp-rail {
    height: 7px;
  }
  .hud-tools {
    gap: 4px;
  }
  .hud-tools .square-button {
    min-width: 35px;
    width: 35px;
    height: 35px;
  }
  .hud-tools .ico {
    width: 16px;
    height: 16px;
  }
  .touch .objective {
    top: calc(var(--s-top) + 58px);
    max-width: 88%;
    background: #092b35de;
  }
  .objective {
    bottom: auto;
    top: calc(var(--s-top) + 60px);
    padding: 5px 9px;
  }
  #boss-hud {
    top: calc(var(--s-top) + 106px);
    width: 70%;
  }
  .boss-name {
    font-size: 14px;
  }
  #intro-banner {
    top: 26%;
  }
  #battle-toast {
    top: 24%;
    font-size: 13px;
  }
  .touch #hint {
    bottom: calc(var(--s-bottom) + 129px);
    max-width: 84%;
  }
  #panel {
    padding: 21px 17px 17px;
  }
  .panel-head {
    margin-bottom: 14px;
  }
  .panel-head h2 {
    font-size: 25px;
  }
  .panel-head p,
  .body-copy {
    font-size: 13px;
  }
  .choice-grid,
  .choice-grid.two {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .choice {
    display: grid;
    grid-template-columns: 58px 1fr;
    column-gap: 10px;
    padding: 9px 11px;
  }
  .choice-art {
    grid-column: 1;
    grid-row: 1/5;
    width: 55px;
    height: 62px;
    margin: 0;
    align-self: center;
  }
  .choice .tag,
  .choice-name,
  .choice-desc,
  .choice-action {
    grid-column: 2;
  }
  .choice-name {
    font-size: 16px;
    margin-top: 2px;
  }
  .choice-desc {
    font-size: 11px;
    line-height: 1.4;
    margin: 3px 0;
  }
  .choice-action {
    display: none;
  }
  .talent-diamond {
    width: 35px;
    height: 35px;
  }
  .talent-diamond .ico {
    width: 23px;
    height: 23px;
  }
  .route-state {
    font-size: 9px;
  }
  .folio-grid {
    gap: 5px;
  }
  .monster-card strong {
    font-size: 13px;
  }
  .panel-foot {
    margin-top: 13px;
    padding-top: 12px;
  }
  .tab-btn {
    padding: 8px 8px 10px;
    font-size: 11px;
  }
  .slot-tab {
    flex-direction: column;
    gap: 1px;
    font-size: 11px;
    padding: 5px;
  }
  .gear-row .route-state {
    font-size: 9px;
  }
  .title-compass .rose {
    width: 38px;
  }
}
@media (max-height: 540px) and (min-aspect-ratio: 10/9) {
  .title-content {
    top: 49%;
    left: 7%;
  }
  .overline {
    font-size: 9px;
    letter-spacing: 2.2px;
  }
  h1 {
    font-size: clamp(49px, 7vw, 75px);
    margin-top: 0;
  }
  #title-rule {
    height: 10px;
    margin-bottom: 0;
    width: 220px;
  }
  .opening-line {
    font-size: 12px;
    line-height: 1.35;
    margin: 8px 0 12px;
  }
  .title-menu {
    gap: 5px;
    width: 204px;
  }
  .menu-btn {
    height: 34px;
    min-height: 34px;
    font-size: 11px;
    padding: 0 12px;
    letter-spacing: 1.4px;
  }
  .menu-btn > .ico:first-child {
    width: 15px;
    height: 15px;
    margin-right: 10px;
  }
  .title-frame {
    inset: 9px;
  }
  .title-utilities {
    top: 17px;
    right: 18px;
    gap: 5px;
  }
  .title-utilities .square-button {
    width: 30px;
    min-width: 30px;
    height: 30px;
  }
  .save-note {
    bottom: 16px;
    font-size: 8px;
    letter-spacing: 0.8px;
    left: 7%;
  }
  .save-note .ico {
    width: 11px;
    height: 11px;
  }
  .title-compass {
    right: 19px;
    bottom: 16px;
    width: 36px;
  }
  :root {
    --s-top: max(6px, env(safe-area-inset-top));
    --s-bottom: max(6px, env(safe-area-inset-bottom));
    --s-left: max(9px, env(safe-area-inset-left));
    --s-right: max(9px, env(safe-area-inset-right));
  }
  .vitals {
    min-height: 39px;
  }
  .portrait {
    width: 39px;
    height: 39px;
  }
  .vital-body {
    width: 108px;
    padding: 2px 6px 4px;
  }
  .vital-name {
    margin: 0 0 2px;
  }
  .vital-name strong {
    font-size: 11px;
  }
  .vital-name span {
    font-size: 8px;
  }
  .portrait b {
    min-width: 17px;
    height: 14px;
    line-height: 12px;
    font-size: 10px;
  }
  .hp-rail {
    height: 6px;
  }
  .xp-rail {
    height: 3px;
    margin-top: 2px;
  }
  .location strong {
    font-size: 13px;
  }
  .location small {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .hud-tools .square-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }
  .hud-tools .ico {
    width: 15px;
  }
  .touch .objective {
    top: calc(var(--s-top) + 47px);
    max-width: 195px;
    padding: 3px 6px;
  }
  .touch .objective span {
    display: none;
  }
  .touch .objective strong,
  .touch .objective b {
    font-size: 11px;
  }
  .touch .objective .ico {
    width: 13px;
    height: 13px;
  }
  .touch #move-pad {
    width: 76px;
    height: 76px;
    bottom: calc(var(--s-bottom) + 2px);
    left: calc(var(--s-left) + 8px);
  }
  .touch #skills {
    transform: scale(0.84);
    transform-origin: bottom right;
    bottom: var(--s-bottom);
  }
  .touch #hint {
    bottom: calc(var(--s-bottom) + 19px);
    max-width: 36%;
    font-size: 10px;
    padding: 4px 8px;
  }
  #intro-banner .kicker {
    font-size: 9px;
  }
  .intro-name {
    font-size: 23px;
  }
  #boss-hud {
    top: calc(var(--s-top) + 34px);
    width: 29%;
  }
  .boss-name {
    font-size: 12px;
  }
  .boss-rail {
    height: 6px;
  }
  #battle-toast {
    font-size: 12px;
    top: 20%;
  }
  #panel {
    padding: 15px 20px 14px;
  }
  .panel-head {
    margin-bottom: 10px;
  }
  .panel-head h2 {
    font-size: 24px;
  }
  .panel-head p {
    font-size: 12px;
    margin-top: 4px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .choice {
    padding: 8px 10px;
  }
  .choice-art {
    height: 43px;
    margin-bottom: 6px;
  }
  .talent-diamond {
    width: 29px;
    height: 29px;
  }
  .talent-diamond .ico {
    width: 19px;
    height: 19px;
  }
  .choice-name {
    font-size: 15px;
  }
  .choice-desc {
    font-size: 11px;
    margin: 4px 0 6px;
  }
  .choice-action {
    padding-top: 4px;
  }
  .panel-foot {
    margin-top: 10px;
    padding-top: 9px;
  }
  .control-row,
  .setting-row {
    padding: 6px 0;
  }
  .menu-row {
    min-height: 33px;
    padding: 7px 11px;
  }
  .sea-chart {
    height: 90px;
  }
  .tabs {
    margin-bottom: 8px;
  }
  .route-list {
    margin-top: 6px;
  }
  .route-row {
    padding: 4px 8px;
  }
  .shrine-art {
    max-height: 65px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #motes {
    display: none;
  }
}

.letter-entry {
  border-left: 2px solid #bc9e6782;
  background: #16374175;
  padding: 10px 13px;
  margin: 9px 0;
}
.letter-entry h3 {
  margin: 4px 0;
  font:
    17px Cinzel,
    serif;
  color: #f0e2bf;
}
.letter-entry p {
  margin: 5px 0;
  font-size: 13px;
  line-height: 1.55;
  color: #d4dfd6;
}
.letter-entry small {
  color: #b4c6bf;
  font-size: 12px;
}
#sea-air {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
@media (min-aspect-ratio: 901/1000) {
  .key-art {
    background-position: 62% 50%;
  }
}
.pick-stat {
  color: #b4e8d1;
  font:
    13px Barlow,
    sans-serif;
  letter-spacing: 0.4px;
  margin: -4px 0 11px;
}
.skill-box.primed,
.touch .skill-box.primed {
  color: #bfefdc;
  border-color: #c3ffe5;
  box-shadow:
    inset 0 0 0 2px #1a514e,
    0 0 10px #8df4cd66;
}
@media (max-aspect-ratio: 9/10) {
  .pick-stat {
    grid-column: 2;
    font-size: 12px;
    margin: 2px 0 0;
  }
}
#landing {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    linear-gradient(#062633ab, #05212fcd),
    url(assets/title.webp) 62% 50% / cover no-repeat;
  text-align: center;
}
#landing small {
  display: block;
  color: var(--gold);
  font:
    11px Barlow,
    sans-serif;
  letter-spacing: 3px;
  text-transform: uppercase;
}
#landing strong {
  display: block;
  font:
    27px Cinzel,
    serif;
  color: #fff0c9;
  margin-top: 8px;
}
#landing i {
  display: block;
  width: 17px;
  height: 17px;
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 3px #153d46;
  background: #dab981;
  margin: 0 auto 21px;
  animation: land 1.5s ease-in-out infinite;
}
@keyframes land {
  0%,
  100% {
    transform: rotate(45deg);
    opacity: 0.5;
  }
  50% {
    transform: rotate(135deg);
    opacity: 1;
  }
}
@media (max-aspect-ratio: 9/10) {
  #landing {
    background-image: linear-gradient(#062633a6, #05212fbd), url(assets/title-portrait.webp);
  }
}
