:root {
  --accent: #e85d2a;
  --text: #1f1f1f;
  --muted: #737373;
  --line: #e9e9e9;
  --soft: #f6f6f6;
  --white: #ffffff;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { background: #f3f3f3; }
body {
  margin: 0;
  color: var(--text);
  background: #f3f3f3;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; -webkit-tap-highlight-color: transparent; }

.page {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 14px calc(92px + var(--safe-bottom));
  background: var(--white);
}

.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 2px 15px;
  border-bottom: 1px solid var(--line);
}
.small-title { margin: 0 0 3px; color: var(--accent); font-size: 12px; font-weight: 700; }
h1 { margin: 0; font-size: 25px; line-height: 1.2; }
.page-number { color: var(--muted); font-size: 14px; }
.page-number strong { color: var(--text); font-size: 24px; }

.room-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0 10px;
}
.room-switch button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #555;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
}
.room-switch button.active {
  color: var(--white);
  border-color: var(--text);
  background: var(--text);
}

.room-card { padding-top: 14px; }
.room-switch + .room-card { padding-top: 0; }

.video-box {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 12px;
  background: #111;
}
.video-box.landscape { aspect-ratio: 16 / 9; }
.video-box.portrait { aspect-ratio: 9 / 13; max-height: 64vh; }
.video-box video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}
.video-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(0,0,0,.62);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.room-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 1px 15px;
}
.batch-name { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.room-name { margin: 0; font-size: 22px; line-height: 1.25; }
.price { flex: none; text-align: right; }
.price strong { color: var(--accent); font-size: 27px; line-height: 1; }
.price span { color: var(--muted); font-size: 11px; }

.info-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.info-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
}
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row strong { font-weight: 600; overflow-wrap: anywhere; }
.info-row strong.pending { color: #9a6500; }

.note {
  margin: 11px 2px 14px;
  color: #888;
  font-size: 11px;
  line-height: 1.55;
}
.copy-btn {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--text);
  border-radius: 10px;
  color: var(--text);
  background: var(--white);
  font-weight: 700;
}

.dot-nav {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 18px 0 4px;
}
.dot-nav button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d4d4d4;
}
.dot-nav button.active { background: var(--accent); }

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 9px;
  width: min(100%, 680px);
  margin: auto;
  padding: 11px 14px calc(11px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}
.nav-btn {
  min-height: 48px;
  border-radius: 10px;
  font-weight: 700;
}
.nav-btn.secondary { border: 1px solid var(--line); color: var(--text); background: #fff; }
.nav-btn.primary { border: 1px solid var(--text); color: #fff; background: var(--text); }
.nav-btn:disabled { opacity: .35; }

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(84px + var(--safe-bottom));
  padding: 9px 13px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0,0,0,.82);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 681px) {
  .page { box-shadow: 0 0 28px rgba(0,0,0,.08); }
  .video-box.portrait { aspect-ratio: 16 / 10; max-height: none; }
}
