:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f0e7;
  color: #203d33;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    linear-gradient(180deg, rgba(8, 37, 27, 0.96), rgba(8, 37, 27, 0.88) 34%, transparent 34%),
    #f7f0e7;
}

.ticket-card {
  position: relative;
  width: min(100%, 620px);
  padding: clamp(28px, 6vw, 54px);
  background: #fffaf4;
  border-top: 5px solid #f2c318;
  box-shadow: 0 24px 70px rgba(9, 32, 24, 0.22);
}

.staging-note {
  position: absolute;
  top: 14px;
  right: 18px;
  margin: 0;
  color: #52615c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 10px;
  color: #b28a00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ticket-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #d9ded8;
}

.ticket-navigation a,
.ticket-help-page a,
noscript a {
  color: #203d33;
  text-underline-offset: 3px;
}

.ticket-navigation a { padding: 8px 0; }
.ticket-navigation a:focus-visible,
.ticket-help-page a:focus-visible { outline: 3px solid #a77f00; outline-offset: 4px; }
.ticket-host-note { color: #52615c; font-size: 0.8rem; line-height: 1.6; }
.ticket-help-page { width: min(100%, 760px); line-height: 1.65; }
.ticket-help-page h2 { margin-top: 28px; font-size: 1.2rem; }

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 9vw, 4.8rem);
  font-weight: 500;
  line-height: 0.95;
}

.event-line {
  margin-top: 22px;
  font-weight: 750;
}

.price {
  margin: 30px 0 24px;
  color: #111;
  font-size: 2rem;
  font-weight: 800;
}

.price span {
  color: #52615c;
  font-size: 0.95rem;
  font-weight: 500;
}

form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 750;
}

input,
select,
button {
  width: 100%;
  min-height: 50px;
  border-radius: 4px;
  font: inherit;
}

input,
select {
  border: 1px solid #adbbb5;
  background: white;
  padding: 0 13px;
}

input:focus,
select:focus {
  outline: 3px solid rgba(242, 195, 24, 0.42);
  border-color: #876900;
}

button {
  margin-top: 5px;
  border: 0;
  background: #f2c318;
  color: #162a23;
  padding: 12px 20px;
  font-weight: 850;
  cursor: pointer;
}

button:hover {
  background: #dfb100;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

#form-status {
  min-height: 1.5em;
  margin: 0;
  color: #6a3028;
  font-size: 0.9rem;
}

.issued-ticket {
  width: min(100%, 680px);
}

.ticket-state {
  display: grid;
  gap: 5px;
  margin: 28px 0 18px;
  padding: 16px 18px;
  border-left: 4px solid #f2c318;
  background: #f7f0e7;
}

.ticket-state strong {
  font-size: 1.1rem;
}

.ticket-state span {
  color: #52615c;
}

.ticket-state.invalid {
  border-left-color: #9b3b32;
  background: #f7e7e4;
}

.ticket-state.checked-in {
  border-left-color: #52615c;
}

.ticket-qr {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 20px auto;
}

.ticket-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.ticket-details div {
  min-width: 0;
}

.ticket-details dt {
  color: #66736e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-details dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.ticket-help {
  margin-bottom: 0;
  color: #52615c;
  font-size: 0.9rem;
  line-height: 1.5;
}

.staff-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #12372d;
}

.staff-login-card {
  width: min(100%, 520px);
  padding: clamp(30px, 7vw, 52px);
  background: #fffaf4;
  border-top: 5px solid #f2c318;
  box-shadow: 0 24px 70px rgba(9, 32, 24, 0.35);
}

.staff-login-card h1 {
  font-size: clamp(2.7rem, 9vw, 4.4rem);
}

.staff-login-card > p:not(.eyebrow) {
  color: #52615c;
  line-height: 1.6;
}

.staff-login-form {
  margin-top: 28px;
}

.staff-login-form #staff-status {
  min-height: 2.8em;
  margin: 0;
  color: #52615c;
  line-height: 1.4;
}

.text-link {
  color: #203d33;
  font-weight: 750;
  text-decoration-color: #d2a600;
  text-underline-offset: 4px;
}

.staff-app {
  min-height: 100vh;
  padding: clamp(22px, 4vw, 52px);
  background: #f7f0e7;
}

.staff-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  max-width: 1280px;
  margin: 0 auto 28px;
}

.staff-header h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
}

.staff-event-line {
  margin: 15px 0 0;
  font-weight: 750;
}

.staff-account {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  color: #52615c;
  font-size: 0.86rem;
}

.button-secondary {
  width: auto;
  min-height: 40px;
  margin: 0;
  border: 1px solid #8b9993;
  background: transparent;
  padding: 8px 14px;
}

