@font-face { font-family: "LiSerif"; src: url("fonts/NotoSerifTC-Black.otf") format("opentype"); font-weight: 900; font-display: block; }
@font-face { font-family: "LiSerifVF"; src: url("fonts/NotoSerifTC-VF.ttf") format("truetype"); font-weight: 200 900; font-display: block; }
@font-face { font-family: "LiSans"; src: url("fonts/NotoSansTC-Bold.otf") format("opentype"); font-weight: 700; font-display: block; }

:root {
  --red: #c91f18;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--red);
  color: var(--white);
  cursor: none;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px;
}

.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;            /* revealed from main.js once everything is loaded */
}

.ui a { pointer-events: auto; cursor: none; color: inherit; text-decoration: none; }

/* ---------- logo ---------- */
.ui .logo {
  position: absolute;
  left: 36px;
  top: 32px;
  width: 42px;
  height: 42px;
  background: var(--white);
  color: var(--red);
  display: grid;
  place-items: center;
  font: 900 25px/1 "LiSerif", serif;
}
.logo span { transform: translateY(-1px); }

/* ---------- pills ---------- */
.pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 17px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font: 700 12.5px/1 "LiSans", sans-serif;
  letter-spacing: 0.22em;
  white-space: nowrap;
}
.pill.is-hover { background: var(--white); color: var(--red); }
.pill.is-hover .dot { background: var(--red); }
.pill.is-hover .plus::before, .pill.is-hover .plus::after { background: var(--red); }

.contact { right: 36px; top: 36px; }
.contact .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--white); }

.about {
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  height: 30px;
  padding: 0 15px 0 12px;
  font-size: 12px;
}
.plus { position: relative; width: 8px; height: 8px; }
.plus::before, .plus::after {
  content: ""; position: absolute; background: var(--white);
  left: 0; top: 3.5px; width: 8px; height: 1px;
}
.plus::after { left: 3.5px; top: 0; width: 1px; height: 8px; }

/* ---------- sound toggle (bars animated from main.js) ---------- */
.ui button { pointer-events: auto; cursor: none; }
.sound {
  right: 36px;
  bottom: 26px;
  height: 30px;
  padding: 0 13px 0 11px;
  gap: 8px;
  background: transparent;
  color: var(--white);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.sound .spk { width: 15px; height: 15px; display: block; }
.sound.is-on .spk-x { display: none; }
.sound .bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.sound .bars i {
  display: block;
  width: 2px;
  height: 12px;
  background: currentColor;
  transform-origin: 50% 100%;
  transform: scaleY(0.17);
}

/* ---------- koi count control (bottom left) ---------- */
.count {
  left: 36px;
  bottom: 26px;
  height: 30px;
  padding: 0 3px;
  gap: 4px;
  letter-spacing: 0;
}
.cbtn {
  position: relative;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.cbtn::before {
  content: ""; position: absolute; background: currentColor;
  left: 6px; top: 10.5px; width: 10px; height: 1px;
}
.cbtn.plus::after {
  content: ""; position: absolute; background: currentColor;
  left: 10.5px; top: 6px; width: 1px; height: 10px;
}
.cbtn.is-hover { background: var(--white); color: var(--red); }
.cbtn.is-disabled { opacity: 0.32; }
.cbtn.is-disabled.is-hover { background: transparent; color: var(--white); }
.count .num {
  min-width: 14px;
  text-align: center;
  font: 700 12.5px/1 "LiSans", sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ---------- side labels ---------- */
.side {
  position: absolute;
  top: 50%;
  margin: 0;
  font: 700 12px/1 "LiSans", sans-serif;
  letter-spacing: 0.26em;
  white-space: nowrap;
  transform: translateY(-50%);
}
.side b { font-weight: 700; opacity: 0.7; margin: 0 0.35em; letter-spacing: 0; }

/* ---------- custom cursor (positioned every frame from main.js) ---------- */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
}
.cursor .ring {
  position: absolute;
  left: -15px; top: -15px;
  width: 30px; height: 30px;
  border: 1.5px solid var(--white);
  border-radius: 50%;
}
.cursor .cdot {
  position: absolute;
  left: -2.5px; top: -2.5px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--white);
}
