:root {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: #20232b;
  background: #f4f5f7;
  --red: #c92837;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 650;
  background: var(--red);
  color: white;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button.secondary {
  background: #f0f1f3;
  color: #303641;
}
a {
  color: inherit;
}
header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
}
header strong {
  font-size: 18px;
}
header span {
  color: #757982;
  font-size: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mark {
  width: 32px;
  height: 32px;
  background: var(--red);
  border-radius: 8px;
  color: white;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.layout {
  max-width: 1200px;
  padding: 24px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: start;
}
.hero {
  border-radius: 24px;
  background: #252b36;
  color: white;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  min-height: 550px;
}
.hero:after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border: 44px solid #ffffff08;
  transform: rotate(35deg);
  right: -90px;
  bottom: -50px;
  pointer-events: none;
}
.eyebrow {
  letter-spacing: 3px;
  font-size: 13px;
  color: #bfc5d0;
}
.hero h1 {
  font-size: 52px;
  line-height: 1.25;
  letter-spacing: 2px;
  margin: 32px 0 18px;
}
.hero > p {
  color: #bfc5d0;
  line-height: 1.8;
}
.session-grid {
  display: grid;
  gap: 12px;
  margin-top: 40px;
}
.session {
  background: #ffffff0b;
  border: 1px solid #ffffff20;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.session h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.session p {
  margin: 0;
  font-size: 14px;
  color: #c3c8d0;
}
.session small {
  color: #e6bca0;
}
.panel {
  background: white;
  border: 1px solid #e8e9ec;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 8px 30px #20232b04;
}
.status {
  font-size: 14px;
  color: var(--red);
  background: #fff0f1;
  border-radius: 6px;
  padding: 6px 10px;
  display: inline-block;
}
.panel h2 {
  font-size: 26px;
  margin: 18px 0 10px;
}
.muted {
  color: #6e7480;
  font-size: 14px;
  line-height: 1.7;
}
.countdown {
  display: flex;
  gap: 8px;
  margin: 20px 0 26px;
}
.time {
  flex: 1;
  background: #f5f6f8;
  text-align: center;
  border-radius: 10px;
  padding: 12px 4px;
}
.time b {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  display: block;
}
.time span {
  font-size: 13px;
  color: #747a85;
}
label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin: 18px 0 8px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #dfe2e7;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  color: #20232b;
  min-height: 50px;
}
input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #dd677866;
  outline-offset: 2px;
}
textarea {
  min-height: 200px;
  font-family: monospace;
  font-size: 14px;
}
.actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.hint {
  font-size: 13px;
  color: #777e88;
  text-align: center;
  margin-top: 18px;
}
.error {
  color: #a21c2a;
  background: #fff0f1;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0;
}
.hidden {
  display: none !important;
}
.demo {
  max-width: 1152px;
  margin: 16px auto 32px;
  border: 1px dashed #ced2da;
  border-radius: 14px;
  padding: 18px;
  background: #fafbfc;
}
.demo summary {
  cursor: pointer;
  color: #656d79;
  font-size: 14px;
}
.demo button {
  font-size: 13px;
  min-height: 42px;
  padding: 8px 12px;
  margin: 8px 6px 0 0;
  background: #e8ebf0;
  color: #39414f;
}
.ticket {
  background: #fff5f3;
  border: 1px solid #f0c3bb;
  border-radius: 16px;
  padding: 28px 22px;
  margin: 24px 0;
  text-align: center;
}
.ticket.east {
  background: #eff5ff;
  border-color: #bccded;
}
.ticket .name {
  font-size: 32px;
  font-weight: 750;
  margin: 24px 0 6px;
}
.ticket h3 {
  font-size: 24px;
  margin: 20px 0 12px;
}
.ticket p {
  line-height: 1.8;
}
.ticket hr {
  border: 0;
  border-top: 1px dashed #d8b8b2;
  margin: 24px 0;
}
.success-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e4f5ec;
  color: #247852;
  font-size: 30px;
  display: grid;
  place-items: center;
  margin: 0 auto;
}
.result-heading {
  text-align: center;
}
.poster {
  width: 100%;
  border-radius: 12px;
}
.admin {
  max-width: 1000px;
  margin: auto;
  padding: 24px;
}
.admin nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.admin section {
  margin: 20px 0;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}
