/* ===== nenecookie base: tokens, wallpaper, boot, login, shared controls =====
   Visual language: iOS 26 "Liquid Glass" (translucent frosted surfaces with a bright
   rim + specular edge highlight) laid over blurred game artwork, PS5-style. */
:root {
  --accent: #0a84ff; --accent2: #5e5ce6;
  --accent-rgb: 10, 132, 255; --accent2-rgb: 94, 92, 230;
  --glow: 0; --radius: 26px;
  --bg0: color-mix(in srgb, var(--accent) 4%, #050507);
  --bg1: color-mix(in srgb, var(--accent2) 14%, #0b0b12);
  --label: #fff; --label2: rgba(235, 235, 245, .62); --label3: rgba(235, 235, 245, .32);
  --text: var(--label); --muted: var(--label2);
  --fill: rgba(255, 255, 255, .10); --fill2: rgba(255, 255, 255, .17); --sep: rgba(255, 255, 255, .11); --line: var(--sep);
  --good: #30d158; --warn: #ff9f0a; --bad: #ff453a;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.32, .64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", system-ui, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --glass-bg: rgba(255, 255, 255, .085);
  --glass-blur: blur(30px) saturate(1.9) brightness(1.06);
  --shadow-l: 0 24px 60px rgba(0, 0, 0, .38), 0 4px 14px rgba(0, 0, 0, .22);
  --shadow-m: 0 10px 30px rgba(0, 0, 0, .3), 0 2px 6px rgba(0, 0, 0, .2);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; color: var(--label); font-family: var(--font); font-size: 16px; overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased; letter-spacing: -.011em; }
body { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; }
input, textarea, [contenteditable] { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; letter-spacing: inherit; }
.hidden { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); }
::selection { background: rgba(var(--accent-rgb), .4); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, .85); outline-offset: 3px; }
.ico { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; flex: none; }
.ico svg { width: 100%; height: 100%; }
.muted { color: var(--label2); }
.error { color: var(--bad); text-align: center; padding: 20px; }

.anim-reduced *, .anim-reduced *::before, .anim-reduced *::after { animation-iteration-count: 1 !important; }
.anim-off *, .anim-off *::before, .anim-off *::after { animation: none !important; transition-duration: .01ms !important; }
@media (prefers-reduced-motion: reduce) { * { animation-iteration-count: 1 !important; } }

/* ===== Liquid Glass material =====
   A frosted, saturated backdrop + a 1px gradient rim (bright at the lit corners, faint elsewhere)
   + a soft inner top highlight. Used for large surfaces; small controls use flat fills. */
.glass, .modal, .toast, .login-card, .pl-menu, .menu, .user-chip .avatar-wrap, .panel-sheet {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .05), var(--shadow-l);
}
.glass::before, .modal::before, .toast::before, .login-card::before, .pl-menu::before, .menu::before, .panel::before, .lg::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, .65), rgba(255, 255, 255, .08) 32%, rgba(255, 255, 255, .04) 62%, rgba(255, 255, 255, .38));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask-composite: exclude;
}
.glass, .modal, .login-card, .lg { position: relative; border-radius: var(--radius); }
.no-blur .glass, .no-blur .modal, .no-blur .toast, .no-blur .login-card, .no-blur .pl-menu, .no-blur .menu, .no-blur .panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(34, 34, 40, .95); }

/* ===== wallpaper: blurred artwork of the focused game, like the PS5 home screen ===== */
#bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(130% 100% at 50% 0%, var(--bg1), var(--bg0) 72%); }
.bg-blur { position: absolute; inset: -12%; background-size: cover; background-position: center; filter: blur(70px) saturate(1.5); opacity: 0; transform: scale(1.1); transition: opacity 1s var(--ease), transform 1.6s var(--ease); }
/* the blurred game icon is only shown on the game page */
.bg-blur.on { opacity: 0; }
html[data-view="detail"] .bg-blur.on { opacity: .85; transform: scale(1.32); }
/* motion-graphic wallpaper on every other page: slow flowing colour fields */
.aurora { display: none; transition: opacity 1s var(--ease); }
html[data-bg="aurora"] .aurora, html[data-bg="artwork"] .aurora { display: block; }
html[data-view="detail"] .aurora { opacity: .25; }
.aurora i { position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%; filter: blur(90px); mix-blend-mode: screen; opacity: .42; will-change: transform; }
.aurora i:nth-child(1) { left: -20vmax; top: -24vmax; background: rgb(var(--accent-rgb)); animation: flowA 22s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { right: -24vmax; top: -6vmax; background: rgb(var(--accent2-rgb)); animation: flowB 26s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { left: 8vw; bottom: -38vmax; background: color-mix(in srgb, var(--accent) 60%, var(--accent2)); opacity: .34; animation: flowC 30s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { right: 6vw; bottom: -30vmax; width: 46vmax; height: 46vmax; background: color-mix(in srgb, var(--accent2) 70%, #fff); opacity: .16; animation: flowD 24s ease-in-out infinite alternate; }
@keyframes flowA { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(26vw, 14vh, 0) scale(1.15); } 100% { transform: translate3d(8vw, 34vh, 0) rotate(40deg) scale(.95); } }
@keyframes flowB { 0% { transform: translate3d(0, 0, 0) scale(1.05); } 50% { transform: translate3d(-30vw, 22vh, 0) scale(.9); } 100% { transform: translate3d(-12vw, -4vh, 0) rotate(-30deg) scale(1.2); } }
@keyframes flowC { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(34vw, -22vh, 0) scale(1.1); } 100% { transform: translate3d(-10vw, -34vh, 0) scale(.9); } }
@keyframes flowD { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-40vw, -26vh, 0) scale(1.3); } }
html.playing .aurora i, html.bg-paused .aurora i { animation-play-state: paused; }
.grid3d { display: none; }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
.vignette { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 22%, transparent 60%, rgba(0, 0, 0, .5)); pointer-events: none; }

