:root {
  --ink: #0b0e0c;
  --paper: #f2f0e9;
  --bts-blue: #123a8f;
  --bts-red: #d22630;
  --bts-cyan: #2fb7e8;
  --bts-green: #7cbf3f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: "Helvetica Neue", "Inter", "SF Pro Display", "Noto Sans Thai", "Thonburi", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 42%, rgba(47, 183, 232, 0.06), transparent 65%),
    linear-gradient(180deg, #0d110e 0%, #080a09 100%);
  transition: opacity 0.7s ease, visibility 0.7s;
}

#boot.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 30px;
}

.boot__bts {
  font-size: 26px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.24em;
  padding-left: 0.24em;
  line-height: 1;
}

.boot__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.boot__title span {
  display: block;
  margin-top: 7px;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: rgba(242, 240, 233, 0.42);
}

.boot__sub {
  margin: 18px 0 30px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(242, 240, 233, 0.35);
}

.boot__bar {
  width: min(260px, 62vw);
  height: 2px;
  background: rgba(242, 240, 233, 0.12);
  overflow: hidden;
}

.boot__bar i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--bts-cyan), var(--bts-green));
  transition: width 0.35s ease;
}

.boot__status {
  margin: 13px 0 0;
  font-size: 8px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(242, 240, 233, 0.3);
  font-variant-numeric: tabular-nums;
}

.boot__fallback {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  background: #0b0e0c;
  color: #f2f0e9;
  z-index: 200;
}

@media (max-width: 640px) {
  .boot__mark { margin-bottom: 24px; }
  .boot__title { font-size: 11px; }
}
