:root {
  color-scheme: dark;
  --bg: #0e141d;
  --panel: rgba(18, 26, 38, 0.92);
  --panel-strong: rgba(24, 35, 50, 0.98);
  --line: rgba(255, 255, 255, 0.13);
  --ink: #f7f9fc;
  --muted: #aab6c7;
  --accent: #20c77f;
  --warn: #ffcc58;
  --blue: #54a2ff;
  --danger: #ff6f68;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(32, 199, 127, 0.16), transparent 28%),
    radial-gradient(circle at 92% 0%, rgba(255, 204, 88, 0.15), transparent 25%),
    linear-gradient(135deg, #101721 0%, #172235 52%, #0d121a 100%);
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(720px, 1fr) minmax(460px, 520px);
  gap: 18px;
  padding: 18px;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(32, 199, 127, 0.16), transparent 30%),
    rgba(5, 9, 14, 0.88);
  backdrop-filter: blur(14px);
}

.login-overlay.is-hidden {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.login-card h1 {
  margin: 0;
}

.login-card input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(4, 9, 15, 0.62);
  color: var(--ink);
  outline: none;
}

.login-error {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
}

.stage-panel,
.control-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.stage-panel {
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(150px, auto) auto;
  gap: 18px;
  padding: 24px;
}

.stage-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warn);
  font-size: 13px;
  font-weight: 900;
}

.stage-title-input {
  width: min(720px, 58vw);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 42px;
  font-weight: 900;
  outline: none;
}

.stage-title-text {
  margin: 0;
  color: var(--ink);
  font-size: 42px;
  font-weight: 900;
}

.stage-counter {
  width: 118px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 204, 88, 0.38);
  border-radius: 8px;
  background: rgba(255, 204, 88, 0.11);
}

.stage-counter span {
  font-size: 42px;
  font-weight: 900;
  color: var(--warn);
}

.stage-counter small {
  margin-top: -28px;
  color: var(--muted);
}

