:root {
  --paper: #f4f0e8;
  --ink: #191816;
  --muted: #706b64;
  --line: rgba(25, 24, 22, 0.14);
  --panel: rgba(255, 254, 249, 0.9);
  --accent: #c83d32;
  --seal: #b82924;
  --soft: #eee8dd;
  --shadow: 0 26px 80px rgba(44, 37, 28, 0.13);
  --edge: rgba(255, 255, 255, 0.7);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  position: relative;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), transparent 42%),
    linear-gradient(rgba(25, 24, 22, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 24, 22, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 82% 11%, rgba(184, 41, 36, 0.12) 0 88px, transparent 90px),
    var(--accent);
  background-size:
    auto,
    38px 38px,
    38px 38px,
    auto,
    auto;
  color: var(--ink);
  font-family:
    "Avenir Next",
    "Helvetica Neue",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body::before {
  position: fixed;
  top: -0.2em;
  right: clamp(12px, 3vw, 42px);
  color: rgba(25, 24, 22, 0.035);
  content: "色";
  font-family:
    "Hiragino Mincho ProN",
    "Yu Mincho",
    serif;
  font-size: clamp(9rem, 18vw, 18rem);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

body::after {
  position: fixed;
  left: clamp(10px, 3vw, 36px);
  bottom: 18px;
  width: 1px;
  height: min(360px, 42vh);
  background: linear-gradient(transparent, rgba(29, 28, 26, 0.24), transparent);
  content: "";
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  width: 100%;
  height: 100svh;
  margin: 0 auto;
  padding: 0;
  background: var(--accent);
}

.page::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.14), transparent 52%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.025) 0 1px, transparent 1px 18px);
  content: "";
  pointer-events: none;
}

.tool {
  position: relative;
  display: block;
  min-height: 100svh;
  overflow: hidden;
  background: var(--accent);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.form-panel,
.result-panel,
.calendar-preview {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.form-panel {
  position: absolute;
  left: auto;
  top: clamp(24px, 4vh, 42px);
  right: clamp(18px, 2.8vw, 40px);
  bottom: auto;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 10px;
  width: clamp(360px, 27vw, 392px);
  min-height: auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.42), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 52%, rgba(255, 255, 255, 0.16)),
    rgba(255, 254, 249, 0.12);
  background-position: center, right center, center;
  background-repeat: no-repeat;
  background-size: auto, cover, auto;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    inset 0 -12px 24px rgba(255, 255, 255, 0.08),
    0 28px 60px rgba(20, 18, 14, 0.12);
  backdrop-filter: blur(42px) saturate(1.28);
  transform: none;
  z-index: 5;
}

.form-panel::before {
  display: none;
}

.form-panel::after {
  display: none;
}

.form-panel > * {
  position: relative;
  z-index: 1;
}

