:root {
  --teal: #2E7D7B;
  --coral: #E07856;
  --off-white: #FBF6EE;
  --surface-white: #FFFDF8;
  --ink: #143D45;
  --body-text: #3D4B4F;
  --muted-gray: #8C8C8C;
  --divider: #E8DED3;
  --soft-mint: #D7ECE8;
  --soft-peach: #F8DCCB;
  --soft-yellow: #F8E8AC;
  --teal-ink: #073D45;
  --muted: #727A7D;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--off-white);
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  color: var(--body-text);
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--coral); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.page-wrap { max-width: 1440px; margin: 0 auto; overflow: hidden; }

.btn {
  display: inline-block;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-cta { background: var(--coral); color: #FFFFFF; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .6; }
  50% { transform: scale(1.15); opacity: 0; }
}

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; row-gap: 12px;
  border-bottom: 1px solid var(--divider);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { display: block; width: 40px; height: 40px; border-radius: 9px; }
.logo-word { font-weight: 900; color: var(--teal); }

/* ---------- hero ---------- */
.hero {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.hero-copy h1 { font-weight: 900; color: var(--ink); line-height: 1.2; margin: 0 0 24px 0; }
.hero-copy p { font-weight: 500; color: var(--body-text); line-height: 1.6; margin: 0; }

.cta-row { display: flex; flex-wrap: wrap; }
.cta-row input[type="email"] {
  font-family: inherit; font-weight: 500; color: var(--ink);
  background: var(--surface-white); border: 1px solid var(--divider);
  border-radius: 999px; outline: none;
}
.cta-row input[type="email"]::placeholder { color: var(--muted-gray); }
.cta-row input[type="email"]:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(46,125,123,0.12); }

/* ---------- phone mockup ---------- */
.phone-mockup { position: relative; }
.phone-frame { background: #111111; box-shadow: 0 30px 60px -20px rgba(20,61,69,0.35); }
.phone-screen { background: var(--surface-white); overflow: hidden; position: relative; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: #111111; z-index: 2; }
.status-bar { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--ink); }
.status-icons { display: flex; gap: 4px; align-items: center; }
.screen-title-row { display: flex; justify-content: space-between; align-items: center; }
.screen-title { font-weight: 700; color: var(--ink); }

.habit-card { background: #FFFFFF; border: 1px solid var(--divider); }
.habit-card-head { display: flex; align-items: center; }
.habit-card-icon { border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-mint { background: var(--soft-mint); }
.icon-peach { background: var(--soft-peach); }
.icon-yellow { background: var(--soft-yellow); }
.habit-card-title { font-weight: 700; color: var(--ink); }
.habit-card-stat { display: flex; justify-content: space-between; color: var(--muted-gray); }
.stat-value { color: var(--ink); font-weight: 700; }
.progress-track { background: var(--divider); border-radius: 999px; overflow: hidden; }
.progress-fill { background: var(--teal); height: 100%; }
.habit-card-week { color: var(--muted-gray); }

.main-action-row { display: flex; justify-content: center; }
.main-action { position: relative; display: flex; align-items: center; justify-content: center; }
.main-action-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--coral); opacity: .25;
  animation: pulse 2.2s ease-out infinite;
  display: none;
}
.main-action-button {
  position: relative; border-radius: 50%; background: var(--coral);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(224,120,86,0.6);
  color: #FFFFFF; font-weight: 700;
}

.tab-bar { display: flex; justify-content: space-around; border-top: 1px solid var(--divider); }
.tab-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted-gray); }
.tab-item span { color: var(--muted-gray); }
.tab-active span { color: var(--teal); font-weight: 700; }

/* ---------- dividers ---------- */
.divider { border: none; border-top: 1px solid var(--divider); }

