@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&family=LXGW+WenKai+TC&family=Noto+Sans+SC:wght@300;400;500;600;700;800&family=Noto+Serif+SC:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --font-body: "LXGW WenKai TC", "Noto Serif SC", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-display: "Noto Serif SC", "LXGW WenKai TC", "Songti SC", "SimSun", serif;
  --font-ui: "Noto Serif SC", "LXGW WenKai TC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-script: "Great Vibes", cursive;
  --ink: #183228;
  --muted: #62756a;
  --line: #cfddd4;
  --paper: #f3f8f1;
  --panel: #ffffff;
  --mint: #b9dbc8;
  --leaf: #7fb38c;
  --moss: #496f52;
  --fern: #d9ead6;
  --gold: #d9c77a;
  --blue: #9fc8bd;
  --plum: #365f49;
  --shadow: 0 18px 48px rgba(24, 50, 40, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 400;
  background:
    linear-gradient(rgba(243, 248, 241, 0.72), rgba(243, 248, 241, 0.72)),
    radial-gradient(circle at 18% 12%, rgba(185, 219, 200, 0.62), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(217, 234, 214, 0.84), transparent 31%),
    linear-gradient(135deg, rgba(243, 248, 241, 0.98), rgba(229, 241, 226, 0.86) 43%, rgba(190, 219, 198, 0.45)),
    var(--paper);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
  font-family: var(--font-ui);
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  position: relative;
  isolation: isolate;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(243, 248, 241, 0.68), rgba(243, 248, 241, 0.42) 44%, rgba(185, 219, 200, 0.2)),
    var(--active-bg, none);
  background-size: cover;
  background-position: center;
}

.background-credit {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 5;
  max-width: min(360px, calc(100vw - 28px));
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(247, 251, 245, 0.7);
  color: rgba(24, 50, 40, 0.74);
  font-size: 0.78rem;
  backdrop-filter: blur(12px);
}

.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;
}

.sidebar {
  padding: 30px 22px 24px;
  border-right: 1px solid rgba(24, 50, 40, 0.08);
  background:
    linear-gradient(180deg, rgba(247, 251, 245, 0.62), rgba(239, 248, 236, 0.48)),
    rgba(247, 251, 245, 0.48);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: conic-gradient(from 130deg, var(--moss), var(--leaf), var(--fern), var(--gold), var(--mint), var(--moss));
  padding: 5px;
}

.brand-mark span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(24, 50, 40, 0.08);
}

.brand h1,
.brand p,
h2,
h3,
p {
  margin: 0;
}

.brand h1 {
  font-family: var(--font-script);
  font-size: 1.72rem;
  font-weight: 400;
  letter-spacing: 0;
}

.brand p,
.eyebrow,
.muted {
  color: var(--muted);
}

.brand p {
  color: rgba(98, 117, 106, 0.72);
  font-size: 0.76rem;
}

.nav-tabs {
  display: grid;
  gap: 7px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(73, 111, 82, 0.06);
}

.nav-tab[data-view="work"] {
  order: 1;
}

.nav-tab[data-view="focus"] {
  order: 2;
}

.nav-tab[data-view="morning"] {
  order: 3;
}

.nav-tab[data-view="night"] {
  order: 4;
}

.nav-tab[data-view="stats"] {
  order: 5;
}

.nav-tab {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(38, 71, 53, 0.82);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  text-align: left;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.nav-tab span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(73, 111, 82, 0.075);
  color: rgba(73, 111, 82, 0.74);
  font-size: 0.9rem;
}

.nav-tab strong {
  font-family: var(--font-ui);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-tab.active {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(244, 250, 241, 0.58)),
    rgba(255, 255, 255, 0.68);
  border-color: rgba(73, 111, 82, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 10px 24px rgba(24, 50, 40, 0.06);
}

.nav-tab.active span {
  background: rgba(127, 179, 140, 0.14);
  color: #496f52;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(73, 111, 82, 0.08);
  transform: translateY(-1px);
}

.paper-entry {
  position: relative;
  min-height: 92px;
  border: 1px solid rgba(73, 111, 82, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(237, 248, 232, 0.58)),
    repeating-linear-gradient(180deg, transparent 0 21px, rgba(73, 111, 82, 0.11) 22px);
  color: #264735;
  padding: 18px 16px;
  text-align: left;
  box-shadow: 0 14px 32px rgba(24, 50, 40, 0.07);
  transform: rotate(-1.2deg);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.paper-entry::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-top: 1px solid rgba(73, 111, 82, 0.18);
  border-right: 1px solid rgba(73, 111, 82, 0.18);
  background: linear-gradient(45deg, rgba(185, 219, 200, 0.42), rgba(255, 255, 255, 0.18));
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.paper-entry span {
  display: block;
  color: rgba(98, 117, 106, 0.74);
  font-family: var(--font-script);
  font-size: 1.2rem;
  line-height: 1;
}

.paper-entry strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
}

.paper-entry:hover {
  transform: rotate(0deg) translateY(-2px);
  border-color: rgba(73, 111, 82, 0.2);
  box-shadow: 0 18px 40px rgba(24, 50, 40, 0.1);
}

.paper-entry.active {
  border-color: rgba(73, 111, 82, 0.24);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(231, 246, 226, 0.7)),
    repeating-linear-gradient(180deg, transparent 0 21px, rgba(73, 111, 82, 0.13) 22px);
  box-shadow: 0 18px 42px rgba(24, 50, 40, 0.11);
}

.habit-placeholder {
  max-width: 680px;
  padding: 30px;
  margin-top: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(239, 248, 236, 0.62)),
    rgba(255, 255, 255, 0.68);
}

.habit-placeholder h3 {
  margin-top: 12px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  color: #183228;
}

.habit-placeholder p:not(.eyebrow) {
  margin-top: 14px;
  max-width: 52ch;
  color: rgba(38, 71, 53, 0.72);
  line-height: 1.8;
}

#view-habits {
  position: relative;
  overflow: hidden;
}

#view-habits::before,
#view-habits::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    22px 34px 0 -3px rgba(255, 255, 255, 0.26),
    -18px 68px 0 -5px rgba(127, 179, 140, 0.12);
}

#view-habits::before {
  width: 8px;
  height: 8px;
  right: 8%;
  top: 14%;
}

#view-habits::after {
  width: 6px;
  height: 6px;
  left: 6%;
  bottom: 18%;
}

#view-habits > * {
  position: relative;
  z-index: 1;
}

#view-habits .section-head {
  position: relative;
  width: min(1320px, 100%);
  margin-inline: auto;
  margin-bottom: 24px;
  padding-left: clamp(58px, 7vw, 112px);
  text-align: left;
}

#view-habits .section-head::before {
  content: "";
  position: absolute;
  left: clamp(8px, 2vw, 28px);
  top: 18px;
  width: 72px;
  height: 92px;
  opacity: 0.34;
  background:
    radial-gradient(ellipse at 46% 18%, rgba(73, 111, 82, 0) 0 40%, rgba(73, 111, 82, 0.68) 42% 48%, rgba(73, 111, 82, 0) 51%),
    radial-gradient(ellipse at 29% 39%, rgba(73, 111, 82, 0) 0 39%, rgba(73, 111, 82, 0.64) 42% 48%, rgba(73, 111, 82, 0) 51%),
    radial-gradient(ellipse at 64% 43%, rgba(73, 111, 82, 0) 0 39%, rgba(73, 111, 82, 0.62) 42% 48%, rgba(73, 111, 82, 0) 51%),
    radial-gradient(ellipse at 36% 65%, rgba(73, 111, 82, 0) 0 39%, rgba(73, 111, 82, 0.58) 42% 48%, rgba(73, 111, 82, 0) 51%),
    linear-gradient(100deg, transparent 0 44%, rgba(73, 111, 82, 0.7) 45% 47%, transparent 49%);
  transform: rotate(-14deg);
}

#view-habits .section-head .eyebrow {
  color: rgba(73, 111, 82, 0.76);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
}

#view-habits .section-head h2 {
  margin-top: 12px;
  color: #183228;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5.2vw, 4.85rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
}

#view-habits .section-head .muted {
  max-width: 660px;
  margin-top: 12px;
  color: rgba(73, 111, 82, 0.8);
  font-size: clamp(0.94rem, 1.16vw, 1.05rem);
  font-weight: 500;
  line-height: 1.65;
}

.habit-garden {
  width: min(1320px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(310px, 0.74fr) minmax(500px, 1.26fr);
  gap: 16px;
  align-items: stretch;
}

.habit-start-card {
  grid-column: 1 / -1;
}

.habit-garden .panel {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 2.5vw, 34px);
  border-color: rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 252, 247, 0.68)),
    rgba(255, 255, 255, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 20px 52px rgba(52, 45, 37, 0.12);
  backdrop-filter: blur(8px);
}

.habit-start-card {
  min-height: 226px;
  padding-left: clamp(34px, 4vw, 70px);
  padding-right: clamp(34px, 4vw, 70px);
}

.habit-start-card::after,
.habit-seeds-card::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 16px;
  width: 138px;
  height: 116px;
  opacity: 0.18;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 24% 70%, rgba(73, 111, 82, 0) 0 40%, rgba(73, 111, 82, 0.62) 42% 47%, rgba(73, 111, 82, 0) 50%),
    radial-gradient(ellipse at 40% 52%, rgba(73, 111, 82, 0) 0 40%, rgba(73, 111, 82, 0.58) 42% 47%, rgba(73, 111, 82, 0) 50%),
    radial-gradient(ellipse at 63% 38%, rgba(73, 111, 82, 0) 0 40%, rgba(73, 111, 82, 0.52) 42% 47%, rgba(73, 111, 82, 0) 50%),
    linear-gradient(135deg, transparent 0 22%, rgba(73, 111, 82, 0.66) 23% 25%, transparent 27%);
  transform: rotate(-20deg);
}

.habit-start-card .panel-title {
  display: grid;
  grid-template-columns: auto 1fr auto;
  justify-content: start;
  align-items: center;
  column-gap: 22px;
  margin-bottom: 6px;
}

.habit-start-card .panel-title::before {
  content: "01";
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73, 111, 82, 0.7);
  border-radius: 50%;
  color: #496f52;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.habit-start-card .panel-title h3,
.habit-energy-card .panel-title h3,
.habit-seeds-card .panel-title h3 {
  color: #183228;
  font-family: var(--font-display);
  font-size: clamp(1.48rem, 2.25vw, 2.02rem);
  font-weight: 700;
  line-height: 1.12;
}

.habit-start-card .panel-title span {
  justify-self: end;
  color: rgba(73, 111, 82, 0.78);
  font-size: 0.98rem;
  font-weight: 700;
}

.habit-start-card .panel-title span::before {
  content: "芽";
  margin-right: 8px;
  color: rgba(127, 179, 140, 0.86);
}

.habit-start-card > p,
.habit-energy-card > p {
  margin: 10px 0 22px;
  color: rgba(73, 111, 82, 0.78);
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  line-height: 1.75;
}

.habit-start-card > p {
  margin-left: 78px;
}

.habit-custom-start {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(200px, 270px);
  gap: 22px;
  margin-top: 18px;
  align-items: center;
}

.habit-custom-start::before {
  content: "✎";
  position: absolute;
  left: 18px;
  top: 50%;
  z-index: 2;
  color: rgba(119, 107, 78, 0.58);
  font-size: 1.38rem;
  transform: translateY(-50%);
}

.habit-custom-start input {
  width: 100%;
  border: 1px solid rgba(73, 111, 82, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #183228;
  font: 500 1.02rem/1.55 var(--font-ui);
  padding: 17px 18px;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 8px 22px rgba(24, 50, 40, 0.045);
}

.habit-custom-start input {
  min-height: 58px;
  padding-left: 52px;
}

.habit-custom-start .primary {
  min-height: 62px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(92, 139, 75, 0.98), rgba(55, 104, 61, 0.98)),
    #496f52;
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 16px 28px rgba(39, 83, 52, 0.18);
}

.habit-custom-start .primary::before {
  content: "♧";
  margin-right: 12px;
  font-family: var(--font-ui);
}

.habit-start-card .habit-custom-start::after {
  content: "One focused 25 minutes is a win.";
  position: absolute;
  left: 0;
  bottom: -28px;
  color: rgba(98, 117, 106, 0.74);
  font-size: 0.88rem;
}

.habit-energy-card,
.habit-seeds-card {
  min-height: 220px;
}

.habit-energy-card .panel-title {
  display: grid;
  grid-template-columns: 86px 1fr;
  column-gap: 18px;
  align-items: center;
}

.habit-energy-card .panel-title::before,
.habit-seeds-card .panel-title::before {
  content: "☾";
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(127, 179, 140, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 68% 28%, rgba(217, 199, 122, 0.26), transparent 28%),
    rgba(239, 248, 236, 0.68);
  color: rgba(143, 130, 75, 0.72);
  font-size: 1.9rem;
}

.habit-energy-card .panel-title span {
  display: none;
}

.habit-energy-card > p {
  margin-left: 104px;
  margin-top: -20px;
  max-width: 270px;
}

.habit-energy-options {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px dashed rgba(73, 111, 82, 0.2);
  justify-items: center;
}

.habit-energy-options button {
  width: min(310px, 100%);
  min-height: 48px;
  border: 1px solid rgba(73, 111, 82, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  color: rgba(38, 71, 53, 0.8);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  padding: 0 18px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.habit-energy-options button::before {
  content: "♧";
  margin-right: 10px;
  color: rgba(73, 111, 82, 0.78);
}

.habit-energy-options button:not(:first-child) {
  display: none;
}

.habit-energy-options button:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 111, 82, 0.34);
  background: rgba(255, 255, 255, 0.72);
}

.habit-seeds-card {
  padding-left: clamp(28px, 3.6vw, 46px);
}

.habit-seeds-card .panel-title {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  column-gap: 18px;
  align-items: center;
}

.habit-seeds-card .panel-title::before {
  content: "♧";
  color: rgba(73, 111, 82, 0.66);
}

.habit-seeds-card .panel-title span {
  color: rgba(73, 111, 82, 0.72);
  font-size: 0.98rem;
  font-weight: 500;
}

.habit-seeds-card .panel-title::before {
  content: "";
  display: block;
  color: transparent;
  background:
    radial-gradient(ellipse at 42% 45%, transparent 0 47%, rgba(73, 111, 82, 0.64) 48% 50%, transparent 51%) center / 42% 42% no-repeat,
    radial-gradient(ellipse at 59% 40%, transparent 0 47%, rgba(73, 111, 82, 0.58) 48% 50%, transparent 51%) center / 42% 42% no-repeat,
    linear-gradient(88deg, transparent 0 48%, rgba(73, 111, 82, 0.62) 49% 51%, transparent 52%) center / 38% 48% no-repeat,
    linear-gradient(142deg, transparent 0 54%, rgba(73, 111, 82, 0.48) 55% 57%, transparent 58%) center / 40% 40% no-repeat,
    linear-gradient(38deg, transparent 0 53%, rgba(73, 111, 82, 0.44) 54% 56%, transparent 57%) center / 40% 40% no-repeat,
    radial-gradient(ellipse at 50% 67%, rgba(73, 111, 82, 0.16) 0 12%, transparent 13%) center / 46% 46% no-repeat,
    linear-gradient(145deg, rgba(250, 253, 247, 0.9), rgba(232, 244, 228, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 22px rgba(73, 111, 82, 0.07);
}

.habit-seeds-card::before {
  content: "";
  position: absolute;
  right: 20px;
  top: 18px;
  width: 118px;
  height: 68px;
  opacity: 0.14;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 22% 68%, transparent 0 42%, rgba(73, 111, 82, 0.62) 44% 48%, transparent 50%),
    radial-gradient(ellipse at 43% 49%, transparent 0 42%, rgba(73, 111, 82, 0.56) 44% 48%, transparent 50%),
    radial-gradient(ellipse at 68% 33%, transparent 0 42%, rgba(73, 111, 82, 0.5) 44% 48%, transparent 50%),
    linear-gradient(145deg, transparent 0 24%, rgba(73, 111, 82, 0.58) 25% 27%, transparent 28%);
  transform: rotate(12deg);
}

.habit-energy-card::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: 14px;
  width: 74px;
  height: 46px;
  opacity: 0.11;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 76%, rgba(255, 255, 255, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 52% 30%, rgba(127, 179, 140, 0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 58%, rgba(255, 255, 255, 0.9) 0 3px, transparent 4px);
}

.habit-seed-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
  overflow: hidden;
  transition: box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.habit-seed-list.is-highlighted {
  border-color: rgba(127, 179, 140, 0.34);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 0 0 5px rgba(127, 179, 140, 0.12);
}

.habit-seed-status-button {
  width: min(310px, 100%);
  min-height: 48px;
  justify-self: center;
  margin: 22px auto 0;
  border: 1px solid rgba(73, 111, 82, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  color: rgba(38, 71, 53, 0.8);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  padding: 0 18px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.habit-seed-status-button::before {
  content: "♧";
  margin-right: 10px;
  color: rgba(73, 111, 82, 0.78);
}

.habit-seed-status-button:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 111, 82, 0.34);
  background: rgba(255, 255, 255, 0.72);
}

.habit-seed {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 0;
  border-right: 1px solid rgba(73, 111, 82, 0.08);
  border-radius: 0;
  background: transparent;
  padding: 10px 12px;
}

.habit-seed:last-child {
  border-right: 0;
}

.habit-seed > span,
.habit-stage > span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(127, 179, 140, 0.18);
  color: #496f52;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
}

