:root {
  color-scheme: dark;
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif;
  background: #24352f;
  color: #fcf0dc;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  overscroll-behavior: none;
}
a { color: #f7dfb9; }
button, a { -webkit-tap-highlight-color: #d1e6bc32; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #ffda9d; outline-offset: 3px; }
.top {
  position: relative;
  z-index: 3;
  min-height: 44px;
  padding: env(safe-area-inset-top) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #c6aa8066;
  background: #26382f;
  font-size: .82rem;
  font-weight: 680;
}
.top a, .top button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.top .back { text-decoration: none; }
.top #short-title { text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top #light-link { color: #cde3d6; text-decoration-color: #79a88b; text-underline-offset: 3px; }
.top button { background: transparent; border: 0; color: inherit; padding: 0 3px; }
.player {
  position: relative;
  margin: 0 max(0px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(0px, env(safe-area-inset-left));
  min-height: 0;
  background: #26392f;
}
#unity-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.intake {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 15px;
  background: radial-gradient(ellipse at 15% 25%,#546854,#24352f 76%);
}
.welcome {
  width: min(645px, 100%);
  border: 1px solid #bfad826b;
  border-radius: 23px;
  overflow: hidden;
  background: #283a31;
  box-shadow: 0 18px 60px #162c237c;
}
.cover { width: 100%; display: block; height: clamp(150px, 34dvh, 302px); object-fit: cover; object-position: center 55%; }
.welcome-body { padding: 20px 22px 22px; }
h1 {
  margin: 0 0 4px;
  color: #fff3de;
  font: 800 2.36rem/1.13 Georgia, "Songti TC", "YuMincho", serif;
}
p { margin: 0; }
.edition, .download-size { color: #f2c991; font-size: .83rem; font-weight: 740; margin-bottom: 8px; }
.gesture, .status { font-size: .93rem; line-height: 1.5; color: #dfe7d9; margin: 8px 0; }
.status { min-height: 1.5em; }
.start {
  min-height: 48px;
  width: min(100%, 300px);
  padding: 8px 15px;
  margin-top: 7px;
  border: 1px solid #ffe1af;
  border-radius: 12px;
  color: #30251a;
  background: #efc997;
  font-weight: 800;
}
.start[disabled] { cursor: wait; opacity: .75; }
.small { display: inline-flex; align-items: center; margin-left: 15px; min-height: 44px; font-size: .86rem; text-underline-offset: 4px; }
progress {
  accent-color: #e8c38f;
  display: block;
  height: 12px;
  width: min(100%, 300px);
  margin: 11px 0 2px;
}
@media (max-width: 540px) {
  .welcome-body { padding: 16px; }
  h1 { font-size: 1.92rem; }
  .welcome .small { display: flex; margin-left: 0; }
}
@media (orientation: portrait) and (max-width: 660px) {
  /* Keep room for the lobby's left dock and right booking board on tall screens. */
  #unity-canvas {
    position: absolute;
    inset: 50% 0 auto;
    height: auto;
    aspect-ratio: 7 / 6;
    transform: translateY(-50%);
  }
}
@media (orientation: landscape) and (max-height: 550px) {
  .intake { padding: 8px 12px; }
  .welcome { display: grid; grid-template-columns: minmax(170px, .82fr) minmax(230px, 1fr); width: min(700px, 100%); }
  .cover { height: 100%; min-height: 0; }
  .welcome-body { padding: 13px 15px 12px; }
  h1 { font-size: 1.95rem; }
  .top { min-height: 40px; }
  .top a, .top button { min-height: 40px; }
}
.player:fullscreen { width: 100%; height: 100%; }
