@font-face {
  font-family: "Medeo Sans";
  src: url("fonts/MedeoSansVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-sans: "Medeo Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f6f1ea;
  --bg-deep: #efe6db;
  --surface: #fffdf9;
  --surface-2: #f6efe6;
  --surface-3: #ecdfd2;
  --ink: #2c2723;
  --ink-2: #51483f;
  --muted: #898074;
  --muted-2: #a89b8d;
  --border: rgba(76, 58, 39, 0.105);
  --border-strong: rgba(76, 58, 39, 0.18);
  --accent: #d46650;
  --accent-strong: #b94c37;
  --accent-soft: #fae5df;
  --accent-ink: #8e3525;
  --sage: #718c73;
  --sage-soft: #e9f1e7;
  --gold: #c28d3e;
  --danger: #be4d4d;
  --danger-soft: #fbe7e5;
  --done-bg: #f2ede7;
  --toast-bg: #2b2622;
  --toast-ink: #fffaf4;
  --hero-bg: linear-gradient(132deg, #fff7f1 0%, #fffdf9 56%, #f1f6ef 100%);
  --shadow-sm: 0 1px 2px rgba(52, 38, 24, 0.035), 0 10px 28px -22px rgba(52, 38, 24, 0.34);
  --shadow-md: 0 2px 4px rgba(52, 38, 24, 0.04), 0 28px 60px -34px rgba(52, 38, 24, 0.42);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px));
  --content-safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151311;
  --bg-deep: #0f0d0c;
  --surface: #211d1a;
  --surface-2: #2a2420;
  --surface-3: #362d27;
  --ink: #f4ede5;
  --ink-2: #d9cdc0;
  --muted: #a99b8e;
  --muted-2: #87796d;
  --border: rgba(255, 238, 220, 0.085);
  --border-strong: rgba(255, 238, 220, 0.16);
  --accent: #eb8a72;
  --accent-strong: #f2a08a;
  --accent-soft: #3b2721;
  --accent-ink: #ffcbbb;
  --sage: #9dbb9d;
  --sage-soft: #263227;
  --gold: #d8b06a;
  --danger: #ef9390;
  --danger-soft: #3a2424;
  --done-bg: #26211d;
  --toast-bg: #f4ede5;
  --toast-ink: #211d1a;
  --hero-bg: linear-gradient(132deg, #2d211d 0%, #211d1a 54%, #202a20 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18), 0 14px 30px -24px rgba(0, 0, 0, 0.72);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.2), 0 30px 70px -32px rgba(0, 0, 0, 0.8);
}

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

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1000px 650px at -12% -8%, rgba(212, 102, 80, 0.105), transparent 56%),
    radial-gradient(860px 620px at 112% 6%, rgba(113, 140, 115, 0.11), transparent 52%),
    radial-gradient(700px 500px at 50% 112%, rgba(194, 141, 62, 0.055), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

body.sheet-open {
  overflow: hidden;
}

[data-theme="dark"] body {
  background:
    radial-gradient(1000px 650px at -12% -8%, rgba(235, 138, 114, 0.09), transparent 56%),
    radial-gradient(860px 620px at 112% 6%, rgba(157, 187, 157, 0.075), transparent 52%),
    radial-gradient(700px 500px at 50% 112%, rgba(216, 176, 106, 0.045), transparent 60%),
    var(--bg);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

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

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: var(--accent);
  text-decoration: none;
}

img,
svg {
  display: block;
}

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

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.page-glow::before,
.page-glow::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.45;
}

.page-glow::before {
  top: 12%;
  left: -150px;
  background: rgba(212, 102, 80, 0.12);
}

.page-glow::after {
  bottom: 4%;
  right: -140px;
  background: rgba(113, 140, 115, 0.12);
}

.page-glow::before,
.page-glow::after {
  animation: glowDrift 16s ease-in-out infinite alternate;
}

.page-glow::after {
  animation-delay: -7s;
}

.container {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top) + var(--content-safe-top)) 18px calc(30px + var(--safe-bottom));
}

