:root {
  color-scheme: dark;
  --bg: #1b100b;
  --panel: rgba(49, 31, 21, 0.86);
  --panel-solid: #2c1b12;
  --text: #fff1d7;
  --muted: #c7ad87;
  --line: rgba(255, 232, 194, 0.18);
  --accent: #c96832;
  --accent-2: #e9ad55;
  --accent-deep: #8f3f22;
  --cream: #fff0cf;
  --ease-pop: cubic-bezier(0.2, 1.35, 0.36, 1);
  --ease-slide: cubic-bezier(0.78, 0.02, 0.25, 1);
}

* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    linear-gradient(rgba(25, 13, 8, 0.35), rgba(25, 13, 8, 0.74)),
    url("assets/background.jpg") center / cover fixed,
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}
button {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 4px;
}

.site-shell {
  position: relative;
  min-height: 100dvh;
}

.intro-screen,
.submission-screen {
  min-height: 100vh;
  min-height: 100dvh;
}

.intro-screen::before,
.submission-screen::before,
.admin-shell::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: url("assets/lines.png") right bottom / min(82vw, 1200px) auto no-repeat;
  mix-blend-mode: overlay;
  opacity: 1;
}

.intro-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background:
    radial-gradient(
      circle at 78% 14%,
      rgba(233, 173, 85, 0.17),
      transparent 34%
    ),
    linear-gradient(rgba(27, 16, 11, 0.42), rgba(27, 16, 11, 0.7)),
    url("assets/background.jpg") center / cover;
  transform: translateX(0);
  transition:
    transform 850ms var(--ease-slide),
    visibility 0s linear 850ms;
}

body.has-started .intro-screen {
  transform: translateX(102%);
  visibility: hidden;
}

.intro-panel {
  position: relative;
  z-index: 2;
  width: min(1100px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intro-panel .eyebrow {
  margin-bottom: 20px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.055em;
}
.intro-panel h1 {
  font-size: clamp(48px, 8vw, 110px);
  line-height: 0.94;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin: clamp(38px, 7vh, 72px) 0 24px;
}

.role-tile {
  min-height: clamp(140px, 22vh, 220px);
  padding: 22px;
  border: 1px solid rgba(255, 224, 180, 0.19);
  border-radius: clamp(22px, 3vw, 34px);
  color: var(--text);
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(233, 173, 85, 0.14),
      transparent 36%
    ),
    linear-gradient(145deg, rgba(255, 227, 184, 0.07), rgba(80, 43, 23, 0.04)),
    rgba(38, 22, 14, 0.76);
  box-shadow:
    0 24px 68px rgba(18, 8, 4, 0.35),
    inset 0 1px 0 rgba(255, 234, 199, 0.08);
  backdrop-filter: blur(18px);
  font-size: clamp(21px, 2.5vw, 34px);
  font-weight: 850;
  letter-spacing: -0.035em;
  word-spacing: 0.5rem;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 200ms var(--ease-pop),
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.role-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 173, 85, 0.5);
}
.role-tile.is-active {
  color: #28140b;
  border-color: rgba(255, 240, 207, 0.75);
  background: linear-gradient(120deg, #f7d993, #e5a44d 56%, #bd5b2d);
  box-shadow:
    0 20px 46px rgba(84, 34, 13, 0.42),
    inset 0 2px 0 rgba(255, 244, 212, 0.66);
}

.primary-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 28px;
  border: 0;
  border-radius: 22px;
  color: #28140b;
  background: linear-gradient(105deg, #f7d993, #e5a44d 56%, #bd5b2d);
  box-shadow:
    0 18px 42px rgba(84, 34, 13, 0.4),
    inset 0 2px 0 rgba(255, 244, 212, 0.66);
  font-weight: 900;
  letter-spacing: -0.03em;
  cursor: pointer;
  transition:
    transform 200ms var(--ease-pop),
    filter 160ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.primary-button:disabled {
  cursor: default;
  opacity: 0.45;
  filter: grayscale(0.25);
  transform: none;
}
.start-button {
  max-width: 520px;
  min-height: 90px;
  margin-inline: auto;
  margin-top: 2.75rem;
  font-size: 25px;
}

.submission-screen {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(24px, 5vw, 72px) 20px;
}

.submission-card,
.admin-card {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(255, 224, 180, 0.16);
  border-radius: clamp(24px, 3vw, 36px);
  background:
    radial-gradient(
      circle at 92% 4%,
      rgba(218, 127, 53, 0.12),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(255, 227, 184, 0.055),
      rgba(80, 43, 23, 0.025)
    ),
    var(--panel);
  box-shadow:
    0 32px 100px rgba(18, 8, 4, 0.56),
    inset 0 1px 0 rgba(255, 234, 199, 0.09);
  backdrop-filter: blur(22px) saturate(1.05);
}

.submission-card h2 {
  max-width: 760px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 0.98;
}
.lede {
  max-width: 850px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
}
.guidelines {
  margin: 26px 0 16px;
  padding-left: 1.2em;
  color: var(--cream);
  line-height: 1.7;
}
.guidelines li::marker {
  color: var(--accent-2);
}
.disclaimer {
  margin: 0 0 28px;
  color: #f2c486;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.field-label {
  display: block;
  margin: 0 0 9px;
  color: rgba(255, 226, 185, 0.72);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.field-label span {
  opacity: 0.6;
  font-weight: 700;
}

.suggestion-input,
.notes-input {
  width: 100%;
  border: 1px solid rgba(255, 226, 185, 0.2);
  border-radius: 18px;
  color: var(--text);
  background: rgba(24, 13, 8, 0.7);
  box-shadow: inset 0 2px 10px rgba(8, 3, 1, 0.26);
}
.suggestion-input {
  min-height: 76px;
  padding: 16px 20px;
  font-size: 1.5rem;
  font-weight: 760;
}
.notes-input {
  min-height: 94px;
  margin-bottom: 22px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.45;
}
.suggestion-input::placeholder,
.notes-input::placeholder {
  color: rgba(199, 173, 135, 0.48);
}
#suggestion-input-wrap {
  margin-bottom: 20px;
}

.submit-button {
  min-height: 86px;
  font-size: 24px;
}
.form-status {
  min-height: 24px;
  margin: 12px 2px 0;
  color: #ffba97;
  line-height: 1.45;
}

.submitted-word {
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid rgba(247, 217, 147, 0.4);
  border-radius: 20px;
  background: linear-gradient(
    120deg,
    rgba(233, 173, 85, 0.22),
    rgba(201, 104, 50, 0.16)
  );
}
.submitted-word strong {
  display: block;
  color: var(--cream);
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.05em;
}

#submitted-word-value {
  text-align: center;
}

body.has-submitted #submission-heading {
  margin-bottom: 2rem;
}

