/* ==========================================================================
   天色 · TIANSE
   A quiet weather journal — visual system
   ========================================================================== */

:root {
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Hiragino Sans GB", sans-serif;
  --latin: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --mono: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;

  --ink: #e9e5dc;
  --muted: #a7adaa;
  --faint: #81898a;
  --line: rgba(233, 229, 220, 0.14);
  --line-soft: rgba(233, 229, 220, 0.075);
  --accent: #c7b39d;
  --accent-rgb: 199, 179, 157;
  --sage: #b4c0ad;
  --rust: #c7a49b;
  --card: rgba(14, 20, 24, 0.5);
  --card-strong: rgba(17, 24, 29, 0.74);

  --sky-1: #1b242a;
  --sky-2: #11181d;
  --sky-3: #090e11;
  --glow-rgb: 188, 167, 141;
  --glow2-rgb: 92, 121, 133;

  --page-x: clamp(22px, 5vw, 76px);
  --page-max: 1320px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --ease: cubic-bezier(0.2, 0.72, 0.2, 1);
}

/* Theme variables --------------------------------------------------------- */

body[data-theme="mist"] {
  --sky-1: #1b242a; --sky-2: #11181d; --sky-3: #090e11;
  --glow-rgb: 188, 167, 141; --glow2-rgb: 92, 121, 133;
  --accent: #c7b39d; --accent-rgb: 199, 179, 157;
}

body[data-theme="clear"][data-night="true"] {
  --sky-1: #08111f; --sky-2: #0a1524; --sky-3: #04070e;
  --glow-rgb: 196, 177, 144; --glow2-rgb: 64, 99, 142;
  --accent: #d8c29c; --accent-rgb: 216, 194, 156;
}

body[data-theme="clear"][data-night="false"] {
  --sky-1: #263a42; --sky-2: #172b32; --sky-3: #0e1b20;
  --glow-rgb: 214, 184, 127; --glow2-rgb: 113, 149, 151;
  --accent: #dcc38f; --accent-rgb: 220, 195, 143;
}

body[data-theme="cloud"] {
  --sky-1: #2a353c; --sky-2: #19242b; --sky-3: #0c1419;
  --glow-rgb: 163, 176, 177; --glow2-rgb: 98, 121, 133;
  --accent: #c4b7a7; --accent-rgb: 196, 183, 167;
}

body[data-theme="overcast"] {
  --sky-1: #303536; --sky-2: #1d2224; --sky-3: #111516;
  --glow-rgb: 158, 163, 160; --glow2-rgb: 101, 110, 111;
  --accent: #beb6a9; --accent-rgb: 190, 182, 169;
}

body[data-theme="rain"] {
  --sky-1: #132631; --sky-2: #0b1820; --sky-3: #061016;
  --glow-rgb: 109, 154, 173; --glow2-rgb: 55, 98, 118;
  --accent: #a9c0cb; --accent-rgb: 169, 192, 203;
}

body[data-theme="storm"] {
  --sky-1: #201a2b; --sky-2: #120e19; --sky-3: #07060b;
  --glow-rgb: 126, 106, 157; --glow2-rgb: 74, 64, 105;
  --accent: #c1add7; --accent-rgb: 193, 173, 215;
}

body[data-theme="snow"] {
  --sky-1: #303c45; --sky-2: #1b252c; --sky-3: #10171c;
  --glow-rgb: 195, 215, 220; --glow2-rgb: 115, 143, 157;
  --accent: #d5e2e5; --accent-rgb: 213, 226, 229;
}

body[data-theme="fog"] {
  --sky-1: #363c3c; --sky-2: #202626; --sky-3: #121717;
  --glow-rgb: 184, 192, 185; --glow2-rgb: 115, 126, 122;
  --accent: #c3c8c1; --accent-rgb: 195, 200, 193;
}

