/* ───────────────────────── Alapok ───────────────────────── */
:root {
  --bg: #0b0d14;
  --bg2: #10131d;
  --card: #171b29;
  --card2: #1f2436;
  --card3: #282e44;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #f3f5ff;
  --muted: #8f98b3;
  --accent: #7c5cff;
  --accent2: #ff4fd8;
  --cyan: #2de1fc;
  --green: #22e07a;
  --yellow: #ffd23f;
  --red: #ff4d6d;
  --grad: linear-gradient(135deg, #7c5cff 0%, #b45cff 45%, #ff4fd8 100%);
  --r: 20px;
  --r-sm: 14px;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --tab-h: 66px;
  --font: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 700; overscroll-behavior: none; }
body { -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; touch-action: manipulation; overflow: hidden; }
#app { position: fixed; inset: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: 0.35; cursor: default; }
img { display: block; max-width: 100%; -webkit-user-drag: none; }
h1, h2, h3, p { margin: 0; }
small { font-weight: 700; }
[hidden] { display: none !important; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; }
.gap { gap: 10px; }
.ic { width: 22px; height: 22px; flex: none; }
.ic.sm { width: 17px; height: 17px; }
input, textarea { -webkit-user-select: text; user-select: text; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Indító képernyő */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: radial-gradient(circle at 50% 40%, #1c1640, var(--bg) 70%); }
.boot-logo, .logo, .w-logo { width: 84px; height: 84px; border-radius: 26px; background: url('../assets/icon.svg') center / cover; box-shadow: 0 18px 50px -10px rgba(124, 92, 255, 0.7); animation: float 3s ease-in-out infinite; }
.boot-text { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }

/* ───────────────────────── Gombok ───────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 16px; font-weight: 900; font-size: 16px; transition: transform 0.12s, filter 0.2s; white-space: nowrap; }
.btn:active { transform: scale(0.96); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -10px rgba(180, 92, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.secondary { background: var(--card2); border: 1px solid var(--line2); }
.btn.danger { background: var(--red); color: #fff; }
.btn.big { height: 56px; font-size: 18px; border-radius: 18px; }
.btn.block { display: flex; width: 100%; }
.ibtn { width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--card2); border: 1px solid var(--line); flex: none; transition: transform 0.12s; }
.ibtn:active { transform: scale(0.92); }
.ibtn.ghost { background: transparent; border-color: transparent; }
.ibtn.danger { color: var(--red); }
.glass { background: rgba(14, 16, 26, 0.72) !important; border: 1px solid rgba(255, 255, 255, 0.12) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

.input { width: 100%; background: var(--bg2); border: 1.5px solid var(--line2); border-radius: 14px; color: var(--text); font: inherit; font-size: 16px; padding: 12px 14px; outline: none; resize: none; }
.input:focus { border-color: var(--accent); }

.chips { display: flex; gap: 8px; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; }
.chip { flex: none; height: 38px; padding: 0 15px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 14px; font-weight: 800; color: #cfd5ea; transition: background 0.15s; }
.chip.on { background: #fff; color: #10131d; border-color: #fff; }

.switch { width: 46px; height: 28px; border-radius: 99px; background: #3a4058; position: relative; flex: none; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s cubic-bezier(.3,1.4,.5,1); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(18px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 2px; font-size: 16px; border-top: 1px solid var(--line); }

.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.sw { width: 38px; height: 38px; border-radius: 12px; background: var(--c); border: 2px solid rgba(255,255,255,.12); position: relative; flex: none; display: grid; place-items: center; font-weight: 900; color: #fff; overflow: hidden; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.7); transform: scale(1.06); }
.sw.def { background: conic-gradient(#ff4d5e, #ffd23f, #22c55e, #38bdf8, #8b5cf6, #ff4d5e); font-size: 13px; text-shadow: 0 1px 3px #000; }
.sw.custom { background: var(--c); font-size: 20px; text-shadow: 0 1px 3px #000; cursor: pointer; }
.sw.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.swatches.small .sw { width: 30px; height: 30px; border-radius: 10px; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.range { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; font-size: 14px; }
.range output { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: #343a52; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: #343a52; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; }

/* ───────────────────────── Alsó lap ───────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(4, 5, 10, 0.6); opacity: 0; transition: opacity 0.25s; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: calc(100% - var(--st) - 24px); display: flex; flex-direction: column; background: #141826; border: 1px solid var(--line2); border-bottom: 0; border-radius: 28px 28px 0 0; transform: translateY(100%); transition: transform 0.3s cubic-bezier(.2,.9,.25,1); box-shadow: 0 -20px 60px rgba(0,0,0,.5); }
.sheet-wrap.open .sheet-scrim { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { flex: none; height: 26px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-grip::before { content: ''; width: 42px; height: 5px; border-radius: 5px; background: #3a4058; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 6px 20px; }
.sheet-head h3 { font-size: 20px; font-weight: 900; }
.sheet-body { overflow-y: auto; padding: 6px 20px calc(20px + var(--sb)); overscroll-behavior: contain; -webkit-user-select: none; }
.confirm-text { font-size: 18px; text-align: center; margin: 8px 0 20px; line-height: 1.35; }

.toast { position: fixed; left: 50%; top: calc(var(--st) + 14px); transform: translate(-50%, -140%); z-index: 80; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; background: rgba(28, 32, 48, 0.94); border: 1px solid var(--line2); font-size: 14.5px; box-shadow: 0 14px 34px rgba(0,0,0,.4); transition: transform 0.32s cubic-bezier(.2,1.3,.4,1); pointer-events: none; text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.toast.error { background: #4a1420; border-color: #ff4d6d66; }


.tpl-list { display: flex; flex-direction: column; gap: 10px; }
.tpl { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px; border-radius: 18px; background: var(--card2); border: 1px solid var(--line); }
.tpl:active { transform: scale(0.98); }
.tpl-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--card3); flex: none; }
.tpl b { display: block; font-size: 16.5px; font-weight: 900; }
.tpl small { color: var(--muted); font-size: 13px; }

.welcome { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 6px; }
.welcome h2 { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.w-logo { width: 76px; height: 76px; }
.w-steps { list-style: none; padding: 0; margin: 10px 0 14px; display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }
.w-steps li { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--card2); }
.w-steps span { grid-row: span 2; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--card3); }
.w-steps small { color: var(--muted); font-size: 13px; }

.settings .emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.emo { width: 42px; height: 42px; border-radius: 12px; font-size: 22px; background: var(--card2); border: 2px solid transparent; }
.emo.on { border-color: #fff; background: var(--card3); }
.settings .switch-row { border-top: 0; padding-top: 0; }

/* ───────────────────────── Színpad (3D) ───────────────────────── */
.stage { position: fixed; inset: 0; background: #000; z-index: 20; overflow: hidden; }
canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }

/* ── Szerkesztő ── */
.ed { position: absolute; inset: 0; pointer-events: none; }
.ed > * { pointer-events: auto; }
.ed-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: calc(var(--st) + 10px) calc(12px + var(--sr)) 10px calc(12px + var(--sl)); pointer-events: none; }
.ed-top > * { pointer-events: auto; }
.ed-name { flex: 1; min-width: 0; max-width: 340px; margin-right: auto; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px; border-radius: 14px; }
.ed-name .em { font-size: 20px; flex: none; }
.ed-name .nm { font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; text-align: left; }
.ed-name .ic { flex: none; opacity: 0.7; }
.btn-play { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 14px; background: linear-gradient(135deg, #22e07a, #12b5a0); color: #04130b; font-weight: 900; box-shadow: 0 8px 22px -8px rgba(34, 224, 122, 0.9); }
.btn-play:active { transform: scale(0.95); }
.ed-hint { position: absolute; left: 50%; top: calc(var(--st) + 66px); transform: translate(-50%, -8px); opacity: 0; pointer-events: none !important; padding: 8px 14px; border-radius: 99px; background: rgba(14, 16, 26, 0.8); font-size: 13.5px; white-space: nowrap; transition: all 0.25s; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.ed-hint.show { opacity: 1; transform: translate(-50%, 0); }
.ed-float { position: absolute; right: calc(12px + var(--sr)); top: calc(var(--st) + 66px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.ed-float > * { pointer-events: auto; }
.fbtn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; position: relative; transition: opacity 0.2s, transform 0.12s; }
.fbtn:active { transform: scale(0.92); }
.fbtn:disabled { opacity: 0.4; }
.fbtn small { position: absolute; bottom: -2px; right: -4px; font-size: 10px; padding: 1px 4px; border-radius: 6px; background: var(--accent); }

.ed-panel { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(13, 15, 24, 0.94); border-top: 1px solid var(--line2); border-radius: 24px 24px 0 0; padding: 8px calc(10px + var(--sr)) calc(10px + var(--sb)) calc(10px + var(--sl)); box-shadow: 0 -16px 40px rgba(0,0,0,.35); }
.ed-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.ed-tools button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border-radius: 13px; font-size: 13.5px; color: var(--muted); background: rgba(255,255,255,.04); }
.ed-tools button.on { background: #fff; color: #10131d; }
.ed-body { height: 212px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; overscroll-behavior: contain; }
.ed-body::-webkit-scrollbar { display: none; }
.ed-body .chips.scroll { margin: 0 -10px 8px; padding: 0 10px; }
.ed-body .chip { height: 34px; font-size: 13.5px; padding: 0 13px; }
.items { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, 64px); grid-auto-columns: 70px; gap: 6px; overflow-x: auto; margin: 0 -10px 8px; padding: 0 10px; scrollbar-width: none; }
.items::-webkit-scrollbar { display: none; }
.item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border-radius: 14px; background: var(--card); border: 2px solid transparent; padding: 0 2px 4px; transition: transform 0.12s; }
.item:active { transform: scale(0.94); }
.item.on { border-color: var(--cyan); background: #182337; }
.item img { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 46px; height: 46px; pointer-events: none; }
.item span { position: relative; font-size: 10.5px; color: #cfd5ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ed-body .swatches.small { flex-wrap: nowrap; overflow-x: auto; margin: 0 -10px; padding: 3px 10px; scrollbar-width: none; gap: 7px; }

.ed-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); text-align: center; font-size: 15px; }
.ed-empty .ic { width: 34px; height: 34px; color: #6e7798; }
.ed-empty small { font-size: 13px; }
.ed-empty .ic.sm { width: 15px; height: 15px; vertical-align: -3px; }
.ed-tip { font-size: 13.5px; color: #c8cee2; margin: 2px 0 10px; display: flex; gap: 6px; align-items: flex-start; line-height: 1.35; }

.sel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sel-head img { width: 44px; height: 44px; border-radius: 12px; background: var(--card); }
.sel-head b { display: block; font-size: 16px; font-weight: 900; }
.sel-head small { color: var(--muted); font-size: 12.5px; }
.sel-head .ibtn { width: 40px; height: 40px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.05); margin-bottom: 10px; }
.seg button { display: flex; align-items: center; justify-content: center; gap: 5px; height: 34px; border-radius: 10px; font-size: 12.5px; color: var(--muted); }
.seg button.on { background: var(--card3); color: #fff; }
.seg.mini { margin: 4px 0 8px; }

.move-grid { display: flex; align-items: center; justify-content: center; gap: 14px; }
.dpad { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(3, 38px); gap: 3px; }
.dpad button, .mv-col button, .size-row button { display: grid; place-items: center; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); touch-action: none; }
.dpad button:active, .mv-col button:active, .size-row button:active { background: var(--accent); }
.d-up { grid-column: 2; grid-row: 1; } .d-left { grid-column: 1; grid-row: 2; } .d-right { grid-column: 3; grid-row: 2; } .d-down { grid-column: 2; grid-row: 3; }
.mv-col { display: flex; flex-direction: column; gap: 6px; }
.mv-col button { display: flex; gap: 4px; height: 50px; padding: 0 12px; font-size: 13.5px; }
.snap-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; justify-content: center; font-size: 13px; color: var(--muted); }
.snap-row .chip { height: 30px; padding: 0 12px; }
.size-rows { display: flex; flex-direction: column; gap: 6px; }
.size-row { display: grid; grid-template-columns: 1fr 44px 64px 44px; align-items: center; gap: 6px; font-size: 14px; }
.size-row button { height: 38px; }
.size-row b { text-align: center; font-variant-numeric: tabular-nums; display: grid; place-items: center; }

.fbtn.on { background: var(--grad) !important; border-color: transparent !important; box-shadow: 0 6px 18px -6px rgba(180, 92, 255, 0.9); }
.fbtn[data-a=brush] small { background: rgba(0,0,0,.55); right: 50%; transform: translateX(50%); bottom: -7px; white-space: nowrap; }
.role-box { display: flex; flex-direction: column; gap: 6px; padding: 10px; margin-bottom: 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.role-box .lbl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.role-box .seg, .beh-params .seg { margin: 0; }
.role-box textarea.input { margin: 2px 0 0; }
.seg.wrap { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.seg.wrap button { height: 32px; font-size: 12px; }
.ch-row { gap: 5px; margin-bottom: 6px; }
.chip.chd { height: 30px; padding: 0 10px 0 8px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.chip.chd::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.chip.chd.on { background: var(--c); color: #10131d; border-color: var(--c); }
.chip.chd.on::before { background: #fff; }
.beh-params small { display: block; font-size: 11.5px; margin-top: 6px; }
.chdot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.cover-row { display: flex; gap: 10px; align-items: center; }
.cover-prev { width: 96px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line2); flex: none; }
.cover-field small { font-size: 12px; text-transform: none; letter-spacing: 0; }
.beh-list { display: flex; flex-direction: column; gap: 6px; }
.beh { border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.beh.on { border-color: rgba(34, 224, 122, 0.4); }
.beh-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-align: left; }
.beh-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--card2); display: grid; place-items: center; font-size: 18px; flex: none; }
.beh-row b { display: block; font-size: 14px; }
.beh-row small { color: var(--muted); font-size: 12px; }
.beh-params { padding: 0 12px 10px; }
.beh-params .range { grid-template-columns: 74px 1fr 36px; font-size: 13px; }
.ed-body textarea.input { margin-bottom: 8px; font-size: 15px; padding: 10px 12px; }

/* Fekvő telefon: a panel jobbra kerül */
@media (orientation: landscape) and (max-height: 560px) {
  .ed-panel { left: auto; top: 0; width: min(340px, 46vw); border-radius: 24px 0 0 24px; border-top: 0; border-left: 1px solid var(--line2); padding-top: calc(var(--st) + 8px); display: flex; flex-direction: column; }
  .ed-body { height: auto; flex: 1; }
  .ed-top { right: min(340px, 46vw); }
  .ed-float { right: calc(min(340px, 46vw) + 12px); }
  .ed-tools button span { display: none; }
  .items { grid-template-rows: repeat(3, 64px); }
}

/* ── Játék HUD ── */
.hud { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hud > * { pointer-events: auto; }
.touch-layer { position: absolute; inset: 0; touch-action: none; }
.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 8px; padding: calc(var(--st) + 10px) calc(12px + var(--sr)) 0 calc(12px + var(--sl)); pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; justify-content: center; pointer-events: none !important; }
.hchip { height: 38px; padding: 0 13px; border-radius: 13px; display: flex; align-items: center; gap: 6px; background: rgba(10, 12, 20, 0.66); border: 1px solid rgba(255,255,255,.12); font-size: 15px; font-variant-numeric: tabular-nums; }
.hchip b { font-weight: 900; }
.hchip.warn { background: rgba(255, 77, 109, 0.75); animation: pulse 0.8s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.keydot { filter: drop-shadow(0 0 4px var(--c)); }
.hud-fps { min-width: 44px; font-size: 11px; color: #9aa3bd; text-align: right; padding-top: 12px; pointer-events: none !important; }
.hud-msg { position: absolute; left: 50%; top: calc(var(--st) + 64px); transform: translate(-50%, -10px) scale(0.96); opacity: 0; max-width: min(420px, calc(100% - 32px)); padding: 12px 16px; border-radius: 16px; background: #f6e7c8; color: #3a2a14; font-size: 15.5px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: all 0.25s; pointer-events: none !important; }
.hud-msg.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.banner { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); text-align: center; pointer-events: none !important; opacity: 0; display: flex; flex-direction: column; gap: 4px; width: max-content; max-width: 90%; }
.banner b { font-size: clamp(26px, 6vw, 42px); font-weight: 900; letter-spacing: -0.02em; text-shadow: 0 4px 18px rgba(0,0,0,.6), 0 2px 0 rgba(0,0,0,.25); }
.banner span { font-size: 16px; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.banner.show { animation: bannerIn 2.6s ease forwards; }
@keyframes bannerIn { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 20% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%); } }

.joy-base { position: absolute; left: 0; top: 0; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.06), rgba(255,255,255,.14)); border: 2px solid rgba(255,255,255,.28); opacity: 0; transition: opacity 0.12s; pointer-events: none !important; }
.joy-base.on { opacity: 1; }
.joy-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(255,255,255,.85); box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.joy-hint { position: absolute; left: calc(36px + var(--sl)); bottom: calc(36px + var(--sb)); width: 110px; height: 110px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.22); display: grid; place-items: center; pointer-events: none !important; }
.joy-hint div { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.18); }
.jump-btn { position: absolute; right: calc(30px + var(--sr)); bottom: calc(34px + var(--sb)); width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.45); color: #fff; backdrop-filter: blur(6px); touch-action: none; transition: transform 0.08s, background 0.08s; }
.jump-btn .ic { width: 40px; height: 40px; }
.jump-btn.on { transform: scale(0.9); background: rgba(124, 92, 255, 0.7); }
.kb-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 12.5px; color: rgba(255,255,255,.7); background: rgba(0,0,0,.35); padding: 6px 12px; border-radius: 99px; pointer-events: none !important; white-space: nowrap; }
@media (pointer: fine) { .joy-hint, .jump-btn { display: none; } }
.hud-flash { position: absolute; inset: 0; opacity: 0; pointer-events: none !important; }
.hud-flash.go { animation: flash 0.5s ease-out; }
@keyframes flash { 0% { opacity: 0.55; } 100% { opacity: 0; } }

.overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 6, 12, 0.55); backdrop-filter: blur(4px); z-index: 5; }
.overlay.show { display: flex; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.ov-card { position: relative; width: min(380px, 100%); padding: 26px 22px 20px; border-radius: 28px; background: #151a29; border: 1px solid var(--line2); text-align: center; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.55); animation: popIn 0.4s cubic-bezier(.2,1.4,.4,1); overflow: hidden; }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } }
.ov-card h2 { font-size: 30px; font-weight: 900; letter-spacing: -0.02em; }
.ov-card.win { background: radial-gradient(120% 70% at 50% 0%, rgba(255, 210, 63, 0.25), #151a29 60%); }
.ov-emoji { font-size: 54px; }
.stars { display: flex; justify-content: center; gap: 6px; font-size: 46px; line-height: 1; }
.stars span { color: #3a4058; transform: scale(0); animation: starIn 0.45s cubic-bezier(.2,1.6,.4,1) forwards; animation-delay: var(--d); }
.stars span.on { color: var(--yellow); text-shadow: 0 0 18px rgba(255, 210, 63, .7); }
.stars span:nth-child(2) { font-size: 58px; margin-top: -8px; }
@keyframes starIn { to { transform: scale(1); } }
.ov-stats { display: flex; justify-content: center; gap: 8px; margin: 4px 0; }
.ov-stats div { flex: 1; padding: 10px 6px; border-radius: 14px; background: rgba(255,255,255,.06); display: flex; flex-direction: column; }
.ov-stats small { color: var(--muted); font-size: 12px; }
.ov-stats b { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ov-best { color: var(--yellow); }
.ov-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.ov-col { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; left: calc(var(--i) * 4.2%); width: 8px; height: 13px; border-radius: 2px; background: hsl(calc(var(--i) * 47) 90% 62%); animation: fall calc(1.6s + var(--i) * 0.05s) ease-in forwards; animation-delay: calc(var(--i) * 0.04s); opacity: 0.9; }
@keyframes fall { to { transform: translateY(440px) rotate(calc(var(--i) * 70deg)); opacity: 0; } }

/* ═════════════════════════ Áruház (világos / sötét téma) ═════════════════════════ */
:root {
  --p-font: 'Google Sans Text', 'Google Sans', Roboto, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --p-font-title: 'Google Sans', 'Google Sans Display', Roboto, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --p-bg: #ffffff; --p-s1: #f1f4f2; --p-s2: #e6ebe8; --p-sheet: #ffffff; --p-nav: #f4f7f5;
  --p-text: #1f1f1f; --p-text2: #444746; --p-line: #c4c7c5; --p-div: #e3e5e3; --p-outline: #747775;
  --p-primary: #01875f; --p-on-primary: #ffffff; --p-tonal: #c4eed0; --p-on-tonal: #072711; --p-link: #01875f;
  --p-snack: #313033; --p-on-snack: #f2f2f2; --p-scrim: rgba(0, 0, 0, 0.32); --p-menu: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --p-bg: #131314; --p-s1: #1e1f20; --p-s2: #2a2b2d; --p-sheet: #1e1f20; --p-nav: #1b1c1d;
    --p-text: #e3e3e3; --p-text2: #c4c7c5; --p-line: #444746; --p-div: #2b2d2f; --p-outline: #8e918f;
    --p-primary: #a8dab5; --p-on-primary: #003919; --p-tonal: #1f4a2e; --p-on-tonal: #c4eed0; --p-link: #a8dab5;
    --p-snack: #e3e3e3; --p-on-snack: #1f1f1f; --p-scrim: rgba(0, 0, 0, 0.55); --p-menu: #2b2c2e;
  }
}
:root[data-theme=dark] {
  --p-bg: #131314; --p-s1: #1e1f20; --p-s2: #2a2b2d; --p-sheet: #1e1f20; --p-nav: #1b1c1d;
  --p-text: #e3e3e3; --p-text2: #c4c7c5; --p-line: #444746; --p-div: #2b2d2f; --p-outline: #8e918f;
  --p-primary: #a8dab5; --p-on-primary: #003919; --p-tonal: #1f4a2e; --p-on-tonal: #c4eed0; --p-link: #a8dab5;
  --p-snack: #e3e3e3; --p-on-snack: #1f1f1f; --p-scrim: rgba(0, 0, 0, 0.55); --p-menu: #2b2c2e;
}
:root[data-theme=light] { color-scheme: light; }
html, body { background: var(--p-bg); }
.boot { background: var(--p-bg); }
.boot-logo { width: 96px; height: 96px; }

.ps { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--p-bg); color: var(--p-text); font-family: var(--p-font); font-weight: 400; }
.ps-page { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pg { max-width: 1040px; margin: 0 auto; min-height: 100%; padding-bottom: calc(32px + var(--sb)); }
.pg-in { animation: pgIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes pgIn { from { opacity: 0; transform: translateX(28px); } }
body.in-stage .ps, body.in-stage .ga { visibility: hidden; }
.ps b, .psheet b { font-weight: 500; }
.ps small, body:not(.in-stage) .sheet small, .ga small { font-weight: 400; }
.ps .ic { stroke-width: 2; }

/* Felső sáv */
.pbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: calc(var(--st) + 8px) calc(16px + var(--sr)) 8px calc(16px + var(--sl)); background: var(--p-bg); }
.pbar-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 18px; border-radius: 28px; background: var(--p-s1); color: var(--p-text2); font-size: 16px; text-align: left; }
.pbar-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar-title { flex: 1; min-width: 0; font: 400 24px/32px var(--p-font-title); padding-left: 4px; }
.pbar-me { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--p-s2); flex: none; display: grid; place-items: center; }
.pbar-me img { width: 160%; max-width: none; transform: translateY(18%); }
.ib { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--p-text2); flex: none; transition: background 0.15s; }
.ib:active { background: var(--p-s2); }
.dbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 2px; padding: calc(var(--st) + 4px) calc(4px + var(--sr)) 4px calc(4px + var(--sl)); background: var(--p-bg); }
.dbar-title { flex: 1; min-width: 0; font: 400 22px/28px var(--p-font-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.ptabs { position: sticky; top: calc(var(--st) + 64px); z-index: 3; display: flex; padding: 0 calc(4px + var(--sr)) 0 calc(4px + var(--sl)); background: var(--p-bg); border-bottom: 1px solid var(--p-div); overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs button { position: relative; height: 48px; padding: 0 16px; font: 500 14px var(--p-font); color: var(--p-text2); white-space: nowrap; }
.ptabs button.on { color: var(--p-primary); }
.ptabs button.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--p-primary); }
.pbody { padding: 8px calc(16px + var(--sr)) 0 calc(16px + var(--sl)); }

/* Alsó navigáció */
.navbar { flex: none; display: flex; justify-content: space-around; height: calc(80px + var(--sb)); padding: 12px calc(8px + var(--sr)) var(--sb) calc(8px + var(--sl)); background: var(--p-nav); z-index: 5; }
.navbar button { flex: 1; max-width: 128px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 500 12px/16px var(--p-font); color: var(--p-text2); }
.navbar i { width: 64px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background 0.2s; }
.navbar button.on { color: var(--p-text); font-weight: 700; }
.navbar button.on i { background: var(--p-tonal); color: var(--p-on-tonal); }

/* Vízszintes sorok */
.hs { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-16px - var(--sr)) 0 calc(-16px - var(--sl)); padding: 4px calc(16px + var(--sr)) 8px calc(16px + var(--sl)); scroll-padding: 0 16px; }
.hs::-webkit-scrollbar { display: none; }
.hs > * { flex: none; scroll-snap-align: start; }
.psec { margin-top: 22px; }
.psec-h { display: flex; align-items: center; gap: 8px; font: 500 18px/24px var(--p-font-title); margin: 0 0 10px; color: var(--p-text); cursor: pointer; }
.psec-h > .ic { margin-left: auto; color: var(--p-text2); }
.psec-h.static { cursor: default; margin-top: 20px; }
.psec-h small { font: 400 14px var(--p-font); color: var(--p-text2); }

/* Játék ikon */
.gi { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 22%; overflow: hidden; flex: none; container-type: inline-size;
  background: linear-gradient(140deg, hsl(var(--h) 72% 64%), hsl(calc(var(--h) + 40) 62% 40%)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.gi img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gi-emo { font-size: 46cqw; line-height: 1; }
.gi.sm { width: 40px; border-radius: 10px; }
.gi.md { width: 56px; border-radius: 13px; }
.gi.lg { width: 76px; border-radius: 18px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }

/* Kiemelt kártyák */
.hs.feat { margin-top: 12px; gap: 12px; }
.fcard { width: min(84vw, 420px); display: flex; flex-direction: column; gap: 10px; text-align: left; }
.fc-img { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, hsl(var(--h) 70% 64%), hsl(calc(var(--h) + 50) 60% 36%)); }
.fc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.fc-emo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; }
.fc-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fc-meta b, .fc-meta small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-meta b { font-size: 15px; line-height: 20px; }
.fc-meta small { font-size: 13px; color: var(--p-text2); }
.fcard:active .fc-img, .tile:active .gi { filter: brightness(0.92); }

/* Ikon csempék */
.tile { width: 108px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.tile b { font-weight: 400; font-size: 14px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile small { font-size: 12px; color: var(--p-text2); margin-top: -6px; }

/* Lista sorok */
.plist { display: flex; flex-direction: column; }
.lrow { display: flex; align-items: center; gap: 16px; padding: 8px; margin: 0 -8px; border-radius: 12px; cursor: pointer; transition: background 0.15s; }
.lrow:active { background: var(--p-s1); }
.lr-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lr-t b { font-weight: 400; font-size: 16px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-t small { font-size: 13px; line-height: 18px; color: var(--p-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs.cols { gap: 20px; }
.col { width: min(82vw, 340px); display: flex; flex-direction: column; }
.crow { width: 100%; display: flex; align-items: center; gap: 16px; padding: 12px 0; text-align: left; border-bottom: 1px solid var(--p-div); color: var(--p-text); }
.crow b { display: block; font-size: 16px; }
.crow small { font-size: 13px; color: var(--p-text2); }
.crow > .ic { color: var(--p-text2); }
.crow-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: hsl(var(--h) 80% 90%); flex: none; }
[data-theme=dark] .crow-ic { background: hsl(var(--h) 30% 24%); }

/* Kategória csempék (keresés) */
.ctiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 4px; }
.ctile { position: relative; height: 72px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 0 0 16px; text-align: left; font: 500 15px var(--p-font); background: hsl(var(--h) 85% 89%); color: hsl(var(--h) 70% 20%); }
.ctile span { font-size: 40px; transform: rotate(14deg) translate(4px, 8px); }
[data-theme=dark] .ctile { background: hsl(var(--h) 32% 22%); color: hsl(var(--h) 85% 86%); }

/* Keresősáv */
.sbar { display: flex; align-items: center; gap: 14px; height: 56px; margin: calc(var(--st) + 8px) calc(16px + var(--sr)) 8px calc(16px + var(--sl)); padding: 0 4px 0 18px; border-radius: 28px; background: var(--p-s1); color: var(--p-text2); }
.sbar input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--p-text); font: 400 16px var(--p-font); }
.sbar input::-webkit-search-cancel-button { display: none; }

/* Promóciós kártya */
.promo { position: relative; width: 100%; margin-top: 26px; display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 24px; text-align: left; overflow: hidden; background: var(--p-tonal); color: var(--p-on-tonal); }
.promo-art { position: relative; width: 74px; height: 74px; flex: none; }
.promo-art i { position: absolute; border-radius: 12px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18); }
.promo-art i:nth-child(1) { width: 44px; height: 44px; left: 0; bottom: 0; background: #ff6b6b; transform: rotate(-8deg); }
.promo-art i:nth-child(2) { width: 36px; height: 36px; right: 2px; bottom: 6px; background: #4dabf7; transform: rotate(10deg); }
.promo-art i:nth-child(3) { width: 30px; height: 30px; left: 22px; top: 0; background: #ffd43b; transform: rotate(18deg); }
.promo-t { display: flex; flex-direction: column; gap: 3px; }
.promo-t small { font-size: 12px; font-weight: 500; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.06em; }
.promo-t b { font: 500 18px/24px var(--p-font-title); }
.promo-t span { font-size: 14px; line-height: 20px; opacity: 0.85; }

/* Gombok (Material 3) */
.pbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 22px; border-radius: 20px; font: 500 14px var(--p-font); letter-spacing: 0.01em; white-space: nowrap; transition: background 0.15s, filter 0.15s, box-shadow 0.3s; }
.pbtn.filled { background: var(--p-primary); color: var(--p-on-primary); }
.pbtn.outline { border: 1px solid var(--p-line); color: var(--p-primary); }
.pbtn.tonal { background: var(--p-tonal); color: var(--p-on-tonal); }
.pbtn.sm { height: 32px; padding: 0 16px; font-size: 13px; flex: none; }
.pbtn.block { display: flex; width: 100%; }
.pbtn:active { filter: brightness(0.9); }
.pbtn:disabled { opacity: 0.85; }
.pbtn.pulse { animation: pbtnPulse 1.4s ease-in-out infinite; }
@keyframes pbtnPulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--p-primary) 28%, transparent); } }
.pspin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
.ga-load .pspin { width: 34px; height: 34px; color: #fff; }

/* Adatlap */
.dhead { display: flex; gap: 20px; align-items: center; margin: 4px 0 20px; }
.dhead h1 { font: 500 24px/30px var(--p-font-title); overflow-wrap: anywhere; }
.dev { display: block; color: var(--p-link); font-size: 14px; font-weight: 500; margin-top: 4px; }
.dhead small { display: block; font-size: 12px; color: var(--p-text2); margin-top: 4px; }
.dstats { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 20px; padding: 0 8px; }
.dstats::-webkit-scrollbar { display: none; }
.dstats > div { position: relative; flex: 1 0 auto; min-width: 86px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 12px; }
.dstats > div + div::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--p-div); }
.dstats b { display: flex; align-items: center; height: 20px; font-size: 14px; }
.dstats small { font-size: 12px; color: var(--p-text2); white-space: nowrap; }
.age { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 3px; border: 1.5px solid currentColor; border-radius: 3px; font-size: 11px; font-weight: 700; }
.dact { display: flex; gap: 8px; }
.dact .pbtn { flex: 1; }
.detail > .pbtn.block { margin-top: 10px; }
.dnote { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--p-text2); margin-top: 14px; }
.dnote .ic { margin-top: 1px; }
.shots { margin-top: 18px; gap: 8px; }
.shot { display: block; height: 176px; aspect-ratio: 16 / 9; border-radius: 12px; object-fit: cover; background: var(--p-s1); }
.shot.skel { background: linear-gradient(90deg, var(--p-s1), var(--p-s2), var(--p-s1)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 20px; color: var(--p-text2); }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pchips.center { justify-content: center; }
.pchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--p-line); font: 500 13px var(--p-font); color: var(--p-text2); white-space: nowrap; }
.pchip.sel.on { background: var(--p-tonal); color: var(--p-on-tonal); border-color: transparent; }
.safety { border: 1px solid var(--p-line); border-radius: 12px; padding: 0 16px; }
.safety p { display: flex; gap: 16px; padding: 14px 0; align-items: flex-start; }
.safety p + p { border-top: 1px solid var(--p-div); }
.safety .ic { color: var(--p-text2); margin-top: 1px; }
.safety b { display: block; font-size: 14px; }
.safety small { font-size: 13px; color: var(--p-text2); }
.muted2 { color: var(--p-text2); font-size: 14px; line-height: 1.45; }
.stars-rate { display: flex; justify-content: space-between; max-width: 300px; margin-top: 10px; }
.stars-rate button { width: 48px; height: 48px; display: grid; place-items: center; color: var(--p-text2); }
.stars-rate .ic { width: 34px; height: 34px; stroke-width: 1.4; transition: transform 0.15s; }
.stars-rate .on { color: var(--p-primary); }
.stars-rate .on .ic { fill: currentColor; }
.stars-rate button:active .ic { transform: scale(1.2); }
.about-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.about-head b { display: block; font-size: 16px; }
.about-head small { font-size: 13px; color: var(--p-text2); }
.about-desc { font-size: 15px; line-height: 1.55; color: var(--p-text2); white-space: pre-wrap; }
.info { display: grid; grid-template-columns: auto 1fr; gap: 14px 20px; margin: 0; font-size: 14px; }
.info dt { color: var(--p-text2); }
.info dd { margin: 0; text-align: right; }

