/* よるあかり: the site. Night indigo, lantern light, shoji paper. */

:root {
  --night-900: #14173a;
  --night-800: #1d2150;
  --night-700: #272c63;
  --night-600: #343a7c;
  --lamp-200: #ffe9b8;
  --lamp-300: #ffd88a;
  --lamp-400: #ffc463;
  --lamp-600: #f39a3d;
  --paper: #fff4da;
  --paper-dim: #c9c6e6;
  --blush: #ff8aa0;
  --shu: #d93a2b;
  --wood: #6a4330;
  --ink: #2b2340;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --hand: "Yusei Magic", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 34em;

  /* What the page is painted with; each time of day sets its own (see the end of the file). */
  --bg: #1d2150;
  --bg-deep: #14173a;
  --surface: #272c63;
  --text: #fff4da;
  --text-dim: #c9c6e6;
  --accent: #ffd88a;
  --accent-glow: 0 0 28px rgba(255, 196, 99, 0.35);
  --line: rgba(255, 244, 218, 0.16);
  --line-soft: rgba(255, 244, 218, 0.08);
  --chip: rgba(255, 244, 218, 0.1);
  --ghost-border: rgba(255, 244, 218, 0.4);
  --stars: 1;
  --sky:
    radial-gradient(ellipse 60% 45% at 72% 52%, rgba(255, 190, 90, 0.16), transparent 70%),
    linear-gradient(180deg, #232766 0%, #1d2150 60%, #1d2150 100%);
  --town-bldg: #10132f;
  --town-win: #2c3166;
  --town-win-on: #ffc463;
  --shoji: #2a2c4e;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--round);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  word-break: auto-phrase;
  -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--lamp-400);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-feature-settings: "palt";
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
}

.nobr {
  white-space: nowrap;
}

/* Classes that set display (.btn) must not beat the hidden attribute. */
[hidden] {
  display: none !important;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--night-800);
}

.skip:focus {
  top: 12px;
}

/* ---- top bar ---------------------------------------------------------------- */

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
}

.topbar-logo img {
  width: 132px;
  height: auto;
}

.topbar-nav {
  display: none;
  gap: 22px;
  font-size: 14px;
}

.topbar-nav a {
  color: var(--text-dim);
  text-decoration: none;
}

.topbar-nav a:hover {
  color: var(--text);
}

@media (min-width: 720px) {
  .topbar-nav {
    display: flex;
  }
}

/* ---- section basics --------------------------------------------------------- */

main > section {
  position: relative;
  padding: clamp(72px, 12vw, 136px) var(--gutter);
}

main > section > * {
  max-width: 1080px;
  margin-inline: auto;
}

.section-title {
  font-weight: 900;
  font-size: clamp(26px, 5.2vw, 40px);
  line-height: 1.45;
  margin-bottom: 18px;
}

.section-lead {
  color: var(--text-dim);
  max-width: var(--measure);
}

.note {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 14px;
  text-align: center;
}

/* ---- buttons ---------------------------------------------------------------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cta-row-center {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn-lamp {
  background: var(--lamp-400);
  color: #3a2318;
  box-shadow: 0 0 0 4px rgba(255, 196, 99, 0.18), 0 8px 30px rgba(255, 170, 70, 0.28);
}

.btn-lamp:hover {
  background: var(--lamp-300);
}

.btn-lamp:active {
  transform: scale(0.97);
}

.btn-ghost {
  color: var(--text);
  border: 2px solid var(--ghost-border);
}

a.btn-ghost:hover {
  border-color: var(--text);
}

.btn[aria-disabled="true"] {
  cursor: default;
  opacity: 0.72;
  box-shadow: none;
}

.btn-lamp[aria-disabled="true"] {
  background: rgba(255, 196, 99, 0.22);
  color: var(--text-dim);
}

/* ---- hero ------------------------------------------------------------------- */

.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  min-height: 100svh;
  padding-top: 104px !important;
  overflow: hidden;
  background: linear-gradient(180deg, transparent 86%, var(--bg) 100%), var(--sky);
}

.hero-sky {
  position: absolute !important;
  inset: 0;
  max-width: none !important;
  pointer-events: none;
}

