/* OIKOS GAMES 홈 — 흰 바탕, 검은 글자. 위에는 크게 넘겨 보는 '추천', 아래는 스토어처럼 한 줄씩 보는 '전체 게임'.
   색은 아래 토큰만 쓰고, 어두운 화면 설정이면 토큰만 바꾼다. */
:root {
  --bg: #fafaf9;
  --surface: #f0efec;
  --surface-2: #e7e6e2;
  --ink: #111111;
  --muted: #6b6b68;
  --faint: #a3a3a0;
  --line: #e7e6e2;
  --gold: #e0a43a;
  --radius: 20px;
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--bg);
}
/* 화면 밝기: 기본은 기기 설정을 따르고, 머리의 버튼(home-theme.js)으로 밝게·어둡게를 고르면 <html data-theme>가 붙는다 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #111111; --surface: #1b1b1a; --surface-2: #262625; --ink: #f2f2f0; --muted: #9a9a96; --faint: #65655f; --line: #262625; }
}
:root[data-theme="dark"] { --bg: #111111; --surface: #1b1b1a; --surface-2: #262625; --ink: #f2f2f0; --muted: #9a9a96; --faint: #65655f; --line: #262625; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

.home-shell { min-height: 100svh; display: flex; flex-direction: column; max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* 머리 */
.home-header { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-brand { display: inline-flex; align-items: center; font-size: 15px; font-weight: 800; letter-spacing: .14em; white-space: nowrap; }
.home-brand-mark { display: block; width: 28px; height: 28px; margin-right: 11px; border-radius: 7px; }
.brand-games { margin-left: .5em; font-weight: 400; color: var(--muted); }
.home-header-side { display: flex; align-items: center; gap: 16px; }
.home-visits { display: flex; gap: 14px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s, background-color .15s; }
.theme-toggle:hover { color: var(--ink); border-color: var(--surface-2); background: var(--surface); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle[data-mode="dark"] svg { fill: currentColor; stroke: none; }
.home-visits b { color: var(--ink); font-weight: 600; }

/* 소개 */
.home-main { flex: 1; }
.home-intro { padding: 44px 0 28px; }
.home-intro h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; font-weight: 750; letter-spacing: -.035em; word-break: keep-all; }
.home-description { margin-top: 10px; color: var(--muted); font-size: 16px; }

/* 추천: 큰 그림 + 옆 설명, 아래 작은 그림으로 고르기 */
.featured { margin-bottom: 72px; }
.featured-stage { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.featured-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); touch-action: pan-y; }
.featured-track { display: flex; height: 100%; transition: transform .7s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
.featured-track.is-snapping { transition: none; }
.featured-slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }
.featured-slide img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.featured-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin-top: -20px; padding: 0; border: 0; border-radius: 50%; background: #111111a6; color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s, background-color .15s; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.featured-nav[data-step="-1"] { left: 14px; }
.featured-nav[data-step="1"] { right: 14px; }
.featured-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.featured-nav:hover { background: #111111d9; }
.featured-art:hover .featured-nav, .featured-nav:focus-visible { opacity: 1; }
@media (hover: none) { .featured-nav { opacity: .85; width: 34px; height: 34px; margin-top: -17px; } }
.featured-info > * { transition: opacity .3s ease, transform .3s ease; }
.featured-info.is-changing > * { opacity: 0; transform: translateY(6px); }
.featured-info { display: flex; flex-direction: column; padding: 30px 30px 28px; min-width: 0; }
.featured-kicker { color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.featured-title { margin-top: 10px; font-size: 30px; line-height: 1.2; font-weight: 750; letter-spacing: -.03em; }
.featured-desc { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.65; word-break: keep-all; }
.featured-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.featured-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 24px; }
.featured-status { color: var(--muted); font-size: 13px; }
.featured-status:not(:empty)::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--gold); vertical-align: 2px; }
.featured-play { flex: none; padding: 12px 22px; border-radius: 12px; color: var(--bg); background: var(--ink); font-size: 14px; font-weight: 650; transition: opacity .15s; }
.featured-play::after { content: " →"; }
.featured-play:hover { opacity: .85; }