.habit-seed b,
.habit-stage p {
  color: #183228;
  font-weight: 700;
}

.habit-seed b {
  font-size: 0.92rem;
}

.habit-seed small {
  display: block;
  margin-top: 4px;
  color: rgba(98, 117, 106, 0.78);
  font-size: 0.78rem;
}

/* Habit Garden clarity and lightweight botanical detailing */
#view-habits .section-head .eyebrow {
  color: #4f735c;
  font-weight: 750;
}

#view-habits .section-head h2 {
  color: #173f30;
}

#view-habits .section-head .muted {
  color: #557365;
  font-weight: 550;
}

.habit-start-card .panel-title h3,
.habit-energy-card .panel-title h3,
.habit-seeds-card .panel-title h3 {
  color: #193f30;
}

.habit-start-card .panel-title span,
.habit-seeds-card .panel-title span {
  color: #52745e;
}

.habit-start-card > p,
.habit-energy-card > p {
  color: #587568;
  font-weight: 520;
}

.habit-custom-start input {
  color: #1d4635;
}

.habit-custom-start input::placeholder {
  color: #829489;
  opacity: 1;
}

.habit-energy-options button,
.habit-seed-status-button {
  color: #315b45;
  transition:
    transform 140ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.habit-custom-start .primary,
.habit-energy-options button,
.habit-seed-status-button,
.low-energy-back,
.low-energy-core-button,
.low-energy-option-grid button,
.low-energy-seed-button {
  -webkit-tap-highlight-color: transparent;
}

.habit-custom-start .primary:hover,
.low-energy-core-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.06) brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 18px 32px rgba(39, 83, 52, 0.22);
}

.habit-custom-start .primary:active,
.low-energy-core-button:active {
  transform: translateY(1px) scale(0.985);
  filter: saturate(0.96) brightness(0.97);
  box-shadow:
    inset 0 2px 5px rgba(24, 50, 40, 0.18),
    0 6px 14px rgba(39, 83, 52, 0.14);
}

.habit-energy-options button:hover,
.habit-seed-status-button:hover,
.low-energy-back:hover,
.low-energy-option-grid button:hover,
.low-energy-seed-button:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 111, 82, 0.4);
  background: rgba(250, 254, 248, 0.8);
  color: #214d38;
  box-shadow: 0 8px 20px rgba(39, 83, 52, 0.09);
}

.habit-energy-options button:active,
.habit-seed-status-button:active,
.low-energy-back:active,
.low-energy-option-grid button:active,
.low-energy-seed-button:active {
  transform: translateY(1px) scale(0.985);
  border-color: rgba(73, 111, 82, 0.34);
  background: rgba(232, 244, 228, 0.82);
  box-shadow: inset 0 2px 5px rgba(39, 83, 52, 0.1);
}

.habit-energy-options button.is-selected,
.habit-seed-status-button.is-selected {
  transform: translateY(1px) scale(0.985);
  border-color: rgba(73, 111, 82, 0.46);
  background: rgba(222, 239, 217, 0.88);
  color: #183f2d;
  box-shadow:
    inset 0 2px 5px rgba(39, 83, 52, 0.1),
    0 0 0 4px rgba(127, 179, 140, 0.12);
}

.habit-custom-start .primary:focus-visible,
.habit-energy-options button:focus-visible,
.habit-seed-status-button:focus-visible,
.low-energy-back:focus-visible,
.low-energy-core-button:focus-visible,
.low-energy-option-grid button:focus-visible,
.low-energy-seed-button:focus-visible {
  outline: 2px solid rgba(73, 111, 82, 0.72);
  outline-offset: 4px;
}

.low-energy-option-grid button.completed {
  color: #214d38;
  border-color: rgba(73, 111, 82, 0.44);
  background:
    linear-gradient(145deg, rgba(239, 248, 236, 0.92), rgba(255, 255, 255, 0.72)),
    rgba(239, 248, 236, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 0 4px rgba(127, 179, 140, 0.1);
}

.low-energy-option-grid button.completed span {
  background: rgba(73, 111, 82, 0.78);
  color: #fff;
}

.habit-seed b {
  color: #234d3b;
}

.habit-seed small {
  color: #667f72;
  font-weight: 550;
}

.habit-start-card::before {
  content: "";
  position: absolute;
  right: clamp(120px, 14vw, 210px);
  top: 28px;
  width: clamp(90px, 12vw, 168px);
  height: 38px;
  border-top: 1px solid rgba(73, 111, 82, 0.16);
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(5deg);
}

.habit-energy-card::before {
  content: "";
  position: absolute;
  right: 22px;
  top: 22px;
  width: 54px;
  height: 54px;
  border-top: 1px solid rgba(73, 111, 82, 0.14);
  border-right: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.habit-seeds-card .panel-title {
  position: relative;
  padding-bottom: 12px;
}

.habit-seeds-card .panel-title::after {
  content: "";
  position: absolute;
  left: 104px;
  right: 8px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(73, 111, 82, 0.18), rgba(73, 111, 82, 0));
  pointer-events: none;
}

#view-low-energy {
  position: relative;
  min-height: calc(100vh - 68px);
  align-content: start;
  gap: 18px;
  padding-block: clamp(28px, 5vh, 54px);
  overflow: hidden;
}

#view-low-energy::before,
#view-low-energy::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0.22;
}

#view-low-energy::before {
  left: 12px;
  top: 90px;
  width: 150px;
  height: 210px;
  border-left: 1px solid rgba(73, 111, 82, 0.42);
  border-radius: 50%;
  transform: rotate(18deg);
}

#view-low-energy::after {
  right: 24px;
  bottom: 12%;
  width: 120px;
  height: 180px;
  border-right: 1px solid rgba(73, 111, 82, 0.38);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.low-energy-topbar,
.low-energy-shell {
  width: min(1320px, 100%);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.low-energy-topbar .eyebrow {
  color: rgba(73, 111, 82, 0.78);
  letter-spacing: 0.15em;
}

.low-energy-back {
  min-height: 44px;
  margin-top: 14px;
  border: 1px solid rgba(73, 111, 82, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: rgba(38, 71, 53, 0.82);
  font: 700 0.94rem/1 var(--font-ui);
  padding: 0 20px;
}

.low-energy-shell {
  display: grid;
  gap: 18px;
  padding: clamp(26px, 3vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 252, 247, 0.72)),
    rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 24px 58px rgba(52, 45, 37, 0.13);
  backdrop-filter: blur(8px);
}

.low-energy-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.low-energy-shell > :not(.low-energy-decor) {
  position: relative;
  z-index: 1;
}

.low-energy-sketch-tree {
  position: absolute;
  left: -56px;
  bottom: 4px;
  width: 270px;
  height: 270px;
  object-fit: contain;
  opacity: 0.16;
  filter: grayscale(0.35) sepia(0.18) hue-rotate(58deg) saturate(0.72);
  transform: rotate(-9deg);
}

.low-energy-sketch-branch {
  position: absolute;
  right: -56px;
  top: 248px;
  width: 230px;
  height: 210px;
  object-fit: contain;
  opacity: 0.13;
  filter: grayscale(0.25) sepia(0.15) hue-rotate(56deg) saturate(0.72);
  transform: rotate(13deg);
}

.low-energy-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.48);
  animation: low-energy-float 7s ease-in-out infinite;
}

.low-energy-particle::after {
  content: "";
  position: absolute;
  inset: -2px 1px 2px -1px;
  border-radius: 80% 10% 80% 10%;
  border: 1px solid rgba(127, 179, 140, 0.54);
  transform: rotate(38deg);
}

.particle-one {
  left: 12%;
  top: 22%;
  animation-delay: -1s;
}

.particle-two {
  left: 38%;
  top: 15%;
  width: 4px;
  height: 4px;
  animation-delay: -4s;
}

.particle-three {
  right: 14%;
  top: 31%;
  animation-delay: -2s;
}

.particle-four {
  right: 28%;
  bottom: 19%;
  width: 4px;
  height: 4px;
  animation-delay: -5s;
}

.particle-five {
  left: 29%;
  bottom: 11%;
  animation-delay: -3s;
}

.particle-six {
  right: 7%;
  bottom: 42%;
  width: 3px;
  height: 3px;
  animation-delay: -6s;
}

@keyframes low-energy-float {
  0%,
  100% {
    opacity: 0.28;
    transform: translate3d(0, 5px, 0) rotate(0deg);
  }
  50% {
    opacity: 0.72;
    transform: translate3d(5px, -10px, 0) rotate(12deg);
  }
}

.low-energy-hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 4px 110px 24px;
  border-bottom: 1px solid rgba(73, 111, 82, 0.12);
  text-align: center;
}

.low-energy-title-lockup {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 230px) auto;
  align-items: center;
  gap: clamp(8px, 1.6vw, 24px);
  padding-right: min(16vw, 220px);
}

.low-energy-title-lockup img {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  opacity: 0.32;
  filter: grayscale(0.28) sepia(0.14) hue-rotate(54deg) saturate(0.72);
  transform: rotate(-32deg) scale(1.08);
  transform-origin: center;
}

.low-energy-title-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(173, 207, 178, 0.82);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.18),
    0 0 12px rgba(153, 198, 164, 0.48);
  opacity: 0.34;
  pointer-events: none;
  animation: low-energy-title-drift 6.8s ease-in-out infinite;
}

.title-particle-one {
  left: 4%;
  top: 8%;
  animation-delay: -1.2s;
}

.title-particle-two {
  left: 18%;
  bottom: 10%;
  width: 3px;
  height: 3px;
  animation-delay: -4.1s;
}

.title-particle-three {
  left: 34%;
  top: -8%;
  animation-delay: -2.4s;
}

.title-particle-four {
  left: 45%;
  bottom: -12%;
  width: 3px;
  height: 3px;
  animation-delay: -5.6s;
}

.title-particle-five {
  right: 42%;
  top: 4%;
  width: 2px;
  height: 2px;
  animation-delay: -3.2s;
}

.title-particle-six {
  right: 29%;
  bottom: 2%;
  animation-delay: -6.1s;
}

.title-particle-seven {
  right: 16%;
  top: -4%;
  width: 3px;
  height: 3px;
  animation-delay: -2s;
}

.title-particle-eight {
  right: 3%;
  bottom: 18%;
  animation-delay: -4.8s;
}

@keyframes low-energy-title-drift {
  0%,
  100% {
    opacity: 0.2;
    transform: translate3d(-2px, 4px, 0) scale(0.8);
  }
  48% {
    opacity: 0.68;
    transform: translate3d(4px, -7px, 0) scale(1.12);
  }
  72% {
    opacity: 0.42;
    transform: translate3d(7px, -3px, 0) scale(0.94);
  }
}

.low-energy-hero h2 {
  color: #183228;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
}

.low-energy-hero p {
  margin-top: 12px;
  color: rgba(73, 111, 82, 0.72);
  font-size: clamp(0.96rem, 1.25vw, 1.08rem);
}

.low-energy-keep {
  position: absolute;
  right: 0;
  top: 8px;
  color: rgba(73, 111, 82, 0.76);
  font-size: 0.9rem;
  font-weight: 700;
}

.low-energy-keep::before {
  content: "芽";
  margin-right: 8px;
  color: rgba(127, 179, 140, 0.9);
}

.low-energy-rules {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}

.low-energy-rules span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(73, 111, 82, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: rgba(38, 71, 53, 0.76);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0 18px;
}

.low-energy-task-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
  gap: 30px;
  padding: 20px 22px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.low-energy-core {
  padding-right: 30px;
  border-right: 1px solid rgba(73, 111, 82, 0.12);
}

.low-energy-label {
  color: rgba(73, 111, 82, 0.84);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.low-energy-label::before {
  content: "✦";
  margin-right: 10px;
  color: rgba(127, 179, 140, 0.9);
}

.low-energy-core-button {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(92, 139, 75, 0.98), rgba(55, 104, 61, 0.98)),
    #496f52;
  color: rgba(255, 255, 255, 0.96);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(39, 83, 52, 0.16);
}

.low-energy-core small,
.low-energy-optional small {
  display: block;
  margin-top: 20px;
  color: rgba(98, 117, 106, 0.7);
  font-size: 0.78rem;
  text-align: center;
}

.low-energy-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.low-energy-option-grid button {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(73, 111, 82, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: rgba(38, 71, 53, 0.8);
  font: 700 0.9rem/1.35 var(--font-ui);
  padding: 10px 16px;
  text-align: left;
}

.low-energy-option-grid button span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(127, 179, 140, 0.16);
  color: #496f52;
  font-size: 0.72rem;
}

.low-energy-option-grid button.completed {
  border-color: rgba(127, 179, 140, 0.42);
  background: rgba(239, 248, 236, 0.78);
  box-shadow: 0 0 0 4px rgba(127, 179, 140, 0.1);
}

.low-energy-tree-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
}

.low-energy-tree-panel h3 {
  margin-top: 5px;
  color: #183228;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.low-energy-tree-panel p:not(.eyebrow) {
  margin-top: 4px;
  color: rgba(73, 111, 82, 0.7);
  font-size: 0.86rem;
}

.low-energy-seed-button {
  width: min(310px, 100%);
  min-height: 48px;
  border: 1px solid rgba(73, 111, 82, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  color: rgba(38, 71, 53, 0.8);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.low-energy-footer {
  padding-top: 14px;
  border-top: 1px dashed rgba(73, 111, 82, 0.16);
  color: rgba(98, 117, 106, 0.68);
  font-size: 0.86rem;
  text-align: center;
}

#view-work {
  position: relative;
  min-height: calc(100vh - 68px);
  display: none;
  align-content: start;
  gap: clamp(28px, 5vh, 46px);
  padding-block: clamp(42px, 7vh, 76px);
  overflow: hidden;
  isolation: isolate;
}

#view-work.active {
  display: grid;
}

#view-work::before,
#view-work::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

#view-work::before {
  width: min(360px, 38vw);
  height: min(360px, 38vw);
  right: -120px;
  top: 8%;
  z-index: -2;
  border: 1px solid rgba(127, 179, 140, 0.16);
  border-radius: 50%;
  border-left-color: transparent;
  border-bottom-color: transparent;
}

#view-work::after {
  left: min(4vw, 42px);
  bottom: 9%;
  width: 170px;
  height: 118px;
  z-index: -1;
  border-left: 1px solid rgba(73, 111, 82, 0.12);
  border-bottom: 1px solid rgba(73, 111, 82, 0.08);
  border-radius: 0 0 0 70px;
  transform: rotate(-8deg);
}

.work-head {
  width: min(1180px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(360px, 640px) auto;
  align-items: end;
  justify-content: space-between;
  gap: clamp(28px, 6vw, 88px);
  text-align: left;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

#view-work .section-head h2 {
  max-width: 680px;
  margin-top: 14px;
  color: #123d2e;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.8vw, 5.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
}

#view-work .section-head .muted {
  max-width: 520px;
  margin-top: 22px;
  color: rgba(29, 61, 49, 0.82);
  font-family: var(--font-ui);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.01em;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#view-work .section-head .muted::before {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  margin-bottom: 20px;
  background: rgba(73, 111, 82, 0.72);
}

#view-work .section-head .eyebrow {
  color: rgba(73, 111, 82, 0.82);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
}

#view-work .panel-title h3 {
  font-size: 1.12rem;
}