.main-question {
  display: grid;
  align-content: center;
  gap: 24px;
  min-height: 380px;
  padding: 42px 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.question-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.question-strip span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(32, 199, 127, 0.16);
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.main-question p {
  margin: 0;
  font-size: clamp(38px, 4.8vw, 76px);
  line-height: 1.16;
  font-weight: 900;
}

.queue-panel {
  min-height: 150px;
}

.queue-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.queue-heading h2 {
  margin: 0;
  font-size: 24px;
}

.queue-heading span,
.control-heading p,
.field span,
.item-meta,
.empty {
  color: var(--muted);
}

.stage-queue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.queue-item,
.question-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.queue-item {
  min-height: 118px;
  padding: 14px;
}

.queue-item span {
  color: var(--warn);
  font-weight: 900;
}

.queue-item p {
  margin: 8px 0 0;
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.ticker-panel {
  --ticker-text: var(--warn);
  --ticker-bg: #2b2414;
  --ticker-size: 22px;
  --ticker-speed: 32s;
  --ticker-weight: 900;
  overflow: hidden;
  min-height: 54px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: var(--ticker-bg);
}

.ticker-panel.ticker-borderless {
  border-color: transparent;
}

.ticker-panel.ticker-top {
  order: -1;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll var(--ticker-speed) linear infinite;
}

.ticker-track span {
  flex: 0 0 auto;
  padding: 0 34px;
  color: var(--ticker-text);
  font-size: var(--ticker-size);
  font-weight: var(--ticker-weight);
  white-space: nowrap;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.control-card {
  height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 18px;
  overflow: hidden;
}

.control-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

h1 {
  margin-bottom: 6px;
  font-size: 28px;
}

.tabs,
.filter-row,
.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.display-link-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tabs {
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.tab,
.filter,
.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.tab.active,
.filter.active,
.button.primary {
  border-color: rgba(32, 199, 127, 0.7);
  background: var(--accent);
  color: #06110c;
  font-weight: 900;
}

.icon-button.muted {
  color: var(--muted);
}

.tab.active {
  border-bottom-color: var(--accent);
}

.button.secondary {
  border-color: rgba(84, 162, 255, 0.58);
  background: rgba(84, 162, 255, 0.18);
}

.button.ghost {
  background: transparent;
}

.tab-panel {
  min-height: 0;
  display: none;
  overflow: hidden;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

#backupTab.active {
  display: flex;
  flex-direction: column;
}

.field {
  display: grid;
  gap: 8px;
}

.field textarea,
.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 9, 15, 0.62);
  color: var(--ink);
  outline: none;
}

.field textarea {
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
  min-height: 104px;
}

.field select,
.field input {
  min-height: 38px;
  padding: 0 10px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: end;
}

.setting-block {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.setting-title {
  display: grid;
  gap: 4px;
}

.setting-title strong {
  color: var(--ink);
  font-size: 16px;
}

.setting-title span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.backup-library {
  min-height: 520px;
}

.compact-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.inline-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.inline-control select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(4, 9, 15, 0.62);
  color: var(--ink);
}

.ticker-style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.ticker-style-grid input[type="color"] {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: rgba(4, 9, 15, 0.62);
}

.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.item-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: visible;
  padding-right: 0;
}

.backup-list {
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.question-item {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.question-item.is-live {
  border-color: rgba(32, 199, 127, 0.7);
}

.question-item.is-queued {
  border-color: rgba(255, 204, 88, 0.58);
}

.question-item p {
  margin: 0;
  line-height: 1.5;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 204, 88, 0.15);
  color: var(--warn);
  font-weight: 900;
}

.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 14px;
}

.empty {
  margin: 0;
  padding: 18px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.display-only .app-shell {
  min-height: 100vh;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 0;
  overflow: hidden;
}

.display-only {
  --live-title: #263342;
  --live-eyebrow: #1f8d72;
  --live-card: rgba(255, 255, 255, 0.62);
  --live-card-line: rgba(122, 96, 58, 0.12);
  --live-card-shadow: rgba(125, 92, 47, 0.14);
  --live-question: #182632;
  --live-pill-bg: rgba(31, 141, 114, 0.12);
  --live-pill-text: #16745f;
  --live-soft-card: rgba(255, 255, 255, 0.58);
  --live-soft-text: rgba(33, 50, 62, 0.86);
  --live-accent: #1f8d72;
  --live-warn: #d89527;
}

.display-only .stage-panel {
  position: relative;
  isolation: isolate;
  width: min(100vw, 56.25vh);
  height: min(100vh, 177.78vw);
  min-height: auto;
  aspect-ratio: 9 / 16;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #eef7f3;
  box-shadow: none;
  backdrop-filter: none;
}

.display-only .stage-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: none;
  opacity: 1;
}

.display-only .stage-panel::after {
  content: "";
  position: absolute;
  inset: auto -18% 0 -18%;
  z-index: -1;
  height: 49%;
  background: none;
  transform: none;
  transform-origin: left bottom;
}

.display-only .stage-header {
  position: absolute;
  top: 5.2%;
  left: 7.4%;
  right: 7.4%;
  min-height: auto;
  align-items: flex-start;
  gap: 18px;
  z-index: 2;
}

.display-only .eyebrow {
  margin-bottom: clamp(6px, 0.9vh, 12px);
  color: var(--live-eyebrow);
  font-size: clamp(14px, 1.55vh, 22px);
  letter-spacing: 0;
}

.display-only .main-question {
  position: absolute;
  top: 15%;
  left: 7.4%;
  right: 7.4%;
  height: 30%;
  z-index: 2;
  align-content: center;
  min-height: auto;
  overflow: hidden;
  padding: clamp(18px, 3.2vh, 40px) clamp(22px, 3.6vh, 46px);
  border: 0;
  border-radius: clamp(18px, 2.6vh, 32px);
  border: 1px solid var(--live-card-line);
  background: var(--live-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 18px 52px var(--live-card-shadow);
  backdrop-filter: blur(12px);
}

.display-only .question-strip span {
  min-height: clamp(36px, 4.1vh, 52px);
  padding: 0 clamp(14px, 2vh, 22px);
  background: var(--live-pill-bg);
  color: var(--live-pill-text);
  font-size: clamp(17px, 2.1vh, 28px);
}

.display-only .stage-title-text {
  max-width: 100%;
  color: var(--live-title);
  font-size: clamp(34px, 4.4vh, 58px);
  line-height: 1.08;
  text-shadow: 0 5px 18px rgba(255, 255, 255, 0.38);
}

.display-only .stage-counter {
  width: clamp(84px, 10vh, 132px);
  border: 1px solid var(--live-card-line);
  border-radius: clamp(14px, 1.8vh, 22px);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.display-only .stage-counter span {
  color: var(--live-warn);
  font-size: clamp(28px, 4.2vh, 54px);
}

.display-only .stage-counter small {
  margin-top: clamp(-34px, -2.8vh, -18px);
  color: rgba(39, 54, 64, 0.66);
  font-size: clamp(12px, 1.45vh, 18px);
}

.display-only .main-question p {
  color: var(--live-question);
  font-size: clamp(32px, 4.65vh, 66px);
  line-height: 1.14;
  text-shadow: none;
}

.display-only .main-question.is-long p {
  font-size: clamp(26px, 3.65vh, 52px);
  line-height: 1.16;
}

.display-only .main-question.is-very-long p {
  font-size: clamp(21px, 2.95vh, 40px);
  line-height: 1.2;
}

.display-only .queue-panel {
  position: absolute;
  top: 46.6%;
  left: 7.4%;
  right: 7.4%;
  z-index: 2;
  min-height: 0;
}

.display-only .queue-heading {
  margin-bottom: clamp(6px, 0.8vh, 10px);
}

.display-only .queue-heading h2 {
  color: var(--live-title);
  font-size: clamp(16px, 1.9vh, 24px);
}

.display-only .queue-heading span {
  color: rgba(39, 54, 64, 0.56);
  font-size: clamp(12px, 1.35vh, 16px);
}

.display-only .stage-queue {
  grid-template-columns: 1fr;
  gap: clamp(7px, 0.8vh, 10px);
}

.display-only .queue-item {
  min-height: 0;
  padding: clamp(9px, 1.15vh, 14px) clamp(12px, 1.75vh, 20px);
  border: 0;
  border-left: 4px solid var(--live-accent);
  border-radius: clamp(12px, 1.6vh, 18px);
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(10px);
}

.display-only .queue-item:nth-child(n + 2) {
  display: none;
}

.display-only .queue-item span {
  color: var(--live-accent);
  font-size: clamp(11px, 1.25vh, 15px);
}

.display-only .queue-item p {
  margin-top: clamp(3px, 0.45vh, 6px);
  color: var(--live-soft-text);
  font-size: clamp(15px, 1.75vh, 22px);
  line-height: 1.35;
  -webkit-line-clamp: 1;
}

.display-only .ticker-panel {
  position: absolute;
  left: 7.4%;
  right: 7.4%;
  bottom: 3.2%;
  z-index: 2;
  min-height: clamp(50px, 5.6vh, 76px);
  border-radius: clamp(14px, 1.9vh, 22px);
  box-shadow: 0 14px 40px rgba(104, 74, 38, 0.12);
  backdrop-filter: blur(10px);
}

.display-only .ticker-track span {
  font-size: clamp(18px, 2.2vh, var(--ticker-size));
}

.display-only.theme-bookshelf {
  --live-title: #2a3d34;
  --live-eyebrow: #2f8a70;
  --live-card: rgba(255, 255, 255, 0.58);
  --live-card-line: rgba(118, 91, 55, 0.13);
  --live-card-shadow: rgba(104, 74, 38, 0.14);
  --live-question: #22332d;
  --live-pill-bg: rgba(47, 138, 112, 0.13);
  --live-pill-text: #25775f;
  --live-soft-card: rgba(255, 255, 255, 0.52);
  --live-soft-text: rgba(39, 58, 51, 0.86);
  --live-accent: #2f8a70;
  --live-warn: #c9892f;
}

.display-only.theme-bookshelf .stage-panel {
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.08) 0%, rgba(255, 248, 232, 0.2) 44%, rgba(254, 241, 211, 0.42) 100%),
    url("./assets/live-bg-plant.png") center / cover no-repeat;
}

.display-only.theme-bookshelf .stage-panel::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02) 44%, rgba(255, 248, 232, 0.2));
  opacity: 1;
}