/* Base -------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--sky-3);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: color 0.8s var(--ease);
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

::selection {
  background: rgba(var(--accent-rgb), 0.26);
  color: var(--ink);
}

:focus-visible {
  outline: 1px solid rgba(var(--accent-rgb), 0.9);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--sky-3);
  font-size: 12px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

/* Atmosphere -------------------------------------------------------------- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--sky-3);
}

.sky {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(ellipse at 78% 8%, rgba(var(--glow-rgb), 0.24), transparent 38%),
    radial-gradient(ellipse at 12% 82%, rgba(var(--glow2-rgb), 0.16), transparent 48%),
    linear-gradient(152deg, var(--sky-1) 0%, var(--sky-2) 46%, var(--sky-3) 100%);
  transition: background 1.4s var(--ease), opacity 1.2s var(--ease);
  transform: scale(1.03);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  mix-blend-mode: screen;
  transition: background 1.6s var(--ease), opacity 1.6s var(--ease);
  will-change: transform;
}

.glow--one {
  width: 52vw;
  height: 52vw;
  top: -24vw;
  right: -6vw;
  background: radial-gradient(circle, rgba(var(--glow-rgb), 0.22), transparent 66%);
  animation: drift-slow 38s ease-in-out infinite alternate;
}

.glow--two {
  width: 48vw;
  height: 38vw;
  bottom: -20vw;
  left: -12vw;
  background: radial-gradient(circle, rgba(var(--glow2-rgb), 0.18), transparent 68%);
  animation: drift-slower 54s ease-in-out infinite alternate;
}

.cloud-bank {
  position: absolute;
  width: 78vw;
  height: 34vh;
  border-radius: 50%;
  filter: blur(52px);
  opacity: 0.34;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse at center, rgba(210, 220, 220, 0.07), transparent 68%);
  transition: opacity 1.4s var(--ease);
  will-change: transform;
}

.cloud-bank--one {
  top: 4%;
  left: -24%;
  animation: cloud-drift 64s linear infinite;
}

.cloud-bank--two {
  top: 32%;
  right: -36%;
  width: 90vw;
  opacity: 0.22;
  animation: cloud-drift-reverse 82s linear infinite;
}

.cloud-bank--three {
  bottom: 2%;
  left: 16%;
  width: 70vw;
  opacity: 0.18;
  animation: cloud-drift 96s linear infinite;
}

body[data-theme="rain"] .cloud-bank,
body[data-theme="storm"] .cloud-bank {
  opacity: 0.45;
}

body[data-theme="fog"] .cloud-bank {
  opacity: 0.6;
  filter: blur(68px);
}

body[data-theme="clear"][data-night="true"] .cloud-bank {
  opacity: 0.12;
}

#weatherCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  background-size: 190px 190px;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 6, 8, 0.34) 0%, transparent 22%, transparent 70%, rgba(3, 6, 8, 0.58) 100%),
    radial-gradient(ellipse at 50% 46%, transparent 30%, rgba(3, 6, 8, 0.32) 100%);
}

/* Page frame -------------------------------------------------------------- */

.page {
  position: relative;
  z-index: 2;
  width: min(100%, calc(var(--page-max) + var(--page-x) * 2));
  margin: 0 auto;
  padding: 0 var(--page-x);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 94px;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.2em;
  color: var(--ink);
}

.brand-en {
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--faint);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.header-sep {
  width: 22px;
  height: 1px;
  background: var(--line);
}

.header-meta time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.header-tag {
  margin-left: 9px;
  padding-left: 22px;
  border-left: 1px solid var(--line-soft);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* Shared type ------------------------------------------------------------- */

.section-kicker {
  font-family: var(--latin);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--faint);
  text-transform: uppercase;
}

.section-index {
  color: var(--accent);
  font-family: var(--latin);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--faint);
}

.eyebrow-line {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.35);
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.25s, gap 0.25s;
}

.text-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}

.text-link:hover {
  border-color: var(--accent);
}

.text-link:hover svg {
  transform: translateX(3px);
}

/* Intro / query ----------------------------------------------------------- */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.82fr);
  gap: clamp(50px, 8vw, 132px);
  align-items: center;
  min-height: calc(100svh - 94px);
  padding: clamp(56px, 8vh, 108px) 0 88px;
}

.intro-copy {
  min-width: 0;
  padding-top: 4px;
}

.intro h1 {
  margin: 24px 0 0;
  font-family: var(--serif);
  font-size: clamp(58px, 8.1vw, 112px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.055em;
  text-shadow: 0 8px 48px rgba(0, 0, 0, 0.25);
}

.intro h1 span {
  display: block;
}

.title-accent {
  margin-left: 0.42em;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -0.06em;
}

.intro-note {
  margin-top: 30px;
  max-width: 420px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 2.05;
  letter-spacing: 0.04em;
}

.intro-signature {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(34px, 6vh, 66px);
  color: var(--faint);
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.34em;
}

.signature-rule {
  width: 66px;
  height: 1px;
  background: var(--line);
}

.query-panel {
  position: relative;
  width: 100%;
  max-width: 500px;
  min-width: 0;
  justify-self: end;
  padding: 28px 30px 24px;
  border: 1px solid rgba(233, 229, 220, 0.13);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012) 65%),
    rgba(12, 18, 22, 0.34);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(26px) saturate(112%);
  -webkit-backdrop-filter: blur(26px) saturate(112%);
}

.query-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14%;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.65), transparent);
}

.query-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 19px;
  margin-bottom: 23px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.13em;
}

.query-head-en {
  margin-left: auto;
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.28em;
  color: rgba(233, 229, 220, 0.32);
}

.field-label {
  display: block;
  margin: 0 0 9px;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.city-trigger {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 9, 0.16);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.3s,
    background 0.3s,
    transform 0.3s var(--ease),
    box-shadow 0.3s;
}

.city-trigger:hover {
  border-color: rgba(var(--accent-rgb), 0.48);
  background: rgba(var(--accent-rgb), 0.055);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.06);
}

.city-trigger.is-error {
  border-color: rgba(199, 143, 133, 0.64);
  animation: shake 0.48s var(--ease);
}

.pin-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.07);
  color: var(--accent);
}

.pin-icon svg {
  width: 19px;
  height: 19px;
}

