:root {
  --bg: #f4efe7;
  --bg-2: #e3d6c3;
  --ink: #162028;
  --muted: #5d6a72;
  --accent: #9c5f2a;
  --accent-2: #274055;
  --danger: #b23b3b;
  --success: #2e7d4f;
  --card: rgba(255, 255, 255, 0.74);
  --card-border: rgba(22, 32, 40, 0.1);
  --shadow: 0 20px 60px rgba(31, 38, 44, 0.14);
  --radius: 28px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(156, 95, 42, 0.18), transparent 24%),
    radial-gradient(circle at right 12%, rgba(39, 64, 85, 0.16), transparent 22%),
    linear-gradient(180deg, #f7f2eb 0%, #efe2d1 52%, #f7f2eb 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(22, 32, 40, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 32, 40, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
  opacity: 0.4;
  z-index: 0;
}

.shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #d79d63);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 14px 24px rgba(156, 95, 42, 0.28);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-copy strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-copy span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}

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

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent-2), #40627f);
  color: #fff;
  box-shadow: 0 16px 30px rgba(39, 64, 85, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  border: 1px solid rgba(22, 32, 40, 0.12);
}

.button-accent {
  background: linear-gradient(135deg, var(--accent), #d49b5e);
  color: #fff;
  box-shadow: 0 16px 30px rgba(156, 95, 42, 0.26);
}

.button-danger {
  background: rgba(178, 59, 59, 0.1);
  color: var(--danger);
  border: 1px solid rgba(178, 59, 59, 0.25);
}

.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.pill {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(39, 64, 85, 0.08);
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(156, 95, 42, 0.12);
  color: var(--accent);
}

.badge.alt {
  background: rgba(39, 64, 85, 0.12);
  color: var(--accent-2);
}

.hidden {
  display: none !important;
}

.notice {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-weight: 700;
  margin: 12px 0;
  font-size: 0.95rem;
}

.notice-error {
  background: rgba(178, 59, 59, 0.1);
  border: 1px solid rgba(178, 59, 59, 0.25);
  color: var(--danger);
}

.notice-success {
  background: rgba(46, 125, 79, 0.1);
  border: 1px solid rgba(46, 125, 79, 0.25);
  color: var(--success);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(22, 32, 40, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(156, 95, 42, 0.55);
  box-shadow: 0 0 0 4px rgba(156, 95, 42, 0.12);
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 980px) {
  .lg-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(var(--max), calc(100% - 20px));
    padding-top: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .button {
    justify-content: center;
    flex: 1;
  }
}