:root {
  --bg: #f5f1ea;
  --surface: rgba(255, 255, 255, 0.88);
  --text: #241f1a;
  --muted: #776f66;
  --accent: #2f5d50;
  --accent-dark: #21453b;
  --border: rgba(36, 31, 26, 0.12);
  --danger: #9a3838;
  --shadow: 0 18px 55px rgba(38, 31, 24, 0.09);
  font-family: Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(47, 93, 80, 0.12), transparent 36rem),
    var(--bg);
  color: var(--text);
}

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

.page-shell, .admin-shell {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  text-align: center;
  padding: 46px 16px 34px;
}

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

h1, h2, p { margin-top: 0; }

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.7rem);
  margin-bottom: 12px;
}

.subtitle {
  color: var(--muted);
  font-size: 1.08rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 34px auto 18px;
  max-width: 720px;
}

.countdown div {
  padding: 24px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.countdown strong {
  display: block;
  font-size: clamp(2rem, 6vw, 3.7rem);
  line-height: 1;
}

.countdown span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.target-label, .finished-message { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 36px);
}

.comment-form-card { margin-top: 22px; }

.section-heading { margin-bottom: 24px; }
.section-heading p { color: var(--muted); margin-bottom: 0; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label { display: block; margin-bottom: 18px; }
label span { display: block; margin-bottom: 8px; font-weight: 700; }

input, textarea, select {
  width: 100%;
  color: var(--text);
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
}

textarea { resize: vertical; min-height: 135px; }

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.12);
}

small { display: block; color: var(--muted); margin-top: 6px; }

.turnstile-wrap { min-height: 70px; margin-bottom: 16px; }

.primary-button, .secondary-button, .danger-outline, .link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  border: 0;
  font-weight: 700;
}

.primary-button {
  width: 100%;
  color: white;
  background: var(--accent);
}

.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; }

.secondary-button {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(154, 56, 56, .35);
}

.form-message { min-height: 24px; margin: 14px 0 0; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--accent); }

.comments-section { margin-top: 54px; }
.comments-list { display: grid; gap: 14px; }

.comment-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.comment-card p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  margin-bottom: 12px;
}

.comment-card time { color: var(--muted); font-size: .92rem; }

.empty-state {
  padding: 36px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
}

#load-more { margin: 20px auto 0; }

footer {
  padding: 0 16px 40px;
  text-align: center;
}
footer a { color: var(--muted); font-size: .9rem; }

.admin-body { background: #f2f3f2; }
.login-card { max-width: 460px; margin: 10vh auto 0; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

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

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
}

.filters label { margin-bottom: 0; }

.admin-comments { display: grid; gap: 14px; }

.admin-comment {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}

.admin-comment-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.identity strong, .identity span { display: block; }
.identity span { color: var(--muted); margin-top: 4px; direction: ltr; text-align: right; }

.status-badge {
  align-self: start;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eee;
  font-size: .85rem;
}

.admin-comment-text {
  white-space: pre-wrap;
  line-height: 1.8;
  padding: 16px;
  background: #f8f8f7;
  border-radius: 12px;
}

.admin-comment time { display: block; color: var(--muted); margin: 12px 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions button { width: auto; }

@media (max-width: 680px) {
  .page-shell, .admin-shell { width: min(100% - 20px, 940px); padding-top: 28px; }
  .countdown { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .filters { grid-template-columns: 1fr; }
  .admin-header, .admin-comment-header { align-items: stretch; flex-direction: column; }
}