.featured-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.featured-thumb { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface); cursor: pointer; aspect-ratio: 16 / 9; opacity: .5; transition: opacity .2s; }
.featured-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.featured-thumb:hover { opacity: .8; }
.featured-thumb[aria-selected="true"] { opacity: 1; }
.featured-thumb::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--ink); }
.featured-thumb[aria-selected="true"]::after { width: 100%; }
.featured.is-running .featured-thumb[aria-selected="true"]::after { animation: featured-progress var(--featured-ms, 6000ms) linear forwards; }
@keyframes featured-progress { from { width: 0; } to { width: 100%; } }

/* 공통 태그 */
.featured-tags li, .game-card-tags li { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.featured-tags li { border-color: var(--surface-2); }

/* 전체 게임: 한 줄에 한 게임 */
.games-section:focus { outline: none; }
.games-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.games-heading h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.games-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); }
.games-tabs button { padding: 6px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.games-tabs button span { margin-left: 2px; color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.games-tabs button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px #0000001a; }

.games-grid { display: flex; flex-direction: column; }
.games-grid[data-filter="play"] .game-card:not([data-kind="play"]),
.games-grid[data-filter="watch"] .game-card:not([data-kind="watch"]) { display: none; }

.game-card { display: grid; grid-template-columns: 232px minmax(0, 1fr) auto; align-items: center; gap: 24px; margin: 0 -14px; padding: 14px; border-radius: 16px; transition: background-color .15s; }
.game-card + .game-card { position: relative; }
.game-card + .game-card::before { content: ""; position: absolute; top: 0; left: 14px; right: 14px; border-top: 1px solid var(--line); }
.game-card:hover { background: var(--surface); }
.game-card:hover::before, .game-card:hover + .game-card::before { border-color: transparent; }
.game-card-art { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--surface); }
.game-card-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.game-card:hover .game-card-art img, .game-card:hover .thumb-video { transform: scale(1.05); }

/* 영상 썸네일(home-video.js): 그림 위에 겹쳐 두고, 실제로 돌기 시작하면 서서히 보인다 */
.game-card-art { position: relative; }
.thumb-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity .35s ease, transform .4s cubic-bezier(.2, .7, .2, 1); }
.has-video > .thumb-video { opacity: 1; }

.game-card-content { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.game-card-title { display: flex; align-items: baseline; gap: 10px; }
.game-card-title h3 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.game-card-category { color: var(--faint); font-size: 13px; }
.game-card-content > p { color: var(--muted); font-size: 14px; line-height: 1.6; word-break: keep-all; }
.game-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.game-card:hover .game-card-tags li { border-color: var(--surface-2); }

.game-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 120px; text-align: right; }
.game-card-status { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.game-card-status:empty::before { display: none; }
.game-card-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--gold); vertical-align: 2px; }
.game-card-price { padding: 5px 12px; border-radius: 8px; background: var(--surface); font-size: 13px; font-weight: 650; transition: background-color .15s, color .15s; }
.game-card-price::after { content: " →"; display: inline-block; width: 0; overflow: hidden; vertical-align: bottom; transition: width .15s; }
.game-card:hover .game-card-price { color: var(--bg); background: var(--ink); }
.game-card:hover .game-card-price::after { width: 1.1em; }

