* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #f3e2b8;
  font-family: "KaiTi", "STKaiti", "Songti SC", "SimSun", serif;
  overflow: hidden;
}

canvas {
  display: block;
}

.panel {
  position: fixed;
  top: 18px;
  left: 18px;
  width: min(400px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 16px 16px 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(214, 178, 94, 0.45);
  box-shadow: 0 0 24px rgba(214, 178, 94, 0.12);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.panel h1 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.panel ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.panel li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  padding: 5px 7px;
  margin-bottom: 3px;
  border-radius: 4px;
  color: rgba(243, 226, 184, 0.82);
  font-size: 14px;
  line-height: 1.4;
}

.panel li strong {
  font-weight: 500;
  color: #f6e7c2;
}

.panel li.active {
  background: rgba(64, 140, 84, 0.35);
  color: #d9ffe4;
  box-shadow: inset 0 0 0 1px rgba(120, 220, 150, 0.45);
}

.panel li.active strong {
  color: #effff4;
}

.meta {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(214, 178, 94, 0.8);
}

.webcam-wrap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 240px;
  z-index: 2;
}

.webcam-wrap video {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #111;
  border: 1px solid rgba(214, 178, 94, 0.7);
  transform: scaleX(-1);
}

#camera-state {
  margin-top: 6px;
  text-align: right;
  font-size: 13px;
  color: rgba(243, 226, 184, 0.78);
}

#boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  z-index: 5;
  letter-spacing: 0.2em;
}

body.cover-open .panel,
body.cover-open .webcam-wrap {
  visibility: hidden;
  pointer-events: none;
}

#cover {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000;
}

#cover[hidden] {
  display: none;
}

.cover-card {
  width: min(520px, calc(100vw - 48px));
  padding: 36px 40px 28px;
  background: rgba(12, 12, 12, 0.92);
  border: 1.5px solid rgba(214, 178, 94, 0.85);
  border-radius: 22px;
  box-shadow: 0 0 32px rgba(214, 178, 94, 0.12);
  text-align: center;
}

.cover-title {
  margin: 0 0 22px;
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #e8c86a;
}

.cover-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  text-align: left;
}

.cover-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-size: clamp(15px, 2.2vw, 17px);
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: #e8c86a;
}

.cover-icon {
  flex: 0 0 1.6em;
  width: 1.6em;
  text-align: center;
  font-size: 1.15em;
  line-height: 1;
  filter: grayscale(0.15) sepia(0.35) saturate(1.4) hue-rotate(5deg);
}

#cover-start {
  appearance: none;
  border: none;
  cursor: pointer;
  min-width: 168px;
  padding: 10px 42px;
  border-radius: 999px;
  background: #e8c86a;
  color: #111;
  font: inherit;
  font-size: 18px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  transition: background 0.2s ease, transform 0.15s ease;
}

#cover-start:hover {
  background: #f0d57e;
}

#cover-start:active {
  transform: scale(0.98);
}

.keys {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(243, 226, 184, 0.55);
}