.app-shell {
  animation: fadeUp 0.4s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.eyebrow {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

/* ══════════════ Top bar ══════════════ */

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.36), transparent 38%),
    linear-gradient(140deg, #e88a70, #c9553e 72%);
  color: #fff8f3;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 9px 20px -12px rgba(185, 76, 55, 0.72);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-mark--large {
  width: 64px;
  height: 64px;
  border-radius: 21px;
  margin: 0 auto;
}

.brand-mark--large svg {
  width: 32px;
  height: 32px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.avatar-button:active {
  transform: scale(0.94);
}

.avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.5), transparent 42%),
    linear-gradient(145deg, var(--accent-soft), var(--surface-3));
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-ring {
  position: absolute;
  inset: -3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  opacity: 0.6;
  pointer-events: none;
}

/* ══════════════ Hero ══════════════ */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 184px;
  padding: 23px 21px 21px;
  background: var(--hero-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 78%;
}

.hero .eyebrow {
  color: var(--accent-ink);
  opacity: 0.8;
}

.hero h1 {
  margin-top: 7px;
  font-size: clamp(27px, 7.4vw, 34px);
  font-weight: 690;
  letter-spacing: -0.038em;
  line-height: 1.03;
  text-wrap: balance;
}

.hero-text {
  max-width: 280px;
  margin-top: 9px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.52;
  text-wrap: pretty;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 10px 6px 8px;
  border: 1px solid rgba(212, 102, 80, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

[data-theme="dark"] .hero-pill {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(235, 138, 114, 0.18);
}

.hero-pill .icon {
  width: 14px;
  height: 14px;
}

.hero-art {
  position: absolute;
  right: -16px;
  bottom: -22px;
  width: 174px;
  height: 174px;
  z-index: 1;
  pointer-events: none;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(212, 102, 80, 0.16);
  border-radius: 999px;
}

[data-theme="dark"] .hero-orbit {
  border-color: rgba(235, 138, 114, 0.16);
}

.hero-orbit--one {
  inset: 13px;
}

.hero-orbit--two {
  inset: 35px;
  border-style: dashed;
  opacity: 0.8;
}

.hero-heart {
  position: absolute;
  top: 56px;
  left: 56px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.34), transparent 44%),
    linear-gradient(145deg, #e98b72, #c5523d);
  color: #fff8f3;
  transform: rotate(-7deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 20px 34px -18px rgba(185, 76, 55, 0.7);
}

.hero-heart svg {
  width: 29px;
  height: 29px;
}

.hero-spark {
  position: absolute;
  color: var(--gold);
  font-size: 15px;
  line-height: 1;
  opacity: 0.9;
}

.hero-spark--one {
  top: 23px;
  left: 30px;
  transform: rotate(12deg) scale(0.8);
}

.hero-spark--two {
  right: 27px;
  bottom: 44px;
  font-size: 10px;
  opacity: 0.7;
}

/* ══════════════ Section headings ══════════════ */

.section-heading,
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2,
.list-heading h2 {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.heading-badge {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: none;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.heading-badge svg {
  width: 18px;
  height: 18px;
}

/* ══════════════ Composer ══════════════ */

.composer {
  margin-top: 14px;
  padding: 18px;
}

.field {
  margin-top: 11px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: var(--surface-2);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.field:focus-within {
  border-color: rgba(212, 102, 80, 0.42);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(212, 102, 80, 0.09);
}

[data-theme="dark"] .field:focus-within {
  border-color: rgba(235, 138, 114, 0.46);
  box-shadow: 0 0 0 3px rgba(235, 138, 114, 0.1);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.field input {
  min-height: 50px;
  padding: 13px 15px;
}

.field textarea {
  min-height: 47px;
  max-height: 170px;
  padding: 12px 15px;
  overflow-y: hidden;
  resize: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
  opacity: 1;
}

.field--title input {
  font-weight: 520;
  letter-spacing: -0.01em;
}

.field--comment textarea {
  font-size: 14px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 2px 8px;
}

.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-button {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.text-button:hover {
  color: var(--accent-strong);
}

.text-button:active {
  opacity: 0.7;
}

/* ══════════════ Chips ══════════════ */

.chip-scroller {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 1px 3px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.chip-scroller::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 35px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 520;
  line-height: 1.1;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.chip:active {
  transform: scale(0.96);
}

.chip:hover {
  border-color: var(--border-strong);
}

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

[data-theme="dark"] .chip.is-active {
  color: #1a1714;
}

.chip-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
  background: var(--chip-color, var(--accent));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
}

.chip.is-active .chip-dot {
  box-shadow: none;
}

.chip-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
}

.chip.is-active .chip-count {
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
}

[data-theme="dark"] .chip.is-active .chip-count {
  background: rgba(0, 0, 0, 0.12);
}

.chip.chip-add {
  border-style: dashed;
  color: var(--muted);
  background: transparent;
}

.chip.chip-add:hover {
  color: var(--accent);
  border-color: rgba(212, 102, 80, 0.4);
}

.chip .chip-emoji {
  font-size: 13px;
  line-height: 1;
}

.chip .icon {
  width: 13px;
  height: 13px;
}

/* ══════════════ Buttons ══════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 15px;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.985);
}

.btn.is-busy .icon {
  animation: spin 0.9s linear infinite;
}

.btn-secondary:disabled,
.btn-danger:disabled {
  opacity: 0.55;
}

.btn-primary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 12px 24px -14px rgba(185, 76, 55, 0.75);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.035);
}

.btn-primary:disabled {
  background: var(--surface-3);
  color: var(--muted);
  box-shadow: none;
  opacity: 0.8;
}

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.add-button {
  width: 100%;
  margin-top: 14px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.15s ease;
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.icon-button:active {
  transform: scale(0.93);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon-button.is-busy .icon {
  animation: spin 0.9s linear infinite;
}

.icon-button .icon {
  width: 18px;
  height: 18px;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.1;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.tool-button .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.tool-button:hover {
  border-color: var(--border-strong);
}

.tool-button:active {
  transform: scale(0.96);
}

.tool-button[aria-pressed="true"],
.tool-button.is-active {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.tool-button[aria-pressed="true"] .icon,
.tool-button.is-active .icon {
  color: var(--accent-ink);
}

/* ══════════════ Progress ══════════════ */

.progress-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 15px 16px;
}

.progress-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: none;
}

.progress-ring svg {
  width: 58px;
  height: 58px;
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 5;
}

.ring-track {
  stroke: var(--surface-3);
}

.ring-value {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 144.52;
  stroke-dashoffset: 144.52;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 0.8, 0.3, 1), stroke 0.3s ease;
}

.progress-ring.is-complete .ring-value {
  stroke: var(--sage);
}

.progress-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 1px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.progress-copy {
  min-width: 0;
  flex: 1;
}

.progress-copy h2 {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.progress-copy p:last-child {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-copy-btn {
  margin-left: auto;
}

/* ══════════════ Notes and filters ══════════════ */

.notes-section {
  margin-top: 27px;
}

.list-heading {
  padding: 0 2px;
}

.list-heading .icon-button {
  background: transparent;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
}

.filter-chips {
  flex: 1;
  min-width: 0;
}

.filter-settings {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 999px;
  background: var(--surface);
}

.tool-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-top: 9px;
  padding: 1px 1px 3px;
  scrollbar-width: none;
}

.tool-row::-webkit-scrollbar {
  display: none;
}

.search-wrap {
  margin-top: 10px;
  animation: fadeUp 0.2s ease both;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 45px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-field:focus-within {
  border-color: rgba(212, 102, 80, 0.4);
  box-shadow: 0 0 0 3px rgba(212, 102, 80, 0.08);
}

.search-field .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.search-clear .icon {
  width: 13px;
  height: 13px;
}

.notes-container {
  margin-top: 19px;
  min-height: 120px;
}

.notes-group + .notes-group {
  margin-top: 25px;
}

.group-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  padding: 0 3px;
}

.group-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 8px;
  background: var(--group-tint, var(--surface-2));
  font-size: 13px;
  line-height: 1;
}

.group-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.095em;
  line-height: 1.2;
  text-transform: uppercase;
}

.group-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
}

.group-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ══════════════ Note card ══════════════ */

.note-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  padding: 13px 42px 13px 13px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.note-card.is-done {
  border-color: transparent;
  background: var(--done-bg);
  box-shadow: none;
}

.note-card.is-new {
  animation: noteIn 0.36s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.note-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 1px;
  padding: 0;
  border: 1.6px solid var(--border-strong);
  border-radius: 9px;
  background: transparent;
  color: #fff;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.14s ease;
}

.note-check:hover {
  border-color: var(--sage);
}

.note-check:active {
  transform: scale(0.9);
}

.note-check .icon {
  width: 15px;
  height: 15px;
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.note-card.is-done .note-check {
  border-color: var(--sage);
  background: var(--sage);
}

.note-card.is-done .note-check .icon {
  opacity: 1;
  transform: scale(1);
}

.note-body {
  min-width: 0;
}

.note-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 530;
  letter-spacing: -0.012em;
  line-height: 1.38;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

.note-card.is-done .note-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--muted-2);
  text-decoration-thickness: 1.4px;
}

