/* Follow our journey — follower page. Same colour tokens as the portal (app.css).
   Conservative CSS on purpose (WeChat's in-app browser on older phones): no flex `gap`,
   no `inset`, no `:is()`, no aspect-ratio. Large type, high contrast, light and dark. */

:root {
  --bg: #F7F7F4; --card: #FFFFFF; --ink: #171A22; --muted: #4E5665; --line: #D9DEE6; --soft: #EEF1F5;
  --accent: #1F7A8C; --accent2: #3A6EA5; --warm: #E0405A; --ok: #1F8A4C;
  --sea: #DCEBF3; --land: #C9D7BF; --land-line: #B3C4A8;
  --shadow: 0 6px 22px rgba(20, 30, 50, .10); --radius: 18px; --fs: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151D; --card: #1B2029; --ink: #EAEDF4; --muted: #A9B1C2; --line: #2B3140; --soft: #222836;
    --accent: #3FB6C9; --accent2: #8FA9EF; --warm: #FF7A8A; --ok: #3FBF7A;
    --sea: #17324A; --land: #34503A; --land-line: #46684C; --shadow: 0 8px 26px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: var(--fs); line-height: 1.55;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }

/* ---------- code screen ---------- */
.f-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.f-gate-card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow); padding: 28px 22px; text-align: center;
}
.f-gate-icon { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.f-gate-card h1 { font-size: 26px; line-height: 1.25; margin: 14px 0 6px; }
.f-gate-card p { color: var(--muted); margin-bottom: 16px; }
#gate-input {
  display: block; width: 100%; font-size: 24px; letter-spacing: 3px; text-align: center; text-transform: uppercase;
  padding: 14px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--soft); color: var(--ink);
}
#gate-input:focus { outline: none; border-color: var(--accent); }
.f-primary {
  display: block; width: 100%; margin-top: 12px; padding: 14px; border: 0; border-radius: 14px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 19px; cursor: pointer;
}
.f-err { min-height: 24px; margin-top: 12px; color: var(--warm); font-weight: 700; font-size: 16px; }

