:root {
  --bg: #eef5f0;
  --card: #ffffff;
  --text: #17211b;
  --muted: #6d7a72;
  --border: #d7e1da;
  --accent: #4f8f68;
  --accent-dark: #2f6f4b;
  --danger: #b00020;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button, input, select, textarea {
  font: inherit;
}

.app {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  text-align: center;
  padding: 12px 0 18px;
}

.brand {
  border: 0;
  background: transparent;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  cursor: pointer;
}

.subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(20, 40, 30, 0.06);
}

h1, h2 {
  margin: 0 0 10px;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 19px;
}

.hint {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.45;
}

.field {
  display: block;
  margin: 14px 0;
}

.field span {
  display: block;
  margin-bottom: 6px;
  font-weight: 650;
}

input[type="file"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfdfb;
  padding: 12px;
  color: var(--text);
}

textarea {
  resize: vertical;
}

button {
  border: 1px solid var(--border);
  background: #f8fbf9;
  color: var(--text);
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
}

.primary {
  width: 100%;
  border: 0;
  background: var(--accent);
  color: white;
  font-weight: 750;
  margin-top: 8px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  white-space: pre-wrap;
  background: #f5faf6;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin: 10px 0 14px;
  color: var(--text);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions button {
  flex: 1;
  min-width: 160px;
}

.hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .app {
    padding: 12px;
  }

  .brand {
    font-size: 24px;
  }

  .card {
    border-radius: 18px;
    padding: 15px;
  }
}
