/* Month colors are set on body when the displayed date changes. */
body[data-season] {
  --ink: color-mix(in srgb, var(--season-dark, #463736) 71%, #252126);
  --muted: color-mix(in srgb, var(--ink) 78%, #f7f0e7);
  --accent: color-mix(in srgb, var(--season-dark, #463736) 65%, var(--season-accent, #a65e54));
  --paper: color-mix(in srgb, var(--season-cream, #faf0de) 32%, #fffdfa);
  --edge: color-mix(in srgb, var(--season-rim, #d6b69c) 47%, #fff);
  background:
    radial-gradient(ellipse 56rem 35rem at 13% 1%, color-mix(in srgb, var(--season-wash, #eed6bf) 55%, transparent), transparent 83%),
    radial-gradient(ellipse 50rem 42rem at 96% 26%, color-mix(in srgb, var(--season-second, #c9c9a9) 11%, transparent), transparent 77%),
    var(--paper);
}

body[data-season] :is(button, input, textarea, a, canvas, summary):focus-visible {
  outline-color: var(--accent);
}

body[data-season] .brand { color: color-mix(in srgb, var(--ink) 86%, #784633); }
body[data-season] :is(.today-button, .month-navigation .button) {
  color: var(--ink);
  border-color: var(--edge);
  background: color-mix(in srgb, var(--season-cream, #faf0de) 26%, white);
}
body[data-season] :is(.today-button, .month-navigation .button):hover {
  background: color-mix(in srgb, var(--season-tint, #f0d8c6) 56%, white);
}
.top-actions { gap: 9px; }
.space-button {
  color: var(--accent);
  border-color: var(--edge);
  background: color-mix(in srgb, var(--season-pale, #ede0d0) 64%, #fff);
}
.space-button:hover { background: color-mix(in srgb, var(--season-tint, #f0d8c6) 52%, #fff); }

body:has(.space-dialog[open]) { overflow: hidden; }
.space-dialog {
  width: min(calc(100% - 32px), 420px);
  max-height: calc(100dvh - 32px);
  padding: clamp(18px, 5vw, 28px);
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 15px 65px #36281736;
}
.space-dialog::backdrop { background: #33281c61; }
.space-heading, .space-input-row { display: flex; align-items: center; gap: 8px; }
.space-heading { justify-content: space-between; }
.space-heading h2 { font-size: 1.32rem; font-weight: 780; }
.space-heading .button { flex: none; }
.space-description { margin: 9px 0 0; }
.space-description, .space-form label, .space-feedback { color: var(--muted); }
.space-options, .space-form { display: grid; gap: 8px; margin-top: 14px; }
.space-options { justify-items: start; }
.space-accept { display: flex; flex-wrap: wrap; }
.space-form { width: 100%; font-size: .91rem; }
.space-input-row .button { flex: none; }
.space-form input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 7px 10px;
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 9px;
  background: #fffdfb;
  font-size: 1rem;
}
.space-dialog .button { min-height: 42px; border-color: var(--edge); }
.space-dialog .space-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.space-dialog .space-primary:not(:disabled):hover { filter: brightness(1.16); }
.space-feedback { margin-top: 12px; font-size: .9rem; }
.tray-heading-row { display: flex; align-items: center; gap: 9px; }
.view-mode {
  padding: 2px 6px;
  color: var(--muted);
  border: 1px solid var(--edge);
  border-radius: 7px;
  font-size: .75rem;
  white-space: nowrap;
}

.hero {
  min-height: clamp(398px, 37vw, 495px);
  border: 1px solid color-mix(in srgb, var(--season-rim, #d6b69c) 40%, transparent);
  border-radius: 28px;
  color: var(--season-dark, #463736);
  background:
    radial-gradient(ellipse at 70% 72%, color-mix(in srgb, var(--season-tint, #f0d8c6) 76%, var(--season-cream, #faf0de)), transparent 74%),
    linear-gradient(155deg, var(--season-cream, #faf0de) 22%, var(--season-wash, #eed6bf) 98%);
  box-shadow: inset 0 1px 1px #fffc, 0 12px 34px color-mix(in srgb, var(--season-dark, #463736) 8%, transparent);
}
.hero::before {
  position: absolute;
  z-index: 0;
  inset: -18%;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse at 24% 22%, #fff9 0, transparent 52%),
    radial-gradient(ellipse at 83% 31%, color-mix(in srgb, var(--season-second, #c9c9a9) 19%, transparent), transparent 47%);
  opacity: .53;
}
.hero-copy { padding: clamp(28px, 3vw, 42px) clamp(23px, 2.6vw, 37px) 0; }
.hero-label {
  display: block;
  color: var(--accent);
  font-size: .94rem;
  font-weight: 760;
  line-height: 1.35;
  letter-spacing: .065em;
}
.hero h1 {
  margin: 10px 0 0;
  color: var(--season-dark, #463736);
  font-size: clamp(2.6rem, 4.35vw, 4.55rem);
  font-weight: 835;
  line-height: 1.1;
  letter-spacing: -.065em;
}
.hero-description {
  margin-top: 13px;
  max-width: 21em;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.hero-illustration {
  position: absolute;
  z-index: 1;
  inset: auto 4% 2.6%;
  width: 92%;
  height: 63%;
}
.hero-scene .hero-illustration { inset: 0; width: 100%; height: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: season-light 4.6s ease-in-out both; }
  .hero-illustration { animation: season-float 4.2s ease-in-out both; }
  .space-dialog[open] { animation: open-day .3s cubic-bezier(.22,.68,.26,1) both; }
  @keyframes season-light {
    45% { transform: translate(5%, -2%) scale(1.07); opacity: .84; }
  }
  @keyframes season-float {
    45% { transform: translateY(-5px) rotate(-.65deg); }
  }
}

body[data-season="christmas"] .hero {
  background:
    radial-gradient(ellipse at 7% 95%, color-mix(in srgb, var(--season-accent) 30%, transparent), transparent 63%),
    radial-gradient(ellipse at 97% 77%, color-mix(in srgb, var(--season-second) 42%, transparent), transparent 58%),
    linear-gradient(143deg, var(--season-cream) 32%, var(--season-wash) 96%);
}
body[data-season="new-year"] .hero,
body[data-season="lantern"] .hero {
  background:
    radial-gradient(ellipse at 90% 88%, color-mix(in srgb, var(--season-accent) 46%, transparent), transparent 65%),
    linear-gradient(145deg, var(--season-cream) 20%, var(--season-wash) 92%);
}

.tray-toolbar { align-items: center; padding: 0 1px 15px; min-height: 56px; }
.tray-toolbar h2 { padding: 0; color: var(--ink); font-size: 1.19rem; font-weight: 790; }
.month-navigation { gap: 6px; }
.navigation-month {
  min-width: 6.6rem;
  color: var(--ink);
  font-size: .96rem;
  font-weight: 690;
  letter-spacing: .01em;
}
.month-navigation .icon-button { border-radius: 9px; }

body[data-season] .tile {
  --tile-light: color-mix(in srgb, var(--season-cream, #faf0de) 27%, #fffdfa);
  --tile-base: color-mix(in srgb, var(--season-pale, #ede0d0) 42%, #fff);
  --tile-rim: color-mix(in srgb, var(--season-rim, #d6b69c) 54%, #fff);
  --tile-label: var(--ink);
  --tile-radius: 16px;
}
body[data-season] .tile.mist {
  --tile-light: color-mix(in srgb, var(--season-tint) 37%, #fff);
  --tile-base: color-mix(in srgb, var(--season-tint) 67%, #fff);
}
body[data-season] .tile.pearl {
  --tile-light: color-mix(in srgb, var(--season-cream) 51%, #fff);
  --tile-base: color-mix(in srgb, var(--season-wash) 58%, #fff);
}
body[data-season] .tile.sage {
  --tile-light: color-mix(in srgb, var(--season-second) 23%, #fff);
  --tile-base: color-mix(in srgb, var(--season-second) 44%, #fff);
  --tile-rim: color-mix(in srgb, var(--season-second) 59%, #fff);
}
body[data-season] .tile.blush {
  --tile-light: color-mix(in srgb, var(--season-accent) 24%, #fffdfa);
  --tile-base: color-mix(in srgb, var(--season-accent) 37%, #fff);
  --tile-rim: color-mix(in srgb, var(--season-accent) 47%, #fff);
}
body[data-season] .tile.holiday {
  --tile-light: color-mix(in srgb, var(--season-cream) 51%, #fff);
  --tile-base: color-mix(in srgb, var(--season-pale) 71%, #fffdfa);
}
body[data-season] .tile.halloween {
  --tile-light: #f8ddb1; --tile-base: #f1c291; --tile-rim: #dbab80;
}
body[data-season] .tile.mid-autumn {
  --tile-light: #f7eccb; --tile-base: #e0d8ac; --tile-rim: #c9bd8d;
}
body[data-season] .tile.thanksgiving {
  --tile-light: #f8e5d2; --tile-base: #edc8a5; --tile-rim: #d6ad8c;
}
body[data-season] .tile.christmas {
  --tile-light: #e8efdf; --tile-base: #bfd4b7; --tile-rim: #a2bd98;
}
body[data-season="christmas"] .tile.blush {
  --tile-light: #f3c4bb; --tile-base: #e9a69c; --tile-rim: #d38a7f;
}
body[data-season="christmas"] .tile.sage {
  --tile-light: #e2e9cd; --tile-base: #ccdab6; --tile-rim: #adc09b;
}
body[data-season="new-year"] .tile.blush,
body[data-season="lantern"] .tile.blush {
  --tile-light: #f8c9bc; --tile-base: #efaea0; --tile-rim: #d9998a;
}
.tile-face {
  box-shadow: 0 1.5px 0 var(--tile-rim), 0 3px 10px #35283b0e, inset 0 1px 0 #fff9;
}
body[data-season] .tile.is-selected .tile-face {
  border-color: color-mix(in srgb, var(--accent) 55%, #fff);
  box-shadow: 0 2.5px 0 var(--tile-rim), 0 6px 12px #35283b14, inset 0 0 0 1px #fff9;
}
body[data-season] .tile[aria-current="date"] .tile-date::after { background: var(--accent); }
.tile-date { font-weight: 655; }
.tile-caption {
  font-size: .8rem;
  border-radius: 5px;
  max-width: 100%;
  background: #fffdf5c8;
}
.tile-note { background: #fffaf6ba; }
.tile-task { color: var(--ink); }
.tile-task.done .tile-task-title { color: var(--muted); }
.tile-art.sticker-art {
  right: 2%;
  bottom: 1%;
  width: 69%;
  height: 87%;
  filter: drop-shadow(1px 3px 1px #241c2d1a);
}
.tile-slot.wide .tile-art.sticker-art { height: 93%; }
.tile.has-tasks .tile-art.sticker-art { width: 43%; height: 57%; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile-art.sticker-art {
    transform: translateY(-5px) translateZ(18px) rotate(-2deg) scale(1.05);
    filter: drop-shadow(1px 5px 3px #241c2d25);
  }
}

.author-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.57rem;
  height: 1.57rem;
  padding: 0 .27rem;
  border-radius: 50%;
  font-family: "Avenir Next", "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif;
  font-size: 1rem;
  font-weight: 640;
  line-height: 1;
  text-align: center;
}
.author-badge.boy { color: #21513b; background: #d8ecde; }
.author-badge.girl { color: #763c50; background: #f5dce5; }
.author-badge svg { width: 1em; height: 1em; stroke-width: 1.85; }
.tile .author-badge { min-width: 1.12rem; height: 1.12rem; padding: 0 .16rem; font-size: .8rem; }

.board-self { color: var(--muted); }
.partner-line { gap: 5px; margin-bottom: 11px; color: var(--muted); font-size: .83rem; }
.partner-edit {
  color: var(--accent);
  border-color: var(--edge);
  background: color-mix(in srgb, var(--season-pale, #ede0d0) 57%, white);
}
.partner-edit:hover { background: color-mix(in srgb, var(--season-tint, #f0d8c6) 65%, white); }

@media (max-width: 1030px) {
  .hero { min-height: clamp(326px, 40vw, 416px); }
  .hero-copy { padding: 24px 21px 0; }
  .hero-description { font-size: .9rem; }
  .hero-illustration { height: 62%; }
}
@media (max-width: 830px) {
  .hero { min-height: clamp(192px, 34vw, 245px); border-radius: 21px; }
  .hero-copy { padding: 21px 18px 0; }
  .hero-label { font-size: .83rem; }
  .hero h1 { margin-top: 7px; font-size: clamp(2.4rem, 7.6vw, 3.45rem); }
  .hero-description { max-width: 46%; margin-top: 7px; line-height: 1.54; }
  .hero-illustration { inset: auto 1% 2% auto; width: 58%; height: 91%; }
  .tray-toolbar { padding: 0 0 10px; min-height: 47px; }
  .tray-toolbar h2 { font-size: 1.04rem; }
  .navigation-month { min-width: 5.9rem; font-size: .91rem; }
  body[data-season] .tile { --tile-radius: 11px; }
  .tile-caption { font-size: .71rem; }
  .tile-art.sticker-art, .tile-slot.wide .tile-art.sticker-art { width: 73%; }
  .tile.has-tasks .tile-art.sticker-art { top: 0; bottom: auto; height: 55%; width: 47%; }
  .tile .author-badge { font-size: .77rem; min-width: 1rem; height: 1rem; }
}
@media (max-width: 420px) {
  .hero-illustration { right: 0; bottom: .5%; width: 58%; height: 82%; }
  .hero-description { max-width: 50%; font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tile:hover .tile-art.sticker-art { transform: translateZ(7px); }
}