.display-only.theme-bookshelf .stage-panel::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(246, 225, 183, 0.12) 36%, rgba(224, 191, 134, 0.22) 100%);
}

.display-only.theme-bookshelf .ticker-panel {
  --ticker-bg: rgba(44, 104, 84, 0.88) !important;
  --ticker-text: #fff7d7 !important;
}

.display-only.theme-classroom {
  --live-title: #203a42;
  --live-eyebrow: #287f8e;
  --live-card: rgba(255, 255, 255, 0.6);
  --live-card-line: rgba(118, 91, 55, 0.13);
  --live-card-shadow: rgba(104, 74, 38, 0.14);
  --live-question: #1f3340;
  --live-pill-bg: rgba(40, 127, 142, 0.12);
  --live-pill-text: #287f8e;
  --live-soft-card: rgba(255, 255, 255, 0.58);
  --live-soft-text: rgba(38, 57, 67, 0.86);
  --live-accent: #287f8e;
  --live-warn: #bd8a31;
}

.display-only.theme-classroom .stage-panel {
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.08) 0%, rgba(255, 248, 232, 0.2) 44%, rgba(254, 241, 211, 0.42) 100%),
    url("./assets/live-bg-bookshelf-v2.png") center / cover no-repeat;
}

.display-only.theme-classroom .stage-panel::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.02) 44%, rgba(255, 248, 232, 0.2));
  opacity: 1;
}

