:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #6b6b68;
  --line: #e4e2dc;
  --accent: #b5854b;
  --accent-ink: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --surface: #1e1c17;
    --ink: #f2f0ea;
    --ink-soft: #a8a49a;
    --line: #333029;
    --accent: #d3a25f;
    --accent-ink: #14130f;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  padding: 56px 0 40px;
  text-align: center;
}

.eyebrow {
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 10px;
}

.site-header h1 {
  font-size: clamp(24px, 4vw, 32px);
  margin: 0 0 14px;
  font-weight: 700;
}

.lead {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0;
}

main.wrap {
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.card h2 {
  font-size: 17px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-no {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 3px 9px;
  border-radius: 999px;
}

.hint {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0 0 20px;
}

.note {
  color: var(--ink-soft);
  font-size: 12.5px;
  margin: 14px 0 0;
}

/* fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.field-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
label {
  font-size: 13px;
  font-weight: 600;
}
.field-sub {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 400;
}
input[type="text"],
input[type="number"],
select,
textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  font-family: inherit;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input[type="number"] {
  max-width: 140px;
}
input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.radio-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color .15s, background .15s;
}
.radio-pill input { display: none; }
.radio-pill:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-weight: 700;
}

/* cut rows */
.cut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cut-row:last-of-type { border-bottom: none; }
.cut-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cut-info span {
  font-size: 12.5px;
  color: var(--ink-soft);
}
.cut-qty {
  max-width: 90px;
}

/* result */
.result-card {
  border-color: var(--accent);
}
.breakdown {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.breakdown li {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.breakdown li span:last-child {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.breakdown .empty {
  font-style: italic;
}

.totals {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.totals-row span:last-child {
  font-variant-numeric: tabular-nums;
}
.total-final {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  padding-top: 8px;
}

.disclaimer {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin: 18px 0 0;
  line-height: 1.7;
}

.btn-order {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-order:disabled {
  opacity: 0.6;
  cursor: default;
}

.order-status {
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
}
.order-status.error { color: #b3261e; }
.order-status a { color: var(--accent); font-weight: 700; }

.site-footer {
  padding: 30px 0 50px;
  text-align: center;
}
.site-footer p {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0;
}