.button-secondary:hover {
  background: #e9e1d7;
}

.staff-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 1280px;
  margin: 0 auto 24px;
  overflow: hidden;
  border: 1px solid #d8d0c6;
  background: #d8d0c6;
}

.staff-summary div {
  display: grid;
  gap: 4px;
  padding: 20px;
  background: #fffaf4;
}

.staff-summary strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  font-weight: 500;
}

.staff-summary span {
  color: #66736e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.staff-tools,
.admin-panel {
  max-width: 1280px;
  margin: 0 auto 24px;
}

.staff-tools {
  display: grid;
  gap: 12px;
}

.staff-tool-card,
.admin-card {
  border: 1px solid #d8d0c6;
  background: #fffaf4;
}

.season-pass-tool {
  border-top: 4px solid #f2c318;
}

.staff-tool-card > summary {
  padding: 18px 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  cursor: pointer;
}

.staff-tool-card[open] > summary {
  border-bottom: 1px solid #dfd7cd;
}

.compact-form {
  padding: 22px;
}

.tool-explanation {
  margin: 0 0 18px;
  color: #52615c;
  line-height: 1.5;
}

.form-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.compact-form textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #adbbb5;
  border-radius: 4px;
  padding: 12px;
  font: inherit;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.form-feedback {
  min-height: 1.4em;
  margin: 0;
  color: #52615c;
}

.staff-roster-card {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 36px);
  background: #fffaf4;
  border-top: 4px solid #f2c318;
  box-shadow: 0 18px 50px rgba(9, 32, 24, 0.12);
}

.scanner-callout {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  margin: 0 0 34px;
  padding: 28px;
  background: #173c30;
  color: #fffaf4;
}

.scanner-callout .eyebrow {
  margin-bottom: 7px;
}

.scanner-callout h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
}

.scanner-callout p:last-child {
  margin: 8px 0 0;
  color: #d5ddd9;
  line-height: 1.45;
}

.scanner-callout button {
  width: auto;
  min-width: 170px;
  margin: 0;
}

.staff-roster-heading {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
  align-items: end;
  gap: 30px;
  margin-bottom: 20px;
}

.staff-roster-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
}

.staff-search span {
  font-size: 0.76rem;
}

.roster-status {
  margin: 0 0 12px;
  color: #66736e;
  font-size: 0.82rem;
}

.staff-roster {
  display: grid;
}

.roster-row {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.8fr)
    minmax(95px, 0.65fr)
    minmax(65px, 0.45fr)
    minmax(105px, 0.65fr)
    minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 16px 4px;
  border-top: 1px solid #dfd7cd;
}

.roster-row strong {
  overflow-wrap: anywhere;
}

.roster-primary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.roster-primary > strong {
  font-size: 1.05rem;
}

.roster-primary span {
  overflow: hidden;
  color: #66736e;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-primary .duplicate-warning {
  overflow: visible;
  color: #82352d;
  font-weight: 800;
  text-overflow: clip;
  white-space: normal;
}

.roster-checkin {
  display: grid;
  grid-template-columns: minmax(74px, 0.5fr) minmax(104px, 1fr);
  align-items: end;
  gap: 8px;
}

.roster-actions {
  display: grid;
  gap: 7px;
}

.roster-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.roster-secondary-actions button {
  flex: 1 1 110px;
}

.roster-secondary-actions .button-danger {
  border-color: #9b4a40;
  color: #82352d;
}

.roster-checkin select {
  min-height: 42px;
}

.roster-checkin button {
  min-height: 42px;
  margin: 0;
  padding: 8px 12px;
}

.roster-history-button {
  justify-self: start;
}

.roster-history {
  grid-column: 1 / -1;
  padding: 14px 16px;
  background: #f7f0e7;
}

.roster-history > p {
  margin: 0;
  color: #66736e;
}

.history-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #dfd7cd;
}

.history-entry:last-child {
  border-bottom: 0;
}

.history-entry > div {
  display: grid;
  gap: 3px;
}

.history-entry span {
  color: #66736e;
  font-size: 0.78rem;
}

.history-entry button {
  flex: 0 0 auto;
}

.history-undone {
  font-weight: 800;
  text-transform: uppercase;
}

.roster-label {
  display: block;
  margin-bottom: 4px;
  color: #66736e;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  background: #ece5dc;
  padding: 7px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
  text-transform: capitalize;
}

.status-checked-in {
  background: #dbeadd;
  color: #1d5b30;
}

.status-partial {
  background: #fff0bf;
  color: #735900;
}

.status-refunded,
.status-void {
  background: #f3dcd8;
  color: #82352d;
}