.display-only.theme-classroom .stage-panel::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(196, 229, 224, 0.58) 34%, rgba(166, 211, 205, 0.72) 100%),
    linear-gradient(90deg, rgba(40, 127, 142, 0.12), transparent 44%, rgba(189, 138, 49, 0.08));
}

.display-only.theme-classroom .ticker-panel {
  --ticker-bg: rgba(36, 116, 130, 0.88) !important;
  --ticker-text: #f8fdff !important;
}

.display-only.theme-desk {
  --live-title: #3d3d32;
  --live-eyebrow: #5d8b62;
  --live-card: rgba(255, 255, 255, 0.58);
  --live-card-line: rgba(118, 91, 55, 0.13);
  --live-card-shadow: rgba(104, 74, 38, 0.14);
  --live-question: #303427;
  --live-pill-bg: rgba(93, 139, 98, 0.13);
  --live-pill-text: #4f7f55;
  --live-soft-card: rgba(255, 255, 255, 0.56);
  --live-soft-text: rgba(58, 60, 43, 0.85);
  --live-accent: #5d8b62;
  --live-warn: #b1782d;
}

.display-only.theme-desk .stage-panel {
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.08) 0%, rgba(255, 248, 232, 0.2) 44%, rgba(254, 241, 211, 0.42) 100%),
    url("./assets/live-bg-desk-v2.png") center / cover no-repeat;
}

.display-only.theme-desk .stage-panel::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.02) 44%, rgba(255, 248, 232, 0.2));
  opacity: 1;
}

.display-only.theme-desk .stage-panel::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(217, 229, 206, 0.64) 32%, rgba(197, 216, 190, 0.78) 100%),
    linear-gradient(90deg, rgba(177, 120, 45, 0.09), transparent 42%, rgba(93, 139, 98, 0.12));
}