/* The stars fade out by day; the moon (or the sun) is not part of them. */
.hero-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--stars);
  background-image:
    radial-gradient(2px 2px at 12% 18%, var(--paper) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 28% 9%, var(--paper) 50%, transparent 51%),
    radial-gradient(2px 2px at 44% 26%, rgba(255, 244, 218, 0.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 63% 12%, var(--paper) 50%, transparent 51%),
    radial-gradient(2px 2px at 8% 64%, rgba(255, 244, 218, 0.6) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 40%, var(--paper) 50%, transparent 51%),
    radial-gradient(2px 2px at 54% 78%, rgba(255, 244, 218, 0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 36% 52%, rgba(255, 244, 218, 0.6) 50%, transparent 51%);
}

.moon {
  position: absolute;
  top: 78px;
  right: 26px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: -12px 8px 0 0 var(--paper);
  transform: rotate(-20deg);
}

.hero-copy,
.hero-window {
  position: relative;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 16px);
}

.hero-lantern {
  flex: none;
  width: clamp(76px, 15vw, 118px);
  height: auto;
  filter: drop-shadow(0 0 22px rgba(255, 196, 99, 0.55));
  transform-origin: 50% 8%;
  animation: sway 5.5s ease-in-out infinite;
}

.hero-wordmark {
  width: clamp(210px, 52vw, 380px);
  height: auto;
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

.hero-line {
  margin-top: 22px;
  font-weight: 900;
  font-size: clamp(34px, 8.4vw, 64px);
  line-height: 1.3;
  color: var(--accent);
  font-feature-settings: "palt";
  text-shadow: var(--accent-glow);
}

.hero-lead {
  margin-top: 16px;
  font-size: clamp(16px, 2.2vw, 18px);
  color: var(--text-dim);
}

.hero-window {
  justify-self: center;
  width: min(340px, 82vw);
  margin: 0;
}

.hero-window-glass {
  position: relative;
  aspect-ratio: 3 / 4.4;
  border: 10px solid var(--wood);
  border-radius: 40px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 35%, #fff3cf 0%, #ffd27f 55%, #f6a34c 100%);
  box-shadow: 0 0 0 2px rgba(255, 196, 99, 0.25), 0 0 90px 10px rgba(255, 180, 80, 0.28);
}

.hero-window-glass video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Speech bubbles, handwritten. */
.bubble {
  position: relative;
  width: fit-content;
  padding: 12px 18px;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 17px;
  line-height: 1.55;
}

.bubble::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: inherit;
  transform: rotate(45deg);
}

.bubble-left {
  position: absolute;
  left: -22px;
  top: 30px;
  transform: rotate(-4deg);
  box-shadow: 0 8px 24px rgba(10, 12, 40, 0.35);
}

.bubble-left::after {
  right: 26px;
  bottom: -7px;
}

.bubble-up {
  margin-top: 20px;
}

.bubble-up::after {
  left: 28px;
  top: -7px;
}

/* The red seal. */
.hanko {
  position: absolute;
  right: -16px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 4px solid var(--shu);
  border-radius: 50%;
  background: #fff8ec;
  color: var(--shu);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.15;
  text-align: center;
  transform: rotate(-14deg);
  box-shadow: inset 0 0 0 3px #fff8ec, inset 0 0 0 5px var(--shu);
}

.hanko-small {
  width: 74px;
  height: 74px;
  font-size: 16px;
  right: 14px;
  bottom: 14px;
}

@media (min-width: 720px) {
  .moon {
    top: 96px;
    right: 9%;
    width: 54px;
    height: 54px;
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    max-width: none;
  }

  .hero > .hero-copy {
    margin-right: 0;
    justify-self: end;
    max-width: 560px;
  }

  .hero > .hero-window {
    justify-self: start;
    margin-left: 6vw;
  }
}

/* ---- the two characters ------------------------------------------------------ */

.futari-grid {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}

.chara {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(16px, 3vw, 28px);
  align-items: start;
}

.chara-pic {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #ffe3a6, #f3a352);
}

.chara-pic img {
  position: absolute;
  left: 50%;
  top: 6%;
  width: 150%;
  max-width: none;
  transform: translateX(-50%);
}

.chara-pic-soon {
  background: radial-gradient(ellipse at 50% 30%, #5b62b4, #2a2f6c);
}

.chara-pic-soon img {
  top: 8%;
  width: 108%;
  filter: drop-shadow(0 0 18px rgba(160, 170, 255, 0.45));
}

.chara-name {
  font-weight: 900;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.2;
}

.chara-name rt {
  font-size: 0.32em;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.2em;
}

.chara-role {
  margin-top: 6px;
  color: var(--accent);
  font-weight: 700;
}

.chara-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  margin: 14px 0 0;
  font-size: 14px;
}

