body.prompt-screen-page {
  min-height: 100vh;
  --prompt-paper: #f6ebd8;
  --prompt-card: #fffaf0;
  --prompt-card-strong: #fffaf0;
  --prompt-panel: rgba(255, 250, 240, 0.88);
  --prompt-ink: #070707;
  --prompt-ink-soft: #51453c;
  --prompt-ink-muted: #6f5340;
  --prompt-stroke: #d8c3aa;
  --prompt-stroke-strong: rgba(25, 21, 18, 0.32);
  --prompt-button: #191512;
  --prompt-rust: #760704;
  --prompt-shadow: 0 18px 42px rgba(25, 21, 18, 0.16);
  --md-surface: var(--prompt-card);
  --md-surface-strong: var(--prompt-card-strong);
  --md-surface-muted: #ede6da;
  --md-elevated: var(--prompt-shadow);
  --md-outline: rgba(25, 21, 18, 0.16);
  --md-outline-strong: var(--prompt-stroke-strong);
  --md-primary: var(--prompt-ink);
  --md-primary-soft: rgba(25, 21, 18, 0.1);
  --md-on-primary: #f5f3eb;
  --md-text: var(--prompt-ink);
  --md-muted: var(--prompt-ink-soft);
  --md-cream: #f6ebd8;
  background:
    radial-gradient(circle at 50% 38%, rgba(42, 42, 42, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(246, 235, 216, 0.2), rgba(246, 235, 216, 0.72)),
    url('../assets/images/Background2.png') center / cover fixed,
    var(--prompt-paper);
  color: var(--prompt-ink);
}

.prompt-screen-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 16px 0 32px;
  display: grid;
  gap: 16px;
}

.prompt-screen-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.prompt-auth-gate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 280px;
  padding: 22px;
  border: 1px solid var(--md-outline);
  border-radius: 18px;
  background: var(--prompt-panel);
  box-shadow: var(--prompt-shadow);
  backdrop-filter: blur(18px);
}

body.is-signed-in .prompt-auth-gate {
  display: none;
}

body:not(.is-signed-in) .prompt-screen-layout {
  display: none;
}

.prompt-auth-gate__mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--prompt-stroke);
  border-radius: 18px;
  background: var(--prompt-button);
  color: var(--prompt-card);
  font-size: 1.3rem;
}

.prompt-auth-gate h1 {
  margin: 4px 0 8px;
  color: var(--prompt-ink);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
}

.prompt-auth-gate .muted {
  margin: 0;
  color: var(--prompt-ink-soft);
  font-weight: 700;
}

.prompt-auth-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.prompt-control-panel,
.live-prompt-card {
  border: 1px solid var(--md-outline);
  border-radius: 18px;
  background: var(--prompt-panel);
  box-shadow: var(--md-elevated);
  backdrop-filter: blur(18px);
}

.prompt-control-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 16px;
}

.prompt-control-heading {
  display: grid;
  gap: 8px;
}

.prompt-control-heading h1,
.prompt-control-group h2 {
  margin: 0;
  color: var(--md-primary);
  line-height: 1.05;
}

.prompt-control-heading h1 {
  font-size: 2.35rem;
  font-weight: 800;
}

.prompt-control-heading .muted {
  margin: 0;
  font-weight: 700;
}

.prompt-control-group {
  display: grid;
  gap: 10px;
}

.prompt-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prompt-control-group h2 {
  font-size: 1.05rem;
}

.prompt-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--md-outline);
  border-radius: 8px;
  background: rgba(25, 21, 18, 0.06);
  color: var(--md-primary);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.preset-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--md-outline);
  border-radius: 16px;
  background: rgba(25, 21, 18, 0.05);
}

.preset-chip {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--prompt-ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.preset-chip:hover {
  border-color: var(--md-outline);
  color: var(--prompt-ink);
}

.preset-chip.is-active {
  border-color: var(--prompt-button);
  background: var(--prompt-button);
  color: var(--prompt-card);
}

.deck-list {
  display: grid;
  gap: 8px;
}

.deck-toggle {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--md-outline);
  border-radius: 16px;
  background: rgba(245, 243, 235, 0.86);
  color: var(--md-text);
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.deck-toggle:hover {
  border-color: var(--md-outline-strong);
  box-shadow: 0 8px 18px rgba(25, 21, 18, 0.1);
}

.deck-toggle.is-selected {
  border-color: var(--prompt-button);
  background: color-mix(in srgb, var(--prompt-card-strong) 78%, var(--prompt-stroke) 22%);
}

.deck-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.deck-toggle__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--md-outline);
  border-radius: 14px;
  background: var(--md-surface-strong);
  color: var(--md-primary);
}

