:root {
  --bg: #0d0d0b;
  --panel: #171713;
  --text: #f5f0df;
  --muted: #bbb29d;
  --line: #403b30;
  --accent: #e5c867;
  --accent2: #f3db7d;
  --good: #93d29d;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;

  background:
    radial-gradient(
      circle at 10% 0,
      rgba(229,200,103,.12),
      transparent 30rem
    ),
    linear-gradient(
      #11110e,
      #090908
    );

  color: var(--text);

  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}

.hidden {
  display: none !important;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--accent);
  text-decoration: none;
  font: 700 1.45rem Georgia, serif;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

nav a {
  padding: 9px 11px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
}

nav a:hover {
  color: var(--text);
  background: #211f18;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  padding: 42px 0 80px;
}

.center {
  text-align: center;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;

  color: var(--accent);

  text-transform: uppercase;
  letter-spacing: .15em;

  font-size: .74rem;
  font-weight: 800;
}

h1,
h2 {
  font-family: Georgia, serif;
}

h1 {
  margin: 0 0 14px;

  font-size:
    clamp(2.7rem, 8vw, 5.4rem);

  line-height: .95;
}

h2 {
  margin: 0 0 15px;
}

p {
  margin-top: 0;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;

  margin-bottom: 22px;
}

.meta {
  display: flex;
  gap: 12px;
  align-items: center;

  color: var(--muted);
}

.badge {
  padding: 5px 9px;

  border: 1px solid var(--line);
  border-radius: 999px;

  color: var(--accent);

  font-size: .76rem;
  text-transform: capitalize;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 42px;
  padding: 10px 15px;

  border: 1px solid transparent;
  border-radius: 10px;

  font-weight: 750;
  text-decoration: none;

  cursor: pointer;
}

.primary {
  color: #15130c;
  background: var(--accent);
}

.secondary {
  color: var(--text);
  background: #252219;
  border-color: var(--line);
}

.ghost {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.panel,
.metrics article {
  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: var(--panel);
}

.panel {
  padding: clamp(20px, 4vw, 30px);
}

.tonight {
  margin-bottom: 18px;
}

.tonight h2 {
  margin-bottom: 5px;
}

.metrics {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 16px;
}

.metrics article {
  padding: 20px;
}

.metrics span,
.metrics small {
  display: block;
  color: var(--muted);
}

.metrics span {
  margin-bottom: 8px;
  font-size: .8rem;
}

.metrics strong {
  display: block;

  margin-bottom: 5px;

  color: var(--accent2);

  font-size: 1.8rem;
}

.metrics small {
  font-size: .75rem;
}

.grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;

  margin-top: 18px;
}

.full {
  grid-column: 1 / -1;
}

.highlight {
  border-color:
    rgba(229,200,103,.55);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.list {
  display: grid;
  gap: 10px;
}

.card,
.choice-card,
.session-status {
  padding: 15px;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: #11110e;
}

.card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.card strong {
  display: block;
  margin-bottom: 4px;
}

.card p {
  margin: 0;

  color: var(--muted);

  font-size: .86rem;
}

.choice-card {
  display: block;

  text-decoration: none;
}

.choice-card:hover {
  border-color: var(--accent);
}

.code-box {
  margin-top: 18px;
  padding: 20px;

  border: 1px dashed var(--accent);
  border-radius: 12px;

  text-align: center;
}

.code-box span {
  display: block;
  color: var(--muted);
}

.code-box strong {
  display: block;

  margin: 12px 0;

  color: var(--accent2);

  font-size: 2.2rem;
  letter-spacing: .16em;
}

.code-box p {
  margin: 14px 0 0;

  color: var(--muted);

  font-size: .82rem;
  line-height: 1.45;
}

.session-status {
  margin: 16px 0;
}

.message {
  min-height: 1em;
  margin: 12px 0 0;

  color: var(--good);
}

.empty {
  padding: 20px;

  border: 1px dashed var(--line);
  border-radius: 12px;

  color: var(--muted);
}

@media (max-width: 880px) {
  .metrics {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .full {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .site-header,
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding: 12px 0;
  }

  .shell {
    padding-top: 28px;
  }

  .actions {
    width: 100%;
  }

  .actions > * {
    flex: 1;
  }
}

/* Gate 19B-1 venue schedule */

.schedule-panel {
  margin-top: 16px;
}

.schedule-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.schedule-times {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.schedule-times article {
  padding: 14px;
  border: 1px solid
    rgba(255,255,255,.12);
  border-radius: 16px;
  background:
    rgba(255,255,255,.05);
}

.schedule-times span,
.schedule-times small {
  display: block;
}

.schedule-times span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .8rem;
}

.schedule-times strong {
  display: block;
  font-size: 1.45rem;
}

.schedule-times small {
  margin-top: 5px;
  color: var(--muted);
}

.schedule-editor {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid
    rgba(255,255,255,.12);
}

.schedule-form-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0,1fr));
  gap: 12px;
}