.note-comment {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.note-card.is-done .note-comment {
  color: var(--muted-2);
}

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.25;
}

.author-avatar {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: none;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.author-name {
  color: var(--muted);
  font-weight: 550;
}

.meta-dot {
  width: 2px;
  height: 2px;
  flex: none;
  border-radius: 999px;
  background: var(--muted-2);
  opacity: 0.75;
}

.note-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 130px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 520;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 999px;
  background: var(--category-color, var(--accent));
}

.done-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 9.5px;
  font-weight: 680;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.done-badge .icon {
  width: 10px;
  height: 10px;
}

.note-more {
  position: absolute;
  top: 10px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-2);
  transition: background 0.15s ease, color 0.15s ease;
}

.note-more:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.note-more:active {
  transform: scale(0.92);
}

.note-more .icon {
  width: 17px;
  height: 17px;
}

/* ══════════════ Empty states ══════════════ */

.empty-state {
  padding: 34px 22px 28px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 249, 0.46);
  text-align: center;
}

[data-theme="dark"] .empty-state {
  background: rgba(33, 29, 26, 0.46);
}

.empty-art {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 14px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.38), transparent 44%),
    linear-gradient(145deg, var(--accent-soft), var(--surface-2));
  color: var(--accent);
  transform: rotate(-4deg);
  box-shadow: var(--shadow-sm);
}

