/* Interface appearance only. World artwork and destination palettes stay data-driven.
   Load last; geometry and layer ownership remain in game-ui.css. */
:root {
  --ui-font:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang TC", sans-serif;
  --ui-ink: #1d1d1f;
  --ui-muted: #6e6e73;
  --ui-paper: #fff;
  --ui-line: #d2d2d7;
  --ui-accent: #0071e3;
  --ui-accent-hover: #0077ed;
  --ui-accent-pressed: #0062c4;
  --ui-tint: #edf5ff;
  --ui-fill: #f5f5f7;
  --ui-glass: rgb(255 255 255 / 86%);
  --ui-shadow: 0 8px 30px rgb(0 0 0 / 7%), 0 1px 3px rgb(0 0 0 / 4%);
  --ui-radius: 14px;
  font-family: var(--ui-font);
  color: var(--ui-ink);
  background: var(--ui-fill);
}
body {
  font-family: var(--ui-font);
  background: var(--ui-fill);
  color: var(--ui-ink);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font-family: var(--ui-font);
}
button {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
  touch-action: manipulation;
}
button:hover {
  transform: none;
}
button:active:not(:disabled) {
  transform: none;
  filter: brightness(0.96);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #0071e3;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
}
a {
  color: var(--ui-accent);
}
header .brand {
  color: var(--ui-ink);
  letter-spacing: -0.6px;
  font-weight: 750;
}
header .brand span {
  color: var(--ui-muted);
  letter-spacing: 2px;
}
.sky-caption {
  color: var(--ui-ink);
}
.sky-caption span {
  color: var(--ui-muted);
}