/* ---------- habit categories ---------- */
.habit-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.habit-item { display: flex; flex-direction: column; align-items: center; }
.habit-icon { border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.habit-label { font-weight: 700; color: var(--ink); text-align: center; line-height: 1.4; }

/* ---------- 3 steps ---------- */
.steps h2 { text-align: center; font-weight: 700; color: var(--ink); }
.step-grid { display: grid; }
.step-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.step-icon-box {
  position: relative; background: var(--surface-white); border: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-badge {
  position: absolute; border-radius: 50%; background: var(--teal); color: #FFFFFF;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step-mini-action {
  position: relative; border-radius: 50%; background: var(--coral);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 16px -6px rgba(224,120,86,0.6);
  color: #FFFFFF; font-weight: 700;
}
.step-title { font-weight: 700; color: var(--ink); }
.step-desc { font-weight: 500; color: var(--body-text); line-height: 1.6; }

/* ---------- closing cta ---------- */
.closing-cta {
  background: var(--teal);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative; overflow: hidden;
}
.closing-deco { position: absolute; right: -40px; bottom: -60px; opacity: 0.15; }
.closing-cta h2 { font-weight: 700; color: #FFFFFF; margin: 0; }
.closing-caption { font-weight: 500; color: rgba(255,255,255,0.8); margin: 0; }

/* ---------- footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: center;
  color: var(--muted-gray); font-weight: 500;
}
.site-footer a { color: var(--muted-gray); }
.site-footer a:hover { color: var(--coral); }

/* =====================================================================
   Desktop (>=768px) — sizes from TodoMaru LP.dc.html
   ===================================================================== */
@media (min-width: 768px) {
  .site-header { padding: 24px 64px; }
  .logo-word { font-size: 24px; }
  .site-header .btn-cta { font-size: 15px; padding: 12px 24px; }

  .hero { gap: 40px; padding: 80px 64px 40px 64px; }
  .hero-copy { max-width: 520px; min-width: 320px; }
  .hero-copy h1 { font-size: 64px; }
  .hero-copy p { font-size: 18px; }

  .phone-mockup { width: 340px; min-width: 300px; }
  .phone-frame { border-radius: 44px; padding: 14px; }
  .phone-screen { border-radius: 32px; }
  .phone-notch { width: 120px; height: 22px; border-radius: 0 0 16px 16px; }
  .status-bar { padding: 18px 24px 6px 24px; font-size: 14px; }
  .screen-title-row { padding: 8px 24px 16px 24px; }
  .screen-title { font-size: 17px; }
  .settings-icon { display: block; }

  .habit-card { margin: 0 20px 14px 20px; border-radius: 16px; padding: 16px; }
  .habit-card:last-of-type { margin-bottom: 20px; }
  .habit-card-head { gap: 12px; margin-bottom: 12px; }
  .habit-card-icon { width: 44px; height: 44px; }
  .habit-card-title { font-size: 15px; }
  .habit-card-stat { font-size: 12px; margin-bottom: 6px; }
  .progress-track { height: 6px; margin-bottom: 10px; }
  .habit-card-week { font-size: 12px; }

  .main-action-row { padding: 6px 0 24px 0; }
  .main-action { width: 100px; height: 100px; }
  .main-action-pulse { display: block; }
  .main-action-button { width: 88px; height: 88px; font-size: 16px; }

  .tab-bar { padding: 14px 0 18px 0; }

  .hero-cta { width: 340px; min-width: 300px; justify-content: center; gap: 12px; }
  .hero-cta input[type="email"] { width: 200px; min-width: 200px; padding: 18px 20px; font-size: 16px; }
  .hero-cta .btn-cta { font-size: 18px; padding: 18px 32px; }

  .divider { margin: 0 64px; }

  .habits { padding: 64px; }
  .habit-grid { gap: 0; }
  .habit-item { gap: 16px; padding: 0 20px; }
  .habit-icon { width: 104px; height: 104px; }
  .habit-label { font-size: 16px; }

  .steps { padding: 80px 64px; }
  .steps h2 { font-size: 32px; margin: 0 0 56px 0; }
  .step-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .step-card { gap: 20px; padding: 0 16px; }
  .step-icon-box { width: 132px; height: 132px; border-radius: 20px; }
  .step-badge { top: -16px; left: -16px; width: 36px; height: 36px; font-size: 16px; }
  .step-mini-action { width: 60px; height: 60px; font-size: 11px; }
  .step-title { font-size: 18px; margin-bottom: 8px; }
  .step-desc { font-size: 15px; max-width: 220px; }

  .closing-cta { padding: 72px 64px; gap: 24px; }
  .closing-cta h2 { font-size: 36px; }
  .closing-cta .cta-row { max-width: 520px; width: 100%; gap: 12px; justify-content: center; }
  .closing-cta input[type="email"] { flex: 1; min-width: 220px; padding: 18px 24px; font-size: 16px; border: none; }
  .closing-cta .btn-cta { font-size: 18px; padding: 18px 32px; }
  .closing-caption { font-size: 15px; }

  .site-footer { gap: 32px; padding: 32px 64px; font-size: 13px; }
}

/* =====================================================================
   Mobile (<768px) — sizes from TodoMaru LP-print.dc.html
   ===================================================================== */
@media (max-width: 767.98px) {
  .site-header { padding: 16px 20px 16px 20px; }
  .logo-mark { width: 36px; height: 36px; border-radius: 8px; }
  .logo-word { font-size: 22px; }
  .site-header .btn-cta { font-size: 14px; padding: 10px 20px; white-space: normal; text-align: center; }

  .hero { flex-direction: column; align-items: stretch; gap: 0; padding: 32px 20px 32px 20px; }
  .hero-copy { max-width: none; margin-bottom: 28px; }
  .hero-copy h1 { font-size: 42px; margin-bottom: 16px; }
  .hero-copy p { font-size: 16px; }
  .br-desktop { display: none; }

  .phone-mockup { width: 280px; margin: 0 auto 32px auto; }
  .phone-frame { border-radius: 36px; padding: 12px; }
  .phone-screen { border-radius: 26px; }
  .phone-notch { width: 100px; height: 18px; border-radius: 0 0 14px 14px; }
  .status-bar { padding: 16px 20px 4px 20px; font-size: 12px; }
  .screen-title-row { padding: 6px 20px 12px 20px; justify-content: flex-start; }
  .screen-title { font-size: 15px; }
  .settings-icon { display: none; }

  .habit-card { margin: 0 16px 12px 16px; border-radius: 14px; padding: 14px; }
  .habit-card:last-of-type { margin-bottom: 16px; }
  .habit-card-head { gap: 10px; margin-bottom: 10px; }
  .habit-card-icon { width: 36px; height: 36px; }
  .habit-card-title { font-size: 13px; }
  .habit-card-stat { font-size: 11px; margin-bottom: 6px; }
  .progress-track { height: 5px; margin-bottom: 8px; }
  .habit-card-week { font-size: 11px; }

  .main-action-row { padding: 4px 0 20px 0; }
  .main-action { width: 76px; height: 76px; }
  .main-action-pulse { display: none; }
  .main-action-button { width: 76px; height: 76px; font-size: 14px; }

  .tab-bar { padding: 10px 0 14px 0; }
  .tab-item svg { width: 18px; height: 18px; }
  .tab-item span { font-size: 10px; }

  .hero-cta { gap: 12px; margin-top: 4px; }
  .hero-cta input[type="email"] { width: 200px; min-width: 200px; padding: 14px 18px; font-size: 15px; }
  .hero-cta .btn-cta { font-size: 16px; padding: 14px 28px; }

  .divider { margin: 0 20px 32px 20px; }
  .divider:last-of-type { margin-bottom: 0; }

  .habits { padding: 0 20px 32px 20px; }
  .habit-grid { gap: 16px; }
  .habit-item { gap: 10px; }
  .habit-icon { width: 72px; height: 72px; }
  .habit-icon svg { width: 32px; height: 32px; }
  .habit-label { font-size: 13px; }

  .steps { padding: 0 20px 32px 20px; }
  .steps h2 { font-size: 26px; margin: 0 0 28px 0; }
  .step-grid { grid-template-columns: 1fr; gap: 24px; max-width: 320px; margin: 0 auto; }
  .step-card { gap: 14px; }
  .step-icon-box { width: 96px; height: 96px; border-radius: 16px; }
  .step-badge { top: -12px; left: -12px; width: 28px; height: 28px; font-size: 13px; }
  .step-mini-action { width: 46px; height: 46px; font-size: 9px; }
  .step-title { font-size: 15px; margin-bottom: 6px; }
  .step-desc { font-size: 13px; max-width: none; }

  .closing-cta { padding: 36px 20px; gap: 16px; margin: 0 20px 24px 20px; border-radius: 16px; }
  .closing-cta h2 { font-size: 24px; }
  .closing-deco { display: none; }
  .closing-cta .cta-row { gap: 10px; justify-content: center; max-width: 420px; width: 100%; }
  .closing-cta input[type="email"] { flex: 1; min-width: 160px; padding: 12px 18px; font-size: 14px; border: none; }
  .closing-cta .btn-cta { font-size: 15px; padding: 12px 24px; }
  .closing-caption { font-size: 13px; }

  .site-footer { gap: 20px; padding: 24px 20px; font-size: 12px; }
}

/* Narrow phones only (not print): 4 columns get too tight for labels
   like "深夜のスマホ" to fit without an awkward mid-word wrap. */
@media screen and (max-width: 480px) {
  .habit-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
}

/* ---------- toast (form submission feedback) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10;
  width: min(520px, calc(100% - 28px));
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--teal-ink);
  color: #fff;
  box-shadow: 0 18px 50px rgba(7, 61, 69, 0.22);
  transform: translateX(-50%);
  text-align: center;
  font-weight: 800;
}
.toast[hidden] { display: none; }

/* =====================================================================
   Legal pages (privacy / terms)
   ===================================================================== */
.lp-card {
  width: min(980px, calc(100% - 28px));
  margin: 24px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 50px rgba(7, 61, 69, 0.12);
  overflow: hidden;
}

.lp-card .footer {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 10px 20px 30px;
  color: #777;
  font-size: 0.85rem;
  font-weight: 700;
}
.lp-card .footer a { color: #777; }
.lp-card .footer a:hover { color: var(--coral); }

.legal { padding: 40px 42px 48px; color: var(--body-text); }
.legal .back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--teal);
  font-weight: 800;
  font-size: 0.9rem;
}
.legal h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 4vw, 2rem); color: var(--ink); }
.legal .updated { color: var(--muted); font-size: 0.85rem; margin: 0 0 28px; }
.legal h2 { color: var(--teal); font-size: 1.15rem; margin: 32px 0 10px; }
.legal p, .legal li { line-height: 1.9; margin: 0 0 12px; }
.legal a { color: var(--teal); text-decoration: underline; }

@media (max-width: 760px) {
  .lp-card { width: 100%; margin: 0; border-radius: 0; }
  .legal { padding: 24px 20px 36px; }
}

/* =====================================================================
   Print — mirrors TodoMaru LP-print.dc.html for "Save as PDF"
   ===================================================================== */
@media print {
  @page { size: letter portrait; margin: 0.5in; }

  html, body { background: none; }
  .toast { display: none !important; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }

  .site-header, .hero, .habits, .steps, .closing-cta { padding-left: 0; padding-right: 0; }
  .divider { margin-left: 0; margin-right: 0; }
  .closing-cta { margin-left: 0; margin-right: 0; }

  .site-header, .hero, .habit-grid, .step-card, .closing-cta {
    break-inside: avoid;
  }
}