.schedule-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .85rem;
}

.schedule-form-grid input,
.schedule-form-grid select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid
    rgba(255,255,255,.12);
  border-radius: 12px;
  background:
    rgba(0,0,0,.22);
  color: inherit;
  font: inherit;
}

#save-schedule {
  margin-top: 14px;
}

#schedule-message {
  min-height: 1.3rem;
  margin-bottom: 0;
}

@media(max-width:720px) {
  .schedule-times,
  .schedule-form-grid {
    grid-template-columns: 1fr;
  }
}


/* 19B-7A VENUE SHOW CONTROL */

.show-control-panel {
  margin-top: 1rem;
}

.show-control-eyebrow {
  margin: 0 0 .55rem;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  opacity: .68;
}

.show-control-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.show-control-header h2 {
  margin: 0;
}

.show-control-header p {
  margin: .35rem 0 0;
}

.show-control-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
  border: 1px solid currentColor;
}

.show-control-status.ready {
  opacity: 1;
}

.show-control-status.warning {
  opacity: .72;
}

.show-control-schedule {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: .75rem;
  margin-top: 1rem;
}

.show-control-schedule > div {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .85rem;
  border: 1px solid
    rgba(127, 127, 127, .28);
  border-radius: .75rem;
}

.show-control-schedule span {
  font-size: .78rem;
  opacity: .7;
}

.show-control-schedule strong {
  font-size: 1.15rem;
}

.show-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1rem;
}

.show-control-actions .button {
  text-align: center;
}

.show-control-actions button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

@media (
  max-width: 560px
) {
  .show-control-header {
    flex-direction: column;
  }

  .show-control-schedule {
    grid-template-columns: 1fr;
  }

  .show-control-actions {
    flex-direction: column;
  }

  .show-control-actions .button {
    width: 100%;
  }
}


/* ==========================================================
   19B-7B QR-FIRST VENUE CHECK-IN
   ========================================================== */

.checkin-qr-box {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid
    rgba(255, 255, 255, .13);
  border-radius: 18px;
  background:
    rgba(0, 0, 0, .18);
  text-align: center;
}

.checkin-qr-frame {
  width: min(100%, 340px);
  margin: 0 auto 18px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
}

.checkin-qr-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.checkin-qr-copy {
  display: grid;
  gap: 7px;
}

.checkin-live-label {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
}

#checkin-live-count {
  font-size: 1.35rem;
}

.checkin-qr-copy p {
  margin: 0;
  opacity: .75;
}

.checkin-qr-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 560px) {
  .checkin-qr-box {
    padding: 14px;
  }

  .checkin-qr-frame {
    width: 100%;
    max-width: 320px;
  }

  .checkin-qr-actions {
    display: grid;
  }
}


/* 19B-7C venue time windows */