/* Könyvtár, Stúdió */
.segs { display: flex; border: 1px solid var(--p-outline); border-radius: 20px; overflow: hidden; margin: 8px 0 12px; }
.segs button { flex: 1; height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; font: 500 14px var(--p-font); color: var(--p-text); }
.segs button + button { border-left: 1px solid var(--p-outline); }
.segs button.on { background: var(--p-tonal); color: var(--p-on-tonal); }
.pempty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 20px; color: var(--p-text2); }
.pempty-ic { width: 76px; height: 76px; border-radius: 50%; background: var(--p-s1); display: grid; place-items: center; color: var(--p-primary); margin-bottom: 10px; }
.pempty-ic .ic { width: 32px; height: 32px; }
.pempty b { font-size: 16px; color: var(--p-text); }
.pempty p { font-size: 14px; line-height: 1.45; max-width: 330px; }
.studio-hero { position: relative; overflow: hidden; padding: 20px 112px 20px 20px; border-radius: 24px; margin: 4px 0 6px; background: var(--p-tonal); color: var(--p-on-tonal); }
.studio-hero b { display: block; font: 500 20px/26px var(--p-font-title); }
.studio-hero p { font-size: 14px; line-height: 20px; margin-top: 6px; opacity: 0.88; }
.sh-cubes { position: absolute; right: 8px; top: 50%; width: 100px; height: 100px; transform: translateY(-50%); }
.sh-cubes i { position: absolute; border-radius: 14px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2); }
.sh-cubes i:nth-child(1) { width: 52px; height: 52px; left: 10px; bottom: 6px; background: #ff6b6b; transform: rotate(-10deg); }
.sh-cubes i:nth-child(2) { width: 42px; height: 42px; right: 4px; bottom: 16px; background: #4dabf7; transform: rotate(12deg); }
.sh-cubes i:nth-child(3) { width: 34px; height: 34px; left: 38px; top: 4px; background: #ffd43b; transform: rotate(20deg); }
.fab { position: absolute; right: calc(16px + var(--sr)); bottom: calc(96px + var(--sb)); z-index: 5; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px 0 16px; border-radius: 16px; background: var(--p-tonal); color: var(--p-on-tonal); font: 500 15px var(--p-font); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.12); }
.fab:active { filter: brightness(0.94); }
.ps:not(.pushed) .pg { padding-bottom: calc(24px + var(--sb)); }

/* Profil, beállítások */
.pcard { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 16px 18px; margin-bottom: 16px; border-radius: 24px; background: var(--p-s1); }
.ps .portrait { width: 180px; height: 180px; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.25)); }
.pinput { width: 100%; max-width: 280px; height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--p-outline); background: transparent; color: var(--p-text); font: 400 18px var(--p-font); outline: none; }
.pinput.center { text-align: center; }
.pinput:focus { border: 2px solid var(--p-primary); }
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; gap: 8px; }
.pstats div { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 12px; background: var(--p-bg); }
.pstats b { font-size: 18px; }
.pstats small { font-size: 11.5px; color: var(--p-text2); }
.pfield { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.pfield > span { font-size: 14px; font-weight: 500; color: var(--p-text); }
.pfield > small { font-size: 12.5px; color: var(--p-text2); }
.pfield .pchips { margin-top: 0; }
.ps .sw { border-color: rgba(0, 0, 0, 0.12); }
.ps .sw.on { border-color: var(--p-bg); box-shadow: 0 0 0 2.5px var(--p-primary); }
.slist { margin: 4px 0 8px; }
.srow { width: 100%; display: flex; align-items: center; gap: 16px; padding: 12px 0; text-align: left; color: var(--p-text); }
.srow b { display: block; font-size: 16px; font-weight: 400; }
.srow small { font-size: 13px; color: var(--p-text2); }
.pswitch { position: relative; width: 52px; height: 32px; border-radius: 16px; border: 2px solid var(--p-outline); background: var(--p-s2); flex: none; transition: background 0.2s, border-color 0.2s; }
.pswitch::after { content: ''; position: absolute; top: 50%; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--p-outline); transform: translateY(-50%); transition: all 0.2s cubic-bezier(0.3, 1.3, 0.5, 1); }
.pswitch.on { background: var(--p-primary); border-color: var(--p-primary); }
.pswitch.on::after { left: 22px; width: 24px; height: 24px; background: var(--p-on-primary); }