/* ===== boot splash ===== */
#boot { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: #000; transition: opacity .8s var(--ease), transform .8s var(--ease); }
#boot.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.boot-logo { width: clamp(96px, 20vmin, 150px); aspect-ratio: 1; display: grid; place-items: center; animation: bootIn 1.4s var(--ease) both; }
.boot-logo img { width: 100%; height: 100%; object-fit: contain; }
@keyframes bootIn { from { opacity: 0; transform: scale(.9); } }
.boot-name { font-size: clamp(22px, 4.4vmin, 32px); font-weight: 600; letter-spacing: .02em; color: #fff; animation: fadeUp 1.1s .5s var(--ease) both; }
.boot-tag { color: var(--label3); letter-spacing: .02em; font-size: 13px; animation: fadeUp 1.1s .8s var(--ease) both; min-height: 1em; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.boot-bar { width: clamp(120px, 22vmin, 190px); height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; margin-top: 22px; animation: fadeUp 1s 1s var(--ease) both; }
.boot-bar i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: #fff; border-radius: 3px; }
.boot-press { opacity: 0; margin-top: 12px; color: var(--label2); font-size: 13px; transition: opacity .4s; }
#boot.await-input .boot-press { opacity: 1; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .4; } }

.screen { position: fixed; inset: 0; z-index: 10; }

/* ===== buttons / controls ===== */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--fill); color: var(--label); border-radius: 999px; padding: 11px 20px; font-weight: 600; transition: transform .25s var(--spring), background .2s, opacity .2s; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn:hover { background: var(--fill2); }
.btn:active { transform: scale(.96); background: var(--fill2); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 .5px rgba(255, 255, 255, .25); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.danger { background: rgba(255, 69, 58, .16); color: #ff6961; }
.btn.danger:hover { background: rgba(255, 69, 58, .26); }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.btn.big { padding: 15px 28px; font-size: 17px; }
.btn.block { width: 100%; }
.btn.loading { pointer-events: none; opacity: .7; }
.btn.loading::before { content: ''; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--fill); border: 0; color: var(--label); transition: transform .25s var(--spring), background .2s; flex: none; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .12); }
.round-btn:hover { background: var(--fill2); } .round-btn:active { transform: scale(.9); }
.round-btn.sm { width: 34px; height: 34px; font-size: 14px; }
.round-btn.on { background: rgba(48, 209, 88, .2); color: var(--good); }
.round-btn.pending { color: var(--warn); }
.round-btn.accent { background: var(--accent); color: #fff; }
.round-btn.danger:hover { background: rgba(255, 69, 58, .28); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; } .btn-row.end { justify-content: flex-end; margin-bottom: 10px; }

.input { width: 100%; font: inherit; color: var(--label); background: rgba(255, 255, 255, .08); border: 0; border-radius: 14px; padding: 13px 16px; outline: none; transition: background .2s, box-shadow .2s; min-width: 0; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .18); letter-spacing: inherit; }
.input::placeholder { color: var(--label3); }
.input:focus { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .9); }
.input.bad { box-shadow: inset 0 0 0 1.5px var(--bad); }
textarea.input { resize: none; line-height: 1.45; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--label2) 50%), linear-gradient(135deg, var(--label2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
select.input option { background: #1c1c1e; color: #fff; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.search { position: relative; flex: 1; } .search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--label2); } .search .input { padding-left: 42px; border-radius: 999px; }
/* iOS switch */
.switch { position: relative; display: inline-block; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(120, 120, 128, .4); transition: background .3s var(--ease); }
.switch i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .35s var(--spring); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.switch input:checked + i { background: var(--good); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid #fff; outline-offset: 3px; }
.slider { display: grid; grid-template-columns: 130px 1fr 52px; align-items: center; gap: 14px; color: var(--label2); }
.slider output { text-align: right; color: var(--label); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .18); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); cursor: pointer; transition: transform .2s var(--spring); }
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.15); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 0; cursor: pointer; }
input[type=color] { width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0; background: none; cursor: pointer; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 255, 255, .4); }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
/* iOS segmented control */
.seg { display: inline-flex; background: rgba(120, 120, 128, .24); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; color: var(--label); font-weight: 500; font-size: 15px; transition: background .25s var(--ease), box-shadow .25s; }
.seg button.on { background: rgba(255, 255, 255, .2); box-shadow: 0 2px 8px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .25); font-weight: 600; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { position: relative; background: none; border: 0; padding: 9px 16px; border-radius: 999px; color: var(--label2); font-weight: 600; transition: color .2s, background .2s; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--label); }
.tab.on { color: var(--label); background: rgba(255, 255, 255, .15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.tab-badge { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.chip-btn { flex: none; border: 0; background: var(--fill); border-radius: 999px; padding: 7px 15px; font-size: 14px; font-weight: 500; color: var(--label); transition: background .2s; white-space: nowrap; }
.chip-btn:hover { background: var(--fill2); } .chip-btn.on { background: #fff; color: #000; font-weight: 600; }
.label { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--label2); margin: 16px 0 8px; font-weight: 600; }
.chip { display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--fill); font-size: 12px; font-weight: 600; color: var(--label2); }
.chip.admin { color: #ff8a80; background: rgba(255, 69, 58, .16); }
.chip.live { color: var(--good); background: rgba(48, 209, 88, .16); }
.chip.st-banned, .chip.st-rejected { color: var(--bad); } .chip.st-pending { color: var(--warn); } .chip.st-approved { color: var(--good); }
.spinner { width: 32px; height: 32px; margin: 40px auto; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--label2); padding: 50px 20px; animation: fadeUp .5s both; }
.empty-emoji { font-size: 48px; margin-bottom: 8px; }

/* ===== avatars, titles, levels ===== */
.avatar { position: relative; width: var(--s, 40px); height: var(--s, 40px); border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: calc(var(--s, 40px) * .42); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.dot { position: absolute; right: -1px; bottom: -1px; width: 28%; height: 28%; min-width: 11px; min-height: 11px; border-radius: 50%; background: #636366; border: 2.5px solid #1c1c1e; }
.dot.online { background: var(--good); } .dot.playing { background: var(--accent); }
.title-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #111; white-space: nowrap; vertical-align: middle; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.title-chip.removable { cursor: pointer; }
.lv-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--label); background: var(--fill2); font-variant-numeric: tabular-nums; }

/* ===== login ===== */
#login { display: grid; place-items: center; padding: 20px; transition: opacity .6s var(--ease), transform .6s var(--ease); overflow: auto; }
#login.leaving { opacity: 0; transform: scale(1.05); pointer-events: none; }
.login-card { width: min(400px, 100%); padding: 34px 28px 24px; text-align: center; animation: cardIn .9s var(--ease) both; border-radius: 36px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.login-logo { width: 76px; height: 76px; margin: 0 auto 12px; }
.login-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-name { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.login-tag { color: var(--label2); font-size: 15px; margin: 4px 0 20px; }
.login-card .tabs { justify-content: center; margin-bottom: 16px; }
.login-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-form.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.hint { font-size: 13px; color: var(--label2); margin-top: -4px; padding-left: 6px; }
.form-msg { font-size: 14px; line-height: 1.4; border-radius: 14px; }
.form-msg.error, .form-msg.ok, .form-msg.warn { padding: 10px 14px; animation: fadeUp .3s both; }
.form-msg.error { color: #ff8a80; background: rgba(255, 69, 58, .14); }
.form-msg.ok { color: #7ee89a; background: rgba(48, 209, 88, .14); }
.form-msg.warn { color: #ffcc66; background: rgba(255, 159, 10, .14); }
.login-foot { margin-top: 16px; font-size: 13px; color: var(--label3); display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ===== notification banners (top-left) ===== */
#toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 12px; z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(370px, calc(100vw - 24px)); pointer-events: none; }
.toast { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; cursor: pointer; border-radius: 24px; background: rgba(40, 40, 46, .5); animation: toastIn .6s var(--ease) both; }
.toast.out { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.94); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.96); } }
.toast-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.toast-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.toast-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .toast-text span { font-size: 14px; color: var(--label2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.toast-timer { display: none; }

/* ===== modals (iOS alert / sheet) ===== */
#modals { position: fixed; inset: 0; z-index: 90; pointer-events: none; } #modals > * { pointer-events: auto; }
.modal-back { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .35); animation: fadeIn .3s both; }
.modal-back.out { animation: fadeOut .25s both; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.modal { width: min(420px, 100%); max-height: 90vh; overflow: auto; padding: 24px; border-radius: 34px; background: rgba(48, 48, 54, .55); animation: modalIn .5s var(--spring) both; } .modal.wide { width: min(540px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: scale(.9); } }
.modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; letter-spacing: -.02em; } .modal-body p { color: var(--label2); line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

#fxTop { position: fixed; inset: 0; z-index: 120; pointer-events: none; overflow: hidden; }
