.temp-page {
  --temp-night: #0c1925;
  --temp-panel: #122736;
  --temp-ink: #f5eedf;
  --temp-muted: #c4d1d8;
  --temp-gold: #edc88e;
  --temp-line: #526977;
  color-scheme: dark;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--temp-night);
  color: var(--temp-ink);
  font: 16px/1.65 KZRound2Plex, "PingFang SC", system-ui, sans-serif;
  scrollbar-color: var(--temp-line) var(--temp-night);
}
.temp-page *, .temp-page *::before, .temp-page *::after { box-sizing: border-box; }
.temp-page [hidden] { display: none !important; }
.temp-page ::selection { background: var(--temp-gold); color: var(--temp-night); }
.temp-page :focus-visible { outline: 2px solid var(--temp-gold); outline-offset: 4px; }
.temp-page h1 { margin: 0; font: 700 clamp(2rem, 5vw, 4rem)/1.1 KZRound2Douyin, "PingFang SC", system-ui, sans-serif; }
.temp-page p { margin: 0; }
.temp-page a { color: var(--temp-gold); text-underline-offset: .25em; }
.temp-shell { width: min(100% - 2 * clamp(18px, 4.5vw, 64px), 1240px); margin: 0 auto; padding: 24px 0 48px; }
.temp-skip { position: fixed; z-index: 5; inset: 12px auto auto -9999px; background: var(--temp-night); padding: 10px; }
.temp-skip:focus { left: 12px; }
.temp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--temp-line); }
.temp-nav .temp-brand { color: var(--temp-ink); font: 700 1.24rem KZRound2Douyin, "PingFang SC", system-ui, sans-serif; text-decoration: none; }
.temp-heading { margin: clamp(25px, 4.7vh, 52px) 0 22px; }
.temp-heading p, .temp-footnote, .temp-status { color: var(--temp-muted); }
.temp-heading p { margin-top: 9px; }
.temp-footnote { margin: 14px 0 0 !important; font-size: .9rem; }
.temp-status { min-height: 1.55em; font-size: .95rem; overflow-wrap: anywhere; }