.work-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  gap: 6px;
  padding: 7px;
  margin-bottom: clamp(6px, 8vh, 82px);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(246, 243, 235, 0.58)),
    rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 42px rgba(52, 45, 37, 0.12);
  backdrop-filter: blur(10px);
}

.work-view-option {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(73, 111, 82, 0.74);
  font: 700 1.12rem/1 var(--font-ui);
  padding: 0 22px;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.work-view-option:hover {
  color: #183228;
  transform: translateY(-1px);
}

.work-view-option.active {
  background: rgba(255, 255, 255, 0.88);
  color: #183228;
  box-shadow: 0 10px 28px rgba(24, 50, 40, 0.09);
}

.work-view {
  display: none;
}

.work-view.active {
  display: block;
}

.work-view {
  width: min(1180px, 100%);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

#workAddView.active {
  display: grid;
  justify-items: end;
}

.work-form,
.work-list-panel {
  width: 100%;
  padding: clamp(24px, 3vw, 34px);
  border-color: rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 252, 247, 0.72)),
    rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 22px 56px rgba(52, 45, 37, 0.13);
  backdrop-filter: blur(8px);
}

.work-list-panel {
  position: relative;
  padding: clamp(24px, 3vw, 32px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(252, 249, 241, 0.76)),
    rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 24px 58px rgba(52, 45, 37, 0.14);
}

.work-list-panel::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 64%, rgba(73, 111, 82, 0) 0 15%, rgba(73, 111, 82, 0.65) 16% 20%, rgba(73, 111, 82, 0) 21%),
    radial-gradient(ellipse at 43% 46%, rgba(73, 111, 82, 0) 0 38%, rgba(73, 111, 82, 0.7) 40% 46%, rgba(73, 111, 82, 0) 48%),
    rgba(127, 179, 140, 0.16);
  opacity: 0.9;
}

.work-list-panel .panel-title {
  padding-left: 46px;
  margin-bottom: 18px;
}

.work-list-panel .panel-title span {
  color: rgba(73, 111, 82, 0.74);
  font-style: normal;
  font-weight: 700;
}

.work-goal-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 16px;
}

.work-goal-filter {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(73, 111, 82, 0.58);
  font: 700 1.05rem/1.2 var(--font-ui);
  padding: 5px 2px 7px;
  transition: color 160ms ease, border-color 160ms ease;
}

.work-goal-filter:hover,
.work-goal-filter.active {
  border-bottom-color: rgba(73, 111, 82, 0.62);
  color: #183228;
}

.work-goal-filter:focus-visible {
  outline: 2px solid rgba(73, 111, 82, 0.36);
  outline-offset: 4px;
}

.work-form {
  position: relative;
  width: min(620px, 100%);
  margin-inline: 0;
  padding: clamp(26px, 3.2vw, 42px);
  overflow: hidden;
}

.work-form::before,
.work-form::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.work-form::before {
  right: 36px;
  top: 70px;
  width: 170px;
  height: 74px;
  opacity: 0.16;
  border-top: 1px solid rgba(73, 111, 82, 0.62);
  border-radius: 50%;
  transform: rotate(10deg);
}

.work-form::after {
  right: 56px;
  top: 82px;
  width: 118px;
  height: 46px;
  opacity: 0.13;
  background:
    radial-gradient(ellipse at 15% 45%, rgba(73, 111, 82, 0) 0 45%, rgba(73, 111, 82, 0.65) 47% 50%, rgba(73, 111, 82, 0) 52%),
    radial-gradient(ellipse at 38% 35%, rgba(73, 111, 82, 0) 0 43%, rgba(73, 111, 82, 0.55) 46% 50%, rgba(73, 111, 82, 0) 53%),
    radial-gradient(ellipse at 63% 42%, rgba(73, 111, 82, 0) 0 43%, rgba(73, 111, 82, 0.52) 46% 50%, rgba(73, 111, 82, 0) 53%),
    linear-gradient(95deg, transparent 0 10%, rgba(73, 111, 82, 0.62) 10% 12%, transparent 14%);
  transform: rotate(9deg);
}

.work-form .panel-title {
  position: relative;
  z-index: 1;
  align-items: start;
  margin-bottom: 18px;
}

.work-form .panel-title h3 {
  color: #123d2e;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.1;
}

.work-form .panel-title span {
  color: rgba(73, 111, 82, 0.72);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.work-form label,
.work-note-wrap label {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  color: rgba(38, 71, 53, 0.78);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
}

.work-form input,
.work-note-wrap textarea {
  width: 100%;
  border: 1px solid rgba(73, 111, 82, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #183228;
  font: 500 1rem/1.5 var(--font-ui);
  padding: 13px 15px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.work-form input:focus,
.work-note-wrap textarea:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(73, 111, 82, 0.28);
  box-shadow: 0 0 0 4px rgba(127, 179, 140, 0.12);
}

.work-form-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.work-form .primary {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  min-height: 52px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(85, 135, 96, 0.96), rgba(43, 99, 64, 0.98)),
    #376c45;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 14px 26px rgba(39, 83, 52, 0.18);
}

.work-goal-list {
  display: grid;
  gap: 14px;
}

.work-goal-card {
  border: 1px solid rgba(73, 111, 82, 0.12);
  border-radius: 8px;
  min-height: 146px;
  padding: 22px 22px 18px 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(252, 250, 244, 0.76)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 24px rgba(24, 50, 40, 0.07);
  position: relative;
  overflow: hidden;
}

.work-goal-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(127, 179, 140, 0.72), rgba(217, 199, 122, 0.46));
}

.work-goal-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 92px;
  height: 56px;
  opacity: 0.2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 16% 72%, rgba(73, 111, 82, 0) 0 40%, rgba(73, 111, 82, 0.68) 42% 47%, rgba(73, 111, 82, 0) 50%),
    radial-gradient(ellipse at 34% 52%, rgba(73, 111, 82, 0) 0 42%, rgba(73, 111, 82, 0.64) 44% 49%, rgba(73, 111, 82, 0) 52%),
    radial-gradient(ellipse at 58% 34%, rgba(73, 111, 82, 0) 0 42%, rgba(73, 111, 82, 0.58) 44% 49%, rgba(73, 111, 82, 0) 52%),
    linear-gradient(142deg, transparent 0 18%, rgba(73, 111, 82, 0.68) 19% 21%, transparent 23%);
  transform: rotate(-22deg);
}

.work-goal-card.done {
  opacity: 0.72;
}

.work-goal-main {
  display: flex;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 74px);
  align-items: start;
  position: relative;
  z-index: 1;
}

.work-goal-content {
  min-width: 0;
  display: grid;
  justify-items: start;
}

.work-goal-main h3 {
  margin-top: 7px;
  color: #183228;
  font-family: var(--font-ui);
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0;
}

.work-deadline {
  flex: 0 0 auto;
  min-width: 164px;
  margin-top: 2px;
  border: 1px solid rgba(217, 199, 122, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 253, 241, 0.9), rgba(251, 245, 220, 0.62)),
    rgba(255, 248, 213, 0.66);
  color: rgba(38, 71, 53, 0.72);
  padding: 14px 16px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 8px 18px rgba(24, 50, 40, 0.035);
}

.work-deadline b,
.work-deadline small {
  display: block;
}

.work-deadline b {
  color: #183228;
  font: italic 800 1.2rem/1.18 var(--font-ui);
}

.work-deadline small {
  margin-top: 6px;
  color: rgba(73, 111, 82, 0.78);
  font: italic 650 0.92rem/1.25 var(--font-ui);
}

.work-deadline.soon {
  border-color: rgba(217, 199, 122, 0.55);
  background: rgba(255, 248, 213, 0.68);
  color: #806b26;
}

.work-deadline.overdue {
  border-color: rgba(181, 89, 82, 0.36);
  background: rgba(255, 235, 231, 0.7);
  color: #9a463f;
}

.work-deadline.done {
  border-color: rgba(127, 179, 140, 0.32);
  background: rgba(239, 248, 236, 0.76);
  color: #496f52;
}

.work-note-wrap {
  margin-top: 18px;
  font-size: 0.8rem;
}

.work-note-wrap summary {
  width: fit-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(73, 111, 82, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: rgba(73, 111, 82, 0.82);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 750;
  list-style: none;
  padding: 0 11px;
}

.work-note-wrap summary::-webkit-details-marker {
  display: none;
}

.work-note-wrap summary::before {
  content: "+";
  margin-right: 7px;
  font-weight: 800;
}

.work-note-wrap[open] summary::before {
  content: "-";
}

.work-note-wrap label {
  margin-top: 10px;
}

.work-note-wrap textarea {
  min-height: 74px;
  resize: vertical;
  font-weight: 500;
}

.work-goal-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.work-goal-actions .primary,
.work-goal-actions .secondary {
  min-height: 42px;
  border-radius: 8px;
  padding-inline: 22px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
}

.work-completed {
  color: rgba(73, 111, 82, 0.74);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
}

.work-empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border: 1px dashed rgba(73, 111, 82, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(239, 248, 236, 0.42)),
    rgba(255, 255, 255, 0.52);
  color: rgba(38, 71, 53, 0.68);
  text-align: center;
}

.work-empty-state p {
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.8;
}

.today-panel,
.panel,
.ritual-stage,
.timer-panel {
  border: 1px solid rgba(73, 111, 82, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.today-panel {
  margin-top: auto;
  padding: 18px 16px 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(244, 250, 241, 0.46)),
    rgba(255, 255, 255, 0.58);
  border-color: rgba(73, 111, 82, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 14px 34px rgba(24, 50, 40, 0.07);
}

.today-panel .eyebrow {
  color: rgba(73, 111, 82, 0.66);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.copyright {
  color: rgba(98, 117, 106, 0.56);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.date-line {
  margin-top: 8px;
  color: #244233;
  font-family: var(--font-ui);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.55;
}

.mini-grid {
  display: grid;
  gap: 0;
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(73, 111, 82, 0.1);
}

.mini-grid span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  color: rgba(98, 117, 106, 0.86);
  font-size: 0.86rem;
}

.mini-grid span + span {
  border-top: 1px solid rgba(73, 111, 82, 0.07);
}

.mini-grid b {
  color: #264735;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
}

.main {
  padding: 34px;
  display: grid;
  gap: 22px;
}

.immersive-mode .app-shell {
  grid-template-columns: 1fr;
}

.immersive-mode .sidebar,
.immersive-mode .settings-dock {
  display: none;
}

.immersive-mode .main {
  min-height: 100vh;
  padding: 0;
  gap: 0;
}

.immersive-mode .app-shell::before {
  background:
    linear-gradient(120deg, rgba(243, 248, 241, 0.5), rgba(243, 248, 241, 0.28) 48%, rgba(73, 111, 82, 0.24)),
    var(--active-bg, none);
  background-size: cover;
  background-position: center;
}

.morning-mode .app-shell::before {
  background:
    radial-gradient(circle at 50% 32%, rgba(247, 255, 247, 0.32), transparent 34%),
    linear-gradient(180deg, rgba(206, 231, 210, 0.28), rgba(24, 50, 40, 0.18)),
    var(--active-bg, none);
  background-size: cover;
  background-position: center;
}

.morning-mode #view-morning {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 48px);
  display: flex;
  flex-direction: column;
}

.night-mode #view-night {
  min-height: 100vh;
  padding: clamp(26px, 5vw, 72px) clamp(18px, 4vw, 52px);
  display: flex;
  flex-direction: column;
}

.immersive-home {
  position: absolute;
  left: clamp(18px, 4vw, 48px);
  top: clamp(18px, 4vw, 48px);
  z-index: 8;
  min-height: 42px;
  border: 1px solid rgba(247, 255, 247, 0.26);
  border-radius: 8px;
  background: rgba(247, 251, 245, 0.16);
  color: #f7fff7;
  padding: 0 16px;
  font-weight: 600;
  letter-spacing: 0;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(10, 24, 18, 0.12);
}

.immersive-home:hover {
  background: rgba(247, 251, 245, 0.26);
  border-color: rgba(247, 255, 247, 0.42);
}

.morning-mode #view-morning .immersive-home {
  left: clamp(22px, 4.5vw, 58px);
  top: clamp(86px, 11vh, 128px);
}

.night-mode #view-night .immersive-home {
  left: max(clamp(18px, 4vw, 52px), calc((100vw - 1120px) / 2));
  top: clamp(112px, 13vh, 156px);
}

.night-mode #view-night .night-home-action {
  position: static;
  min-height: 48px;
  padding: 0 22px;
  background: rgba(247, 251, 245, 0.11);
  box-shadow: none;
}

.morning-mode #view-morning .section-head {
  width: min(780px, 100%);
  margin: clamp(24px, 5vh, 54px) auto 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f7fff7;
  text-shadow: 0 2px 18px rgba(10, 24, 18, 0.42);
}

.morning-mode #view-morning .section-head h2 {
  max-width: 620px;
  margin: 8px auto 0;
  font-size: clamp(1.7rem, 3.4vw, 3.25rem);
  line-height: 1.16;
  font-weight: 500;
}

.morning-subtitle {
  margin-top: 18px;
  color: rgba(247, 255, 247, 0.82);
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 1.45vw, 1.18rem);
  line-height: 1.85;
  font-weight: 400;
}

.morning-mode #view-morning .section-head .icon-button {
  position: absolute;
  right: clamp(18px, 4vw, 48px);
  top: clamp(18px, 4vw, 48px);
}

.morning-mode #view-morning .audio-toggle,
.night-mode #view-night .audio-toggle {
  width: 58px;
  min-width: 58px;
  height: 46px;
  padding: 0;
  border-color: rgba(247, 255, 247, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(247, 251, 245, 0.1)),
    rgba(247, 251, 245, 0.16);
  color: #f7fff7;
  display: grid;
  place-items: center;
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 32px rgba(10, 24, 18, 0.16);
}

.morning-mode #view-morning .audio-toggle span,
.night-mode #view-night .audio-toggle span {
  width: 26px;
  height: 24px;
  position: relative;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(10, 24, 18, 0.25));
}

.morning-mode #view-morning .audio-toggle span::before,
.night-mode #view-night .audio-toggle span::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.morning-mode #view-morning .audio-toggle span::after,
.night-mode #view-night .audio-toggle span::after {
  content: "";
  position: absolute;
  right: 0;
  top: 2px;
  width: 14px;
  height: 16px;
  border-top: 3px solid currentColor;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
  border-radius: 4px 5px 0 0;
  transform: skewY(-9deg);
  opacity: 0.7;
}

.morning-mode #view-morning .audio-toggle.active,
.night-mode #view-night .audio-toggle.active {
  background: rgba(185, 219, 200, 0.34);
  color: #ffffff;
  border-color: rgba(247, 255, 247, 0.58);
}

.morning-mode #view-morning .audio-toggle.active span::before,
.night-mode #view-night .audio-toggle.active span::before {
  left: 4px;
  top: 4px;
  width: 5px;
  height: 16px;
  border: 0;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 8px 0 0 currentColor;
}

.morning-mode #view-morning .audio-toggle.active span::after,
.night-mode #view-night .audio-toggle.active span::after {
  content: "";
  position: absolute;
  right: 1px;
  top: -1px;
  width: 8px;
  height: 8px;
  border: 2px solid rgba(247, 255, 247, 0.8);
  border-radius: 50%;
  background: rgba(127, 179, 140, 0.94);
  transform: none;
  opacity: 1;
}

.morning-mode #view-morning .audio-toggle:hover,
.night-mode #view-night .audio-toggle:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(247, 251, 245, 0.16)),
    rgba(247, 251, 245, 0.22);
  border-color: rgba(247, 255, 247, 0.52);
}


.morning-mode #view-morning .ritual-layout {
  flex: 1;
  display: grid;
  align-items: start;
}

.night-mode #view-night .night-layout {
  flex: 1;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 390px);
  align-items: center;
  gap: clamp(44px, 7vw, 92px);
  width: min(1120px, 100%);
  margin: 0 auto;
}

.morning-mode #view-morning .ritual-stage,
.night-mode #view-night .night-stage {
  min-height: 0;
  height: 100%;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  color: #f7fff7;
  text-shadow: 0 2px 20px rgba(10, 24, 18, 0.52);
}

.morning-mode #view-morning .ritual-stage {
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  padding-inline: clamp(18px, 7vw, 96px);
  padding-top: clamp(58px, 12vh, 120px);
}

.morning-mode #view-morning .ritual-stage h3 {
  max-width: min(760px, 90vw);
  font-size: clamp(1.55rem, 3.2vw, 2.8rem);
  line-height: 1.38;
  font-weight: 400;
}