.deck-toggle.is-selected .deck-toggle__icon {
  border-color: var(--md-primary);
  background: var(--md-primary);
  color: var(--md-on-primary);
}

.deck-toggle__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.deck-toggle__copy strong,
.prompt-repeat-toggle strong {
  color: var(--md-primary);
  font-size: 0.95rem;
  line-height: 1.1;
}

.deck-toggle__copy small,
.prompt-repeat-toggle small {
  color: var(--md-muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
}

.prompt-selection-actions,
.prompt-action-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prompt-repeat-toggle {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--md-outline);
  border-radius: 16px;
  background: rgba(25, 21, 18, 0.05);
  cursor: pointer;
}

.prompt-repeat-toggle input {
  appearance: none;
  width: 40px;
  height: 24px;
  margin: 0;
  border: 1px solid var(--md-outline-strong);
  border-radius: 999px;
  background: var(--md-surface);
  cursor: pointer;
  position: relative;
  transition:
    background-color 140ms ease,
    border-color 140ms ease;
}

.prompt-repeat-toggle input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--md-muted);
  transition:
    background-color 140ms ease,
    transform 140ms ease;
}

.prompt-repeat-toggle input:checked {
  border-color: var(--md-primary);
  background: var(--md-primary);
}

.prompt-repeat-toggle input:checked::after {
  background: var(--md-on-primary);
  transform: translateX(16px);
}

.prompt-action-panel .md-button {
  flex: 1 1 120px;
}

.prompt-action-panel .md-button.primary {
  flex-basis: 100%;
  min-height: 56px;
  background: var(--prompt-button);
  color: var(--prompt-card);
}

.prompt-status {
  min-height: 1.35em;
  margin: 0;
  color: var(--md-muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.prompt-status[data-tone='error'] {
  color: var(--tomato, #cf2b25);
}

.prompt-status[data-tone='success'] {
  color: #42764a;
}

.prompt-stage {
  min-height: 660px;
  display: grid;
}

.live-prompt-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 100%;
  padding: clamp(16px, 2.2vw, 28px) clamp(16px, 2.2vw, 28px) clamp(18px, 2.8vw, 34px);
  overflow: hidden;
  cursor: pointer;
  color: var(--prompt-ink);
  isolation: isolate;
}

.live-prompt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fffaf0;
}

.live-prompt-card::after {
  content: '';
  position: absolute;
  inset: clamp(16px, 2.2vw, 28px);
  z-index: -1;
  border: 1px solid rgba(25, 21, 18, 0.08);
  border-radius: 4px;
  pointer-events: none;
}

.live-prompt-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--md-cream) 70%, transparent);
  outline-offset: 3px;
}

.live-prompt-card__topline,
.live-prompt-card__footer {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.live-prompt-card__deck,
.live-prompt-card__progress,
.live-prompt-card__footer span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--md-outline);
  border-radius: 999px;
  background: rgba(245, 243, 235, 0.74);
  color: var(--md-primary);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
}

.live-prompt-card__progress,
.live-prompt-card__footer span:last-child {
  color: var(--md-muted);
}

.live-prompt-card__photo {
  min-height: 0;
  display: grid;
  align-content: center;
  padding: clamp(22px, 4vw, 58px);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 42%, rgba(42, 42, 42, 0.84), rgba(15, 14, 13, 0.38) 62%, rgba(9, 8, 7, 0.14)),
    linear-gradient(180deg, rgba(10, 8, 7, 0.08), rgba(10, 8, 7, 0.58)),
    url('../assets/images/Background2.png') center / cover,
    var(--prompt-card);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 240, 0.46);
}

.live-prompt-card__brand {
  min-height: clamp(46px, 7vw, 70px);
  display: grid;
  place-items: center;
}

.live-prompt-card__brand img {
  width: clamp(92px, 12vw, 142px);
  height: auto;
}

.live-prompt-card__copy {
  display: grid;
  align-content: center;
  gap: 20px;
}

