@font-face {
  font-family: "HuiWenMincho";
  src:
    url("/fonts/HuiWenMincho.woff2") format("woff2"),
    url("/fonts/HuiWenMincho.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HinaMinchoZh";
  src: url("/fonts/HinaMincho-Regular-2.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+3000-303F,
    U+3400-4DBF,
    U+4E00-9FFF,
    U+F900-FAFF,
    U+FF00-FFEF;
}

@font-face {
  font-family: "Gabriele";
  src:
    url("/fonts/Gabriele-Regular.woff2") format("woff2"),
    url("/fonts/Gabriele-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF,
    U+0100-024F,
    U+2000-206F,
    U+20A0-20CF;
}

@font-face {
  font-family: "Gabriele";
  src:
    url("/fonts/Gabriele-Dark.woff2") format("woff2"),
    url("/fonts/Gabriele-Dark.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF,
    U+0100-024F,
    U+2000-206F,
    U+20A0-20CF;
}

@font-face {
  font-family: "HomepageZhTypewriter";
  src: url("/fonts/HinaMincho-Regular-2.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+3000-303F,
    U+3400-4DBF,
    U+4E00-9FFF,
    U+F900-FAFF,
    U+FF00-FFEF;
}

@font-face {
  font-family: "HomepageEnHeroTypewriter";
  src:
    url("/fonts/Gabriele-Dark.woff2") format("woff2"),
    url("/fonts/Gabriele-Dark.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF,
    U+0100-024F,
    U+2000-206F,
    U+20A0-20CF;
}

@font-face {
  font-family: "HomepageEnMessageTypewriter";
  src:
    url("/fonts/Gabriele-Regular.woff2") format("woff2"),
    url("/fonts/Gabriele-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF,
    U+0100-024F,
    U+2000-206F,
    U+20A0-20CF;
}

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --sky-neutral: #cbbfe4;
  --sky-sun: #f4b777;
  --sky-cloud: #a8b5d6;
  --sky-rain: #7a94c4;
  --sky-frost: #c3deef;
  --sky-storm: #7f88bb;
  --ink-strong: #413550;
  --ink-soft: #6a5d79;
  --weather-accent: var(--sky-neutral);
  --weather-glow: rgba(199, 189, 229, 0.32);
  --weather-veil: linear-gradient(135deg, rgba(245, 238, 235, 0.95), rgba(231, 223, 242, 0.55));
  --card-shadow: 0 20px 45px rgba(87, 67, 103, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html.modal-scroll-lock,
body.modal-scroll-lock {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

html {
  background-color: #f5eeeb;
}

body {
  overscroll-behavior-y: none;
  color: var(--ink-strong);
  font-family: "HinaMinchoZh", "HuiWenMincho", serif;
  font-synthesis: none;
  background:
    var(--weather-veil),
    linear-gradient(180deg, #f7f1ea 0%, #f3ebf6 48%, #fff8f0 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    radial-gradient(rgba(70, 40, 80, 0.08) 0.6px, transparent 0.8px);
  background-size: auto, 10px 10px;
  mix-blend-mode: soft-light;
  opacity: 0.55;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto 36px;
  padding-top: 0;
  padding-bottom: max(24px, calc(var(--safe-bottom) + 12px));
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  padding-top: calc(24px + var(--safe-top));
  border-radius: 34px;
  background: var(--weather-veil);
  box-shadow: var(--card-shadow);
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: var(--weather-glow);
  filter: blur(4px);
  z-index: -1;
}

.hero::before {
  width: 220px;
  height: 220px;
  top: -72px;
  right: -26px;
}

.hero::after {
  width: 160px;
  height: 160px;
  bottom: -42px;
  left: -18px;
}

.hero-top,
.section-title,
.calendar-header,
.todo-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

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

.hero-copy {
  display: grid;
  gap: 0;
}

.settings-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(95, 70, 118, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-strong);
  box-shadow: 0 14px 28px rgba(104, 91, 124, 0.11);
}

.settings-entry svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px dashed rgba(77, 57, 97, 0.22);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.58);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.brand-mark strong,
.section-title strong,
.hero-title,
.message-card h2,
.detail-card h3,
.settings-card h3,
.calendar-panel h3 {
  font-family: "Gabriele", "HinaMinchoZh", "HuiWenMincho", serif;
}

.hero-title {
  margin: 16px 0 6px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-title.homepage-font-hero.is-zh {
  font-family: "HomepageZhTypewriter", serif;
}

.hero-title.homepage-font-hero.is-en {
  font-family: "HomepageEnHeroTypewriter", "Gabriele", serif;
  letter-spacing: -0.015em;
}

.hero-subtitle {
  max-width: 42rem;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.weather-chip,
.tiny-chip,
.status-pill,
.soft-button,
.ghost-button,
.mood-button,
.period-button,
.tab-button,
.calendar-nav button,
.city-pill,
.language-button {
  transition:
    transform 160ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease,
    background 200ms ease;
}

.language-switcher {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.language-button {
  border: 1px solid rgba(95, 70, 118, 0.12);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
}

.language-button.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink-strong);
  box-shadow: 0 8px 18px rgba(96, 75, 124, 0.12);
}

.weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(255, 252, 249, 0.76);
  border: 1px solid rgba(89, 68, 110, 0.08);
  box-shadow: 0 14px 28px rgba(104, 91, 124, 0.09);
}

.weather-chip strong {
  display: block;
  font-size: 1.05rem;
}

.weather-chip small {
  display: block;
  color: var(--ink-soft);
}

.tiny-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(84, 60, 108, 0.12);
  color: var(--ink-soft);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(310px, 0.92fr);
  gap: 20px;
  margin-top: 20px;
}

.today-layout,
.checkin-layout,
.settings-page {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin-inline: auto;
}

.settings-page-header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: -4px;
}

.stack,
.field-stack,
.settings-grid,
.settings-form,
.period-grid,
.todo-card,
.feedback-card {
  display: grid;
  gap: 16px;
}

.card,
.detail-card,
.settings-card,
.calendar-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 251, 247, 0.78), rgba(255, 251, 247, 0.78)),
    var(--weather-veil);
  border: 1px solid rgba(101, 78, 123, 0.1);
  box-shadow: var(--card-shadow);
}

.calendar-panel::before {
  content: "";
  position: absolute;
  inset: 14px;
  background: url("./assets/textures/paper-calendar.png") center / cover no-repeat;
  opacity: 0.12;
  mix-blend-mode: multiply;
  filter: saturate(0.82) contrast(0.96);
  pointer-events: none;
}

.card::after,
.detail-card::after,
.settings-card::after,
.calendar-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(196, 181, 228, 0.18));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-inner,
.detail-inner,
.settings-inner,
.calendar-inner {
  padding: 22px;
}

.section-title {
  align-items: baseline;
  margin-bottom: 18px;
}

.section-title strong {
  font-size: 1.45rem;
}

.section-title span,
.field-stack label,
.settings-form label,
.mood-button .hint,
.empty-state,
.detail-note,
.detail-message,
.detail-feedback,
.footer-note {
  color: var(--ink-soft);
}

.message-card {
  position: relative;
  min-height: 220px;
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 252, 249, 0.66)),
    var(--weather-veil);
}

