/* ---------- self-hosted display font ---------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/sg-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/sg-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f7f9fc;
  --ink: #0c0f14;
  --muted: #5c6673;
  --faint: #707b8b;
  --hairline: rgba(12, 15, 20, 0.08);
  --card: rgba(255, 255, 255, 0.66);
  --blue: #8ab4ff;
  --mint: #9be8dc;
  --violet: #c9b8ff;
  --mono: "Space Grotesk", ui-monospace, "SF Mono", Consolas, monospace;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --title-grad: linear-gradient(165deg, #10141c 20%, #3c4a63 75%, #6b5a8f 115%);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --surface-strong: #0c0f14;
  --on-strong: #ffffff;
  --track: rgba(12, 15, 20, 0.07);
  --border-strong: rgba(12, 15, 20, 0.28);
}

:root[data-theme="dark"] {
  --bg: #0b0e14;
  --ink: #e8edf4;
  --muted: #9aa6b6;
  --faint: #919caf;
  --hairline: rgba(232, 237, 244, 0.1);
  --card: rgba(21, 27, 39, 0.55);
  --glass: rgba(21, 27, 39, 0.5);
  --glass-strong: rgba(26, 33, 47, 0.82);
  --surface-strong: #e8edf4;
  --on-strong: #0c1017;
  --track: rgba(232, 237, 244, 0.14);
  --border-strong: rgba(232, 237, 244, 0.3);
  --blue: #6f9dff;
  --mint: #7fd8c8;
  --violet: #b3a1f5;
  --title-grad: linear-gradient(165deg, #f4f8ff 20%, #b9c8e2 75%, #a598d6 115%);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(1000px 640px at 78% -8%, rgba(111, 157, 255, 0.12), transparent 60%),
    radial-gradient(760px 520px at -8% 86%, rgba(179, 161, 245, 0.1), transparent 58%),
    linear-gradient(180deg, #0b0e14, #0d1119 55%, #090c12);
}
:root[data-theme="dark"] .aurora { opacity: 0.32; }
:root[data-theme="dark"] .settings-modal { background: rgba(17, 22, 33, 0.96); }
:root[data-theme="dark"] .settings-modal::backdrop { background: rgba(3, 6, 10, 0.55); }

/* ---------- aurora mood palettes ---------- */
:root[data-aurora="sunset"] {
  --blue: #ff9478;
  --mint: #ffc285;
  --violet: #f282ad;
}
:root[data-aurora="forest"] {
  --blue: #56c28f;
  --mint: #86e4ab;
  --violet: #48b5ad;
}
:root[data-aurora="nebula"] {
  --blue: #38d6ff;
  --mint: #6b99ff;
  --violet: #9e6eff;
}

:root[data-theme="dark"][data-aurora="sunset"] {
  --blue: #ff8b6e;
  --mint: #fba96b;
  --violet: #e8729f;
}
:root[data-theme="dark"][data-aurora="forest"] {
  --blue: #4cb885;
  --mint: #7cd9a1;
  --violet: #42a9a1;
}
:root[data-theme="dark"][data-aurora="nebula"] {
  --blue: #30cdff;
  --mint: #5e8eff;
  --violet: #9360f5;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::after { opacity: 0.05; }

::selection { background: rgba(138, 180, 255, 0.35); }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid rgba(12, 15, 20, 0.4); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }

/* ---------- aurora ---------- */
.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.6;
}
.aurora i {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.aurora .a1 {
  left: 8%;
  top: -18%;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle at 35% 40%, var(--blue), transparent 62%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora .a2 {
  right: -14%;
  top: 6%;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle at 55% 45%, var(--mint), transparent 60%);
  animation: drift2 31s ease-in-out infinite alternate;
}
.aurora .a3 {
  left: 30%;
  bottom: -34%;
  width: 56vw;
  height: 50vw;
  background: radial-gradient(circle at 50% 50%, var(--violet), transparent 62%);
  animation: drift3 36s ease-in-out infinite alternate;
}
@keyframes drift1 {
  to { transform: translate(9vw, 7vh) scale(1.12); }
}
@keyframes drift2 {
  to { transform: translate(-8vw, 10vh) scale(0.94); }
}
@keyframes drift3 {
  to { transform: translate(6vw, -9vh) scale(1.08); }
}

/* ---------- page ---------- */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--on-strong);
  font: 600 12px var(--mono);
  letter-spacing: 0.04em;
}
.brand-name { font: 600 15px var(--mono); letter-spacing: 0.06em; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-clock { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass);
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.15s;
}
.nav-link:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 18px rgba(20, 40, 80, 0.1);
  transform: translateY(-1px);
}

/* ---------- hero ---------- */
.hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vh 0 5vh;
}
.eyebrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 24px;
  color: var(--muted);
  font: 500 12px var(--mono);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  animation: rise 0.7s ease both;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}