.morning-mode #view-morning .ritual-stage p:not(.stage-label) {
  margin-left: auto;
  margin-right: auto;
}

.morning-mode #view-morning .action-row {
  justify-content: center;
  margin-top: 42px;
}

.night-mode #view-night .night-stage h3 {
  max-width: min(690px, 100%);
  font-size: clamp(1.85rem, 3.35vw, 3.2rem);
  line-height: 1.24;
  font-weight: 400;
}

.night-mode #view-night .night-stage {
  justify-content: center;
  padding: clamp(40px, 7vh, 96px) 0 clamp(34px, 6vh, 76px);
}

.night-mode #view-night .night-stage p:not(.stage-label) {
  max-width: 520px;
  line-height: 2;
  margin-top: 20px;
  opacity: 0.88;
}

.night-mode #view-night .night-progress {
  max-width: 500px;
  height: 7px;
  margin-top: 34px;
  background: rgba(247, 255, 247, 0.14);
}

.night-mode #view-night .action-row {
  margin-top: 34px;
  gap: 14px;
}

.night-mode #view-night .primary,
.night-mode #view-night .secondary {
  min-height: 48px;
  border-color: rgba(247, 255, 247, 0.24);
  color: #f7fff7;
  backdrop-filter: blur(12px);
  padding: 0 22px;
}

.night-mode #view-night .primary {
  background: rgba(73, 111, 82, 0.38);
}

.night-mode #view-night .secondary {
  background: rgba(247, 251, 245, 0.11);
}

.night-mode #view-night .stage-label {
  margin-bottom: 16px;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.step-transition .stage-label,
.step-transition h3,
.step-transition p:not(.stage-label),
.step-transition .inline-record,
.step-transition .night-progress {
  animation: stepFadeIn 420ms ease both;
}

.step-transition h3 {
  animation-delay: 35ms;
}

.step-transition p:not(.stage-label),
.step-transition .inline-record,
.step-transition .night-progress {
  animation-delay: 80ms;
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-transition .stage-label,
  .step-transition h3,
  .step-transition p:not(.stage-label),
  .step-transition .inline-record,
  .step-transition .night-progress {
    animation: none;
  }

  .water-fill span,
  .timer-ring::before,
  .water-fill::before,
  .time-glass span,
  .time-glass span:nth-child(n + 4) {
    animation: none;
  }
}

.morning-mode #view-morning .stage-label,
.morning-mode #view-morning .ritual-stage p:not(.stage-label),
.night-mode #view-night .stage-label,
.night-mode #view-night .ritual-stage p:not(.stage-label) {
  color: rgba(247, 255, 247, 0.9);
}

.morning-mode #view-morning .inline-record {
  width: min(460px, 100%);
  background: rgba(247, 251, 245, 0.18);
  border-color: rgba(247, 255, 247, 0.22);
  backdrop-filter: blur(18px);
  text-shadow: none;
}

.morning-mode #view-morning label {
  color: #f7fff7;
}

.meditation-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meditation-option {
  min-height: 44px;
  border: 1px solid rgba(247, 255, 247, 0.2);
  border-radius: 8px;
  background: rgba(247, 251, 245, 0.14);
  color: #f7fff7;
  padding: 0 12px;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.meditation-option:hover {
  background: rgba(247, 251, 245, 0.24);
  border-color: rgba(247, 255, 247, 0.38);
}

.morning-final-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.morning-final-option {
  min-height: 46px;
  border: 1px solid rgba(247, 255, 247, 0.2);
  border-radius: 8px;
  background: rgba(247, 251, 245, 0.14);
  color: #f7fff7;
  font-weight: 600;
  padding: 0 14px;
  backdrop-filter: blur(12px);
}

.morning-final-option:hover,
.morning-final-option.active {
  background: rgba(247, 251, 245, 0.3);
  border-color: rgba(247, 255, 247, 0.52);
}

.morning-calendar-setting {
  display: grid;
  gap: 8px;
}

.morning-calendar-setting.is-hidden {
  display: none;
}

.morning-mode #view-morning .primary,
.morning-mode #view-morning .secondary {
  background: rgba(247, 251, 245, 0.2);
  border-color: rgba(247, 255, 247, 0.28);
  color: #f7fff7;
  backdrop-filter: blur(12px);
}

.morning-mode #view-morning .primary {
  background: rgba(73, 111, 82, 0.42);
}

.night-mode #view-night .section-head {
  width: min(1120px, 100%);
  margin: 0 auto clamp(30px, 5vh, 66px);
  align-items: center;
  position: relative;
  color: #f7fff7;
  text-shadow: 0 2px 20px rgba(10, 24, 18, 0.52);
}

.night-mode #view-night .section-head .eyebrow {
  color: rgba(247, 255, 247, 0.86);
}

.night-mode #view-night .section-head h2 {
  max-width: 660px;
  margin-top: 12px;
  font-size: clamp(1.65rem, 2.55vw, 2.55rem);
  line-height: 1.28;
  font-weight: 400;
  opacity: 0.94;
}

.night-mode #view-night .section-head .audio-toggle {
  position: absolute;
  right: 0;
  top: 0;
}

.night-mode #view-night #nightSettings {
  width: 100%;
  position: relative;
  z-index: 2;
  padding: clamp(20px, 2.4vw, 30px);
  gap: 20px;
  background: rgba(12, 28, 20, 0.18);
  border-color: rgba(247, 255, 247, 0.14);
  border-radius: 8px;
  color: #f7fff7;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(6, 18, 12, 0.1);
}

.night-mode #view-night #nightSettings .panel-title span {
  color: rgba(247, 255, 247, 0.88);
}

.night-mode #view-night #nightSettings .panel-title {
  margin-bottom: 2px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(247, 255, 247, 0.1);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.home-view {
  min-height: calc(100vh - 68px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(38px, 6.5vh, 72px);
  padding-block: clamp(24px, 4vh, 44px);
  position: relative;
}

.home-copy {
  max-width: 720px;
  text-align: center;
}

.language-toggle {
  position: absolute;
  top: clamp(4px, 1.4vw, 18px);
  right: 0;
  min-height: 40px;
  border: 1px solid rgba(73, 111, 82, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(241, 249, 238, 0.5)),
    rgba(255, 255, 255, 0.54);
  color: rgba(38, 71, 53, 0.72);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 12px 28px rgba(24, 50, 40, 0.07);
  backdrop-filter: blur(12px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.language-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 111, 82, 0.24);
  background: rgba(255, 255, 255, 0.76);
}

.language-toggle [data-lang-label] {
  opacity: 0.52;
}

.language-toggle [data-lang-label].active {
  opacity: 1;
  color: #264735;
}

.global-language-toggle {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 30;
  min-height: 34px;
  padding: 0 11px;
  border-color: rgba(73, 111, 82, 0.12);
  background: rgba(249, 252, 248, 0.58);
  font-size: 0.76rem;
  box-shadow: 0 8px 22px rgba(24, 50, 40, 0.055);
  opacity: 0.74;
}

.global-language-toggle:hover,
.global-language-toggle:focus-visible {
  opacity: 1;
}

.immersive-mode .global-language-toggle {
  top: clamp(18px, 4vw, 48px);
  right: clamp(76px, 8vw, 112px);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(247, 251, 245, 0.18);
  color: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 26px rgba(18, 42, 30, 0.08);
  backdrop-filter: blur(14px);
}

.immersive-mode .global-language-toggle [data-lang-label].active {
  color: #fff;
}

.home-copy h2 {
  font-family: var(--font-display);
  margin: 14px 0 16px;
  font-size: clamp(1.9rem, 3.4vw, 3.3rem);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.home-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.9;
}

.home-grid {
  width: min(820px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.module-card[data-view="work"] {
  order: 1;
}

.module-card[data-view="focus"] {
  order: 2;
}

.module-card[data-view="morning"] {
  order: 3;
}

.module-card[data-view="night"] {
  order: 4;
}

.module-card[data-view="stats"] {
  order: 5;
}

.module-card {
  min-height: 142px;
  border: 1px solid rgba(73, 111, 82, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(24, 50, 40, 0.065);
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
  text-align: left;
  backdrop-filter: blur(6px);
}

.module-card span {
  width: 38px;
  height: 38px;
  grid-row: span 2;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(127, 179, 140, 0.12);
  font-size: 1.08rem;
}

.module-card strong {
  font-family: var(--font-ui);
  font-size: 1.12rem;
  font-weight: 700;
}

.module-card small {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.9rem;
}

.module-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(73, 111, 82, 0.2);
}

.block-shell {
  --block-accent: #8bb8bf;
  --block-accent-strong: #4f8692;
  --block-ink: #19343a;
  --block-muted: rgba(25, 52, 58, 0.68);
  --block-panel: rgba(250, 254, 252, 0.72);
  --block-border: rgba(255, 255, 255, 0.46);
  --block-bg: url("https://images.unsplash.com/photo-1517322479358-df90f951f87d?auto=format&fit=crop&w=2400&q=85");
  min-height: calc(100vh - 68px);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: clamp(24px, 4vw, 48px);
  color: var(--block-ink);
  background:
    linear-gradient(115deg, rgba(245, 251, 250, 0.78), rgba(232, 245, 247, 0.46) 42%, rgba(37, 69, 78, 0.14)),
    var(--block-bg);
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 70px rgba(18, 43, 48, 0.16);
  isolation: isolate;
}

.block-theme-iceland {
  --block-accent: #93d6fb;
  --block-accent-strong: #3f97cf;
  --block-ink: #123b62;
  --block-muted: rgba(18, 59, 98, 0.7);
  --block-panel: rgba(226, 245, 255, 0.24);
  --block-border: rgba(255, 255, 255, 0.78);
  --block-bg: url("https://images.unsplash.com/photo-1768078557772-79741862c07d?auto=format&fit=crop&w=2400&q=88");
  background:
    radial-gradient(circle at 74% 5%, rgba(255, 255, 255, 0.76), transparent 18%),
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.5), transparent 31%),
    linear-gradient(180deg, rgba(226, 240, 250, 0.56) 0%, rgba(211, 229, 242, 0.46) 42%, rgba(112, 185, 224, 0.34) 100%),
    linear-gradient(135deg, rgba(213, 240, 255, 0.42), rgba(69, 164, 218, 0.18)),
    var(--block-bg);
  background-size: cover;
  background-position: center bottom;
  background-blend-mode: normal;
}

body.block-mode[data-block-theme="iceland"] {
  background:
    linear-gradient(110deg, rgba(248, 253, 255, 0.9), rgba(201, 228, 244, 0.72) 44%, rgba(130, 196, 228, 0.34)),
    #d7edf9;
}

body.block-mode[data-block-theme="iceland"] .app-shell::before {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, 0.62), transparent 18%),
    linear-gradient(180deg, rgba(232, 244, 252, 0.52), rgba(202, 226, 241, 0.4) 48%, rgba(91, 176, 222, 0.3)),
    url("https://images.unsplash.com/photo-1768078557772-79741862c07d?auto=format&fit=crop&w=2400&q=88");
  background-size: cover;
  background-position: center bottom;
  background-blend-mode: normal;
}

body.block-mode[data-block-theme="iceland"] .sidebar {
  border-right-color: rgba(96, 149, 188, 0.14);
  background:
    linear-gradient(180deg, rgba(249, 253, 255, 0.78), rgba(230, 244, 252, 0.58)),
    rgba(245, 251, 255, 0.46);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.52);
}

body.block-mode[data-block-theme="iceland"] .brand h1,
body.block-mode[data-block-theme="iceland"] .nav-tab,
body.block-mode[data-block-theme="iceland"] .date-line,
body.block-mode[data-block-theme="iceland"] .mini-grid b,
body.block-mode[data-block-theme="iceland"] .paper-entry {
  color: #244e75;
}

body.block-mode[data-block-theme="iceland"] .brand-mark {
  background: conic-gradient(from 130deg, #4b83ae, #9bd6f3, #f8fdff, #b8ddf0, #4b83ae);
}

body.block-mode[data-block-theme="iceland"] .nav-tab span {
  background: rgba(87, 145, 184, 0.1);
  color: rgba(36, 78, 117, 0.74);
}

body.block-mode[data-block-theme="iceland"] .nav-tab.active,
body.block-mode[data-block-theme="iceland"] .paper-entry.active,
body.block-mode[data-block-theme="iceland"] .today-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(226, 244, 254, 0.5)),
    rgba(255, 255, 255, 0.44);
  border-color: rgba(96, 149, 188, 0.18);
  box-shadow: 0 16px 36px rgba(47, 104, 145, 0.09);
}

body.block-mode[data-block-theme="iceland"] .paper-entry {
  border-color: rgba(96, 149, 188, 0.15);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(225, 244, 254, 0.54)),
    repeating-linear-gradient(180deg, transparent 0 21px, rgba(77, 132, 172, 0.11) 22px);
}

body.block-mode[data-block-theme="green"] .app-shell::before {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, 0.56), transparent 18%),
    linear-gradient(180deg, rgba(243, 255, 228, 0.48), rgba(215, 246, 169, 0.34) 48%, rgba(119, 194, 82, 0.26)),
    url("https://images.unsplash.com/photo-1531168556467-80aace0d0144?auto=format&fit=crop&w=2400&q=85");
  background-size: cover;
  background-position: center bottom;
}

body.block-mode[data-block-theme="purple"] .app-shell::before {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, 0.58), transparent 18%),
    linear-gradient(180deg, rgba(250, 236, 255, 0.5), rgba(234, 206, 252, 0.36) 48%, rgba(174, 110, 217, 0.28)),
    url("https://images.unsplash.com/photo-1477511801984-4ad318ed9846?auto=format&fit=crop&w=2400&q=85");
  background-size: cover;
  background-position: center bottom;
}

body.block-mode[data-block-theme="dark"] .app-shell::before {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, 0.28), transparent 18%),
    linear-gradient(180deg, rgba(12, 28, 44, 0.32), rgba(16, 48, 62, 0.34) 48%, rgba(6, 16, 24, 0.36)),
    url("https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=2400&q=85");
  background-size: cover;
  background-position: center;
}

.block-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.block-theme-iceland::before {
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.88) 0 2px, transparent 3px),
    radial-gradient(circle at 66% 16%, rgba(255, 255, 255, 0.58) 0 1.5px, transparent 3px),
    radial-gradient(circle at 52% 30%, rgba(255, 255, 255, 0.42) 0 2px, transparent 4px),
    linear-gradient(100deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.08) 36%, rgba(130, 196, 229, 0.04));
  background-size: 180px 180px, 220px 220px, 320px 320px, cover;
  mix-blend-mode: screen;
}

.block-theme-iceland::after {
  content: "";
  position: absolute;
  left: 2%;
  top: 8%;
  z-index: -1;
  width: 56%;
  aspect-ratio: 1.9;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  opacity: 0.58;
  transform: rotate(-11deg);
}

.block-theme-iceland .block-atmosphere {
  opacity: 0.94;
  background:
    radial-gradient(circle at 83% 7%, rgba(255, 255, 255, 0.86) 0 3px, transparent 5px),
    radial-gradient(circle at 69% 18%, rgba(255, 255, 255, 0.58) 0 5px, transparent 9px),
    radial-gradient(circle at 28% 60%, rgba(255, 255, 255, 0.4) 0 2px, transparent 4px),
    radial-gradient(circle at 88% 76%, rgba(255, 255, 255, 0.36) 0 7px, transparent 13px),
    linear-gradient(130deg, transparent 20%, rgba(255, 255, 255, 0.3), transparent 38%);
  background-size: 140px 140px, 260px 260px, 190px 190px, 360px 360px, 520px 100%;
  filter: blur(0.1px);
}

.block-theme-iceland .note-composer,
.block-theme-iceland #blockReadPanel {
  border-color: rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(176, 224, 249, 0.18)),
    rgba(219, 243, 255, 0.18);
  backdrop-filter: blur(24px) saturate(155%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -18px 44px rgba(83, 169, 216, 0.1),
    0 24px 60px rgba(47, 104, 145, 0.16);
}

.block-theme-iceland .block-theme-switch,
.block-theme-iceland .notes-toolbar,
.block-theme-iceland .notes-board {
  border-color: rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(161, 217, 247, 0.16)),
    rgba(215, 241, 255, 0.13);
  backdrop-filter: blur(18px) saturate(165%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    0 16px 36px rgba(47, 104, 145, 0.1);
}

