:root {
  color-scheme: light;
  --ink: #2f3940;
  --muted: #69767d;
  --paper: #fbfaf7;
  --paper-soft: rgba(255, 255, 255, 0.72);
  --sakura: #f4dfe2;
  --sakura-deep: #d9aeb5;
  --air: #dfeef1;
  --air-deep: #9ebfc5;
  --line: rgba(83, 103, 110, 0.18);
  --shadow: 0 24px 70px rgba(77, 101, 108, 0.1);
  --radius: 1.6rem;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 4%, rgba(244, 223, 226, 0.8), transparent 32rem),
    radial-gradient(circle at 88% 23%, rgba(223, 238, 241, 0.9), transparent 34rem),
    linear-gradient(160deg, #fbfaf7 0%, #f7faf9 48%, #fcf8f7 100%);
  line-height: 1.8;
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  content: "";
  filter: blur(1px);
  pointer-events: none;
}

body::before { top: 38%; left: -11rem; background: rgba(244, 223, 226, 0.2); }
body::after { right: -10rem; bottom: 8%; background: rgba(223, 238, 241, 0.28); }

[hidden] { display: none !important; }

.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;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: inherit; text-underline-offset: 0.25em; }
a:hover { text-decoration-thickness: 2px; }

button,
textarea { font: inherit; }

button { touch-action: manipulation; }

:focus-visible {
  outline: 3px solid #537f89;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: .75rem;
  left: 0.75rem;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
  clip-path: inset(50%);
  white-space: nowrap;
  transform: translateY(-220%);
}
.skip-link:focus-visible { width: auto; height: auto; padding: 0.6rem 0.9rem; clip-path: none; transform: none; }