.city-trigger-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.city-trigger-label {
  overflow: hidden;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-trigger-label .sep {
  margin: 0 7px;
  color: var(--faint);
  font-weight: 300;
}

.city-trigger-hint {
  margin-top: 3px;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.07em;
}

.city-trigger-chevron {
  margin-left: auto;
  color: var(--faint);
  transition: transform 0.3s var(--ease), color 0.3s;
}

.city-trigger-chevron svg {
  width: 21px;
  height: 21px;
}

.city-trigger:hover .city-trigger-chevron {
  color: var(--accent);
  transform: translateY(2px);
}

.query-actions {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: 10px;
  margin-top: 17px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.055em;
  cursor: pointer;
  transition:
    transform 0.28s var(--ease),
    background 0.28s,
    border-color 0.28s,
    color 0.28s,
    box-shadow 0.28s,
    opacity 0.28s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.btn--primary {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.98), rgba(var(--accent-rgb), 0.82));
  color: #101619;
  box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.12);
}

.btn--primary:hover {
  box-shadow: 0 16px 42px rgba(var(--accent-rgb), 0.2);
}

.btn--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
}

.btn--ghost:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  color: var(--ink);
  background: rgba(var(--accent-rgb), 0.045);
}

.btn-arrow svg,
.locate-icon svg {
  width: 17px;
  height: 17px;
}

.btn-arrow {
  display: inline-flex;
  transition: transform 0.28s var(--ease);
}

.btn--primary:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-loader {
  display: none;
  width: 15px;
  height: 15px;
  border: 1.4px solid rgba(16, 22, 25, 0.25);
  border-top-color: #101619;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn--ghost .btn-loader {
  border-color: rgba(233, 229, 220, 0.2);
  border-top-color: var(--ink);
}

.btn.is-loading>.btn-arrow,
.btn.is-loading>.locate-icon {
  display: none;
}

.btn.is-loading .btn-loader {
  display: block;
}

.privacy {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 16px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.03em;
}

.privacy-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: rgba(233, 229, 220, 0.38);
}

.privacy strong {
  color: var(--faint);
  font-weight: 500;
}

.privacy-icon svg {
  width: 13px;
  height: 13px;
}

.field-status {
  min-height: 17px;
  margin-top: 6px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.3s, transform 0.3s, color 0.3s;
}

.field-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.field-status.is-error {
  color: #d5a29a;
}

/* Waiting state ----------------------------------------------------------- */

.waiting {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(44px, 8vw, 124px);
  align-items: center;
  padding: 88px 0 104px;
  border-top: 1px solid var(--line-soft);
}

.waiting-art {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 1.15;
  justify-self: end;
  color: var(--muted);
}

.waiting-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.waiting-ring--two {
  width: 52%;
  border-style: dashed;
  border-color: rgba(var(--accent-rgb), 0.16);
  animation: spin 90s linear infinite;
}

.waiting-cloud {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68%;
  transform: translate(-50%, -50%);
  color: rgba(233, 229, 220, 0.58);
  filter: drop-shadow(0 22px 44px rgba(0, 0, 0, 0.22));
  animation: float-soft 11s ease-in-out infinite;
}

.waiting-cloud svg {
  width: 100%;
  height: auto;
}

.waiting-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.65);
  animation: twinkle 5s ease-in-out infinite;
}

.waiting-star--one {
  top: 21%;
  right: 18%;
}

.waiting-star--two {
  top: 36%;
  left: 14%;
  width: 2px;
  height: 2px;
  animation-delay: 1.8s;
}

.waiting-star--three {
  bottom: 21%;
  right: 33%;
  width: 2px;
  height: 2px;
  animation-delay: 3.4s;
}

.waiting-copy h2 {
  margin-top: 15px;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.waiting-copy>p:not(.section-kicker) {
  margin: 17px 0 27px;
  color: var(--muted);
  font-size: 13px;
  line-height: 2.1;
  letter-spacing: 0.035em;
}

/* Result: hero ------------------------------------------------------------ */

.result {
  padding: 82px 0 0;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 26px;
  animation: fade-up 0.8s var(--ease) both;
}

.fallback-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 30px;
  padding: 13px 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.23);
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.055);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
}

.fallback-note strong {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(310px, 0.72fr);
  gap: clamp(40px, 6.2vw, 96px);
  align-items: stretch;
  padding: 0 0 54px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-top .section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-top .section-kicker::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--accent);
  opacity: 0.55;
}

.hero-date {
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--faint);
}

.hero-location {
  margin: 23px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 400;
  letter-spacing: 0.055em;
}

.hero-location .district {
  margin-left: 7px;
  color: var(--accent);
}

.hero-location .fallback-tag {
  display: inline-block;
  margin-left: 12px;
  padding: 2px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 4px;
  vertical-align: 2px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

.hero-visual {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 30px);
  margin: 4px 0 0 -10px;
}

.hero-icon {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: clamp(128px, 14vw, 178px);
  height: clamp(128px, 14vw, 178px);
  border-radius: 50%;
  color: var(--accent);
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.02) 62%, transparent 70%);
  box-shadow:
    inset 0 0 48px rgba(var(--accent-rgb), 0.07),
    0 0 100px rgba(var(--accent-rgb), 0.06);
}

.hero-icon::before {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  border-radius: 50%;
}

.hero-icon::after {
  content: "";
  position: absolute;
  top: 12%;
  right: 18%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.8);
  opacity: 0.7;
}

.hero-icon .wi {
  position: relative;
  z-index: 1;
  width: 56%;
  height: 56%;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.2));
}