.block-theme-iceland .block-theme-option,
.block-theme-iceland .recipient-option,
.block-theme-iceland .note-chip,
.block-theme-iceland .note-filter {
  border-color: rgba(255, 255, 255, 0.68);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(141, 207, 244, 0.22)),
    rgba(255, 255, 255, 0.16);
  color: #244e75;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.block-theme-iceland .block-theme-option.active,
.block-theme-iceland .recipient-option.active,
.block-theme-iceland .note-chip.active,
.block-theme-iceland .note-filter.active {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(139, 206, 244, 0.34)),
    rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 28px rgba(47, 104, 145, 0.12);
}

.block-theme-iceland #personalNoteText,
.block-theme-iceland .note-date-search input,
.block-theme-iceland .custom-note-delay input {
  border-color: rgba(255, 255, 255, 0.68);
  background:
    linear-gradient(rgba(239, 249, 255, 0.34), rgba(222, 244, 255, 0.24)),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(58, 113, 153, 0.1) 32px);
  color: #244e75;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 0 34px rgba(255, 255, 255, 0.2);
}

.block-theme-iceland .block-save-button {
  min-height: 52px;
  border-color: rgba(255, 255, 255, 0.88);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.88), transparent 44%),
    linear-gradient(135deg, rgba(156, 219, 253, 0.6), rgba(56, 151, 207, 0.58));
  color: #f7fdff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -10px 22px rgba(255, 255, 255, 0.18),
    0 16px 34px rgba(47, 104, 145, 0.2);
}

.block-theme-iceland .block-save-button.quiet {
  min-height: 44px;
  color: #244e75;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(141, 207, 244, 0.2)),
    rgba(255, 255, 255, 0.18);
}

.block-theme-iceland .notes-board {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.66) 0 1.5px, transparent 2.5px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(109, 190, 235, 0.18));
  background-size: 27px 27px, cover;
}

.block-theme-iceland .personal-note-card {
  border-color: rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(rgba(247, 252, 255, 0.72), rgba(247, 252, 255, 0.72)),
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(58, 113, 153, 0.12) 30px);
  color: #244e75;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 16px 34px rgba(47, 104, 145, 0.14);
}

.block-theme-green .note-composer,
.block-theme-green #blockReadPanel,
.block-theme-purple .note-composer,
.block-theme-purple #blockReadPanel {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), color-mix(in srgb, var(--block-accent) 28%, transparent)),
    var(--block-panel);
  backdrop-filter: blur(24px) saturate(155%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -18px 44px color-mix(in srgb, var(--block-accent) 18%, transparent),
    0 24px 60px rgba(47, 104, 84, 0.13);
}

.block-theme-green .block-theme-switch,
.block-theme-green .notes-toolbar,
.block-theme-green .notes-board,
.block-theme-purple .block-theme-switch,
.block-theme-purple .notes-toolbar,
.block-theme-purple .notes-board {
  border-color: rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.25), color-mix(in srgb, var(--block-accent) 24%, transparent)),
    rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(18px) saturate(165%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    0 16px 36px rgba(47, 104, 84, 0.1);
}

.block-theme-green .block-theme-option,
.block-theme-green .recipient-option,
.block-theme-green .note-chip,
.block-theme-green .note-filter,
.block-theme-purple .block-theme-option,
.block-theme-purple .recipient-option,
.block-theme-purple .note-chip,
.block-theme-purple .note-filter {
  border-color: rgba(255, 255, 255, 0.66);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), color-mix(in srgb, var(--block-accent) 25%, transparent)),
    rgba(255, 255, 255, 0.16);
  color: var(--block-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.block-theme-green .block-theme-option.active,
.block-theme-green .recipient-option.active,
.block-theme-green .note-chip.active,
.block-theme-green .note-filter.active,
.block-theme-purple .block-theme-option.active,
.block-theme-purple .recipient-option.active,
.block-theme-purple .note-chip.active,
.block-theme-purple .note-filter.active {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), color-mix(in srgb, var(--block-accent) 34%, transparent)),
    rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 28px rgba(47, 104, 84, 0.12);
}

.block-theme-green #personalNoteText,
.block-theme-green .note-date-search input,
.block-theme-green .custom-note-delay input,
.block-theme-purple #personalNoteText,
.block-theme-purple .note-date-search input,
.block-theme-purple .custom-note-delay input {
  border-color: rgba(255, 255, 255, 0.68);
  background:
    linear-gradient(rgba(255, 255, 255, 0.34), color-mix(in srgb, var(--block-accent) 18%, transparent)),
    repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in srgb, var(--block-ink) 13%, transparent) 32px);
  color: var(--block-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 0 34px rgba(255, 255, 255, 0.18);
}

.block-theme-green .block-save-button,
.block-theme-purple .block-save-button {
  min-height: 52px;
  border-color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.86), transparent 44%),
    linear-gradient(135deg, color-mix(in srgb, var(--block-accent) 72%, white), color-mix(in srgb, var(--block-accent-strong) 76%, transparent));
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -10px 22px rgba(255, 255, 255, 0.18),
    0 16px 34px color-mix(in srgb, var(--block-accent-strong) 28%, transparent);
}

.block-theme-green .block-save-button.quiet,
.block-theme-purple .block-save-button.quiet {
  min-height: 44px;
  color: var(--block-ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), color-mix(in srgb, var(--block-accent) 22%, transparent)),
    rgba(255, 255, 255, 0.18);
}

.block-theme-green .personal-note-card,
.block-theme-purple .personal-note-card {
  border-color: rgba(255, 255, 255, 0.74);
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(180deg, transparent 0 29px, color-mix(in srgb, var(--block-ink) 12%, transparent) 30px);
  color: var(--block-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 16px 34px color-mix(in srgb, var(--block-accent-strong) 20%, transparent);
}

.block-theme-green {
  --block-accent: #c9f28f;
  --block-accent-strong: #71b94d;
  --block-ink: #1e4527;
  --block-muted: rgba(30, 69, 39, 0.68);
  --block-panel: rgba(241, 255, 232, 0.25);
  --block-border: rgba(255, 255, 255, 0.72);
  --block-bg: url("https://images.unsplash.com/photo-1531168556467-80aace0d0144?auto=format&fit=crop&w=2400&q=85");
  background:
    radial-gradient(circle at 76% 8%, rgba(255, 255, 255, 0.58), transparent 18%),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.36), transparent 30%),
    linear-gradient(180deg, rgba(237, 252, 217, 0.48), rgba(205, 242, 154, 0.32) 45%, rgba(121, 199, 81, 0.28)),
    linear-gradient(135deg, rgba(230, 255, 188, 0.32), rgba(103, 185, 88, 0.14)),
    var(--block-bg);
  background-size: cover;
  background-position: center bottom;
}

.block-theme-purple {
  --block-accent: #e8c5ff;
  --block-accent-strong: #a36ad0;
  --block-ink: #45295f;
  --block-muted: rgba(69, 41, 95, 0.68);
  --block-panel: rgba(252, 240, 255, 0.25);
  --block-border: rgba(255, 255, 255, 0.72);
  --block-bg: url("https://images.unsplash.com/photo-1477511801984-4ad318ed9846?auto=format&fit=crop&w=2400&q=85");
  background:
    radial-gradient(circle at 76% 8%, rgba(255, 255, 255, 0.6), transparent 18%),
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.38), transparent 31%),
    linear-gradient(180deg, rgba(245, 232, 255, 0.48), rgba(231, 204, 250, 0.34) 45%, rgba(176, 112, 220, 0.3)),
    linear-gradient(135deg, rgba(255, 224, 251, 0.34), rgba(153, 99, 204, 0.14)),
    var(--block-bg);
  background-size: cover;
  background-position: center bottom;
}

.block-theme-dark {
  --block-accent: #b7f0dc;
  --block-accent-strong: #65c3b5;
  --block-ink: #f6fff9;
  --block-muted: rgba(246, 255, 249, 0.72);
  --block-panel: rgba(7, 18, 25, 0.36);
  --block-border: rgba(222, 255, 244, 0.18);
  --block-bg: url("https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=2400&q=85");
  background:
    linear-gradient(115deg, rgba(6, 16, 24, 0.46), rgba(15, 44, 54, 0.28) 44%, rgba(255, 255, 255, 0.1)),
    var(--block-bg);
  background-size: cover;
  background-position: center;
}

.block-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.68;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.44) 0 1px, transparent 2px),
    radial-gradient(circle at 64% 54%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px),
    linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.16) 21%, transparent 23%);
  background-size: 160px 160px, 220px 220px, 420px 100%;
}

.block-theme-green .block-atmosphere {
  opacity: 0.9;
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.8) 0 4px, transparent 8px),
    radial-gradient(circle at 28% 72%, rgba(255, 255, 255, 0.42) 0 1.5px, transparent 3px),
    repeating-radial-gradient(circle at 70% 74%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 18px),
    linear-gradient(130deg, transparent 20%, rgba(255, 255, 255, 0.22), transparent 42%);
}

.block-theme-purple .block-atmosphere {
  opacity: 0.9;
  background:
    radial-gradient(circle at 80% 8%, rgba(255, 255, 255, 0.82) 0 4px, transparent 8px),
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.48) 0 1.5px, transparent 3px),
    radial-gradient(circle at 72% 38%, rgba(255, 237, 251, 0.42) 0 1.5px, transparent 3px),
    linear-gradient(105deg, transparent 24%, rgba(255, 255, 255, 0.2), transparent 48%);
  background-size: 150px 150px, 210px 210px, 500px 100%;
}

.block-theme-dark .block-atmosphere {
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.66) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 42%, rgba(183, 240, 220, 0.52) 0 1px, transparent 2px),
    linear-gradient(120deg, transparent 18%, rgba(101, 195, 181, 0.18), transparent 45%);
}

.block-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
}

.block-head h2 {
  margin-top: 9px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0.025em;
  -webkit-text-stroke: 0.35px rgba(255, 255, 255, 0.58);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.38),
    0 18px 42px color-mix(in srgb, var(--block-accent-strong) 28%, transparent);
}

.block-head p:not(.eyebrow) {
  max-width: 560px;
  margin-top: 14px;
  color: var(--block-muted);
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: 1.02rem;
  line-height: 1.8;
}

.block-theme-switch,
.block-tabs,
.recipient-switch,
.note-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.block-theme-switch {
  position: relative;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 16px 34px rgba(18, 43, 48, 0.11);
}

.block-theme-option,
.block-tab,
.recipient-option,
.note-chip,
.note-filter {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  color: inherit;
  min-height: 36px;
  padding: 0 13px;
  backdrop-filter: blur(12px);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.block-theme-option {
  min-width: 76px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

.block-theme-option:hover,
.block-tab:hover,
.recipient-option:hover,
.note-chip:hover,
.note-filter:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.42);
}

.block-theme-option.active,
.block-tab.active,
.recipient-option.active,
.note-chip.active,
.note-filter.active {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(18, 43, 48, 0.1);
}

.block-panels {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.18fr);
  align-items: stretch;
  gap: clamp(18px, 3vw, 32px);
  margin-top: clamp(34px, 6vh, 58px);
}

.block-panel {
  display: block;
}

.block-panel.active {
  display: block;
}

#blockWritePanel {
  display: grid;
}

.note-composer {
  width: 100%;
  height: 100%;
  min-height: clamp(610px, 64vh, 720px);
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--block-border);
  border-radius: 8px;
  background: var(--block-panel);
  backdrop-filter: blur(24px);
  box-shadow: 0 22px 56px rgba(18, 43, 48, 0.13);
}

#blockReadPanel {
  min-height: clamp(610px, 64vh, 720px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 14px;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--block-border);
  border-radius: 8px;
  background: var(--block-panel);
  backdrop-filter: blur(24px);
  box-shadow: 0 22px 56px rgba(18, 43, 48, 0.13);
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  min-height: 54px;
  padding: 0 2px 2px;
}

.board-head h3 {
  margin-top: 8px;
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}

.board-head p:not(.eyebrow) {
  max-width: 320px;
  color: var(--block-muted);
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  line-height: 1.7;
  font-size: 0.94rem;
  text-align: right;
}

.composer-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.composer-top h3 {
  margin-top: 8px;
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: 1.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}

#personalNoteText {
  min-height: 126px;
  border-color: rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76)),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(63, 104, 92, 0.12) 32px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: 1.04rem;
  line-height: 1.9;
}

.note-control-group {
  display: grid;
  gap: 10px;
}

.note-composer .note-control-group:last-of-type {
  margin-bottom: auto;
}

.note-control-group > span {
  color: var(--block-muted);
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.note-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.custom-note-delay {
  width: auto;
  min-height: 36px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.26);
  color: inherit;
  font-weight: 400;
}

.custom-note-delay.active {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(255, 255, 255, 0.78);
}

.custom-note-delay input {
  width: 64px;
  height: 30px;
  padding: 4px 8px;
  border-color: rgba(73, 111, 82, 0.14);
  background: rgba(255, 255, 255, 0.66);
}

.custom-note-delay small {
  color: var(--block-muted);
}

.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.composer-actions p {
  color: var(--block-muted);
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: 0.9rem;
}

.block-save-button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  padding: 0 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.14)),
    linear-gradient(135deg, var(--block-accent), var(--block-accent-strong));
  color: #fff;
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  -webkit-text-stroke: 0.2px rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 16px 34px rgba(18, 43, 48, 0.15);
}

.block-save-button.quiet {
  background: rgba(255, 255, 255, 0.34);
  color: inherit;
}

.notes-toolbar {
  position: relative;
  z-index: 6;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.notes-toolbar .note-filter-row {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.note-date-search {
  position: relative;
  display: grid;
  gap: 6px;
  color: var(--block-muted);
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: 0.86rem;
  font-weight: 700;
}

.note-date-trigger {
  min-width: 190px;
  height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.48), color-mix(in srgb, var(--block-accent) 16%, transparent)),
    rgba(255, 255, 255, 0.26);
  color: var(--block-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  text-align: left;
  backdrop-filter: blur(14px);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.note-date-trigger:hover,
.note-date-trigger[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--block-accent-strong) 16%, transparent);
}

.note-date-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--block-accent-strong) 42%, transparent);
  outline-offset: 2px;
}

.note-date-trigger i {
  position: relative;
  width: 17px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  opacity: 0.68;
}

.note-date-trigger i::before {
  content: "";
  position: absolute;
  left: -1.5px;
  right: -1.5px;
  top: 4px;
  border-top: 1.5px solid currentColor;
}

.note-date-trigger i::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 3px;
  width: 7px;
  height: 4px;
  border-left: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.note-date-trigger b {
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-date-trigger em {
  width: 7px;
  height: 7px;
  justify-self: end;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.48;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.note-date-trigger[aria-expanded="true"] em {
  transform: rotate(225deg) translate(-2px, -1px);
}

.note-date-trigger.has-date::after {
  content: "";
  position: absolute;
  left: 29px;
  bottom: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--block-accent-strong);
}

.note-calendar[hidden] {
  display: none;
}

.note-calendar {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 16;
  width: min(310px, calc(100vw - 38px));
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), color-mix(in srgb, var(--block-accent) 22%, rgba(255, 255, 255, 0.72))),
    rgba(247, 252, 248, 0.82);
  color: var(--block-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 24px 60px color-mix(in srgb, var(--block-accent-strong) 24%, rgba(18, 43, 48, 0.15));
  backdrop-filter: blur(28px) saturate(150%);
  animation: note-calendar-in 180ms ease both;
}

@keyframes note-calendar-in {
  from { opacity: 0; transform: translateY(-5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.note-calendar-head,
.note-calendar-foot {
  display: grid;
  align-items: center;
  gap: 8px;
}

.note-calendar-head {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.note-calendar-head strong {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.note-calendar-head button,
.note-calendar-foot button {
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.34);
  color: inherit;
}

.note-calendar-head button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
}

.note-calendar-head button:hover,
.note-calendar-foot button:hover {
  background: rgba(255, 255, 255, 0.68);
}

.note-calendar-weekdays,
.note-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.note-calendar-weekdays span {
  padding-block: 2px;
  color: var(--block-muted);
  font-size: 0.66rem;
  text-align: center;
  opacity: 0.72;
}

.note-calendar-days button {
  position: relative;
  height: 28px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.note-calendar-days button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.58);
}

.note-calendar-days button.is-muted {
  opacity: 0.28;
}

.note-calendar-days button.is-today {
  border-color: color-mix(in srgb, var(--block-accent-strong) 46%, transparent);
}

.note-calendar-days button.is-selected {
  border-color: rgba(255, 255, 255, 0.8);
  background: color-mix(in srgb, var(--block-accent) 66%, rgba(255, 255, 255, 0.56));
  box-shadow: 0 7px 16px color-mix(in srgb, var(--block-accent-strong) 20%, transparent);
  font-weight: 700;
}

.note-calendar-days button.has-note::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--block-accent-strong);
  transform: translateX(-50%);
}

