/* Direction: Japanese notebook — a white page in graphite greys, oversized light
   sans headings, thin rules instead of cards, and one marigold accent kept
   strictly for moods, in five shades from pale to deep. */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #ffffff;
  --surface: #fbfaf8;
  --surface-2: #f4f2ed;
  --border: #e2ded7;
  --border-strong: #b4b4b4;
  --ink: #1d1c1a;
  --muted: #6b6761;
  --accent: #262420;
  --accent-hover: #201f1b;
  --accent-ink: #ffffff;
  --accent-text: #3c3833;
  --accent-strong: #15140f;
  --accent-soft: #f2efe9;
  --accent-border: #9d9c9b;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #e3f0e8;
  --success-strong: #137638;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f6eae1;
  --warning-strong: #a64c08;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f7e4e4;
  --danger-strong: #b91c1c;
  --chart-1: #262420;
  --chart-2: #065e16;
  --chart-3: #0f556a;
  --chart-4: #5a3788;
  --chart-5: #822549;
  --chart-6: #664603;

  --font-display: "Zen Kaku Gothic New", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --display-weight: 300;
  --display-tracking: -0.025em;
  --radius-btn: 2px;
  --radius-card: 2px;
  --radius-input: 2px;
  --card-pad: 1.5rem;
  --x-mood-1: #f7ead1;
  --x-mood-2: #efd396;
  --x-mood-3: #dfa843;
  --x-mood-4: #ae7520;
  --x-mood-5: #7d5011;
  --x-mood-ink: #fffdf6;
  --x-rule: #ebe7df;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #050504;
  --surface: #1e1e1d;
  --surface-2: #121211;
  --border: #282827;
  --border-strong: #50504f;
  --ink: #ffffff;
  --muted: #9b9b9b;
  --accent: #373632;
  --accent-hover: #555451;
  --accent-ink: #ffffff;
  --accent-text: #868683;
  --accent-strong: #868683;
  --accent-soft: #10100e;
  --accent-border: #1b1b19;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #092011;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #2c1605;
  --warning-strong: #c06e2f;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #2d0a09;
  --danger-strong: #cd5c5c;
  --chart-1: #6e6c68;
  --chart-2: #4f9b52;
  --chart-3: #07919c;
  --chart-4: #7675cc;
  --chart-5: #b45e95;
  --chart-6: #c3663f;
}

@keyframes ink-page {
  from { opacity: 0.3; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes ink-fill {
  from { opacity: 0.25; transform: scale(0.88); }
  to { opacity: 1; transform: none; }
}
@keyframes ink-tick {
  0% { transform: scale(0.5); opacity: 0.4; }
  65% { transform: scale(1.18); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes ink-grow {
  from { transform: scaleY(0.15); }
  to { transform: none; }
}

.page-in { animation: ink-page 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.cal-day { animation: ink-fill 0.38s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.tick-pop { animation: ink-tick 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.bar-grow { transform-origin: bottom; animation: ink-grow 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

html.reduced-motion .page-in,
html.reduced-motion .cal-day,
html.reduced-motion .tick-pop,
html.reduced-motion .bar-grow {
  animation: none;
}

.rule-t { border-top: 1px solid var(--x-rule); }

/* ruled paper for the writing space */
.writing-lines {
  line-height: 34px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 33px,
    var(--x-rule) 33px,
    var(--x-rule) 34px
  );
  background-attachment: local;
}

[data-mood-option] .swatch {
  box-shadow: inset 0 0 0 1px var(--border);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
[data-mood-option]:hover .swatch { transform: translateY(-3px); }
[data-mood-option][data-selected="true"] .swatch {
  box-shadow: inset 0 0 0 1px var(--border), 0 0 0 2px var(--ink);
}
[data-mood-option] input:focus-visible + .swatch {
  box-shadow: inset 0 0 0 1px var(--border), 0 0 0 2px var(--ink);
}
[data-mood-option][data-selected="true"] .mood-name { color: var(--ink); }

.day-cell { transition: transform 0.16s ease, box-shadow 0.16s ease; }
.day-cell:hover { transform: translateY(-3px); }
.day-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.day-cell[data-selected="true"] { box-shadow: 0 0 0 2px var(--ink); }
.day-cell[data-today="true"]::after {
  content: "";
  position: absolute;
  inset: auto 50% 4px 50%;
  width: 4px;
  height: 1px;
  transform: translateX(-2px);
  background: currentColor;
}