.chara-facts dt {
  color: var(--text-dim);
  font-size: 12px;
}

.chara-facts dd {
  margin: 0;
}

.chara-text {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 15px;
}

.chara .bubble {
  font-size: 16px;
}

@media (max-width: 560px) {
  .chara {
    grid-template-columns: 1fr;
  }

  .chara-pic {
    aspect-ratio: 4 / 3.4;
  }

  .chara-pic img {
    width: 92%;
    top: 4%;
  }

  .chara-pic-soon img {
    width: 66%;
    top: 7%;
  }
}

@media (min-width: 980px) {
  .futari-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* ---- the evening, window by window -------------------------------------------- */

.yoru-head {
  display: grid;
  gap: 4px;
}

.night-road {
  list-style: none;
  margin: 40px auto 0;
  padding: 0;
  display: grid;
  gap: clamp(56px, 9vw, 96px);
  position: relative;
}

/* The road home: a dotted line of street lamps behind the steps. */
.night-road::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 11px;
  width: 4px;
  background: radial-gradient(circle, rgba(255, 196, 99, 0.55) 1.6px, transparent 2px) 0 0 / 4px 18px repeat-y;
}

.step {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 40px;
}

.step::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lamp-400);
  box-shadow: 0 0 16px 4px rgba(255, 196, 99, 0.45);
}

.step-time {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--accent);
  font-weight: 700;
}

.step-time time {
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 0.04em;
}

.step h3 {
  margin-top: 6px;
  font-weight: 900;
  font-size: clamp(22px, 4.4vw, 30px);
  line-height: 1.45;
}

.step-text p:last-child {
  margin-top: 10px;
  color: var(--text-dim);
  max-width: var(--measure);
}

/* A window: dark until you reach it, then the light comes on behind the shoji and they slide open. */
.window {
  position: relative;
  margin: 0;
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
  border: 10px solid var(--wood);
  border-radius: 22px;
  overflow: hidden;
  background: #0f1230;
  transition: box-shadow 1s ease 0.2s;
}

.window img,
.window video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.2) saturate(0.2);
  transition: filter 1.1s ease 0.55s;
}

.window-puri {
  background: #fdf3e4;
}

.window-puri img {
  object-fit: contain;
  padding: 10px;
}

.shoji {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background:
    repeating-linear-gradient(90deg, transparent 0 44px, var(--wood) 44px 48px),
    repeating-linear-gradient(0deg, transparent 0 60px, var(--wood) 60px 64px),
    var(--shoji);
  transition: background-color 0.45s ease, transform 1s cubic-bezier(0.65, 0, 0.25, 1) 0.5s;
}

.shoji-l {
  left: 0;
  border-right: 3px solid var(--wood);
}

.shoji-r {
  right: 0;
  border-left: 3px solid var(--wood);
}

.window.lit {
  box-shadow: 0 0 0 2px rgba(255, 196, 99, 0.3), 0 0 70px 6px rgba(255, 176, 77, 0.3);
}

.window.lit img,
.window.lit video {
  filter: none;
}

.window.lit .shoji {
  background-color: #ffd98f;
}

.window.lit .shoji-l {
  transform: translateX(-104%);
}

.window.lit .shoji-r {
  transform: translateX(104%);
}

@media (min-width: 900px) {
  .yoru {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 48px;
    max-width: 1140px;
    margin-inline: auto;
  }

  .yoru > * {
    margin-inline: 0;
  }

  .yoru-head {
    align-self: start;
    position: sticky;
    top: 48px;
  }

  .section-title-tate {
    writing-mode: vertical-rl;
    font-size: 44px;
    letter-spacing: 0.18em;
    margin: 0;
  }

  .yoru-head .section-lead {
    writing-mode: vertical-rl;
    white-space: nowrap;
    margin-top: 12px;
    font-size: 15px;
  }

  .yoru-head {
    grid-auto-flow: column;
    justify-content: start;
    gap: 14px;
  }

  .night-road {
    margin-top: 0;
  }

  .step {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
  }

  .step:nth-child(even) .step-text {
    order: 2;
  }
}

/* ---- memory, as a chat ----------------------------------------------------- */

