:root {
  --cream: #F7F1E4;
  --paper: #FFFDF7;
  --ink: #3B2A20;
  --taupe: #8A7864;
  --accent: #BD4238;
  --accent-soft: #E7B36A;
  --border: #E8DCC3;
  --focus: #1E6E62;

  --font-display: "Shippori Mincho", serif;
  --font-body: "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 108px; /* space for fixed agree bar */
}

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

/* ---------- Header ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

/* Scalloped divider — evokes a crimped candy-wrapper edge */
.scallop {
  height: 14px;
  background: radial-gradient(
      circle at 12px -2px,
      var(--cream) 10px,
      var(--paper) 11px
    )
    0 0 / 24px 14px repeat-x;
}

/* ---------- Page / lead ---------- */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.lead {
  padding: 40px 0 8px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent-soft);
  text-transform: uppercase;
}

.lead h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 34px);
  margin: 0 0 20px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.lead-text {
  max-width: 560px;
  margin: 0 auto;
  color: var(--taupe);
  font-size: 14.5px;
  line-height: 1.9;
  text-align: left;
}

/* ---------- Document card ---------- */

.doc-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 8px 32px 6px;
  margin-top: 28px;
  box-shadow: 0 18px 40px -28px rgba(59, 42, 32, 0.35);
}

.clause {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.clause:last-of-type {
  border-bottom: none;
}

.clause h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
}

.clause h2 .num {
  flex: none;
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.clause p {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--ink);
}

.clause p:last-child {
  margin-bottom: 0;
}

.clause ol {
  margin: 0 0 12px;
  padding-left: 1.4em;
  font-size: 15px;
}

.clause ol:last-child {
  margin-bottom: 0;
}

.clause li {
  margin-bottom: 10px;
  padding-left: 2px;
}

.clause li:last-child {
  margin-bottom: 0;
}

.clause .steps {
  list-style: decimal;
}

.clause .rules {
  list-style: decimal;
  color: #000000;
}

.enacted {
  padding: 26px 0 20px;
  text-align: right;
  font-size: 13.5px;
  color: var(--taupe);
  line-height: 1.7;
}

.scroll-hint {
  text-align: center;
  color: var(--taupe);
  font-size: 13.5px;
  margin: 28px 0 0;
}

/* ---------- Agree bar ---------- */

.agree-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--paper);
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 30px -20px rgba(59, 42, 32, 0.3);
  z-index: 10;
}

.agree-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.agree-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.agree-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.agree-check .box {
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--cream);
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.agree-check .box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transform: rotate(40deg);
  opacity: 0;
  transition: opacity 0.1s ease;
}

.agree-check input:checked + .box {
  background: var(--focus);
  border-color: var(--focus);
}

.agree-check input:checked + .box::after {
  opacity: 1;
}

.agree-check input:focus-visible + .box {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.agree-label {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.4;
}

.agree-btn {
  flex: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--paper);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 13px 30px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 22px -12px rgba(189, 66, 56, 0.6);
}

.agree-btn:not(:disabled):hover {
  background: #A6392F;
  transform: translateY(-1px);
}

.agree-btn:disabled {
  background: var(--border);
  color: var(--taupe);
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  body {
    font-size: 15px;
    padding-bottom: 140px;
  }

  .doc-card {
    padding: 4px 20px 4px;
    border-radius: 14px;
  }

  .agree-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 20px 18px;
  }

  .agree-btn {
    width: 100%;
    text-align: center;
  }

  .lead {
    padding: 28px 0 4px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .agree-btn {
    transition: none;
  }
}