.source-note {
  border-left: 1px solid var(--line);
  padding-left: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.title-block {
  align-self: start;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.form-panel .title-block {
  display: none;
}

.eyebrow {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 76%, #111);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 100%;
  margin-bottom: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1;
  letter-spacing: 0;
}

.form-panel h1 {
  color: var(--ink);
  opacity: 0.72;
}

.title-block p:not(.eyebrow) {
  max-width: 29rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.birthday-form {
  display: grid;
  gap: 7px;
  align-self: center;
}

.birthday-form label {
  color: rgba(62, 57, 52, 0.58);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  opacity: 1;
  text-align: left;
  text-transform: uppercase;
}

.input-row {
  display: grid;
  grid-template-columns: 0.48fr 1fr auto;
  gap: 8px;
}

.date-stepper {
  display: grid;
  grid-template-columns: repeat(2, 42px);
  gap: 8px;
  justify-self: end;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 254, 250, 0.2);
  border-radius: 8px;
  background-color: rgba(255, 254, 250, 0.66);
  color: var(--ink);
  padding: 0 0 0 12px;
  line-height: 42px;
  outline: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 18px,
    calc(100% - 12px) 18px;
  background-repeat: no-repeat;
  background-size:
    5px 5px,
    5px 5px;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.birthday-form button,
.quick-picks button,
.postcard-download,
.postcard-menu button,
.code-pill {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.birthday-form select,
.birthday-form button {
  height: 42px;
}

.birthday-form button {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  background: #d12d28;
  color: #fff;
  padding: 0 15px;
  box-shadow: 0 12px 30px rgba(184, 41, 36, 0.28);
}

.birthday-form button:hover,
.quick-picks button:hover,
.postcard-download:hover,
.postcard-menu button:hover,
.code-pill:hover {
  transform: translateY(-2px);
}

.birthday-form button:hover {
  background: #bb2622;
  box-shadow: 0 16px 36px rgba(184, 41, 36, 0.34);
}

.birthday-form .date-step-button {
  width: 42px;
  height: 42px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 14px;
  background: rgba(255, 254, 249, 0.2);
  color: #d12d28;
  padding: 0;
  box-shadow: none;
}

.birthday-form .date-step-button:hover {
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 254, 249, 0.28);
  color: #d12d28;
  box-shadow: 0 10px 24px rgba(25, 24, 22, 0.08);
}

.date-step-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.quick-picks button:hover {
  border-color: transparent;
  background: rgba(255, 254, 249, 0.28);
}

.form-note {
  min-height: 0;
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.68;
  text-align: center;
}

.form-note:empty {
  display: none;
}

.quick-picks {
  align-self: center;
  justify-content: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.quick-picks button {
  border: 1px solid transparent;
  background: rgba(255, 254, 249, 0.34);
  color: var(--ink);
  padding: 0 7px;
  font-size: 0.72rem;
  opacity: 0.82;
  min-height: 30px;
}

.result-panel {
  position: absolute;
  inset: 0;
  display: block;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.18), transparent 36%),
    var(--accent);
}

.color-stage {
  position: absolute;
  inset: 0;
  min-height: 0;
  background: #d9c6ad;
  overflow: hidden;
}

.color-stage::after {
  position: absolute;
  inset: 20px 20px 20px;
  border: 1px solid color-mix(in srgb, var(--swatch-text, #1d1c1a) 15%, transparent);
  border-radius: 18px;
  content: "";
  pointer-events: none;
}

.color-swatch {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #d9c6ad;
  overflow: hidden;
  transition: background-color 620ms ease;
}

.color-swatch::after {
  position: absolute;
  inset: -18%;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--flow-from, #d9c6ad) 80%, #fff) 0 12%, transparent 34%),
    linear-gradient(120deg, var(--flow-from, #d9c6ad), var(--flow-to, #d9c6ad) 48%, color-mix(in srgb, var(--flow-to, #d9c6ad) 76%, #fff));
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18%) scale(1.04);
}

.color-swatch.is-flowing::after {
  animation: colorFlow 780ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes colorFlow {
  0% {
    opacity: 0;
    transform: translateX(-18%) scale(1.04);
  }

  28% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translateX(18%) scale(1.04);
  }
}

.shine {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.18), transparent 34%),
    radial-gradient(circle at 17% 16%, rgba(255, 255, 255, 0.14), transparent 28%);
}

.season-effects {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.season-particle {
  position: absolute;
  left: var(--x);
  top: -12vh;
  display: block;
  opacity: var(--alpha);
  transform: translate3d(0, 0, 0) scale(var(--scale));
  will-change: transform, opacity;
}

.season-spring .season-particle {
  width: 34px;
  height: 50px;
  border-radius: 74% 0 74% 12%;
  background:
    radial-gradient(circle at 68% 24%, rgba(255, 255, 255, 0.68), transparent 24%),
    linear-gradient(145deg, rgba(255, 194, 223, 0.98), rgba(229, 62, 132, 0.78));
  box-shadow: 0 0 30px rgba(255, 121, 180, 0.42);
  animation: sakuraFall var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.season-summer .season-particle {
  left: var(--x);
  top: var(--y);
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: rgba(255, 245, 169, 0.86);
  box-shadow:
    0 0 8px rgba(255, 241, 137, 0.88),
    0 0 24px rgba(255, 226, 96, 0.46);
  animation:
    fireflyDrift var(--duration) ease-in-out infinite,
    fireflyPulse 2.8s ease-in-out infinite;
  animation-delay: var(--delay), var(--delay);
}

.season-autumn .season-particle {
  width: 38px;
  height: 33px;
  border-radius: 78% 0 78% 10%;
  background:
    linear-gradient(135deg, rgba(255, 219, 92, 0.92), rgba(202, 94, 37, 0.7)),
    rgba(244, 172, 56, 0.72);
  box-shadow: 0 6px 18px rgba(115, 60, 18, 0.16);
  animation: leafFall var(--duration) cubic-bezier(0.36, 0, 0.64, 1) infinite;
  animation-delay: var(--delay);
}

.season-autumn .season-particle::after {
  position: absolute;
  left: 6px;
  bottom: -9px;
  width: 2px;
  height: 16px;
  border-radius: 999px;
  background: rgba(94, 54, 22, 0.42);
  content: "";
  transform: rotate(38deg);
  transform-origin: top;
}

.season-winter .season-particle {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.62),
    14px -26px 0 -3px rgba(255, 255, 255, 0.42);
  animation: snowFall var(--duration) linear infinite;
  animation-delay: var(--delay);
}

@keyframes sakuraFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -14vh, 0) rotate(0deg) scale(var(--scale));
  }

  10% {
    opacity: var(--alpha);
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 118vh, 0) rotate(var(--spin)) scale(var(--scale));
  }
}

