:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --text: #17211c;
  --muted: #65746c;
  --line: #dce5df;
  --accent: #06c755;
  --accent-dark: #049c42;
  --danger: #d9382f;
  --shadow: 0 24px 60px rgba(22, 40, 32, .14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(6, 199, 85, .18), transparent 34rem),
    linear-gradient(135deg, #f8fbf7 0%, var(--bg) 48%, #eef5f1 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  min-width: 0;
  font: inherit;
}

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

.hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 2px 24px;
}

.hero > div {
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #12b886);
  box-shadow: 0 16px 28px rgba(6, 199, 85, .26);
  font-size: 1.6rem;
  font-weight: 800;
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 9vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.panel {
  width: 100%;
  padding: 22px;
  border: 1px solid rgba(220, 229, 223, .86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.field,
.dynamic-fields {
  display: grid;
  gap: 14px;
}

.field + .field,
.field + .dynamic-fields,
.dynamic-fields + .switch-row {
  margin-top: 14px;
}

label,
.switch-row span {
  color: #2e4037;
  font-size: .92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #fbfdfb;
  outline: none;
  padding: 12px 13px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea {
  min-height: 136px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(6, 199, 85, .14);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
}

.switch-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.feedback {
  min-height: 22px;
  margin-top: 16px;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.45;
}

.feedback.error {
  color: var(--danger);
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .98rem;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

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

.button:disabled {
  cursor: wait;
  opacity: .68;
}

.primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(6, 199, 85, .24);
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  color: var(--danger);
  background: #fff2f1;
}

@media (min-width: 560px) {
  .app-shell {
    padding-top: 46px;
  }

  .panel {
    padding: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
