/* 相談フォーム apply.css (yuzuha) */
:root {
  --ink: #2a2622;
  --muted: #6d655b;
  --accent: #5A7D5A;
  --accent-sub: #c99d52;
  --gold: #c99d52;
  --washi: #f3ecdc;
  --ok: #2f7d4a;
  --ng: #b3261e;
  --sheet: #fbf8f2;
  --field: #ffffff;
  --border: #d8cfbf;
  --radius-card: 8px;
  --radius-btn: 10px;
  --font-heading: serif;
  --font-body: sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-text-size-adjust: 100%;
}
.app {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  background: var(--sheet);
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--border);
}
.topttl {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  font-family: var(--font-heading);
}
.topsub {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.topbar.banner {
  background: var(--accent);
  color: #ffffff;
  border-bottom: 0;
}
.topbar.banner .topttl {
  color: #ffffff;
}
.topbar.banner .topsub {
  color: var(--accent-sub);
}
.topbar.line {
  background: #ffffff;
  border-bottom: 2px solid var(--accent);
}
.topbar.line .topttl {
  color: var(--accent);
}
.topbar.clean {
  background: transparent;
  border-bottom: 1px dashed var(--border);
  padding-top: calc(16px + env(safe-area-inset-top));
}
.topbar.clean .topttl {
  color: var(--accent);
  font-size: 15px;
}

.prog {
  height: 4px;
  background: var(--border);
  flex: none;
  position: relative;
}
.prog i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .25s;
}

.prog.dots {
  height: auto;
  background: transparent;
  padding: 8px 16px 4px;
}
.prog.dots i { display: none; }
.prog-dots {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  max-width: 320px;
  margin: 0 auto;
}
.prog-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  background: #eedfe6;
  color: var(--muted);
  transition: all .2s;
}
.prog-dot.passed {
  background: var(--accent);
  color: #ffffff;
}
.prog-dot.active {
  background: var(--accent-sub);
  color: #ffffff;
  box-shadow: 0 0 0 2px var(--accent);
}

.prog.badge {
  height: 6px;
  border-radius: 3px;
  margin: 4px 16px 0;
  overflow: hidden;
  background: #e0eae2;
}
.prog.badge i {
  border-radius: 3px;
}
.step-badge {
  background: var(--washi);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 8px;
  font-weight: 700;
  font-size: 11px;
}

.stage {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px 12px;
  -webkit-overflow-scrolling: touch;
}
.boot {
  padding: 40px 0;
  text-align: center;
}
.bootmsg {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-line;
  margin: 0;
}

.stepno {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--gold);
  margin: 0 0 6px;
  font-weight: 700;
}
h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.5;
  margin: 0 0 10px;
  text-wrap: balance;
  color: var(--ink);
}
.voice {
  white-space: pre-line;
  font-family: var(--font-heading);
  font-size: 14px;
  line-height: 1.95;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--washi);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.7;
}
label {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  margin: 12px 0 4px;
}

input[type=text], textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--field);
  color: var(--ink);
  border-radius: var(--radius-card);
  padding: 10px;
  font-size: 16px;
  font-family: inherit;
}
input[type=text]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}
textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.8;
}

.name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.name-grid label {
  margin: 6px 0 2px;
  font-size: 12.5px;
}

.dob {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}

.radios {
  display: flex;
  gap: 18px;
  font-size: 15px;
  margin: 10px 0;
}
.radios label {
  font-weight: 500;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.cnt {
  font-size: 12.5px;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cnt.ng { color: var(--ng); }
.cnt.ok { color: var(--ok); }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 500 !important;
  margin: 14px 0 !important;
  cursor: pointer;
}
.check input {
  margin-top: 4px;
  flex: none;
  width: 18px;
  height: 18px;
}

pre.pv {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px;
  margin: 0;
  word-break: break-word;
}
.outside-notice {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--washi);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
}

.foot {
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--sheet);
  flex: none;
}
.left {
  font-size: 12px;
  color: var(--ng);
  margin: 0 0 8px;
  min-height: 1.2em;
  line-height: 1.6;
}
.left.ok { color: var(--ok); }
.navbtns {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
}

.send {
  width: 100%;
  border: 0;
  border-radius: var(--radius-btn);
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  transition: opacity .2s;
}
.send:disabled {
  background: #b9b0a4 !important;
  cursor: not-allowed;
  opacity: .7;
}
.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-pill .send:not(.ghost) {
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent) 0%, rgba(90,30,60,1) 100%);
  box-shadow: 0 2px 8px rgba(115,52,84,0.25);
}
.btn-rect .send:not(.ghost) {
  border-radius: 6px;
  border: 1px solid var(--accent);
}
.btn-rounded .send:not(.ghost) {
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(49,86,77,0.18);
}

.saved {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
}

.notice { padding: 8px 0 24px; }
.notice h2 { font-family: var(--font-heading); font-size: 20px; line-height: 1.6; margin: 0 0 12px; }
.notice p { font-size: 14px; line-height: 1.95; color: var(--ink); margin: 0 0 14px; white-space: pre-line; }
.notice .sub { color: var(--muted); font-size: 12.5px; }
.copybtn {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 10px;
}
.done { text-align: center; padding: 36px 0; }
.done h2 { font-family: var(--font-heading); font-size: 22px; margin: 0 0 14px; }
.done p { font-size: 14px; line-height: 2; color: var(--muted); }
.mockout { margin-top: 18px; text-align: left; }
.mockout h4 { font-size: 12px; letter-spacing: .1em; color: var(--gold); margin: 0 0 6px; }

@media (prefers-reduced-motion: no-preference) {
  .stage { scroll-behavior: smooth; }
}
