:root {
  --bg: #f4ecdd;
  --bg-deep: #d6c1a0;
  --card: rgba(255, 250, 241, 0.86);
  --card-edge: rgba(74, 47, 19, 0.12);
  --text: #27170e;
  --muted: #715745;
  --accent: #b9482e;
  --accent-dark: #8f2f1b;
  --accent-soft: #efcf8b;
  --success: #254f3b;
  --shadow: 0 24px 60px rgba(79, 46, 17, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 243, 199, 0.85), transparent 38%),
    linear-gradient(140deg, var(--bg) 0%, #efe1c6 52%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.55;
}

.orb-a {
  top: -6rem;
  left: -4rem;
  width: 18rem;
  height: 18rem;
  background: rgba(255, 219, 153, 0.8);
}

.orb-b {
  right: -5rem;
  bottom: -7rem;
  width: 20rem;
  height: 20rem;
  background: rgba(185, 72, 46, 0.22);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 3rem 1.2rem 4rem;
}

.hero {
  max-width: 42rem;
  margin-bottom: 1.6rem;
  animation: rise-in 0.7s ease both;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1,
.step-title {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  max-width: 11ch;
}

.lead,
.step-text,
.progress-text,
.status {
  color: var(--muted);
}

.lead {
  max-width: 38rem;
  margin-top: 1rem;
  font-size: 1.04rem;
  line-height: 1.65;
}

.card {
  width: min(100%, 720px);
  padding: 1.3rem;
  border: 1px solid var(--card-edge);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: rise-in 0.85s ease both;
}

.progress-wrap {
  margin-bottom: 1.4rem;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(57, 35, 19, 0.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-soft) 100%);
  transition: width 0.28s ease;
}

.progress-text {
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
}

.step-copy {
  margin-bottom: 1rem;
}

.step-title {
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin-bottom: 0.65rem;
}

.step-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.choices {
  display: grid;
  gap: 0.8rem;
}

.choice-btn,
.submit-btn {
  width: 100%;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.choice-btn {
  padding: 1rem 1.05rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(82, 50, 20, 0.09);
}

.choice-btn strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 1.03rem;
}

.choice-btn span {
  color: var(--muted);
  font-size: 0.92rem;
}

.choice-btn.is-selected {
  background: rgba(239, 207, 139, 0.6);
  box-shadow:
    inset 0 0 0 1px rgba(143, 47, 27, 0.18),
    0 12px 28px rgba(79, 46, 17, 0.12);
}

.choice-btn:hover,
.choice-btn:focus-visible,
.submit-btn:hover,
.submit-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(79, 46, 17, 0.12);
}

.verification-form {
  display: grid;
  gap: 0.85rem;
}

.verification-label {
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.verification-box {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(239, 207, 139, 0.34);
  font-size: 1.3rem;
  font-weight: 700;
}

.verification-input {
  width: 100%;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(96, 55, 18, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
}

.verification-input:focus-visible {
  outline: 2px solid rgba(185, 72, 46, 0.32);
  outline-offset: 1px;
}

.submit-btn {
  margin-top: 0.6rem;
  padding: 1rem 1.05rem;
  background: linear-gradient(135deg, var(--accent) 0%, #d26c4c 100%);
  color: #fff9f4;
  font-size: 1rem;
  font-weight: 700;
}

.submit-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.status {
  margin-top: 1rem;
  min-height: 1.4rem;
  font-size: 0.95rem;
}

.status.error {
  color: var(--accent-dark);
}

.status.success {
  color: var(--success);
}

.admin-shell {
  max-width: 1180px;
}

.admin-card {
  width: min(100%, 920px);
}

.admin-shell-minimal {
  padding-top: 2rem;
}

.admin-card-minimal {
  width: min(100%, 1100px);
  padding: 1.1rem 1.1rem 1.25rem;
  border-radius: 24px;
}

.admin-header {
  margin-bottom: 1rem;
}

.admin-title {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.admin-subtitle {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.admin-subtitle-small {
  margin-top: 0.35rem;
  font-size: 0.92rem;
}

.admin-section-title {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.5rem;
  line-height: 1;
}

.admin-login,
.admin-create,
.admin-item {
  display: grid;
  gap: 0.85rem;
}

.admin-panel {
  display: grid;
  gap: 1.4rem;
}

.admin-toolbar {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.admin-logout {
  width: auto;
  min-width: 8rem;
  padding: 0.85rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(82, 50, 20, 0.09);
}

.admin-create {
  margin-bottom: 0.35rem;
}

.admin-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr) 170px;
  gap: 0.75rem;
  align-items: start;
}

.admin-create-main {
  display: grid;
  gap: 0.75rem;
}

.admin-input {
  min-height: 3.2rem;
}

.admin-textarea {
  width: 100%;
  min-height: 7.6rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(96, 55, 18, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.verification-input.is-invalid,
.admin-textarea.is-invalid {
  border-color: rgba(143, 47, 27, 0.45);
  box-shadow: 0 0 0 3px rgba(185, 72, 46, 0.08);
}

.verification-input.is-valid,
.admin-textarea.is-valid {
  border-color: rgba(37, 79, 59, 0.34);
}

.admin-submit {
  margin-top: 0;
  min-height: 3.2rem;
}

.admin-create-button {
  align-self: start;
}

.admin-note {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(82, 50, 20, 0.08);
}

.admin-note-title {
  margin: 0 0 0.35rem;
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-note-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.admin-note-text-small {
  margin-top: 0.7rem;
  font-size: 0.86rem;
}

.admin-param-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.admin-param-list span {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(239, 207, 139, 0.42);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.admin-feedback {
  margin-top: 0.1rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.admin-feedback.error {
  color: var(--accent-dark);
}

.admin-feedback.success {
  color: var(--success);
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 0 0 1px rgba(82, 50, 20, 0.08);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(96, 55, 18, 0.1);
}

.admin-table th {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  background: rgba(239, 207, 139, 0.22);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table th:first-child,
.admin-table td:first-child {
  width: 220px;
}

.admin-actions-head,
.admin-table-actions {
  width: 190px;
}

.admin-row-textarea {
  min-height: 5.8rem;
}

.admin-tail-cell {
  display: grid;
  gap: 0.4rem;
}

.admin-tail-input {
  min-height: 2.9rem;
}

.admin-path-preview {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
  word-break: break-all;
}

.admin-table-actions {
  display: grid;
  gap: 0.55rem;
}

.admin-delete {
  padding: 0.9rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(82, 50, 20, 0.09);
}

.admin-empty {
  color: var(--muted);
  text-align: center;
  padding: 1.2rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .shell {
    padding-top: 2rem;
  }

  .card {
    padding: 1rem;
    border-radius: 22px;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .admin-toolbar,
  .admin-create-grid {
    flex-direction: column;
  }

  .admin-create-grid {
    grid-template-columns: 1fr;
  }

  .admin-logout,
  .admin-delete,
  .admin-table,
  .admin-table thead,
  .admin-table tbody,
  .admin-table tr,
  .admin-table th,
  .admin-table td {
    max-width: none;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody {
    display: block;
  }

  .admin-table tr {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(96, 55, 18, 0.1);
  }

  .admin-table td {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
  }

  .admin-actions-head,
  .admin-table-actions,
  .admin-table th:first-child,
  .admin-table td:first-child {
    width: auto;
  }
}