/* Floating controls use a single translucent material. */
:is(
  .river-switcher,
  .festival-status,
  .scene-tools,
  .festival-dock,
  .village-directory,
  .online-status,
  .collection-book,
  .guide-gift-button,
  .show-controller,
  .walking-hud,
  .inventory button,
  .play
) {
  background: var(--ui-glass);
  border-color: rgb(255 255 255 / 85%);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
:is(.river-switcher, .festival-status, .scene-tools) {
  border-radius: 18px;
}
:is(.village-directory, .walking-hud, .show-controller, .play) {
  border-radius: 20px;
}
header :is(#help, .profile-button),
.page-footer button,
.scene-tools button,
.festival-status button,
.river-switcher button,
.walk-buttons button,
.emote-buttons button,
.touch-pad button,
.online-status button,
.show-controller button,
.collection-book,
.guide-gift-button {
  color: var(--ui-ink);
  background-color: var(--ui-fill);
  border-color: rgb(0 0 0 / 6%);
  border-radius: 12px;
  font-weight: 500;
}
header :is(#help, .profile-button) {
  background: var(--ui-glass);
  box-shadow: 0 2px 8px #00000005;
}
.scene-tools button {
  background: transparent;
}
.scene-tools button:hover,
.emote-buttons button:hover,
.page-footer button:hover {
  background: #e8e8ed;
}
.walk-buttons #walk-event,
.show-controller button:first-of-type {
  color: white;
  background: var(--ui-accent);
  border-color: transparent;
}
.village-directory button,
.village-directory .vn-festival-launcher {
  color: var(--ui-accent);
  border-color: #e5e5ea;
  background: transparent;
}
.village-directory button:hover {
  color: var(--ui-accent-pressed);
  background: var(--ui-tint);
}
.village-directory h3 {
  color: var(--ui-ink);
  letter-spacing: -0.3px;
}
:is(
    .village-directory,
    .online-status,
    .walking-hud,
    .river-switcher,
    .collection-book,
    .guide-gift-button
  )
  small,
.village-directory em,
.walking-hint,
.inventory-title {
  color: var(--ui-muted);
}
.festival-dock {
  border-radius: 24px;
}
.festival-dock button {
  color: var(--ui-ink);
  border-radius: 17px;
}
.festival-dock button:hover {
  transform: none;
  background: #ffffffd9;
  box-shadow: 0 2px 10px #00000008;
}
.festival-dock small {
  color: var(--ui-muted);
}
.page-footer {
  background: #f5f5f7e8;
  border-color: #e5e5ea;
  color: var(--ui-muted);
}

/* Native sheets/dialogs retain their existing responsive layouts. */
:is(
  .arrival-dialog,
  .guide-dialog,
  .festival-dialog,
  .river-map-dialog,
  .theater-video-dialog,
  .vn-festival-dialog,
  #dialog
) {
  color: var(--ui-ink);
  background: #fff;
  border: 1px solid #ffffffb3;
  border-radius: 26px;
  box-shadow: 0 24px 90px #00000030;
}
:is(
  .arrival-dialog,
  .guide-dialog,
  .festival-dialog,
  .river-map-dialog,
  .theater-video-dialog,
  .vn-festival-dialog,
  #dialog
)::backdrop {
  background: rgb(30 33 40 / 30%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
:is(
    .arrival-dialog,
    .guide-dialog,
    .festival-dialog,
    .river-map-dialog,
    .theater-video-dialog,
    .vn-festival-dialog,
    #dialog
  )
  :is(h1, h2, h3) {
  color: var(--ui-ink);
  font-family: var(--ui-font);
  letter-spacing: -0.6px;
}
:is(
    .guide-dialog,
    .festival-dialog,
    .river-map-dialog,
    .theater-video-dialog,
    .vn-festival-dialog
  )
  p,
.arrival-identity form > p,
.arrival-destinations > p {
  color: var(--ui-muted);
}
:is(.close, .festival-close) {
  background: #f0f0f3;
  color: #6e6e73;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
}
:is(.close, .festival-close):hover {
  background: #e5e5ea;
}
:is(
  .primary,
  .play .primary,
  .guide-dialog .primary,
  .arrival-dialog .primary
) {
  background: var(--ui-accent);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--ui-radius);
  box-shadow: none;
  font-weight: 600;
  min-height: 44px;
}
:is(
  .primary,
  .play .primary,
  .guide-dialog .primary,
  .arrival-dialog .primary
):hover {
  background: var(--ui-accent-hover);
}
:is(
  .primary,
  .play .primary,
  .guide-dialog .primary,
  .arrival-dialog .primary
):active {
  background: var(--ui-accent-pressed);
}
:is(
  .choice,
  .play .choice,
  .guide-dialog .choice,
  .arrival-bottom .choice,
  .quiz-options button,
  .guide-rhythm button,
  .guide-pairs button
) {
  color: var(--ui-accent);
  background: var(--ui-fill);
  border: 1px solid #e5e5ea;
  border-radius: var(--ui-radius);
  box-shadow: none;
  min-height: 44px;
}
:is(
  .choice,
  .play .choice,
  .guide-dialog .choice,
  .arrival-bottom .choice,
  .quiz-options button,
  .guide-rhythm button,
  .guide-pairs button
):hover {
  background: var(--ui-tint);
  border-color: #bbd8f5;
}
.arrival-identity input {
  color: var(--ui-ink);
  background: var(--ui-fill);
  border-color: #d2d2d7;
  border-radius: 12px;
}
.arrival-step,
.arrival-hint,
.arrival-note,
.arrival-dialog .arrival-note,
.guide-conversation aside > small,
.guide-game-header small,
.host-welcome small,
.destination-grid button > span,
.destination-grid button > small {
  color: var(--ui-muted) !important;
}
.avatar-options button,
.destination-grid button,
.vn-regional-grid button,
.friend-card {
  background: #fafafa;
  color: var(--ui-ink);
  border-color: #e5e5ea;
  box-shadow: none;
  border-radius: 18px;
}
.avatar-options button[aria-pressed="true"],
.destination-grid button[aria-pressed="true"] {
  background: var(--ui-tint);
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 2px #0071e318;
}
.color-options button {
  background: var(--choice-color);
}
.color-options button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--ui-accent);
}
.host-welcome,
.guide-speech,
.guide-reward-preview,
.guide-sequence > span {
  background: var(--ui-fill);
  border-color: #e5e5ea;
  color: #424245;
  border-radius: 16px;
}
.guide-reward-preview strong {
  color: var(--ui-ink);
}
.guide-reward-preview small,
.guide-reward-preview div > span,
.guide-sequence small {
  color: var(--ui-muted);
}
.guide-story-dots i {
  background: #e5e5ea;
}
.guide-story-dots .done {
  background: var(--ui-accent);
}
.guide-proximity-bubble {
  background: #fffffff2;
  border-color: #ffffffc9;
  color: var(--ui-ink);
  border-radius: 18px;
  box-shadow: var(--ui-shadow);
}
.guide-proximity-bubble small,
.guide-proximity-bubble p {
  color: var(--ui-muted);
}
.guide-proximity-bubble button {
  background: var(--ui-accent);
  color: white;
  border-radius: 10px;
  border-color: transparent;
}
.guide-proximity-bubble button + button {
  background: var(--ui-fill);
  color: var(--ui-accent);
}
.npc-pin,
.npc-pin.npc-inviting,
.booth-pin,
.regional-festival-pin {
  background: #ffffffeb;
  color: #424245;
  border-color: #ffffffbf;
  border-radius: 12px;
  box-shadow: 0 2px 10px #00000008;
}
.npc-pin.npc-inviting {
  color: var(--ui-accent);
  background: #f0f7fff5;
}
.booth-pin small {
  color: var(--ui-muted);
}
.booth-pin .npc-tag {
  color: #6e6e73;
  background: #eaeaef;
}
.cinema-pin {
  background: var(--ui-accent);
  color: white;
  border-color: #ffffffb3;
  border-radius: 14px;
}
.cinema-pin > span {
  color: white;
}
.connection-dot {
  background: #b47800;
}
.online-status[data-connection="online"] .connection-dot {
  background: #248a3d;
}
.online-status[data-connection="offline"] .connection-dot {
  background: #c93427;
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :is(
    .river-switcher,
    .festival-status,
    .scene-tools,
    .festival-dock,
    .village-directory,
    .online-status,
    .walking-hud,
    .play
  ) {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
/* Stateful selectors match the layout sheet's specificity. */
.hide-mission .festival-dock {
  background: var(--ui-glass);
  border-color: #ffffffd9;
  box-shadow: var(--ui-shadow);
}
.walk-buttons button + button {
  background: var(--ui-fill);
  color: var(--ui-ink);
  border-color: #e5e5ea;
}
.guide-match-columns button {
  background: var(--ui-fill);
  color: var(--ui-ink);
  border-color: #e5e5ea;
}
.guide-match-columns button:hover {
  background: var(--ui-tint);
}
.guide-match-columns .selected {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 2px #0071e31a;
}
.guide-match-columns button:disabled {
  background: #eaf5ed;
  color: #246834;
}
#guide-game-feedback:not(:empty) {
  background: var(--ui-tint);
  color: #285a8b;
}
@media (max-width: 900px) {
  .village-directory .vn-festival-launcher {
    background: var(--ui-fill);
    border-color: #e5e5ea;
  }
}
.solo-journey-dialog {
  width: min(600px, calc(100% - 28px));
  max-height: 90dvh;
  overflow: auto;
  padding: 28px;
  border: 1px solid #ffffffb3;
  border-radius: 26px;
  color: var(--ui-ink);
  background: white;
  box-shadow: 0 24px 90px #00000030;
}
.solo-journey-dialog::backdrop {
  background: #1e21284d;
  backdrop-filter: blur(14px);
}
.solo-journey-dialog h2 {
  clear: both;
  font-size: 25px;
  letter-spacing: -0.6px;
  line-height: 1.4;
}
.solo-journey-dialog p {
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.8;
}
.solo-kicker {
  color: var(--ui-muted);
  font-size: 10px;
  letter-spacing: 2px;
  padding-top: 12px;
}
.solo-score {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 20px 0;
}
.solo-score > strong {
  font-size: 44px;
  letter-spacing: -2px;
  color: var(--ui-accent);
}
.solo-score span {
  font-size: 13px;
  font-weight: 600;
}
.solo-score small {
  display: block;
  margin-top: 5px;
  font-weight: 400;
  color: var(--ui-muted);
}
.solo-tasks {
  display: grid;
  gap: 10px;
}
.solo-tasks article {
  padding: 16px;
  border: 1px solid #e5e5ea;
  border-radius: 15px;
  background: var(--ui-fill);
}
.solo-tasks article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.solo-tasks article > div > span {
  color: var(--ui-accent);
  white-space: nowrap;
}
.solo-tasks progress {
  width: 100%;
  height: 6px;
  margin: 12px 0 8px;
  accent-color: var(--ui-accent);
  border: 0;
  border-radius: 4px;
  overflow: hidden;
}
.solo-tasks progress::-webkit-progress-bar {
  background: #e5e5ea;
}
.solo-tasks progress::-webkit-progress-value {
  background: var(--ui-accent);
  border-radius: 4px;
}
.solo-tasks small {
  color: var(--ui-muted);
  font-size: 11px;
}
.solo-bonus {
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--ui-tint);
  color: #285a8b;
  font-size: 12px;
  line-height: 1.7;
}
.solo-journey-dialog details {
  margin: 20px 0;
  font-size: 12px;
}
.solo-journey-dialog summary {
  cursor: pointer;
  color: var(--ui-accent);
  padding: 8px 0;
}
.shore-trash-label {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 14;
  white-space: nowrap;
  padding: 9px 12px;
  font-size: 11px;
  border: 1px solid white;
  border-radius: 12px;
  background: #fffffff2;
  color: var(--ui-accent);
  box-shadow: var(--ui-shadow);
  pointer-events: auto;
}
.shore-trash-label[hidden] {
  display: none;
}
.walk-buttons {
  flex-wrap: wrap;
}
.walk-buttons .solo-journey-button {
  color: var(--ui-accent);
  background: var(--ui-tint);
}
.solo-journey-dialog h2 {
  font-family: var(--ui-font);
  font-weight: 700;
}