@keyframes fireflyDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(var(--scale));
  }

  50% {
    transform: translate3d(var(--drift-soft), -9vh, 0) scale(var(--scale-bright));
  }
}

@keyframes fireflyPulse {
  0%,
  100% {
    opacity: 0.12;
  }

  45% {
    opacity: var(--alpha);
  }
}

@keyframes leafFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -12vh, 0) rotate(-18deg) scale(var(--scale));
  }

  12% {
    opacity: var(--alpha);
  }

  52% {
    transform: translate3d(var(--drift-mid), 48vh, 0) rotate(var(--spin-mid)) scale(var(--scale));
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 116vh, 0) rotate(var(--spin)) scale(var(--scale));
  }
}

@keyframes snowFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -10vh, 0) scale(var(--scale));
  }

  15% {
    opacity: var(--alpha);
  }

  100% {
    opacity: 0.08;
    transform: translate3d(var(--drift-mid), 116vh, 0) scale(var(--scale));
  }
}

@media (prefers-reduced-motion: reduce) {
  .season-effects {
    display: none;
  }
}

.date-badge {
  position: absolute;
  z-index: 3;
  left: clamp(40px, 5vw, 92px);
  top: auto;
  bottom: clamp(118px, 18vh, 176px);
  transform: none;
  display: grid;
  justify-items: start;
  gap: clamp(8px, 1.2vw, 16px);
  width: min(42vw, 560px);
  min-width: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  color: var(--swatch-text, var(--ink));
  text-align: left;
  text-shadow: 0 10px 34px color-mix(in srgb, var(--swatch-text, #1d1c1a) 12%, transparent);
}

.date-badge span:first-child {
  font-size: clamp(1.3rem, 2.4vw, 2.15rem);
  font-weight: 500;
  line-height: 1.05;
}

.date-badge strong {
  max-width: 100%;
  overflow-wrap: normal;
  font-family:
    "Hiragino Mincho ProN",
    "Yu Mincho",
    serif;
  font-size: clamp(2.4rem, 6.2vw, 6.6rem);
  line-height: 1.08;
  white-space: nowrap;
}

.date-badge span:last-child {
  color: var(--swatch-text, var(--ink));
  font-size: clamp(0.72rem, 0.9vw, 0.9rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: lowercase;
}

.stage-quote {
  position: absolute;
  z-index: 3;
  left: clamp(40px, 5vw, 92px);
  right: auto;
  bottom: clamp(38px, 8vh, 78px);
  width: min(42vw, 520px);
  margin: 0;
  color: var(--swatch-text, var(--ink));
  font-size: clamp(0.72rem, 1vw, 0.95rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.48;
  text-align: left;
  text-shadow: 0 1px 18px color-mix(in srgb, var(--swatch-text, #1d1c1a) 14%, transparent);
  transform: none;
  white-space: pre-line;
}

.result-content {
  position: absolute;
  top: clamp(176px, 23vh, 190px);
  right: clamp(18px, 2.8vw, 40px);
  bottom: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: clamp(360px, 27vw, 392px);
  min-height: clamp(330px, 42vh, 410px);
  padding: clamp(16px, 1.6vw, 22px);
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.44), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 52%, rgba(255, 255, 255, 0.14)),
    rgba(255, 254, 249, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-left: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 -14px 28px rgba(255, 255, 255, 0.08),
    0 30px 72px rgba(21, 18, 14, 0.12);
  backdrop-filter: blur(44px) saturate(1.3);
  z-index: 6;
}

.result-content:has(.postcard-actions:hover),
.result-content:has(.postcard-actions:focus-within),
.result-content.is-menu-open {
  z-index: 12;
}

.result-content h2 {
  margin: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  font-size: clamp(1.65rem, 2.35vw, 2.62rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.copy-status {
  color: rgba(25, 24, 22, 0.62);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  transform: translateY(2px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.copy-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.code-pill {
  border: 1px solid rgba(255, 254, 249, 0.32);
  background: rgba(255, 254, 249, 0.12);
  color: rgba(25, 24, 22, 0.76);
  display: inline-grid;
  min-height: 38px;
  place-items: center;
  padding: 0 13px;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1;
  text-shadow: none;
}

.code-pill:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 2px;
}

.code-pill:hover {
  background: rgba(255, 254, 249, 0.18);
  box-shadow: 0 12px 24px rgba(25, 24, 22, 0.08);
}

.color-comment {
  margin: 0;
  color: #47423d;
  font-size: 0.9rem;
  line-height: 1.38;
  display: none;
}

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

.trait {
  display: grid;
  gap: 4px;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
  padding: 8px;
}

.trait span,
.advice-strip span {
  color: rgba(62, 57, 52, 0.58);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trait strong {
  align-self: end;
  font-size: 0.88rem;
  line-height: 1.18;
  font-weight: 500;
}

.advice-strip {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
  padding: 16px 10px;
}

.advice-strip p {
  margin: 0;
  color: #3e3934;
  font-size: 0.86rem;
  line-height: 1.35;
}

.postcard-actions {
  margin-top: auto;
  position: relative;
  display: grid;
}

.postcard-actions::after {
  content: "";
  position: absolute;
  right: 0;
  top: 100%;
  left: 0;
  height: 10px;
}

.postcard-download {
  width: 100%;
  border: 1px solid #d12d28;
  background: rgba(255, 254, 249, 0.08);
  color: var(--ink);
  padding: 0 14px;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 10px 28px rgba(25, 24, 22, 0.06);
}

.postcard-download:hover {
  border-color: #d12d28;
  background: rgba(255, 254, 249, 0.22);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(184, 41, 36, 0.12);
}

.postcard-menu {
  position: fixed;
  right: auto;
  top: var(--postcard-menu-top, 0);
  left: var(--postcard-menu-left, 0);
  z-index: 999;
  display: grid;
  gap: 6px;
  width: var(--postcard-menu-width, 260px);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(44, 40, 35, 0.42), rgba(44, 40, 35, 0.28)),
    color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.26));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 38px rgba(25, 24, 22, 0.24);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  pointer-events: none;
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.postcard-menu button {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
  padding: 0 12px;
  font-size: 0.82rem;
}

.postcard-menu button:hover {
  background: rgba(255, 255, 255, 0.26);
  box-shadow: none;
}

.postcard-actions:hover .postcard-menu,
.postcard-actions:focus-within .postcard-menu,
.postcard-actions.is-open .postcard-menu,
.postcard-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.postcard-actions:hover .postcard-download,
.postcard-actions:focus-within .postcard-download,
.postcard-actions.is-open .postcard-download {
  border-color: #d12d28;
  background: rgba(255, 254, 249, 0.22);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(184, 41, 36, 0.12);
}

.date-nav {
  position: absolute;
  right: 94px;
  bottom: 42px;
  z-index: 8;
  display: flex;
  gap: 8px;
}

.date-nav-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.42), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1)),
    rgba(255, 254, 249, 0.12);
  color: rgba(25, 24, 22, 0.72);
  padding: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 16px 42px rgba(21, 18, 14, 0.12);
  backdrop-filter: blur(28px) saturate(1.24);
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.date-nav-button:hover {
  transform: translateY(-2px);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.5), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.14)),
    rgba(255, 254, 249, 0.16);
}

.date-nav-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.audio-control {
  position: absolute;
  right: 40px;
  bottom: 42px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 42px;
  height: 42px;
  min-height: 0;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.42), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1)),
    rgba(255, 254, 249, 0.12);
  padding: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 16px 42px rgba(21, 18, 14, 0.12);
  backdrop-filter: blur(28px) saturate(1.24);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
}