.hero-temp {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  min-width: 0;
}

.temp-now {
  font-family: var(--latin);
  font-size: clamp(82px, 10.5vw, 152px);
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: -0.075em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.temp-unit {
  margin-left: 5px;
  color: var(--accent);
  font-family: var(--latin);
  font-size: clamp(19px, 2.3vw, 30px);
  letter-spacing: 0;
}

.temp-range {
  flex-basis: 100%;
  margin-top: 21px;
  color: var(--muted);
  font-family: var(--latin);
  font-size: 13px;
  letter-spacing: 0.15em;
  font-variant-numeric: tabular-nums;
}

.temp-range .range-sep {
  margin: 0 8px;
  color: var(--faint);
}

.hero-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.hero-summary::before {
  content: "";
  width: 35px;
  height: 1px;
  background: rgba(var(--accent-rgb), 0.55);
}

.hero-summary small {
  color: var(--faint);
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
}

.hero-poem {
  max-width: 470px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.05em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 23px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.meta-item strong {
  color: var(--ink);
  font-weight: 400;
}

/* Overview card ----------------------------------------------------------- */

.overview-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  padding: 26px 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.012) 70%),
    rgba(11, 17, 21, 0.34);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.overview-card::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -80px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.14), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.overview-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.overview-top .section-kicker {
  letter-spacing: 0.22em;
}

.overview-no {
  color: rgba(233, 229, 220, 0.26);
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.overview-weather {
  position: relative;
  margin-top: 30px;
}

.overview-weather>span {
  display: block;
  margin-bottom: 7px;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.overview-weather strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.overview-temp {
  position: relative;
  margin-top: 13px;
  color: var(--accent);
  font-family: var(--latin);
  font-size: 34px;
  letter-spacing: 0.015em;
  font-variant-numeric: tabular-nums;
}

.overview-temp .deg {
  margin-left: 2px;
  font-size: 15px;
}

.overview-temp .tilde {
  margin: 0 10px;
  color: rgba(var(--accent-rgb), 0.45);
  font-size: 20px;
}

.overview-rule {
  height: 1px;
  margin: 23px 0 17px;
  background: var(--line-soft);
}

.overview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 12px;
}

.overview-stats dt {
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.overview-stats dd {
  color: var(--ink);
  font-size: 12.5px;
  letter-spacing: 0.03em;
}

.overview-stats dd small {
  margin-left: 3px;
  color: var(--faint);
  font-size: 9px;
}

.overview-sun {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 21px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--latin);
  font-size: 9.5px;
  letter-spacing: 0.11em;
}

.overview-sun span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.overview-sun svg {
  width: 13px;
  height: 13px;
  color: rgba(var(--accent-rgb), 0.7);
}

/* Umbrella banner --------------------------------------------------------- */

.umbrella-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 48px;
  padding: 23px 27px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: var(--radius-md);
  background:
    linear-gradient(105deg, rgba(var(--accent-rgb), 0.09), rgba(var(--accent-rgb), 0.018) 62%),
    rgba(10, 16, 20, 0.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.umbrella-banner::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  opacity: 0.65;
}

.umbrella-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 49px;
  height: 49px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
}

.umbrella-icon svg {
  width: 24px;
  height: 24px;
}

.umbrella-copy .section-kicker {
  font-size: 8.5px;
  letter-spacing: 0.22em;
}

.umbrella-copy h3 {
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.035em;
}

.umbrella-copy p {
  margin-top: 5px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.65;
}

.umbrella-status {
  text-align: right;
}

.umbrella-badge {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 999px;
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.umbrella-chance {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--latin);
  font-size: 25px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.umbrella-chance small {
  margin-left: 3px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.1em;
}

/* Hourly ------------------------------------------------------------------ */

.hourly-panel {
  margin-bottom: 48px;
  padding: 28px 0 29px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.hourly-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.hourly-title h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(25px, 2.8vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hourly-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.hourly-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

.hourly-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
}

.hourly-track {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.25) transparent;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}

.hourly-track::-webkit-scrollbar {
  height: 3px;
}

.hourly-track::-webkit-scrollbar-track {
  background: transparent;
}

.hourly-track::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.22);
}

.timeline-nav {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}

.timeline-nav:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--accent);
}

.timeline-nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.timeline-nav svg {
  width: 14px;
  height: 14px;
}

.hour {
  position: relative;
  display: flex;
  flex: 0 0 84px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 84px;
  padding: 13px 5px 11px;
  border-radius: 12px;
  transition: background 0.35s, opacity 0.35s, transform 0.35s var(--ease);
}

.hour + .hour {
  border-left: 1px solid rgba(233, 229, 220, 0.045);
}

.hour.is-past {
  opacity: 0.48;
}

.hour.is-now {
  border-left-color: transparent;
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.19);
  transform: translateY(-2px);
}

.hour-time {
  color: var(--faint);
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.hour.is-now .hour-time {
  color: var(--accent);
}

.now-tag {
  height: 10px;
  color: var(--accent);
  font-size: 7px;
  line-height: 10px;
  letter-spacing: 0.16em;
  opacity: 0;
}

.hour.is-now .now-tag {
  opacity: 1;
}

.hour-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: var(--muted);
}

