* { box-sizing: border-box; }

:root {
  --bg: #fff8ef;
  --card: #fff;
  --text: #222;
  --muted: #666;
  --line: #ead7bf;
  --brand: #e98b2a;
  --brand-dark: #c66f17;
  --danger: #b42318;
  --warn: #b54708;
  --ok: #067647;
  --shadow: 0 14px 35px rgba(107, 70, 31, .12);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(233, 139, 42, .18), transparent 34rem),
    linear-gradient(180deg, #fffaf3, var(--bg));
}

.site-header {
  padding: 44px 24px 28px;
  max-width: 1120px;
  margin: 0 auto;
}

.eyebrow {
  color: var(--brand-dark);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(32px, 4vw, 56px);
  margin: 0 0 12px;
  line-height: 1.05;
}

h2 { margin-top: 0; }

.lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 24px;
  align-items: start;
}

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

fieldset {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin: 0 0 18px;
}

legend {
  font-weight: 700;
  color: #3a2a19;
  padding: 0 8px;
}

label {
  display: block;
  font-weight: 700;
  margin: 0 0 14px;
}

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #d8c3aa;
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  background: #fffdfa;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(233, 139, 42, .24);
  border-color: var(--brand);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.required {
  display: inline-block;
  margin-left: 5px;
  color: #fff;
  background: var(--danger);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  vertical-align: middle;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

button {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(233, 139, 42, .25);
}

button:hover { background: var(--brand-dark); }
button:disabled { opacity: .55; cursor: wait; }

button.secondary {
  background: #fff4e4;
  color: #71420f;
  border: 1px solid #efc38e;
  box-shadow: none;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 8px;
}

.result-card {
  position: sticky;
  top: 20px;
}

.result {
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 18px;
  line-height: 1.75;
  background: #fffdfa;
}

.result.empty { color: var(--muted); }

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  margin-bottom: 12px;
}

.badge.low { background: var(--ok); }
.badge.medium { background: var(--warn); }
.badge.high { background: var(--danger); }

.status {
  padding: 14px;
  border-radius: 14px;
  background: #f5f5f5;
  color: #444;
  line-height: 1.6;
  white-space: pre-line;
}

.status.success { background: #ecfdf3; color: var(--ok); }
.status.error { background: #fff1f0; color: var(--danger); }
.status.sending { background: #fff7e6; color: var(--warn); }

.debug { margin-top: 16px; }

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #24170c;
  color: #fff4e6;
  padding: 14px;
  border-radius: 14px;
  max-height: 240px;
  overflow: auto;
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .grid2 { grid-template-columns: 1fr; }
}


.policy-layout {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.policy {
  line-height: 1.85;
}

.policy h2 {
  margin-top: 28px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.policy h2:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.policy ul {
  padding-left: 1.4em;
}

.policy-date {
  margin-top: 32px;
  color: var(--muted);
  text-align: right;
}

.privacy-note {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdfa;
  color: var(--muted);
  line-height: 1.7;
}

a {
  color: var(--brand-dark);
  font-weight: 700;
}

.button-link {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 800;
}

.secondary-link {
  background: #fff4e4;
  color: #71420f;
  border: 1px solid #efc38e;
}

.photo-list {
  margin: 8px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdfa;
  color: var(--text);
  line-height: 1.6;
}
.photo-list.empty { color: var(--muted); }
.photo-list.error { border-color: #f0aaa4; background: #fff1f0; color: var(--danger); }
.photo-list ul { margin: 8px 0 0; padding-left: 1.2em; }
.photo-list li span { color: var(--muted); font-size: 13px; }