body.has-submitted #submit-button {
  display: none;
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Admin */
.admin-page {
  overflow: auto;
}
.admin-shell {
  position: relative;
  min-height: 100dvh;
  padding: clamp(24px, 5vw, 70px) 20px;
  overflow: hidden;
}
.admin-card {
  width: min(1180px, 100%);
  margin: 0 auto;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.admin-header h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
}
.admin-login {
  max-width: 660px;
}
.admin-login-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.compact-button {
  width: auto;
  min-height: 76px;
  padding-inline: 28px;
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.sort-buttons {
  display: flex;
  gap: 8px;
}
.secondary-button {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--cream);
  background: rgba(30, 17, 11, 0.65);
  font-weight: 800;
  cursor: pointer;
}
.secondary-button.is-active {
  color: #28140b;
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.admin-summary {
  color: var(--muted);
}
.admin-list {
  display: grid;
  gap: 10px;
}
.admin-entry {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 17, 11, 0.52);
}
.admin-entry-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}
.admin-entry h2 {
  font-size: clamp(23px, 3vw, 34px);
  overflow-wrap: anywhere;
}
.count-badge,
.role-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}
.count-badge {
  color: #28140b;
  background: var(--accent-2);
}
.role-badge {
  color: var(--cream);
  background: rgba(201, 104, 50, 0.24);
}
.admin-entry details {
  margin-top: 12px;
  color: var(--muted);
}
.admin-entry summary {
  cursor: pointer;
  color: var(--cream);
  font-weight: 800;
}
.admin-entry ul {
  margin-bottom: 0;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .intro-screen {
    padding: 18px;
  }
  .role-grid {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }
  .role-tile {
    min-height: 96px;
  }
  .submission-card,
  .admin-card {
    padding: 22px 18px 26px;
    border-radius: 22px;
  }
  .submission-card h2 {
    font-size: clamp(38px, 12vw, 56px);
  }
  .admin-login-row {
    grid-template-columns: 1fr;
  }
  .compact-button {
    width: 100%;
  }
  .admin-entry-top {
    grid-template-columns: 1fr auto;
  }
  .role-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Submission result + developer testing controls */
.submitted-notes {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(247, 217, 147, 0.22);
}

.submitted-notes .field-label {
  margin-bottom: 7px;
}

.submitted-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.developer-tools {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.developer-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px dashed rgba(233, 173, 85, 0.5);
  border-radius: 12px;
  color: var(--accent-2);
  background: rgba(30, 17, 11, 0.62);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.developer-button:hover {
  background: rgba(201, 104, 50, 0.14);
}

.developer-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.developer-note {
  margin: 8px 0 0;
  color: rgba(199, 173, 135, 0.65);
  font-size: 12px;
}

/* Admin destructive action */
.admin-entry-top {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.delete-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 173, 145, 0.35);
  border-radius: 11px;
  color: #ffd5c5;
  background: rgba(143, 63, 34, 0.28);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.delete-button:hover {
  background: rgba(143, 63, 34, 0.5);
  border-color: rgba(255, 173, 145, 0.58);
}

.delete-button:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .admin-entry-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .role-badge {
    grid-column: 1;
  }

  .delete-button {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Word-grouped admin entries */
.admin-entry-top {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.admin-submission-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0 !important;
  padding: 0;
  list-style: none;
}

.admin-submission-row {
  padding: 14px;
  border: 1px solid rgba(255, 232, 194, 0.12);
  border-radius: 14px;
  background: rgba(20, 11, 7, 0.34);
}

.admin-submission-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.submission-time {
  color: rgba(199, 173, 135, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.admin-submission-note {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .admin-entry-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .count-badge {
    justify-self: end;
  }

  .delete-button {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
  }
}
