:root {
  color-scheme: light;
  --bg: #f7f7f3;
  --surface: #ffffff;
  --text: #20231f;
  --muted: #6e746b;
  --line: #e5e7e1;
  --accent: #2f6b4f;
  --accent-strong: #24563f;
  --soft: #eaf3ee;
  --radius: 20px;
  --shadow: 0 12px 34px rgba(32, 35, 31, 0.08);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
}
button, input, textarea { font: inherit; }
a { color: inherit; }

.shell {
  width: min(100%, 520px);
  margin: 0 auto;
  min-height: 100vh;
  padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 18px;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 19px;
  text-decoration: none;
}
.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.hero, .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero { padding: 28px 22px; }
.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .05em;
}
h1 {
  margin: 0;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.025em;
}
.lead {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}

.primary-button, .secondary-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 0;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.primary-button {
  margin-top: 22px;
  color: white;
  background: var(--accent);
}
.primary-button:active { background: var(--accent-strong); }
.secondary-button {
  margin-top: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
button[disabled] { opacity: .48; cursor: not-allowed; }

.section-title {
  margin: 28px 2px 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}
.card { padding: 18px; }
.notice-title { margin: 0; font-size: 19px; }
.notice-meta {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.small-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
}
.form-card h1 { font-size: 28px; }
.field { margin-top: 20px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  font-size: 14px;
}
.required { color: #9b3a31; font-size: 11px; margin-left: 5px; }
input, textarea {
  width: 100%;
  border: 1px solid #d9ddd6;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 13px 14px;
  min-height: 48px;
  outline: none;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 79, .10);
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}
details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
}

.preview-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.preview-cover {
  display: grid;
  place-items: center;
  min-height: 130px;
  background: linear-gradient(135deg, #e8f2ec, #f6efe4);
  font-size: 44px;
}
.preview-body { padding: 22px 20px; }
.preview-body h1 { font-size: 29px; }
.meta-block {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  color: #4f574f;
  font-size: 15px;
}
.message {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  line-height: 1.75;
  white-space: pre-wrap;
}
.status {
  min-height: 20px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.footer-note {
  margin: 28px 4px 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

@media (min-width: 600px) {
  .shell { padding-top: 34px; }
}