.empty-art svg {
  width: 30px;
  height: 30px;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 300px;
  margin: 5px auto 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.empty-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.suggestion {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 520;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.suggestion:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.empty-state .btn {
  margin-top: 16px;
}

.offline-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid rgba(190, 77, 77, 0.16);
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.35;
}

.offline-banner .icon {
  width: 16px;
  height: 16px;
}

.offline-banner span {
  flex: 1;
}

.offline-banner button {
  padding: 2px 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ══════════════ Footer ══════════════ */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
  padding: 17px 3px calc(22px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sync-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 999px;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(113, 140, 115, 0.11);
}

.sync-status.is-busy .sync-dot {
  animation: syncPulse 1.3s ease-in-out infinite;
}

.sync-status.is-error {
  color: var(--danger);
}

.sync-status.is-error .sync-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(190, 77, 77, 0.1);
}

.footer .text-button {
  font-size: 11px;
  color: var(--muted);
  font-weight: 520;
}

.footer .text-button:hover {
  color: var(--ink);
}

/* ══════════════ Loading and auth ══════════════ */

.center-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
}

.loading-card {
  width: 100%;
  max-width: 280px;
  text-align: center;
}

.loading-card h1 {
  margin-top: 17px;
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -0.035em;
}

.loading-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.loading-card .brand-mark {
  animation: breathe 2.2s ease-in-out infinite;
}

.loading-lines {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 27px;
}

.loading-lines span {
  position: relative;
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.loading-lines span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s ease-in-out infinite;
}

[data-theme="dark"] .loading-lines span::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.loading-lines span:nth-child(2) {
  width: 82%;
  margin: 0 auto;
}

.loading-lines span:nth-child(3) {
  width: 64%;
  margin: 0 auto;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 27px 23px 22px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.auth-card .eyebrow {
  margin-top: 16px;
  color: var(--accent);
}

.auth-card h1 {
  margin-top: 6px;
  font-size: 23px;
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}

.auth-text {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-wrap: pretty;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 21px;
}

.auth-actions .btn {
  width: 100%;
}

.auth-hint {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--ink);
  text-align: center;
  z-index: 300;
}