.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 18em;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 104px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: 0.045em;
  color: var(--ink);
  animation: rise 0.7s ease 0.08s both;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 {
    background: var(--title-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.sub {
  position: relative;
  z-index: 1;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 2.1;
  letter-spacing: 0.04em;
  animation: rise 0.7s ease 0.16s both;
}

.orbit {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 56px;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(20, 40, 80, 0.09), var(--inset-hi);
}
.pill .mono { font-size: 14.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pill small { color: var(--muted); font-size: 12px; }
.pill-strong { font-weight: 600; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.75;
  animation: breathe 2.6s ease-in-out infinite;
}
.dot.green { background: #2fae6e; opacity: 1; }
@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

.scroll-cue {
  margin: 42px 0 0;
  color: var(--faint);
  font: 500 10px var(--mono);
  letter-spacing: 0.34em;
  animation: cueFloat 2.4s ease-in-out infinite;
}
@keyframes cueFloat {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* ---------- sections ---------- */
.section { padding: 26px 0; }
.section:last-of-type { padding-bottom: 44px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.section-head .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font: 600 10.5px var(--mono);
  letter-spacing: 0.3em;
}
.section-head .kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}
.section-head h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: 0.01em; }
.section-head p { margin: 0; color: var(--faint); font-size: 12.5px; }

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------- cards ---------- */
.card {
  padding: 24px 26px;
  border-radius: 20px;
  border: 1px solid var(--hairline);
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: var(--inset-hi);
}
.card-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--faint);
  font: 600 10px var(--mono);
  letter-spacing: 0.28em;
}
.big {
  display: block;
  font-size: clamp(34px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.big i { font-style: normal; font-size: 0.5em; color: var(--muted); margin-left: 3px; }
.card > p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.thin-bar {
  position: relative;
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--track);
  overflow: hidden;
}
.thin-bar i {
  position: absolute;
  inset: 0;
  right: auto;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.now-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.world-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 4px;
}
.world-rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.world-rows span { color: var(--muted); font-size: 12.5px; }
.world-rows b { font: 500 13.5px var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- moments ---------- */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card-aqi-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  font: 600 9.5px var(--mono);
  letter-spacing: 0.04em;
  margin-left: 6px;
  vertical-align: middle;
}
.card-aqi-chip[hidden] { display: none; }

.countdown-name {
  display: block;
  margin: 2px 0 10px;
  font-size: 16px;
  font-weight: 500;
}
.add-countdown-card {
  border-style: dashed;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  background: var(--glass);
}
.add-countdown-card:hover {
  border-style: solid;
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(20, 40, 80, 0.1);
}
.countdown .days {
  display: block;
  font: 600 clamp(38px, 4vw, 52px)/1.05 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.countdown .days i { font-style: normal; font-size: 0.42em; color: var(--muted); margin-left: 5px; font-family: var(--sans); font-weight: 500; }
.countdown p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.countdown p .mono { color: var(--faint); font-size: 12px; }

.quote-card {
  margin-top: 16px;
  text-align: center;
  padding: 38px 30px 34px;
}
.quote-card {
  position: relative;
  padding: 46px 42px 36px;
  box-shadow: var(--inset-hi);
}
.quote-mark {
  position: absolute;
  top: -14px;
  left: 24px;
  font: 700 120px/1 var(--serif);
  color: rgba(12, 15, 20, 0.06);
  pointer-events: none;
  user-select: none;
}
:root[data-theme="dark"] .quote-mark { color: rgba(232, 237, 244, 0.07); }
.quote-card blockquote {
  margin: 4px auto 0;
  max-width: 30em;
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  line-height: 2;
  letter-spacing: 0.06em;
  min-height: 2em;
}
.quote-char {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(0.5em);
  filter: blur(6px);
  animation: charIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.quote-char.mark { color: var(--faint); font-size: 1.2em; }
@keyframes charIn {
  to { opacity: 1; transform: none; filter: blur(0); }
}
.quote-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass);
  color: var(--muted);
  font: 500 12px var(--mono);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.2s, border-color 0.15s, color 0.15s;
}
.quote-refresh:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(20, 40, 80, 0.12);
}
.quote-refresh span { transition: transform 0.2s; }
.quote-refresh:hover span { transform: translateX(3px); }
.quote-card cite {
  display: block;
  margin-top: 16px;
  color: var(--faint);
  font-family: var(--serif);
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.18em;
}

/* ---------- traits ---------- */
.traits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.trait {
  padding: 24px 24px 26px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: var(--inset-hi);
  transition: transform 0.2s, box-shadow 0.25s;
}
.trait:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20, 40, 80, 0.1); }
.trait-tag {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font: 600 10.5px var(--mono);
  letter-spacing: 0.28em;
}
.trait strong { display: block; margin-bottom: 8px; font-size: 16.5px; }
.trait p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.9; }

/* ---------- links ---------- */
.link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px 11px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass);
  backdrop-filter: blur(8px);
  font-size: 13.5px;
  font-weight: 500;
  transition: transform 0.18s, box-shadow 0.2s, border-color 0.15s;
}
.link-chip:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 28px rgba(20, 40, 80, 0.12);
}
.chip-icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: var(--surface-strong);
}
.chip-favicon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.chip-favicon.loaded {
  opacity: 1;
  z-index: 2;
}
.chip-letter {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--on-strong);
  font: 600 12px var(--mono);
}
.link-chip-name { font-weight: 500; }
.link-chip small { color: var(--faint); font-size: 11px; font-weight: 400; }

/* ---------- footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 20px 0 26px;
  border-top: 1px solid var(--hairline);
  color: var(--faint);
  font-size: 12px;
}
.footer .mono { font-size: 11px; letter-spacing: 0.16em; }
.footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 600 11px var(--mono);
  letter-spacing: 0.16em;
}
.footer-mark svg { width: 16px; height: 16px; }
.footer b { font-weight: 600; color: var(--muted); }

.hero-orbit {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(1060px, 108vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
  animation: orbitSpin 90s linear infinite;
}
.hero-orbit::before {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px dashed var(--line-soft);
  border-radius: 50%;
}
.hero-orbit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 0 12px rgba(138, 180, 255, 0.6);
}
@keyframes orbitSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- settings ---------- */
.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--glass);
  color: var(--muted);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.2s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  transform: rotate(30deg);
  box-shadow: 0 6px 18px rgba(20, 40, 80, 0.12);
}
.section-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass);
  color: var(--muted);
  font: 500 12px var(--sans);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.2s;
}
.section-edit:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(20, 40, 80, 0.12);
}

.settings-modal {
  width: min(560px, 92vw);
  max-height: min(84vh, 720px);
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 24px;
  background: var(--glass-strong);
  color: var(--ink);
  box-shadow: 0 40px 90px rgba(12, 24, 44, 0.28);
  overflow: hidden;
}
.settings-modal::backdrop {
  background: rgba(12, 20, 34, 0.32);
  backdrop-filter: blur(5px);
}
.modal-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 26px 22px;
  max-height: min(84vh, 720px);
  overflow-y: auto;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-head h3 { margin: 4px 0 0; font-size: 20px; }
