@font-face {
  font-family: "Barlow Condensed HR";
  src: url("/fonts/BarlowCondensed-ExtraBoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --void: #f8f3e8;
  --surface: rgba(255, 253, 248, 0.96);
  --surface-strong: #fffdf8;
  --ink: #25322b;
  --muted: #6f796f;
  --line: #ded8cb;
  --accent: #315c48;
  --accent-hot: #c66a4a;
  --accent-soft: #dce8de;
  --danger: #a34e45;
  --button-ink: #fffdf8;
  --display-font: Georgia, "Times New Roman", serif;
  --body-font: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  --panel-shadow: 0 10px 28px rgba(51, 48, 39, 0.09);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--void);
}

body {
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at 10% -10%, rgba(198, 106, 74, 0.15), transparent 35%),
    var(--void);
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
  outline-offset: 3px;
}

a {
  color: inherit;
}

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

h1,
h2 {
  color: var(--ink);
  font-family: var(--display-font);
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.8rem, 15vw, 5.6rem);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.app-shell,
.identity-gate,
.response-page {
  position: relative;
  z-index: 1;
  width: min(100%, 780px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(26px + env(safe-area-inset-top)) 16px calc(30px + env(safe-area-inset-bottom));
}

.home-content {
  display: grid;
  gap: 18px;
}

.topbar,
.utility-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  padding: 8px 2px 20px;
}

.top-actions {
  display: grid;
  justify-items: end;
}