/* ⋮ menü */
.pmenu-wrap { position: fixed; inset: 0; z-index: 60; }
.pmenu { position: absolute; min-width: 232px; padding: 8px 0; border-radius: 4px; background: var(--p-menu); color: var(--p-text); font-family: var(--p-font); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12); transform-origin: top right; transform: scale(0.9); opacity: 0; transition: transform 0.15s, opacity 0.15s; }
.pmenu-wrap.open .pmenu { transform: none; opacity: 1; }
.pmenu button { width: 100%; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 16px; font-size: 15px; text-align: left; color: var(--p-text); }
.pmenu button .ic { color: var(--p-text2); }
.pmenu button:active { background: var(--p-s1); }

/* Alsó lapok, párbeszédek, értesítések az áruházban */
body:not(.in-stage) .sheet { background: var(--p-sheet); color: var(--p-text); border: 0; border-radius: 28px 28px 0 0; box-shadow: none; font-family: var(--p-font); font-weight: 400; }
body:not(.in-stage) .sheet-scrim { background: var(--p-scrim); }
body:not(.in-stage) .sheet-grip::before { width: 32px; height: 4px; background: var(--p-outline); opacity: 0.5; }
body:not(.in-stage) .sheet-head h3 { font: 400 22px/28px var(--p-font-title); }
body:not(.in-stage) .sheet .ibtn { background: transparent; border-color: transparent; color: var(--p-text2); }
body:not(.in-stage) .sheet b { font-weight: 500; }
body:not(.in-stage) .confirm-text { font: 400 18px/1.4 var(--p-font); }
body:not(.in-stage) .sheet .btn { height: 40px; border-radius: 20px; font: 500 14px var(--p-font); box-shadow: none; }
body:not(.in-stage) .sheet .btn.primary { background: var(--p-primary); color: var(--p-on-primary); }
body:not(.in-stage) .sheet .btn.secondary { background: transparent; border: 1px solid var(--p-line); color: var(--p-primary); }
body:not(.in-stage) .sheet .btn.danger { background: #b3261e; color: #fff; }
body:not(.in-stage) .tpl { background: var(--p-s1); border: 0; border-radius: 16px; color: var(--p-text); }
body:not(.in-stage) .tpl-ic { background: var(--p-s2); border-radius: 14px; }
body:not(.in-stage) .tpl b { font-size: 16px; }
body:not(.in-stage) .tpl small { color: var(--p-text2); font-weight: 400; }
body:not(.in-stage) .welcome h2 { font: 500 24px/30px var(--p-font-title); }
body:not(.in-stage) .welcome p { color: var(--p-text2); font-size: 15px; line-height: 1.45; }
body:not(.in-stage) .w-steps li { background: var(--p-s1); }
body:not(.in-stage) .w-steps span { background: var(--p-bg); }
body:not(.in-stage) .w-steps small { color: var(--p-text2); font-weight: 400; }
body:not(.in-stage) .welcome .pbtn { margin-top: 14px; }
body:not(.in-stage) .toast { top: auto; bottom: calc(96px + var(--sb)); transform: translate(-50%, 220%); max-width: min(560px, calc(100% - 32px)); padding: 14px 18px; border: 0; border-radius: 8px; background: var(--p-snack); color: var(--p-on-snack); font: 400 14px/1.4 var(--p-font); text-align: left; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22); }
body:not(.in-stage) .toast.show { transform: translate(-50%, 0); }
body:not(.in-stage) .toast.error { background: #8c1d18; color: #fff; }
body.no-nav:not(.in-stage) .toast, body.ga-mode:not(.in-stage) .toast { bottom: calc(24px + var(--sb)); }
.sheet-p { font-size: 15px; line-height: 1.5; color: var(--p-text2); margin-bottom: 16px; }
.steps { display: flex; flex-direction: column; gap: 16px; margin: 6px 0 22px; }
.steps p { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.steps i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--p-tonal); color: var(--p-on-tonal); font-style: normal; font-weight: 700; font-size: 14px; }
.ios-share { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--p-s2); vertical-align: middle; margin-left: 4px; }
.acct { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 0 16px; border-bottom: 1px solid var(--p-div); }
.acct-img { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: var(--p-s1); display: grid; place-items: center; margin-bottom: 8px; }
.acct-img img { width: 160%; max-width: none; transform: translateY(18%); }
.acct b { font: 500 18px/24px var(--p-font-title); }
.acct small { font-size: 13px; color: var(--p-text2); }
.acct-list { display: flex; flex-direction: column; padding: 8px 0; }
.acct-list button { display: flex; align-items: center; gap: 18px; height: 56px; padding: 0 8px; border-radius: 12px; font-size: 15px; text-align: left; color: var(--p-text); }
.acct-list button .ic { color: var(--p-text2); }
.acct-list button:active { background: var(--p-s1); }
.acct-foot { font-size: 12.5px; color: var(--p-text2); text-align: center; padding-top: 8px; border-top: 1px solid var(--p-div); }