.empty-roster {
  padding: 30px 0;
  color: #66736e;
}

.admin-panel {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-heading h2,
.admin-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.admin-heading h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.admin-card {
  min-width: 0;
  padding: 22px;
}

.admin-card h3 {
  font-size: 1.7rem;
}

.admin-card > p {
  color: #52615c;
  line-height: 1.5;
}

.admin-card .compact-form {
  padding: 18px 0;
}

.admin-source-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  border: 1px solid #d8d0c6;
  background: #d8d0c6;
}

.admin-source-summary > div {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: #fffaf4;
}

.admin-source-summary strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.admin-source-summary span {
  color: #66736e;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-list {
  display: grid;
}

.admin-list > p {
  color: #66736e;
}

.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #dfd7cd;
}

.admin-list-row > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-list-row span {
  overflow-wrap: anywhere;
  color: #66736e;
  font-size: 0.78rem;
}

.admin-list-row button {
  flex: 0 0 auto;
}

.button-link {
  display: inline-block;
  border-radius: 4px;
  background: #f2c318;
  color: #162a23;
  padding: 12px 18px;
  font-weight: 850;
  text-decoration: none;
}

.scanner-dialog {
  width: min(94vw, 620px);
  max-height: 92vh;
  margin: auto;
  overflow: auto;
  border: 0;
  border-top: 5px solid #f2c318;
  background: #fffaf4;
  color: #203d33;
  padding: 0;
  box-shadow: 0 28px 90px rgba(5, 24, 18, 0.45);
}

.scanner-dialog::backdrop {
  background: rgba(5, 24, 18, 0.8);
}

.scanner-dialog-inner {
  padding: clamp(20px, 5vw, 34px);
}

.scanner-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.scanner-dialog-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 500;
}

.scanner-camera {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 5px;
  background: #0c1713;
}

.scanner-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-status {
  min-height: 1.5em;
  margin: 14px 0;
  color: #52615c;
}

.scanner-file {
  margin-bottom: 18px;
  color: #52615c;
}

.scanner-file input {
  min-height: auto;
  padding: 10px;
  background: #f7f0e7;
}

.scan-reservation,
.scan-success {
  margin-top: 18px;
  padding: 20px;
  border-left: 4px solid #f2c318;
  background: #f7f0e7;
}

.scan-reservation h3,
.scan-success h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.scan-reservation > p:not(.eyebrow),
.scan-success > p:not(.eyebrow) {
  margin: 7px 0 0;
}

.scan-warning {
  padding: 12px;
  background: #f3dcd8;
  color: #82352d;
}

.scan-checkin {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(150px, 1fr);
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.scan-checkin button,
.scan-success button,
.scan-reservation > button {
  margin: 0;
}

@media (max-width: 520px) {
  .shell {
    padding: 0;
    place-items: start stretch;
    background: #fffaf4;
  }

  .ticket-card {
    min-height: 100vh;
    box-shadow: none;
  }

  .staging-note {
    position: static;
    margin-bottom: 24px;
  }

  .ticket-details {
    grid-template-columns: 1fr;
  }

  .staff-shell {
    place-items: start stretch;
    padding: 0;
    background: #fffaf4;
  }

  .staff-login-card {
    min-height: 100vh;
    box-shadow: none;
  }
}

@media (max-width: 900px) {
  .staff-header,
  .staff-account,
  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .staff-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-roster-heading {
    grid-template-columns: 1fr;
  }

  .roster-row {
    grid-template-columns: 1fr 1fr;
    margin: 0 -4px;
    padding: 18px 4px;
  }

  .roster-primary {
    grid-column: 1 / -1;
  }

  .roster-checkin,
  .roster-actions,
  .roster-history-button {
    grid-column: 1 / -1;
  }

  .roster-history-button {
    width: 100%;
  }

  .scanner-callout {
    grid-template-columns: 1fr;
  }

  .scanner-callout button {
    width: 100%;
  }

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

@media (max-width: 420px) {
  .staff-app {
    padding: 18px 12px 40px;
  }

  .staff-summary div {
    padding: 15px;
  }

  .staff-roster-card {
    padding: 18px 14px;
  }

  .scanner-callout {
    margin-bottom: 28px;
    padding: 22px 14px;
  }

  .compact-form,
  .admin-card {
    padding: 18px 14px;
  }

  .admin-list-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-list-row button {
    width: 100%;
  }

  .roster-row {
    gap: 12px;
  }

  .scan-checkin {
    grid-template-columns: 1fr;
  }

  .scanner-dialog {
    width: 100vw;
    max-width: none;
    max-height: 100vh;
    min-height: 100vh;
  }
}