.note-calendar-foot {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--block-ink) 10%, transparent);
}

.note-calendar-foot button {
  min-height: 32px;
  border-radius: 7px;
  font-size: 0.72rem;
}

.block-theme-dark .note-date-trigger,
.block-theme-dark .note-calendar {
  border-color: rgba(222, 255, 244, 0.22);
  background:
    linear-gradient(145deg, rgba(18, 48, 54, 0.86), rgba(8, 23, 31, 0.82)),
    rgba(7, 18, 25, 0.86);
  color: #f6fff9;
}

.block-theme-dark .note-calendar-head button,
.block-theme-dark .note-calendar-foot button,
.block-theme-dark .note-calendar-days button:hover {
  border-color: rgba(222, 255, 244, 0.14);
  background: rgba(222, 255, 244, 0.08);
}

.mood-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  opacity: 0.72;
}

.mood-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  color: var(--block-muted);
  font-size: 0.78rem;
}

.notes-board {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  align-content: start;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--block-border);
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 2px, transparent 2.5px),
    rgba(255, 255, 255, 0.22);
  background-size: 28px 28px;
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.block-theme-green .notes-board {
  background:
    radial-gradient(circle, rgba(225, 255, 216, 0.55) 0 2px, transparent 2.5px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(184, 224, 139, 0.16));
  background-size: 32px 32px, cover;
}

.block-theme-purple .notes-board {
  background:
    radial-gradient(circle, rgba(255, 235, 255, 0.54) 0 2px, transparent 2.5px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(217, 178, 232, 0.14));
  background-size: 30px 30px, cover;
}

.block-theme-dark .notes-board {
  background:
    radial-gradient(circle, rgba(183, 240, 220, 0.46) 0 1.5px, transparent 2px),
    rgba(7, 18, 25, 0.32);
  background-size: 30px 30px;
}

.personal-note-card {
  min-height: 192px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 18px 17px 14px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(63, 104, 92, 0.13) 30px);
  color: #1d3129;
  box-shadow: 0 16px 34px rgba(18, 43, 48, 0.12);
  transform: rotate(var(--note-rotate));
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.personal-note-card:hover,
.personal-note-card.highlight {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 22px 44px rgba(18, 43, 48, 0.18);
}

.personal-note-card.highlight {
  outline: 2px solid var(--block-accent);
}

.note-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(29, 49, 41, 0.64);
  font-size: 0.78rem;
}

.note-card-meta small {
  margin-left: auto;
}

.personal-note-card p {
  line-height: 1.86;
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: 1.06rem;
  font-weight: 600;
}

.personal-note-card time {
  color: rgba(29, 49, 41, 0.52);
  font-size: 0.78rem;
}

.block-theme-dark .personal-note-card {
  border-color: rgba(12, 17, 22, 0.9);
  background:
    linear-gradient(rgba(245, 250, 246, 0.86), rgba(245, 250, 246, 0.86)),
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(12, 17, 22, 0.16) 30px);
  color: #0f1714;
}

.mood-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9fc8bd;
}

.mood-dot[data-mood="开心"] {
  background: #d8bd68;
}

.mood-dot[data-mood="疲惫"] {
  background: #98a5a0;
}

.mood-dot[data-mood="焦虑"] {
  background: #c99a8d;
}

.mood-dot[data-mood="期待"] {
  background: #8bb8bf;
}

.empty-note {
  min-height: 170px;
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  color: var(--block-muted);
  text-align: center;
  padding: 26px;
  background: rgba(255, 255, 255, 0.18);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 7px;
  border: 1px solid rgba(247, 255, 247, 0.1);
  border-radius: 8px;
  background: rgba(247, 251, 245, 0.045);
}

.music-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 7px;
  border: 1px solid rgba(247, 255, 247, 0.1);
  border-radius: 8px;
  background: rgba(247, 251, 245, 0.045);
}

.mode-option,
.music-option {
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(247, 251, 245, 0.07);
  color: #f7fff7;
  padding: 0 12px;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 600;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.music-option {
  min-height: 42px;
  font-weight: 700;
}

.mode-option:hover,
.music-option:hover {
  border-color: rgba(247, 255, 247, 0.2);
  transform: translateY(-1px);
}

.mode-option.active,
.music-option.active {
  background: rgba(247, 251, 245, 0.22);
  border-color: rgba(247, 255, 247, 0.36);
  box-shadow: 0 12px 30px rgba(6, 18, 12, 0.1);
}

.night-music {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  margin-top: 6px;
  border-top: 1px solid rgba(247, 255, 247, 0.1);
}

.night-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(247, 255, 247, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(10, 24, 18, 0.2);
}

.night-mode #view-night .night-player {
  position: fixed;
  right: clamp(18px, 4vw, 48px);
  top: auto;
  bottom: clamp(18px, 4vw, 48px);
  z-index: 9;
  width: min(320px, calc(100vw - 36px));
  max-width: none;
  opacity: 0.36;
  pointer-events: auto;
  box-shadow: 0 18px 44px rgba(10, 24, 18, 0.18);
  backdrop-filter: blur(10px);
  transition: opacity 180ms ease;
}

.night-mode #view-night .night-player:hover {
  opacity: 0.88;
}

.night-player.is-hidden {
  display: none;
}

.morning-player,
.night-floating-player {
  position: fixed;
  right: clamp(18px, 4vw, 48px);
  top: auto;
  bottom: clamp(18px, 4vw, 48px);
  z-index: 9;
  width: min(320px, calc(100vw - 36px));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  opacity: 0.36;
  pointer-events: auto;
  border: 1px solid rgba(247, 255, 247, 0.18);
  border-radius: 8px;
  background: rgba(10, 24, 18, 0.16);
  box-shadow: 0 18px 44px rgba(10, 24, 18, 0.18);
  backdrop-filter: blur(10px);
  transition: opacity 180ms ease;
}

.morning-player:hover,
.night-floating-player:hover {
  opacity: 0.88;
}

.morning-player.is-hidden,
.night-floating-player.is-hidden {
  display: none;
}

.morning-player iframe,
.night-floating-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.night-floating-player {
  top: auto;
  bottom: clamp(18px, 4vw, 48px);
}

.night-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.panel-title.compact {
  margin-bottom: 0;
}

.night-mode #view-night .night-music label {
  color: rgba(247, 255, 247, 0.88);
}

.night-mode #view-night .night-music input {
  background: rgba(247, 251, 245, 0.82);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-family: var(--font-display);
  margin-top: 7px;
  font-size: clamp(1.65rem, 2.5vw, 2.45rem);
  line-height: 1.08;
  font-weight: 600;
}

#view-focus {
  font-family: "LXGW WenKai TC", "Noto Serif SC", "Noto Sans SC", sans-serif;
}

#view-focus .section-head {
  position: relative;
  justify-content: center;
  text-align: center;
  width: min(1080px, 100%);
  margin: 0 auto 28px;
  padding: 4px 64px 0;
}

#view-focus .section-head > div {
  width: 100%;
}

#view-focus .section-head .eyebrow {
  color: rgba(62, 91, 70, 0.58);
}

#focusTitle {
  margin-top: 6px;
  color: transparent;
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: clamp(2.35rem, 5.6vw, 4.7rem);
  font-weight: 700;
  letter-spacing: 0;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.15px rgba(255, 255, 255, 0.98);
  text-shadow: 0 14px 34px rgba(24, 50, 40, 0.14);
}

#view-focus #resetFocus {
  position: absolute;
  top: 4px;
  right: 0;
}

#view-focus input,
#view-focus textarea {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

#view-morning .section-head .eyebrow,
#view-night .section-head .eyebrow {
  font-family: var(--font-script);
  font-size: 1.55rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  text-shadow:
    0.35px 0 currentColor,
    -0.35px 0 currentColor,
    0 0.35px currentColor;
}

.icon-button {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(73, 111, 82, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 1.2rem;
  box-shadow: 0 8px 24px rgba(24, 50, 40, 0.08);
}

.icon-button.active {
  background: var(--moss);
  color: #fff;
}

.ritual-layout,
.focus-layout,
.night-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 22px;
}

.focus-layout {
  align-items: stretch;
  width: min(1080px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.82fr);
  gap: clamp(22px, 3vw, 36px);
}

.ritual-layout.morning-single {
  grid-template-columns: minmax(0, 1fr);
}

.ritual-stage,
.timer-panel {
  min-height: 520px;
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stage-label {
  color: var(--plum);
  font-weight: 600;
  margin-bottom: 10px;
}

.ritual-stage h3 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.9vw, 2.7rem);
  line-height: 1.2;
  max-width: 880px;
  font-weight: 500;
}

.ritual-stage p:not(.stage-label) {
  margin-top: 16px;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.75;
}

.inline-record {
  width: min(520px, 100%);
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(73, 111, 82, 0.14);
  border-radius: 8px;
  background: rgba(247, 251, 245, 0.82);
}

.inline-record.is-hidden,
.morning-field {
  display: none;
}

.morning-field.active {
  display: grid;
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.action-row.center {
  justify-content: center;
}

.primary,
.secondary {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 600;
}

.primary {
  background: var(--moss);
  color: #fff;
}

.secondary {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(73, 111, 82, 0.18);
  color: var(--ink);
}

.full {
  width: 100%;
}

.panel {
  padding: 20px;
}

.focus-layout > .panel {
  padding: clamp(16px, 2vw, 22px);
  gap: 12px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title h3 {
  font-size: 1.02rem;
}

.panel-title span {
  color: var(--muted);
  font-size: 0.86rem;
}

form,
.panel {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344050;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(73, 111, 82, 0.18);
  border-radius: 8px;
  background: rgba(251, 254, 249, 0.9);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

#focusTask {
  min-height: 88px;
  background: rgba(255, 255, 255, 0.7);
}

.focus-seed-control {
  min-height: 38px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 3px 4px 3px 10px;
  border-top: 1px solid rgba(73, 111, 82, 0.08);
  color: rgba(62, 91, 70, 0.72);
  font-size: 0.82rem;
}

.focus-seed-control > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.focus-seed-control small {
  color: rgba(98, 117, 106, 0.5);
  font-size: 0.68rem;
  font-weight: 500;
}

.focus-seed-control select {
  width: auto;
  min-width: 126px;
  min-height: 30px;
  border-color: transparent;
  border-radius: 999px;
  background: rgba(244, 250, 241, 0.56);
  color: rgba(62, 91, 70, 0.72);
  padding: 3px 28px 3px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.focus-seed-control select:hover,
.focus-seed-control select:focus {
  border-color: rgba(73, 111, 82, 0.16);
  background: rgba(255, 255, 255, 0.78);
}

.focus-seed-control.has-seed select {
  border-color: rgba(127, 179, 140, 0.22);
  background: rgba(127, 179, 140, 0.12);
  color: #315b3e;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--leaf);
}

output {
  color: var(--muted);
  font-weight: 700;
}

.timer-panel {
  align-items: center;
  gap: 18px;
}

.focus-layout .timer-panel {
  min-height: 490px;
  padding-block: clamp(26px, 3.6vw, 42px);
}

.timer-ring {
  width: min(320px, 68vw);
  aspect-ratio: 0.72;
  border-radius: 34px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(244, 250, 241, 0.16) 42%, rgba(126, 176, 105, 0.2)),
    radial-gradient(ellipse at 34% 18%, rgba(255, 255, 255, 0.82), transparent 24%),
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.54), transparent 58%),
    rgba(247, 251, 245, 0.38);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    inset 14px 0 30px rgba(255, 255, 255, 0.2),
    inset -18px -10px 38px rgba(70, 113, 78, 0.16),
    0 28px 70px rgba(24, 50, 40, 0.16);
  transition: background 0.3s ease;
}

.timer-ring::before,
.timer-ring::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.timer-ring::before {
  inset: 7px;
  z-index: 5;
  background:
    linear-gradient(105deg, transparent 8%, rgba(255, 255, 255, 0.64) 22%, transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 26%, transparent 74%, rgba(255, 255, 255, 0.28));
  opacity: 0.62;
  animation: glassGleam 6s ease-in-out infinite;
}

.timer-ring::after {
  inset: 16px;
  z-index: 1;
  background:
    linear-gradient(90deg, transparent 46%, rgba(255, 255, 255, 0.28) 50%, transparent 54%),
    radial-gradient(ellipse at 50% 28%, rgba(255, 255, 255, 0.32), transparent 38%),
    radial-gradient(ellipse at 50% 72%, rgba(255, 255, 255, 0.24), transparent 38%);
  opacity: 0.86;
  mix-blend-mode: screen;
}

.timer-readout {
  width: 58%;
  min-height: 92px;
  border-radius: 999px;
  position: relative;
  z-index: 7;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.25) 54%, rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(11px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  opacity: 0.88;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    0 16px 34px rgba(24, 50, 40, 0.1);
}

.time-glass {
  position: absolute;
  inset: 22px 30px;
  z-index: 4;
  pointer-events: none;
}

.time-glass::before,
.time-glass::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 74%;
  height: 43%;
  border: 1.5px solid rgba(255, 255, 255, 0.66);
  box-shadow:
    inset 10px 0 26px rgba(255, 255, 255, 0.2),
    inset -12px -8px 30px rgba(55, 98, 63, 0.16),
    0 18px 38px rgba(24, 50, 40, 0.1);
}

.time-glass::before {
  top: 2%;
  transform: translateX(-50%);
  border-radius: 48% 48% 10% 10%;
  clip-path: polygon(4% 0, 96% 0, 55% 100%, 45% 100%);
  background:
    radial-gradient(ellipse at 38% calc(100% - var(--sand-remaining, 100%)), rgba(255, 255, 255, 0.38), transparent 26%),
    linear-gradient(to top, rgba(102, 168, 86, 0.86) 0 var(--sand-remaining, 100%), transparent var(--sand-remaining, 100%) 100%),
    radial-gradient(ellipse at 50% 96%, rgba(255, 255, 255, 0.34), transparent 42%),
    rgba(247, 251, 245, 0.06);
  transition: background 900ms ease;
}

.time-glass::after {
  bottom: 2%;
  transform: translateX(-50%);
  border-radius: 10% 10% 48% 48%;
  clip-path: polygon(45% 0, 55% 0, 96% 100%, 4% 100%);
  background:
    radial-gradient(ellipse at 38% calc(100% - var(--sand-progress, 3%)), rgba(255, 255, 255, 0.36), transparent 26%),
    linear-gradient(to top, rgba(86, 156, 76, 0.9) 0 var(--sand-progress, 3%), transparent var(--sand-progress, 3%) 100%),
    radial-gradient(ellipse at 50% 92%, rgba(255, 255, 255, 0.3), transparent 44%),
    rgba(247, 251, 245, 0.06);
  transition: background 900ms ease;
}

.time-glass span:nth-child(1) {
  position: absolute;
  left: calc(50% - 1px);
  top: 39.5%;
  width: 2px;
  height: 21%;
  border-radius: 999px;
  background: linear-gradient(rgba(96, 164, 82, 0), rgba(151, 215, 118, 0.96), rgba(96, 164, 82, 0));
  box-shadow: 0 0 14px rgba(151, 215, 118, 0.68);
  animation: timeStream 1.35s ease-in-out infinite;
}

.time-glass span:nth-child(2),
.time-glass span:nth-child(3) {
  position: absolute;
  left: 50%;
  bottom: 23%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(151, 215, 118, 0.86);
  box-shadow: 0 0 14px rgba(151, 215, 118, 0.48);
  animation: timeDrop 2.4s ease-in-out infinite;
}

.time-glass span:nth-child(3) {
  width: 5px;
  height: 5px;
  animation-delay: 1.2s;
  opacity: 0.7;
}