.oboe {
  display: grid;
  gap: 32px;
  align-items: center;
}

.oboe-copy p {
  color: var(--text-dim);
  max-width: var(--measure);
}

.chat {
  display: grid;
  gap: 10px;
  width: min(100%, 400px);
  padding: 22px 18px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.chat-day {
  justify-self: center;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-dim);
  font-size: 12px;
}

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.6;
}

.msg-me {
  justify-self: end;
  background: var(--lamp-400);
  color: #3a2318;
  border-bottom-right-radius: 6px;
}

.msg-her {
  justify-self: start;
  background: var(--paper);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}

@media (min-width: 860px) {
  .oboe {
    grid-template-columns: 1fr 1fr;
  }

  .chat {
    justify-self: end;
  }
}

/* ---- clips -------------------------------------------------------------------- */

.clips {
  list-style: none;
  margin: 32px auto 0;
  padding: 4px 4px 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62vw, 240px);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.clip {
  scroll-snap-align: center;
}

.phone {
  aspect-ratio: 9 / 16;
  border: 8px solid #0d1030;
  border-radius: 30px;
  overflow: hidden;
  background: #0d1030;
  box-shadow: 0 0 0 2px rgba(255, 244, 218, 0.1), 0 18px 40px rgba(5, 6, 25, 0.45);
}

.phone video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-name {
  margin-top: 12px;
  text-align: center;
  font-family: var(--hand);
  font-size: 18px;
  color: var(--accent);
}

@media (min-width: 820px) {
  .clips {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 260px));
    justify-content: center;
    overflow: visible;
    gap: 32px;
  }
}

/* ---- hidden reactions ---------------------------------------------------------- */

.himitsu {
  text-align: center;
}

.himitsu .section-lead {
  margin-inline: auto;
}

.stickers {
  list-style: none;
  margin: 30px auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 10px;
  max-width: 820px;
}

.sticker {
  appearance: none;
  border: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--hand);
  font-size: 17px;
  color: var(--ink);
  background: var(--tint, var(--lamp-300));
  transform: rotate(var(--tilt, 0deg));
  cursor: default;
}

.sticker-locked {
  cursor: pointer;
  background: transparent;
  color: var(--text-dim);
  outline: 2px dashed var(--ghost-border);
  outline-offset: -2px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.sticker-locked:hover {
  transform: rotate(var(--tilt, 0deg)) scale(1.05);
}

.sticker-locked[aria-pressed="true"] {
  color: var(--accent);
  outline-color: var(--lamp-400);
}

/* ---- trust ----------------------------------------------------------------- */

.anshin-list {
  list-style: none;
  margin: 28px auto 0;
  padding: 0;
  display: grid;
  gap: 26px;
}

.anshin-list li {
  position: relative;
  padding-left: 46px;
}

.anshin-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--lamp-200), var(--lamp-600));
  box-shadow: 0 0 14px rgba(255, 196, 99, 0.45);
}

.anshin-list h3 {
  font-size: 18px;
  font-weight: 900;
}

.anshin-list p {
  margin-top: 4px;
  color: var(--text-dim);
}

@media (min-width: 820px) {
  .anshin-list {
    grid-template-columns: 1fr 1fr;
    gap: 34px 48px;
  }
}

/* ---- FAQ ------------------------------------------------------------------- */

.faq > * {
  max-width: 760px;
}

.faq-list {
  margin-top: 24px;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 18px 40px 18px 0;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "＋";
  position: absolute;
  right: 6px;
  top: 16px;
  color: var(--accent);
  font-size: 20px;
}

.faq-list details[open] summary::after {
  content: "－";
}

.faq-list details p {
  padding: 0 0 20px;
  color: var(--text-dim);
}

/* ---- the last call, over a town whose windows come on ------------------------- */

.last {
  text-align: center;
  padding-bottom: 0 !important;
  background: linear-gradient(180deg, var(--bg), var(--bg-deep));
}

.last-title {
  font-weight: 900;
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1.5;
  color: var(--text);
}

.town {
  max-width: none !important;
  margin: 56px calc(-1 * var(--gutter)) 0 !important;
  order: 3;
}

.last {
  display: flex;
  flex-direction: column;
}

.town svg {
  width: 100%;
  height: auto;
}

.town .bldg {
  fill: var(--town-bldg);
}