/* 바닥 */
.home-footer { display: flex; flex-direction: column; gap: 20px; margin-top: 72px; padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; }
.footer-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: 16px; background: var(--surface); }
.footer-link[hidden] { display: none; }
.footer-link-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.footer-link-text b { color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.footer-link-text span { color: var(--muted); font-size: 13px; word-break: keep-all; }
.footer-link-btn { flex: none; padding: 10px 18px; border: 0; border-radius: 12px; color: var(--bg); background: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity .15s; }
.footer-link-btn:hover { opacity: .86; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-brand { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-size: 14px; font-weight: 800; letter-spacing: .12em; }
.footer-brand svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.footer-brand:hover svg { opacity: 1; }

.skip-link { position: fixed; top: 12px; left: 16px; z-index: 10; padding: 10px 14px; transform: translateY(-160%); border-radius: 8px; color: var(--bg); background: var(--ink); }
.skip-link:focus { transform: translateY(0); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-brand-mark { box-shadow: 0 0 0 1px #ffffff22; }
  :root:not([data-theme="light"]) .games-tabs button[aria-pressed="true"] { background: var(--surface-2); box-shadow: none; }
}
:root[data-theme="dark"] .home-brand-mark { box-shadow: 0 0 0 1px #ffffff22; }
:root[data-theme="dark"] .games-tabs button[aria-pressed="true"] { background: var(--surface-2); box-shadow: none; }

@media (max-width: 960px) {
  .featured-stage { grid-template-columns: minmax(0, 1fr); }
  .featured-info { padding: 24px 24px 22px; }
  .featured-title { font-size: 26px; }
  .game-card { grid-template-columns: 180px minmax(0, 1fr) auto; gap: 20px; }
}
@media (max-width: 640px) {
  .home-shell { padding: 0 20px; }
  .home-header { height: 60px; }
  .home-header-side { gap: 10px; }
  .home-visits { gap: 8px; font-size: 12px; }
  .theme-toggle { height: 32px; padding: 0 9px; }
  .theme-toggle span, .link-chip span { display: none; }
  .link-chip { height: 32px; padding: 0 9px; }
  .home-intro { padding: 28px 0 20px; }
  .home-description { font-size: 15px; }
  .featured { margin-bottom: 52px; }
  .featured-stage { border-radius: 16px; }
  .featured-info { padding: 20px 20px 20px; }
  .featured-title { margin-top: 6px; font-size: 23px; }
  .featured-desc { font-size: 14px; }
  .featured-tags { margin-top: 14px; }
  .featured-foot { padding-top: 18px; }
  .featured-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 10px -20px 0; padding: 0 20px; scroll-padding: 0 20px; }
  .featured-thumbs::-webkit-scrollbar { display: none; }
  .featured-thumb { flex: 0 0 104px; border-radius: 10px; }
  .games-heading { flex-wrap: wrap; }
  .games-heading h2 { font-size: 18px; }
  .game-card { grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 4px 14px; margin: 0 -10px; padding: 12px 10px; border-radius: 14px; }
  .game-card + .game-card::before { left: 10px; right: 10px; }
  .game-card-art { grid-row: span 2; border-radius: 8px; }
  .game-card-title { flex-wrap: wrap; gap: 2px 8px; }
  .game-card-title h3 { font-size: 16px; }
  .game-card-category { font-size: 12px; }
  .game-card-content > p { font-size: 13px; line-height: 1.5; }
  .game-card-tags { display: none; }
  .game-card-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; margin-top: 4px; }
  .game-card-status { font-size: 12px; }
  .game-card-price { margin-left: auto; padding: 3px 10px; font-size: 12px; }
  .home-footer { margin-top: 56px; }
  .footer-link { flex-direction: column; align-items: stretch; }
  .footer-link-btn { width: 100%; }
}
@media (max-width: 430px) { .brand-games { display: none; } }
@media (max-width: 360px) {
  .home-shell { padding: 0 16px; }
  .games-tabs button { padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .featured-track, .featured-info > *, .game-card-art img { transition: none; }
  .game-card:hover .game-card-art img { transform: none; }
}

/* 내 트로피 (home-trophies.js · /site/trophies.js) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s, background-color .15s; }
.link-chip:hover { color: var(--ink); border-color: var(--surface-2); background: var(--surface); }
.link-chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.link-chip[hidden] { display: none; }
.trophy-chip { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; transition: color .15s, border-color .15s, background-color .15s; }
.trophy-chip:hover { color: var(--ink); border-color: var(--surface-2); background: var(--surface); }
.trophy-chip svg { width: 16px; height: 16px; color: var(--gold); }
.trophy-chip b { color: var(--ink); font-weight: 700; }

.trophy-section { padding-top: 56px; scroll-margin-top: 16px; }
.trophy-section:focus { outline: none; }
.trophy-note { color: var(--faint); font-size: 13px; }
.trophy-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.trophy-stats > div { padding: 16px 18px; border-radius: 16px; background: var(--surface); }
.trophy-stats b { font-size: 28px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.trophy-stats span { margin-left: 4px; color: var(--faint); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trophy-stats p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.trophy-progress { height: 6px; margin-top: 14px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.trophy-progress i, .trophy-game-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.trophy-sub { margin: 30px 0 12px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }

.trophy-meta, .trophy-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.trophy { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 14px; }
.trophy-cup { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--faint); background: var(--surface); }
.trophy-cup svg { width: 20px; height: 20px; }
.trophy.is-got .trophy-cup { color: #fff; background: var(--tc); box-shadow: inset 0 -3px 0 #00000024; }
.trophy.is-got .trophy-cup svg { width: 23px; height: 23px; }
.trophy-text { display: flex; flex-direction: column; min-width: 0; }
.trophy-text b { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.trophy-text span { color: var(--muted); font-size: 12.5px; line-height: 1.45; word-break: keep-all; }
.trophy:not(.is-got) .trophy-text b { color: var(--muted); }
.trophy-tier { align-self: start; padding-top: 2px; color: var(--faint); font-size: 11.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

.trophy-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.trophy-game { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
.trophy-game[open] { grid-column: 1 / -1; }
.trophy-game summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(48px, 90px) 48px; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.trophy-game summary::-webkit-details-marker { display: none; }
.trophy-game summary:hover .trophy-game-name { text-decoration: underline; text-underline-offset: 3px; }
.trophy-game-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; }
.trophy-game-name::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid var(--faint); border-bottom: 1.8px solid var(--faint); transform: rotate(-45deg); transition: transform .15s; }
.trophy-game[open] .trophy-game-name::before { transform: rotate(45deg); }
.trophy-game-name em { padding: 1px 8px; border-radius: 999px; color: #fff; background: var(--gold); font-size: 11px; font-style: normal; font-weight: 700; }
.trophy-game-bar { height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.trophy-game-count { color: var(--muted); font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.trophy-game .trophy-list { padding: 0 0 12px; }
.trophy-game-play { display: inline-block; margin: 0 0 16px; padding: 7px 14px; border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 650; }
.trophy-game-play::after { content: " →"; }
.trophy-game-play:hover { color: var(--bg); background: var(--ink); }

.game-card-trophy { display: inline-flex; align-items: center; gap: 3px; color: var(--faint); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.game-card-trophy svg { width: 14px; height: 14px; }
.game-card-trophy.is-clear { color: var(--gold); }

@media (max-width: 640px) {
  .trophy-chip { height: 32px; padding: 0 10px 0 8px; }
  .trophy-section { padding-top: 40px; }
  .trophy-note { display: none; }
  .trophy-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .trophy-stats > div { padding: 12px 14px; }
  .trophy-stats b { font-size: 22px; }
  .trophy-meta, .trophy-list { grid-template-columns: 1fr; }
  .trophy-games { grid-template-columns: 1fr 1fr; gap: 6px; }
  .trophy-game { padding: 0 12px; }
  .trophy-game summary { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 11px 0; }
  .trophy-game-bar { display: none; }
  .trophy-game-name { font-size: 14px; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .trophy-progress i, .trophy-game-bar i { transition: none; } }

/* 다른 기기와 잇기 (home-link.js) */
.link-open { margin-left: 10px; padding: 0; border: 0; background: none; color: var(--ink); font-size: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.trophy-note .link-open { color: var(--muted); }
.link-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: var(--bg); box-shadow: 0 24px 64px #0000003d; }
.link-dialog::backdrop { background: #0000004d; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.link-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.link-close { display: grid; place-items: center; width: 34px; height: 34px; margin: -4px -6px 0 0; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.link-close:hover { background: var(--surface); color: var(--ink); }
.link-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.link-lead { margin-top: 6px; color: var(--muted); font-size: 13.5px; word-break: keep-all; }
.link-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 18px 0 16px; padding: 4px; border-radius: 12px; background: var(--surface); }
.link-tabs button { padding: 8px 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 650; cursor: pointer; }
.link-tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px #0000001a; }
.link-pane > p { color: var(--muted); font-size: 13.5px; line-height: 1.6; word-break: keep-all; }
.link-pane b { color: var(--ink); font-weight: 650; }
.link-code { margin: 18px 0 6px; padding: 18px 0; border-radius: 16px; background: var(--surface); color: var(--faint); font: 750 34px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; text-align: center; user-select: all; -webkit-user-select: all; }
.link-code[data-live] { color: var(--ink); }
.link-left { min-height: 1.6em; text-align: center; font-size: 13px !important; }
.link-primary { width: 100%; margin-top: 10px; padding: 13px 0; border: 0; border-radius: 12px; color: var(--bg); background: var(--ink); font-size: 15px; font-weight: 700; cursor: pointer; transition: opacity .15s; }
.link-primary:hover { opacity: .86; }
.link-primary:disabled { opacity: .45; cursor: default; }
.link-form { display: flex; flex-direction: column; margin-top: 16px; }
.link-input { width: 100%; padding: 14px 0; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: 700 28px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.link-input::placeholder { color: var(--faint); opacity: .6; }
.link-input:focus { outline: none; border-color: var(--ink); }
.link-msg { min-height: 1.6em; margin-top: 10px; text-align: center; color: var(--ink) !important; font-weight: 600; }
@media (max-width: 640px) { .link-open { margin-left: 8px; } .link-dialog { padding: 18px 18px 20px; } .link-code { font-size: 30px; } }

.trophy-page-back { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.trophy-page-back:hover { color: var(--ink); border-color: var(--surface-2); background: var(--surface); }

/* 트로피 서랍 (home-drawer.js): 머리의 트로피를 누르면 오른쪽에서 화면의 80%까지 밀려 나온다 */
.trophy-drawer { position: fixed; inset: 0 0 0 auto; width: 80vw; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 22px 0 0 22px; overflow: hidden; color: var(--ink); background: var(--bg); box-shadow: -18px 0 48px #00000040; transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
.trophy-drawer[open].is-in { transform: none; }
.trophy-drawer::backdrop { background: #00000066; opacity: 0; transition: opacity .28s; }
.trophy-drawer.is-in::backdrop { opacity: 1; }
.trophy-drawer-body { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 0 28px 36px; }
.trophy-drawer .trophy-section { max-width: 960px; margin: 0 auto; padding-top: 24px; }
.trophy-drawer .games-heading { padding-right: 40px; }
.trophy-drawer-close { position: absolute; top: 20px; right: 18px; z-index: 1; margin: 0; background: var(--surface); }
html:has(.trophy-drawer[open]) { overflow: hidden; }
@media (max-width: 640px) {
  .trophy-drawer { width: 84vw; border-radius: 18px 0 0 18px; }
  .trophy-drawer-body { padding: 0 14px 28px; }
  .trophy-drawer-close { right: 10px; }
  .trophy-drawer .trophy-games { grid-template-columns: 1fr; }
  .trophy-drawer .trophy-stats > div { padding: 10px; }
  .trophy-drawer .trophy-stats p { font-size: 11.5px; word-break: keep-all; }
}
@media (prefers-reduced-motion: reduce) { .trophy-drawer, .trophy-drawer::backdrop { transition: none; } }
