:root { --ink: #0b0b0f; --ink-2: #16161d; --blue: #2563ff; --yellow: #ffd166; --pink: #ff5d8f; --green: #2ec4b6; --text: #15151a; --muted: #9a9aa6; --font-display: "Poppins", "Noto Sans KR", sans-serif; --font-body: "Noto Sans KR", "Poppins", system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font-body); background: radial-gradient(1200px 600px at 70% -10%, #1a2550 0%, var(--ink) 60%); color: #fff; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; }

.g-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: rgba(11,11,15,.85); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.g-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.g-brand img { filter: brightness(0) invert(1); }
.g-brand em { font-style: normal; color: var(--blue); }
.g-tag { font-size: 10px; letter-spacing: .14em; background: var(--yellow); color: var(--ink); padding: 3px 8px; border-radius: 999px; margin-left: 4px; }
.g-nav { display: flex; gap: 8px; }
.g-link { background: rgba(255,255,255,.08); border: 0; color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; font-family: var(--font-display); }
.g-link:hover { background: rgba(255,255,255,.16); }

.g-hub { width: min(1100px, 100% - 32px); margin: 0 auto; padding: 36px 0 80px; }
.g-eyebrow { font-family: var(--font-display); font-size: 12px; letter-spacing: .18em; color: #8fb0ff; font-weight: 600; margin: 0 0 10px; }
.g-hero h1 { font-size: clamp(36px, 7vw, 72px); line-height: 1; }
.g-hero h1 span { color: var(--yellow); }
.g-desc { color: rgba(255,255,255,.65); margin: 14px 0 0; max-width: 560px; font-size: 16px; }
.g-pick, .g-cards, .g-scores { margin-top: 44px; }
.g-pick h2, .g-scores h2 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.g-pick h2 small, .g-scores h2 small { color: var(--muted); font-size: 12px; font-weight: 500; font-family: var(--font-body); }
.g-faces { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: thin; }
.g-face { flex: none; width: 84px; background: transparent; border: 0; color: #fff; display: grid; justify-items: center; gap: 6px; padding: 0; opacity: .7; transition: transform .2s, opacity .2s; }
.g-face:hover { opacity: 1; transform: translateY(-3px); }
.g-face.is-active { opacity: 1; }
.g-face .ring { width: 72px; height: 72px; border-radius: 50%; padding: 3px; background: rgba(255,255,255,.12); display: grid; place-items: center; transition: background .2s; }
.g-face.is-active .ring { background: linear-gradient(135deg, var(--blue), var(--pink)); }
.g-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #222; }
.g-face span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 84px; }
.g-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.g-card { text-align: left; background: var(--ink-2); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: 26px 24px 22px; color: #fff; display: grid; gap: 10px; position: relative; overflow: hidden; transition: transform .25s, border-color .25s; }
.g-card::before { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; opacity: .35; filter: blur(30px); }
.g-card--volley::before { background: var(--yellow); } .g-card--dodge::before { background: var(--pink); } .g-card--bowl::before { background: var(--green); }
.g-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.3); }
.g-card-emoji { font-size: 40px; line-height: 1; }
.g-card strong { font-family: var(--font-display); font-size: 20px; }
.g-card span:not(.g-card-emoji) { color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.5; }
.g-card small { color: var(--muted); font-size: 12px; margin-top: 6px; }
.g-scores ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.g-scores li { background: rgba(255,255,255,.05); border-radius: 14px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.g-scores li b { font-family: var(--font-display); font-size: 20px; color: var(--yellow); }

/* stage */
.g-stage { position: fixed; inset: 0; background: var(--ink); display: flex; flex-direction: column; z-index: 20; }
.g-stage[hidden], .g-hub[hidden] { display: none; }
.g-stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
.g-stage-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; text-align: center; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-stage-tools { display: flex; gap: 6px; }
.g-canvas-wrap { position: relative; flex: 1; display: grid; place-items: center; padding: 0 10px 10px; min-height: 0; touch-action: none; }
#game { display: block; border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); max-width: 100%; max-height: 100%; background: #0e1322; touch-action: none; user-select: none; -webkit-user-select: none; }
.g-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5,6,12,.55); backdrop-filter: blur(4px); }
.g-overlay[hidden] { display: none; }
.g-overlay-card { background: #fff; color: var(--text); border-radius: 22px; padding: 30px 30px 26px; width: min(420px, 90vw); text-align: center; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); animation: pop .25s ease; }
@keyframes pop { from { transform: translateY(10px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.g-overlay-card h2 { font-size: 28px; margin-bottom: 8px; }
.g-overlay-card p { color: #6b6b76; margin: 0 0 20px; font-size: 14.5px; line-height: 1.6; white-space: pre-line; }
.g-overlay-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.g-btn { border: 1px solid #e4e4ea; background: #fff; color: var(--text); padding: 12px 22px; border-radius: 999px; font-weight: 600; font-family: var(--font-display); }
.g-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.g-btn-primary:hover { background: #1b4fd6; }
.g-touch { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); padding: 8px 14px; border-radius: 999px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.g-touch[hidden] { display: none; }

@media (max-width: 860px) {
  .g-header { padding: 10px 12px; gap: 8px; }
  .g-brand { font-size: 15px; gap: 6px; white-space: nowrap; }
  .g-brand img { width: 26px; height: auto; }
  .g-tag { display: none; }
  .g-link { padding: 7px 10px; font-size: 12px; white-space: nowrap; }
  .g-cards { grid-template-columns: 1fr; }
  .g-scores ul { grid-template-columns: 1fr; }
  .g-hub { padding-top: 24px; }
  .g-canvas-wrap { padding: 0 6px 6px; }
}