.message-card::before {
  content: none;
}

.message-card h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.message-copy {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.25;
  margin: 0;
}

.message-copy.homepage-font-message.is-zh {
  font-family: "HomepageZhTypewriter", serif;
}

.message-copy.homepage-font-message.is-en {
  font-family: "HomepageEnMessageTypewriter", "Gabriele", serif;
  letter-spacing: 0.005em;
}

.message-footer,
.field-row,
.status-row,
.detail-meta,
.city-pills,
.calendar-markers,
.tab-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.message-footer {
  margin-top: 18px;
}

.home-cta-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
}

.message-card-home {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
}

.message-card-home::after {
  content: "";
  position: absolute;
  inset: 18px 16px 12px auto;
  width: clamp(220px, 48vw, 360px);
  aspect-ratio: 0.96;
  background: url("./assets/textures/paper-quote.png") center / contain no-repeat;
  opacity: 0.22;
  mix-blend-mode: multiply;
  filter: saturate(0.88) contrast(0.96);
  pointer-events: none;
  z-index: -1;
}

.note-paper {
  border: 1px solid rgba(101, 78, 123, 0.1);
  border-radius: 24px 28px 22px 30px;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(248, 242, 237, 0.95)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 44%),
    var(--weather-veil);
  box-shadow:
    0 3px 0 rgba(121, 98, 143, 0.14),
    0 22px 34px rgba(83, 61, 104, 0.16);
}

.pinned-note {
  max-width: calc(100% - 18px);
  margin: 10px auto 4px;
  transform: rotate(-1.25deg);
}

.pinned-note::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 26px;
  width: 94px;
  height: 24px;
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.56), rgba(235, 219, 209, 0.34));
  border: 1px solid rgba(127, 105, 146, 0.14);
  border-radius: 7px;
  transform: rotate(-7deg);
  box-shadow: 0 3px 6px rgba(95, 73, 117, 0.08);
  opacity: 0.88;
}

.pinned-note > * {
  position: relative;
  z-index: 1;
}

.period-card .card-inner {
  display: grid;
  gap: 14px;
}

.period-hero {
  display: grid;
  gap: 12px;
}

.period-correction-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.period-correction-row .period-button {
  flex: 1 1 160px;
}

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

.mood-button {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(96, 75, 121, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.65);
  text-align: left;
}

