/* ==========================================================================
   Daynotes - design system
   Typeface: Inter (self-hosted variable woff2, CSP-safe)
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --paper: #f7f6f2;
  --paper-grain: #efeee8;
  --surface: #ffffff;
  --surface-sunk: #faf9f5;
  --surface-hover: #f3f5f1;

  --ink: #1b1f1c;
  --ink-soft: #5c655e;
  --ink-faint: #8c948b;
  --ink-ghost: #b4bab2;

  --line: #e6e7e0;
  --line-soft: #eff0ea;
  --line-strong: #d4d7cd;

  --accent: #2f6a4a;
  --accent-hover: #255740;
  --accent-soft: #eaf2ec;
  --accent-ink: #ffffff;
  --accent-ring: #7fae92;

  --danger: #a8302a;
  --danger-soft: #fbeceb;

  --mood-1: #b3312a;
  --mood-2: #d4694a;
  --mood-3: #dda05a;
  --mood-4: #9aa49c;
  --mood-5: #5f9f77;
  --mood-6: #2d7d55;

  --shadow-sm: 0 1px 2px rgba(24, 33, 27, .05), 0 1px 1px rgba(24, 33, 27, .03);
  --shadow-md: 0 1px 2px rgba(24, 33, 27, .04), 0 8px 24px -12px rgba(24, 33, 27, .16);
  --shadow-lg: 0 2px 4px rgba(24, 33, 27, .04), 0 24px 48px -20px rgba(24, 33, 27, .22);

  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  --ease: cubic-bezier(.33, 1, .68, 1);
  --fast: .14s var(--ease);
  --slow: .26s var(--ease);
}

:root[data-theme='dark'] {
  --paper: #0f1311;
  --paper-grain: #141916;
  --surface: #171c19;
  --surface-sunk: #131816;
  --surface-hover: #1e2521;

  --ink: #e9ece8;
  --ink-soft: #a7b0a8;
  --ink-faint: #7d867e;
  --ink-ghost: #5a635c;

  --line: #262d28;
  --line-soft: #1f2622;
  --line-strong: #343c36;

  --accent: #6cbf90;
  --accent-hover: #83d0a3;
  --accent-soft: #1a2a21;
  --accent-ink: #0b1310;
  --accent-ring: #4e9872;

  --danger: #ef8279;
  --danger-soft: #2a1715;

  --mood-1: #e0665c;
  --mood-2: #e68a66;
  --mood-3: #d9ad6c;
  --mood-4: #8d968f;
  --mood-5: #6fba8a;
  --mood-6: #46a873;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .7);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0f1311;
    --paper-grain: #141916;
    --surface: #171c19;
    --surface-sunk: #131816;
    --surface-hover: #1e2521;

    --ink: #e9ece8;
    --ink-soft: #a7b0a8;
    --ink-faint: #7d867e;
    --ink-ghost: #5a635c;

    --line: #262d28;
    --line-soft: #1f2622;
    --line-strong: #343c36;

    --accent: #6cbf90;
    --accent-hover: #83d0a3;
    --accent-soft: #1a2a21;
    --accent-ink: #0b1310;
    --accent-ring: #4e9872;

    --danger: #ef8279;
    --danger-soft: #2a1715;

    --mood-1: #e0665c;
    --mood-2: #e68a66;
    --mood-3: #d9ad6c;
    --mood-4: #8d968f;
    --mood-5: #6fba8a;
    --mood-6: #46a873;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .7);
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

/* The display rules below would otherwise outrank the UA style for [hidden]. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 12% -10%, var(--paper-grain), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, var(--paper-grain), transparent 55%);
  background-attachment: fixed;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv05' 1, 'cv11' 1, 'ss01' 1;
  font-variant-ligatures: contextual;
  letter-spacing: -.0055em;
}

h1, h2, h3, p { margin: 0; }

h1 {
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.2;
}

h2 {
  font-size: 1.3rem;
  font-weight: 620;
  letter-spacing: -.028em;
  line-height: 1.25;
}

h3 {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.016em;
}

a { color: var(--accent); }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* --------------------------------------------------------------------------
   Icons
   -------------------------------------------------------------------------- */

.icon {
  width: 17px;
  height: 17px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  overflow: visible;
}

.icon-lg { width: 21px; height: 21px; stroke-width: 1.5; }
.icon-sm { width: 14px; height: 14px; stroke-width: 1.8; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --------------------------------------------------------------------------
   Controls
   -------------------------------------------------------------------------- */

button, input, textarea, select { font: inherit; letter-spacing: inherit; color: inherit; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 540;
  letter-spacing: -.012em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--fast), border-color var(--fast), box-shadow var(--fast),
    transform var(--fast), color var(--fast);
}

button:hover:not(:disabled), .button:hover {
  background: var(--surface-hover);
  border-color: var(--ink-ghost);
}

button:active:not(:disabled), .button:active { transform: translateY(1px); box-shadow: none; }

button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 580;
  box-shadow: var(--shadow-md);
}

button.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

button.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--ink-soft);
}

button.ghost:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: transparent;
  color: var(--ink);
}