.hour.is-now .hour-icon {
  color: var(--accent);
}

.hour-icon .wi {
  width: 33px;
  height: 33px;
}

.hour-temp {
  color: var(--ink);
  font-family: var(--latin);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.hour-rain {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--faint);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.hour-rain svg {
  width: 8px;
  height: 8px;
  color: rgba(169, 192, 203, 0.72);
}

.hour.is-now .hour-rain {
  color: var(--accent);
}

.hourly-note {
  display: none;
  margin-top: 11px;
  color: rgba(233, 229, 220, 0.3);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-align: right;
}

/* Cards ------------------------------------------------------------------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 50px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 25px 26px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.008) 68%),
    var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color 0.35s, transform 0.35s var(--ease), background 0.35s;
}

.card:hover {
  border-color: rgba(var(--accent-rgb), 0.2);
  transform: translateY(-2px);
}

.card--activity {
  grid-column: span 7;
}

.card--clothing {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
}

.card--travel {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
}

.card--care {
  grid-column: span 7;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.card-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.05);
  color: var(--accent);
}

.card-icon svg {
  width: 16px;
  height: 16px;
}

.card-head h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.09em;
}

.card-index {
  margin-left: auto;
  color: rgba(233, 229, 220, 0.25);
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 22px;
}

.suggestion-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.suggestion-label {
  display: inline-flex;
  flex: 0 0 64px;
  align-items: center;
  gap: 6px;
  padding-top: 5px;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.suggestion-label::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.suggestion-label--good {
  color: var(--sage);
}

.suggestion-label--bad {
  color: var(--rust);
  opacity: 0.82;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.tag--good {
  border-color: rgba(180, 192, 173, 0.18);
  color: rgba(196, 207, 190, 0.9);
  background: rgba(180, 192, 173, 0.035);
}

.tag--bad {
  border-color: rgba(199, 164, 155, 0.16);
  color: rgba(204, 174, 166, 0.82);
  background: rgba(199, 164, 155, 0.03);
}

.card-copy {
  margin-top: 22px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.045em;
}

.card .tags {
  margin-top: 18px;
  gap: 7px;
}

.card--clothing .tags {
  margin-top: auto;
  padding-top: 20px;
}

.card-foot {
  margin-top: 21px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.travel-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.travel-extra span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.travel-extra svg {
  width: 12px;
  height: 12px;
  color: rgba(var(--accent-rgb), 0.7);
}

/* Care card --------------------------------------------------------------- */

.card--care {
  display: flex;
  flex-direction: column;
  padding: 27px 30px 24px;
  border-color: rgba(var(--accent-rgb), 0.18);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(var(--accent-rgb), 0.1), transparent 47%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008) 68%),
    rgba(12, 18, 22, 0.5);
}

.care-quote {
  position: absolute;
  top: -19px;
  right: 17px;
  color: rgba(var(--accent-rgb), 0.1);
  font-family: var(--latin);
  font-size: 150px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.card--care h3 {
  position: relative;
  margin-top: 15px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.5vw, 29px);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.care-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 19px;
}

.care-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.035em;
}

.care-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 23px;
  height: 1px;
  margin-top: 13px;
  background: rgba(var(--accent-rgb), 0.55);
}

.care-signature {
  margin-top: auto;
  padding-top: 19px;
  color: var(--faint);
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-align: right;
}

/* Result footer ----------------------------------------------------------- */

.result-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 22px 0 52px;
  border-top: 1px solid var(--line-soft);
}

.result-footer p {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.9;
  letter-spacing: 0.045em;
}

.result-footer .updated {
  color: var(--muted);
}

.result-footer time {
  font-variant-numeric: tabular-nums;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.model-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.model-tag::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

/* States ------------------------------------------------------------------ */

.state-view {
  display: grid;
  min-height: 54vh;
  place-items: center;
  padding: 60px 0 100px;
  text-align: center;
}

.state-inner {
  max-width: 510px;
}

.state-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 27px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 50%;
  color: var(--accent);
}

.state-orbit::before,
.state-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  border-radius: 50%;
}

.state-orbit::before {
  inset: -12px;
  border-style: dashed;
  animation: spin 38s linear infinite;
}

.state-orbit::after {
  inset: 10px;
}

.state-orbit svg {
  width: 33px;
  height: 33px;
}

.state-orbit .wi {
  width: 42px;
  height: 42px;
}

.state-view h2 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.state-view p {
  margin-top: 10px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.9;
  letter-spacing: 0.04em;
}

.state-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.state-actions .btn {
  min-height: 42px;
  padding: 0 19px;
  font-size: 12px;
}

.loading-dots {
  display: inline-flex;
  gap: 5px;
  margin-left: 2px;
}

.loading-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.4s infinite ease-in-out;
}

.loading-dots i:nth-child(2) {
  animation-delay: 0.18s;
}

.loading-dots i:nth-child(3) {
  animation-delay: 0.36s;
}