.temp-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 15px; border: 1px solid var(--temp-line);
  border-radius: 5px; color: var(--temp-ink); background: transparent;
  font: 500 1rem/1.35 KZRound2Plex, "PingFang SC", system-ui, sans-serif;
  text-decoration: none; cursor: pointer;
}
.temp-button:hover:not(:disabled) { border-color: var(--temp-gold); color: var(--temp-gold); background: #203949; }
.temp-button.primary { border-color: var(--temp-gold); background: var(--temp-gold); color: #142530; font-weight: 700; }
.temp-button.primary:hover:not(:disabled) { background: #f7dbab; color: #142530; }
.temp-button:disabled { opacity: .55; cursor: default; }
.temp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.temp-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.temp-fields label { display: grid; gap: 3px; color: var(--temp-muted); font-size: .9rem; }
.temp-fields input[type="number"] {
  width: 7.6em; min-height: 44px; padding: 6px 11px;
  border: 1px solid var(--temp-line); border-radius: 5px;
  color: var(--temp-ink); background: #091722;
  font: inherit; font-size: 1rem; font-variant-numeric: tabular-nums; caret-color: var(--temp-gold);
}
.temp-fields input::placeholder { color: #aebfc9; }
.temp-fields p { flex-basis: 100%; font-size: .9rem; color: var(--temp-muted); }

.temp-entries { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(12px, 2vw, 23px); margin: 26px 0; }
.temp-entries a {
  display: grid; grid-template-rows: auto 1fr auto; gap: 9px;
  min-height: 184px; padding: clamp(18px, 2.6vw, 32px); border: 1px solid var(--temp-line);
  border-radius: 10px; background: var(--temp-panel); color: var(--temp-ink); text-decoration: none;
  transition: border-color .18s ease, background .18s ease;
}
.temp-entries a:hover { border-color: var(--temp-gold); background: #1c3545; }
.temp-entries strong { font: 700 clamp(1.18rem, 2.4vw, 1.85rem)/1.25 KZRound2Douyin, "PingFang SC", system-ui, sans-serif; }
.temp-entries span { color: var(--temp-muted); }
.temp-entries svg { width: 24px; height: 24px; justify-self: end; color: var(--temp-gold); fill: none; stroke: currentColor; stroke-width: 1.6; }
.temp-more { padding-top: 14px; border-top: 1px solid var(--temp-line); }
.temp-more summary { color: var(--temp-gold); cursor: pointer; width: max-content; padding: 8px 0; }
.temp-more-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.temp-card-result:not(:empty) { margin-top: 18px; }
.temp-card-result img { display: block; width: min(180px, 100%); margin-bottom: 8px; }

.roll-modes { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.roll-modes .temp-button { min-width: min(160px, 100%); min-height: 51px; font-size: 1.11rem; }
.roll-modes [aria-pressed="true"] { border-color: var(--temp-gold); color: #172733; background: var(--temp-gold); }
.roll-modes [aria-pressed="true"]:hover { background: #f7dbab; color: #172733; }
.roll-setup { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; padding: 19px 0; border-block: 1px solid var(--temp-line); }
.roll-display { margin-top: 18px; padding: clamp(18px, 3vw, 32px); border: 1px solid var(--temp-line); border-radius: 12px; background: var(--temp-panel); }
.roll-result { color: var(--temp-gold); font: 700 clamp(2.2rem, 7vw, 5.5rem)/1.15 KZRound2Douyin, "PingFang SC", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.roll-display .temp-status { margin-top: 8px; }
.seat-plan { margin-top: 25px; padding-top: 16px; border-top: 1px solid var(--temp-line); }
.seat-front { max-width: 21rem; margin: 0 auto 12px !important; text-align: center; background: #26404e; color: var(--temp-ink); border-radius: 4px; }
.seat-scroll { overflow-x: auto; }
.seat-grid { display: grid; grid-template-columns: repeat(var(--seat-cols), minmax(29px, 1fr)); gap: 5px; min-width: calc(var(--seat-cols) * 34px - 5px); }
.seat-cell { display: grid; place-items: center; min-height: 29px; padding: 2px; color: var(--temp-muted); border: 1px solid #57707d; border-radius: 4px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.seat-cell.drawn { background: #26404e; color: #dce8ec; }
.seat-cell.current { border-color: var(--temp-gold); background: var(--temp-gold); color: #172733; font-weight: 700; }

.timer-board {
  display: grid; justify-items: center; align-content: center; gap: 17px; min-height: clamp(300px, 58vh, 670px);
  padding: clamp(15px, 3.3vw, 39px); border: 1px solid var(--temp-line); border-radius: 12px;
  background: var(--temp-panel); text-align: center;
}
.timer-number { color: var(--temp-ink); font: 700 clamp(4.15rem, 18.5vw, 17.5rem)/.98 KZRound2Plex, system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.timer-board[data-urgent="true"] .timer-number { color: #f4c480; }
.timer-controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: center; gap: 12px 20px; }
.timer-controls .temp-fields { justify-content: center; }
.timer-controls .temp-fields input { width: 5.3em; text-align: center; }

.volume-board {
  --volume-accent: #a9d9cd;
  --jump: 12px;
  display: grid; gap: 14px;
  padding: clamp(12px, 2.2vw, 27px); border: 1px solid var(--temp-line); border-radius: 12px; background: var(--temp-panel);
}
.volume-board[data-level="suitable"] { --volume-accent: #9fd9af; }
.volume-board[data-level="loud"] { --volume-accent: #f5c27e; }
.volume-info { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; }
.volume-label { color: var(--volume-accent); font: 700 clamp(1.32rem, 4vw, 3rem)/1.15 KZRound2Douyin, "PingFang SC", system-ui, sans-serif; }
.volume-reading { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 10px; min-width: min(39%, 190px); color: var(--temp-muted); font-size: .88rem; }
.volume-reading output { color: var(--temp-ink); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.volume-reading meter { grid-column: 1 / -1; width: 100%; height: 11px; accent-color: var(--volume-accent); }
.volume-reading meter::-webkit-meter-bar { border: 0; background: #081721; }
.volume-reading meter::-webkit-meter-optimum-value { background: var(--volume-accent); }
.volume-reading meter::-moz-meter-bar { background: var(--volume-accent); }
.volume-arena {
  display: grid; place-items: center; position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(224px, 40vh, 450px); border: 1px solid #526f7b; border-radius: 8px;
  background: radial-gradient(ellipse at 48% 111%, #376170 0%, #183949 39%, #0a1b2a 72%);
}
.volume-arena::after { content: ""; position: absolute; inset: auto 4% 12% 4%; border-top: 1px solid #8cb1b477; pointer-events: none; }
.volume-overlay { position: relative; z-index: 2; padding: 8px 12px; border-radius: 5px; color: #f4eee0; background: #0a1925e8; text-align: center; }
.volume-sprites { position: absolute; inset: 0; pointer-events: none; }
.volume-sprite {
  position: absolute; left: var(--x); bottom: var(--y);
  font: var(--size)/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  transform: translate(-50%, 0); filter: drop-shadow(0 6px 9px #03111a99);
}
.volume-board[data-level="idle"] .volume-sprite, .volume-board[data-level="calibrating"] .volume-sprite { opacity: .62; }
.volume-board:is([data-level="quiet"],[data-level="suitable"],[data-level="loud"]) .volume-sprite {
  animation: volume-jump var(--speed) cubic-bezier(.24,.62,.55,1) var(--delay) infinite alternate;
}
@keyframes volume-jump {
  from { transform: translate(-50%, 0) rotate(var(--tilt)); }
  to { transform: translate(-50%, calc(-1 * var(--jump) * var(--reach))) rotate(0); }
}
.volume-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.volume-sensitivity { display: flex; align-items: center; gap: 8px; color: var(--temp-muted); font-size: .9rem; }
.volume-sensitivity input { width: clamp(78px, 11vw, 150px); accent-color: var(--volume-accent); min-height: 32px; }
.volume-sensitivity output { min-width: 3.1em; font-variant-numeric: tabular-nums; text-align: right; }

.temp-projection, .timer-board:fullscreen, .volume-board:fullscreen {
  width: 100%; height: 100%; border: 0; border-radius: 0; overflow-y: auto;
  background: var(--temp-panel);
}
.temp-projection { position: fixed; inset: 0; z-index: 10; }
.timer-board:is(:fullscreen,.temp-projection) .timer-number { font-size: clamp(4.2rem, 24vw, 23rem); }
.volume-board:is(:fullscreen,.temp-projection) { grid-template-rows: auto minmax(190px,1fr) auto auto; }
.volume-board:is(:fullscreen,.temp-projection) .volume-arena { min-height: 0; }

@media (max-width: 700px) {
  .temp-entries { grid-template-columns: 1fr; }
  .temp-entries a { grid-template-columns: 1fr auto; grid-template-rows: auto auto; min-height: 0; }
  .temp-entries svg { grid-area: 1 / 2 / 3; align-self: center; }
  .temp-entries span { grid-column: 1; }
  .timer-board { min-height: 0; }
  .volume-controls { align-items: flex-start; }
  .volume-sprite { font-size: min(var(--size), 44px); }
}
@media (prefers-reduced-motion: reduce) {
  .temp-page *, .temp-page *::before, .temp-page *::after { transition: none !important; animation: none !important; }
}
