:root {
  --g-bg0: #0c1018;
  --g-bg1: #151c2a;
  --g-text: #f4f6fb;
  --g-muted: #9aa6bf;
  --g-line: rgba(255, 255, 255, 0.1);
  --g-accent: #d82d28;
  --g-accent-2: #ff7a45;
  --g-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --g-radius: 14px;
  --g-font: "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--g-font);
  color: var(--g-text);
  background: var(--g-bg0);
}

.g-sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* —— Home —— */
.g-home { min-height: 100vh; position: relative; overflow: hidden; }
.g-home-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(216, 45, 40, 0.35), transparent 60%),
    radial-gradient(700px 420px at 85% 20%, rgba(255, 122, 69, 0.22), transparent 55%),
    linear-gradient(160deg, #0a0e16 0%, #141b2b 45%, #0c1018 100%);
  animation: gBgShift 14s ease-in-out infinite alternate;
}
@keyframes gBgShift {
  from { filter: saturate(1); transform: scale(1); }
  to { filter: saturate(1.15); transform: scale(1.03); }
}
.g-home-main {
  position: relative; z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 12vh, 120px) 24px 64px;
}
.g-brand {
  margin: 0 0 28px;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
}
.g-brand span, .g-brand-mini span {
  color: var(--g-accent);
}
.g-hero-title {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 5vw, 3rem);
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: -0.02em;
  animation: gFadeUp 0.7s ease both;
}
.g-hero-sub {
  margin: 0 0 36px;
  color: var(--g-muted);
  font-size: 1.05rem;
  max-width: 34rem;
  animation: gFadeUp 0.7s ease 0.08s both;
}
@keyframes gFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.g-enter {
  display: grid;
  gap: 14px;
  max-width: 420px;
  animation: gFadeUp 0.7s ease 0.16s both;
}
.g-field { display: grid; gap: 8px; }
.g-field span {
  font-size: 0.82rem;
  color: var(--g-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.g-field input,
.g-field select,
.g-lang-switch select {
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--g-line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--g-text);
  padding: 0 14px;
  font-size: 1rem;
}
/* Native <option> list uses OS white panel — force dark text (fixes white-on-white) */
.g-field select option,
.g-lang-switch select option {
  background-color: #ffffff;
  color: #111827;
}
.g-field select option:checked,
.g-field select option:hover,
.g-lang-switch select option:checked,
.g-lang-switch select option:hover {
  background-color: #d82d28;
  color: #ffffff;
}
.g-field input:focus,
.g-field select:focus,
.g-lang-switch select:focus {
  outline: 2px solid rgba(216, 45, 40, 0.55);
  border-color: transparent;
}
.g-btn {
  height: 48px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}
.g-btn-primary {
  background: linear-gradient(135deg, var(--g-accent), var(--g-accent-2));
  color: #fff;
  box-shadow: 0 10px 28px rgba(216, 45, 40, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.g-btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* —— Watch (fullscreen video + overlays) —— */
html:has(body.g-watch),
body.g-watch {
  height: 100%;
  overflow: hidden;
}
.g-watch {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  margin: 0;
  background: #000;
  display: block;
}
.g-video-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  aspect-ratio: auto;
  max-height: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: #000;
}
.g-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  z-index: 1;
  pointer-events: none;
}
.g-watch-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 28px;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  backdrop-filter: none;
  pointer-events: none;
}
.g-watch-bar > * {
  pointer-events: auto;
}
.g-brand-mini {
  color: var(--g-text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.g-watch-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.g-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  background: #444;
  color: #fff;
}
.g-pill.is-live { background: var(--g-accent); animation: gPulse 1.6s ease infinite; }
@keyframes gPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216, 45, 40, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(216, 45, 40, 0); }
}
.g-code {
  color: #e8ecf5;
  font-size: 0.9rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.g-lang-switch {
  flex: 0 1 auto;
  min-width: 0;
}
.g-lang-switch select {
  height: 36px;
  min-width: 160px;
  max-width: min(48vw, 240px);
  font-size: 0.85rem;
  background: rgba(20, 24, 34, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.g-dub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d7deee;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.g-dub-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--g-accent);
}
.g-dub-toggle.is-on { color: #ffb4a8; }
.g-caption {
  position: absolute;
  left: 50%;
  bottom: max(28%, calc(140px + env(safe-area-inset-bottom, 0px)));
  transform: translateX(-50%);
  z-index: 25;
  width: min(92%, 520px);
  text-align: center;
  padding: 10px 14px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.g-caption.is-on { opacity: 1; }
.g-offline {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.g-offline p { margin: 0; font-size: 1.2rem; font-weight: 700; }
.g-offline span { color: var(--g-muted); font-size: 0.9rem; }
.g-side {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  max-height: min(38vh, 320px);
  overflow: auto;
  padding: 28px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  pointer-events: none;
}
.g-side > * {
  pointer-events: auto;
}
.g-side h2 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c5cee0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.g-products {
  display: grid;
  gap: 8px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 72%);
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.g-product {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 22, 32, 0.82);
  backdrop-filter: blur(8px);
}
.g-product img {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #222;
}
.g-product strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.3;
  margin-bottom: 4px;
}
.g-product em {
  font-style: normal;
  color: #ffb4a8;
  font-weight: 700;
  font-size: 0.9rem;
}
.g-muted { color: var(--g-muted); font-size: 0.9rem; }
.g-hint {
  margin-top: 10px;
  font-size: 0.72rem;
  color: rgba(169, 180, 208, 0.85);
  line-height: 1.4;
}

@media (min-width: 900px) {
  .g-video-wrap video {
    object-fit: contain;
  }
  .g-products {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    overflow-x: visible;
  }
  .g-side {
    left: auto;
    width: min(360px, 34vw);
    max-height: min(70vh, 560px);
    bottom: 16px;
    right: 16px;
    border-radius: 16px;
    background: rgba(12, 16, 24, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px;
  }
  .g-caption {
    bottom: 12%;
  }
}