.mood-button:hover,
.mood-button:focus-visible,
.soft-button:hover,
.ghost-button:hover,
.tab-button:hover,
.calendar-nav button:hover,
.period-button:hover,
.status-pill:hover,
.city-pill:hover,
.language-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(101, 77, 122, 0.12);
}

.mood-button.is-active {
  border-color: color-mix(in srgb, var(--weather-accent) 52%, white);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 24px rgba(122, 100, 154, 0.14);
}

.mood-button .emoji,
.feedback-emoji {
  font-size: 1.8rem;
}

.mood-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

.mood-icon svg {
  width: 36px;
  height: 36px;
  stroke: color-mix(in srgb, var(--weather-accent) 60%, var(--ink-soft));
  transition: stroke 200ms ease;
}

.mood-button.is-active .mood-icon svg {
  stroke: color-mix(in srgb, var(--weather-accent) 90%, var(--ink-strong));
}

.mood-button .label,
.feedback-title,
.todo-title {
  font-weight: 700;
}

.feedback-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 253, 250, 0.78);
  border: 1px dashed rgba(116, 89, 145, 0.2);
}

.feedback-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feedback-copy,
.period-panel p {
  margin: 0;
  line-height: 1.65;
}

.animate-pulse {
  animation: pulse-emoji 2.2s ease-in-out infinite;
}

.animate-float {
  animation: float-emoji 2.8s ease-in-out infinite;
}

.animate-drift {
  animation: drift-emoji 3.4s ease-in-out infinite;
}

.field-stack label,
.settings-form label {
  display: grid;
  gap: 8px;
  font-size: 0.93rem;
}

.field-stack textarea,
.field-stack input,
.settings-form input,
.settings-form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(95, 70, 118, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-strong);
  outline: none;
}

.field-stack textarea {
  min-height: 120px;
  resize: vertical;
}

.soft-button,
.ghost-button,
.period-button,
.tab-button,
.calendar-nav button,
.city-pill,
.status-pill {
  padding: 12px 16px;
  border-radius: 999px;
}

.soft-button {
  border: none;
  background: var(--weather-accent);
  color: white;
  box-shadow: 0 12px 22px color-mix(in srgb, var(--weather-accent) 40%, transparent);
}

.ghost-button,
.period-button,
.calendar-nav button,
.city-pill,
.status-pill,
.tab-button {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-strong);
  border: 1px solid rgba(95, 70, 118, 0.12);
}

.todo-card,
.period-panel {
  padding: 18px;
  border-radius: 24px;
}

.todo-card {
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(107, 83, 130, 0.18);
}

.todo-body {
  margin: 0;
  font-size: 1.1rem;
}

.todo-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.period-panel {
  background: linear-gradient(135deg, rgba(255, 244, 248, 0.9), rgba(255, 250, 247, 0.72));
  border: 1px solid rgba(147, 86, 126, 0.12);
}

.period-grid {
  grid-template-columns: 1fr;
}

.period-actions {
  display: grid;
  gap: 10px;
}

.period-actions .period-button {
  width: 100%;
  justify-content: center;
}

.period-panel strong {
  display: block;
  margin-bottom: 8px;
}

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

.calendar-weekdays {
  margin-bottom: 10px;
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.85rem;
}

.calendar-cell {
  position: relative;
  min-height: 82px;
  padding: 10px 8px;
  border: 1px solid rgba(100, 76, 123, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.calendar-cell.is-outside {
  opacity: 0.45;
}

.calendar-cell.is-today {
  border-color: color-mix(in srgb, var(--weather-accent) 48%, white);
  background: rgba(255, 255, 255, 0.92);
}

.calendar-cell.is-selected {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--weather-accent) 54%, white);
}

.calendar-day {
  font-weight: 700;
}

.calendar-mood-marker,
.calendar-weather-marker {
  line-height: 1;
}

.calendar-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #dfb2c1;
}

.calendar-dot.predicted {
  background: #d7c8ef;
}

.detail-card .empty-state,
.calendar-panel .empty-state,
.settings-card .empty-state,
.detail-note,
.detail-message,
.detail-feedback,
.footer-note {
  line-height: 1.7;
}

.detail-card h3 {
  margin-bottom: 8px;
}

.tab-row {
  display: inline-flex;
  padding: 8px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
}

.calendar-detail-sheet {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.calendar-detail-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}

.calendar-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(39, 24, 49, 0.26);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.calendar-detail-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 24px));
  margin: 0 auto max(18px, calc(var(--safe-bottom) + 12px));
  padding: 18px;
  max-height: min(78vh, calc(100dvh - 24px - var(--safe-bottom)));
  border-radius: 30px;
  background: rgba(255, 249, 244, 0.98);
  border: 1px solid rgba(101, 78, 123, 0.12);
  box-shadow: 0 28px 60px rgba(56, 38, 72, 0.24);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.calendar-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-sheet-header strong {
  font-family: "Gabriele", "HuiWenMincho", serif;
  font-size: 1.05rem;
}