.modal-note { margin: -6px 0 0; color: var(--faint); font-size: 12.5px; }

.modal-group h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.modal-group + .modal-group {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}
.city-row { display: flex; gap: 8px; }
.city-row input { flex: 1 1 auto; }
.city-status { margin: 8px 0 0; color: var(--faint); font-size: 12px; }
.city-status.ok { color: #2f8f5b; }
.city-status.err { color: #c2554d; }

.settings-modal input[type="text"],
.settings-modal input[type="date"],
.settings-modal input[type="url"] {
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass-strong);
  color: var(--ink);
  font: 400 13.5px var(--sans);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.settings-modal input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(138, 180, 255, 0.25);
}
.mini-btn {
  padding: 10px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);
  color: var(--ink);
  font: 500 13px var(--sans);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.mini-btn:hover { background: var(--glass-strong); border-color: var(--border-strong); }

.rows { display: grid; gap: 8px; }
.settings-row { display: flex; gap: 8px; align-items: center; }
.settings-row input { flex: 1 1 130px; }
.settings-row input.name-input { flex: 0 0 34%; }
.row-del {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--faint);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.row-del:hover { color: #c2554d; background: rgba(194, 85, 77, 0.08); }
.add-row {
  margin-top: 10px;
  padding: 9px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: none;
  color: var(--muted);
  font: 500 12.5px var(--sans);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.add-row:hover { color: var(--ink); }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}
.danger-text {
  border: 0;
  background: none;
  color: var(--faint);
  font: 400 12.5px var(--sans);
  cursor: pointer;
}
.danger-text:hover { color: #c2554d; }
.foot-right { display: flex; gap: 10px; }
.ghost-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: none;
  color: var(--muted);
  font: 500 13.5px var(--sans);
  cursor: pointer;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.save-btn {
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid var(--surface-strong);
  background: var(--surface-strong);
  color: var(--on-strong);
  font: 500 13.5px var(--sans);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(12, 20, 34, 0.22);
  transition: transform 0.15s, box-shadow 0.2s;
}
.save-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(12, 20, 34, 0.28); }

/* ---------- search ---------- */
.search {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  width: min(640px, 100%);
  margin-top: 34px;
  padding: 6px 6px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(20, 40, 80, 0.09);
  transition: border-color 0.15s, box-shadow 0.2s;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.search:focus-within,
.search.picker-open,
.search:has(.engine-picker.open) {
  z-index: 60;
  border-color: var(--border-strong);
  box-shadow: 0 16px 40px rgba(20, 40, 80, 0.14);
}
.engines { display: flex; gap: 2px; flex: none; }
.engine {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 500 12.5px var(--sans);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.engine:hover { color: var(--ink); }
.engine.active { background: var(--surface-strong); color: var(--on-strong); }

/* ---------- engine dropdown ---------- */
.engine-picker { position: relative; flex: none; z-index: 30; }
.engine-picker.open { z-index: 70; }
.engine-current {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--faint);
  font: 500 13px var(--sans);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.engine-current:hover { color: var(--ink); background: var(--track); }
.engine-current > span { color: var(--ink); font-weight: 500; }
.engine-current .chev { width: 12px; height: 12px; transition: transform 0.2s; }
.engine-picker.open .chev { transform: rotate(180deg); }
.engine-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 100;
  display: grid;
  gap: 2px;
  min-width: 140px;
  padding: 6px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 20px 48px rgba(12, 24, 44, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
}
:root[data-theme="dark"] .engine-menu {
  background: rgba(24, 30, 42, 0.95);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.25);
}
.engine-menu[hidden] { display: none; }
.engine-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font: 400 13px var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.engine-option:hover { color: var(--ink); background: var(--track); }
.engine-option.active { color: var(--ink); font-weight: 500; }
.engine-option.active::after { content: "✓"; font-size: 11px; }
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 400 15px var(--sans);
  outline: none;
}
.search-input::placeholder { color: var(--faint); }
.search-go {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--on-strong);
  font: 600 15px var(--mono);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.search-go:hover { transform: scale(1.06); box-shadow: 0 8px 20px rgba(12, 20, 34, 0.25); }
.search-history {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--glass-strong);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(20, 40, 80, 0.12);
}
.search-history[hidden] { display: none; }
.history-chip {
  padding: 7px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 400 12.5px var(--sans);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.history-chip:hover { color: var(--ink); border-color: var(--border-strong); }
.history-clear {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--faint);
  font: 400 11.5px var(--sans);
  cursor: pointer;
}
.history-clear:hover { color: #c2554d; }

/* ---------- notes ---------- */
.note-card { padding: 20px 24px 16px; }
.note-area {
  display: block;
  width: 100%;
  min-height: 130px;
  border: 0;
  background: transparent;
  resize: vertical;
  color: var(--ink);
  font: 400 14.5px/1.9 var(--sans);
  outline: none;
}
.note-area::placeholder { color: var(--faint); }
.note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  color: var(--faint);
  font-size: 11.5px;
}
.note-foot .mono { font-variant-numeric: tabular-nums; }

/* ---------- theme segment ---------- */
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
}
.seg button {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 500 12.5px var(--sans);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--surface-strong); color: var(--on-strong); }
.empty-hint { color: var(--faint); font-size: 13px; padding: 18px 0 6px; }