button.danger { color: var(--danger); }
button.danger:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }

.icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 64px;
}

header.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(28px, 5vw, 48px) 0 clamp(22px, 3vw, 34px);
}

.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  background: linear-gradient(160deg, var(--accent), var(--accent-hover));
  color: var(--accent-ink);
  box-shadow: var(--shadow-md);
}

.brand-mark .icon { width: 21px; height: 21px; stroke-width: 1.6; }

.brand-text { min-width: 0; }
.brand-text h1 { font-size: 1.4rem; }
.brand-text p { font-size: .8125rem; color: var(--ink-faint); letter-spacing: -.005em; }

.brand-dot { color: var(--accent); }

.masthead-actions { display: flex; align-items: center; gap: 8px; }

.eyebrow {
  display: block;
  font-size: .625rem;
  font-weight: 620;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  gap: 20px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}

footer.colophon {
  margin-top: 36px;
  text-align: center;
  font-size: .8125rem;
  color: var(--ink-ghost);
}

/* --------------------------------------------------------------------------
   Settings drawer
   -------------------------------------------------------------------------- */

.settings {
  padding: 24px;
  margin-bottom: 20px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  animation: drop var(--slow) both;
}

@keyframes drop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.settings-head { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; }
.settings-head .icon { color: var(--accent); margin-top: 3px; }
.settings-head p { font-size: .8125rem; color: var(--ink-soft); margin-top: 2px; }

.settings-card {
  border: 1px solid var(--line-soft);
  background: var(--surface-sunk);
  border-radius: var(--r-md);
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.settings-card h3 { display: flex; align-items: center; gap: 8px; }
.settings-card h3 .icon { color: var(--accent); }
.settings-card .hint { font-size: .78125rem; color: var(--ink-faint); line-height: 1.5; }

.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: .875rem;
  font-weight: 540;
  cursor: pointer;
  transition: border-color var(--fast), background var(--fast), color var(--fast);
}

.file-label:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.file-label:focus-within { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.file-label input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-label:has(input:disabled) { opacity: .5; cursor: not-allowed; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .8125rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

#import-options { display: grid; gap: 10px; }

/* --------------------------------------------------------------------------
   Calendar
   -------------------------------------------------------------------------- */

.calendar-panel { padding: clamp(18px, 2.4vw, 26px); }

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.calendar-toolbar h2 { margin-top: 7px; font-size: clamp(1.35rem, 2.2vw, 1.6rem); }

.navigation {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-sunk);
}

.navigation button {
  box-shadow: none;
  border-color: transparent;
  background: transparent;
  min-height: 34px;
  height: 34px;
}

.navigation button:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.navigation .icon-button { width: 34px; }

#today { padding: 0 14px; font-size: .8125rem; gap: 6px; }

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  padding-bottom: 10px;
}

.weekdays span {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-left: 11px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.blank { min-height: 116px; border-radius: var(--r-md); }

.day {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 116px;
  padding: 10px 11px 11px;
  text-align: left;
  font-size: .8125rem;
  font-weight: 400;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: none;
  overflow: hidden;
  transition: background var(--fast), border-color var(--fast), transform var(--fast),
    box-shadow var(--fast);
}

.day:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.day:active:not(:disabled) { transform: none; }

.day-number {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  font-size: .8125rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  transition: background var(--fast), color var(--fast);
}

.day.is-today .day-number {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 640;
}

.day.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}

.day.selected .day-number { color: var(--ink); }
.day.selected.is-today .day-number { color: var(--accent-ink); }

.day.future {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-soft);
  color: var(--ink-ghost);
  cursor: default;
}

.day.future .day-number { color: var(--ink-ghost); }

.day.future:hover {
  transform: none;
  box-shadow: none;
  background: transparent;
  border-color: var(--line-soft);
}

.mood-1 { --mood: var(--mood-1); }
.mood-2 { --mood: var(--mood-2); }
.mood-3 { --mood: var(--mood-3); }
.mood-4 { --mood: var(--mood-4); }
.mood-5 { --mood: var(--mood-5); }
.mood-6 { --mood: var(--mood-6); }

.day.has-entry::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--mood);
}

.mood-badge {
  position: absolute;
  top: 12px;
  right: 11px;
  width: 9px;
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--mood);
  color: transparent;
  font-size: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mood) 18%, transparent);
}

.preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 9px;
  font-size: .71875rem;
  line-height: 1.45;
  color: var(--ink-faint);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.day.selected .preview { color: var(--ink-soft); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  background: var(--surface-sunk);
  font-size: .71875rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}

.legend span::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--mood);
}

.calendar-footnote {
  margin-top: 16px;
  font-size: .78125rem;
  font-style: italic;
  color: var(--ink-ghost);
}

/* --------------------------------------------------------------------------
   Editor
   -------------------------------------------------------------------------- */

.editor {
  position: sticky;
  top: 20px;
  padding: 24px;
  display: grid;
  gap: 4px;
}

.editor-date { font-size: .8125rem; color: var(--ink-faint); margin-top: 8px; }
.editor h2 { margin: 2px 0 18px; }

