/* Colors follow the app (client/src/theme.ts); the hero keeps the X header's night scene. */
:root {
  --paper: #F8F7FA;
  --raised: #FFFFFF;
  --ink: #1D1A24;
  --muted: #6E6779;
  --rule: #DBD7E3;
  --band: #EEEBF3;
  --accent: #B03A62;
  --on-accent: #FFFFFF;
  --night: #17141E;
  --night-deep: #221A2C;
  --night-ink: #F8F7FA;
  --night-muted: #A79FB3;
  --moon: #D493A9;
  --letter: #FBF7F0;
  --letter-ink: #3A3340;
  --serif: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --hand: 'Klee One', 'Shippori Mincho', serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141219;
    --raised: #1F1B28;
    --ink: #ECE9F2;
    --muted: #9E97AC;
    --rule: #2F2B39;
    --band: #241F2F;
    --accent: #F2789F;
    --on-accent: #1D1A24;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

a { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

figure { margin: 0; }

br.sp { display: none; }
@media (max-width: 600px) { br.sp { display: inline; } }

/* header / footer */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--night);
  color: var(--night-ink);
}
.site-header a { color: inherit; text-decoration: none; }
.logo { display: flex; align-items: baseline; gap: 10px; }
.logo-en { font-family: var(--serif); font-weight: 700; letter-spacing: 0.3em; font-size: 17px; }
.logo-ja { font-size: 12px; letter-spacing: 0.2em; color: var(--night-muted); }
.site-header nav a { font-size: 14px; letter-spacing: 0.1em; }

.site-footer {
  margin-top: 80px;
  padding: 32px 20px 40px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.site-footer p { margin: 4px 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 16px; }
.footer-links a { color: var(--muted); }
.copyright { font-size: 12px; }

/* shared */
.button {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.eyebrow { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.24em; color: var(--accent); }
.fine { font-size: 13px; color: var(--muted); }

/* phone frame around the rendered app screens */
.phone {
  position: relative;
  width: 100%;
  max-width: 300px;
  padding: 34px 9px 9px;
  border-radius: 46px;
  background: #0E0C13;
  box-shadow: 0 30px 60px rgba(10, 8, 16, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  width: 84px;
  height: 22px;
  margin-left: -42px;
  border-radius: 999px;
  background: #000;
}
.phone img { border-radius: 0 0 38px 38px; }

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%);
  color: var(--night-ink);
  padding: 48px 24px 72px;
}
.hero .button { background: #B03A62; color: #FFFFFF; }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--night-ink); }
.moon { position: absolute; top: 24px; right: 7%; width: 64px; height: 64px; fill: var(--moon); }
.hero-inner {
  position: relative;
  display: grid;
  gap: 48px;
  justify-items: center;
  max-width: 1040px;
  margin: 0 auto;
}
.hero-copy { display: flex; flex-direction: column; align-items: center; gap: 36px; }
.slogan {
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 9vw, 56px);
  line-height: 1.7;
  letter-spacing: 0.16em;
}
.hero-text { text-align: center; }
.hero-lead { margin: 0 0 8px; font-family: var(--serif); font-size: 18px; letter-spacing: 0.04em; }
.hero-sub { margin: 0 0 20px; color: var(--night-muted); font-size: 15px; }
.hero-status { margin: 0 0 20px; color: var(--night-muted); font-size: 13px; }
.hero-phone { max-width: 260px; }
.hero-phone::after {
  content: '';
  position: absolute;
  inset: -40px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(212, 147, 169, 0.22), transparent);
}

@media (min-width: 900px) {
  .hero { padding: 72px 40px 96px; }
  .moon { top: 48px; width: 88px; height: 88px; }
  .hero-inner { grid-template-columns: 1fr auto; align-items: center; gap: 64px; }
  .hero-copy { flex-direction: row; align-items: flex-end; justify-content: center; gap: 56px; }
  .hero-text { text-align: left; max-width: 380px; padding-bottom: 8px; }
  .hero-lead { font-size: 20px; }
  .hero-phone { max-width: 300px; margin-right: 24px; }
}

/* the first week */
.week { max-width: 1040px; margin: 0 auto; padding: 88px 24px 0; }
.week-head { text-align: center; margin-bottom: 64px; }
.week-head h2, .plus h2, .posts h2, .notes h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.week-head h2 { font-size: clamp(24px, 5vw, 34px); line-height: 1.6; }

.scene {
  display: grid;
  gap: 32px;
  justify-items: center;
  margin-bottom: 96px;
}
.scene-text { max-width: 420px; }
.scene-when { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.24em; color: var(--accent); }
.scene h3 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(24px, 4.6vw, 30px);
  line-height: 1.6;
  letter-spacing: 0.08em;
}
.scene-text p { margin: 0 0 14px; }
.scene .phone { max-width: 260px; }