/* ---------- weather forecast ---------- */
.forecast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.forecast > div { display: grid; gap: 4px; justify-items: center; }
.forecast span { color: var(--faint); font-size: 11.5px; }
.forecast b { font: 600 14px var(--mono); font-variant-numeric: tabular-nums; }
.forecast small { color: var(--muted); font: 400 11.5px var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- command palette ---------- */
.palette {
  width: min(560px, 92vw);
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--glass-strong);
  color: var(--ink);
  box-shadow: 0 40px 90px rgba(12, 24, 44, 0.3);
  overflow: hidden;
}
.palette::backdrop {
  background: rgba(12, 20, 34, 0.28);
  backdrop-filter: blur(4px);
}
:root[data-theme="dark"] .palette { background: rgba(17, 22, 33, 0.96); }
:root[data-theme="dark"] .palette::backdrop { background: rgba(3, 6, 10, 0.55); }
.palette-input {
  display: block;
  width: 100%;
  padding: 18px 22px;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  font: 400 16px var(--sans);
  outline: none;
}
.palette-input::placeholder { color: var(--faint); }
.palette-list { max-height: 46vh; overflow-y: auto; padding: 8px; }
.palette-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font: 400 14px var(--sans);
  text-align: left;
  cursor: pointer;
}
.palette-row small { color: var(--faint); font-size: 11.5px; }
.palette-row.selected { background: rgba(138, 180, 255, 0.18); }
.palette-empty { padding: 18px; color: var(--faint); font-size: 13px; text-align: center; }

/* ---------- copy & backup (settings) ---------- */
.copy-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.preset-chip {
  padding: 5px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
  color: var(--muted);
  font: 500 12px var(--sans);
  cursor: pointer;
  transition: all 0.15s;
}
.preset-chip:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background: var(--glass-strong);
}
.copy-input {
  display: block;
  width: 100%;
  margin-bottom: 8px;
}
.backup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.backup-row .ghost-btn { padding: 8px 16px; font-size: 12.5px; }

.card-click { cursor: pointer; transition: transform 0.2s, box-shadow 0.25s, border-color 0.15s; }
.card-click:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 40px rgba(20, 40, 80, 0.12);
}
.card-click:focus-visible { outline: 2px solid rgba(12, 15, 20, 0.4); outline-offset: 3px; }
.card-open-hint {
  font: 500 10px var(--mono);
  font-style: normal;
  color: var(--faint);
  letter-spacing: 0.1em;
  margin-left: 6px;
  transition: color 0.15s;
}
.card-click:hover .card-open-hint { color: var(--ink); }

/* ---------- weather location ---------- */
.city-locate-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 18em;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
  color: var(--ink);
  font: 600 12px var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: middle;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.2s;
}
.city-locate-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border: 2px solid var(--green);
  border-radius: 50%;
}
.city-locate-chip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: 0 8px 20px rgba(20, 40, 80, 0.1);
}
.city-locate-chip.locating::before {
  border-top-color: transparent;
  animation: locatingSpin 0.8s linear infinite;
}
@keyframes locatingSpin { to { transform: rotate(360deg); } }
.weather-source {
  margin-left: 6px;
  color: var(--faint);
  font-size: 11px;
}

/* ---------- weather forecast panel ---------- */
.aqi-badge {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  font: 600 11px var(--mono);
}
.wx-card { padding: 20px 22px 22px; }
.wx-detail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
}
.wx-detail > div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  background: var(--glass);
}
.wx-detail > div:nth-child(n + 2) { border-left: 1px solid var(--hairline); }
.wx-detail span { color: var(--faint); font-size: 11.5px; }
.wx-detail b { font: 500 13.5px var(--mono); font-variant-numeric: tabular-nums; }
.wx-block { margin-top: 18px; }
.wx-block h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.wx-block h4 svg { width: 15px; height: 15px; }
.wx-icon { display: inline-grid; place-items: center; color: var(--muted); }
.wx-icon svg { width: 21px; height: 21px; }

.hourly-scroll { overflow-x: auto; padding-bottom: 4px; }
.hourly-scroll::-webkit-scrollbar { height: 6px; }
.hourly-inner { min-width: max-content; }
.hourly-chart { display: block; color: var(--ink); }
.hour-cells { display: flex; }
.hour-cell {
  flex: none;
  width: 56px;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11.5px;
}
.hour-cell:first-child { color: var(--ink); font-weight: 500; }
.hour-cell small { min-height: 14px; color: #4d8fd1; font: 500 10.5px var(--mono); }

.weekly {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.day-cell {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 13px 6px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--glass);
}
.day-cell.today { border-color: var(--border-strong); background: rgba(138, 180, 255, 0.12); }
.day-cell > span { font-size: 12.5px; font-weight: 500; }
.day-cell small { color: var(--faint); font: 400 10.5px var(--mono); }
.day-cell em { min-height: 14px; color: #4d8fd1; font: 500 10.5px var(--mono); font-style: normal; }
.day-cell b { font: 600 14px var(--mono); font-variant-numeric: tabular-nums; }
.day-cell .lo { color: var(--muted); }

.wx-dialog { width: min(720px, 94vw); }
.wx-dialog .modal-shell { gap: 16px; }
.wx-dialog .wx-detail { border-radius: 14px; }
:root[data-theme="dark"] .wx-dialog { background: rgba(17, 22, 33, 0.96); }
:root[data-theme="dark"] .wx-dialog::backdrop { background: rgba(3, 6, 10, 0.55); }

/* ---------- info dialogs (time / today / world clock) ---------- */
.info-dialog { width: min(480px, 92vw); }
:root[data-theme="dark"] .info-dialog { background: rgba(17, 22, 33, 0.96); }
:root[data-theme="dark"] .info-dialog::backdrop { background: rgba(3, 6, 10, 0.55); }
.info-dialog .big { font-size: clamp(36px, 4vw, 48px); }

.progress-rows { display: grid; gap: 12px; margin-top: 4px; }
.bar-row {
  display: grid;
  grid-template-columns: 44px 1fr 48px;
  align-items: center;
  gap: 12px;
}
.bar-row > span { color: var(--faint); font-size: 12px; }
.bar-row .bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
}
.bar-row .bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-row > b {
  color: var(--muted);
  font: 600 11px var(--mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.daily-cheer {
  margin: 4px 0 0;
  padding: 13px 14px;
  border: 1px dashed var(--hairline);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row > span { flex: none; min-width: 72px; color: var(--ink); font: 600 13px var(--mono); font-variant-numeric: tabular-nums; }
.slider-row input[type="range"] { flex: 1 1 auto; accent-color: var(--ink); cursor: pointer; }
.city-rows { display: grid; gap: 8px; }
.city-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);
}
.city-row .dn { display: grid; place-items: center; width: 18px; }
.city-row .dn svg { width: 15px; height: 15px; }
.city-row .dn.day { color: #d99a26; }
.city-row .dn.night { color: #6f7fd1; }
.city-row strong { font-size: 13.5px; font-weight: 500; }
.city-row .state { color: var(--faint); font-size: 10.5px; }
.city-row b { margin-left: auto; font: 600 13.5px var(--mono); font-variant-numeric: tabular-nums; }
.city-row.away b { color: var(--faint); }

/* ---------- radar pill & rain reminder ---------- */
.pill-link { transition: transform 0.18s, box-shadow 0.2s, border-color 0.15s; }
.pill-link:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 30px rgba(20, 40, 80, 0.14);
}
.pill-link[hidden] { display: none; }
.wx-reminder {
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px dashed rgba(224, 155, 60, 0.55);
  border-radius: 10px;
  background: rgba(224, 155, 60, 0.09);
  color: #a9741f;
  font-size: 12px;
  line-height: 1.7;
}
:root[data-theme="dark"] .wx-reminder { color: #e5b96b; }

/* ---------- shortcuts help ---------- */
.shortcut-list { display: grid; gap: 6px; }
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);
  font-size: 13px;
}
.shortcut-row .keys { display: inline-flex; align-items: center; gap: 5px; }
.shortcut-row kbd {
  padding: 3px 9px;
  border: 1px solid var(--hairline);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--glass-strong);
  color: var(--ink);
  font: 600 11.5px var(--mono);
}
.shortcut-row i { color: var(--faint); font-style: normal; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 90;
  transform: translate(-50%, 14px);
  max-width: min(86vw, 420px);
  padding: 11px 20px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--on-strong);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.icon-btn.playing {
  position: relative;
  color: var(--green);
  border-color: rgba(46, 125, 79, 0.4);
  box-shadow: 0 0 16px rgba(46, 125, 79, 0.25);
}
.icon-btn.playing::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.8s ease-in-out infinite;
}