.calendar-detail-sheet-body {
  display: grid;
  flex: 1 1 auto;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.settings-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(39, 24, 49, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.settings-sheet {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 24px));
  margin: 0 auto max(18px, calc(var(--safe-bottom) + 12px));
  padding: 18px;
  max-height: min(82vh, calc(100dvh - 24px - var(--safe-bottom)));
  border-radius: 30px;
  background: rgba(255, 249, 244, 0.96);
  border: 1px solid rgba(101, 78, 123, 0.12);
  box-shadow: 0 28px 60px rgba(56, 38, 72, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-sheet-header strong {
  display: block;
  font-family: "Gabriele", "HuiWenMincho", serif;
  font-size: 1.15rem;
}

.settings-sheet-header p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.settings-sheet-body {
  display: grid;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.settings-language-row {
  justify-content: flex-start;
  margin-top: -6px;
}

.tab-button.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-strong);
  box-shadow: 0 8px 18px rgba(96, 75, 124, 0.12);
}

@keyframes pulse-emoji {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@keyframes float-emoji {
  0%,
  100% {
    transform: translateY(0);
  }

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

@keyframes drift-emoji {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  50% {
    transform: translateX(4px) rotate(4deg);
  }
}

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

@media (max-width: 720px) {
  .app-shell {
    width: calc(100% - 18px - var(--safe-left) - var(--safe-right));
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: max(108px, calc(var(--safe-bottom) + 84px));
  }

  .hero {
    padding: 18px;
    padding-top: calc(18px + var(--safe-top));
    border-radius: 0 0 28px 28px;
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
  }

  .hero-title {
    font-size: clamp(1.8rem, 10vw, 2.7rem);
  }

  .hero-actions {
    width: 100%;
    justify-items: stretch;
  }

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

  .calendar-cell {
    min-height: 0;
    aspect-ratio: 1 / 1;
    padding: 6px 5px;
    border-radius: 14px;
  }

  .calendar-grid,
  .calendar-weekdays {
    gap: 4px;
  }

  .calendar-weekdays {
    font-size: 0.72rem;
    margin-bottom: 6px;
  }

  .calendar-day {
    font-size: 0.82rem;
  }

  .calendar-markers {
    gap: 4px;
    align-items: center;
  }

  .calendar-mood-marker,
  .calendar-weather-marker {
    font-size: 0.72rem;
  }

  .calendar-dot {
    width: 7px;
    height: 7px;
  }

  .tab-row {
    position: fixed;
    left: max(12px, calc(var(--safe-left) + 8px));
    right: max(12px, calc(var(--safe-right) + 8px));
    bottom: max(12px, calc(var(--safe-bottom) + 8px));
    z-index: 50;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(95, 70, 118, 0.14);
    background: rgba(255, 251, 247, 0.88);
    box-shadow: 0 18px 36px rgba(79, 58, 101, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .tab-button {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    white-space: nowrap;
    font-size: 0.84rem;
  }

  .settings-sheet {
    width: calc(100% - 16px);
    padding: 14px;
    border-radius: 26px;
  }

  .calendar-detail-sheet-panel {
    width: calc(100% - 16px);
    padding: 14px;
    border-radius: 26px;
  }

  .pinned-note {
    max-width: calc(100% - 8px);
    margin-top: 6px;
    transform: rotate(-0.8deg);
  }

  .pinned-note::before {
    left: 18px;
    width: 72px;
  }
}

/* ── SVG line icon helpers ── */
.brand-icon svg,
.tab-icon svg,
.weather-chip-icon svg,
.section-title svg,
.tiny-chip svg,
.soft-button svg,
.ghost-button svg,
.period-button svg,
.status-pill svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink-soft);
  opacity: 0.8;
}

.tab-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
}

.tab-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  opacity: 0.75;
}

.tab-button.is-active .tab-icon svg {
  opacity: 1;
}

.weather-chip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--weather-accent) 15%, white);
}

.weather-chip-icon svg {
  width: 22px;
  height: 22px;
  stroke: color-mix(in srgb, var(--weather-accent) 80%, var(--ink-strong));
  stroke-width: 1.5;
}

.section-title strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.section-title strong svg {
  width: 15px;
  height: 15px;
  stroke: color-mix(in srgb, var(--weather-accent) 70%, var(--ink-soft));
  flex-shrink: 0;
}

.tiny-chip svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  opacity: 0.7;
}

.soft-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.soft-button svg {
  stroke: white;
  opacity: 0.9;
}

.ghost-button svg {
  stroke: currentColor;
  opacity: 0.65;
}

.calendar-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
}

.calendar-nav button svg {
  stroke: var(--ink-soft);
}
