@property --sky-0 { syntax: '<color>'; inherits: true; initial-value: #0a1440; }
@property --sky-1 { syntax: '<color>'; inherits: true; initial-value: #182c72; }
@property --sky-2 { syntax: '<color>'; inherits: true; initial-value: #4c5fa5; }

:root {
  --sky-0: #0a1440;
  --sky-1: #182c72;
  --sky-2: #4c5fa5;
  --ink: #e9edff;
  --muted: rgba(233, 237, 255, 0.66);
  --accent: #ffc86e;
  --accent-ink: #1a1408;
  --card: rgba(5, 10, 40, 0.4);
  --line: rgba(255, 255, 255, 0.14);
  --stars: 0;
  --sun-y: 52%;
  --sun-a: 0.5;
  --font-display: "Instrument Serif", "Noto Serif SC", "Noto Serif JP", "Songti SC", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sky-1);
  -webkit-font-smoothing: antialiased;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  transition: color 1.2s ease;
  overflow-x: hidden;
}
.sky {
  position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 58%, var(--sky-2) 100%);
  transition: --sky-0 2.5s ease, --sky-1 2.5s ease, --sky-2 2.5s ease;
}
.stars { position: fixed; inset: 0; z-index: -1; opacity: var(--stars); transition: opacity 2.5s ease; pointer-events: none; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle 5s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 560px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 0 0;
}
.loc {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px 8px 12px; cursor: pointer;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.brand { text-align: right; line-height: 1.1; }
.brand-zh { display: block; font-family: var(--font-display); font-size: 20px; letter-spacing: .12em; }
.brand-en { display: block; font-family: var(--font-display); font-style: italic; font-size: 13px; color: var(--muted); letter-spacing: .04em; }

main { max-width: 560px; margin: 0 auto; }

.hero {
  position: relative; text-align: center;
  padding: 18vh 0 12vh; min-height: 62vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sun {
  position: absolute; left: 50%; top: var(--sun-y);
  width: 160px; height: 160px; margin-left: -80px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e1 0%, #ffd58c 30%, rgba(255, 176, 92, 0.35) 55%, rgba(255, 160, 80, 0) 72%);
  filter: blur(12px);
  opacity: var(--sun-a);
  transition: top 2.5s ease, opacity 2.5s ease;
}
.horizon {
  position: absolute; left: -16px; right: -16px; top: 52%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 30%, var(--line) 70%, transparent);
}
.eyebrow {
  position: relative; margin: 0 0 10px;
  font-size: 13px; letter-spacing: .22em; color: var(--muted);
}
.count {
  position: relative; margin: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(72px, 20vw, 132px); line-height: 1;
  letter-spacing: -0.015em; font-variant-numeric: tabular-nums;
}
.count b { font-weight: 400; }
.count i {
  font-style: normal; font-family: var(--font-body);
  font-size: .22em; color: var(--muted); margin: 0 .2em 0 .12em; letter-spacing: .05em;
}
.count .colon { display: inline-block; transform: translateY(-.08em); margin: 0 .04em; }
.count.word { font-size: clamp(56px, 15vw, 96px); letter-spacing: .06em; }
.sub {
  position: relative; margin: 16px auto 0; max-width: 34ch;
  font-size: 15px; line-height: 1.65; color: var(--muted);
}
.sub .wx { display: block; margin-top: 4px; }
.hero-cta { position: relative; margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-cta .btn { font-size: 16px; padding: 14px 30px; }
.change-loc { font-size: 13.5px; color: var(--muted); }

.card {
  background: var(--card);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 18px; margin: 14px 0;
  transition: background 1.2s ease;
}
.h { margin: 0 0 12px; font-size: 13px; letter-spacing: .18em; color: var(--muted); font-weight: 500; }

.win + .win { margin-top: 22px; }
.win-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.win-kind { font-family: var(--font-display); font-size: 22px; letter-spacing: .1em; }
.win-kind small { font-family: var(--font-body); font-size: 12px; color: var(--muted); margin-left: 8px; letter-spacing: .05em; }
.win-range { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); }
.bar { position: relative; height: 8px; border-radius: 4px; }
.bar.evening { background: linear-gradient(90deg, #f6c98c 0%, #e59a63 42%, #6d6fb0 52%, #2a3f8f 75%, #0c1747 100%); }
.bar.morning { background: linear-gradient(90deg, #0c1747 0%, #2a3f8f 25%, #6d6fb0 48%, #e59a63 58%, #f6c98c 100%); }
.bar .mark { position: absolute; top: -2px; width: 1px; height: 12px; background: rgba(255,255,255,.55); }
.bar .now {
  position: absolute; top: -6px; width: 3px; height: 20px; border-radius: 2px;
  background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.9); transform: translateX(-50%);
}
.ticks { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ticks span { display: flex; flex-direction: column; gap: 2px; }
.ticks span:nth-child(2) { text-align: center; }
.ticks span:last-child { text-align: right; }
.ticks b { color: var(--ink); font-weight: 500; }
.empty { color: var(--muted); font-size: 14px; }

.week { list-style: none; margin: 0; padding: 0; }
.week li {
  display: grid; grid-template-columns: 6.2em 1fr auto; align-items: baseline; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums;
}
.week li:first-child { border-top: 0; }
.week .d { color: var(--muted); }
.week li.today .d { color: var(--accent); }
.week .t { }
.week .t small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.week .w { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; padding-top: 4px; }
.row.col { flex-direction: column; align-items: stretch; }
.row-main { min-width: 0; }
.row-title { font-size: 15px; }
.row-hint { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
label.row { cursor: pointer; }

.seg { display: inline-flex; background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex: none; }
.seg button {
  font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 0;
  border-radius: 999px; padding: 6px 11px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.seg button[aria-checked="true"] { background: var(--ink); color: var(--sky-0); }

.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: rgba(255,255,255,.18); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }

.actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }

.foot { margin: 26px 4px 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.foot b { color: var(--ink); font-weight: 500; }

.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--sky-0); color: var(--ink);
  border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 78vh; overflow: auto; box-shadow: 0 -20px 60px rgba(0,0,0,.4);
  animation: rise .25s ease;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); margin: 0 auto 14px; }
.sheet-head { display: flex; gap: 10px; align-items: center; }
#search {
  flex: 1; font: inherit; font-size: 16px; color: var(--ink);
  background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; outline: none;
}
#search::placeholder { color: rgba(255,255,255,.4); }
.link { font: inherit; font-size: 14px; color: var(--accent); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.results { list-style: none; margin: 12px 0 0; padding: 0; }
.results li { padding: 12px 4px; border-top: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.results li small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.results li.note { color: var(--muted); font-size: 13.5px; cursor: default; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.presets button {
  font: inherit; font-size: 14px; color: var(--ink);
  background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .star { animation: none; opacity: .6; }
  .sky, .sun, .stars { transition: none; }
}
@media (min-width: 600px) {
  .hero { padding: 16vh 0 10vh; }
}

/* --- i18n / SEO additions --- */
.top { gap: 10px; }
.brand { text-align: center; flex: 1; }
.lang {
  font-size: 13px; color: var(--ink); text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); white-space: nowrap;
}
.h1 { position: relative; margin: 0 0 14px; font-size: 13px; font-weight: 500; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
html[lang^="zh"] .h1, html[lang^="ja"] .h1 { text-transform: none; letter-spacing: .12em; }
.h1 span { color: var(--ink); }
.eyebrow { text-transform: none; }
.prose { margin: 36px 4px 0; font-size: 15px; line-height: 1.75; color: var(--muted); }
.prose h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: .01em; color: var(--ink); margin: 34px 0 8px; line-height: 1.2; }
.prose h3 { font-size: 15.5px; font-weight: 600; color: var(--ink); margin: 20px 0 4px; }
.prose p { margin: 0 0 10px; }
.prose b { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 6px 0 10px; }
.tbl th, .tbl td { text-align: left; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 600; color: var(--ink); }
.tbl td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.week .t small { display: block; }
@media (max-width: 420px) { .brand-en { display: none; } .brand-zh { font-size: 17px; } }

/* --- header grid (all pages) --- */
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.top-l { justify-self: start; min-width: 0; }
.top-r { justify-self: end; }
a.brand { color: var(--ink); text-decoration: none; }
a.loc { text-decoration: none; }
.loc span { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- inner pages --- */
.page { padding-top: 18px; }
.crumbs { font-size: 12.5px; color: var(--muted); margin: 18px 2px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .6; }
.page-h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 8.5vw, 50px); line-height: 1.08; margin: 6px 0 12px; letter-spacing: -.005em; }
.lede { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0 0 8px; }
.live { padding: 22px 18px; }
.live-k { margin: 0; font-size: 13.5px; letter-spacing: .04em; color: var(--muted); }
.live-k b { color: var(--ink); font-weight: 600; }
.live-v { margin: 6px 0 4px; font-family: var(--font-display); font-size: clamp(44px, 12vw, 68px); line-height: 1.05; font-variant-numeric: tabular-nums; }
.live-s { margin: 0 0 14px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.live-grid div { min-width: 0; }
.live-grid dt { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.live-grid dd { margin: 2px 0 0; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 6px 0 12px; }
.tbl caption { caption-side: bottom; text-align: left; font-size: 12px; color: var(--muted); padding-top: 8px; line-height: 1.5; }
.tbl small { color: var(--muted); font-size: 11.5px; }
.tbl th[scope="row"] { color: var(--ink); font-weight: 500; white-space: nowrap; }
.tbl td { font-variant-numeric: tabular-nums; }
.week-tbl { margin: 0; }
.week-tbl tr.today th, .week-tbl tr.today td { color: var(--accent); }
.prose ul { padding-left: 1.2em; margin: 0 0 10px; }
.prose li { margin: 4px 0; }
.more .links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.more .links li { border-top: 1px solid var(--line); }
.more .links li:first-child { border-top: 0; }
.more .links a { display: block; padding: 11px 0; color: var(--ink); text-decoration: none; font-size: 15px; }
.more .links a::after { content: "→"; float: right; color: var(--muted); }
@media (min-width: 600px) { .more .links { grid-template-columns: 1fr 1fr; column-gap: 24px; } .more .links li:nth-child(2) { border-top: 0; } }

/* --- footer --- */
.foot-ask { color: var(--ink); }
.foot-ask a, .foot a { color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-note { margin: 4px 0 8px; font-size: 12px; }
.foot-featured { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.foot-featured a { display: inline-flex; height: 28px; align-items: center; color: var(--muted); opacity: .75; }
.foot-featured a:hover { opacity: 1; }
.foot-featured img { height: 28px; width: auto; max-width: 160px; display: block; }
.linkish { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }

/* --- UV card --- */
.uv-row { display: flex; align-items: center; gap: 10px; }
.uv-v { font-size: 18px; }
.uv-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.uv-0 { background: #6fcf73; } .uv-1 { background: #f2d24b; } .uv-2 { background: #f39a3c; } .uv-3 { background: #e5484d; } .uv-4 { background: #a35bd8; }

/* --- forms --- */
.form { display: grid; gap: 14px; margin: 8px 0 18px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--ink); }
.form label small { color: var(--muted); font-size: 12px; margin-left: 6px; }
.form input, .form textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: rgba(255,255,255,.08);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none; width: 100%;
}
.form textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.form input:focus, .form textarea:focus { border-color: var(--accent); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.form-status.ok { color: var(--accent); }
.btn[disabled] { opacity: .6; cursor: default; }

/* --- consent banner --- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: 560px; margin: 0 auto; padding: 16px; border-radius: 18px;
  background: rgba(8, 14, 44, .92); color: #eef1ff; border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 16px 40px rgba(0,0,0,.35);
  font-size: 13.5px; line-height: 1.6;
}
.consent p { margin: 0 0 12px; }
.consent a { color: #fff; }
.consent .actions { margin: 0; }
.consent .btn { padding: 10px 16px; font-size: 13.5px; }
.consent .btn.ghost { color: #eef1ff; border-color: rgba(255,255,255,.25); }
.consent small { display: block; margin-top: 10px; color: rgba(238,241,255,.6); font-size: 11.5px; word-break: break-all; }

[hidden] { display: none !important; }

/* ---------- wave 1: presets, phase timeline, azimuth, calculator ---------- */
/* Phase colours validated (dataviz validate_palette, dark card #0f1a44): golden #c98424, blue #4f72d9, film magic #b35a8e. */
:root { --ph-golden: #c98424; --ph-magic: #b35a8e; --ph-blue: #4f72d9; --ph-twilight: #7a6fa6; --ph-dark: #1d2a5e; --ph-sunset: #e5484d; }
.seg-sm button { font-size: 12.5px; padding: 5px 10px; }
.tl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tl-top .h { margin: 0; }
.tl + .tl { margin-top: 22px; }
.tl .win-head { gap: 10px; }
.tl-bar { position: relative; height: 12px; border-radius: 6px; background: rgba(255,255,255,.06); }
.tl-seg { position: absolute; top: 0; height: 100%; }
.tl-seg:first-child { border-radius: 6px 0 0 6px; }
.tl-seg:nth-last-child(1 of .tl-seg) { border-radius: 0 6px 6px 0; }
.tl-seg + .tl-seg { box-shadow: inset 2px 0 0 var(--sky-0); }
.tl-seg.golden, .sw.golden { background: var(--ph-golden); }
.tl-seg.magic, .sw.magic { background: var(--ph-magic); }
.tl-seg.blue, .sw.blue { background: var(--ph-blue); }
.tl-seg.twilight, .sw.twilight { background: var(--ph-twilight); }
.tl-seg.dark, .sw.dark { background: var(--ph-dark); }
.tl-ov, .sw.blue-ov { background: repeating-linear-gradient(135deg, var(--ph-blue) 0 4px, transparent 4px 7px); }
.tl-ov { position: absolute; top: 0; height: 100%; opacity: .95; }
.tl-sun { position: absolute; top: -4px; width: 2px; height: 20px; background: var(--ph-sunset); transform: translateX(-50%); border-radius: 1px; }
.tl-bar .now { position: absolute; top: -6px; width: 3px; height: 24px; border-radius: 2px; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.9); transform: translateX(-50%); }
.tl-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.tl-legend li { display: grid; grid-template-columns: 12px auto 1fr; column-gap: 8px; align-items: baseline; }
.tl-legend small { grid-column: 2 / -1; color: var(--muted); font-size: 12px; }
.lg-n { color: var(--ink); }
.lg-t { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.tl-now { margin: 12px 0 0; font-size: 14px; color: var(--accent); line-height: 1.5; }
.tl-az, .live-az { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; color: var(--ink); }
.live-az { margin: 0 0 8px; }
.compass { flex: none; color: var(--ink); }
.tl-def { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.tl-def a { color: var(--ink); text-underline-offset: 3px; }
.sub .def { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.dd-def { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.live-preset { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.week-tbl caption { caption-side: bottom; }
/* calculator */
.calc-in { display: grid; gap: 4px; }
.calc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.calc-row:first-child { border-top: 0; padding-top: 0; }
.calc-l { font-size: 14px; color: var(--ink); display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; }
.calc-l small { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.calc-place { padding: 8px 14px; max-width: 100%; }
.calc-place span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.calc-date, .calc-num { font: inherit; font-size: 15px; color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color-scheme: dark; }
.calc-num { width: 96px; }
.calc-range { display: inline-flex; align-items: center; gap: 10px; }
.calc-range input { width: 150px; accent-color: var(--accent); }
.calc-range output { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.calc-adv { border-top: 1px solid var(--line); padding-top: 10px; }
.calc-adv summary { cursor: pointer; font-size: 14px; color: var(--ink); padding: 2px 0 6px; }
.calc-adv .calc-row:first-of-type { border-top: 0; }
.calc-out { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.calc-h { margin: 22px 0 8px; }
.calc-note { font-size: 13px; color: var(--accent); margin: 0 0 10px; line-height: 1.5; }
.calc-tbl th small, .calc-key th small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: 2px; white-space: normal; }
.calc-tbl th[scope="row"], .calc-key th[scope="row"] { white-space: normal; min-width: 150px; }
.calc-tbl td { white-space: nowrap; }
.calc-tbl td.miss { white-space: normal; color: var(--muted); }
.calc-tbl tr.hl th, .calc-tbl tr.hl td { color: var(--accent); }
.calc-key td svg { vertical-align: -4px; margin-right: 4px; }
.calc-hz p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.curve-wrap { position: relative; margin: 4px 0 6px; }
.curve { display: block; width: 100%; height: auto; touch-action: pan-y; }
.curve .band.golden { fill: var(--ph-golden); opacity: .45; }
.curve .band.blue { fill: var(--ph-blue); opacity: .5; }
.curve .gl { stroke: var(--line); stroke-width: 1; }
.curve .gl.zero { stroke: var(--muted); stroke-opacity: .6; }
.curve .ax { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.curve .alt { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.curve .ssl { stroke: var(--ph-sunset); stroke-width: 2; }
.curve .ssl-t { fill: var(--ink); font-size: 11px; font-family: var(--font-body); }
.curve .hov-l { stroke: var(--ink); stroke-opacity: .5; stroke-width: 1; }
.curve .hov-d { fill: var(--accent); stroke: var(--sky-0); stroke-width: 2; }
.curve-tip { position: absolute; top: -4px; width: 90px; text-align: center; font-size: 12px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; pointer-events: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-variant-numeric: tabular-nums; }
.curve-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 0; }
.curve-key { gap: 4px 14px; }
.sw.sunset { width: 3px; background: var(--ph-sunset); border-radius: 1px; }

/* ---------- wave 2: tabs, dawn/dusk, shoot plan, exposure ladder, sky hints, horizon profile ---------- */
.tabbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 14px 0 -4px; }
.tabs { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.tabs button { font: inherit; font-size: 14px; color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tabbar .seg { background: var(--card); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.plan .h { margin-bottom: 6px; }
.plan-share { border-top: 0; }
.plan-share .calc-range input { width: 130px; }
.plan-block { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 12px; }
.plan-block .win-head { gap: 10px; margin-bottom: 6px; }
.plan-block .win-range { color: var(--accent); text-align: right; }
.plan-line { margin: 0 0 4px; font-size: 14px; color: var(--muted); line-height: 1.5; font-variant-numeric: tabular-nums; }
.plan-use-t { color: var(--ink); }
.plan-bar { margin: 10px 0 4px; }
.plan-bar .tl-seg.magic { border-radius: 6px; opacity: .45; }
.plan-use { position: absolute; top: 0; height: 100%; background: var(--ph-magic); border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.plan-h { font-size: 13px; font-weight: 500; letter-spacing: .12em; color: var(--muted); margin: 16px 0 6px; }
.ladder-label { margin: 12px 0 6px; font-size: 12.5px; color: var(--accent); letter-spacing: .02em; }
.ladder-tbl { font-size: 13px; }
.ladder-tbl th[scope="row"] { font-variant-numeric: tabular-nums; }
.ladder-tbl td small { display: block; color: var(--muted); font-size: 11px; }
.ladder-tbl td:nth-child(4) { min-width: 8.5em; }
.ladder-tbl th, .ladder-tbl td { padding-right: 6px; }
.ladder-tbl .ladder-set { color: var(--ink); opacity: .8; font-size: 11.5px; margin-top: 2px; }
.ladder-note { margin: 0 0 6px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.ladder-tbl td:first-child { font-weight: 400; }
.base-form { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.base-form summary { cursor: pointer; font-size: 14px; color: var(--ink); padding: 2px 0 6px; }
.base-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; align-items: end; margin: 8px 0 4px; }
.base-grid label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.base-grid input, .base-grid select { font: inherit; font-size: 15px; color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; width: 100%; min-width: 0; color-scheme: dark; }
.base-clear { padding: 8px 12px; }
.shot-form { display: flex; gap: 8px; }
.shot-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.shot-form input::placeholder { color: rgba(255,255,255,.4); }
.shot-form .btn { padding: 9px 16px; }
.shots { list-style: none; margin: 8px 0 0; padding: 0; }
.shots li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.shots li:first-child { border-top: 0; }
.shots label { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.shots label span { overflow-wrap: anywhere; }
.shots input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.shots input:checked + span { color: var(--muted); text-decoration: line-through; }
.shot-del { font-size: 18px; text-decoration: none; color: var(--muted); padding: 0 4px; }
.shots-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sky-hint { display: block; font-size: 12px; color: var(--ink); margin-top: 3px; }
.sky-hint i { font-style: normal; }
.calc-text { font: inherit; font-size: 15px; color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; width: 100%; max-width: 260px; }
.calc-ladder { margin-top: 6px; }
.calc-ladder .tl-top { margin-bottom: 8px; }
/* scenes (2026-10): "good for now" line, live card on the what-to-do pages, scene cards */
.now-for { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.now-for a { color: var(--accent); text-underline-offset: 3px; }
.scene-live .scene-now { margin: 4px 0 0; font-size: 17px; line-height: 1.45; color: var(--ink); }
.scene-live .scene-best { margin: 2px 0 6px; font-size: 14px; color: var(--muted); }
.scene-live .scene-best b { color: var(--ink); font-weight: 600; }
.scene-live .scene-leave { margin: 6px 0 12px; font-size: 15px; color: var(--accent); font-weight: 600; }
.scene-live .scene-leave:empty { display: none; }
.prose .scene-cards, .scene-cards { list-style: none; margin: 8px 0 22px; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 600px) { .scene-cards { grid-template-columns: 1fr 1fr; } }
.prose .scene-cards li, .scene-cards li { margin: 0; }
.prose .scene-cards a, .scene-cards a { text-decoration: none; display: grid; gap: 4px; height: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; }
.scene-cards a b { font-size: 16px; font-weight: 600; line-height: 1.3; }
.scene-cards a span { font-size: 14px; color: var(--muted); line-height: 1.45; }
.scene-cards a small { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .8; }

/* --- live sky canvas (sky.js, 2026-10): full-bleed band above the countdown; edges fade into the page sky --- */
.sky-live {
  display: block; position: relative;
  width: 100vw; margin: 0 calc(50% - 50vw);
  height: 38vh; min-height: 200px; max-height: 460px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 88%, transparent 100%);
  pointer-events: none;
}
.hero:has(> .sky-live) { padding-top: 0; min-height: 0; justify-content: flex-start; }
.hero:has(> .sky-live) > .scene { display: none; }
.hero > .sky-live { margin-bottom: 18px; }
.page > .sky-live { margin-top: 6px; margin-bottom: -4px; }

/* --- desk mode (desk.js, 2026-10): full-screen sky + one quiet serif line --- */
.hero > .sky-live.tappable { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.desk-enter {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(clamp(200px, 38vh, 460px) - 46px);
  font: inherit; font-family: var(--font-display); font-style: italic; font-size: 15px; letter-spacing: .03em;
  color: var(--muted); background: none; border: 0; padding: 8px 12px; cursor: pointer;
}
.desk-enter:hover, .desk-enter:focus-visible { color: var(--ink); }
html.desk-on, html.desk-on body { overflow: hidden; }
.desk { position: fixed; inset: 0; z-index: 100; background: #02050f; cursor: default; -webkit-tap-highlight-color: transparent; outline: none; }
.desk-sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.desk-line {
  position: absolute; left: 0; right: 0; top: 79%; margin: 0; padding: 0 max(6vw, env(safe-area-inset-left));
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-display); font-weight: 400; font-size: clamp(12px, min(3.1vh, 4.6vw), 30px); line-height: 1.25; letter-spacing: .02em;
  color: #fff6ea; transition: opacity 8s ease;
}
.desk-hint {
  position: absolute; left: 0; right: 0; top: calc(79% + max(5vh, 34px)); margin: 0; padding: 0 6vw;
  text-align: center; font-size: 12px; letter-spacing: .04em; color: rgba(255, 246, 234, .55); transition: opacity 2.5s ease;
}
.desk-hint.gone { opacity: 0; }
@media (orientation: landscape) { .desk-line { top: 82%; } .desk-hint { top: calc(82% + max(5vh, 26px)); } }

/* ---------- location picker (picker.js, 2026-10-15) ---------- */
button.loc::after, a.loc[aria-haspopup]::after {
  content: ""; flex: none; width: 6px; height: 6px; margin: 0 1px 0 3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); opacity: .55;
}
.loc:hover { border-color: rgba(127,127,127,.45); }
.loc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.loc.pk-pulse { animation: pkPulse 1.1s ease-out; }
@keyframes pkPulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 100% { box-shadow: 0 0 0 10px transparent; } }
html.pk-lock, html.pk-lock body { overflow: hidden; }
.sheet.pk {
  display: flex; flex-direction: column; padding: 8px 0 0; overflow: hidden;
  max-height: min(88vh, 720px); max-height: min(88dvh, 720px);
  background: linear-gradient(180deg, var(--sky-0), var(--sky-1));
  border-top: 1px solid var(--line);
}
.sheet.pk[hidden] { display: none; }
.sheet.pk .sheet-handle { margin-bottom: 6px; background: var(--line); }
.pk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 16px 0 18px; }
.pk-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 1.15; letter-spacing: .01em; }
.pk-x, .pk-clr {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; cursor: pointer;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 50%;
}
.pk-clr { width: 30px; height: 30px; background: transparent; border: 0; color: var(--muted); }
.pk-x:focus-visible, .pk-clr:focus-visible, .pk-label button:focus-visible, .pk-toast button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pk-now { margin: 3px 18px 12px; font-size: 13px; color: var(--muted); }
.pk-field {
  display: flex; align-items: center; gap: 8px; margin: 0 16px; padding: 0 4px 0 13px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pk-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 200, 110, .22); }
.pk-field > svg { flex: none; opacity: .6; }
.pk-field input#search {
  flex: 1; min-width: 0; padding: 13px 0; font: inherit; font-size: 16px; color: var(--ink);
  background: transparent; border: 0; border-radius: 0; outline: none; -webkit-appearance: none; appearance: none;
}
.pk-field input#search::placeholder { color: var(--muted); opacity: 1; }
.pk-field input::-webkit-search-cancel-button { display: none; }
.pk-list { flex: 1; list-style: none; margin: 8px 0 0; padding: 0 8px 10px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pk-row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.pk-row[aria-selected="true"] { background: var(--card); }
.pk-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); }
.pk-geo .pk-ic { color: var(--accent); }
.pk-row.is-error .pk-ic { color: var(--accent); }
.pk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pk-name { font-size: 15.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-sub { margin-top: 1px; font-size: 12.5px; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-geo .pk-sub, .pk-row.is-error .pk-sub { white-space: normal; }
.pk-row.is-error .pk-sub { color: var(--ink); }
.pk-time { flex: none; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pk-cur { flex: none; display: inline-flex; color: var(--accent); }
.pk-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pk-label { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 10px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
html[lang^="zh"] .pk-label, html[lang^="ja"] .pk-label { letter-spacing: .06em; }
.pk-label button { font: inherit; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--accent); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.pk-note { padding: 14px 10px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.pk-foot { margin: 0; padding: 10px 18px calc(12px + env(safe-area-inset-bottom)); font-size: 12.5px; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--line); }
.pk-foot a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line); }
.pk-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: pkSpin .8s linear infinite; }
@keyframes pkSpin { to { transform: rotate(360deg); } }
.pk-toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 11;
  display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 32px); padding: 8px 8px 8px 16px;
  font-size: 14px; color: var(--ink); background: var(--sky-0); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0,0,0,.28); opacity: 0; pointer-events: none; transform: translate(-50%, 10px);
  transition: opacity .25s ease, transform .25s ease;
}
.pk-toast.on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.pk-toast-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-toast button { flex: none; font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; border-radius: 999px; padding: 6px 10px; cursor: pointer; }
@media (hover: hover) { .pk-row:hover { background: var(--card); } }
@media (min-width: 640px) {
  .sheet.pk {
    left: 50%; right: auto; bottom: auto; top: 76px; width: min(520px, calc(100vw - 32px));
    max-height: min(640px, calc(100vh - 110px)); transform: translateX(-50%);
    border: 1px solid var(--line); border-radius: 20px; animation: pkDrop .2s ease;
  }
  .sheet.pk .sheet-handle { display: none; }
  .pk-top { padding-top: 10px; }
  .pk-foot { padding-bottom: 12px; }
}
@keyframes pkDrop { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) {
  .loc.pk-pulse, .sheet.pk, .pk-spin { animation: none; }
  .pk-toast { transition: none; }
}
@media (max-width: 420px) {
  .top-l .loc { gap: 5px; padding: 7px 10px 7px 9px; font-size: 13.5px; }
  .top-l .loc span { max-width: 24vw; }
  button.loc::after, a.loc[aria-haspopup]::after { margin-left: 1px; }
}