/* Modal ------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}

.modal.is-open {
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 8, 0.62);
  backdrop-filter: blur(15px) saturate(88%);
  -webkit-backdrop-filter: blur(15px) saturate(88%);
}

.modal-panel {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  padding: 30px 32px 27px;
  border: 1px solid rgba(233, 229, 220, 0.13);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(var(--accent-rgb), 0.09), transparent 40%),
    linear-gradient(155deg, #1a2227, #11171b 70%);
  box-shadow: 0 42px 110px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(17px) scale(0.982);
  transition: transform 0.36s var(--ease);
  scrollbar-width: thin;
}

.modal.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-head h2 {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 37px);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s, transform 0.25s;
}

.icon-button:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--accent);
  transform: rotate(90deg);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.modal-desc {
  margin: 10px 0 20px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.09em;
}

.wheel-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 10px 8px;
  color: rgba(233, 229, 220, 0.34);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-align: center;
}

.picker-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: rgba(2, 6, 9, 0.2);
}

.wheel-frame {
  position: relative;
  height: 264px;
  overflow: hidden;
  border-right: 1px solid var(--line-soft);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.wheel-frame:last-child {
  border-right: 0;
}

.wheel {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-block: 110px;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.wheel::-webkit-scrollbar {
  display: none;
}

.wheel:focus-visible {
  outline: 1px solid rgba(var(--accent-rgb), 0.5);
  outline-offset: -4px;
}

.wheel-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 6px;
  overflow: hidden;
  color: var(--faint);
  font-size: 14px;
  letter-spacing: 0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
  scroll-snap-align: center;
  opacity: 0.52;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s, color 0.2s, transform 0.2s var(--ease);
}

.wheel-item:hover {
  opacity: 0.78;
  color: var(--muted);
}

.wheel-item.is-active {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  opacity: 1;
  transform: scale(1.025);
}

.wheel-band {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 44px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.38);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.38);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.025), rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.025));
  transform: translateY(-22px);
  pointer-events: none;
}

.picker-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(2, 6, 9, 0.12);
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.picker-preview-label {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.12em;
}

#pickerPreview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn {
  min-width: 124px;
  min-height: 46px;
}

/* Toast ------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 220;
  max-width: min(90vw, 520px);
  padding: 11px 17px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 10px;
  background: rgba(18, 25, 30, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font-size: 11.5px;
  letter-spacing: 0.035em;
  line-height: 1.6;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
  backdrop-filter: blur(12px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.13em;
}

.footer-mark {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
}

.site-footer p {
  margin-left: auto;
  margin-right: auto;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.footer-year {
  white-space: nowrap;
}

.install-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.install-app[hidden] {
  display: none !important;
}

.install-app:hover {
  border-color: rgba(var(--accent-rgb), 0.58);
  background: rgba(var(--accent-rgb), 0.12);
  transform: translateY(-1px);
}

.install-app svg {
  width: 13px;
  height: 13px;
}

/* Weather icon motion ----------------------------------------------------- */

.wi {
  overflow: visible;
}

.wi-rays {
  transform-origin: 32px 32px;
  animation: spin 74s linear infinite;
}

.wi-sun--small .wi-rays {
  transform-origin: 24px 23px;
  animation-duration: 58s;
}

.wi-cloud-shape,
.wi-cloud-back {
  animation: float-cloud 9s ease-in-out infinite;
}

.wi-cloud-back {
  opacity: 0.46;
  animation-delay: -3s;
}

.hero-icon .wi-cloud-shape,
.hero-icon .wi-cloud-back {
  animation-duration: 11s;
}

.wi-drops path,
.wi-heavy path,
.wi-showers path,
.wi-drizzle path {
  animation: rain-drop 2.5s linear infinite;
}

.wi-drops path:nth-child(2),
.wi-heavy path:nth-child(2),
.wi-showers path:nth-child(2),
.wi-drizzle path:nth-child(2) {
  animation-delay: 0.55s;
}

.wi-drops path:nth-child(3),
.wi-heavy path:nth-child(3),
.wi-showers path:nth-child(3),
.wi-drizzle path:nth-child(3) {
  animation-delay: 1.1s;
}

.wi-heavy path:nth-child(4),
.wi-showers path:nth-child(5) {
  animation-delay: 1.55s;
}

.wi-showers path:nth-child(4),
.wi-showers path:nth-child(6) {
  animation-delay: 0.85s;
}

.wi-flakes {
  transform-origin: 32px 55px;
  animation: snow-sway 8s ease-in-out infinite;
}

.wi-bolt {
  animation: bolt-glow 7s ease-in-out infinite;
}

.wi-fog-lines path {
  animation: fog-slide 7s ease-in-out infinite;
}

.wi-fog-lines path:nth-child(2) {
  animation-delay: -2.2s;
}

.wi-fog-lines path:nth-child(3) {
  animation-delay: -4.4s;
}

.hour .wi-rays,
.hour .wi-cloud-shape,
.hour .wi-cloud-back,
.hour .wi-drops path,
.hour .wi-flakes,
.hour .wi-bolt {
  animation-duration: 12s;
}

/* Reveal & keyframes ------------------------------------------------------ */

.reveal {
  animation: fade-up 1s var(--ease) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(17px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift-slow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-5vw, 3vh, 0) scale(1.08);
  }
}

@keyframes drift-slower {
  from {
    transform: translate3d(0, 0, 0) scale(1.04);
  }

  to {
    transform: translate3d(5vw, -4vh, 0) scale(0.97);
  }
}

