:root {
  --paper: #f7f6f3;
  --ink: #121212;
  --muted: #5c5b57;
  --line: rgba(18, 18, 18, .16);
  --glass: rgba(247, 246, 243, .78);
  --serif: "Instrument Serif", "Shippori Mincho", Georgia, serif;
  --sans: "Geist", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
#field.is-on { opacity: 1; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.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;
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 999px; }

/* ---------- header ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.mark {
  font: 400 30px/1 var(--serif);
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: flex-start;
  min-height: 44px;
  padding-top: 7px;
}
.mark sup { font: 500 10px/1 var(--sans); letter-spacing: .04em; margin: 2px 0 0 3px; color: var(--muted); }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
}
.status i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink);
  animation: blink 2.4s var(--ease) infinite;
}
@keyframes blink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
.bar-end { display: flex; align-items: center; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font: 500 14.5px/1 var(--sans);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { transform: translateY(-1px); background: #000; box-shadow: 0 6px 18px -8px rgba(0,0,0,.45); }
.btn-solid:active { transform: translateY(0) scale(.97); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); padding: 0 14px; }
.btn-ghost:hover { background: rgba(18,18,18,.06); }
.btn-ghost:active { transform: scale(.97); }

/* ---------- stage ---------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(8px, 1.6vh, 32px) clamp(16px, 2.4vh, 40px);
}
.eyebrow {
  margin: 0;
  font-size: 12.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 16px 0 0;
  font: 400 clamp(44px, min(6.2vw, 10vh), 94px)/.96 var(--serif);
  letter-spacing: -.018em;
}
h1 span { display: block; }
h1 em { font-style: italic; }
:lang(ja) h1 { font-size: clamp(30px, min(4.6vw, 7.4vh), 68px); line-height: 1.18; letter-spacing: 0; font-weight: 500; }
:lang(ja) h1 em { font-style: normal; }

.lede {
  margin: 16px auto 0;
  max-width: 36ch;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.55;
  color: var(--muted);
}
:lang(ja) .lede { max-width: 30em; font-size: 15.5px; line-height: 1.8; }

/* ---------- countdown ---------- */
.clock { margin-top: clamp(18px, 3vh, 36px); }
.units { display: flex; align-items: flex-start; justify-content: center; gap: clamp(6px, 1.4vw, 20px); }
.unit { display: flex; flex-direction: column; align-items: center; min-width: 1.5em; }
.num {
  display: flex;
  font: 400 clamp(44px, min(5.6vw, 8.6vh), 80px)/1 var(--serif);
  letter-spacing: -.01em;
  overflow: hidden;
  padding: .04em 0 .02em;
}
.num .d { display: inline-block; width: .56em; text-align: center; }
.sep { font: 400 clamp(36px, min(4.6vw, 7vh), 64px)/1 var(--serif); color: var(--muted); opacity: .45; padding-top: .1em; }
.lbl {
  margin-top: 8px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
:lang(ja) .lbl { letter-spacing: .08em; font-size: 12px; }
.until { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- ask ---------- */
.ask { margin-top: clamp(18px, 2.6vh, 32px); width: 100%; max-width: 640px; }
.ask-label {
  margin: 0 0 12px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.count {
  font-variant-numeric: tabular-nums;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12px; color: var(--ink);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.count.is-full { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  position: relative;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 500 15px/1 var(--sans); color: var(--ink);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { transform: translateY(-2px); border-color: var(--ink); }
.chip:active { transform: translateY(0) scale(.96); }
.chip.is-asked::after {
  content: ""; position: absolute; top: 7px; right: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .55;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.answer {
  margin: 12px auto 0;
  min-height: 1.35em;
  max-width: 42ch;
  font: italic 400 clamp(20px, 1.8vw, 24px)/1.3 var(--serif);
}
:lang(ja) .answer { font-style: normal; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; max-width: 30em; min-height: 1.6em; }
.answer.is-new { animation: rise .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.redact {
  display: inline-block; width: var(--w, 4em); height: .78em;
  vertical-align: -.04em; border-radius: 2px;
  background: linear-gradient(90deg, var(--ink) 0 40%, #3a3a3a 50%, var(--ink) 60% 100%) 0 0 / 300% 100%;
  animation: sheen 2.8s linear infinite;
}
@keyframes sheen { to { background-position: -150% 0; } }

/* ---------- notify ---------- */
.notify { margin-top: clamp(10px, 1.6vh, 22px); width: 100%; max-width: 460px; }
.notify-label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.field {
  display: flex; align-items: center; gap: 6px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(18,18,18,.07); }
.field[data-invalid] { border-color: #b42318; }
.field input {
  flex: 1; min-width: 0; min-height: 44px;
  border: 0; background: transparent; outline: none;
  padding: 0 8px 0 16px;
  font: 400 16px/1 var(--sans); color: var(--ink);
}
.field input::placeholder { color: #8f8e89; }
.note { margin: 10px 0 0; min-height: 1.5em; font-size: 13px; color: var(--muted); }
.note[data-state="error"] { color: #b42318; }
.note[data-state="ok"] { color: var(--ink); font-weight: 500; }

/* ---------- footer ---------- */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px;
  font-size: 13px; color: var(--muted);
}
.hint { display: inline-flex; align-items: center; gap: 8px; }
.hint svg { flex: none; }

/* ---------- entrance ---------- */
.js [data-enter] { opacity: 0; transform: translateY(14px); }
.js.is-in [data-enter] {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .status { display: none; }
}
@media (max-width: 560px) {
  .bar { min-height: 68px; }
  .mark { font-size: 26px; }
  .nav-cta { padding: 0 16px; }
  .sep { display: none; }
  .units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 100%; max-width: 360px; margin-inline: auto; }
  .unit { min-width: 0; padding: 10px 0 8px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
  .num { font-size: clamp(38px, 11.5vw, 52px); }
  .lbl { letter-spacing: .08em; font-size: 10px; }
  .chip { padding: 0 15px; font-size: 14.5px; }
  .field { flex-direction: column; align-items: stretch; border-radius: 22px; padding: 6px; }
  .field input { padding: 0 12px; text-align: center; }
  .field .btn { width: 100%; }
  .foot { flex-direction: column; justify-content: center; text-align: center; gap: 4px; padding-block: 16px 20px; }
  .foot .domain { display: none; }
}

/* short laptop screens: keep everything on one screen */
@media (max-height: 800px) and (min-width: 561px) {
  .bar { min-height: 64px; }
  .eyebrow { font-size: 11.5px; }
  h1 { margin-top: 10px; }
  .lede { max-width: 62ch; margin-top: 12px; }
  .notify-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ask { margin-top: 14px; }
  .ask-label { margin-bottom: 8px; }
  .answer { margin-top: 8px; }
  .note { margin-top: 6px; }
  .foot { min-height: 48px; }
}
@media (max-width: 560px) {
  .answer { min-height: 2.6em; }
  :lang(ja) .answer { min-height: 3.2em; }
}

/* a soft paper halo keeps type legible where dots come close */
.stage :is(.eyebrow, h1, .lede, .num, .lbl, .until, .ask-label, .answer, .notify-label, .note),
.foot, .status, .mark {
  text-shadow: 0 0 2px var(--paper), 0 0 8px var(--paper), 0 0 14px var(--paper);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-enter] { opacity: 1; transform: none; }
}