.town .win {
  fill: var(--town-win);
  transition: fill 0.6s ease;
}

.town .win.on {
  fill: var(--town-win-on);
}

/* ---- the sign-up form ---------------------------------------------------------------- */

.touroku,
.touroku-done {
  width: min(100%, 460px);
  margin: 28px auto 0;
  padding: 24px clamp(18px, 4vw, 28px);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  text-align: left;
}

.touroku-lead {
  color: var(--text-dim);
  font-size: 15px;
}

.touroku-who {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.touroku-who legend {
  margin-bottom: 8px;
  padding: 0;
  font-weight: 700;
  font-size: 14px;
}

.touroku-who label {
  position: relative;
}

.touroku-who input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.touroku-who span {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid var(--ghost-border);
  font-weight: 700;
}

.touroku-who input:checked + span {
  background: var(--lamp-400);
  border-color: var(--lamp-400);
  color: #3a2318;
}

.touroku-who input:focus-visible + span {
  outline: 3px solid var(--lamp-400);
  outline-offset: 3px;
}

.touroku-field {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-dim);
}

.touroku-field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: 500 16px var(--round);
}

.touroku-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.touroku-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
}

.touroku-consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--lamp-600);
}

.touroku-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.touroku .btn {
  width: 100%;
  margin-top: 20px;
  border: 0;
  cursor: pointer;
  font-family: var(--round);
}

.touroku .btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.touroku-msg {
  min-height: 1.7em;
  margin-top: 10px;
  color: var(--accent);
  font-size: 14px;
  text-align: center;
}

.touroku-done {
  text-align: center;
}

.touroku-done:focus {
  outline: none;
}

.touroku-done-title {
  font-weight: 900;
  font-size: 22px;
}

.touroku-done p + p {
  margin-top: 6px;
  color: var(--text-dim);
}

.touroku-done .bubble {
  margin: 20px auto 0;
  background: var(--paper);
  color: var(--ink);
}

.touroku-done .bubble::after {
  left: calc(50% - 9px);
  top: -7px;
}

/* ---- footer ----------------------------------------------------------------- */

.footer {
  padding: 40px var(--gutter) 56px;
  background: var(--bg-deep);
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-logo {
  margin: 0 auto 18px;
  width: 140px;
  height: auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 18px;
}

.footer-nav a {
  color: var(--text);
}

.footer-note + .footer-note {
  margin-top: 4px;
}

/* ---- reduced motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-lantern {
    animation: none;
  }

  .window img,
  .window video,
  .shoji,
  .window,
  .town .win {
    transition: none;
  }
}

/* ---- document pages (privacy, terms, support) ------------------------------------ */

.doc-page {
  background: var(--bg);
}

.doc-head {
  padding: 22px var(--gutter);
}

.doc-head img {
  width: 140px;
  height: auto;
}

.doc {
  max-width: 760px;
  margin: 0 auto 64px;
  padding: clamp(24px, 5vw, 48px) clamp(20px, 5vw, 56px);
  border-radius: 28px;
  background: #fbfaff;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink);
  line-height: 1.95;
}

.doc a {
  color: #4a3fb3;
}

.doc h1 {
  font-weight: 900;
  font-size: clamp(24px, 4.6vw, 32px);
  line-height: 1.4;
}

.doc h2 {
  margin: 36px 0 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(43, 35, 64, 0.12);
  font-size: 18px;
  font-weight: 900;
}

.doc p,
.doc li {
  font-size: 15px;
}

.doc p + p {
  margin-top: 10px;
}

.doc ul,
.doc ol {
  padding-left: 1.4em;
}

.doc .date {
  margin-top: 6px;
  color: rgba(43, 35, 64, 0.62);
  font-size: 13px;
}

.doc .draft {
  margin: 20px 0;
  padding: 12px 16px;
  border: 2px dashed var(--shu);
  border-radius: 14px;
  color: var(--shu);
  font-size: 14px;
  font-weight: 700;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.doc th,
.doc td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(43, 35, 64, 0.12);
  text-align: left;
  vertical-align: top;
}

.doc th {
  width: 34%;
  font-weight: 700;
}

.doc .scroll {
  overflow-x: auto;
}

.doc-back {
  display: inline-block;
  margin-top: 32px;
  font-weight: 700;
}

/* ---- the time of day ---------------------------------------------------------------
   <html data-time="asa|hiru|yu|yoru"> is set from the visitor's clock before the page paints
   (inline script in <head>), and by the 朝・昼・夕・夜 switch. data-late: between midnight and 5:00. */

.on-light {
  display: none;
}

.hero-line > span {
  display: none;
}

html:not([data-time]) .hero-line [data-for~="yoru"],
[data-time="asa"] .hero-line [data-for~="asa"],
[data-time="hiru"] .hero-line [data-for~="hiru"],
[data-time="yu"] .hero-line [data-for~="yu"],
html:not([data-late])[data-time="yoru"] .hero-line [data-for~="yoru"],
[data-late][data-time="yoru"] .hero-line [data-for~="late"] {
  display: inline;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.time-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--chip);
}