.display-only.theme-desk .ticker-panel {
  --ticker-bg: rgba(103, 124, 74, 0.9) !important;
  --ticker-text: #fff8dc !important;
}

.admin-page .app-shell {
  grid-template-columns: minmax(620px, 1fr) 360px;
  align-items: start;
}

.admin-page .control-panel {
  order: 1;
  min-width: 0;
}

.admin-page .stage-panel {
  order: 2;
  position: sticky;
  top: 18px;
  min-height: auto;
  max-height: calc(100vh - 36px);
  grid-template-rows: auto auto auto auto;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
}

.admin-page .control-card {
  height: calc(100vh - 36px);
}

.admin-page .stage-header {
  min-height: 0;
  gap: 12px;
}

.admin-page .stage-header .eyebrow {
  margin-bottom: 4px;
  font-size: 12px;
}

.admin-page .stage-title-input {
  width: 100%;
  font-size: 24px;
}

.admin-page .stage-counter {
  width: 72px;
}

.admin-page .stage-counter span {
  font-size: 24px;
}

.admin-page .stage-counter small {
  margin-top: -18px;
  font-size: 12px;
}

.admin-page .main-question {
  min-height: 178px;
  gap: 12px;
  padding: 18px;
}

.admin-page .question-strip {
  align-items: flex-start;
}

.admin-page .question-strip span {
  min-height: 28px;
  padding: 0 10px;
  font-size: 14px;
}

.admin-page .question-strip .icon-button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.admin-page .display-link-group {
  max-width: 210px;
}

.admin-page .main-question p {
  font-size: 24px;
  line-height: 1.28;
}

.admin-page .queue-panel {
  min-height: auto;
}

.admin-page .queue-heading {
  margin-bottom: 8px;
}

.admin-page .queue-heading h2 {
  font-size: 16px;
}

.admin-page .queue-heading span {
  font-size: 12px;
}

.admin-page .stage-queue {
  grid-template-columns: 1fr;
  gap: 8px;
}

.admin-page .queue-item {
  min-height: 78px;
  padding: 10px;
}

.admin-page .queue-item:nth-child(n + 3) {
  display: none;
}

.admin-page .queue-item span {
  font-size: 12px;
}

.admin-page .queue-item p {
  margin-top: 4px;
  font-size: 14px;
  -webkit-line-clamp: 2;
}

.admin-page .ticker-panel {
  min-height: 38px;
}

.admin-page .ticker-track span {
  padding: 0 22px;
  font-size: 14px;
}

.admin-page .control-heading h1 {
  font-size: 34px;
}

.admin-page .control-heading p {
  font-size: 15px;
}

.admin-page .tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 10px;
  background: var(--panel);
}

.admin-page .tab,
.admin-page .filter,
.admin-page .button {
  min-height: 42px;
}

.admin-page .setting-block {
  padding: 18px;
}

.admin-page .ticker-style-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-page .backup-library {
  min-height: 590px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .control-card {
    height: auto;
    min-height: 720px;
  }

  .tab-panel.active {
    max-height: none;
  }

  .backup-list {
    max-height: 520px;
  }

  .admin-page .app-shell {
    grid-template-columns: 1fr;
  }

  .admin-page .stage-panel {
    position: static;
    order: 2;
  }

  .admin-page .control-panel {
    order: 1;
  }

  .admin-page .ticker-style-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px;
  }

  .stage-panel {
    padding: 14px;
  }

  .stage-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .stage-title-input {
    width: 100%;
    font-size: 32px;
  }

  .stage-title-text {
    font-size: 32px;
  }

  .main-question {
    padding: 24px;
  }

  .stage-queue {
    grid-template-columns: 1fr;
  }

  .ticker-style-grid {
    grid-template-columns: 1fr 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .backup-library {
    min-height: 300px;
  }
}