/* ---------- ambient sound & focus dialog ---------- */
.ambient-dialog { width: min(460px, 92vw); }
.ambient-types { display: flex; gap: 8px; justify-content: center; margin: 12px 0 18px; }
.ambient-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
  color: var(--muted);
  font: 500 13px var(--sans);
  cursor: pointer;
  transition: all 0.18s;
}
.ambient-btn.active {
  background: var(--surface-strong);
  color: var(--on-strong);
  border-color: var(--surface-strong);
}
.ambient-play-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 10px; }
.ambient-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--surface-strong);
  background: var(--surface-strong);
  color: var(--on-strong);
  font: 600 14px var(--sans);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(12, 20, 34, 0.2);
  transition: all 0.2s;
}
.ambient-play:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(12, 20, 34, 0.25); }
.focus-timer-display {
  font: 700 42px var(--mono);
  text-align: center;
  margin: 10px 0 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.focus-timer-hint { text-align: center; color: var(--faint); font-size: 12px; margin: 0 0 16px; }
.ambient-modes { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.ambient-mode-chip {
  padding: 4px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 500 11.5px var(--mono);
  cursor: pointer;
}
.ambient-mode-chip.active {
  background: var(--surface-strong);
  color: var(--on-strong);
  border-color: var(--surface-strong);
}

/* ---------- lifestyle tips in weather ---------- */
.wx-tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.tip-tile {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);
}
.tip-tile span { color: var(--faint); font-size: 11px; }
.tip-tile b { font: 600 12.5px var(--sans); color: var(--ink); }
.tip-tile small { color: var(--muted); font-size: 11px; line-height: 1.5; }

/* ---------- search calculator ---------- */
.search-calc {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(20, 40, 80, 0.14);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.search-calc:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}
.search-calc[hidden] { display: none; }
.calc-left { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.calc-expr { color: var(--faint); font: 500 13px var(--mono); }
.calc-res { color: var(--ink); font: 700 20px var(--mono); font-variant-numeric: tabular-nums; }
.calc-action { color: var(--muted); font: 500 11.5px var(--sans); }

/* ---------- notes view seg & checklist ---------- */
.note-view-seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 500 12px var(--sans);
  cursor: pointer;
  transition: all 0.15s;
}
.seg-btn.active {
  background: var(--surface-strong);
  color: var(--on-strong);
}
.seg-badge {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font: 600 10px var(--mono);
}
:root:not([data-theme="dark"]) .seg-btn.active .seg-badge {
  background: rgba(255, 255, 255, 0.25);
}
.note-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.note-tab {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass);
  color: var(--muted);
  font: 500 12px var(--sans);
  cursor: pointer;
  transition: all 0.15s;
}
.note-tab:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}
.note-tab.active {
  background: var(--surface-strong);
  color: var(--on-strong);
  border-color: var(--surface-strong);
}

.note-checklist {
  display: grid;
  gap: 8px;
  min-height: 130px;
  align-content: start;
  padding: 4px 0;
}
.note-checklist[hidden] { display: none; }
.checklist-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.15s;
}
.checklist-row:hover { background: var(--track); }
.checklist-cb {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 6px;
  border: 1.5px solid var(--muted);
  background: none;
  color: transparent;
  cursor: pointer;
  flex: none;
  transition: all 0.15s;
  padding: 0;
}
.checklist-cb svg { width: 12px; height: 12px; stroke-width: 2.5; }
.checklist-cb:hover { border-color: var(--ink); }
.checklist-cb.checked {
  background: #2e7d4f;
  border-color: #2e7d4f;
  color: #fff;
}
.checklist-text {
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  transition: color 0.15s;
  cursor: pointer;
}
.checklist-row.checked .checklist-text {
  text-decoration: line-through;
  color: var(--faint);
}
.checklist-empty {
  color: var(--faint);
  font-size: 13px;
  text-align: center;
  padding: 30px 0;
}