.timer-ring.break-mode .time-glass::before {
  background:
    radial-gradient(ellipse at 38% calc(100% - var(--sand-remaining, 100%)), rgba(255, 255, 255, 0.36), transparent 26%),
    linear-gradient(to top, rgba(104, 176, 148, 0.78) 0 var(--sand-remaining, 100%), transparent var(--sand-remaining, 100%) 100%),
    radial-gradient(ellipse at 50% 96%, rgba(255, 255, 255, 0.3), transparent 42%),
    rgba(247, 251, 245, 0.06);
}

.timer-ring.break-mode .time-glass::after {
  background:
    radial-gradient(ellipse at 38% calc(100% - var(--sand-progress, 3%)), rgba(255, 255, 255, 0.34), transparent 26%),
    linear-gradient(to top, rgba(92, 166, 138, 0.86) 0 var(--sand-progress, 3%), transparent var(--sand-progress, 3%) 100%),
    radial-gradient(ellipse at 50% 92%, rgba(255, 255, 255, 0.28), transparent 44%),
    rgba(247, 251, 245, 0.06);
}

.timer-ring.break-mode .time-glass span {
  background: linear-gradient(rgba(92, 166, 138, 0), rgba(175, 226, 205, 0.92), rgba(92, 166, 138, 0));
  box-shadow: 0 0 14px rgba(175, 226, 205, 0.55);
}

.time-glass span:nth-child(n + 4) {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(196, 242, 160, 0.72);
  box-shadow: 0 0 12px rgba(196, 242, 160, 0.48);
  opacity: 0;
  animation: liquidParticle 4.8s ease-in-out infinite;
}

.time-glass span:nth-child(4) {
  left: 24%;
  top: 24%;
}

.time-glass span:nth-child(5) {
  right: 25%;
  top: 33%;
  animation-delay: 0.9s;
}

.time-glass span:nth-child(6) {
  left: 29%;
  bottom: 27%;
  animation-delay: 1.8s;
}

.time-glass span:nth-child(7) {
  right: 27%;
  bottom: 19%;
  animation-delay: 2.7s;
}

.time-glass span:nth-child(8) {
  left: 48%;
  bottom: 13%;
  width: 3px;
  height: 3px;
  animation-delay: 3.6s;
}

.water-fill {
  display: none;
}

@keyframes waterWave {
  from {
    transform: translateX(-50%) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

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

@keyframes glassGleam {
  0%,
  100% {
    transform: translateX(-22%);
    opacity: 0.28;
  }
  48% {
    transform: translateX(22%);
    opacity: 0.58;
  }
}

@keyframes waterGleam {
  0%,
  100% {
    transform: translateX(-18%) scaleX(0.72);
    opacity: 0.38;
  }
  45% {
    transform: translateX(18%) scaleX(1);
    opacity: 0.78;
  }
}

@keyframes timeStream {
  0%,
  100% {
    transform: translateY(-10%) scaleY(0.62);
    opacity: 0.38;
  }
  50% {
    transform: translateY(8%) scaleY(1);
    opacity: 0.86;
  }
}

@keyframes timeDrop {
  0% {
    transform: translate(-50%, -30px) scale(0.72);
    opacity: 0;
  }
  38% {
    opacity: 0.78;
  }
  100% {
    transform: translate(-50%, 14px) scale(1.12);
    opacity: 0;
  }
}

@keyframes liquidParticle {
  0%,
  100% {
    transform: translate3d(0, 10px, 0) scale(0.72);
    opacity: 0;
  }
  35% {
    opacity: 0.72;
  }
  70% {
    transform: translate3d(7px, -12px, 0) scale(1.06);
    opacity: 0.2;
  }
}

.timer-ring span {
  color: var(--muted);
  font-weight: 600;
}

.timer-readout span {
  color: rgba(61, 91, 69, 0.56);
  font-family: "LXGW WenKai TC", "Noto Serif SC", serif;
  font-size: 0.92rem;
}

.timer-ring strong {
  color: rgba(34, 66, 43, 0.72);
  font-family: var(--font-script);
  font-size: clamp(3.05rem, 8.4vw, 5.35rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5),
    0 12px 30px rgba(24, 50, 40, 0.16);
}

.focus-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.focus-control-label {
  color: rgba(62, 91, 70, 0.68);
  display: inline-flex;
  font-family: "Noto Serif SC", serif;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
}

.focus-categories {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 8px;
  background: rgba(244, 250, 241, 0.58);
}

.focus-category {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  padding: 0 10px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.focus-category:hover {
  border-color: rgba(73, 111, 82, 0.16);
  color: var(--ink);
  transform: translateY(-1px);
}

.focus-category.active {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(73, 111, 82, 0.24);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(45, 82, 58, 0.1);
}

.focus-duration-wrap {
  width: min(470px, 100%);
  display: grid;
  gap: 7px;
}

.focus-duration {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 8px;
  background: rgba(244, 250, 241, 0.58);
}

.duration-option,
.focus-duration input {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  text-align: center;
  font-weight: 600;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.duration-option:hover {
  border-color: rgba(73, 111, 82, 0.16);
  transform: translateY(-1px);
}

.duration-option.active {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(73, 111, 82, 0.24);
  box-shadow: 0 12px 28px rgba(45, 82, 58, 0.1);
}

.focus-duration label {
  grid-column: 1 / -1;
  min-height: 36px;
  display: grid;
  grid-template-columns: 1fr minmax(72px, 0.42fr) auto;
  align-items: center;
  gap: 8px;
  padding: 3px 9px 3px 12px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--muted);
  font-size: 0.82rem;
}

.focus-duration input {
  width: 100%;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.76);
}

.focus-duration small {
  color: rgba(62, 91, 70, 0.56);
  font-size: 0.78rem;
}

.focus-category-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.focus-category-summary span {
  min-height: 30px;
  border-radius: 8px;
  background: rgba(127, 179, 140, 0.1);
  color: var(--muted);
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}

.focus-category-summary b {
  color: var(--ink);
  font-weight: 600;
}

.focus-metrics div,
.summary-list div {
  min-height: 68px;
  border-radius: 8px;
  background: rgba(127, 179, 140, 0.12);
  padding: 11px 12px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.focus-metrics b,
.summary-list b {
  font-size: 1.55rem;
}

.focus-metrics span,
.summary-list span {
  color: var(--muted);
  font-size: 0.9rem;
}

.night-stage {
  background:
    linear-gradient(145deg, rgba(54, 95, 73, 0.12), rgba(159, 200, 189, 0.18)),
    rgba(255, 255, 255, 0.78);
}

.night-progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(73, 111, 82, 0.12);
  margin-top: 24px;
  overflow: hidden;
}

.night-progress div {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--leaf), var(--moss));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.stats-head {
  align-items: end;
}

.stats-subtitle {
  max-width: 42ch;
  margin-top: 8px;
  color: rgba(98, 117, 106, 0.76);
  font-size: 0.9rem;
}

.stats-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-range-switch {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.stats-range {
  min-width: 58px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(73, 111, 82, 0.68);
  font-size: 0.78rem;
  font-weight: 600;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.stats-range:hover {
  color: #264735;
  transform: translateY(-1px);
}

.stats-range.active {
  background: rgba(255, 255, 255, 0.88);
  color: #264735;
  box-shadow: 0 7px 18px rgba(24, 50, 40, 0.07);
}

.stats-sections {
  display: grid;
  gap: 18px;
}

.stats-section {
  --stats-accent: #91b6bd;
  --stats-accent-soft: rgba(145, 182, 189, 0.1);
  --stats-accent-border: rgba(145, 182, 189, 0.18);
  --stats-ink: #35555a;
  --stats-tint: rgba(235, 245, 246, 0.46);
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--stats-accent-border);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), var(--stats-tint)),
    rgba(255, 255, 255, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 15px 38px rgba(24, 50, 40, 0.055);
  backdrop-filter: blur(7px);
}

.stats-health-section {
  --stats-accent: #86aeba;
  --stats-accent-soft: rgba(134, 174, 186, 0.1);
  --stats-accent-border: rgba(134, 174, 186, 0.19);
  --stats-ink: #355762;
  --stats-tint: rgba(231, 243, 247, 0.48);
}

.stats-focus-section {
  --stats-accent: #9a9fbd;
  --stats-accent-soft: rgba(154, 159, 189, 0.105);
  --stats-accent-border: rgba(154, 159, 189, 0.19);
  --stats-ink: #505570;
  --stats-tint: rgba(239, 239, 248, 0.46);
}

.stats-goals-section {
  --stats-accent: #c3a982;
  --stats-accent-soft: rgba(195, 169, 130, 0.105);
  --stats-accent-border: rgba(195, 169, 130, 0.2);
  --stats-ink: #6a5945;
  --stats-tint: rgba(249, 244, 235, 0.48);
}

.stats-seed-section {
  --stats-accent: #a99cba;
  --stats-accent-soft: rgba(169, 156, 186, 0.105);
  --stats-accent-border: rgba(169, 156, 186, 0.2);
  --stats-ink: #5e536d;
  --stats-tint: rgba(244, 239, 248, 0.46);
}

.stats-seed-section.is-highlighted {
  animation: stats-seed-highlight 1.2s ease;
}

@keyframes stats-seed-highlight {
  0%,
  100% {
    box-shadow: none;
  }

  35% {
    box-shadow: 0 0 0 5px rgba(169, 156, 186, 0.24);
  }
}

.stats-section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--stats-accent-border);
}

.stats-section-head h3,
.stats-chart-title h4 {
  margin: 0;
  color: var(--stats-ink);
  font-family: var(--font-display);
}

.stats-section-head h3 {
  margin-top: 3px;
  font-size: 1.32rem;
}

.stats-section-head p:not(.eyebrow) {
  margin-top: 4px;
  color: rgba(98, 117, 106, 0.7);
  font-size: 0.82rem;
}

.stats-section-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stats-accent-border);
  border-radius: 50%;
  background: var(--stats-accent-soft);
  color: var(--stats-accent);
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.timer-icon::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 -5px 0 -4px currentColor;
}

.sprout-icon::before {
  content: "⌁";
  transform: rotate(-40deg);
  font-size: 1.35rem;
}

.goals-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(127, 179, 140, 0.09);
}

.goals-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 3px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translate(1px, -1px) rotate(-45deg);
}

.stats-inline-summary {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.stats-inline-summary span {
  min-width: 82px;
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--stats-accent-soft);
  color: rgba(98, 117, 106, 0.68);
  font-size: 0.67rem;
  text-align: right;
}

.stats-inline-summary b {
  color: var(--stats-ink);
  font-size: 0.88rem;
  font-weight: 650;
}

.stats-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stats-chart-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--stats-accent-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.stats-chart-title {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.stats-chart-title > span {
  flex: 0 0 auto;
  color: var(--stats-accent);
}

.stats-chart-title h4 {
  font-size: 0.94rem;
}

.stats-chart-title p {
  margin-top: 2px;
  color: rgba(98, 117, 106, 0.58);
  font-size: 0.7rem;
}

.mini-line-icon,
.mini-bars-icon,
.mini-column-icon,
.mini-timeline-icon {
  position: relative;
  width: 22px;
  height: 18px;
}

.mini-line-icon {
  border-bottom: 1px solid currentColor;
  transform: skewY(-20deg);
}

.mini-bars-icon::before,
.mini-column-icon::before,
.mini-timeline-icon::before {
  content: "";
  position: absolute;
  inset: 3px 0;
  background: repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 6px);
  opacity: 0.6;
}

.mini-column-icon::before {
  inset: 3px 2px 0;
  background:
    linear-gradient(to top, currentColor 0 55%, transparent 55%) 0 100% / 4px 100% no-repeat,
    linear-gradient(to top, currentColor 0 85%, transparent 85%) 8px 100% / 4px 100% no-repeat,
    linear-gradient(to top, currentColor 0 68%, transparent 68%) 16px 100% / 4px 100% no-repeat;
}

.mini-timeline-icon::before {
  inset: 8px 0 auto;
  height: 1px;
  background: currentColor;
}

.mini-timeline-icon::after {
  content: "···";
  position: absolute;
  inset: -8px 0 auto;
  font-size: 1.1rem;
  letter-spacing: 3px;
}

.mini-goal-icon {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.mini-goal-icon::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.stats-chart-card canvas {
  max-height: 250px;
  background: color-mix(in srgb, var(--stats-tint) 62%, rgba(255, 255, 255, 0.52));
}

.skin-timeline,
.seed-comparison,
.seed-timeline {
  min-height: 250px;
}

.skin-timeline {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 6px 2px;
}

.skin-timeline-row {
  display: grid;
  grid-template-columns: minmax(70px, 0.8fr) 12px minmax(90px, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 29px;
  color: rgba(62, 91, 70, 0.72);
  font-size: 0.76rem;
}

.skin-timeline-row time {
  color: rgba(98, 117, 106, 0.56);
}

.skin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--skin-color, #9fc8bd);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--skin-color, #9fc8bd) 14%, transparent);
}

.seed-comparison {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 10px 4px;
}

.seed-stat-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 12px;
}

.seed-stat-row strong {
  color: var(--stats-ink);
  font-size: 0.82rem;
}

.seed-stat-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--stats-accent-soft);
}

.seed-stat-track span {
  display: block;
  width: var(--seed-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--seed-color, #7fb38c);
}

.seed-stat-row small {
  min-width: 92px;
  color: rgba(98, 117, 106, 0.64);
  font-size: 0.7rem;
  text-align: right;
}

.seed-timeline {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 10px 4px;
}

.seed-timeline-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
}

.seed-timeline-row strong {
  color: var(--stats-ink);
  font-size: 0.8rem;
}

.seed-timeline-track {
  position: relative;
  height: 28px;
  border-bottom: 1px solid var(--stats-accent-border);
}

.seed-timeline-dot {
  position: absolute;
  left: var(--seed-position);
  bottom: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--seed-color, #7fb38c);
  box-shadow: 0 0 0 4px var(--stats-accent-soft);
  transform: translateX(-50%);
}

.goals-stats-grid .goals-deadline-card {
  grid-column: 1 / -1;
}

.goal-status-chart,
.goal-category-chart,
.goal-deadline-timeline {
  min-height: 250px;
}

.goal-status-chart,
.goal-category-chart {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 10px 4px;
}

.goal-status-row,
.goal-category-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.72fr) minmax(120px, 1.4fr) auto;
  align-items: center;
  gap: 12px;
}

.goal-status-row strong,
.goal-category-row strong {
  color: var(--stats-ink);
  font-size: 0.8rem;
}

.goal-status-track,
.goal-category-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--stats-accent-soft);
}