/* ═════════════════════════ Telepített játék-app indítóképernyője ═════════════════════════ */
.ga { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; background: #05060a; color: #fff; font-family: var(--p-font); }
.ga-bg { position: absolute; inset: 0; background: radial-gradient(130% 80% at 50% 0%, color-mix(in srgb, var(--c) 75%, #fff), var(--c) 55%, #05060a); }
.ga-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(5px) saturate(1.15); transform: scale(1.08); animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.2) translate(-2%, 2%); } }
.ga-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.35) 38%, rgba(0, 0, 0, 0.88) 100%); }
.ga-in { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: calc(var(--st) + 28px) calc(24px + var(--sr)) 12px calc(24px + var(--sl)); }
.ga-icon { width: 116px; height: 116px; border-radius: 28px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); animation: float 3.4s ease-in-out infinite; }
.ga-in h1 { font: 900 32px/1.1 var(--font); letter-spacing: -0.02em; text-shadow: 0 3px 16px rgba(0, 0, 0, 0.55); margin-top: 6px; }
.ga-in p { max-width: 400px; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, 0.85); }
.ga-play { margin-top: 14px; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 42px 0 34px; border-radius: 32px; background: #fff; color: #111; font: 900 22px var(--font); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); transition: transform 0.12s; }
.ga-play .ic { width: 26px; height: 26px; }
.ga-play:active { transform: scale(0.95); }
.ga-stats { display: flex; gap: 10px; margin-top: 6px; }
.ga-stats span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ga-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px calc(14px + var(--sr)) calc(14px + var(--sb)) calc(14px + var(--sl)); font-size: 12px; color: rgba(255, 255, 255, 0.7); }
.ga-ib { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); color: #fff; }
.ga-load { flex: 1; display: grid; place-items: center; }
.ga-err { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); }
.ga-err .ic { width: 38px; height: 38px; }

@media (min-width: 700px) {
  .tile { width: 128px; }
  .shot { height: 220px; }
  .fcard { width: 440px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