@keyframes cloud-drift {
  from {
    transform: translate3d(-5%, 0, 0);
  }

  to {
    transform: translate3d(16%, 2%, 0);
  }
}

@keyframes cloud-drift-reverse {
  from {
    transform: translate3d(8%, 0, 0);
  }

  to {
    transform: translate3d(-14%, -3%, 0);
  }
}

@keyframes float-soft {

  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-8px);
  }
}

@keyframes float-cloud {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-1.2px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rain-drop {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 0.75;
  }

  100% {
    opacity: 0;
    transform: translateY(5px);
  }
}

@keyframes snow-sway {

  0%,
  100% {
    transform: rotate(-2deg) translateY(0);
  }

  50% {
    transform: rotate(2deg) translateY(1px);
  }
}

@keyframes bolt-glow {

  0%,
  84%,
  100% {
    opacity: 0.4;
  }

  87% {
    opacity: 1;
  }

  90% {
    opacity: 0.25;
  }

  93% {
    opacity: 0.9;
  }
}

@keyframes fog-slide {

  0%,
  100% {
    transform: translateX(-1px);
    opacity: 0.55;
  }

  50% {
    transform: translateX(3px);
    opacity: 0.9;
  }
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

@keyframes blink {

  0%,
  80%,
  100% {
    opacity: 0.2;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-4px);
  }

  40% {
    transform: translateX(4px);
  }

  60% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(2px);
  }
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1100px) {
  .intro {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.88fr);
    gap: 48px;
  }

  .intro h1 {
    font-size: clamp(58px, 8.8vw, 92px);
  }

  .result-hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
    gap: 44px;
  }

  .hero-meta {
    gap: 10px 17px;
  }
}

@media (max-width: 920px) {
  .header-tag {
    display: none;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 45px;
    min-height: 0;
    padding: 58px 0 72px;
  }

  .intro h1 {
    font-size: clamp(60px, 12vw, 96px);
  }

  .intro-note {
    max-width: 480px;
  }

  .intro-signature {
    margin-top: 35px;
  }

  .query-panel {
    max-width: none;
    justify-self: stretch;
  }

  .waiting {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 60px 0 76px;
  }

  .waiting-art {
    justify-self: center;
    width: min(78%, 320px);
  }

  .waiting-copy {
    text-align: center;
  }

  .waiting-copy .text-link {
    margin: 0 auto;
  }

  .desktop-only {
    display: none;
  }

  .result-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .overview-card {
    min-height: 0;
  }

  .overview-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .overview-sun {
    margin-top: 20px;
  }

  .card--activity,
  .card--clothing,
  .card--travel,
  .card--care {
    grid-column: span 6;
  }

  .card--activity,
  .card--care {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  :root {
    --page-x: 18px;
  }

  body {
    font-size: 13px;
  }

  .site-header {
    min-height: 76px;
  }

  .brand-en {
    display: none;
  }

  .header-meta {
    gap: 8px;
    font-size: 9.5px;
    letter-spacing: 0.09em;
  }

  .header-sep {
    width: 12px;
  }

  .intro {
    padding: 39px 0 54px;
  }

  .intro h1 {
    margin-top: 20px;
    font-size: clamp(47px, 15vw, 68px);
    letter-spacing: -0.06em;
  }

  .title-accent {
    margin-left: 0;
  }

  .intro-note {
    margin-top: 22px;
    font-size: 12px;
    line-height: 2;
  }

  .intro-signature {
    margin-top: 26px;
  }

  .query-panel {
    padding: 22px 19px 18px;
    border-radius: 20px;
  }

  .query-head {
    padding-bottom: 15px;
    margin-bottom: 18px;
  }

  .city-trigger {
    padding: 12px;
  }

  .city-trigger-label {
    font-size: 14px;
  }

  .query-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 13px;
  }

  .btn {
    min-height: 47px;
  }

  .privacy {
    margin-top: 13px;
  }

  .waiting {
    padding: 46px 0 60px;
  }

  .waiting-art {
    width: min(82%, 280px);
  }

  .waiting-copy h2 {
    font-size: 34px;
  }

  .result {
    padding-top: 51px;
  }

  .result-hero {
    padding-bottom: 35px;
  }

  .hero-top {
    align-items: flex-start;
  }

  .hero-date {
    padding-top: 4px;
    font-size: 9px;
  }

  .hero-location {
    margin-top: 18px;
    font-size: 18px;
  }

  .hero-visual {
    margin-top: 4px;
  }

  .hero-icon {
    width: 108px;
    height: 108px;
  }

  .temp-now {
    font-size: clamp(72px, 21vw, 104px);
  }

  .temp-unit {
    font-size: 18px;
  }

  .temp-range {
    margin-top: 14px;
    font-size: 11px;
  }

  .hero-summary {
    margin-top: 15px;
    font-size: 27px;
  }

  .hero-summary small {
    display: none;
  }

  .hero-poem {
    margin-top: 11px;
    font-size: 12px;
  }

  .hero-meta {
    margin-top: 22px;
    padding-top: 16px;
    gap: 9px 15px;
  }

  .meta-item {
    font-size: 9.5px;
  }

  .overview-card {
    padding: 21px 21px 19px;
  }

  .overview-weather {
    margin-top: 22px;
  }

  .overview-weather strong {
    font-size: 25px;
  }

  .overview-temp {
    font-size: 29px;
  }

  .overview-stats {
    grid-template-columns: 1fr 1fr;
  }

  .umbrella-banner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
    margin-bottom: 34px;
  }

  .umbrella-icon {
    width: 41px;
    height: 41px;
  }

  .umbrella-icon svg {
    width: 20px;
    height: 20px;
  }

  .umbrella-copy h3 {
    font-size: 16px;
  }

  .umbrella-status {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
    text-align: left;
  }

  .umbrella-chance {
    margin-top: 0;
    font-size: 21px;
  }

  .hourly-panel {
    margin-bottom: 34px;
    padding: 22px 0;
  }

  .hourly-head {
    display: block;
    margin-bottom: 15px;
  }

  .hourly-title h2 {
    font-size: 26px;
  }

  .hourly-meta {
    margin-top: 8px;
    font-size: 9px;
  }

  .hourly-shell {
    margin: 0 -18px;
    padding: 0 18px;
  }

  .timeline-nav {
    display: none;
  }

  .hour {
    flex-basis: 76px;
    min-width: 76px;
  }

  .hourly-note {
    display: block;
  }

  .cards-grid {
    gap: 12px;
    margin-bottom: 34px;
  }

  .card--activity,
  .card--clothing,
  .card--travel,
  .card--care {
    grid-column: span 12;
  }

  .card {
    padding: 20px 19px;
  }

  .card-copy {
    margin-top: 17px;
    font-size: 16px;
  }

  .card--care {
    padding: 21px 19px;
  }

  .care-list li {
    font-size: 14px;
  }

  .result-footer {
    display: block;
    padding: 18px 0 38px;
  }

  .footer-actions {
    justify-content: space-between;
    margin-top: 15px;
  }

  .state-view {
    min-height: 47vh;
    padding: 43px 0 67px;
  }

  .modal {
    padding: 10px;
  }

  .modal-panel {
    max-height: calc(100svh - 20px);
    padding: 22px 16px 18px;
    border-radius: 21px;
  }

  .modal-head h2 {
    font-size: 29px;
  }

  .modal-desc {
    margin-bottom: 14px;
  }

  .wheel-labels {
    gap: 4px;
    padding-inline: 4px;
  }

  .wheel-frame {
    height: 220px;
  }

  .wheel {
    padding-block: 88px;
  }

  .wheel-item {
    height: 44px;
    padding: 0 4px;
    font-size: 12px;
  }

  .wheel-item.is-active {
    font-size: 12.5px;
  }

  .wheel-band {
    height: 44px;
    transform: translateY(-22px);
  }

  .picker-preview {
    margin-top: 12px;
    font-size: 10.5px;
  }

  .modal-actions {
    margin-top: 15px;
  }

  .modal-actions .btn {
    min-width: 0;
    flex: 1;
  }

  .site-footer {
    min-height: 78px;
    gap: 12px;
  }

  .site-footer p {
    display: none;
  }

  .install-app {
    padding: 5px 9px;
    font-size: 8.5px;
  }
}