.venue-run-phase {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  padding: 7px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.venue-night-timeline {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.venue-night-timeline > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.venue-night-timeline span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  opacity: 0.72;
}

.venue-night-timeline strong {
  display: block;
  font-size: 1.08rem;
}

.venue-window-note {
  margin-top: 12px;
}

.schedule-editor small {
  display: block;
  margin-top: 5px;
  opacity: 0.68;
}

@media (max-width: 760px) {
  .venue-night-timeline {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .venue-night-timeline {
    grid-template-columns: 1fr;
  }
}


/* 20A-3A venue crew and permissions */

.crew-create-tools,
.crew-columns {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.crew-create-tools {
  margin: 18px 0;
}

.crew-tool,
.crew-invite-result,
.crew-subsection {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    rgba(255, 255, 255, 0.025);
}

.crew-tool label,
.crew-tool strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.crew-action-row,
.crew-inline-actions,
.crew-member-actions,
.crew-result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crew-action-row .input {
  min-width: 180px;
}

.crew-invite-result {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) 170px;
  gap: 18px;
  align-items: center;
  margin: 18px 0;
  border-color:
    rgba(243, 211, 132, 0.36);
}

.crew-invite-result code {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--accent);
}

.crew-invite-result img {
  width: 170px;
  max-width: 100%;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
}

.crew-result-actions {
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

.crew-columns {
  margin-top: 18px;
}

.crew-subsection {
  margin-top: 18px;
}

.section-head.compact {
  margin-bottom: 10px;
}

.section-head.compact h3 {
  margin: 0;
}

.crew-member-card,
.crew-request-card,
.crew-invite-card {
  align-items: center;
}

.crew-member-actions,
.crew-inline-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.compact-input {
  width: auto;
  min-width: 150px;
}

.button.compact {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
}

.button.danger {
  border-color:
    rgba(242, 170, 160, 0.42);
  background:
    rgba(242, 170, 160, 0.12);
  color: #f2aaa0;
}

.audit-card p,
.crew-member-card p,
.crew-request-card p,
.crew-invite-card p {
  margin: 5px 0 0;
  opacity: 0.72;
}

@media (max-width: 760px) {
  .crew-create-tools,
  .crew-columns {
    grid-template-columns: 1fr;
  }

  .crew-invite-result {
    grid-template-columns: 1fr;
  }

  .crew-invite-result img {
    justify-self: center;
  }

  .crew-result-actions {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .crew-action-row,
  .crew-member-card,
  .crew-request-card,
  .crew-invite-card {
    align-items: stretch;
    flex-direction: column;
  }

  .crew-member-actions,
  .crew-inline-actions,
  .crew-result-actions {
    width: 100%;
    display: grid;
  }

  .compact-input,
  .crew-action-row .input {
    width: 100%;
  }
}


/* 20A-3B1 VENUE LIVE NIGHT CONTROL */

.live-night-head {
  align-items: flex-start;
}

.live-night-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.live-night-metrics {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.live-night-metrics article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}

.live-night-metrics span,
.live-night-metrics small {
  display: block;
  color: var(--muted);
}

.live-night-metrics span {
  margin-bottom: 5px;
  font-size: .76rem;
}

.live-night-metrics strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent2);
  font-size: 1.55rem;
}

.live-night-metrics small {
  font-size: .72rem;
}

.live-night-columns {
  display: grid;
  grid-template-columns:
    minmax(300px, .9fr)
    minmax(340px, 1.1fr);
  gap: 18px;
}

.live-score-editor,
.live-score-list-panel,
.live-night-subsection {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

#live-score-form {
  display: grid;
  gap: 14px;
}

#live-score-form > label,
.live-round-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .84rem;
}

#live-score-form input,
#live-score-form select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px;
  background: rgba(0,0,0,.25);
  color: var(--text);
  font: inherit;
}

.live-round-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.live-round-grid fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.live-round-grid legend {
  padding: 0 5px;
  color: var(--accent);
  font-weight: 800;
}

.live-round-grid fieldset label + label {
  margin-top: 9px;
}