/* ---------- moon phase card ---------- */
.moon-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  margin-top: 14px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--glass);
}
.moon-visual {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
}
.moon-visual svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 10px rgba(200, 220, 255, 0.35));
}
.moon-info { display: grid; gap: 4px; flex: 1 1 auto; }
.moon-header { display: flex; align-items: baseline; gap: 8px; }
.moon-name { font-size: 15px; font-weight: 600; font-family: var(--serif); color: var(--ink); }
.moon-illum { font: 600 11.5px var(--mono); color: var(--muted); }
.moon-sub { color: var(--faint); font-size: 12px; margin: 0; }

/* ---------- year in dots ---------- */
.year-dots-card {
  padding: 14px 16px;
  margin-top: 14px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--glass);
}
.year-dots-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.year-dots-grid {
  display: grid;
  grid-template-columns: repeat(28, 1fr);
  gap: 3.5px;
  padding: 4px 0;
}
.yd-dot {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--track);
  transition: transform 0.15s, background 0.15s;
  cursor: pointer;
}
.yd-dot:hover { transform: scale(2); z-index: 2; }
.yd-dot.passed {
  background: linear-gradient(135deg, var(--blue), var(--violet));
  opacity: 0.85;
}
.yd-dot.today {
  background: var(--ink);
  box-shadow: 0 0 8px var(--blue);
  transform: scale(1.35);
  animation: pulse 2s infinite;
}

/* ---------- section visibility & haptics toggles ---------- */
.module-toggles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.toggle-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.toggle-pill:has(input:checked) {
  border-color: var(--border-strong);
  background: var(--glass-strong);
}
.toggle-pill input { accent-color: var(--ink); cursor: pointer; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);
  font-size: 13px;
  cursor: pointer;
}
.toggle-row input { accent-color: var(--ink); width: 16px; height: 16px; cursor: pointer; }
.section.sec-hidden {
  display: none !important;
}

/* ---------- shortcuts quick-add ---------- */
.link-chip.add-chip {
  border-style: dashed;
  color: var(--muted);
  cursor: pointer;
}
.link-chip.add-chip:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  border-style: solid;
}

.link-chip[draggable="true"] {
  cursor: grab;
  user-select: none;
}
.link-chip[draggable="true"]:active {
  cursor: grabbing;
}
.link-chip.dragging {
  opacity: 0.35;
  transform: scale(0.96);
}
.link-chip.drag-over {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue);
  transform: translateY(-2px);
}



/* ---------- ambient scenes & focus stats ---------- */
.ambient-scenes {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0 10px;
}
.scenes-label {
  font-size: 11.5px;
  color: var(--faint);
}
.scene-chip {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass);
  color: var(--muted);
  font: 500 12px var(--sans);
  cursor: pointer;
  transition: all 0.15s;
}
.scene-chip:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}
.scene-chip.active {
  background: var(--surface-strong);
  color: var(--on-strong);
  border-color: var(--surface-strong);
}
.focus-stats-line {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  margin: 12px 0 0;
}
.focus-stats-line b {
  color: var(--ink);
}

/* ---------- monthly calendar card ---------- */
.calendar-card {
  padding: 16px 18px;
  margin-top: 14px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--glass);
}
.cal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cal-nav-btn {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.cal-nav-btn:hover {
  color: var(--ink);
  background: var(--track);
  border-color: var(--border-strong);
}
.cal-nav-btn.cal-today-btn {
  font-size: 11px;
  padding: 0 6px;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  color: var(--faint);
  font: 500 11.5px var(--mono);
  margin-bottom: 6px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 9px;
  font-size: 12.5px;
  font-family: var(--mono);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.15s;
}
:root[data-theme="dark"] .cal-day {
  background: rgba(255, 255, 255, 0.03);
}
.cal-day.other-month {
  opacity: 0.25;
}
.cal-day.today {
  background: rgba(138, 180, 255, 0.22);
  border: 1.5px solid var(--blue);
  font-weight: 700;
  color: var(--blue);
}
.cal-day small {
  font-size: 9px;
  font-family: var(--sans);
  color: var(--faint);
  line-height: 1;
  margin-top: 2px;
}
.cal-day.today small {
  color: var(--blue);
}
.cal-day.has-term small {
  color: var(--mint);
  font-weight: 600;
}

/* ---------- ambient mixer ---------- */
.ambient-mixer {
  display: grid;
  gap: 10px;
  margin: 10px 0 16px;
}
.ambient-track {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--glass);
}
.track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.track-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}
.track-val {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.track-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.track-slider {
  flex: 1 1 auto;
  accent-color: var(--ink);
  cursor: pointer;
  height: 5px;
}
.track-btn {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: none;
  color: var(--muted);
  font: 500 11.5px var(--sans);
  cursor: pointer;
  transition: all 0.15s;
}
.track-btn.active {
  background: var(--surface-strong);
  color: var(--on-strong);
  border-color: var(--surface-strong);
}
.zen-btn {
  padding: 11px 22px;
  font-size: 13px;
  color: var(--ink);
  border-color: var(--hairline);
}
.zen-btn:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 24px rgba(20, 40, 80, 0.1);
}

/* ---------- zen fullscreen focus mode ---------- */
.zen-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 6vw 28px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(36px);
  animation: zenFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.zen-overlay[hidden] { display: none !important; }