.f-langs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--soft); }
.f-langs button { border: 0; background: transparent; padding: 8px 16px; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; }
.f-langs button.active { background: var(--accent); color: #fff; }
.f-langs-small button { padding: 7px 11px; font-size: 14px; }

/* ---------- header ---------- */
.f-hdr { position: -webkit-sticky; position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); }
.f-hdr-inner { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; }
.f-hdr-text { flex: 1; min-width: 0; margin-right: 10px; }
.f-title { font-weight: 800; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-count { color: var(--accent); font-weight: 800; font-size: 15px; }

/* ---------- layout ---------- */
.f-app { max-width: 760px; margin: 0 auto; padding: 14px 16px 60px; }
.f-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-top: 14px; }
.f-kicker { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.f-kicker-sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.f-muted { color: var(--muted); font-size: 16px; }
.f-note { background: var(--soft); border-radius: 12px; padding: 8px 12px; font-size: 15px; color: var(--muted); }
.f-place { font-size: 26px; font-weight: 800; line-height: 1.25; margin: 2px 0 6px; }

/* ---------- clocks ---------- */
.f-clocks { display: flex; margin-top: 12px; }
.f-clock { flex: 1; background: var(--soft); border-radius: 14px; padding: 10px 12px; text-align: center; }
.f-clock + .f-clock { margin-left: 10px; }
.f-clock-time { white-space: nowrap; font-size: 24px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.f-clock-label { font-size: 14px; color: var(--muted); font-weight: 700; }
.f-clock-you .f-clock-time { color: var(--accent2); }
.f-diff { text-align: center; margin-top: 8px; font-weight: 700; color: var(--muted); font-size: 16px; }
.f-maplink { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 16px; text-decoration: none; }
.f-maplink-icon { margin: 0 0 0 8px; font-size: 22px; line-height: 1; padding: 6px; }

/* ---------- updates ---------- */
.f-update { margin-top: 10px; }
.f-update + .f-update { padding-top: 10px; border-top: 1px dashed var(--line); }
.f-update-text { font-size: 18px; white-space: pre-wrap; word-wrap: break-word; }
.f-update-meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.f-photos { display: flex; flex-wrap: wrap; margin: 8px -3px 0; }
.f-photo { display: block; width: 50%; padding: 3px; }
.f-photos-1 .f-photo { width: 100%; }
.f-photo img { display: block; width: 100%; height: 180px; object-fit: cover; border-radius: 12px; background: var(--soft); }
.f-photos-1 .f-photo img { height: auto; max-height: 420px; }

/* ---------- map ---------- */
.f-map-wrap { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.f-map { display: block; width: 100%; height: auto; }
.f-sea { fill: var(--sea); }
.f-land polygon { fill: var(--land); stroke: var(--land-line); stroke-width: 1.5; stroke-linejoin: round; }
.f-leg { fill: none; stroke: var(--muted); stroke-width: 3; opacity: .45; stroke-linecap: round; }
.f-leg.done { stroke: var(--accent); opacity: 1; }
.f-leg.live { stroke: var(--warm); opacity: 1; stroke-width: 4; }
.f-leg-flight { stroke-width: 2.5; stroke-dasharray: 2 7; }
.f-leg-cruise, .f-leg-ferry { stroke-dasharray: 12 8; }
.f-leg-ferry { stroke-dasharray: 6 6; }
.f-leg-train, .f-leg-bus { stroke-width: 2; }
.f-leg-walk, .f-leg-bike { stroke-dasharray: 1 6; }
.f-pin { cursor: pointer; }
.f-hit { fill: transparent; stroke: none; }
.f-pin:focus { outline: none; }
.f-pin:focus .f-dot { stroke-width: 5; }
.f-map-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.f-map-head .f-kicker { margin-bottom: 0; }
.f-pin .f-dot { fill: var(--card); stroke: var(--accent); stroke-width: 3; }
.f-pin.past .f-dot { fill: var(--accent); }
.f-pin.upcoming .f-dot { fill: var(--card); stroke: var(--muted); stroke-dasharray: 3 3; }
.f-pin.next .f-dot { stroke: var(--warm); stroke-dasharray: none; }
.f-pin.current .f-dot { fill: var(--warm); stroke: #fff; stroke-width: 3; }
.f-pin.selected .f-dot { stroke-width: 5; }
.f-pulse { fill: var(--warm); opacity: .25; transform-origin: 0 0; -webkit-animation: f-pulse 1.8s ease-out infinite; animation: f-pulse 1.8s ease-out infinite; }
@-webkit-keyframes f-pulse { from { -webkit-transform: scale(.5); opacity: .5; } to { -webkit-transform: scale(1.4); opacity: 0; } }
@keyframes f-pulse { from { transform: scale(.5); opacity: .5; } to { transform: scale(1.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .f-pulse { -webkit-animation: none; animation: none; } }
.f-map-label { font-size: 30px; font-weight: 800; fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 6px; stroke-linejoin: round; }
.f-caption { margin-top: 10px; font-size: 16px; color: var(--muted); }
.f-caption strong { color: var(--ink); }
.f-caption .f-maplink { margin: 0 0 0 4px; }

/* ---------- timeline ---------- */
.f-tl-h { font-size: 16px; font-weight: 800; color: var(--muted); margin: 16px 0 4px; }
.f-tl-h:first-of-type { margin-top: 4px; }
.f-tl-item { border-left: 3px solid var(--accent); padding: 6px 0 10px 14px; margin-left: 6px; }
.f-tl-item.current { border-left-color: var(--warm); }
.f-tl-item.upcoming { border-left: 3px dashed var(--line); padding-bottom: 6px; }
.f-tl-head { display: flex; align-items: center; }
.f-tl-icon { font-size: 22px; width: 32px; flex: 0 0 32px; }
.f-tl-text { flex: 1; min-width: 0; }
.f-tl-name { font-weight: 800; font-size: 18px; line-height: 1.3; }
.f-tl-date { color: var(--muted); font-size: 15px; }
.f-tl-item.upcoming .f-tl-name { font-weight: 700; color: var(--muted); }
.f-fact { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ---------- footer ---------- */
.f-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 26px; }
.f-link { background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: 14px; margin-top: 8px; padding: 6px; }
.f-brand { margin-top: 10px; font-weight: 700; letter-spacing: 1px; }

/* ---------- posting page (post.html) ---------- */
.p-form .f-primary { margin-top: 18px; }
.p-label { display: block; font-weight: 800; font-size: 15px; margin: 14px 0 6px; }
.p-label:first-child { margin-top: 0; }
.p-input {
  display: block; width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: var(--soft);
  border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.p-input:focus { outline: none; border-color: var(--accent); }
textarea.p-input { resize: vertical; min-height: 64px; }
.p-file { display: block; width: 100%; font-size: 16px; }
.f-ok { min-height: 24px; margin-top: 12px; color: var(--ok); font-weight: 700; font-size: 16px; }
.f-btnlink { text-align: center; text-decoration: none; }