.site-header,
.site-footer,
.page-shell {
  width: min(100% - 2rem, 68rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.25rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  letter-spacing: 0.06em;
}

.brand-parent { color: var(--muted); font-size: 0.68rem; font-weight: 700; }
.brand-name { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.08rem; }

.header-link {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.page-shell { padding: 2.5rem 0 5rem; }
.home-shell { display: grid; min-height: calc(100vh - 12rem); align-content: center; padding-top: 0; }

.eyebrow {
  margin: 0 0 1rem;
  color: #758188;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1,
.screen-title {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 9vw, 4.75rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.screen-title { font-size: clamp(1.8rem, 7vw, 3.35rem); }

.lead {
  max-width: 35rem;
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 3.4vw, 1.08rem);
}

.mode-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 2.5rem;
}

.mode-card {
  position: relative;
  display: grid;
  min-height: 9.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  background: var(--paper-soft);
  box-shadow: var(--shadow);
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mode-card:hover { transform: translateY(-3px); border-color: var(--air-deep); }
.mode-card--love { background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(244,223,226,.52)); }
.mode-card--work { background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(223,238,241,.64)); }
.mode-card strong { align-self: end; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.35rem; font-weight: 500; }
.mode-card span { color: var(--muted); font-size: 0.82rem; }

.quiet-link { display: inline-block; margin-top: 2rem; color: var(--muted); font-size: 0.84rem; }

.breadcrumb { margin-bottom: 1.4rem; color: var(--muted); font-size: .72rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb li:not(:last-child)::after { margin-left: .35rem; content: "/"; opacity: .5; }

.app-stage,
.content-card {
  max-width: 49rem;
  margin-inline: auto;
}

.screen-head { margin-bottom: 2rem; }

.selection-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.selection-count {
  min-width: 3.6rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: var(--ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.term-cloud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  padding: 1.1rem 0 1.5rem;
}

.term-chip {
  --offset: 0rem;
  --angle: 0deg;
  --delay: 0s;
  min-height: 3.3rem;
  padding: 0.72rem 0.5rem;
  border: 1px solid rgba(110, 132, 137, 0.18);
  border-radius: 999px;
  color: #425159;
  background: rgba(255,255,255,.68);
  box-shadow: 0 7px 22px rgba(72, 97, 104, 0.06);
  transform: translateY(var(--offset)) rotate(var(--angle));
  animation: breathe 6s ease-in-out var(--delay) infinite alternate;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.term-chip:nth-child(4n+1) { background: rgba(251, 236, 237, 0.74); }
.term-chip:nth-child(4n+3) { background: rgba(232, 243, 244, 0.78); }
.term-chip[aria-pressed="true"] {
  border-color: #6f9299;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(111,146,153,.13), 0 10px 25px rgba(72,97,104,.1);
  animation-play-state: paused;
}
.term-chip[aria-pressed="true"]::before { content: "✓ "; font-weight: 700; }
.term-chip:disabled { opacity: 0.42; cursor: not-allowed; animation-play-state: paused; }
.term-chip:hover:not(:disabled), .term-chip:focus-visible { animation-play-state: paused; }

.drift-0 { --offset: -0.12rem; --angle: 0.1deg; --delay: 0s; }
.drift-1 { --offset: 0.18rem; --angle: -0.6deg; --delay: -0.7s; }
.drift-2 { --offset: -0.05rem; --angle: 0.5deg; --delay: -1.4s; }
.drift-3 { --offset: 0.28rem; --angle: -0.2deg; --delay: -2.1s; }
.drift-4 { --offset: -0.2rem; --angle: 0.7deg; --delay: -2.8s; }
.drift-5 { --offset: 0.08rem; --angle: -0.5deg; --delay: -3.5s; }

@keyframes breathe {
  from { opacity: .9; }
  to { opacity: 1; }
}

.button-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.primary-button,
.secondary-button,
.text-button {
  min-height: 3rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
}

.primary-button {
  border: 1px solid #6f9299;
  background: #5f838b;
  color: #fff;
  box-shadow: 0 10px 24px rgba(78,112,120,.18);
}
.primary-button:hover:not(:disabled) { background: #4e737b; }
.primary-button:disabled { opacity: 0.42; cursor: not-allowed; box-shadow: none; }

.secondary-button { border: 1px solid var(--line); background: rgba(255,255,255,.72); color: var(--ink); }
.text-button { border: 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: .25em; }

.storage-note,
.status-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.result-card,
.synthesis-view,
.today-view,
.message-card,
.content-card {
  border: 1px solid rgba(255,255,255,.82);
  border-radius: var(--radius);
  background: rgba(255,255,255,.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.result-card { padding: clamp(1.2rem, 5vw, 2.4rem); transition: opacity 320ms ease, transform 320ms ease; }
.synthesis-view { padding: clamp(1.2rem, 5vw, 2.4rem); }
.result-card.is-leaving { opacity: 0; transform: translateY(-0.5rem); }
.today-view { padding: clamp(1.2rem, 5vw, 2.4rem); transition: opacity 240ms ease, transform 240ms ease; }
.today-view.is-leaving { opacity: .42; transform: translateY(-.2rem); }
.selected-summary { margin: 0 0 1.75rem; color: var(--muted); font-size: 0.8rem; letter-spacing: .04em; }

.result-block { padding: 1.35rem 0; border-top: 1px solid var(--line); }
.result-block:first-of-type { border-top: 0; }
.result-kicker { margin: 0 0 .45rem; color: #6a7d82; font-size: .7rem; font-weight: 700; letter-spacing: .14em; }
.result-block h2 { margin: 0 0 .7rem; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.35rem; font-weight: 500; }
.result-block p { margin: 0; }
.concept-link { display: inline-block; margin-top: .8rem; color: var(--muted); font-size: .8rem; }
.result-actions { margin-top: 1.5rem; }

.mode-label { color: var(--muted); font-size: .8rem; }
.today-section { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.today-section > h2,
.today-closing h2 { margin: 0 0 .75rem; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.35rem; font-weight: 500; }
.today-closing h2:not(:first-child) { margin-top: 1.4rem; }
.synthesis-summary > h2:not(:first-child),
.concept-heading { margin-top: 1.5rem; }
.separation-list { display: grid; gap: .55rem; margin: .75rem 0 0; padding-left: 1.25rem; color: #526168; }
.today-word-group { display: grid; grid-template-columns: 3.8rem 1fr; gap: .5rem; align-items: baseline; }
.today-word-group h3 { margin: 0; color: var(--muted); font-size: .76rem; font-weight: 500; }
.today-word-group .selected-summary { margin: .25rem 0; }
.round-details { margin: .7rem 0; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(255,255,255,.55); }
.round-details summary { min-height: 2.75rem; padding: .5rem 0; cursor: pointer; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; }
.round-details h3 { margin: 1.2rem 0 .35rem; font-size: .82rem; font-weight: 700; }
.round-details p { margin: 0; color: #526168; }
.disposition-message { min-height: 3.6rem; margin: 1rem 0 0; color: var(--muted); }
.delete-button { margin-top: 1.5rem; font-size: .78rem; }
.tomorrow-copy { margin: 1.5rem 0 0; color: var(--muted); text-align: center; }

.share-fallback { margin-top: 1.5rem; }
.share-fallback label { display: block; margin-bottom: .55rem; font-size: .78rem; color: var(--muted); }
.share-fallback textarea { width: 100%; min-height: 10rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: rgba(255,255,255,.8); resize: vertical; }

.message-card { max-width: 38rem; margin: 8vh auto 0; padding: clamp(1.5rem, 7vw, 3rem); text-align: center; }
.message-card h1, .message-card h2 { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 500; }
.message-card p { color: var(--muted); }

.content-card { padding: clamp(1.35rem, 6vw, 3.25rem); }
.content-card h1 { font-size: clamp(2rem, 7vw, 3.5rem); }
.content-card h2 { margin: 2.5rem 0 .75rem; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.35rem; font-weight: 500; }
.content-card p, .content-card li { color: #526168; }
.content-card ul { padding-left: 1.3rem; }

.site-footer {
  padding: 2.2rem 0 2.7rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .72rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; margin-bottom: 1rem; }
.creator { margin: 0; }

.is-paused .term-chip { animation-play-state: paused; }

@media (min-width: 42rem) {
  .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .term-cloud { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
  .page-shell { padding-top: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .term-chip { animation: none; transform: none; }
}

@media (forced-colors: active) {
  .term-chip[aria-pressed="true"] { outline: 3px solid CanvasText; }
}
/* Public support numbers remain readable and easy to tap on small screens. */
.support-links { padding-left: 1.25rem; }
.support-links a, .support-phone { display: inline-flex; align-items: center; min-height: 44px; }
.safety-card a { overflow-wrap: anywhere; }
.source-note { font-size: .85rem; }