:root[data-theme="dark"] .zen-overlay {
  background: color-mix(in srgb, #080b10 93%, transparent);
}
@keyframes zenFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
.zen-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.zen-tag {
  font: 600 11px var(--mono);
  color: var(--faint);
  letter-spacing: 0.26em;
}
.zen-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass-strong);
  color: var(--ink);
  font: 500 13px var(--sans);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.15s;
}
.zen-close-btn svg { width: 14px; height: 14px; }
.zen-close-btn:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 18px rgba(20, 40, 80, 0.12);
  transform: translateY(-1px);
}
.zen-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin: auto 0;
}
.zen-clock {
  font: 700 clamp(54px, 11vw, 126px)/1 var(--mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(138, 180, 255, 0.28);
}
.zen-timer-block {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass);
}
.zen-timer-val {
  font: 600 22px var(--mono);
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.zen-timer-status {
  font-size: 12px;
  color: var(--muted);
}
.zen-quote {
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 24px);
  font-weight: 500;
  color: var(--muted);
  max-width: 28em;
  line-height: 1.8;
  letter-spacing: 0.04em;
  margin: 10px 0 16px;
}
.zen-mixer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.zen-audio-btn {
  padding: 11px 26px;
  border-radius: 999px;
  border: 0;
  background: var(--surface-strong);
  color: var(--on-strong);
  font: 600 13.5px var(--sans);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(12, 20, 34, 0.22);
  transition: all 0.2s;
}
.zen-audio-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(12, 20, 34, 0.3);
}
.zen-chips {
  display: flex;
  gap: 8px;
}
.zen-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass);
  font: 500 12px var(--sans);
  color: var(--muted);
}
.zen-chip.on {
  color: var(--ink);
  border-color: var(--border-strong);
}
.zen-footer {
  text-align: center;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.16em;
}