@media (min-width: 900px) {
  .scene { grid-template-columns: 1fr 1fr; align-items: center; gap: 72px; }
  .scene-flip .scene-visual { order: 2; }
  .scene-visual { justify-self: center; }
  .scene-text { justify-self: start; }
  .scene-flip .scene-text { justify-self: end; }
}

/* a letter on paper */
.letter-wrap { width: 100%; max-width: 360px; }
.letter {
  padding: 36px 32px 28px;
  background:
    repeating-linear-gradient(180deg, transparent 0 35px, rgba(176, 58, 98, 0.12) 35px 36px),
    var(--letter);
  background-position: 0 30px;
  color: var(--letter-ink);
  font-family: var(--hand);
  font-weight: 600;
  font-size: 17px;
  line-height: 36px;
  letter-spacing: 0.04em;
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(29, 26, 36, 0.14), 0 2px 6px rgba(29, 26, 36, 0.08);
  transform: rotate(-1.5deg);
}
.letter p { margin: 0 0 18px; }
.letter .letter-sign { margin: 0; text-align: right; }

.kyupi-wrap { position: relative; }
.kyupi { width: 200px; filter: drop-shadow(0 18px 28px rgba(29, 26, 36, 0.16)); }

.sample-note { margin: -48px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* plus */
.plus { max-width: 1040px; margin: 0 auto; padding: 96px 24px 0; }
.plus-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 32px;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--night) 0%, var(--night-deep) 100%);
  color: var(--night-ink);
  text-align: center;
}
.plus-card .eyebrow { color: var(--moon); }
.plus-card h2 { font-size: 26px; margin-bottom: 20px; }
.plus-card ul { list-style: none; margin: 0 0 20px; padding: 0; }
.plus-card li { padding: 10px 0; border-top: 1px solid rgba(248, 247, 250, 0.12); }
.plus-card li:last-child { border-bottom: 1px solid rgba(248, 247, 250, 0.12); }
.plus-card .fine { color: var(--night-muted); margin: 0; }

/* post list on the landing page */
.posts, .notes { max-width: 720px; margin: 0 auto; padding: 88px 24px 0; }
.posts h2, .notes h2 { font-size: 22px; margin-bottom: 16px; }
.notes ul { margin: 0; padding-left: 1.2em; }
.notes li { color: var(--muted); font-size: 14px; }

/* post lists */
.post-list { list-style: none; margin: 0 0 16px; padding: 0; }
.post-list li { border-top: 1px solid var(--rule); }
.post-list li:last-child { border-bottom: 1px solid var(--rule); }
.post-list a { display: block; padding: 16px 0; color: var(--ink); text-decoration: none; }
.post-title { display: block; font-weight: 500; }
.post-list time { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }

/* articles */
.article { max-width: 720px; margin: 0 auto; padding: 32px 20px 0; }
.article h1 { font-size: clamp(24px, 5.4vw, 32px); line-height: 1.5; margin: 8px 0 12px; }
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.byline { font-size: 13px; color: var(--muted); margin: 0 0 32px; }
.lead-muted { color: var(--muted); }
.draft-banner {
  margin: 0 0 16px;
  padding: 8px 12px;
  border: 1px dashed var(--accent);
  color: var(--accent);
  font-size: 13px;
}

.prose { font-size: 17px; }
.prose h2 {
  margin: 56px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rule);
  font-size: 22px;
  line-height: 1.5;
}
.prose h3 { margin: 36px 0 12px; font-size: 19px; line-height: 1.5; }
.prose p, .prose ul, .prose ol { margin: 0 0 20px; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 0 0 20px; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose pre {
  margin: 0 0 20px;
  padding: 16px;
  overflow-x: auto;
  background: var(--band);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.prose code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; }
.prose table { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
.prose th, .prose td { padding: 10px 8px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { background: var(--band); font-weight: 500; }
.table-wrap { overflow-x: auto; }
.prose .toc {
  margin: 0 0 32px;
  padding: 16px 20px;
  background: var(--band);
  border-radius: 8px;
  font-size: 15px;
}
.prose .toc::before { content: '目次'; display: block; font-weight: 700; margin-bottom: 4px; }
.prose .toc ul { margin: 0; padding-left: 1.2em; }
.prose .toc a { color: var(--ink); }
.prose .point { margin: 0 0 20px; padding: 16px 20px; border-radius: 8px; background: var(--raised); border: 1px solid var(--rule); }
.prose .point > :last-child { margin-bottom: 0; }
.prose .placeholder {
  margin: 0 0 20px;
  padding: 40px 16px;
  border: 2px dashed var(--rule);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.about-box {
  margin: 56px 0 0;
  padding: 24px;
  border-radius: 12px;
  background: var(--night);
  color: var(--night-ink);
}
.about-box .button { background: #B03A62; color: #FFFFFF; }
.about-title { margin: 0 0 8px; font-family: var(--serif); font-weight: 700; font-size: 18px; }
.about-box p { margin: 0 0 16px; }