.goal-status-track span,
.goal-category-track span {
  display: block;
  width: var(--goal-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--goal-color, #7fb38c);
}

.goal-category-track span {
  background:
    linear-gradient(
      90deg,
      var(--goal-complete-color, #719d7b) 0 var(--goal-complete-width, 0%),
      var(--goal-color, #b9dbc8) var(--goal-complete-width, 0%) 100%
    );
}

.goal-status-row small,
.goal-category-row small {
  min-width: 68px;
  color: rgba(98, 117, 106, 0.64);
  font-size: 0.7rem;
  text-align: right;
}

.goal-deadline-timeline {
  position: relative;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 16px 8px 8px;
}

.goal-deadline-axis {
  position: relative;
  height: 66px;
  margin: 0 12px;
  border-bottom: 1px solid var(--stats-accent-border);
}

.goal-deadline-axis::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stats-accent);
  box-shadow: 0 0 0 4px var(--stats-accent-soft);
}

.goal-deadline-point {
  position: absolute;
  left: var(--goal-position);
  bottom: -5px;
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: var(--goal-color, #9fc8bd);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--goal-color, #9fc8bd) 15%, transparent);
  transform: translateX(-50%);
}

.goal-deadline-labels {
  display: flex;
  justify-content: space-between;
  margin: 0 12px;
  color: rgba(98, 117, 106, 0.56);
  font-size: 0.68rem;
}

.goal-deadline-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.goal-deadline-item {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--stats-accent-soft);
}

.goal-deadline-item b,
.goal-deadline-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-deadline-item b {
  color: var(--stats-ink);
  font-size: 0.75rem;
}

.goal-deadline-item span {
  margin-top: 3px;
  color: rgba(98, 117, 106, 0.62);
  font-size: 0.67rem;
}

.stats-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: rgba(98, 117, 106, 0.58);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 980px) {
  .stats-head,
  .stats-section-head {
    align-items: start;
  }

  .stats-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .stats-section-head {
    grid-template-columns: auto 1fr;
  }

  .stats-inline-summary {
    grid-column: 1 / -1;
    justify-content: start;
    padding-left: 56px;
  }

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

@media (max-width: 560px) {
  .stats-head-actions,
  .stats-range-switch {
    width: 100%;
  }

  .stats-range {
    flex: 1;
    min-width: 0;
  }

  .stats-section {
    padding: 15px 12px;
  }

  .stats-section-icon {
    width: 36px;
    height: 36px;
  }

  .stats-inline-summary {
    padding-left: 0;
  }

  .stats-inline-summary span {
    flex: 1;
    text-align: left;
  }

  .stats-chart-card {
    padding: 12px 9px;
  }

  .seed-stat-row,
  .seed-timeline-row,
  .goal-status-row,
  .goal-category-row {
    grid-template-columns: 76px 1fr;
  }

  .seed-stat-row small,
  .goal-status-row small,
  .goal-category-row small {
    grid-column: 2;
    text-align: left;
  }

  .goal-deadline-list {
    grid-template-columns: 1fr;
  }
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: rgba(247, 251, 245, 0.78);
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.import-result {
  min-height: 44px;
  border-radius: 8px;
  background: rgba(185, 219, 200, 0.34);
  padding: 12px;
  color: #2f5a41;
  font-weight: 700;
}

.settings-dock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(247, 251, 245, 0.72);
  border: 1px solid rgba(73, 111, 82, 0.12);
}

/* Quiet sidebar navigation */
.app-shell {
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  gap: 12px;
  padding: 24px 16px 16px;
  background:
    linear-gradient(180deg, rgba(249, 252, 248, 0.66), rgba(240, 248, 238, 0.48)),
    rgba(247, 251, 245, 0.42);
}

.brand {
  gap: 10px;
  padding: 0 6px 17px;
  margin-bottom: 3px;
  border-bottom: 1px solid rgba(73, 111, 82, 0.09);
}

.brand-mark {
  width: 34px;
  height: 34px;
  padding: 4px;
}

.brand h1 {
  font-size: 1.55rem;
}

.brand p {
  display: none;
}

.nav-tabs {
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}

.nav-tab {
  position: relative;
  min-height: 42px;
  gap: 9px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
}

.nav-tab::before {
  content: "";
  position: absolute;
  left: 0;
  width: 2px;
  height: 0;
  border-radius: 999px;
  background: rgba(73, 111, 82, 0.7);
  transition: height 180ms ease;
}

.nav-tab span {
  width: 21px;
  height: 21px;
  border-radius: 5px;
  background: transparent;
  font-size: 0.78rem;
}

.nav-tab strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-tab.active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

.nav-tab.active::before {
  height: 20px;
}

.nav-tab.active span {
  background: transparent;
}

.nav-tab:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.4);
  transform: translateX(2px);
}

.paper-entry,
body.block-mode[data-block-theme="iceland"] .paper-entry {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(38, 71, 53, 0.78);
  box-shadow: none;
  transform: none;
}

.nav-tabs + .paper-entry {
  margin-top: 6px;
  padding-top: 13px;
  min-height: 55px;
  border-top: 1px solid rgba(73, 111, 82, 0.09);
  border-radius: 0 0 6px 6px;
}

.paper-entry::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(127, 179, 140, 0.68);
  box-shadow: 0 0 0 4px rgba(127, 179, 140, 0.08);
}

.paper-entry::after,
.paper-entry span {
  display: none;
}

.paper-entry strong {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.paper-entry:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  transform: translateX(2px);
}

.paper-entry.active,
body.block-mode[data-block-theme="iceland"] .paper-entry.active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

.today-panel,
body.block-mode[data-block-theme="iceland"] .today-panel {
  margin-top: auto;
  padding: 13px 8px 8px;
  border: 0;
  border-top: 1px solid rgba(73, 111, 82, 0.09);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.today-panel .eyebrow {
  display: none;
}

.date-line {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
}

.mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin-top: 7px;
  padding-top: 0;
  border-top: 0;
}

.mini-grid span {
  min-width: 0;
  min-height: 38px;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.24);
  font-size: 0.66rem;
  text-align: center;
}

.mini-grid span + span {
  border-top: 0;
}

.mini-grid b {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copyright {
  font-size: 0.62rem;
  opacity: 0.7;
}

.account-entry {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 7px 10px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.3);
  color: rgba(38, 71, 53, 0.84);
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.account-entry:hover {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(73, 111, 82, 0.17);
  transform: translateY(-1px);
}

.account-entry-icon,
.account-avatar {
  position: relative;
  display: block;
  border: 1px solid rgba(73, 111, 82, 0.25);
  border-radius: 50%;
}

.account-entry-icon {
  width: 26px;
  height: 26px;
}

.account-entry-icon::before,
.account-avatar::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 50%;
  width: 28%;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: translateX(-50%);
}

.account-entry-icon::after,
.account-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 52%;
  height: 25%;
  border: 1px solid currentColor;
  border-radius: 999px 999px 45% 45%;
  transform: translateX(-50%);
}

.account-entry-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.account-entry-copy strong,
.account-entry-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-entry-copy strong {
  font-size: 0.79rem;
  font-weight: 600;
}

.account-entry-copy small {
  color: var(--muted);
  font-size: 0.65rem;
}

.account-entry-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9c4bd;
  box-shadow: 0 0 0 3px rgba(185, 196, 189, 0.14);
}

.account-entry-dot.is-online {
  background: #7fb38c;
  box-shadow: 0 0 0 3px rgba(127, 179, 140, 0.14);
}

.today-panel,
body.block-mode[data-block-theme="iceland"] .today-panel {
  margin-top: 0;
}

.account-dialog {
  width: min(480px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.account-dialog::backdrop {
  background: rgba(28, 43, 35, 0.28);
  backdrop-filter: blur(8px);
}

.account-dialog-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(242, 249, 240, 0.88)),
    var(--panel);
  box-shadow: 0 28px 80px rgba(24, 50, 40, 0.2);
}

.account-dialog-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  font-weight: 600;
}

.account-dialog-copy,
.account-privacy,
.account-message,
.account-profile small {
  color: var(--muted);
}

.account-dialog-copy {
  line-height: 1.7;
}

.account-dialog-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(73, 111, 82, 0.07);
  color: var(--moss);
  font-size: 1.15rem;
}

.account-signed-out,
.account-signed-in,
.account-conflict {
  display: grid;
  gap: 12px;
}

.account-signed-out.is-hidden,
.account-signed-in.is-hidden,
.account-conflict.is-hidden {
  display: none;
}

.account-signed-out label {
  color: var(--moss);
  font-size: 0.83rem;
  font-weight: 600;
}

.account-signed-out input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(73, 111, 82, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  outline: none;
}

.account-signed-out input:focus {
  border-color: rgba(73, 111, 82, 0.45);
  box-shadow: 0 0 0 4px rgba(127, 179, 140, 0.1);
}

.account-action {
  min-height: 46px;
}

.account-profile {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.46);
}

.account-avatar {
  width: 42px;
  height: 42px;
  color: var(--moss);
  background: rgba(217, 234, 214, 0.38);
}

.account-profile div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-profile strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-sync-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-conflict {
  padding: 14px;
  border: 1px solid rgba(199, 173, 130, 0.32);
  border-radius: 7px;
  background: rgba(249, 245, 234, 0.66);
}

.account-conflict p {
  line-height: 1.6;
}

.account-backups,
.account-history {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(73, 111, 82, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.38);
}

.account-backups > strong,
.account-history-head strong {
  color: var(--moss);
  font-family: var(--font-display);
  font-size: 0.94rem;
}

.account-backups p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.account-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-text-button {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--moss);
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-history-list {
  max-height: 170px;
  display: grid;
  gap: 6px;
  overflow-y: auto;
}

.account-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 6px;
  background: rgba(239, 247, 237, 0.62);
}

.account-history-item div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.account-history-item strong {
  font-size: 0.75rem;
  font-weight: 600;
}

.account-history-item small,
.account-history-empty {
  color: var(--muted);
  font-size: 0.68rem;
}

.account-history-item button {
  padding: 5px 9px;
  border: 1px solid rgba(73, 111, 82, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--moss);
  font-size: 0.68rem;
}

.account-message {
  min-height: 1.4em;
  font-size: 0.82rem;
}

.account-message.is-error {
  color: #9a6666;
}

.account-privacy {
  padding-top: 13px;
  border-top: 1px solid rgba(73, 111, 82, 0.09);
  font-size: 0.72rem;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 18px;
  }

  .nav-tabs {
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 6px;
  }

  .nav-tab {
    justify-content: center;
    padding: 0 8px;
    min-height: 44px;
  }

  .nav-tab strong {
    display: none;
  }

  .today-panel {
    margin-top: 0;
  }

  .account-entry {
    margin-top: 0;
  }

  .ritual-layout,
  .focus-layout,
  .night-layout,
  .habit-garden,
  .stats-grid,
  .work-layout,
  .settings-dock {
    grid-template-columns: 1fr;
  }

  .work-form {
    position: static;
    width: min(620px, 100%);
    justify-self: center;
    margin-inline: auto;
  }

  #workAddView.active {
    justify-items: center;
  }

  .focus-layout {
    width: 100%;
  }

  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .language-toggle {
    position: static;
    justify-self: end;
    margin-bottom: -18px;
  }

  .global-language-toggle {
    position: fixed;
    top: 14px;
    right: 14px;
    margin: 0;
  }

  .immersive-mode .global-language-toggle {
    top: 14px;
    right: 68px;
  }

  .paper-entry {
    min-height: 42px;
    transform: none;
  }

  .block-head,
  .work-head,
  .block-panels,
  .notes-toolbar {
    grid-template-columns: 1fr;
  }

  .work-head {
    gap: 16px;
  }

  #view-habits .section-head {
    padding-left: 0;
  }

  #view-habits .section-head::before {
    opacity: 0.16;
    left: auto;
    right: 0;
  }

  .habit-start-card .panel-title,
  .habit-seeds-card .panel-title {
    grid-template-columns: auto 1fr;
  }

  .habit-start-card .panel-title span {
    grid-column: 2;
    justify-self: start;
  }

  .habit-start-card > p {
    margin-left: 0;
  }

  .habit-seed-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .habit-seed {
    border-bottom: 1px solid rgba(73, 111, 82, 0.08);
  }

  #view-work {
    min-height: auto;
    align-content: start;
  }

  .low-energy-hero {
    padding-inline: 0;
  }

  .low-energy-title-lockup {
    grid-template-columns: 106px auto;
    gap: 2px;
    padding-right: 96px;
  }

  .low-energy-title-lockup img {
    max-height: 112px;
    opacity: 0.24;
  }

  .low-energy-title-particle {
    opacity: 0.2;
  }

  .low-energy-keep {
    position: static;
  }

  .low-energy-task-panel {
    grid-template-columns: 1fr;
  }

  .low-energy-core {
    padding-right: 0;
    padding-bottom: 24px;
    border-right: 0;
    border-bottom: 1px solid rgba(73, 111, 82, 0.12);
  }

  .low-energy-option-grid {
    grid-template-columns: 1fr;
  }

  .board-head {
    align-items: start;
  }

  .board-head p:not(.eyebrow) {
    text-align: left;
  }

  .block-theme-switch {
    justify-content: flex-start;
  }

  .note-composer,
  .notes-toolbar,
  .notes-board {
    width: 100%;
  }

  .night-mode #view-night #nightSettings {
    position: static;
    width: 100%;
    margin-top: 0;
  }

  .night-mode #view-night .night-layout {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 34px;
    width: min(760px, 100%);
  }

  .night-mode #view-night .night-stage h3,
  .night-mode #view-night .night-stage p:not(.stage-label) {
    max-width: 100%;
  }

  .night-mode #view-night #nightSettings {
    max-width: 560px;
    margin-inline: auto;
  }
}

@media (max-width: 620px) {
  .main {
    padding: 20px 14px;
  }

  .section-head {
    align-items: center;
  }

  .work-view-switch {
    box-sizing: border-box;
    justify-self: stretch;
    min-width: 0;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 0;
  }

  .work-view-option {
    min-width: 0;
    padding-inline: 12px;
  }

  .work-list-panel .panel-title {
    align-items: start;
  }

  .work-goal-main,
  .work-goal-actions,
  .work-form-row,
  .habit-custom-start {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .habit-start-card,
  .habit-energy-card,
  .habit-seeds-card {
    padding: 24px 18px;
  }

  .habit-start-card .panel-title,
  .habit-energy-card .panel-title,
  .habit-seeds-card .panel-title {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .habit-start-card .panel-title::before,
  .habit-energy-card .panel-title::before,
  .habit-seeds-card .panel-title::before {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  .habit-seeds-card .panel-title::after {
    left: 0;
  }

  .habit-start-card::before {
    right: 18px;
    width: 80px;
  }

  .habit-energy-card > p {
    margin-left: 0;
    margin-top: 10px;
  }

  .habit-seed-list {
    grid-template-columns: 1fr;
  }

  .habit-seed {
    border-right: 0;
  }

  .low-energy-shell {
    padding: 20px 16px;
  }

  .low-energy-sketch-tree {
    left: -84px;
    bottom: -18px;
    opacity: 0.09;
    transform: scale(0.76) rotate(-9deg);
  }

  .low-energy-sketch-branch {
    right: -108px;
    opacity: 0.07;
  }

  .low-energy-particle {
    opacity: 0.34;
  }

  .low-energy-task-panel {
    padding: 18px 14px;
  }

  .low-energy-tree-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .work-form {
    padding: 24px 18px;
  }

  .work-form::before,
  .work-form::after {
    opacity: 0.08;
  }

  .work-deadline {
    width: 100%;
    text-align: left;
  }

  #view-focus .section-head {
    padding: 0 52px 0 0;
    text-align: left;
    margin-bottom: 22px;
  }

  #focusTitle {
    font-size: clamp(2.25rem, 13vw, 3.4rem);
    -webkit-text-stroke-width: 1px;
  }

  .ritual-stage,
  .timer-panel {
    min-height: auto;
    padding: 24px 18px;
  }

  .focus-layout .timer-panel {
    min-height: auto;
  }

  .summary-list,
  .focus-metrics,
  .home-grid {
    grid-template-columns: 1fr;
  }

  .language-toggle {
    justify-self: center;
    margin-bottom: -10px;
  }

  .global-language-toggle {
    justify-self: auto;
    margin: 0;
  }

  .block-shell {
    min-height: auto;
    padding: 20px 14px;
  }

  .block-head h2 {
    font-size: clamp(1.95rem, 12vw, 3rem);
  }

  .composer-top,
  .composer-actions,
  .board-head {
    align-items: stretch;
    flex-direction: column;
  }

  .recipient-switch,
  .block-theme-switch {
    width: 100%;
  }

  .recipient-option,
  .block-theme-option {
    flex: 1;
  }

  .notes-board {
    grid-template-columns: 1fr;
    min-height: 320px;
  }

  .mode-switch,
  .music-switch,
  .meditation-options {
    grid-template-columns: 1fr;
  }

  .night-mode #view-night {
    padding: 24px 14px 28px;
  }

  .immersive-home {
    left: 14px;
    top: 14px;
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .morning-mode #view-morning .immersive-home,
  .night-mode #view-night .immersive-home {
    left: 14px;
    top: 64px;
  }

  .morning-mode #view-morning .audio-toggle,
  .night-mode #view-night .audio-toggle {
    width: 48px;
    min-width: 48px;
    height: 40px;
  }

  .morning-player,
  .night-mode #view-night .night-player {
    right: 14px;
    top: auto;
    bottom: 14px;
    width: min(260px, calc(100vw - 28px));
  }

  .night-mode #view-night .section-head {
    align-items: flex-start;
    padding-right: 88px;
    margin-bottom: 30px;
  }

  .night-mode #view-night .night-stage {
    padding: 34px 0 18px;
  }

  .night-mode #view-night .night-stage h3 {
    font-size: clamp(1.45rem, 8.4vw, 2.25rem);
    line-height: 1.34;
  }

  .night-mode #view-night .night-stage p:not(.stage-label) {
    line-height: 1.9;
  }

  .night-mode #view-night #nightSettings {
    padding: 18px;
  }

  .night-mode #view-night .action-row {
    gap: 10px;
  }

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

  .focus-duration label {
    grid-column: 1 / -1;
  }

  .focus-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .focus-category {
    min-height: 36px;
  }

  .module-card {
    min-height: 126px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .low-energy-particle,
  .low-energy-title-particle {
    animation: none;
  }
}

@media (max-width: 420px) {
  .focus-duration {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
