:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --bg-accent: #d9ece6;
  --card: rgba(255, 255, 255, 0.84);
  --card-strong: #ffffff;
  --text: #16302c;
  --muted: #5e6f6b;
  --border: rgba(22, 48, 44, 0.12);
  --accent: #176b5f;
  --accent-strong: #114f47;
  --shadow: 0 30px 70px rgba(22, 48, 44, 0.12);
  --danger-bg: #fdecec;
  --danger-text: #9b1c1c;
  --success-bg: #eaf6ef;
  --success-text: #146c43;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(23, 107, 95, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(217, 236, 230, 0.9), transparent 34%),
    linear-gradient(180deg, #f8f5ef 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

.page {
  display: grid;
  place-items: center;
  padding: 32px;
}

.card {
  width: min(980px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.card-center {
  padding: clamp(28px, 6vw, 64px);
  text-align: center;
}

.shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: min(860px, calc(100vh - 64px));
}

.shell-copy {
  padding: clamp(28px, 5vw, 68px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  background:
    linear-gradient(160deg, rgba(23, 107, 95, 0.1), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.54));
}

.shell-form {
  padding: clamp(28px, 5vw, 68px);
  background: rgba(255, 255, 255, 0.74);
  border-left: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.hero {
  max-width: 44rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(23, 107, 95, 0.1);
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
}

.feature strong,
.stat strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.04rem;
}

.feature span,
.stat span {
  color: var(--muted);
  line-height: 1.65;
}

.panel {
  width: min(420px, 100%);
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 18px 40px rgba(22, 48, 44, 0.08);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 1.7rem;
}

.panel .lead {
  margin-bottom: 22px;
}

.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus {
  border-color: rgba(23, 107, 95, 0.4);
  box-shadow: 0 0 0 4px rgba(23, 107, 95, 0.12);
}

.button-row {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 14px 26px rgba(23, 107, 95, 0.22);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--border);
  color: var(--text);
}

.status {
  min-height: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.status.error {
  color: var(--danger-text);
  background: var(--danger-bg);
  border-radius: 14px;
  padding: 12px 14px;
}

.status.success {
  color: var(--success-text);
  background: var(--success-bg);
  border-radius: 14px;
  padding: 12px 14px;
}

.fortune-result {
  white-space: pre-wrap;
  margin-top: 14px;
}

.fortune-box {
  margin: 0 24px;
  padding: 24px;
}

.fortune-box h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.toppage-layout {
  display: grid;
  gap: 28px;
}

.welcome-box {
  padding: clamp(30px, 5vw, 56px);
  background:
    linear-gradient(145deg, rgba(23, 107, 95, 0.1), rgba(255, 255, 255, 0.64)),
    #fff;
  border-bottom: 1px solid var(--border);
}

.welcome-box h1 {
  margin-bottom: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}

.stat {
  padding: 22px;
  background: rgba(255, 255, 255, 0.8);
}

.page-redirect h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.page-redirect .lead {
  max-width: 42rem;
  margin: 0 auto;
}

.toppage-layout .panel {
  margin: 0 24px;
}

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

  .shell-form {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .feature-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 16px;
  }

  .card {
    border-radius: 24px;
  }

  .shell-copy,
  .shell-form,
  .card-center {
    padding: 22px;
  }

  h1 {
    letter-spacing: -0.04em;
  }
}