.audio-control:hover,
.audio-control:focus-within {
  transform: translateY(-2px);
}

.audio-toggle {
  flex: 0 0 30px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(25, 24, 22, 0.72);
  padding: 0;
}

.audio-icon {
  grid-area: 1 / 1;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.audio-icon-off,
.audio-control.is-playing .audio-icon-on {
  display: block;
}

.audio-icon-on,
.audio-control.is-playing .audio-icon-off {
  display: none;
}

.audio-volume-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.audio-volume {
  position: absolute;
  left: 50%;
  bottom: 54px;
  flex: 0 0 auto;
  width: 4px;
  max-width: none;
  height: 96px;
  accent-color: #d12d28;
  appearance: none;
  background: transparent;
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transform-origin: center bottom;
  writing-mode: vertical-lr;
  direction: rtl;
  filter: opacity(0.86);
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease;
}

.audio-volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(209, 45, 40, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.audio-volume::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: #d12d28;
  box-shadow: 0 4px 12px rgba(209, 45, 40, 0.28);
  appearance: none;
}

.audio-volume::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(209, 45, 40, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.audio-volume::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #d12d28;
  box-shadow: 0 4px 12px rgba(209, 45, 40, 0.28);
}

.audio-control:hover .audio-volume,
.audio-control:focus-within .audio-volume {
  width: 4px;
  max-width: none;
  height: 96px;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.calendar-preview {
  display: none;
}

.calendar-preview .eyebrow {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.footer {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  left: 0;
  right: 0;
  bottom: 0;
  height: 20px;
  min-height: 20px;
  padding: 0;
  color: rgba(25, 24, 22, 0.72);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  color: var(--seal);
}

.calendar-preview h2 {
  display: none;
  margin: 4px 0 0;
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.palette-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
}

.palette-month {
  display: grid;
  align-content: end;
  height: 100%;
  min-height: 0;
  padding: 7px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.62rem;
  font-weight: 500;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.34);
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .page {
    min-height: 100svh;
    height: auto;
  }

  .tool {
    min-height: 100svh;
  }

  .form-panel {
    grid-template-rows: auto auto auto auto;
    left: 14px;
    right: auto;
    top: 14px;
    bottom: auto;
    width: calc(100% - 28px);
    transform: none;
  }

  .result-content {
    left: 14px;
    right: 14px;
    top: 184px;
    bottom: auto;
    width: auto;
    padding: 14px;
  }

  .title-block {
    align-self: start;
  }

  .color-stage,
  .color-swatch {
    min-height: 100%;
  }

}

@media (max-width: 768px) {
  body {
    overflow: hidden;
  }

  .page {
    grid-template-rows: minmax(0, 1fr);
    height: 100svh;
    min-height: 100svh;
  }

  .tool {
    min-height: 100svh;
  }

  .calendar-preview {
    display: none;
  }

  .date-nav {
    display: none;
  }

  .color-stage::after {
    inset: 16px;
  }

  .form-panel,
  .result-content {
    width: auto;
    left: 20px;
    right: 20px;
    padding: 14px;
    border-radius: 20px;
    background:
      radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.42), transparent 42%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1) 52%, rgba(255, 255, 255, 0.14)),
      rgba(255, 254, 249, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      inset 0 -10px 20px rgba(255, 255, 255, 0.08),
      0 18px 44px rgba(21, 18, 14, 0.12);
    backdrop-filter: blur(34px) saturate(1.22);
  }

  .form-panel {
    top: auto;
    bottom: calc(26px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    align-content: start;
    gap: 12px;
    z-index: 7;
  }

  .form-panel .title-block,
  .form-note {
    display: none;
  }

  .birthday-form {
    gap: 10px;
  }

  .birthday-form label {
    color: rgba(62, 57, 52, 0.58);
    font-size: 0.72rem;
    opacity: 1;
    text-align: left;
  }

  .input-row {
    grid-template-columns: 86px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .birthday-form select,
  .birthday-form button {
    height: 42px;
  }

  .date-stepper {
    grid-template-columns: repeat(2, 42px);
  }

  .birthday-form .date-step-button {
    width: 42px;
    height: 42px;
  }

  select {
    line-height: 42px;
    padding: 0 12px;
    background-position:
      calc(100% - 17px) 16px,
      calc(100% - 12px) 16px;
  }

  .quick-picks {
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0;
  }

  .quick-picks::-webkit-scrollbar {
    display: none;
  }

  .quick-picks button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.76rem;
  }

  .result-content {
    top: auto;
    bottom: calc(186px + env(safe-area-inset-bottom, 0px));
    display: grid;
    min-height: 0;
    gap: 10px;
    z-index: 6;
  }

  .result-content h2 {
    font-size: clamp(1.28rem, 7vw, 2rem);
    line-height: 0.96;
  }

  .code-row {
    gap: 8px;
  }

  .code-pill {
    min-height: 34px;
    font-size: 0.74rem;
  }

  .color-comment,
  .advice-strip p {
    font-size: 0.74rem;
    line-height: 1.3;
  }

  .traits {
    display: none;
  }

  .trait {
    min-height: 56px;
    padding: 7px;
  }

  .trait span,
  .advice-strip span {
    font-size: 0.56rem;
  }

  .trait strong {
    font-size: 0.72rem;
  }

  .postcard-download {
    min-height: 40px;
    font-size: 0.88rem;
  }

  .date-badge {
    left: 32px;
    right: 16px;
    top: calc(30px + env(safe-area-inset-top, 0px));
    bottom: auto;
    width: auto;
    gap: 14px;
  }

  .date-badge span:first-child {
    font-size: 1.6rem;
    line-height: 1;
  }

  .date-badge strong {
    max-width: calc(100vw - 64px);
    font-size: clamp(2.4rem, 13vw, 4.5rem);
    line-height: 1;
  }

  .date-badge span:last-child {
    font-size: 0.8rem;
  }

  .stage-quote {
    left: 32px;
    right: 16px;
    top: calc(222px + env(safe-area-inset-top, 0px));
    bottom: auto;
    width: min(68vw, 310px);
    font-size: 0.9rem;
    line-height: 1.34;
  }

  .footer {
    display: flex;
    bottom: env(safe-area-inset-bottom, 0px);
    height: 16px;
    min-height: 16px;
    padding: 0;
    font-size: 0.66rem;
  }

  .audio-control {
    top: calc(32px + env(safe-area-inset-top, 0px));
    right: 32px;
    bottom: auto;
    width: 42px;
    min-height: 40px;
    padding: 5px;
  }

  .audio-control:hover,
  .audio-control:focus-within,
  .audio-control.is-open {
    gap: 0;
    width: 42px;
  }

  .audio-toggle {
    width: 26px;
    height: 26px;
    justify-self: center;
    align-self: center;
  }

  .audio-control .audio-volume {
    position: absolute;
    left: 50%;
    right: auto;
    top: 54px;
    bottom: auto;
    width: 4px;
    height: 86px;
    max-width: none;
    opacity: 0;
    transform: translateX(-50%);
    transform-origin: center top;
    writing-mode: vertical-lr;
    direction: rtl;
    accent-color: #d12d28;
    filter: opacity(0.78);
  }

  .audio-control:focus-within .audio-volume,
  .audio-control.is-open .audio-volume {
    width: 4px;
    height: 86px;
    opacity: 1;
  }
}

@media (max-width: 560px) {
  body {
    overflow: hidden;
  }

  .page {
    width: 100%;
    min-height: 100svh;
  }

  .tool {
    min-height: 100svh;
  }

  .form-panel,
  .result-content {
    padding: 12px;
  }

  .form-panel {
    left: 18px;
    right: 18px;
    bottom: calc(26px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    align-content: start;
    align-items: flex-start;
  }

  .source-note {
    border-left: 0;
    padding-left: 0;
    font-size: 0.68rem;
  }

  .title-block {
    gap: 5px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.55rem, 8vw, 2.05rem);
  }

  .title-block p:not(.eyebrow) {
    display: none;
  }

  .input-row {
    width: 100%;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 8px;
  }

  select,
  .birthday-form button,
  .quick-picks button,
  .postcard-download,
  .code-pill {
    min-height: 34px;
  }

  .birthday-form select,
  .birthday-form button {
    height: 36px;
  }

  .birthday-form button {
    min-width: 0;
    width: 100%;
    padding: 0 8px;
  }

  .date-stepper {
    grid-template-columns: repeat(2, 36px);
  }

  .birthday-form .date-step-button {
    width: 36px;
    height: 36px;
    padding: 0;
  }

  .date-step-button svg {
    width: 17px;
    height: 17px;
  }

  select {
    padding: 0 9px;
    line-height: 36px;
    background-position:
      calc(100% - 14px) 13px,
      calc(100% - 9px) 13px;
  }

  .birthday-form {
    width: 100%;
    gap: 8px;
  }

  .birthday-form label,
  .form-note {
    font-size: 0.58rem;
  }

  .quick-picks {
    justify-content: flex-start;
    width: 100%;
    gap: 6px;
  }

  .quick-picks button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.68rem;
  }

  .color-stage,
  .color-swatch {
    min-height: 100%;
  }

  .result-content {
    left: 18px;
    right: 18px;
    bottom: calc(184px + env(safe-area-inset-bottom, 0px));
    display: grid;
    min-height: 0;
    padding: 12px;
  }

  .date-badge {
    left: 28px;
    right: 14px;
    top: calc(26px + env(safe-area-inset-top, 0px));
    gap: 12px;
    width: auto;
  }

  .date-badge span:first-child {
    font-size: 1.34rem;
  }

  .date-badge strong {
    max-width: calc(100vw - 64px);
    font-size: clamp(2rem, 15vw, 3.5rem);
    line-height: 0.98;
  }

  .date-badge span:last-child {
    font-size: 0.72rem;
  }

  .stage-quote {
    left: 28px;
    right: 14px;
    top: calc(182px + env(safe-area-inset-top, 0px));
    width: min(76vw, 300px);
    font-size: 0.74rem;
    line-height: 1.24;
  }

  .result-content {
    gap: 10px;
  }

  .result-content h2 {
    font-size: clamp(1.38rem, 7vw, 1.72rem);
  }

  .eyebrow {
    font-size: 0.62rem;
  }

  .code-row {
    gap: 6px;
    font-size: 0.78rem;
  }

  .color-comment,
  .advice-strip p {
    font-size: 0.77rem;
    line-height: 1.28;
  }

  .color-comment {
    display: none;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

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

  .trait {
    min-height: 48px;
    padding: 6px;
  }

  .trait span,
  .advice-strip span {
    font-size: 0.5rem;
  }

  .trait strong {
    font-size: 0.68rem;
  }

  .advice-strip {
    gap: 2px;
    padding: 14px 8px;
  }

  .advice-strip p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .postcard-download {
    margin-top: 0;
    font-size: 0.82rem;
  }

  .form-panel::after {
    right: 10px;
    bottom: 70px;
    width: 34px;
    height: 34px;
    font-size: 0.98rem;
  }

  .result-content .eyebrow {
    font-size: 0.58rem;
  }

  .footer {
    font-size: 0.64rem;
  }

  .audio-control {
    right: 30px;
  }
}

@media (max-width: 560px) and (max-height: 740px) {
  .form-panel {
    bottom: calc(26px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    align-content: start;
    padding: 10px;
  }

  .result-content {
    bottom: calc(170px + env(safe-area-inset-bottom, 0px));
    display: grid;
    min-height: 0;
    gap: 10px;
    padding: 10px;
  }

  .date-badge {
    top: calc(34px + env(safe-area-inset-top, 0px));
    gap: 7px;
  }

  .date-badge span:first-child {
    font-size: 1.08rem;
  }

  .date-badge strong {
    font-size: clamp(1.7rem, 12vw, 2.85rem);
    line-height: 0.96;
  }

  .date-badge span:last-child {
    font-size: 0.62rem;
  }

  .stage-quote {
    top: calc(142px + env(safe-area-inset-top, 0px));
    width: min(76vw, 292px);
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .result-content h2 {
    font-size: clamp(1.12rem, 6.2vw, 1.48rem);
    line-height: 0.96;
  }

  .code-pill {
    min-height: 30px;
    font-size: 0.68rem;
  }

  .color-comment,
  .advice-strip p {
    font-size: 0.68rem;
    line-height: 1.22;
  }

  .advice-strip {
    padding: 12px 8px;
  }

  .postcard-download {
    min-height: 34px;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .page {
    gap: 0;
    padding: 0;
  }

  .form-panel,
  .result-content {
    padding: 18px;
  }

  h1 {
    font-size: clamp(2.1rem, 4.8vw, 4rem);
  }

  .title-block p:not(.eyebrow),
  .color-comment {
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .trait {
    min-height: 66px;
  }

  .palette-strip,
  .palette-month {
    height: 100%;
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .color-swatch,
  .color-swatch::after,
  .copy-status {
    animation: none;
    transition: none;
  }
}
