/* Keep touch targets and text clear of the button frame at phone widths. */
#app button, #modal button {
  min-inline-size: 44px;
  min-block-size: 44px;
  font-size: 13px;
}
#app button :is(strong, small, em, span), #modal button :is(strong, small, em, span) {
  font-size: 13px;
}
#app button.primary::before, #app button.primary::after,
#modal button.primary::before, #modal button.primary::after { content: none; }
#app .simple-objective button {
  display: grid; place-items: center; text-align: center;
  min-inline-size: 96px; min-block-size: 48px; padding: 8px 14px;
  font-size: 17px; font-weight: 800; line-height: 1.2;
  border: 1px solid #e2be84; border-radius: 12px;
  background: linear-gradient(180deg,#67417f,#3c2353);
  box-shadow: none;
}
#app .simple-objective button:active { transform: translateY(1px); filter: brightness(.9); }
#app .dial-difficulty-panel {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
#app .dial-difficulty-panel small {
  display: block; color: var(--menu-muted); font-size: 13px; margin-top: 3px;
}
#app .dial-difficulty-panel select {
  flex: 0 0 auto; min-width: 94px; min-height: 44px; padding: 8px 12px;
  color: var(--menu-text); background: #211831; border: 1px solid var(--menu-line);
  border-radius: 9px; font: inherit;
}
#app .floating-menu {
  width: 62px; height: 62px; padding: 8px; line-height: 1.2;
  gap: 3px;
}
#app .floating-menu::before { display: none; }
#app .battle-view .cmd-row .cmd-btn {
  min-height: 62px; padding: 8px;
  display: flex; flex-direction: column; gap: 3px; text-align: center;
}
#app .battle-view .cmd-row-sub .cmd-btn { flex-direction: row; min-height: 44px; gap: 8px; }
#app .battle-view .cmd-copy { gap: 2px; align-items: center; line-height: 1.2; }
#app .battle-view .cmd-copy small {
  font-size: 13px; white-space: normal; word-break: keep-all;
  overflow: visible;
}
#app .battle-view .cmd-icon-img { width: 19px; height: 19px; }
#app .battle-view .battle-utility-row button { padding: 8px; }
#app .menu-shell button, #modal button:not(.intro-choice) { padding: 8px; }
#app .menu-shell .menu-tab { min-height: 60px; }
#app .menu-shell .menu-number { inset-inline-start: 9px; inset-block-start: 9px; }
#app .menu-shell .menu-close { padding: 8px; }
#modal .intro-choice { padding: 9px 8px; line-height: 1.2; }
#modal .intro-choice .intro-choice-action {
  display: block; font-size: 13px; line-height: 1.25; word-break: keep-all;
  white-space: normal; padding: 0;
}
#modal .story-sheet { padding: 11px 13px; text-align: left; }
#modal .story-sheet::before { display: none; }
#modal .story-scene-label { text-align: left; margin-bottom: 6px; }
#modal .story-sheet .story-line { min-height: 0; margin: 0 0 9px; align-items: start; }
#modal .story-line > div { min-width: 0; text-align: left; }
#modal .story-sheet .story-line p {
  max-height: 4.2em; overflow-y: auto; line-height: 1.4; margin: 2px 0 0;
}
#modal .story-portrait { flex-basis: 46px; width: 46px; height: 49px; }

.map-wrap.phase-night .world-art { filter: brightness(.54) saturate(.66) hue-rotate(11deg); }
.map-wrap.phase-night .gate-foreground image { filter: brightness(.54) saturate(.66) hue-rotate(11deg); }
.simple-map .map-wrap.phase-night > .map-atmosphere {
  background: linear-gradient(160deg,#172a634f,#263c7440);
}
#app .map-world[data-simple-map] .district-npc {
  min-width: 44px; min-height: 44px; padding: 8px;
  display: flex; flex-direction: column-reverse; align-items: center; gap: 3px;
}
#app .map-world[data-simple-map] .district-npc .npc-label {
  position: static; transform: none;
}

.map-world[data-simple-map] .district-npc .objective-face {
  width: 44px; height: 44px; margin: auto; background: #2b2143;
  border-color: #d3b58b; box-shadow: 0 3px 8px #17102499;
}
.map-world[data-simple-map] .district-npc.is-objective .objective-face {
  border-color: #ffe4a1; box-shadow: 0 0 10px #f3bc6fa8;
}
.map-world[data-simple-map] .district-npc .objective-face img { width: 143px; }
.map-world[data-simple-map] .district-npc .npc-face-crop img {
  inset: 0; width: 100%; height: 100%; object-fit: cover; transform: none;
}

#app .battle-view.zone-outskirts {
  background-image: linear-gradient(#0f0922b8,#150b241a 35%,#130a23 96%),url("../assets/battle-riverside.webp");
}
#app .battle-view.chapter-village-battle {
  --village-arena: url("../assets/battle-village-lantern-v1.webp");
  background-image: linear-gradient(#160c2b48,#160c2b19 48%,#130b23eb 90%),var(--village-arena);
}
#app .battle-view.chapter-village-battle.battle-night {
  --village-arena: url("../assets/battle-village-lantern-night-v1.webp");
}
#app .battle-view .battle-stage.chapter-village-battle {
  background-image: linear-gradient(180deg,#160c2b16 0%,#160c2b08 48%,#130b23b8 100%),var(--village-arena) !important;
}
.battle-view.battle-night:not(.chapter-village-battle) { background-color: #5468ab; background-blend-mode: normal,multiply; }
.dial-practice-hand { color: #fff197; font-size: 16px; margin-right: 3px; }
@media (max-height: 720px) {
  #app .battle-view .cmd-row .cmd-btn { gap: 2px; }
  #app .battle-view .cmd-icon-img { width: 16px; height: 16px; }
  #app .battle-view .combat-dial { width: 116px; height: 116px; }
}
