/* PIKKO (91) – Alkimista Tudáspont kódex-panel (js/ui/pikkoCodexUI.js).
   A Frank-kódex elrendezését követi. Paletta: --pc-1..5 a skin palettája,
   --pc-l1..3 / --pc-d1..3 a három lombik folyadéka, --pc-gold az arany
   keret, --pc-glow / --pc-accent a kiemelő színek.
   Alap: zöld/kék/piros fortyogó lombikok, alkímiai rúnák;
   Mesekönyv: babazöld/babakék/babarózsaszín pasztell, szívek, csillagok. */
.codex-pikko-show {
    --pc-hi: color-mix(in srgb, var(--pc-gold) 62%, #fff);
    --pc-ink: #fbf8ef;
    --pc-soft: rgba(238, 236, 226, .84);
    --pc-line: color-mix(in srgb, var(--pc-gold) 45%, transparent);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 22px 0 30px;
    padding: 24px;
    border: 1px solid var(--pc-line);
    outline: 1px solid color-mix(in srgb, var(--pc-glow) 40%, transparent);
    outline-offset: -6px;
    border-radius: 4px;
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--pc-l1) 20%, transparent), transparent 42%),
        radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--pc-l3) 16%, transparent), transparent 40%),
        radial-gradient(ellipse 60% 40% at 50% 104%, color-mix(in srgb, var(--pc-l2) 22%, transparent), transparent 70%),
        linear-gradient(150deg, color-mix(in srgb, var(--pc-2) 55%, #03060a), var(--pc-night) 58%, color-mix(in srgb, var(--pc-1) 30%, #000));
    box-shadow: inset 0 0 42px color-mix(in srgb, var(--pc-glow) 12%, transparent), 0 18px 38px #0007;
    color: var(--pc-ink);
}
.codex-pikko-show[data-pc-theme="mese"] {
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--pc-l3) 22%, transparent), transparent 42%),
        radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--pc-l2) 16%, transparent), transparent 40%),
        radial-gradient(ellipse 60% 40% at 50% 104%, color-mix(in srgb, var(--pc-1) 30%, transparent), transparent 70%),
        linear-gradient(150deg, color-mix(in srgb, var(--pc-4) 80%, #000), color-mix(in srgb, var(--pc-2) 95%, #000) 58%, color-mix(in srgb, var(--pc-1) 38%, #000));
}
/* Téma-textúra: alap alkímiai kör-rajzolat, Mesekönyv szív-minta. */
.codex-pikko-show::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .2;
    background:
        repeating-radial-gradient(circle at 100% 0%, transparent 0 22px, color-mix(in srgb, var(--pc-gold) 60%, transparent) 22px 23px),
        repeating-conic-gradient(from 0deg at 100% 0%, color-mix(in srgb, var(--pc-gold) 55%, transparent) 0 .5deg, transparent .5deg 24deg);
    background-size: 240px 240px;
    background-position: 100% 0;
    background-repeat: no-repeat;
}
.codex-pikko-show[data-pc-motif="fairy"]::before {
    opacity: .16;
    background:
        radial-gradient(circle at 30% 40%, var(--pc-l3) 0 3px, transparent 3.5px),
        radial-gradient(circle at 70% 40%, var(--pc-l3) 0 3px, transparent 3.5px),
        conic-gradient(from 135deg at 50% 62%, var(--pc-l3) 0 90deg, transparent 90deg);
    background-size: 64px 60px;
    background-position: 0 0;
    background-repeat: repeat;
}
.codex-pikko-show > *:not(.codex-pikko-show__motif) { position: relative; z-index: 1; }
.codex-pikko-show__motif { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.codex-pikko-show__motif > i {
    position: absolute;
    left: var(--pc-x);
    top: var(--pc-y);
    width: 20px;
    height: 20px;
    opacity: .36;
    animation: pcDrift 8s ease-in-out infinite alternate;
    animation-delay: calc(var(--pc-i) * -.9s);
}
.codex-pikko-show__motif svg { display: block; width: 100%; height: 100%; overflow: visible; fill: var(--pc-l1); filter: drop-shadow(0 0 4px var(--pc-glow)); }
.codex-pikko-show__motif .is-line { fill: none; stroke: var(--pc-l2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.codex-pikko-show__motif .is-thin { stroke-width: .9; }
.codex-pikko-show__motif .is-rune .is-line, .codex-pikko-show__motif .is-sparkle svg, .codex-pikko-show__motif .is-star svg { stroke: var(--pc-gold); fill: var(--pc-gold); }
.codex-pikko-show__motif .is-rune svg { fill: none; }
.codex-pikko-show__motif .is-heart svg { fill: var(--pc-l3); }
.codex-pikko-show__motif .is-flask .is-line { stroke: #fff; }
.codex-pikko-show__motif .is-flask svg { fill: var(--pc-l3); }
.codex-pikko-show__motif .is-bubble { animation-name: pcRise; animation-duration: 6s; }
.codex-pikko-show__motif .is-bubble svg { fill: none; }
.codex-pikko-show__motif .is-heart { animation-name: pcFloat; animation-duration: 4s; }

/* Vektoros lombik-hármas (emblémán és a szint-kártyákon). */
.codex-pikko-flasks { display: block; overflow: visible; }
.codex-pikko-flasks .is-shadow { fill: #0007; }
.codex-pikko-flasks .is-back { fill: color-mix(in srgb, var(--pc-night) 80%, var(--pc-1)); }
.codex-pikko-flasks .is-fluid { opacity: .95; }
.codex-pikko-flasks .is-f1 .is-wave { fill: color-mix(in srgb, var(--pc-l1) 55%, #fff); }
.codex-pikko-flasks .is-f2 .is-wave { fill: color-mix(in srgb, var(--pc-l2) 55%, #fff); }
.codex-pikko-flasks .is-f3 .is-wave { fill: color-mix(in srgb, var(--pc-l3) 55%, #fff); }
.codex-pikko-flasks .is-wave { opacity: .75; animation: pcWave 2.2s ease-in-out infinite alternate; }
.codex-pikko-flasks .is-bubble { fill: none; stroke: #ffffffcc; stroke-width: .7; animation: pcFlaskBubble 2.4s linear infinite; animation-delay: calc(var(--pc-b) * -.7s); }
.codex-pikko-flasks .is-glass { fill: #ffffff0d; stroke: color-mix(in srgb, #fff 70%, var(--pc-gold)); stroke-width: 1.6; }
.codex-pikko-flasks .is-steam path { fill: none; stroke: #ffffffaa; stroke-width: 1.5; stroke-linecap: round; animation: pcSteam 2.4s ease-out infinite; }
.codex-pikko-flasks .is-steam path:nth-child(2) { animation-delay: -1.2s; }

.codex-pikko-show > header { display: flex; align-items: center; gap: 18px; }
.codex-pikko-show__emblem { position: relative; display: grid; place-items: center; flex: 0 0 132px; width: 132px; height: 104px; }
.codex-pikko-show__emblem > i {
    position: absolute;
    inset: 8px 0 0;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--pc-glow) 42%, transparent), transparent 68%);
    animation: pcPulse 2.6s ease-in-out infinite;
}
.codex-pikko-flasks.is-emblem { position: relative; width: 128px; height: 99px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--pc-glow) 55%, transparent)); animation: pcBob 3.2s ease-in-out infinite; }
.codex-pikko-show > header small { color: var(--pc-hi); font: 800 .58rem/1 Montserrat, sans-serif; letter-spacing: .18em; }
.codex-pikko-show > header h3 { margin: 7px 0 5px; color: var(--pc-ink); font: 400 1.65rem/1.1 AOW, serif; text-shadow: 0 0 16px color-mix(in srgb, var(--pc-glow) 55%, transparent); }
.codex-pikko-show > header p { margin: 0; color: var(--pc-soft); font-size: .74rem; line-height: 1.45; }

/* Arany, lekerekített bemutató-sáv ("23 / 50"). */
.codex-pikko-show__bar { position: relative; margin: 18px 6px 4px; height: 18px; }
.codex-pikko-show__bar > span {
    position: absolute; inset: 0; overflow: hidden;
    border: 1.5px solid var(--pc-gold); border-radius: 999px; background: #000b;
    box-shadow: inset 0 1px 4px #000c, 0 0 8px color-mix(in srgb, var(--pc-gold) 40%, transparent);
}
.codex-pikko-show__bar > span > i {
    position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
    background: linear-gradient(180deg, #ffffff66, transparent 45%), linear-gradient(90deg, var(--pc-gold-deep), var(--pc-gold));
    box-shadow: 0 0 10px var(--pc-gold);
    animation: pcBarFill 6s ease-in-out infinite;
}
.codex-pikko-show__bar > b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 800 .62rem/1 Montserrat, sans-serif; letter-spacing: .05em; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.codex-pikko-show__stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.codex-pikko-show__stats > span { display: grid; gap: 4px; justify-items: center; padding: 9px 6px; border: 1px solid color-mix(in srgb, var(--pc-gold) 38%, transparent); border-radius: 999px; background: linear-gradient(180deg, color-mix(in srgb, var(--pc-2) 40%, transparent), #0007); }
.codex-pikko-show__stats b { color: var(--pc-hi); font: 800 1rem/1 Montserrat, sans-serif; white-space: nowrap; }
.codex-pikko-show__stats small { color: var(--pc-soft); font-size: .56rem; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.codex-pikko-show > h4 { margin: 20px 0 10px; color: var(--pc-hi); font: 800 .66rem/1 Montserrat, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.codex-pikko-show__note { margin: 8px 0 0; color: var(--pc-soft); font-size: .66rem; line-height: 1.4; }
.codex-pikko-show__flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.codex-pikko-show__flow > span { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--pc-gold) 32%, transparent); border-radius: 12px; background: radial-gradient(circle at 0 50%, color-mix(in srgb, var(--pc-l1) 16%, transparent), transparent 62%), #0005; }
.codex-pikko-show__flow > span > img { flex: 0 0 38px; width: 38px; height: 38px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 6px color-mix(in srgb, var(--pc-gold) 50%, transparent); }
.codex-pikko-show__flow b { display: block; color: var(--pc-ink); font: 800 .74rem/1.15 Montserrat, sans-serif; }
.codex-pikko-show__flow small { color: var(--pc-soft); font-size: .62rem; }

/* 6 Alkimista Szint: fokozatosan erősödő izzás. */
.codex-pikko-show__levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.codex-pikko-show__levels article {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--pc-gold) calc(18% + var(--pc-t, 0) * 10%), transparent);
    border-radius: 12px;
    background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--pc-glow) calc(4% + var(--pc-t, 0) * 5%), transparent), transparent 62%), linear-gradient(180deg, #ffffff0a, #0007);
    box-shadow: inset 0 0 18px #0006;
}
.codex-pikko-show__levels article.is-peak { border-color: var(--pc-gold); box-shadow: inset 0 0 18px #0006, 0 0 16px color-mix(in srgb, var(--pc-gold) 50%, transparent); }
.codex-pikko-show__levels header { display: flex; align-items: center; gap: 9px; }
.codex-pikko-show__levels header img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 calc(2px + var(--pc-t, 0) * 1.5px) var(--pc-gold)); }
.codex-pikko-show__levels header small { color: var(--pc-hi); font: 800 .54rem/1 Montserrat, sans-serif; letter-spacing: .12em; }
.codex-pikko-show__levels header strong { display: block; margin-top: 3px; color: var(--pc-ink); font: 800 .8rem/1.15 Montserrat, sans-serif; }
.codex-pikko-flasks.is-level { width: 100%; max-width: 150px; height: 62px; justify-self: center; filter: drop-shadow(0 0 calc(var(--pc-t, 0) * 1.6px) var(--pc-glow)); }
.codex-pikko-show__levels ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.codex-pikko-show__levels li { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-left: 2px solid color-mix(in srgb, var(--pc-gold) 55%, transparent); border-radius: 0 7px 7px 0; background: #0005; color: var(--pc-soft); font-size: .62rem; line-height: 1.3; }
.codex-pikko-show__levels li img { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 5px; object-fit: cover; }
.codex-pikko-show__recipes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.codex-pikko-show__recipes article, .codex-pikko-show__effects article { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0; padding: 10px; border: 1px solid color-mix(in srgb, var(--pc-gold) 28%, transparent); border-radius: 12px; background: radial-gradient(circle at 0 50%, color-mix(in srgb, var(--pc-l2) 14%, transparent), transparent 60%), #0005; }
.codex-pikko-show__recipes img { width: 46px; height: 46px; object-fit: contain; border-radius: 9px; }
.codex-pikko-show__recipes strong, .codex-pikko-show__effects strong { display: block; margin-bottom: 3px; color: var(--pc-ink); font: 800 .76rem/1.15 Montserrat, sans-serif; }
.codex-pikko-show__recipes p, .codex-pikko-show__effects p { margin: 0; color: var(--pc-soft); font-size: .62rem; line-height: 1.35; }
.codex-pikko-show__effects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.codex-pikko-show__effects article { grid-template-columns: 54px minmax(0, 1fr); padding: 12px; }
.codex-pikko-show__effects article:nth-child(2n) { border-color: color-mix(in srgb, var(--pc-l3) 45%, transparent); }
.codex-pikko-show__effects img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--pc-gold) 60%, transparent)); animation: pcBob 3.2s ease-in-out infinite; }
.codex-pikko-show .ability-inline-icon { display: inline-block; width: 1.25em; height: 1.25em; margin: 0 .12em; vertical-align: -.24em; object-fit: contain; animation: none; }
/* A kódex képességkártyáinak Pikko-kulcsszó ikonjai és szint-sorai. */
.ability-inline-icon.is-pikko-keyword { width: 1.4em; height: 1.4em; margin: -.3em .14em -.28em 0; object-fit: contain; filter: drop-shadow(0 0 3px #F1AD39aa); }
.ability-inline-icon.is-pikko-keyword[data-pikko-theme="mese"] { filter: drop-shadow(0 0 3px #FFC6DFcc); }
.ability-progression.is-pikko-details .ability-progression-step.is-wide-label { grid-template-columns: minmax(0, 1fr); gap: 5px; }

@keyframes pcBob { 50% { transform: translateY(-4px); } }
@keyframes pcPulse { 50% { opacity: .55; transform: scale(.9); } }
@keyframes pcDrift { 0% { transform: translate(0, 0) rotate(-8deg); } 50% { transform: translate(12px, -8px) rotate(6deg); } 100% { transform: translate(-6px, -16px) rotate(-3deg); } }
@keyframes pcRise { from { transform: translateY(12px); opacity: 0; } 30% { opacity: .6; } to { transform: translateY(-22px); opacity: 0; } }
@keyframes pcFloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-10px) scale(1.12); } }
@keyframes pcWave { to { transform: translateX(-8px); } }
@keyframes pcFlaskBubble { from { transform: translateY(0); opacity: 0; } 20% { opacity: .9; } to { transform: translateY(-30px); opacity: 0; } }
@keyframes pcSteam { 0% { opacity: 0; transform: translateY(2px); } 30% { opacity: .8; } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes pcBarFill { 0% { width: 4%; } 45%, 60% { width: 46%; } 90%, 100% { width: 100%; } }
@media (max-width: 900px) { .codex-pikko-show__stats, .codex-pikko-show__recipes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .codex-pikko-show__levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .codex-pikko-show { padding: 18px 16px; } .codex-pikko-show > header { flex-direction: column; align-items: flex-start; } .codex-pikko-show__levels, .codex-pikko-show__recipes, .codex-pikko-show__effects { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .codex-pikko-show__motif { display: none; } .codex-pikko-show *, .codex-pikko-show *::before { animation: none !important; } .codex-pikko-show__bar > span > i { width: 46%; } }

/* Űrhajós téma (data-pc-motif="space"): csillagpor, bolygópálya, rakéta-lombik */
.codex-pikko-show[data-pc-theme="urhajos"] {
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--pc-l1) 24%, transparent), transparent 42%),
        radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--pc-l3) 24%, transparent), transparent 40%),
        radial-gradient(ellipse 60% 40% at 50% 104%, color-mix(in srgb, var(--pc-l2) 26%, transparent), transparent 70%),
        linear-gradient(150deg, #0b1648, #050b24 58%, #1b0b45);
}
.codex-pikko-show[data-pc-motif="space"]::before {
    opacity: .55;
    animation: pcStarDust 6s ease-in-out infinite alternate;
    background:
        repeating-radial-gradient(ellipse 160px 48px at 100% 0%, transparent 0 18px, color-mix(in srgb, var(--pc-1) 50%, transparent) 18px 19px),
        radial-gradient(1.6px 1.6px at 18% 28%, #fff, transparent 60%),
        radial-gradient(1.2px 1.2px at 64% 58%, var(--pc-4), transparent 60%),
        radial-gradient(1.8px 1.8px at 82% 84%, var(--pc-1), transparent 60%),
        radial-gradient(1.2px 1.2px at 40% 90%, #fff, transparent 60%);
    background-size: 300px 300px, 90px 80px, 110px 100px, 130px 120px, 100px 90px;
    background-position: 100% 0, 0 0, 0 0, 0 0, 0 0;
    background-repeat: no-repeat, repeat, repeat, repeat, repeat;
}
.codex-pikko-show__motif .is-rocket svg, .codex-pikko-show__motif .is-planet svg, .codex-pikko-show__motif .is-comet svg, .codex-pikko-show__motif .is-ufo svg,
.codex-pikko-show__motif .is-helmet svg, .codex-pikko-show__motif .is-satellite svg { fill: var(--pc-l1); }
.codex-pikko-show__motif .is-planet .is-line { stroke: var(--pc-gold); }
.codex-pikko-show__motif .is-comet .is-line, .codex-pikko-show__motif .is-hologram .is-line { stroke: var(--pc-l1); }
.codex-pikko-show__motif .is-moon svg, .codex-pikko-show__motif .is-hologram svg { fill: var(--pc-gold); }
.codex-pikko-show__motif .is-hologram svg { fill: none; }
.codex-pikko-show__motif .is-satellite svg { fill: var(--pc-l2); }
.codex-pikko-show__motif .is-rocket, .codex-pikko-show__motif .is-comet { animation-name: pcFly; animation-duration: 7s; }
.codex-pikko-flasks .is-space { display: none; }
.codex-pikko-show[data-pc-motif="space"] .codex-pikko-flasks .is-space { display: inline; }
.codex-pikko-show[data-pc-motif="space"] .codex-pikko-flasks .is-glass { stroke: color-mix(in srgb, #fff 55%, var(--pc-1)); fill: #44deff14; }
.codex-pikko-flasks .is-ring { fill: none; stroke: var(--pc-gold); stroke-width: 1.5; filter: drop-shadow(0 0 2px var(--pc-gold)); }
.codex-pikko-flasks .is-fin { fill: var(--pc-5); stroke: var(--pc-gold); stroke-width: .8; stroke-linejoin: round; }
.codex-pikko-flasks .is-port { fill: color-mix(in srgb, var(--pc-1) 55%, #07123a); stroke: var(--pc-gold); stroke-width: 1.4; }
.codex-pikko-flasks .is-flame { fill: var(--pc-4); stroke: var(--pc-2); stroke-width: .8; transform-box: fill-box; transform-origin: top center; animation: pcFlame .32s ease-in-out infinite alternate; }
.codex-pikko-flasks .is-panel { fill: color-mix(in srgb, var(--pc-1) 40%, #0a1850); stroke: var(--pc-gold); stroke-width: .9; }
.ability-inline-icon.is-pikko-keyword[data-pikko-theme="urhajos"] { filter: drop-shadow(0 0 3px #44DEFFcc); }
@keyframes pcStarDust { from { filter: brightness(.8); } to { filter: brightness(1.3); } }
@keyframes pcFly { 0% { transform: translate(0, 0) rotate(-8deg); } 100% { transform: translate(40px, -26px) rotate(8deg); } }
@keyframes pcFlame { from { transform: scaleY(.8) scaleX(.94); } to { transform: scaleY(1.2) scaleX(1.06); } }
