/* Miiuz Beyond Borders — one column on phones with a bottom tab bar; on wide screens the
   tabs move under the header and the planner splits into form + timeline.
   Identity carried over from the original artifact: Peranakan tile strip, border-crossing
   mark, hibiscus / teal / turmeric on a pale jade ground. */
:root {
  --bg: #f2f5f1; --surface: #ffffff; --surface-2: #e7eeea; --line: #cdd9d3;
  --fg: #16211e; --muted: #5a6b65;
  --hibiscus: #b5172f; --hibiscus-soft: #f7dfe2;
  --teal: #0d6662; --teal-soft: #d5ebe8;
  --turmeric: #d99a1e; --turmeric-soft: #f8ecd2;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(22, 33, 30, .06), 0 6px 20px rgba(22, 33, 30, .06);
  --display: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 12px;
  --tabbar-h: 64px;
  --tier-basic: linear-gradient(135deg, #0b5753, #12807a 55%, #0d6662);
  --tier-silver: linear-gradient(135deg, #5f6c76, #aeb9c1 55%, #6c7983);
  --tier-gold: linear-gradient(135deg, #7a4f00, #c9971a 52%, #8d6106);
  --tier-platinum: linear-gradient(135deg, #1b2429, #5a6a74 50%, #253036);
  --on-tier: #ffffff;
  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1715; --surface: #17211e; --surface-2: #1f2c28; --line: #2e3f3a;
    --fg: #e7efec; --muted: #9db0aa;
    --hibiscus: #f0566b; --hibiscus-soft: #3a1c22;
    --teal: #4fc1b8; --teal-soft: #16342f;
    --turmeric: #f0b94a; --turmeric-soft: #3a2f17;
    --on-accent: #0f1715;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1715; --surface: #17211e; --surface-2: #1f2c28; --line: #2e3f3a;
  --fg: #e7efec; --muted: #9db0aa;
  --hibiscus: #f0566b; --hibiscus-soft: #3a1c22;
  --teal: #4fc1b8; --teal-soft: #16342f;
  --turmeric: #f0b94a; --turmeric-soft: #3a2f17;
  --on-accent: #0f1715;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* Type per script: CJK languages get their own Noto families; everything else uses Noto
   Sans/Serif (Latin, Cyrillic, Greek, Vietnamese) and falls back to the system font for
   other scripts (Thai, Arabic, Devanagari…). Fonts download only for the language in use. */
:root:lang(zh-Hant), :root:lang(yue) {
  --display: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", serif;
  --body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}
:root:lang(ja) {
  --display: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}
:root:lang(ko) {
  --display: "Noto Serif KR", "AppleMyungjo", "Batang", serif;
  --body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  word-break: keep-all; /* Korean wraps between words, not syllables */
  overflow-wrap: break-word;
}
:root:not(:lang(zh)):not(:lang(yue)):not(:lang(ja)):not(:lang(ko)) {
  --display: "Noto Serif", Georgia, "Times New Roman", serif;
  --body: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 15px; line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--teal); }
h1, h2, h3 { text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 22px; height: 22px; flex: none; }

.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- tile strip + header ---------- */
.tiles {
  height: 10px;
  background:
    radial-gradient(circle at 50% 50%, var(--turmeric) 0 3px, transparent 3.5px) 0 0/28px 10px,
    conic-gradient(from 45deg at 50% 50%, var(--teal) 0 25%, var(--hibiscus) 0 50%, var(--teal) 0 75%, var(--hibiscus) 0) 0 0/28px 10px;
}
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; min-width: 0; }
.mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 900; font-size: 20px; line-height: 1; white-space: nowrap; }
.brand-name b { color: var(--hibiscus); }
.brand-name small { display: block; font-family: var(--body); font-weight: 700; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--teal); margin-top: 4px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 430px) {
  .brand-name { font-size: 18px; }
  .brand-name small { font-size: 9px; letter-spacing: .16em; }
  .mark { width: 34px; height: 34px; }
  .lang-pick select { max-width: 7.6em; }
}
.lang-pick { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px 0 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--fg); font-size: 13px; font-weight: 700; cursor: pointer; }
.lang-pick:focus-within { outline: 2px solid var(--turmeric); outline-offset: 2px; }
.lang-ic { color: var(--teal); display: grid; }
.lang-ic .ic { width: 16px; height: 16px; }
.lang-short { min-width: 1.2em; text-align: center; }
.lang-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; border: 0; }
.member-btn { font: inherit; display: inline-flex; align-items: center; gap: 4px; height: 34px; min-width: 34px; justify-content: center; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--teal); cursor: pointer; position: relative; font-size: 13px; font-weight: 700; }
.member-btn .ic { width: 18px; height: 18px; }
.member-btn .dot { position: absolute; top: 3px; inset-inline-end: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--hibiscus); }
.member-btn.on { color: var(--on-tier); border-color: transparent; padding: 0 10px; }
.member-btn.on .ic { width: 15px; height: 15px; fill: currentColor; }
.tier-basic.member-btn, .mcard.tier-basic { background: var(--tier-basic); }
.tier-silver.member-btn, .mcard.tier-silver { background: var(--tier-silver); }
.tier-gold.member-btn, .mcard.tier-gold { background: var(--tier-gold); }
.tier-platinum.member-btn, .mcard.tier-platinum { background: var(--tier-platinum); }
.trbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 59px); z-index: 19; background: var(--teal-soft); color: var(--teal); font-size: 13px; border-bottom: 1px solid var(--line); }
.trbar.warn { background: var(--turmeric-soft); color: var(--fg); }
.trbar-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-block: 8px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 900px) { .trbar { top: calc(env(safe-area-inset-top, 0px) + 107px); } }
.sos-btn { font: inherit; font-family: var(--mono); font-weight: 600; font-size: 14px; letter-spacing: .08em; border: 0; border-radius: 999px; padding: 6px 14px; background: var(--hibiscus); color: var(--on-accent); cursor: pointer; }