.paper-score-note {
  margin: 0;
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(229,200,103,.07);
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.live-score-card,
.live-missing-card,
.live-audit-card {
  align-items: center;
}

.live-score-card-main {
  min-width: 0;
}

.live-score-card-title {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.live-score-card-title strong {
  margin: 0;
}

.live-score-points {
  color: var(--accent2);
  font-size: 1.35rem;
  font-weight: 850;
  white-space: nowrap;
}

.live-score-status {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .7rem;
  text-transform: capitalize;
}

.live-score-status.complete {
  color: var(--good);
  border-color: rgba(147,210,157,.45);
}

.live-score-status.partial {
  color: var(--accent2);
  border-color: rgba(229,200,103,.45);
}

.live-score-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.live-night-subsection {
  margin-top: 18px;
}

.live-audit-card p {
  margin: 5px 0 0;
}

.live-audit-role {
  text-transform: capitalize;
}

@media (max-width: 980px) {
  .live-night-metrics {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .live-night-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .live-night-head {
    flex-direction: column;
  }

  .live-night-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .live-night-metrics,
  .live-round-grid {
    grid-template-columns: 1fr;
  }

  .live-score-card,
  .live-missing-card,
  .live-audit-card {
    align-items: stretch;
    flex-direction: column;
  }

  .live-score-actions {
    width: 100%;
  }

  .live-score-actions .button {
    width: 100%;
  }
}

/* 20A-3B2 night closeout and venue recap */

.night-closeout-panel {
  margin: 18px 0 22px;
  padding: 20px;
  border: 1px solid rgba(229, 200, 103, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(
      145deg,
      rgba(229, 200, 103, 0.08),
      rgba(255, 255, 255, 0.025)
    );
}

.night-closeout-actions,
.night-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.night-closeout-recap {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.night-closeout-recap textarea {
  width: 100%;
  resize: vertical;
  min-height: 138px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  line-height: 1.5;
}

.night-history-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

#night-closeout-status {
  text-transform: capitalize;
}

@media (max-width: 720px) {
  .night-history-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .night-closeout-actions,
  .night-history-actions {
    width: 100%;
  }

  .night-closeout-actions .button,
  .night-history-actions .button {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   VENUE OPERATOR LAYOUT V1
   Primary night controls stay visible.
   Setup, crew and historical tools collapse by default.
   ========================================================= */

.operator-drawer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.operator-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 18px 22px;

  cursor: pointer;
  user-select: none;
  list-style: none;
}

.operator-drawer > summary::-webkit-details-marker {
  display: none;
}

.operator-drawer > summary::after {
  content: "+";

  flex: 0 0 auto;

  color: var(--accent2);

  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.operator-drawer[open] > summary::after {
  content: "-";
}

.operator-drawer[open] > summary {
  border-bottom: 1px solid var(--line);
}

.operator-drawer > summary > div {
  min-width: 0;
}

.operator-drawer-label {
  display: block;

  margin-bottom: 4px;

  color: var(--muted);

  font-size: .72rem;
  font-weight: 800;

  letter-spacing: .09em;
  text-transform: uppercase;
}

.operator-drawer > summary strong {
  display: block;

  color: var(--text);

  font-size: 1rem;
}

.operator-drawer-hint {
  margin-left: auto;

  color: var(--muted);

  font-size: .8rem;
  text-align: right;
}

.operator-drawer > .panel {
  margin: 0;

  border: 0;
  border-radius: 0;

  background: transparent;
}

.operator-drawer-stack {
  display: grid;
  gap: 18px;

  padding: 18px;
}

.operator-drawer-stack > .panel {
  margin: 0;
}

.schedule-drawer {
  margin-bottom: 18px;
}

.night-audit-drawer {
  margin-top: 18px;

  background:
    rgba(255,255,255,.02);
}

.night-audit-drawer
  .live-night-subsection {
  margin-top: 0;
}


/* ---------------------------------------------------------
   Operator priority inside the main grid
   --------------------------------------------------------- */

.show-control-panel {
  order: 1;
}

#checkin-admin-panel {
  order: 2;
}

#live-night-panel {
  order: 3;
}

.crew-drawer {
  order: 4;
}

.checkin-history-drawer {
  order: 5;
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 720px) {

  .operator-drawer > summary {
    align-items: flex-start;

    padding: 16px 18px;
  }

  .operator-drawer-hint {
    display: none;
  }

  .operator-drawer-stack {
    padding: 12px;
  }

}
/* WEEKLY_ACCESS_STYLE_V1_START */

.weekly-access-panel {
  display: grid;
  gap: 16px;
}

.schedule-drawer > .weekly-access-panel {
  padding-bottom: 22px;
  border-bottom:
    1px solid rgba(255,255,255,.12);
}

.weekly-access-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.weekly-access-heading h2 {
  margin-bottom: 6px;
}

.weekly-access-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border:
    1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.weekly-access-details {
  display: grid;
  gap: 8px;
}

.weekly-access-details p {
  margin: 0;
}

.weekly-access-note {
  font-weight: 700;
}

.weekly-access-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#weekly-access-message {
  min-height: 1.3rem;
  margin: 0;
}

@media (max-width: 720px) {
  .weekly-access-heading {
    flex-direction: column;
  }

  .weekly-access-actions,
  .weekly-access-actions .button {
    width: 100%;
  }

  .weekly-access-actions .button {
    justify-content: center;
  }
}

/* WEEKLY_ACCESS_STYLE_V1_END */
/* TV_SCREEN_CONTROL_STYLE_V1_START */

.tv-screen-panel {
  margin-top: 18px;
}

.tv-screen-heading,
.tv-screen-list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tv-screen-heading h2 {
  margin-bottom: 8px;
}

.tv-pair-form {
  margin-top: 20px;
}

.tv-pair-form > label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .84rem;
}

.tv-pair-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.tv-pair-code {
  width: min(100%, 260px);
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px;
  background: rgba(0,0,0,.25);
  color: var(--text);
  font: 800 1.12rem "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tv-pair-help {
  margin: 8px 0 0;
  font-size: .82rem;
}

.tv-screen-list-heading {
  margin: 22px 0 10px;
  align-items: center;
}

.tv-screen-card {
  align-items: flex-start;
}

.tv-screen-meta {
  min-width: 0;
}

.tv-screen-meta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .84rem;
}

.tv-screen-status {
  display: inline-block;
  margin-top: 7px;
}

.tv-screen-card .actions {
  justify-content: flex-end;
}

@media (max-width: 620px) {
  .tv-screen-heading,
  .tv-screen-list-heading,
  .tv-pair-row,
  .tv-screen-card {
    flex-direction: column;
    align-items: stretch;
  }

  .tv-screen-heading .button,
  .tv-pair-row .button,
  .tv-pair-code,
  .tv-screen-card .actions,
  .tv-screen-card .actions .button {
    width: 100%;
  }
}


/* TV_APP_CONTROL_STYLE_V1_START */

.tv-apps-control {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.tv-apps-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tv-apps-heading h3 {
  margin: 0 0 7px;
}

.tv-apps-heading p {
  margin-bottom: 0;
}

.tv-app-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.tv-app-card {
  display: grid;
  align-content: start;
  gap: 9px;

  padding: 18px;

  border: 1px solid var(--line);
  border-radius: 16px;

  background:
    rgba(0, 0, 0, .16);
}

.tv-app-card h3 {
  margin: 0 0 9px;
}

.tv-app-card label {
  margin-top: 5px;
  color: var(--muted);
  font-size: .84rem;
}

.tv-app-card input,
.tv-app-card textarea {
  width: 100%;

  padding: 11px 12px;

  border:
    1px solid
    rgba(255,255,255,.14);

  border-radius: 11px;

  background:
    rgba(0,0,0,.25);

  color: var(--text);

  font: inherit;
}

.tv-app-card textarea {
  resize: vertical;
  min-height: 92px;
}

.tv-app-card .button {
  margin-top: 8px;
  justify-self: start;
}

.tv-app-help {
  margin: 0;
  font-size: .78rem;
}

#tv-app-message {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .tv-apps-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .tv-app-grid {
    grid-template-columns: 1fr;
  }

  .tv-apps-heading .button,
  .tv-app-card .button {
    width: 100%;
    justify-content: center;
  }
}

/* TV_APP_CONTROL_STYLE_V1_END */

/* TV_SCREEN_CONTROL_STYLE_V1_END */
/* One-time trivia start controls, within the existing venue remote. */
.trivia-launch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.trivia-launch-actions .button { min-height: 48px; flex: 1 1 140px; }
#native-trivia-remote button { min-height: 48px; }
#trivia-launch-time-form label { display: block; margin: 12px 0 8px; }
#trivia-launch-local-time { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 48px; }
#trivia-launch-controls [hidden] { display: none !important; }
