:root {
  color-scheme: light;
  --canvas: #f6f4ee;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --navy: #17324d;
  --navy-2: #244967;
  --jade: #087f72;
  --jade-dark: #06665d;
  --jade-soft: #dff3ef;
  --amber: #d97706;
  --amber-soft: #fff2d8;
  --danger: #b42318;
  --danger-soft: #fef0ed;
  --text: #17212b;
  --muted: #59636e;
  --line: #dce2df;
  --line-strong: #c6ceca;
  --focus: #0077cc;
  --shadow-nav: 0 -8px 30px rgb(23 50 77 / 0.12);
  --font: Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html {
  height: 100%;
  overflow: hidden;
  background: var(--canvas);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
svg { display: block; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--navy);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.app-shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.app-body {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
}

.side-rail { display: none; }

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
  background: rgb(23 50 77 / 0.97);
  color: #fff;
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 1px;
  color: #acd9d3;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-title {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 760;
  text-decoration: none;
}

.header-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: #d9e6ec;
  font-size: 11px;
  font-weight: 650;
}

.hk-clock { font-variant-numeric: tabular-nums; }

.network-status { display: inline-flex; align-items: center; gap: 5px; }
.network-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #51d7c5;
  box-shadow: 0 0 0 3px rgb(81 215 197 / 0.14);
}
.network-status.is-offline > span { background: #f5bb54; box-shadow: none; }

#main-content {
  width: 100%;
  max-width: 1120px;
  min-height: calc(100dvh - 68px - 66px - var(--safe-bottom));
  margin: 0 auto;
  padding: 20px 16px 32px;
}