.live-prompt-card__copy h2 {
  display: none;
  margin: 0;
  color: rgba(255, 250, 240, 0.78);
  font-family: var(--text-caps, 'Montserrat', sans-serif);
  font-size: clamp(0.9rem, 1.3vw, 1.25rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.live-prompt-card__copy p {
  max-width: 900px;
  margin: 0;
  color: #fffaf0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  font-weight: 900;
  line-height: 1.02;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.live-prompt-card.is-long .live-prompt-card__copy p {
  font-size: clamp(1.7rem, 4vw, 3.7rem);
  line-height: 1.08;
}

.live-prompt-card.is-extra-long .live-prompt-card__copy p {
  font-size: clamp(1.35rem, 3vw, 2.9rem);
  line-height: 1.12;
}

.live-prompt-card__other {
  padding: 16px;
  border: 1px solid rgba(255, 250, 240, 0.3);
  border-radius: 16px;
  background: rgba(22, 22, 22, 0.34);
  color: rgba(255, 250, 240, 0.82) !important;
  font-size: 1.45rem !important;
  line-height: 1.25 !important;
}

.live-prompt-card__other[hidden] {
  display: none !important;
}

body.is-presenting {
  overflow: hidden;
}

body.is-presenting .prompt-screen-shell {
  width: 100vw;
  height: 100vh;
  padding: 0;
}

body.is-presenting.prompt-screen-page {
  background:
    linear-gradient(180deg, rgba(9, 7, 6, 0.48), rgba(9, 7, 6, 0.72)),
    url('../assets/images/Background2.png') center / cover,
    #151210;
}

body.is-presenting [data-admin-header],
body.is-presenting [data-admin-footer],
body.is-presenting .prompt-control-panel,
body.is-presenting .admin-footer {
  display: none !important;
}

body.is-presenting .prompt-screen-layout,
body.is-presenting .prompt-stage {
  display: grid;
  grid-template-columns: 1fr;
  width: 100vw;
  min-height: 100vh;
}

body.is-presenting .live-prompt-card {
  width: min(1180px, calc(100vw - 56px));
  min-height: min(820px, calc(100vh - 56px));
  place-self: center;
  border-color: rgba(25, 21, 18, 0.16);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  padding: clamp(18px, 3vw, 38px) clamp(18px, 3vw, 38px) clamp(22px, 3.6vw, 48px);
}

body.is-presenting .live-prompt-card__copy h2 {
  font-size: clamp(1rem, 1.8vw, 1.45rem);
}

body.is-presenting .live-prompt-card__copy p {
  font-size: clamp(2.4rem, 6vw, 5.8rem);
}

body.is-presenting .live-prompt-card.is-long .live-prompt-card__copy p {
  font-size: clamp(2rem, 5vw, 4.6rem);
}

body.is-presenting .live-prompt-card.is-extra-long .live-prompt-card__copy p {
  font-size: clamp(1.6rem, 4vw, 3.5rem);
}

body.is-presenting .live-prompt-card__other {
  font-size: 1.8rem !important;
}

@media (max-width: 980px) {
  .prompt-screen-layout {
    grid-template-columns: 1fr;
  }

  .prompt-auth-gate {
    grid-template-columns: 1fr;
  }

  .prompt-auth-actions {
    justify-content: flex-start;
  }

  .prompt-stage {
    min-height: 560px;
  }
}

@media (max-width: 680px) {
  .prompt-screen-shell {
    width: min(100vw - 20px, 1240px);
    padding-top: 10px;
  }

  .prompt-auth-gate,
  .prompt-control-panel,
  .live-prompt-card {
    padding: 14px;
  }

  .prompt-control-heading h1 {
    font-size: 2rem;
  }

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

  .prompt-auth-actions,
  .prompt-selection-actions,
  .prompt-action-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .prompt-auth-actions .md-button,
  .prompt-selection-actions .md-button,
  .prompt-action-panel .md-button {
    width: 100%;
  }

  .prompt-stage {
    min-height: 520px;
  }

  .live-prompt-card {
    gap: 18px;
  }

  .live-prompt-card__topline,
  .live-prompt-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-prompt-card__brand {
    min-height: 48px;
  }

  .live-prompt-card__copy h2 {
    font-size: 0.9rem;
  }

  .live-prompt-card__copy p {
    font-size: clamp(1.75rem, 8vw, 2.7rem);
  }

  .live-prompt-card.is-long .live-prompt-card__copy p {
    font-size: clamp(1.45rem, 6.8vw, 2.1rem);
  }

  .live-prompt-card.is-extra-long .live-prompt-card__copy p {
    font-size: clamp(1.18rem, 5.5vw, 1.65rem);
  }

  .live-prompt-card__other {
    font-size: 1.02rem !important;
  }

  body.is-presenting .live-prompt-card {
    width: 100vw;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 22px;
  }
}