/* ---------- spotlight tool card styling ---------- */
.color-swatch-box {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex: none;
}
.calc-badge {
  padding: 2px 7px;
  border-radius: 999px;
  font: 600 10px var(--mono);
  background: var(--track);
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-right: 4px;
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .now-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moments-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nav { padding: 16px 0; }
  .nav-clock { display: none; }
  .hero { padding: 6vh 0 4vh; }
  .sub .br-desktop { display: none; }
  .search { flex-wrap: wrap; border-radius: 22px; padding: 8px; }
  .search-input { flex: 1 1 140px; }
  .orbit { gap: 10px; margin-top: 46px; }
  .pill { padding: 10px 16px; }
  .scroll-cue { margin-top: 30px; }
  .section { padding: 20px 0; }
  .now-grid { grid-template-columns: minmax(0, 1fr); }
  .moments-grid { grid-template-columns: minmax(0, 1fr); }
  .traits { grid-template-columns: minmax(0, 1fr); }
  .wx-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wx-detail > div:nth-child(n + 2) { border-left: 1px solid var(--hairline); }
  .wx-detail > div:nth-child(n + 4) { border-top: 1px solid var(--hairline); }
  .wx-detail > div:nth-child(4) { border-left: 0; }
  .weekly { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .day-cell { flex: none; width: 78px; }
  .link-chip { padding: 10px 16px 10px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora i, .dot, .scroll-cue { animation: none; }
  .eyebrow, .hero h1, .sub, .actions, .orbit { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .quote-char { animation: none; opacity: 1; transform: none; filter: none; }
}

/* ---------- brand logo ---------- */
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.brand-mark svg { width: 34px; height: 34px; }

/* ---------- shortcut fab ---------- */
.shortcut-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--glass-strong);
  color: var(--faint);
  font: 600 14px var(--mono);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 20px rgba(12, 20, 34, 0.08);
}
.shortcut-fab:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(20, 40, 80, 0.16);
}
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--mint), var(--violet));
  z-index: 100;
  transition: width 0.1s ease-out;
  pointer-events: none;
}
.top-fab {
  position: fixed;
  right: 68px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--glass-strong);
  color: var(--faint);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 20px rgba(12, 20, 34, 0.08);
}
.top-fab[hidden] {
  display: none !important;
}
.top-fab svg {
  width: 16px;
  height: 16px;
}
.top-fab:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(20, 40, 80, 0.16);
}
@media (max-width: 760px) {
  .shortcut-fab {
    right: 16px;
    bottom: 16px;
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .top-fab {
    right: 56px;
    bottom: 16px;
    width: 32px;
    height: 32px;
  }
}

/* ---------- homepage workspace ---------- */
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 18px; background: var(--surface-strong); color: var(--on-strong); border-radius: 12px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
#main-content { min-width: 0; }
.home-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; margin-right: 24px; }
.home-nav a { color: var(--muted); font-size: 13px; text-decoration: none; padding: 10px 0; }
.home-nav a:hover { color: var(--ink); }
.hero { position: relative; z-index: 20; padding: 76px 0 48px; }
.hero h1 { font-size: clamp(29px, 4.2vw, 53px); }
.hero .eyebrow { margin-bottom: 20px; }
.hero .search { margin-top: 28px; position: relative; z-index: 30; }
.hero .search.picker-open, .hero .search:has(.engine-picker.open) { z-index: 60; }
.hero .orbit { margin-top: 24px; position: relative; z-index: 1; }
.hero-tools { position: relative; z-index: 1; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 18px; }
.quiet-action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 500 12px var(--sans); cursor: pointer; }
.quiet-action:hover { background: var(--glass); color: var(--ink); }
.quiet-action kbd { border: 1px solid var(--hairline); border-radius: 5px; padding: 2px 5px; color: var(--faint); font: 11px var(--mono); }
.quiet-action[hidden], #forecast-content[hidden], .note-area[hidden] { display: none; }
.hero-orbit { opacity: 0.32; pointer-events: none; }
.section { scroll-margin-top: 24px; position: relative; z-index: 1; }
#links { padding-top: 8px; padding-bottom: 28px; border-bottom: 1px solid var(--hairline); }
#links .section-head { margin-bottom: 14px; }
.link-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.link-chip { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; min-width: 0; min-height: 62px; border-radius: 14px; padding: 13px 15px; }
.link-chip .chip-icon-wrap { grid-row: 1 / 3; }
.link-chip small { grid-column: 2; }
.link-chip-name, .link-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-chip > span:last-child { min-width: 0; }
.link-chip.add-chip { display: flex; min-height: 62px; font: 500 12px var(--sans); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 28px; }
.workspace-grid > .section { min-width: 0; }
.workspace-grid:has(> .sec-hidden) { grid-template-columns: minmax(0, 1fr); }
.workspace-grid .section-head { flex-wrap: wrap; gap: 10px; min-height: 36px; }
.workspace-grid .section-head .kicker { display: none; }
.workspace-grid .section-head h2 { margin-right: auto; font-size: 19px; }
.workspace-grid #notes .note-view-seg { margin-left: 0; }
.workspace-grid #notes .section-edit { margin-left: 0; min-height: 32px; padding: 5px 7px; }
.workspace-grid #notes .section-edit[data-note-todo] { margin-left: auto; }
.workspace-grid #notes .note-card { padding: 20px; }
.workspace-grid .note-area { min-height: 238px; font-size: 14px; line-height: 1.85; }
.workspace-grid .moments-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.workspace-grid .countdown { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 15px 18px; border-radius: 15px; }
.workspace-grid .countdown .card-kicker { display: none; }
.workspace-grid .countdown-name { margin: 0; font-size: 14px; }
.workspace-grid .countdown .days { grid-column: 2; grid-row: 1 / 3; font-size: 30px; }
.workspace-grid .countdown p { grid-column: 1; margin-top: 5px; }
.workspace-grid .countdown p .mono { font-size: 11px; }
.workspace-grid .add-countdown-card { min-height: 46px; display: flex; justify-content: space-between; }
.workspace-grid .add-countdown-card .days, .workspace-grid .add-countdown-card p { display: none; }
.countdown-more { width: 100%; margin-top: 5px; }
.workspace-grid .quote-card { margin-top: 12px; padding: 22px 20px 18px; }
.workspace-grid .quote-card blockquote { font-size: 17px; margin: 12px 0; }
.workspace-grid .quote-mark { display: none; }
#forecast .section-head { flex-wrap: wrap; }
#forecast .section-head p { flex: 1; min-width: 200px; }
#forecast .section-head .section-edit { margin-left: 0; min-height: 36px; }
#forecast { border-top: 1px solid var(--hairline); }
#traits { padding-top: 16px; }
#traits .section-head { display: none; }
#traits .trait { padding: 18px 20px; }
#traits .trait-tag { font-size: 9px; }
#traits .trait strong { font-size: 14px; }
#traits .trait p { font-size: 12px; line-height: 1.8; }
.pill.is-offline .dot { background: var(--faint); animation: none; }
.weather-load-state { padding: 12px 14px; border: 1px dashed var(--hairline); border-radius: 12px; color: var(--muted); font-size: 12px; }
.weather-load-state[hidden] { display: none; }
:root[data-density="compact"] .hero { padding-top: 46px; padding-bottom: 28px; }
:root[data-density="compact"] .now-grid .card { padding: 20px; }
:root[data-density="comfortable"] .hero { padding-top: 110px; padding-bottom: 60px; }
:root[data-density="comfortable"] .workspace-grid { display: block; }
:root[data-density="comfortable"] .workspace-grid .moments-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:root[data-density="comfortable"] .workspace-grid .note-area { min-height: 200px; }
:root[data-density="comfortable"] .section { padding-top: 32px; padding-bottom: 32px; }
.section-head .section-edit, .note-tab, .seg-btn { color: var(--muted); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (max-width: 1000px) {
  .now-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-grid { gap: 20px; }
  .link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-nav { gap: 16px; margin-right: 16px; }
}
@media (max-width: 760px) {
  .page { width: min(100% - 32px, 640px); }
  .home-nav { display: none; }
  .nav { padding: 16px 0; }
  .nav-right { gap: 8px; }
  .nav .icon-btn { width: 40px; height: 40px; }
  :root[data-density] .hero { padding-top: 36px; padding-bottom: 26px; }
  .hero h1 { font-size: clamp(26px, 5.6vw, 36px); line-height: 1.55; }
  .hero .sub { font-size: 13px; line-height: 1.85; }
  .hero .eyebrow { font-size: 9px; letter-spacing: 0.13em; }
  .hero .orbit { gap: 8px; }
  .hero .pill { padding: 9px 12px; font-size: 11px; }
  .hero .pill[data-pill="clock"], .hero .pill[data-pill="link"] { display: none; }
  .hero-tools { gap: 12px; margin-top: 10px; }
  .hero-tools .quiet-action { min-height: 40px; }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .link-chip { padding: 12px; }
  .now-grid { gap: 10px; }
  :root[data-density="compact"] .now-grid .card { padding: 17px 14px; }
  .now-grid .big { font-size: 30px; }
  .now-grid .card-kicker { font-size: 9px; letter-spacing: 0.12em; }
  .world-rows { grid-template-columns: 1fr; gap: 5px; }
  .now-grid .card-open-hint { display: none; }
  .workspace-grid { display: block; }
  :root[data-density="comfortable"] .workspace-grid .moments-grid { grid-template-columns: 1fr; }
  .section-head { flex-wrap: wrap; gap: 8px; }
  .section-head .kicker { display: none; }
  .section-head h2 { font-size: 19px; }
  .section-head p { font-size: 12px; }
  .note-tabs { gap: 5px; }
  .note-tab { padding: 8px 11px; min-height: 40px; }
  .workspace-grid .note-area { min-height: 180px; }
  .workspace-grid #notes .section-edit { min-height: 40px; }
  #forecast .section-head p { order: 4; flex-basis: 100%; }
  #forecast .section-head [data-toggle-forecast] { margin-left: auto; }
  #traits .traits { grid-template-columns: 1fr; gap: 10px; }
  #traits .trait { padding: 12px 0; background: transparent; border: 0; box-shadow: none; }
  .footer { padding-bottom: 72px; line-height: 1.8; }
  .ambient-play-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