.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-kicker {
  margin: 0 0 4px;
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(25px, 7vw, 36px);
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.page-description {
  max-width: 600px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-title {
  margin: 0;
  color: var(--navy);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 12px;
}

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--jade-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  background: var(--navy);
  color: #fff;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 174px;
  height: 94px;
  opacity: 0.2;
  background:
    linear-gradient(90deg, transparent 5%, #fff 5% 13%, transparent 13% 18%, #fff 18% 32%, transparent 32% 38%, #fff 38% 46%, transparent 46%) 0 100% / 100% 65% no-repeat,
    linear-gradient(145deg, transparent 45%, #fff 46% 49%, transparent 50%) 20px 0 / 100px 70px no-repeat;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.trip-badge, .status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 740;
}
.trip-badge { background: rgb(255 255 255 / 0.12); color: #e8f7f4; }
.status-badge { background: var(--jade-soft); color: var(--jade-dark); }
.status-badge.pending { background: var(--amber-soft); color: #8a4a00; }

.d-day {
  color: #d2e4ea;
  font-size: 13px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.now-label {
  margin: 0 0 4px;
  color: #9dd9d1;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.06em;
}

.now-time {
  display: inline-block;
  min-width: 58px;
  margin-right: 7px;
  color: #f7c866;
  font-size: 17px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.now-title {
  max-width: 680px;
  margin: 0;
  color: #fff;
  font-size: clamp(25px, 8vw, 42px);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1.17;
}

.now-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 0 0;
  color: #d8e5eb;
  font-size: 14px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.primary-button, .secondary-button, .soft-button, .danger-button, .ghost-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 720;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.primary-button:active, .secondary-button:active, .soft-button:active, .danger-button:active { transform: translateY(1px); }
.primary-button { background: var(--jade); color: #fff; }
.primary-button:hover { background: var(--jade-dark); }
.secondary-button { border-color: #b8cdc9; background: #fff; color: var(--navy); }
.secondary-button:hover { border-color: var(--jade); color: var(--jade-dark); }
.soft-button { background: var(--surface-soft); color: var(--navy); }
.soft-button:hover { background: #dfeae7; }
.danger-button { background: var(--danger); color: #fff; }
.danger-button:hover { background: #912018; }
.ghost-button { border-color: rgb(255 255 255 / 0.32); background: transparent; color: #fff; }
.ghost-button:hover { background: rgb(255 255 255 / 0.1); }
.primary-button[disabled], .secondary-button[disabled] { cursor: not-allowed; opacity: 0.45; }

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(23 50 77 / 0.04);
}

.weather-strip {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.weather-strip:hover { border-color: #94b9b3; background: #fbfdfc; }

.weather-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: #8a4a00;
  font-weight: 800;
}
.weather-title { display: block; color: var(--navy); font-size: 15px; font-weight: 740; }
.weather-detail { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }
.weather-value { color: var(--navy); font-size: 21px; font-weight: 780; font-variant-numeric: tabular-nums; }

.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #f2b8af;
  border-radius: 14px;
  background: var(--danger-soft);
  color: #791b14;
}
.warning-banner > div { min-width: 0; flex: 1; }
.warning-banner a { min-height: 44px; display: inline-flex; align-items: center; margin-left: auto; color: #791b14; font-size: 12px; font-weight: 750; white-space: nowrap; }
.warning-banner strong { display: block; }
.warning-banner p { margin: 2px 0 0; font-size: 13px; }
.warning-icon { font-size: 19px; font-weight: 850; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-action {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--navy);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.quick-action:hover { border-color: #94b9b3; background: #fbfdfc; }
.quick-action-mark { color: var(--jade); font-size: 12px; font-weight: 780; letter-spacing: 0.08em; }
.quick-action strong { font-size: 16px; }
.quick-action small { color: var(--muted); font-size: 12px; }
.quick-action.emergency { border-color: #efc5bf; }
.quick-action.emergency .quick-action-mark { color: var(--danger); }

.today-list { overflow: hidden; }
.compact-item {
  display: grid;
  grid-template-columns: 54px 12px 1fr;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.compact-item:last-child { border-bottom: 0; }
.compact-item time { color: var(--navy); font-size: 13px; font-weight: 760; font-variant-numeric: tabular-nums; }
.compact-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--line-strong); }
.compact-item.is-next .compact-dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.compact-item strong { display: block; font-size: 14px; }
.compact-item small { color: var(--muted); }

.date-tabs {
  position: sticky;
  z-index: 20;
  top: 68px;
  display: flex;
  gap: 8px;
  margin: 0 -16px 20px;
  padding: 10px 16px;
  overflow-x: auto;
  border-bottom: 1px solid rgb(220 226 223 / 0.88);
  background: rgb(246 244 238 / 0.96);
  backdrop-filter: blur(12px);
  scrollbar-width: none;
}
.date-tabs::-webkit-scrollbar { display: none; }
.date-tab {
  min-width: 66px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.date-tab span, .date-tab strong { display: block; }
.date-tab span { font-size: 11px; font-weight: 700; }
.date-tab strong { color: var(--navy); font-size: 16px; }
.date-tab[aria-selected="true"] { border-color: var(--navy); background: var(--navy); color: #c8d8df; }
.date-tab[aria-selected="true"] strong { color: #fff; }
.date-tab.is-pending { border-style: dashed; }

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.schedule-date { margin: 0; color: var(--navy); font-size: 21px; font-weight: 760; }
.schedule-theme { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 75px;
  width: 1px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 14px 1fr;
  gap: 12px;
  min-height: 76px;
  padding: 10px 0;
}
.timeline-time { padding-top: 3px; color: var(--navy); font-size: 13px; font-weight: 760; font-variant-numeric: tabular-nums; text-align: right; }
.timeline-time small { display: block; color: var(--muted); font-size: 10px; font-weight: 600; }
.timeline-marker { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 7px; border: 3px solid var(--canvas); border-radius: 50%; background: #aab5b0; box-shadow: 0 0 0 1px #aab5b0; }
.timeline-item.is-current .timeline-marker { background: var(--jade); box-shadow: 0 0 0 4px var(--jade-soft); }
.timeline-item.is-next .timeline-marker { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.timeline-item.is-past { opacity: 0.62; }
.timeline-content {
  min-width: 0;
  padding: 0 0 10px;
}
.timeline-title { margin: 0; color: var(--text); font-size: 16px; font-weight: 720; }
.timeline-note { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.timeline-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.small-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--surface);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.small-action:hover { border-color: var(--jade); color: var(--jade-dark); }

.empty-state {
  padding: 32px 20px;
  border: 1px dashed #c7b379;
  border-radius: 16px;
  background: #fffbef;
  text-align: center;
}
.empty-state strong { display: block; color: #70410b; font-size: 18px; }
.empty-state p { max-width: 480px; margin: 6px auto 0; color: #775f3f; font-size: 14px; }

.filter-row,
.phrase-categories,
.tool-jumps {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.filter-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.phrase-categories { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tool-jumps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filter-row .filter-chip,
.phrase-categories .filter-chip,
.tool-jumps .filter-chip {
  width: 100%;
  min-width: 0;
  padding-right: 6px;
  padding-left: 6px;
}
.tool-jumps {
  position: sticky;
  z-index: 20;
  top: 68px;
  margin-right: -16px;
  margin-left: -16px;
  padding: 8px 16px;
  border-bottom: 1px solid rgb(220 226 223 / 0.88);
  background: rgb(246 244 238 / 0.96);
  backdrop-filter: blur(12px);
}
.filter-chip {
  flex: 0 0 auto;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.filter-chip[aria-pressed="true"],
.filter-chip[aria-selected="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.result-summary { margin: -6px 0 12px; color: var(--muted); font-size: 12px; font-weight: 650; }

.place-list { display: grid; gap: 10px; }
.place-row { padding: 16px; }
.place-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.place-category { color: var(--jade-dark); font-size: 11px; font-weight: 780; letter-spacing: 0.08em; }
.place-row h3 { margin: 5px 0 1px; color: var(--navy); font-size: 18px; }
.place-english { margin: 0; color: var(--muted); font-size: 13px; }
.place-traditional { margin: 10px 0 1px; color: var(--text); font-size: 17px; font-weight: 680; }
.place-address { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.place-note { margin: 10px 0 0; padding: 9px 10px; border-radius: 10px; background: var(--amber-soft); color: #75420b; font-size: 12px; }
.place-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.food-search-grid { display: grid; gap: 8px; }
.food-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
}
.food-search:hover { border-color: var(--jade); }
.food-search strong { display: block; color: var(--navy); }
.food-search small { display: block; color: var(--muted); }
.food-search span { flex: 0 0 auto; color: var(--jade-dark); font-size: 13px; font-weight: 740; }

.search-field {
  position: relative;
  margin-bottom: 12px;
}
.search-field input, .rate-input-wrap input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}
.search-field input { padding: 10px 14px 10px 42px; }
.search-field::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 16px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--muted);
  border-radius: 50%;
}
.search-field::after {
  content: "";
  position: absolute;
  top: 29px;
  left: 28px;
  width: 7px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
}

.phrase-list { display: grid; gap: 10px; }
.phrase-card { padding: 16px; }
.phrase-ko { margin: 0 0 9px; color: var(--muted); font-size: 13px; font-weight: 640; }
.phrase-zh { margin: 0; color: var(--navy); font-family: var(--font); font-size: clamp(23px, 7vw, 30px); font-weight: 720; line-height: 1.3; }
.phrase-jyutping { margin: 4px 0 0; color: var(--jade-dark); font-size: 13px; font-weight: 620; }
.phrase-actions { display: flex; gap: 7px; margin-top: 13px; }
.phrase-actions button { flex: 1; }
.phrase-empty { padding: 24px; text-align: center; color: var(--muted); }

.show-card-dialog {
  width: min(100% - 24px, 720px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 70px rgb(0 0 0 / 0.3);
}
.show-card-dialog::backdrop { background: rgb(7 20 31 / 0.78); backdrop-filter: blur(4px); }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 700; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--navy); font-size: 27px; cursor: pointer; }
.icon-button:hover { background: var(--surface-soft); }
.show-card-content { display: grid; place-items: center; min-height: 52vh; padding: 28px 24px; text-align: center; }
.show-card-ko { margin: 0 0 18px; color: var(--muted); font-size: 18px; }
.show-card-zh { margin: 0; color: var(--navy); font-size: clamp(44px, 13vw, 82px); font-weight: 780; line-height: 1.18; }
.show-card-jyutping { margin: 18px 0 0; color: var(--jade-dark); font-size: clamp(16px, 4vw, 22px); font-weight: 640; }
.show-card-speak { width: calc(100% - 32px); margin: 0 16px 16px; }

.tools-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tool-panel { min-width: 0; scroll-margin-top: 84px; padding: 18px; }
.tool-panel h2 { margin: 0; color: var(--navy); font-size: 19px; }
.tool-intro { margin: 4px 0 16px; color: var(--muted); font-size: 13px; }
.source-line { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.source-line a { color: var(--jade-dark); }
.source-line a { min-height: 44px; display: inline-flex; align-items: center; }
.tool-stage { max-width: 780px; }
.tool-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tool-title-row > div { min-width: 0; }
.data-freshness { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: var(--jade-soft); color: var(--jade-dark); font-size: 11px; font-weight: 750; }
.data-freshness.is-stale { background: var(--amber-soft); color: #75420b; }

.rate-display {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.rate-input-wrap { position: relative; }
.rate-input-wrap label { display: block; margin: 0 0 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.rate-input-wrap input { padding: 10px 58px 10px 13px; font-size: 20px; font-weight: 740; font-variant-numeric: tabular-nums; }
.rate-input-wrap span { position: absolute; right: 14px; bottom: 12px; color: var(--muted); font-size: 13px; font-weight: 740; }
.rate-equals { display: none; color: var(--muted); font-weight: 800; }
.rate-summary { margin: 13px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); color: var(--navy); font-size: 13px; }
.quick-amounts { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.quick-amount { flex: 0 0 auto; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: #fff; color: var(--navy); font-size: 12px; font-weight: 700; cursor: pointer; }

.climate-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.climate-stat { padding: 11px 8px; border-radius: 12px; background: var(--surface-soft); text-align: center; }
.climate-stat strong { display: block; color: var(--navy); font-size: 20px; font-variant-numeric: tabular-nums; }
.climate-stat span { color: var(--muted); font-size: 10px; font-weight: 650; }
.forecast-list { display: grid; gap: 8px; }
.forecast-day { display: grid; grid-template-columns: 68px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.forecast-day:last-child { border-bottom: 0; }
.forecast-day strong { color: var(--navy); font-size: 13px; }
.forecast-day p { margin: 0; color: var(--muted); font-size: 12px; }
.forecast-temp { color: var(--navy); font-weight: 740; font-variant-numeric: tabular-nums; }

.guide-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.guide-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-item:last-child { border-bottom: 0; }
.guide-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; background: var(--jade-soft); color: var(--jade-dark); font-size: 12px; font-weight: 800; }
.guide-item strong { display: block; color: var(--navy); font-size: 14px; }
.guide-item p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.check-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.check-item label { min-height: 44px; display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; }
.check-item label:hover { background: var(--surface-soft); }
.check-item input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--jade); }
.check-item input:checked + span { color: var(--muted); text-decoration: line-through; }

.emergency-panel { border-color: #efc5bf; background: #fffafa; }
.emergency-number { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--danger-soft); }
.emergency-number strong { display: block; color: var(--danger); font-size: 28px; letter-spacing: 0.05em; }
.emergency-number span { display: block; color: #7d342d; font-size: 12px; }

.bottom-nav {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: calc(66px + var(--safe-bottom));
  padding: 4px 4px var(--safe-bottom);
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 0.98);
  box-shadow: var(--shadow-nav);
}

.nav-link {
  min-width: 0;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 12px;
  color: #68737b;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}
.nav-link svg { width: 21px; height: 21px; stroke-width: 1.8; }
.nav-link[aria-current="page"] { background: var(--jade-soft); color: var(--jade-dark); }
.nav-link[aria-current="page"] svg { stroke-width: 2.2; }

.toast {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: calc(82px + var(--safe-bottom));
  left: 16px;
  max-width: 440px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: #17212b;
  color: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.2);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.view-loading { display: grid; place-items: center; min-height: 45dvh; color: var(--muted); font-size: 13px; }
.loading-bar { position: relative; width: 120px; height: 3px; overflow: hidden; border-radius: 4px; background: var(--line); }
.loading-bar::after { content: ""; position: absolute; width: 50%; height: 100%; background: var(--jade); animation: loading 1s infinite ease-in-out; }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(240%); } }
.noscript-message { margin: 20px; padding: 16px; border: 1px solid var(--danger); background: var(--danger-soft); }

.install-button { border: 1px solid #8fb4af; border-radius: 10px; background: transparent; color: #d9eee9; font-size: 11px; font-weight: 700; cursor: pointer; }

@media (min-width: 600px) {
  #main-content { padding-right: 24px; padding-left: 24px; }
  .phrase-categories { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .tool-jumps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .place-list, .phrase-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phrase-result { grid-column: 1 / -1; }
  .food-search-grid { grid-template-columns: repeat(2, 1fr); }
  .rate-display { grid-template-columns: 1fr auto 1fr; align-items: end; }
  .rate-equals { display: block; padding-bottom: 13px; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .tool-panel.full-width { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .app-shell { grid-template-columns: 94px 1fr; grid-template-rows: minmax(0, 1fr); }
  .app-body { height: 100dvh; }
  .side-rail {
    position: sticky;
    z-index: 50;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100dvh;
    padding: 20px 10px;
    background: var(--navy);
    color: #fff;
  }
  .brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 0.18);
    border-radius: 16px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.05;
    text-align: center;
    text-decoration: none;
  }
  .brand-cross { display: none; }
  .rail-nav { width: 100%; display: grid; gap: 8px; margin-top: 32px; }
  .date-tabs { top: 76px; margin-right: 0; margin-left: 0; padding-right: 0; padding-left: 0; }
  .tool-jumps { top: 76px; margin-right: 0; margin-left: 0; padding-right: 0; padding-left: 0; }
  .tool-stage { max-width: 840px; }
  .rail-nav .nav-link { color: #b8cbd4; }
  .rail-nav .nav-link[aria-current="page"] { background: rgb(126 221 208 / 0.15); color: #9ee4db; }
  .rail-install { width: 70px; min-height: 44px; margin-top: auto; }
  .bottom-nav { display: none; }
  .app-header { min-height: 76px; padding: 12px 32px; }
  .header-title { font-size: 19px; }
  #main-content { min-height: calc(100dvh - 76px); padding: 32px 32px 60px; }
  .page-head { margin-bottom: 28px; }
  .home-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr); gap: 20px; align-items: start; }
  .home-side .section-heading-row:first-child { margin-top: 0; }
  .date-tabs { margin-right: 0; margin-left: 0; padding-right: 0; padding-left: 0; }
  .schedule-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; }
  .schedule-side { position: sticky; top: 108px; }
  .place-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phrase-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .show-card-dialog { border-radius: 24px; }
  .toast { bottom: 24px; left: calc(94px + 16px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  html, body { height: auto; overflow: visible; }
  .app-shell { height: auto; display: block; }
  .app-body { height: auto; overflow: visible; }
  .app-header, .side-rail, .bottom-nav, .hero-actions, .quick-grid, .filter-row, .phrase-actions, .tool-jumps { display: none !important; }
  #main-content { max-width: none; padding: 0; }
  body { background: #fff; }
  .page { animation: none; }
}