#entry-form { display: grid; gap: 14px; }

#entry-form label[for='note'] {
  font-size: .78125rem;
  font-weight: 560;
  color: var(--ink-soft);
}

textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-sunk);
  font-size: .9375rem;
  line-height: 1.65;
  resize: vertical;
  min-height: 170px;
  transition: border-color var(--fast), background var(--fast), box-shadow var(--fast);
}

textarea::placeholder { color: var(--ink-ghost); }

textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea:disabled { opacity: .6; }

.count {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: -6px;
  font-size: .71875rem;
  color: var(--ink-ghost);
}

#counter { font-variant-numeric: tabular-nums; }

fieldset { border: 0; padding: 0; margin: 0; }

fieldset legend {
  padding: 0 0 10px;
  font-size: .78125rem;
  font-weight: 560;
  color: var(--ink-soft);
}

.moods { display: grid; gap: 6px; }

.mood-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--surface-sunk);
  font-size: .8125rem;
  font-weight: 480;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color var(--fast), background var(--fast), color var(--fast);
}

.mood-option::before {
  content: '';
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--mood);
  transition: box-shadow var(--fast);
}

.mood-option:hover { border-color: var(--line-strong); background: var(--surface-hover); }

.mood-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mood-option:has(input:checked) {
  border-color: var(--mood);
  background: color-mix(in srgb, var(--mood) 10%, var(--surface));
  color: var(--ink);
  font-weight: 560;
}

.mood-option:has(input:checked)::before {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mood) 25%, transparent);
}

.mood-option:has(input:focus-visible) { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.mood-option:has(input:disabled) { opacity: .55; cursor: not-allowed; }

.editor-actions { display: flex; gap: 8px; margin-top: 2px; }
.editor-actions .primary { flex: 1; }
.editor-actions .icon-button { width: 40px; height: 40px; min-height: 40px; }

/* --------------------------------------------------------------------------
   Status messages
   -------------------------------------------------------------------------- */

#entry-status, #import-status, #calendar-status {
  font-size: .78125rem;
  color: var(--ink-faint);
  min-height: 1.3em;
}

#entry-status:empty, #import-status:empty, #calendar-status:empty { min-height: 0; }

#calendar-status:not(:empty) { margin-bottom: 12px; }

.error, #entry-status.error, #import-status.error, #calendar-status.error {
  color: var(--danger);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */

body.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}

.login-panel {
  width: 100%;
  max-width: 400px;
  padding: clamp(28px, 5vw, 40px);
  box-shadow: var(--shadow-lg);
  animation: rise var(--slow) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to { opacity: 1; transform: none; }
}

.login-panel .brand-mark { width: 48px; height: 48px; border-radius: 15px; margin-bottom: 20px; }
.login-panel .brand-mark .icon { width: 24px; height: 24px; }
.login-panel h1 { margin: 10px 0 5px; font-size: 1.6rem; }
.login-panel > p { font-size: .875rem; color: var(--ink-faint); margin-bottom: 26px; }
.login-panel form { display: grid; gap: 9px; }

.login-panel label {
  font-size: .78125rem;
  font-weight: 560;
  color: var(--ink-soft);
}

.field { position: relative; display: flex; align-items: center; }

.field .icon {
  position: absolute;
  left: 13px;
  color: var(--ink-ghost);
  pointer-events: none;
  transition: color var(--fast);
}

.field:focus-within .icon { color: var(--accent); }

.login-panel input[type='password'] {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-sunk);
  font-size: .9375rem;
  transition: border-color var(--fast), background var(--fast), box-shadow var(--fast);
}

.login-panel input[type='password']:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-panel button.primary { margin-top: 7px; min-height: 44px; }

.login-panel .error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  font-size: .8125rem;
}

.login-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  color: var(--ink-ghost);
}

.login-foot .icon { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   Theme toggle
   -------------------------------------------------------------------------- */

.theme-toggle .icon-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-moon { display: block; }
:root[data-theme='dark'] .theme-toggle .icon-sun { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-moon { display: block; }
  :root:not([data-theme='light']) .theme-toggle .icon-sun { display: none; }
}

.login-theme { position: fixed; top: 20px; right: 20px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .settings { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
  .editor { position: static; }
  .day, .blank { min-height: 102px; }
}

@media (max-width: 680px) {
  body { font-size: 14.5px; }
  header.masthead { flex-wrap: wrap; }
  .calendar-toolbar { align-items: flex-start; }
  .navigation { width: 100%; justify-content: space-between; }
  .weekdays span { padding-left: 0; text-align: center; font-size: .625rem; }
  .calendar, .weekdays { gap: 4px; }
  .day, .blank { min-height: 68px; }
  .day { padding: 6px; }
  .day-number { width: 100%; height: auto; }
  .preview { display: none; }
  .mood-badge { top: auto; bottom: 7px; left: 50%; right: auto; transform: translateX(-50%); width: 6px; height: 6px; }
  .day.has-entry::after { display: none; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .editor, .calendar-panel, .settings { padding: 18px; border-radius: var(--r-lg); }
  .brand-text p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