/* ---------- tabs: bottom bar on phones, strip under header on wide screens ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.tabbar-in { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 640px; margin: 0 auto; height: var(--tabbar-h); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 500; min-width: 0; }
.tabbar a span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding-inline: 2px; }
.tabbar a[aria-current="page"] { color: var(--teal); }
.tabbar a[aria-current="page"] .tab-ic { background: var(--teal-soft); }
.tab-ic { display: grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; transition: background .15s; }
main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 24px); }
@media (min-width: 900px) {
  .tabbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 59px); bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); padding-bottom: 0; }
  .tabbar-in { display: flex; justify-content: flex-start; gap: 4px; max-width: 1120px; height: 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .tabbar a { flex-direction: row; gap: 6px; font-size: 14px; padding: 0 12px; border-bottom: 2px solid transparent; }
  .tabbar a[aria-current="page"] { border-bottom-color: var(--teal); }
  .tabbar a[aria-current="page"] .tab-ic { background: transparent; }
  .tab-ic { width: auto; height: auto; }
  main { padding-bottom: 48px; }
}

/* ---------- shared pieces ---------- */
.view { padding-top: 20px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.view:focus { outline: none; }
.view-head h1 { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 5vw, 36px); line-height: 1.2; margin: 0 0 6px; }
.view-head p { margin: 0; color: var(--muted); max-width: 60ch; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title h2 { font-family: var(--display); font-weight: 900; font-size: 21px; margin: 0; }
.section-title a { font-size: 14px; font-weight: 500; text-decoration: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; min-width: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.btn { font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border-radius: 10px; border: 1px solid transparent; padding: 10px 16px; text-decoration: none; line-height: 1.3; }
.btn .ic { width: 18px; height: 18px; }
.btn-main { background: var(--hibiscus); color: var(--on-accent); }
.btn-main:hover { filter: brightness(1.07); }
.btn-ai { background: var(--teal); color: var(--on-accent); }
.btn-ai:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--fg); font-weight: 500; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { font: inherit; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 5px 10px; font-size: 13px; cursor: pointer; }
.icon-btn .ic { width: 16px; height: 16px; }
.icon-btn:hover { border-color: var(--teal); color: var(--teal); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
:focus-visible { outline: 2px solid var(--turmeric); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip label { display: inline-flex; flex-direction: column; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; font-size: 14px; line-height: 1.3; transition: background .15s, border-color .15s; }
.chip label i { font-style: normal; font-size: 11px; color: var(--muted); }
.chip input:checked + label { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
.chip input:checked + label i { color: var(--on-accent); opacity: .85; }
.chip input:focus-visible + label { outline: 2px solid var(--turmeric); outline-offset: 2px; }

/* ---------- home ---------- */
.hero { display: flex; flex-direction: column; gap: 10px; }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 7vw, 52px); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.hero p.lead { margin: 0; color: var(--muted); max-width: 52ch; font-size: 16px; }
.city-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.city-pick span { font-size: 13px; color: var(--muted); }

.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .glance { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--fg); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.tile:hover { border-color: var(--teal); }
.tile .k { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .k .ic { width: 15px; height: 15px; }
.tile .v { font-family: var(--mono); font-weight: 600; font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .v.text { font-family: var(--body); font-size: 14px; font-weight: 500; line-height: 1.45; }
.tile .n { font-size: 12px; color: var(--muted); line-height: 1.4; }
.tile.sos { background: var(--hibiscus-soft); border-color: transparent; }
.tile.sos .v { color: var(--hibiscus); font-size: 28px; }

.quick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 760px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quick a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--fg); text-decoration: none; }
.quick a:hover { border-color: var(--teal); }
.quick b { display: block; font-size: 15.5px; }
.quick small { display: block; color: var(--muted); font-size: 13px; }
.quick .next { color: var(--muted); width: 18px; height: 18px; }
.badge-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--teal-soft); color: var(--teal); flex: none; }
.badge-ic.hot { background: var(--hibiscus-soft); color: var(--hibiscus); }
.badge-ic.warm { background: var(--turmeric-soft); color: var(--fg); }

.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .topics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.topic { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--fg); text-decoration: none; min-width: 0; }
.topic:hover { border-color: var(--teal); }
.topic b { font-size: 15.5px; line-height: 1.3; }
.topic small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }

.progress { display: flex; flex-direction: column; gap: 8px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 999px; transition: width .3s; }

/* ---------- guide ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--teal); }
.back .ic { width: 18px; height: 18px; }
.topic-head { display: flex; gap: 14px; align-items: flex-start; }
.topic-head .badge-ic { width: 52px; height: 52px; border-radius: 14px; }
.topic-head .badge-ic .ic { width: 28px; height: 28px; }
.topic-head h1 { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 5vw, 36px); line-height: 1.2; margin: 0 0 4px; }
.topic-head p { margin: 0; color: var(--muted); max-width: 60ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.fact span { display: block; font-size: 11.5px; letter-spacing: .06em; color: var(--muted); }
.fact b { font-size: 15px; }
.g-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 900px) { .g-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.g-sec h2 { font-size: 17px; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.g-sec ul { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 6px; }
.g-sec li { max-width: 65ch; }
.g-sec.mine { border-color: var(--teal); }
.pill { font-size: 11.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--fg); white-space: nowrap; }
.pill.teal { background: var(--teal-soft); color: var(--teal); font-weight: 700; }
.pill.warn { background: var(--turmeric-soft); }
.dishes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; }
@media (min-width: 760px) { .dishes { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; } }
.dish { padding: 10px 0; border-bottom: 1px solid var(--line); }
.dish dt { font-weight: 700; color: var(--hibiscus); }
.dish dd { margin: 2px 0 0; color: var(--fg); font-size: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--surface); }
.links a .ic { width: 15px; height: 15px; }
.checked-note { font-size: 12.5px; color: var(--muted); border-inline-start: 3px solid var(--turmeric); padding-inline-start: 10px; margin: 0; }

/* ---------- planner (ported) ---------- */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 900px) { .plan-grid { grid-template-columns: minmax(0, 370px) minmax(0, 1fr); } .panel { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 120px); max-height: calc(100vh - 140px); overflow-y: auto; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 18px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
legend { font-weight: 700; font-size: 13px; letter-spacing: .06em; padding: 0; margin-bottom: 8px; }
legend small { font-weight: 400; color: var(--muted); letter-spacing: .02em; font-size: 12px; }
.persona { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.persona .chip label { border-radius: 8px; width: 100%; height: 100%; }
.persona .chip input:checked + label { background: var(--hibiscus); border-color: var(--hibiscus); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > label { flex: 1 1 120px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input[type=time], input[type=number], input[type=text], textarea, select {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0;
}
input[type=time], input[type=number] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
textarea { min-height: 64px; resize: vertical; }
.toggle { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--teal); flex: none; }

.plan-out { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.summary h2 { font-family: var(--display); font-weight: 900; font-size: 22px; margin: 0; line-height: 1.3; }
.summary p { margin: 0; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.stop { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 14px; }
.time { font-family: var(--mono); font-weight: 600; font-size: 15px; text-align: end; padding-top: 16px; font-variant-numeric: tabular-nums; }
.time span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.stop .card { margin-block: 4px; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.stop h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; }
.stop h3 small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.stop .why { margin: 0; }
.stop .tip { margin: 0; font-size: 13px; background: var(--turmeric-soft); border-radius: 6px; padding: 6px 10px; }
.stop .maps { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.stop .maps a { font-weight: 500; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.tag.food { border-color: var(--hibiscus); color: var(--hibiscus); }
.book { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); align-items: center; }
.book span { font-size: 12px; color: var(--muted); }
.book a { font-size: 12px; text-decoration: none; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg); }
.book a:hover { border-color: var(--teal); color: var(--teal); }
.leg { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 14px; font-size: 13px; color: var(--muted); }
.leg div:last-child { border-inline-start: 2px dashed var(--line); margin-inline-start: 14px; padding-block: 6px; padding-inline-start: 14px; }
.endcard { border-style: dashed !important; background: transparent !important; }

/* ---------- tools ---------- */
.tools-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .tools-grid .wide { grid-column: 1 / -1; } }
.tool h2 { font-family: var(--display); font-weight: 900; font-size: 19px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.tool h2 .ic { color: var(--teal); }
.tool > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.tool { display: flex; flex-direction: column; gap: 10px; }
.fx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.fx-row input { font-size: 20px; padding: 10px 12px; }
.fx-row .cur { font-family: var(--mono); font-weight: 600; min-width: 64px; text-align: center; }
.fx-row select { width: auto; font-family: var(--mono); font-weight: 600; }
.fx-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.fx-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-quick button { font: inherit; font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.bill-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.bill-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.bill-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bill-out div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.bill-out span { display: block; font-size: 12px; color: var(--muted); }
.bill-out b { font-family: var(--mono); font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bill-out small { display: block; font-family: var(--mono); color: var(--muted); font-size: 12.5px; }
.phr-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.phr-tabs button { font: inherit; font-size: 13.5px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 999px; padding: 5px 12px; cursor: pointer; white-space: nowrap; }
.phr-tabs button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
.phr-list { list-style: none; margin: 0; padding: 0; }
.phr-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.phr-list b { font-size: 16.5px; color: var(--teal); }
.phr-list span { display: block; font-size: 13.5px; color: var(--muted); }
.phr-list .acts { display: flex; gap: 6px; }
.checklist { display: flex; flex-direction: column; gap: 14px; }
.checklist h3 { font-size: 14px; letter-spacing: .06em; margin: 0 0 6px; color: var(--muted); }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.checklist input { width: 20px; height: 20px; accent-color: var(--teal); flex: none; margin-top: 2px; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }

/* ---------- chat ---------- */
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; min-height: calc(100vh - 240px); }
.chat-head { background: var(--teal); color: var(--on-accent); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.chat-title { display: flex; gap: 10px; align-items: center; min-width: 0; flex: 1 1 260px; }
.chat-title h1 { margin: 0; font-family: var(--display); font-size: 19px; line-height: 1.3; }
.chat-title p { margin: 0; font-size: 12.5px; opacity: .92; }
.chat-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--on-accent); color: var(--teal); flex: none; }
.chat-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chat-controls label { font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.chat-controls select { width: auto; font-size: 13px; padding: 4px 6px; border: 0; background: var(--surface); }
.chat-head .btn-ghost { color: var(--on-accent); border-color: currentColor; }
.chat-head .btn-ghost:hover { background: transparent; opacity: .85; }
.msgs { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1; overflow-y: auto; min-height: 200px; max-height: 60vh; }
@media (min-width: 900px) { .msgs { max-height: 56vh; } }
.msg { max-width: 88%; padding: 9px 13px; border-radius: 14px; overflow-wrap: anywhere; font-size: 14.5px; min-width: 0; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin-bottom: 0; }
.msg ul { margin: 4px 0 6px; padding-inline-start: 18px; }
.msg.me { align-self: flex-end; background: var(--hibiscus); color: var(--on-accent); border-end-end-radius: 4px; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; background: var(--surface-2); border-end-start-radius: 4px; }
.msg.bot a { color: var(--teal); }
.msg .status { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.msg .srcs { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.msg .srcs b { color: var(--muted); font-weight: 500; }
.msg.note { align-self: center; background: var(--teal-soft); color: var(--teal); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.msg.note a { font-weight: 700; color: var(--teal); }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.suggest button { font: inherit; font-size: 12.5px; font-weight: 500; padding: 5px 11px; border-radius: 999px; border: 0; background: var(--teal-soft); color: var(--teal); cursor: pointer; text-align: left; }
.composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 46px; flex: 1; }
.chat-foot { font-size: 12px; color: var(--muted); padding: 0 16px 12px; margin: 0; }

/* ---------- SOS sheet, full-screen card, toast ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(10, 16, 14, .5); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 18px max(18px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 16px;
}
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; max-height: 86vh; } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-head h2 { margin: 0; font-family: var(--display); font-size: 22px; color: var(--hibiscus); }
.sheet-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.sos-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sos-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.sos-list li.primary { background: var(--hibiscus-soft); border-color: transparent; }
.sos-list .num { font-family: var(--mono); font-weight: 600; font-size: 22px; user-select: all; font-variant-numeric: tabular-nums; }
.sos-list li.primary .num { color: var(--hibiscus); font-size: 30px; }
.sos-list .lbl { font-weight: 700; font-size: 14px; }
.sos-list .note { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.sos-list .acts { display: flex; gap: 6px; grid-row: 1 / 3; grid-column: 2; }
.sos-block { display: flex; flex-direction: column; gap: 8px; }
.sos-block h3 { margin: 0; font-size: 14px; letter-spacing: .06em; color: var(--muted); }
.sos-block label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.loc-out { font-family: var(--mono); font-size: 14px; user-select: all; }

.present { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: calc(24px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px)); }
.present-in { max-width: 900px; width: 100%; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.present-kicker { margin: 0; font-size: clamp(16px, 3vw, 22px); color: var(--teal); font-weight: 700; }
.present-big { margin: 0; font-size: clamp(30px, 8vw, 72px); line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.present-sub { margin: 0; font-size: clamp(16px, 3vw, 22px); color: var(--muted); }
.present-close { margin-top: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 16px); transform: translateX(-50%); z-index: 60; background: var(--fg); color: var(--bg); padding: 8px 16px; border-radius: 999px; font-size: 14px; max-width: calc(100vw - 32px); text-align: center; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

.foot { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; font-size: 12px; color: var(--muted); }
.foot b { color: var(--fg); letter-spacing: .06em; }
.foot .copy { flex-basis: 100%; font-size: 11.5px; }

/* ---------- membership ---------- */
.mhome { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.mhome b { display: block; font-size: 16px; }
.mhome small { display: block; color: var(--muted); font-size: 13px; }
.mhome small.em, .m-perks small.em, .nudge .em { color: var(--hibiscus); font-weight: 700; }
.mhome.join { background: var(--hibiscus-soft); border-color: transparent; }
.mhome .next { width: 18px; height: 18px; color: var(--muted); }
.mhome:not(.join) .badge-ic { background: var(--tier-basic); color: var(--on-tier); }
.mhome.tier-silver .badge-ic { background: var(--tier-silver); } .mhome.tier-gold .badge-ic { background: var(--tier-gold); } .mhome.tier-platinum .badge-ic { background: var(--tier-platinum); }
@media (max-width: 420px) { .mhome.join { grid-template-columns: auto minmax(0, 1fr); } .mhome.join .btn { grid-column: 1 / -1; } }

.m-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) { .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.m-grid .card h2, .m-sub { font-size: 16px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.m-grid .card h2 .ic { color: var(--teal); width: 20px; height: 20px; }
.perk-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.perk-list li { display: flex; gap: 12px; align-items: center; }
.perk-list b { font-size: 15px; }
.perk-list small { display: block; }
.ladder { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ladder li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 10px; background: var(--surface-2); text-align: center; min-width: 0; }
.ladder b { font-size: 13px; }
.ladder small { font-size: 12px; color: var(--muted); }
.ladder .tier-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--tier-basic); }
.ladder .tier-silver .tier-dot { background: var(--tier-silver); } .ladder .tier-gold .tier-dot { background: var(--tier-gold); } .ladder .tier-platinum .tier-dot { background: var(--tier-platinum); }
.ladder li.here { outline: 2px solid var(--teal); background: var(--teal-soft); }
.m-form { display: flex; flex-direction: column; gap: 12px; }
.m-form > label:not(.toggle) { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.m-form input[type=email], .m-form input:not([type]) { font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
.m-form .otp { font-family: var(--mono); font-size: 26px; letter-spacing: .35em; text-align: center; padding: 10px; }
.m-form .btn { align-self: flex-start; }
.m-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.linkish { font: inherit; font-size: 14px; border: 0; background: none; padding: 0; color: var(--teal); text-decoration: underline; cursor: pointer; }
.linkish:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.m-error { margin: 10px 0 0; color: var(--hibiscus); font-weight: 500; font-size: 14px; }
.m-invited, .m-off { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--turmeric-soft); font-size: 14px; }
.m-invited .ic { color: var(--hibiscus); }

.mcard { position: relative; overflow: hidden; color: var(--on-tier); border-radius: 18px; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); max-width: 560px; }
.mcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; opacity: .9;
  background: radial-gradient(circle at 50% 50%, var(--turmeric) 0 2px, transparent 2.5px) 0 0/20px 6px,
              conic-gradient(from 45deg at 50% 50%, rgba(255,255,255,.35) 0 25%, rgba(0,0,0,.15) 0 50%, rgba(255,255,255,.35) 0 75%, rgba(0,0,0,.15) 0) 0 0/20px 6px; }
.mcard-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tier-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.18); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.tier-badge .ic { width: 15px; height: 15px; fill: currentColor; }
.mcard-brand { font-family: var(--display); font-weight: 900; font-size: 15px; opacity: .9; }
.mcard-name { font-size: 15px; opacity: .92; overflow-wrap: anywhere; }
.mcard-points { display: flex; align-items: baseline; gap: 8px; }
.mcard-points b { font-size: 44px; line-height: 1; }
.mcard-points span { font-size: 15px; opacity: .9; }
.mcard-progress .bar { background: rgba(255,255,255,.22); }
.mcard-progress .bar i { background: #ffffff; }
.mcard-progress small, .mcard-meta { font-size: 12.5px; opacity: .9; }
.mcard-progress small { display: block; margin-top: 6px; }
.invite-link { background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 4px 0 10px; overflow-x: auto; }
.invite-link span { font-size: 13.5px; user-select: all; white-space: nowrap; }
.offers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 760px) { .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.offer { display: flex; flex-direction: column; gap: 6px; }
.offer h3 { margin: 0; font-size: 16px; }
.offer p { margin: 0; color: var(--muted); font-size: 14px; }
.offer-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tier-pill { color: var(--on-tier); }
.tier-pill.tier-silver { background: var(--tier-silver); } .tier-pill.tier-gold { background: var(--tier-gold); } .tier-pill.tier-platinum { background: var(--tier-platinum); }
.offer-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 4px; }
.offer-code { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--turmeric-soft); }
.offer-code small { color: var(--muted); font-size: 11.5px; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.history small { display: block; color: var(--muted); font-size: 12px; }
.history b { color: var(--teal); } .history b.neg { color: var(--hibiscus); }
.m-settings { display: flex; flex-direction: column; gap: 10px; }
.m-settings .hint { overflow-wrap: anywhere; }

.install-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.install-card b { display: block; }
.install-card small { display: block; color: var(--muted); font-size: 13px; }
.install-card .actions { grid-column: 1 / -1; }
@media (min-width: 640px) { .install-card { grid-template-columns: auto minmax(0, 1fr) auto; } .install-card .actions { grid-column: auto; } }

.sheet.nudge { align-items: center; text-align: center; gap: 10px; }
.nudge-art { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--hibiscus-soft); color: var(--hibiscus); }
.nudge-art .ic { width: 32px; height: 32px; }
.sheet.nudge h2 { margin: 0; font-family: var(--display); font-size: 22px; }
.sheet.nudge p { margin: 0; max-width: 42ch; }
.sheet.nudge .actions { justify-content: center; }

/* ---------- slogan, search box ---------- */
.slogan { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 0; }
.slogan span { display: inline-block; font-family: var(--display); font-weight: 900; font-size: clamp(17px, 4.4vw, 22px); color: var(--on-accent); background: var(--hibiscus); padding: 4px 14px 5px; border-radius: 999px; transform: rotate(-2deg); box-shadow: 3px 3px 0 var(--turmeric); letter-spacing: .01em; }
.slogan small { font-size: 12.5px; color: var(--muted); }
.search-launch { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1.5px solid var(--teal); border-radius: 999px; background: var(--surface); color: var(--muted); text-decoration: none; font-size: 15px; box-shadow: var(--shadow); min-width: 0; }
.search-launch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-launch .ic { color: var(--teal); width: 20px; height: 20px; flex: none; }
.search-launch:hover { border-color: var(--hibiscus); }
.chip-link { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px dashed var(--teal); border-radius: 999px; font-size: 14px; color: var(--teal); text-decoration: none; }
.chip-link .ic { width: 15px; height: 15px; }
.chip-btn { font: inherit; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: 14px; cursor: pointer; }
.chip-btn .ic { width: 15px; height: 15px; color: var(--teal); }
.chip-btn:hover { border-color: var(--teal); }

.search-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1.5px solid var(--teal); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.search-form .s-ic { color: var(--teal); display: grid; }
.search-form input { font: inherit; font-size: 16px; border: 0; background: transparent; color: var(--fg); min-width: 0; padding: 6px 0; }
.search-form input:focus { outline: none; }
.search-form .btn { border-radius: 999px; }
.s-group { display: flex; flex-direction: column; gap: 10px; }
.s-group h2 { font-family: var(--display); font-weight: 900; font-size: 18px; margin: 0; }
.s-list { display: flex; flex-direction: column; gap: 6px; }
.s-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--fg); text-decoration: none; font: inherit; text-align: start; cursor: pointer; width: 100%; }
.s-row:hover { border-color: var(--teal); }
.s-row b { display: block; font-size: 15px; line-height: 1.3; }
.s-row small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.s-row .next { width: 18px; height: 18px; color: var(--muted); }
.s-row.s-more { border-color: var(--hibiscus); border-style: dashed; }
.s-row.s-ask .badge-ic { background: var(--teal); color: var(--on-accent); }
.s-thumb.ph { width: 56px; height: 44px; border-radius: 8px; flex: none; }
.s-thumb.ph figcaption { display: none; }
.s-tries { gap: 8px; }
.osm-note a { color: inherit; }

/* ---------- photos ---------- */
.ph { position: relative; margin: 0; overflow: hidden; background: linear-gradient(135deg, var(--teal-soft), var(--turmeric-soft)); display: grid; place-items: center; color: var(--teal); aspect-ratio: 4 / 3; }
.ph > .ic { width: 34%; height: 34%; max-width: 56px; max-height: 56px; opacity: .55; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: 14px 8px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.ph figcaption > * { display: flex; align-items: center; gap: 4px; color: #fff; font-size: 10px; line-height: 1.3; text-decoration: none; opacity: .9; }
.ph figcaption > * > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph figcaption .ic { width: 11px; height: 11px; flex: none; }
.ph-none figcaption { display: none; }

/* ---------- the overview map ---------- */
.mymap-wrap { overflow-x: auto; overscroll-behavior-x: contain; border-radius: var(--r); border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.mymap { display: block; width: 100%; min-width: 760px; height: auto; }
.mymap-wrap.small .mymap { min-width: 0; }
.explore .mymap-wrap, .s-group .mymap-wrap { max-width: 1000px; }
.mm-sea { fill: #dff0ef; }
.mm-near { fill: #e9e5da; stroke: #c9c3b4; stroke-width: .8; }
.mm-land { fill: #fbf7ec; stroke: var(--teal); stroke-width: 1.4; stroke-linejoin: round; }
.mm-cut { stroke: var(--teal); stroke-width: 1.2; stroke-dasharray: 7 7; opacity: .35; }
.mm-hit { fill: transparent; }
.mm-dot { fill: var(--hibiscus); stroke: #fff; stroke-width: 2.5; }
.mm-spot.city .mm-dot { fill: var(--teal); }
.mm-spot text { font-family: var(--body); font-size: 17px; font-weight: 700; fill: #16211e; paint-order: stroke; stroke: #fbf7ec; stroke-width: 4px; stroke-linejoin: round; }
.mm-spot:hover .mm-dot, .mm-spot:focus .mm-dot { fill: var(--turmeric); }
.mm-spot:focus { outline: none; }
.mm-spot:focus-visible .mm-hit { stroke: var(--turmeric); stroke-width: 3; }
.mymap.locator .mm-spots { opacity: .45; }
.mm-here circle:first-child { fill: var(--hibiscus); opacity: .22; }
.mm-here circle:last-child { fill: var(--hibiscus); stroke: #fff; stroke-width: 3; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mm-sea { fill: #13312e; }
  :root:not([data-theme="light"]) .mm-near { fill: #1f2a27; stroke: #34443f; }
  :root:not([data-theme="light"]) .mm-land { fill: #26352f; }
  :root:not([data-theme="light"]) .mm-spot text { fill: #e7efec; stroke: #26352f; }
}
:root[data-theme="dark"] .mm-sea { fill: #13312e; }
:root[data-theme="dark"] .mm-near { fill: #1f2a27; stroke: #34443f; }
:root[data-theme="dark"] .mm-land { fill: #26352f; }
:root[data-theme="dark"] .mm-spot text { fill: #e7efec; stroke: #26352f; }

/* ---------- photo strips and cards ---------- */
.explore { display: flex; flex-direction: column; gap: 10px; }
.explore .section-title { margin: 0; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 46%); gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
@media (min-width: 640px) { .strip { grid-auto-columns: minmax(170px, 23%); } }
.strip > * { scroll-snap-align: start; }
.dest-card, .pic-card, .near-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--fg); text-decoration: none; min-width: 0; }
.dest-card:hover, .pic-card:hover, .near-card:hover { border-color: var(--teal); }
.dest-card > span, .pic-card > span, .near-card > span { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; min-width: 0; }
.dest-card b, .pic-card b, .near-card b { font-size: 14.5px; line-height: 1.3; }
.dest-card small, .pic-card small, .near-card small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.pic-card small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dest-grid, .near-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .dest-grid, .near-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .dest-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- guide galleries ---------- */
.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.g-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; scroll-margin-top: 80px; }
.g-item .ph { aspect-ratio: auto; min-height: 100%; }
.g-item .ph figcaption { padding-top: 10px; }
.g-item > div { padding: 10px 12px; }
.g-item h3 { margin: 0 0 4px; font-size: 15.5px; }
.g-item p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.g-item:target { border-color: var(--hibiscus); box-shadow: 0 0 0 2px var(--hibiscus-soft); }

/* ---------- place pages ---------- */
.pl-hero .ph { aspect-ratio: 16 / 9; border-radius: var(--r); max-height: 420px; width: 100%; }
.pl-hero .ph figcaption > * { font-size: 11px; }
.pl-head { display: flex; flex-direction: column; gap: 4px; margin-top: -8px; }
.pl-head h1 { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 6vw, 40px); line-height: 1.15; margin: 0; }
.pl-type { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--teal); font-size: 13px; font-weight: 700; }
.pl-type .ic { width: 16px; height: 16px; }
.pl-local { margin: 0; color: var(--muted); font-size: 14px; }
.pl-area { display: flex; gap: 4px; align-items: flex-start; margin: 0; color: var(--muted); font-size: 13.5px; }
.pl-area .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.pl-lead { margin: 0; font-size: 16px; line-height: 1.6; max-width: 65ch; }
.pl-tip { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; background: var(--turmeric-soft); border-radius: var(--r); font-size: 14px; }
.pl-tip .ic { width: 18px; height: 18px; flex: none; color: var(--turmeric); margin-top: 2px; }
.pl-facts .fact { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; }
.pl-facts .fact .ic { grid-row: span 2; width: 18px; height: 18px; color: var(--teal); margin-top: 2px; }
.pl-map, .pl-wiki, .pl-ask, .pl-ess, .pl-where { display: flex; flex-direction: column; gap: 10px; }
.pl-map h2, .pl-wiki h2, .pl-ask h2, .pl-ess h2, .pl-where h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0; }
.pl-map h2 .ic, .pl-wiki h2 .ic, .pl-ask h2 .ic, .pl-ess h2 .ic, .pl-where h2 .ic { width: 18px; height: 18px; color: var(--teal); }
.pl-wiki p { margin: 0; line-height: 1.6; }
.pl-wiki .hint a { color: inherit; }
.pl-map > .btn { align-self: flex-start; }
.street { height: 260px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); position: relative; }
.street.street-off { height: auto; border: 0; background: none; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.street.street-off .mymap { min-width: 0; border-radius: 10px; border: 1px solid var(--line); }
.street-wait { padding: 12px; }
.map-pin { width: 26px; height: 34px; background: var(--hibiscus); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.map-dot { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--teal); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.pl-ask .chips { gap: 8px; }
.pl-ess .links a .ic:first-child { color: var(--hibiscus); }

/* ---------- credits ---------- */
.credits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.credits li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.credits img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.credits b { display: block; font-size: 14px; }
.credits small { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.credits small a { color: inherit; }
.credits-more p { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.foot a { color: inherit; }

/* ---------- member details ---------- */
.m-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.m-tabs button { font: inherit; font-size: 14px; font-weight: 700; border: 0; border-radius: 9px; padding: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.m-tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.m-form select, .m-form input[type=tel], .m-form input:not([type]) { font: inherit; font-size: 16px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); margin-top: 4px; }
.m-form label > small.hint { display: block; margin-top: 4px; }
.m-form .req { color: var(--hibiscus); }
.m-emergency { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.m-emergency legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.m-dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
.m-dl div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 8px; }
.m-dl dt { color: var(--muted); font-size: 13px; }
.m-dl dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.m-details { display: flex; flex-direction: column; gap: 10px; }
.m-complete { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; font: inherit; text-align: start; color: var(--fg); background: var(--turmeric-soft); border-color: transparent; cursor: pointer; width: 100%; }
.m-complete .ic { width: 20px; height: 20px; }
.sos-em { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--hibiscus-soft); border-radius: 10px; }
.sos-em b { display: block; font-size: 14px; }
.sos-em small { display: block; font-size: 13px; overflow-wrap: anywhere; }

[dir="rtl"] .back .ic, [dir="rtl"] .quick .next, [dir="rtl"] .s-row .next, [dir="rtl"] .ic-flip { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