th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}
footer {
  text-align: center;
  font-size: 13px;
  color: #858b95;
  padding: 24px;
}
dialog {
  border: 0;
  border-radius: 20px;
  max-width: 440px;
  width: calc(100% - 32px);
  padding: 20px;
}
dialog::backdrop {
  background: #0009;
}
@media (max-width: 1023px) {
  .layout {
    max-width: 720px;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero {
    min-height: auto;
    padding: 30px;
  }
  .hero h1 {
    font-size: 38px;
    margin: 20px 0 12px;
  }
  .session-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: 26px;
  }
  .session {
    display: block;
  }
  .session small {
    display: block;
    margin-top: 10px;
  }
  .demo {
    margin: 12px 24px;
  }
}
@media (max-width: 767px) {
  header {
    height: 62px;
    padding: 0 20px;
  }
  header strong {
    font-size: 16px;
  }
  header span {
    font-size: 12px;
  }
  .layout {
    padding: 8px 16px 16px;
    gap: 16px;
  }
  .hero {
    padding: 26px 22px;
    border-radius: 18px;
  }
  .hero h1 {
    font-size: 34px;
    line-height: 1.3;
    letter-spacing: 1px;
  }
  .hero > p {
    font-size: 14px;
    margin-bottom: 0;
  }
  .eyebrow {
    font-size: 12px;
    letter-spacing: 2px;
  }
  .session-grid {
    gap: 10px;
    margin-top: 24px;
  }
  .session {
    padding: 14px 12px;
  }
  .session h3 {
    font-size: 17px;
  }
  .session p,
  .session small {
    font-size: 12px;
    line-height: 1.6;
  }
  .panel {
    padding: 24px 20px;
    border-radius: 18px;
  }
  .panel h2 {
    font-size: 24px;
  }
  .time b {
    font-size: 26px;
  }
  .demo {
    margin: 8px 16px 20px;
    padding: 14px;
  }
  .row {
    grid-template-columns: 1fr;
  }
  .admin {
    padding: 16px;
  }
  .ticket {
    padding: 24px 14px;
  }
  footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 767px) {
  .hero {
    padding: 22px;
  }
  .hero h1 {
    font-size: 28px;
    margin: 16px 0;
  }
  .hero h1 br {
    display: none;
  }
  .hero > p {
    display: none;
  }
  .session-grid {
    margin-top: 18px;
  }
  .session p {
    font-size: 14px;
  }
  .session small {
    font-size: 13px;
  }
  .eyebrow {
    letter-spacing: 1px;
  }
}

.admin input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  height: 22px;
}
.admin nav span {
  align-self: center;
}
.admin .node {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.scene-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.scene-stat {
  padding: 16px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 14px;
}
.scene-stat span {
  display: block;
  color: #b32336;
  font-size: 14px;
  margin-top: 8px;
}
.scene-stat p {
  font-size: 15px;
  line-height: 1.9;
}
.scene-stat small {
  color: #69717e;
}
.admin-toast {
  position: fixed;
  z-index: 1000;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: #243345;
  color: white;
  border-radius: 12px;
  padding: 16px 20px;
  width: max-content;
  max-width: calc(100% - 32px);
  box-shadow: 0 4px 20px #0004;
  font-size: 16px;
}
#feedback {
  max-height: 85dvh;
  overflow: auto;
}
#feedback pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.8;
}
#stats {
  white-space: pre-line;
}
#feedback button {
  width: 100%;
}
@media (max-width: 767px) {
  .scene-stats {
    grid-template-columns: 1fr;
  }
  .scene-stat {
    padding: 14px;
  }
  .scene-stat p {
    margin: 8px 0;
  }
  #tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f4f5f7;
    padding: 10px 0;
  }
}

#importDialog {
  width: calc(100% - 32px);
  max-width: 1000px;
  max-height: 90dvh;
}
#importSummary {
  white-space: pre-line;
  line-height: 1.8;
}
#importProblems {
  white-space: pre-wrap;
  color: #a42c38;
  font: inherit;
  line-height: 1.7;
}
#importSample {
  max-height: 40dvh;
}
#importDialog .actions {
  position: sticky;
  bottom: 0;
  background: white;
  padding-top: 12px;
}
textarea {
  white-space: pre;
  min-height: 160px;
}

#scheduleState {
  display: block;
  padding: 14px;
  background: #f0f1f3;
  border-radius: 10px;
  font-weight: 500;
}