.eyebrow,
.section-kicker {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.section-kicker {
  margin-bottom: 6px;
  color: var(--accent-hot);
  font-size: 0.61rem;
}

.muted,
.identity-note {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.person-badge,
.current-person {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.decision-card,
.utility-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.decision-card {
  padding: clamp(20px, 6vw, 34px);
}

.decision-state {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.decision-state strong {
  color: var(--accent);
  text-transform: uppercase;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.choice-button,
.primary-button,
.person-choice,
.identity-choices button {
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.choice-button:hover,
.primary-button:hover,
.person-choice:hover,
.identity-choices button:hover {
  transform: translateY(-2px);
}

.choice-button {
  display: grid;
  min-height: 116px;
  align-content: space-between;
  padding: 14px;
  background: var(--surface-strong);
}

.choice-button strong {
  color: var(--accent);
  font-family: var(--display-font);
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  letter-spacing: 0.02em;
}

.choice-button span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
}

.choice-yes {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: inset 0 -4px 0 var(--accent);
}

.choice-no {
  box-shadow: inset 0 -4px 0 var(--accent-hot);
}

.choice-maybe {
  box-shadow: inset 0 -4px 0 #d09a2e;
}

.utility-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.person-switcher {
  display: flex;
  gap: 8px;
}

.person-choice {
  flex: 1;
  min-height: 43px;
  padding: 8px 12px;
  background: var(--surface-strong);
  color: var(--accent);
  font-weight: 800;
}

.person-choice[value="Cara"] {
  color: var(--accent-hot);
}

.notification-card {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.notification-card .muted {
  margin-bottom: 0;
}

.primary-button {
  min-height: 45px;
  padding: 10px 15px;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--button-ink);
  font-weight: 800;
}

.secondary-button {
  min-height: 45px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.status-text {
  grid-column: 1 / -1;
  min-height: 1.2em;
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
}

.theme-card {
  grid-template-columns: 1fr minmax(170px, 220px);
  align-items: center;
}

.select-wrap {
  position: relative;
}

.theme-select {
  width: 100%;
  min-height: 45px;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--ink);
}

.identity-gate,
.response-page {
  display: grid;
  align-content: center;
  max-width: 560px;
}

.identity-gate {
  gap: 14px;
  min-height: 100svh;
}

.identity-gate h1,
.response-page h1 {
  margin-bottom: 4px;
}

.identity-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.identity-choices button {
  min-height: 74px;
  background: var(--surface);
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 1.45rem;
}

.identity-choices button[value="Cara"] {
  color: var(--accent-hot);
}

.identity-note {
  margin: 10px 0 0;
}

.response-page {
  gap: 14px;
}

.response-form {
  margin-top: 10px;
}

.full-width {
  width: 100%;
}

.text-link {
  justify-self: start;
  margin-top: 2px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[data-theme="chad"] {
  color-scheme: dark;
  --void: #05030d;
  --surface: rgba(13, 9, 31, 0.9);
  --surface-strong: rgba(20, 12, 43, 0.98);
  --ink: #edfaff;
  --muted: #8794ae;
  --line: rgba(61, 226, 255, 0.26);
  --accent: #3de2ff;
  --accent-hot: #ff3cac;
  --accent-soft: rgba(61, 226, 255, 0.11);
  --button-ink: #05030d;
  --display-font: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --body-font: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --panel-shadow: 0 14px 42px rgba(0, 0, 0, 0.38), inset 0 0 30px rgba(61, 226, 255, 0.025);
}

html[data-theme="chad"] body {
  background:
    radial-gradient(circle at 15% 0%, rgba(157, 92, 255, 0.24), transparent 35%),
    radial-gradient(circle at 88% 12%, rgba(255, 60, 172, 0.16), transparent 30%),
    linear-gradient(180deg, #090415 0%, var(--void) 72%);
}

html[data-theme="chad"] body::before {
  content: "";
  inset: 48% -30% -35%;
  background-image:
    linear-gradient(rgba(61, 226, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 226, 255, 0.12) 1px, transparent 1px);
  background-size: 42px 28px;
  transform: perspective(420px) rotateX(58deg);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent, #000 22%);
}

html[data-theme="chad"] body::after {
  content: "";
  inset: 0;
  opacity: 0.13;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.08) 4px);
}

html[data-theme="chad"] h1 {
  text-shadow: 3px 0 var(--accent-hot), -3px 0 var(--accent), 0 0 24px rgba(157, 92, 255, 0.65);
}

html[data-theme="cara"] {
  color-scheme: light;
  --void: #dcebf0;
  --surface: rgba(255, 251, 246, 0.94);
  --surface-strong: rgba(255, 252, 248, 0.99);
  --ink: #172630;
  --muted: #687780;
  --line: rgba(113, 28, 47, 0.24);
  --accent: #711c2f;
  --accent-hot: #2587a2;
  --accent-soft: rgba(113, 28, 47, 0.09);
  --button-ink: #fffaf4;
  --display-font: "Barlow Condensed HR", "Arial Narrow", Impact, sans-serif;
  --body-font: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --panel-shadow: 0 16px 36px rgba(43, 62, 72, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

html[data-theme="cara"] body {
  background:
    radial-gradient(circle at 78% 4%, rgba(113, 28, 47, 0.22), transparent 29%),
    radial-gradient(circle at 8% 18%, rgba(37, 135, 162, 0.2), transparent 30%),
    linear-gradient(155deg, #edf7f9 0%, #f7eee7 48%, #d9eaf0 100%);
}

html[data-theme="cara"] body::before {
  content: "";
  inset: 0;
  opacity: 0.32;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #b64055 50%, transparent calc(50% + 1px)),
    radial-gradient(ellipse 90px 180px at 50% 50%, transparent 47%, rgba(37, 135, 162, 0.35) 48%, rgba(37, 135, 162, 0.35) 49%, transparent 50%);
}

html[data-theme="cara"] h1 {
  color: #711c2f;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.055em;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.9), 5px 5px 18px rgba(37, 135, 162, 0.2);
}

html[data-theme="neutral"] h1 {
  color: var(--ink);
  font-size: clamp(2.6rem, 13vw, 5rem);
  font-weight: 500;
  line-height: 0.92;
  text-shadow: none;
}

@media (max-width: 520px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .choice-button {
    min-height: 76px;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .notification-card,
  .theme-card {
    grid-template-columns: 1fr;
  }

  .notification-actions,
  .notification-card .primary-button,
  .notification-card .secondary-button {
    width: 100%;
  }
}