/* ══════════════ Sheets ══════════════ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(24, 17, 13, 0.46);
  opacity: 0;
  transition: opacity 0.2s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  max-height: min(91vh, 860px);
  max-height: min(91dvh, 860px);
  overflow: hidden;
  padding-bottom: var(--safe-bottom);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 27px 27px 0 0;
  background: var(--surface);
  box-shadow: 0 -20px 60px -28px rgba(36, 24, 15, 0.45);
  transform: translateY(20px);
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.sheet-backdrop.is-open .sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  flex: none;
  margin: 9px auto 2px;
  border-radius: 999px;
  background: var(--border-strong);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: none;
  padding: 8px 19px 8px 22px;
}

.sheet-header h2 {
  font-size: 20px;
  font-weight: 660;
  letter-spacing: -0.028em;
  line-height: 1.2;
}

.sheet-header .icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--surface-2);
}

.sheet-body {
  overflow-y: auto;
  padding: 8px 21px calc(24px + var(--safe-bottom));
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sheet-body::-webkit-scrollbar {
  width: 5px;
}

.sheet-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--border-strong);
}

.sheet-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.sheet-section-title {
  margin: 17px 0 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 680;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field-group {
  margin-top: 13px;
}

.category-form .sheet-section-title {
  margin-top: 0;
}

.category-form .field-group:first-of-type {
  margin-top: 10px;
}

.action-list--spaced {
  margin-top: 16px;
}

.profile-theme {
  margin-bottom: 17px;
}

.profile-theme-label {
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
}

.profile-theme-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.profile-theme-button {
  min-height: 40px;
  padding: 7px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.profile-theme-button[aria-pressed="true"] {
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.sheet-body .info-note {
  margin-top: 14px;
}

.note-preview > div:last-child {
  min-width: 0;
}

.profile-head .brand-mark {
  margin: 0;
}

.form-field {
  display: flex;
  align-items: center;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-field:focus-within {
  border-color: rgba(212, 102, 80, 0.42);
  box-shadow: 0 0 0 3px rgba(212, 102, 80, 0.08);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.form-field textarea {
  min-height: 84px;
  padding: 11px 0;
  resize: vertical;
  line-height: 1.45;
}

.form-row {
  display: flex;
  gap: 9px;
}

.form-row > * {
  flex: 1;
  min-width: 0;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.form-actions .btn {
  flex: 1;
}

.category-form {
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
}

.category-form .form-field {
  background: var(--surface);
}

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

.emoji-choice {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface);
  font-size: 17px;
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.14s ease;
}

.emoji-choice:hover {
  background: var(--surface-3);
}

.emoji-choice:active {
  transform: scale(0.9);
}

.emoji-choice.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 4px 2px;
}

.color-choice {
  position: relative;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--swatch) padding-box;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.color-choice:hover {
  transform: scale(1.08);
}

.color-choice.is-selected {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--swatch);
}

.color-choice .icon {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.color-choice.is-selected .icon {
  opacity: 1;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 8px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.category-row.is-editing {
  border-color: rgba(212, 102, 80, 0.38);
  background: var(--accent-soft);
}

.category-row-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex: none;
  border-radius: 11px;
  background: var(--category-tint, var(--surface));
  font-size: 17px;
  line-height: 1;
}

.category-row-copy {
  flex: 1;
  min-width: 0;
}

.category-row-name {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 590;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-row-meta {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
}

.category-row-actions {
  display: flex;
  gap: 3px;
  flex: none;
}

.category-row-actions .icon-button {
  width: 31px;
  height: 31px;
  border: 0;
  background: transparent;
}

.category-row-actions .icon-button:hover {
  background: var(--surface);
}

.category-row-actions .icon-button.danger:hover {
  color: var(--danger);
}

.category-row-actions .icon {
  width: 16px;
  height: 16px;
}

.category-lock {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--muted-2);
}

.category-lock .icon {
  width: 15px;
  height: 15px;
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 9px 12px 9px 10px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 540;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.14s ease;
}

.action-item:hover {
  border-color: var(--border-strong);
}

.action-item:active {
  transform: scale(0.988);
}

.action-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: none;
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}

.action-icon .icon {
  width: 18px;
  height: 18px;
}

.action-item.danger {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger);
}

.action-item.danger .action-icon {
  background: rgba(255, 255, 255, 0.34);
  color: var(--danger);
}

[data-theme="dark"] .action-item.danger .action-icon {
  background: rgba(0, 0, 0, 0.12);
}

.action-item .action-trailing {
  margin-left: auto;
  color: var(--muted-2);
}

.action-item .action-trailing .icon {
  width: 15px;
  height: 15px;
}

.note-preview {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.note-preview .category-dot {
  margin-top: 6px;
}

.note-preview-title {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 560;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.note-preview-comment {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.confirm-copy {
  margin: 2px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 17px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: none;
  overflow: hidden;
  border-radius: 19px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.45), transparent 42%),
    linear-gradient(145deg, var(--accent-soft), var(--surface-3));
  color: var(--accent-ink);
  font-size: 22px;
  font-weight: 700;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-copy {
  min-width: 0;
}

.profile-name {
  overflow: hidden;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-username {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 17px;
}

.profile-stat {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.profile-stat-value {
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.profile-stat-label {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.48;
}

.info-note .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex: none;
  color: var(--sage);
}

.app-version {
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

/* ══════════════ Toasts ══════════════ */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  width: min(92vw, 420px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  box-shadow: 0 16px 38px -20px rgba(20, 12, 6, 0.7);
  font-size: 12.5px;
  font-weight: 520;
  line-height: 1.35;
  pointer-events: auto;
  animation: toastIn 0.24s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.toast.is-out {
  animation: toastOut 0.18s ease forwards;
}

.toast .icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--sage);
}