@media (max-width: 430px) {
  .header-date,
  .header-sep {
    display: none;
  }

  .header-meta {
    font-size: 10px;
  }

  .query-head-en {
    display: none;
  }

  .intro h1 {
    font-size: clamp(44px, 15.5vw, 60px);
  }

  .hero-icon {
    width: 91px;
    height: 91px;
  }

  .hero-visual {
    gap: 4px;
  }

  .temp-now {
    font-size: 68px;
  }

  .temp-range {
    letter-spacing: 0.08em;
  }

  .hero-summary {
    font-size: 24px;
  }

  .hero-location .fallback-tag {
    display: none;
  }

  .hourly-shell {
    margin: 0 -18px;
    padding: 0 18px;
  }

  .hour {
    flex-basis: 72px;
    min-width: 72px;
  }

  .wheel-item {
    font-size: 11px;
  }

  .wheel-item.is-active {
    font-size: 11.5px;
  }

  .modal-actions .btn {
    font-size: 12px;
  }

  .footer-actions {
    gap: 10px;
  }

  .model-tag {
    font-size: 7.5px;
  }
}

@media (max-width: 360px) {
  .eyebrow {
    gap: 9px;
    font-size: 8.5px;
    letter-spacing: 0.18em;
  }

  .eyebrow-line {
    width: 26px;
  }

  .intro h1 {
    font-size: 43px;
  }

  .temp-now {
    font-size: 61px;
  }

  .hero-icon {
    width: 82px;
    height: 82px;
  }

  .hour {
    flex-basis: 68px;
    min-width: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Printable / no-JS ------------------------------------------------------- */

.noscript-note {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 300;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #141b1f;
  color: var(--ink);
  font-size: 12px;
  text-align: center;
}

@media print {
  .atmosphere,
  .site-header,
  .query-panel,
  .site-footer,
  .modal,
  .toast {
    display: none !important;
  }

  body {
    background: white;
    color: #111;
  }

  .result {
    border: 0;
  }
}
