/* Shared pieces; every design sets the colours through these variables. */
:root {
  --g-ink: #1d1d1f; --g-ink2: #6e6e73; --g-card: #fff; --g-fill: #e8e8ed; --g-hair: #d2d2d7;
  --g-accent: #0071e3; --g-radius: 22px; --g-spec-bg: #050505;
}
.g-hidden { display: none; }

/* before / after */
.g-cmp { --split: 50%; user-select: none; -webkit-user-select: none; }
.g-stage { position: relative; aspect-ratio: 768 / 448; border-radius: var(--g-radius); overflow: hidden; background: #000; cursor: ew-resize; touch-action: pan-y; }
.g-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.g-clip { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split)); }
.g-handle { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px; background: rgba(255,255,255,.95); box-shadow: 0 0 0 .5px rgba(0,0,0,.25); pointer-events: none; }
.g-knob { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 2px 10px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; gap: 6px; }
.g-knob i { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.g-knob i:first-child { border-right: 6px solid #1d1d1f; }
.g-knob i:last-child { border-left: 6px solid #1d1d1f; }
.g-tag { position: absolute; top: 14px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: -.01em; color: #fff; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); pointer-events: none; }
.g-tag-l { left: 14px; }
.g-tag-r { right: 14px; }
.g-bigplay { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #1d1d1f; cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; }
.g-bigplay svg { width: 24px; height: 24px; margin-left: 2px; }
.g-cmp.is-playing .g-bigplay { opacity: 0; pointer-events: none; transform: translateX(-50%) scale(.9); }
.g-bar { display: flex; align-items: center; gap: 12px; margin: 14px 2px 10px; }
.g-play { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--g-fill); color: var(--g-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.g-play svg { width: 18px; height: 18px; }
.g-hear { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--g-fill); }
.g-hear-l { font-size: 13px; color: var(--g-ink2); padding: 0 8px 0 10px; }
.g-hear button { border: 0; background: none; color: var(--g-ink2); font: inherit; font-size: 14px; font-weight: 500; padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.g-hear button.on { background: var(--g-card); color: var(--g-ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.g-time { margin-left: auto; font-size: 13px; color: var(--g-ink2); font-variant-numeric: tabular-nums; }
.g-specs { display: grid; gap: 6px; }
.g-spec { position: relative; border-radius: 10px; overflow: hidden; background: var(--g-spec-bg); cursor: pointer; }
.g-spec img { display: block; width: 100%; height: 46px; object-fit: fill; opacity: .82; transition: opacity .15s; }
.g-spec.on img, .g-spec:hover img { opacity: 1; }
.g-spec-l { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 1; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px #000; opacity: .75; }
.g-spec.on .g-spec-l { opacity: 1; }
.g-spec.on { box-shadow: 0 0 0 2px var(--g-accent) inset; }
.g-head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.8); pointer-events: none; }

/* method grid */
.g-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.g-card { margin: 0; }
.g-vid { position: relative; aspect-ratio: 768 / 448; border-radius: 14px; overflow: hidden; background: #000; cursor: pointer; }
.g-vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-pp { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: .9; }
.g-pp svg { width: 15px; height: 15px; }
.g-card figcaption { font-size: 14px; font-weight: 600; margin: 9px 2px 6px; color: var(--g-ink); letter-spacing: -.01em; }
.g-card.is-ref figcaption { color: var(--g-ink2); }
.g-card.is-ours figcaption { color: var(--g-accent); }
.g-card .g-spec img { height: 34px; }
.g-card.is-playing .g-vid { box-shadow: 0 0 0 2px var(--g-accent); }
@media (max-width: 1000px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* muted loop with a speaker */
.g-loop { position: relative; overflow: hidden; background: #000; }
.g-loop video { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-speaker { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.42); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.g-speaker svg { width: 20px; height: 20px; }
.g-speaker.on { background: rgba(255,255,255,.92); color: #1d1d1f; }

/* wall */
.g-wall { --cols: 6; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 0; }
.g-wall video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #111; }

/* film overlay */
.g-film { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.86); display: flex; align-items: center; justify-content: center; padding: 4vw; animation: g-in .2s ease-out; }
.g-film-box { width: min(1280px, 100%); }
.g-film video { width: 100%; border-radius: 14px; background: #000; display: block; }
.g-film-x { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.g-film-x svg { width: 20px; height: 20px; }
@keyframes g-in { from { opacity: 0; } }