.toast.is-error .icon {
  color: #f19a92;
}

.toast span {
  flex: 1;
  min-width: 0;
}

.toast-action {
  padding: 3px 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* ══════════════ Animations ══════════════ */

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

@keyframes noteIn {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(5px) scale(0.985);
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

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

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 9px 20px -12px rgba(185, 76, 55, 0.72);
  }
  50% {
    transform: scale(1.045);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 16px 30px -14px rgba(185, 76, 55, 0.62);
  }
}

@keyframes syncPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.78);
  }
}

@keyframes glowDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(20px, -18px, 0) scale(1.08);
  }
}

/* ══════════════ Responsive ══════════════ */

@media (min-width: 700px) {
  .container {
    padding-top: calc(28px + var(--safe-top) + var(--content-safe-top));
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero {
    min-height: 198px;
    padding: 26px 26px 24px;
  }

  .hero-copy {
    max-width: 70%;
  }

  .hero h1 {
    font-size: 35px;
  }

  .hero-art {
    right: 4px;
    bottom: -12px;
    width: 190px;
    height: 190px;
  }

  .hero-orbit--one {
    inset: 15px;
  }

  .hero-orbit--two {
    inset: 38px;
  }

  .hero-heart {
    top: 63px;
    left: 63px;
    width: 66px;
    height: 66px;
  }

  .composer {
    padding: 21px;
  }

  .note-card {
    padding: 14px 44px 14px 14px;
  }

  .sheet-backdrop {
    align-items: center;
    padding: 24px;
  }

  .sheet {
    border-bottom: 1px solid var(--border);
    border-radius: 27px;
    padding-bottom: 0;
  }

  .sheet-body {
    padding-bottom: 24px;
  }

  .toast-region {
    bottom: 24px;
  }
}

@media (max-width: 379px) {
  .container {
    padding-left: 13px;
    padding-right: 13px;
  }

  .hero {
    min-height: 174px;
    padding: 20px 17px 18px;
  }

  .hero-copy {
    max-width: 76%;
  }

  .hero h1 {
    font-size: 27px;
  }

  .hero-text {
    font-size: 12px;
  }

  .hero-art {
    right: -26px;
    bottom: -28px;
    transform: scale(0.92);
  }

  .composer {
    padding: 15px;
  }

  .section-heading h2,
  .list-heading h2 {
    font-size: 18.5px;
  }

  .progress-card {
    gap: 11px;
    padding: 13px;
  }

  .progress-ring,
  .progress-ring svg {
    width: 52px;
    height: 52px;
  }

  .progress-copy h2 {
    font-size: 14px;
  }

  .tool-button {
    font-size: 11.5px;
    padding: 7px 9px;
  }

  .tool-button .icon {
    width: 14px;
    height: 14px;
  }

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}