.time-switch button {
  appearance: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  font: 700 15px var(--round);
  cursor: pointer;
}

.time-switch button[aria-pressed="true"] {
  background: var(--lamp-400);
  color: #3a2318;
}

/* 夕: dusk. Violet sky with the last of the sun along the bottom. */
[data-time="yu"] {
  --bg: #2a2558;
  --bg-deep: #1c1940;
  --surface: #372f6e;
  --shoji: #3a3266;
  --stars: 0.45;
  --sky:
    radial-gradient(ellipse 95% 42% at 50% 92%, rgba(255, 150, 100, 0.55), rgba(255, 120, 130, 0.18) 55%, transparent 78%),
    linear-gradient(180deg, #2c2966 0%, #4a3c80 45%, #8e5a8e 78%, #2a2558 100%);
  --town-bldg: #1a1738;
  --town-win: #3a3470;
}

/* 朝 and 昼: light pages, dark ink, the sun instead of the moon, no lit windows. */
[data-time="asa"],
[data-time="hiru"] {
  --surface: #ffffff;
  --text: #2b2340;
  --text-dim: #5e5a7a;
  --accent: #c8601a;
  --accent-glow: none;
  --line: rgba(43, 35, 64, 0.13);
  --line-soft: rgba(43, 35, 64, 0.06);
  --chip: rgba(43, 35, 64, 0.06);
  --ghost-border: rgba(43, 35, 64, 0.3);
  --stars: 0;
  --town-bldg: #c9d3ee;
  --town-win: #e8eefb;
  --town-win-on: #e8eefb;
  --shoji: #efe6d4;
  color-scheme: light;
}

[data-time="asa"] {
  --bg: #f6f5fd;
  --bg-deep: #e8e8f6;
  --sky:
    radial-gradient(ellipse 45% 38% at 84% 20%, rgba(255, 214, 150, 0.6), transparent 70%),
    linear-gradient(180deg, #ffd3c8 0%, #fde3d6 32%, #e4e8ff 74%, #f6f5fd 100%);
}

[data-time="hiru"] {
  --bg: #f3f8ff;
  --bg-deep: #e2ecfa;
  --sky:
    radial-gradient(circle at 86% 15%, rgba(255, 240, 180, 0.8), transparent 26%),
    linear-gradient(180deg, #8fc8ff 0%, #bfe0ff 42%, #e6f2ff 78%, #f3f8ff 100%);
}

[data-time="asa"] .on-dark,
[data-time="hiru"] .on-dark {
  display: none;
}

[data-time="asa"] .on-light,
[data-time="hiru"] .on-light {
  display: block;
}

[data-time="asa"] .moon,
[data-time="hiru"] .moon {
  background: #ffd25e;
  box-shadow: 0 0 0 7px rgba(255, 210, 94, 0.25), 0 0 46px 6px rgba(255, 200, 80, 0.55);
  transform: none;
}

[data-time="asa"] .btn-lamp,
[data-time="hiru"] .btn-lamp {
  box-shadow: 0 6px 18px rgba(230, 140, 40, 0.28);
}

[data-time="asa"] .hero-lantern,
[data-time="hiru"] .hero-lantern {
  filter: drop-shadow(0 4px 10px rgba(180, 100, 30, 0.25));
}

[data-time="asa"] .window.lit,
[data-time="hiru"] .window.lit {
  box-shadow: 0 10px 30px rgba(60, 50, 110, 0.18);
}

/* ---- 404 ---------------------------------------------------------------------- */

.lost {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-height: 100svh;
  align-content: center;
  padding: 32px var(--gutter);
  text-align: center;
}

.lost-lantern {
  width: 120px;
  filter: grayscale(0.6) brightness(0.8);
}

.lost h1 {
  font-weight: 900;
  font-size: clamp(22px, 5vw, 30px);
}

.lost p {
  color: var(--text-dim);
}

/* ---- 晩ごはんタイプ診断 (site/shindan, built by site-tools/shindan.py) ------------------------- */

/* The sky stays behind as the page scrolls; a fixed layer, since iOS ignores background-attachment: fixed. */
.shindan-page {
  background: var(--bg);
}

.shindan-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 55%, var(--bg) 100%), var(--sky);
}

/* The top page's section spacing (main > section) isn't for these pages. */
.shindan > section {
  padding: 0;
}

.shindan > section > * {
  max-width: none;
  margin-inline: 0;
}

.shindan > .shindan-match {
  padding: 22px;
}

.shindan > .shindan-next {
  padding: 26px 22px;
}

.shindan > .shindan-next > * {
  margin-inline: auto;
}

.shindan-head {
  max-width: 640px;
  margin: 0 auto;
}

.shindan {
  display: grid;
  gap: 22px;
  max-width: 560px;
  min-height: 70svh;
  margin: 0 auto;
  padding: 12px var(--gutter) 64px;
}

.shindan-intro,
.shindan-wait {
  align-self: center;
  text-align: center;
}

.shindan-kicker {
  color: var(--accent);
  font-weight: 700;
}

.shindan-title {
  margin-top: 6px;
  font-weight: 900;
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.25;
}

.shindan-lead {
  margin: 14px auto 28px;
  max-width: 26em;
  color: var(--text-dim);
}

.shindan-q {
  display: grid;
  gap: 14px;
  align-content: start;
  padding-top: 24px;
}

.shindan-count {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.shindan-question {
  font-weight: 900;
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.4;
  outline: none;
}

.shindan-answers {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.shindan-answer {
  appearance: none;
  width: 100%;
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  font: 700 17px var(--round);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.shindan-answer:hover {
  border-color: var(--accent);
}

.shindan-answer:active {
  transform: scale(0.98);
}

.shindan-back,
.shindan-again {
  justify-self: center;
  border: 0;
  background: none;
  color: var(--text-dim);
  font: 500 14px var(--round);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.shindan-card {
  padding: 30px 26px;
  border-radius: 28px;
  background: var(--type, var(--lamp-300));
  color: var(--ink);
}

.shindan-yours {
  font-weight: 700;
  opacity: 0.75;
}

.shindan-type {
  margin-top: 4px;
  font-weight: 900;
  font-size: clamp(36px, 10vw, 54px);
  line-height: 1.2;
}

.shindan-desc {
  margin-top: 14px;
}

.shindan-tonight {
  display: grid;
  gap: 2px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}

.shindan-tonight span {
  font-size: 12px;
  opacity: 0.7;
}

.shindan-match {
  padding: 22px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.shindan-match h2 {
  font-weight: 900;
  font-size: 18px;
}

.shindan-match-body {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
}

.shindan-match-pic {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #ffe3a6, #f3a352);
}

.shindan-match-pic img {
  position: absolute;
  left: 50%;
  top: 6%;
  width: 150%;
  max-width: none;
  transform: translateX(-50%);
}

.shindan-match-pic.is-soon {
  background: radial-gradient(ellipse at 50% 30%, #5b62b4, #2a2f6c);
}

.shindan-match-pic.is-soon img {
  width: 108%;
  top: 8%;
}

.shindan-match-pic .hanko-small {
  right: 6px;
  bottom: 6px;
  width: 58px;
  height: 58px;
  font-size: 13px;
}

.shindan-match-name {
  font-weight: 900;
  font-size: 28px;
}

.shindan-match .bubble {
  font-size: 16px;
}

.shindan-share {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.shindan-share .btn {
  min-height: 46px;
  padding: 10px 20px;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--round);
}

button.btn-ghost {
  background: transparent;
}

.shindan-next {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 26px 22px;
  border-radius: 28px;
  background: var(--surface);
  text-align: center;
}

.shindan-next-title {
  font-weight: 900;
  font-size: 22px;
}

.shindan-next-lead {
  color: var(--text-dim);
  font-size: 14px;
}

/* The way in from the top page. */
.shindan-banner {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.shindan-banner .section-lead {
  margin-inline: auto;
}
