.peka-tab {
    position: fixed;
    right: 22px;
    bottom: 98px;
    display: none;
    align-items: center;
    gap: 7px;
    min-width: 168px;
    min-height: 42px;
    padding: 8px 10px 8px 9px;
    border: 3px solid rgba(255, 248, 209, 0.96);
    border-radius: 999px;
    background:
        radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.96), transparent 32%),
        linear-gradient(135deg, #fff09a 0%, #ffc743 40%, #f28f25 72%, #a94812 100%);
    color: #3d1d05;
    font-family: Arial, sans-serif;
    font-weight: 900;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow:
        0 5px 0 #8d4510,
        0 12px 22px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(255, 217, 74, 0.58),
        inset 0 2px 0 rgba(255, 255, 255, 0.72);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
    transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
    user-select: none;
    z-index: 8;
    overflow: hidden;
    isolation: isolate;
}

.peka-tab::after {
    content: "";
    position: absolute;
    inset: -60% -40%;
    z-index: 0;
    background: linear-gradient(115deg, transparent 38%, rgba(255, 248, 220, 0.5) 46%, rgba(255, 255, 255, 0.74) 50%, rgba(255, 248, 220, 0.38) 54%, transparent 62%);
    opacity: 0;
    transform: translateX(-86%) rotate(8deg);
    pointer-events: none;
}

.peka-tab.unlocked.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    animation: pekaTabPulse 2200ms ease-in-out infinite;
}

.peka-tab.unlocked.show::after {
    animation: pekaLuxeShimmerWave 4000ms ease-in-out infinite;
}

.peka-tab > span {
    position: relative;
    z-index: 1;
}

.peka-tab:hover {
    filter: brightness(1.08) saturate(1.08);
    transform: translateY(-2px) scale(1.01);
}

.peka-tab:active {
    transform: translateY(3px) scale(0.98);
    box-shadow:
        0 2px 0 #8d4510,
        0 7px 14px rgba(0, 0, 0, 0.28),
        0 0 14px rgba(255, 217, 74, 0.48),
        inset 0 2px 0 rgba(255, 255, 255, 0.72);
}

.peka-tab.in-zone {
    background:
        linear-gradient(110deg, transparent 0 26%, rgba(255, 255, 255, 0.7) 34%, transparent 43% 100%),
        radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.98), transparent 32%),
        linear-gradient(135deg, #fff8b8 0%, #ffd84f 36%, #d9a217 68%, #715018 100%);
    background-size: 220% 100%, auto, auto;
    color: #2f1b04;
    box-shadow:
        0 5px 0 #704610,
        0 12px 22px rgba(0, 0, 0, 0.3),
        0 0 28px rgba(255, 229, 93, 0.86),
        inset 0 2px 0 rgba(255, 255, 255, 0.76);
    animation: pekaTabPulse 2200ms ease-in-out infinite, pekaTabShimmer 1600ms linear infinite;
}

.peka-tab-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    font-size: 1.04rem;
    line-height: 1;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72));
}

.peka-tab-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    font-size: 0.82rem;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.54);
}

.peka-tab-tax-pill {
    flex: 0 0 auto;
    padding: 4px 6px;
    border: 2px solid rgba(255, 248, 209, 0.82);
    border-radius: 999px;
    background: rgba(80, 39, 5, 0.22);
    color: #fff7d1;
    font-size: 0.64rem;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(65, 27, 2, 0.72);
}

.peka-teleport-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: none;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 80ms linear;
}

.peka-teleport-overlay.to-peka {
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 248, 220, 0.98) 0 7%, rgba(255, 215, 0, 0.88) 18%, rgba(184, 134, 11, 0.78) 42%, rgba(42, 24, 0, 0.96) 100%),
        linear-gradient(135deg, rgba(255, 215, 0, 0.62), rgba(139, 90, 0, 0.9));
}

.peka-teleport-overlay.to-main {
    background:
        radial-gradient(circle at 50% 50%, rgba(236, 255, 213, 0.96) 0 7%, rgba(103, 220, 78, 0.82) 18%, rgba(46, 143, 61, 0.8) 42%, rgba(11, 48, 24, 0.96) 100%),
        linear-gradient(135deg, rgba(151, 255, 118, 0.56), rgba(15, 94, 39, 0.9));
}

.peka-teleport-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(42vmin, 360px);
    height: min(42vmin, 360px);
    border-radius: 50%;
    border: 8px solid rgba(255, 248, 220, 0.9);
    box-shadow:
        0 0 26px rgba(255, 248, 220, 0.88),
        0 0 72px rgba(255, 215, 0, 0.72),
        inset 0 0 24px rgba(255, 248, 220, 0.7),
        inset 0 0 64px rgba(184, 134, 11, 0.64);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25) rotate(0deg);
}

.peka-teleport-ring::before,
.peka-teleport-ring::after {
    content: "";
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 3px dashed rgba(255, 248, 220, 0.78);
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.78));
}

.peka-teleport-ring::after {
    inset: 22px;
    border-style: solid;
    border-width: 4px;
    opacity: 0.62;
}

.peka-teleport-ring.to-main {
    border-color: rgba(229, 255, 210, 0.92);
    box-shadow:
        0 0 26px rgba(229, 255, 210, 0.88),
        0 0 72px rgba(93, 235, 89, 0.7),
        inset 0 0 24px rgba(229, 255, 210, 0.7),
        inset 0 0 64px rgba(29, 148, 48, 0.62);
}

.peka-teleport-ring.to-main::before,
.peka-teleport-ring.to-main::after {
    border-color: rgba(229, 255, 210, 0.78);
    filter: drop-shadow(0 0 14px rgba(98, 255, 93, 0.74));
}

.peka-teleport-overlay.active .peka-teleport-ring {
    animation:
        pekaTeleportRingSpinScale 1400ms cubic-bezier(0.18, 0.86, 0.26, 1) forwards,
        pekaTeleportRingGlow 520ms ease-in-out infinite alternate;
}

body.in-peka-zone {
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 248, 220, 0.18), transparent 34%),
        radial-gradient(circle at 82% 74%, rgba(255, 215, 0, 0.14), transparent 42%),
        linear-gradient(135deg, #2c1a03 0%, #5d3a08 42%, #8b5a00 100%);
}

body.in-peka-zone::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.18;
    background:
        radial-gradient(ellipse at center, transparent 42%, rgba(255, 215, 0, 0.14) 68%, rgba(139, 90, 0, 0.42) 100%),
        radial-gradient(circle at 0 0, rgba(255, 248, 220, 0.18), transparent 30%),
        radial-gradient(circle at 100% 100%, rgba(255, 215, 0, 0.16), transparent 34%);
}

body.in-peka-zone #peka-gold-overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.22;
    mix-blend-mode: overlay;
    background:
        linear-gradient(110deg, transparent 0 28%, rgba(255, 248, 220, 0.52) 36%, transparent 46% 100%),
        radial-gradient(circle at 20% 18%, rgba(255, 248, 220, 0.42), transparent 28%),
        radial-gradient(circle at 78% 72%, rgba(255, 215, 0, 0.38), transparent 34%),
        linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(184, 134, 11, 0.16));
    background-size: 260% 100%, auto, auto, auto;
    animation: pekaGoldOverlayShimmer 5200ms linear infinite;
}

body.in-peka-zone #ui-layer {
    z-index: 5;
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.44));
}

body.in-peka-zone #ui-layer::before {
    content: "";
    position: absolute;
    inset: -9px;
    border: 2px solid rgba(255, 215, 0, 0.38);
    border-radius: 24px;
    background:
        linear-gradient(115deg, transparent 0 32%, rgba(255, 248, 220, 0.32) 40%, transparent 50% 100%);
    background-size: 240% 100%;
    opacity: 0.82;
    pointer-events: none;
    animation: pekaUiShimmer 3600ms linear infinite;
}

body.in-peka-zone #shop-panel {
    border: 5px double #ffd700;
    background:
        radial-gradient(circle at 16% 14%, rgba(255, 248, 220, 0.72) 0 8%, transparent 9%),
        radial-gradient(circle at 82% 22%, rgba(255, 215, 0, 0.42), transparent 34%),
        linear-gradient(145deg, #fff8dc 0%, #ffd700 16%, #b8860b 58%, #6b4300 100%);
    color: #2b1700;
    text-shadow: 0 1px 0 rgba(255, 248, 220, 0.72);
    box-shadow:
        inset 0 4px 0 rgba(255, 248, 220, 0.78),
        inset 0 -12px 0 rgba(139, 90, 0, 0.32),
        0 8px 0 #8b5a00,
        0 16px 28px rgba(0, 0, 0, 0.34),
        0 0 32px rgba(255, 215, 0, 0.42);
}

body.in-peka-zone #shop-panel::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 2px solid rgba(255, 248, 220, 0.44);
    border-radius: 12px;
    pointer-events: none;
}

body.in-peka-zone #shop-panel .shop-title,
body.in-peka-zone #shop-panel .catalog-title {
    color: #3a2100;
    text-shadow: 0 1px 0 #fff8dc, 0 0 10px rgba(255, 215, 0, 0.58);
}

body.in-peka-zone #water-ui,
body.in-peka-zone #water-panel {
    z-index: 6;
    color: #392100;
    text-shadow: 0 1px 0 #fff8dc, 0 0 8px rgba(255, 215, 0, 0.45);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.44));
}

body.in-peka-zone .water-tank {
    border-color: #fff8dc;
    background:
        repeating-linear-gradient(45deg, rgba(255, 248, 220, 0.24) 0 6px, rgba(184, 134, 11, 0.08) 6px 12px),
        linear-gradient(90deg, #fff8dc 0%, #ffd700 36%, #b8860b 72%, #8b5a00 100%);
    box-shadow:
        inset 0 4px 0 rgba(255, 248, 220, 0.9),
        inset 7px 0 12px rgba(255, 248, 220, 0.48),
        inset -8px 0 12px rgba(85, 49, 0, 0.32),
        inset 0 -12px 0 rgba(139, 90, 0, 0.34),
        0 7px 0 #8b5a00,
        0 15px 24px rgba(0, 0, 0, 0.34),
        0 0 24px rgba(255, 215, 0, 0.56);
}

body.in-peka-zone #water-fill {
    background:
        repeating-linear-gradient(135deg, rgba(255, 248, 220, 0.24) 0 14px, rgba(255, 215, 0, 0.04) 14px 28px),
        linear-gradient(180deg, #fff8dc 0%, #ffd700 42%, #b8860b 78%, #8b5a00 100%);
    box-shadow:
        inset 0 -10px 0 rgba(139, 90, 0, 0.34),
        inset 0 8px 0 rgba(255, 248, 220, 0.5),
        0 0 18px rgba(255, 215, 0, 0.72);
}

body.in-peka-zone #water-fill::before {
    background:
        radial-gradient(ellipse 22px 10px at 20% 50%, #fff8dc 0 60%, transparent 70%),
        radial-gradient(ellipse 22px 10px at 55% 50%, #fff8dc 0 60%, transparent 70%),
        radial-gradient(ellipse 22px 10px at 88% 50%, #fff8dc 0 60%, transparent 70%);
}

body.in-peka-zone #water-readout {
    color: #2f1a00;
    background: rgba(255, 248, 220, 0.66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 0 10px rgba(255, 215, 0, 0.45);
}

body.in-peka-zone .seed-catalog-item,
body.in-peka-zone .catalog-row {
    border-color: rgba(255, 215, 0, 0.72);
    background:
        radial-gradient(circle at 16% 12%, rgba(255, 248, 220, 0.6), transparent 32%),
        linear-gradient(145deg, rgba(255, 248, 220, 0.58), rgba(184, 134, 11, 0.22));
    color: #2f1a00;
    box-shadow:
        inset 0 2px 0 rgba(255, 248, 220, 0.62),
        0 3px 0 rgba(139, 90, 0, 0.55),
        0 0 12px rgba(255, 215, 0, 0.22);
}

body.in-peka-zone .catalog-row:hover {
    background:
        radial-gradient(circle at 16% 12%, rgba(255, 248, 220, 0.8), transparent 32%),
        linear-gradient(145deg, rgba(255, 248, 220, 0.78), rgba(255, 215, 0, 0.36));
}

body.in-peka-zone #money-counter {
    z-index: 6;
    border-color: #fff8dc;
    background:
        radial-gradient(circle at 24px 24px, #fff8dc 0 18%, transparent 19%),
        radial-gradient(circle at calc(100% - 22px) 70%, rgba(255, 248, 220, 0.64) 0 12%, transparent 13%),
        repeating-radial-gradient(circle at 52% 50%, rgba(139, 90, 0, 0.16) 0 3px, transparent 4px 18px),
        linear-gradient(145deg, #fff8dc 0%, #ffd700 34%, #b8860b 72%, #8b5a00 100%);
    color: #241300;
    text-shadow: 0 1px 0 #fff8dc, 0 3px 0 rgba(139, 90, 0, 0.22);
    box-shadow:
        inset 0 3px 0 rgba(255, 248, 220, 0.9),
        inset 0 -10px 0 rgba(139, 90, 0, 0.32),
        0 8px 0 #8b5a00,
        0 16px 28px rgba(0, 0, 0, 0.32),
        0 0 28px rgba(255, 215, 0, 0.58);
}

body.in-peka-zone #shop-timer {
    border-color: #fff8dc;
    background:
        linear-gradient(110deg, transparent 0 30%, rgba(255, 248, 220, 0.72) 38%, transparent 48% 100%),
        radial-gradient(circle at 18% 20%, rgba(255, 248, 220, 0.92) 0 8%, transparent 9%),
        linear-gradient(145deg, #fff8dc 0%, #ffd700 42%, #b8860b 100%);
    background-size: 240% 100%, auto, auto;
    color: #392100;
    text-shadow: 0 1px 0 #fff8dc;
    box-shadow:
        inset 0 2px 0 rgba(255, 248, 220, 0.78),
        inset 0 -6px 0 rgba(139, 90, 0, 0.24),
        0 5px 0 #8b5a00,
        0 11px 20px rgba(0, 0, 0, 0.26),
        0 0 18px rgba(255, 215, 0, 0.5);
    animation: pekaPillShimmer 2800ms linear infinite;
}

body.in-peka-zone .water-button,
body.in-peka-zone button:not(.peka-tab) {
    border: 3px solid #b8860b;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 248, 220, 0.9), transparent 32%),
        linear-gradient(145deg, #fff8dc 0%, #ffd700 42%, #b8860b 100%);
    color: #321c00;
    text-shadow: 0 1px 0 rgba(255, 248, 220, 0.72);
    box-shadow:
        inset 0 2px 0 rgba(255, 248, 220, 0.72),
        0 4px 0 #8b5a00,
        0 8px 16px rgba(0, 0, 0, 0.22);
}

body.in-peka-zone button:not(.peka-tab):disabled {
    filter: saturate(0.55) brightness(0.88);
    opacity: 0.72;
}

body.in-peka-zone #water-bucket-hitbox {
    border: 0;
    background: rgba(255, 255, 255, 0.01);
    color: transparent;
    box-shadow: none;
}

body.in-peka-zone .peka-tax-badge {
    position: fixed;
    right: 14px;
    top: 58px;
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: min(190px, calc(100vw - 28px));
    padding: 6px 11px 7px;
    border: 2px solid #fff8dc;
    border-radius: 999px;
    background:
        linear-gradient(110deg, transparent 0 28%, rgba(255, 248, 220, 0.8) 38%, transparent 48% 100%),
        linear-gradient(145deg, #fff8dc 0%, #ffd700 44%, #b8860b 100%);
    background-size: 240% 100%, auto;
    color: #321c00;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-shadow: 0 1px 0 #fff8dc;
    box-shadow:
        inset 0 2px 0 rgba(255, 248, 220, 0.76),
        0 5px 0 #8b5a00,
        0 11px 22px rgba(0, 0, 0, 0.28),
        0 0 22px rgba(255, 215, 0, 0.58);
    transform: none;
    pointer-events: none;
    overflow: hidden;
    isolation: isolate;
    animation: pekaPillShimmer 2800ms linear infinite, pekaBadgeFloat 2200ms ease-in-out infinite;
}

body.in-peka-zone .peka-tax-badge::before {
    content: "👑";
    position: relative;
    z-index: 1;
    font-size: 0.88rem;
    line-height: 1;
}

body.in-peka-zone .peka-tax-badge::after {
    content: "";
    position: absolute;
    inset: -70% -42%;
    z-index: 0;
    background: linear-gradient(115deg, transparent 38%, rgba(255, 248, 220, 0.42) 46%, rgba(255, 255, 255, 0.68) 50%, rgba(255, 248, 220, 0.28) 54%, transparent 62%);
    opacity: 0;
    transform: translateX(-86%) rotate(8deg);
    pointer-events: none;
    animation: pekaLuxeShimmerWave 4000ms ease-in-out infinite;
}

body.in-peka-zone .peka-tax-session-pill {
    position: fixed;
    left: 16px;
    bottom: 18px;
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 11px 8px;
    border: 2px solid rgba(255, 248, 220, 0.92);
    border-radius: 999px;
    background:
        linear-gradient(110deg, transparent 0 28%, rgba(255, 248, 220, 0.56) 37%, transparent 48% 100%),
        linear-gradient(145deg, #fff8dc 0%, #ffd700 42%, #b8860b 100%);
    background-size: 260% 100%, auto;
    color: #2f1a00;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-shadow: 0 1px 0 rgba(255, 248, 220, 0.72);
    box-shadow:
        inset 0 2px 0 rgba(255, 248, 220, 0.72),
        0 4px 0 #8b5a00,
        0 10px 18px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(255, 215, 0, 0.4);
    pointer-events: none;
    animation: pekaPillShimmer 4000ms linear infinite;
}

body.in-peka-zone .peka-tax-session-pill strong {
    padding: 3px 6px 4px;
    border-radius: 999px;
    background: rgba(58, 31, 10, 0.18);
    color: #fff8dc;
    text-shadow: 0 1px 0 #5a3200, 0 0 8px rgba(255, 215, 0, 0.6);
}

body.in-peka-zone .peka-tax-session-crown {
    line-height: 1;
    filter: drop-shadow(0 1px 0 rgba(255, 248, 220, 0.68));
}

body.in-peka-zone .peka-tax-session-pill.pulse {
    animation: pekaPillShimmer 4000ms linear infinite, pekaTaxSessionPulse 580ms ease-out;
}

body.in-peka-zone .peka-portrait {
    position: fixed;
    left: 18px;
    top: 84px;
    z-index: 9;
    width: 118px;
    pointer-events: none;
    filter: drop-shadow(0 9px 16px rgba(0, 0, 0, 0.32)) drop-shadow(0 0 16px rgba(255, 215, 0, 0.44));
    animation: pekaPortraitBob 3300ms ease-in-out infinite;
}

body.in-peka-zone .peka-portrait-crown {
    position: absolute;
    left: 50%;
    top: -19px;
    z-index: 2;
    font-size: 1.85rem;
    line-height: 1;
    transform: translateX(-50%) rotate(-3deg);
    text-shadow:
        0 2px 0 #8b5a00,
        0 0 14px rgba(255, 248, 220, 0.78),
        0 0 22px rgba(255, 215, 0, 0.64);
}

body.in-peka-zone .peka-portrait-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 0.82;
    border: 6px ridge #ffd700;
    border-radius: 999px;
    background:
        radial-gradient(circle at 28% 16%, rgba(255, 248, 220, 0.92), transparent 28%),
        linear-gradient(145deg, #fff8dc 0%, #ffd700 42%, #b8860b 72%, #5a3200 100%);
    box-shadow:
        inset 0 4px 0 rgba(255, 248, 220, 0.72),
        inset 0 -7px 12px rgba(85, 45, 0, 0.32),
        0 4px 0 #8b5a00,
        0 0 20px rgba(255, 215, 0, 0.44);
    overflow: hidden;
}

body.in-peka-zone .peka-portrait-frame::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 2px solid rgba(255, 248, 220, 0.48);
    border-radius: inherit;
    pointer-events: none;
}

body.in-peka-zone .peka-portrait-svg {
    display: block;
    width: 100%;
    height: 100%;
}

body.in-peka-zone .peka-portrait-caption {
    position: relative;
    width: calc(100% + 20px);
    margin: -8px 0 0 -10px;
    padding: 5px 8px 6px;
    border: 3px solid #fff8dc;
    border-radius: 999px;
    background: linear-gradient(145deg, #5a3200 0%, #b8860b 48%, #ffd700 100%);
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-shadow: 0 1px 0 #3a1f0a, 0 0 8px rgba(255, 215, 0, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255, 248, 220, 0.56),
        0 3px 0 #6d3d00,
        0 8px 14px rgba(0, 0, 0, 0.24);
}

body.in-peka-zone .peka-ad {
    position: fixed;
    z-index: 4;
    box-sizing: border-box;
    width: 132px;
    padding: 9px 10px;
    border: 3px double #ffd700;
    border-radius: 12px;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 248, 220, 0.82), transparent 32%),
        linear-gradient(150deg, #fff8dc 0%, #ffd700 40%, #b8860b 100%);
    color: #321c00;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.08;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 248, 220, 0.72);
    box-shadow:
        inset 0 2px 0 rgba(255, 248, 220, 0.72),
        0 4px 0 #8b5a00,
        0 10px 20px rgba(0, 0, 0, 0.25),
        0 0 18px rgba(255, 215, 0, 0.34);
    pointer-events: none;
    animation: pekaAdBob 3600ms ease-in-out infinite;
    transition: opacity 220ms ease, filter 220ms ease;
}

body.in-peka-zone .peka-ad.is-fading {
    opacity: 0.22;
    filter: blur(2px) brightness(1.16);
}

body.in-peka-zone .peka-ad::before,
body.in-peka-zone .peka-ad::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff8dc;
    box-shadow: inset 0 -2px 0 rgba(139, 90, 0, 0.38);
    transform: translateY(-50%);
}

body.in-peka-zone .peka-ad::before { left: -7px; }
body.in-peka-zone .peka-ad::after { right: -7px; }
body.in-peka-zone .peka-ad-left-one { left: 12px; top: 35%; }
body.in-peka-zone .peka-ad-right-one { right: 12px; top: 35%; animation-delay: 600ms; }
body.in-peka-zone .peka-ad-left-two { display: none; }

body.in-peka-zone .peka-sparkle {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 12;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 248, 220, 0.96);
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 28%, #fff8dc 0 18%, #ffd700 36%, #b8860b 76%, rgba(139, 90, 0, 0.05) 100%);
    box-shadow:
        0 0 8px rgba(255, 248, 220, 0.9),
        0 0 18px rgba(255, 215, 0, 0.74),
        inset 0 1px 0 rgba(255, 248, 220, 0.82);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.55);
    animation: pekaSparkleSeal 600ms ease-out forwards;
}

body.in-peka-zone .peka-sparkle::before {
    content: "P";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #3a1f0a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.44rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 248, 220, 0.64);
}

body.in-peka-zone .peka-coronation {
    position: fixed;
    left: 50%;
    top: 76px;
    z-index: 88;
    width: min(680px, calc(100vw - 28px));
    height: 120px;
    pointer-events: none;
    opacity: 1;
    transform: translateX(-50%);
    transition: opacity 320ms ease;
}

body.in-peka-zone .peka-coronation.is-dismissing {
    opacity: 0;
}

body.in-peka-zone .peka-coronation-headline {
    position: absolute;
    left: 50%;
    top: 22px;
    z-index: 2;
    width: 100%;
    color: transparent;
    background:
        linear-gradient(180deg, #fff8dc 0%, #ffe66d 26%, #ffd700 54%, #b8860b 78%, #fff8dc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.1rem, 6vw, 4.8rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-shadow:
        0 4px 0 #7a4600,
        0 9px 18px rgba(0, 0, 0, 0.34),
        0 0 22px rgba(255, 248, 220, 0.78),
        0 0 40px rgba(255, 215, 0, 0.72);
    opacity: 0;
    transform: translate(-50%, -46px) scale(0.86);
}

body.in-peka-zone .peka-coronation.show .peka-coronation-headline {
    animation: pekaCoronationReveal 1600ms cubic-bezier(0.16, 0.9, 0.25, 1) forwards;
}

body.in-peka-zone .peka-coronation-particle {
    position: absolute;
    left: 50%;
    top: 56px;
    z-index: 1;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--peka-coronation-color, #ffd700);
    box-shadow:
        0 0 10px rgba(255, 248, 220, 0.84),
        0 0 22px rgba(255, 215, 0, 0.66);
    opacity: 0;
}

body.in-peka-zone .peka-coronation.show .peka-coronation-particle {
    animation: pekaCoronationBurst 1100ms ease-out forwards;
}

.peka-tax-intro {
    display: none;
}

body.in-peka-zone .peka-tax-intro[aria-hidden="false"] {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 18px;
    background:
        radial-gradient(circle at 50% 34%, rgba(255, 215, 0, 0.28), transparent 36%),
        rgba(22, 12, 0, 0.62);
    pointer-events: auto;
}

body.in-peka-zone .peka-tax-intro-card {
    position: relative;
    width: min(520px, calc(100vw - 32px));
    padding: 22px;
    border: 5px double #ffd700;
    border-radius: 22px;
    background:
        radial-gradient(circle at 16% 12%, rgba(255, 248, 220, 0.9), transparent 32%),
        radial-gradient(circle at 88% 82%, rgba(255, 215, 0, 0.46), transparent 36%),
        linear-gradient(145deg, #fff8dc 0%, #ffd700 34%, #b8860b 78%, #8b5a00 100%);
    color: #281600;
    font-family: Georgia, "Times New Roman", serif;
    text-align: center;
    box-shadow:
        inset 0 4px 0 rgba(255, 248, 220, 0.82),
        inset 0 -14px 0 rgba(139, 90, 0, 0.26),
        0 10px 0 #8b5a00,
        0 26px 44px rgba(0, 0, 0, 0.38),
        0 0 42px rgba(255, 215, 0, 0.52);
    overflow: hidden;
    animation: pekaModalPop 260ms cubic-bezier(0.2, 1.3, 0.4, 1);
}

body.in-peka-zone .peka-tax-intro-banner,
body.in-peka-zone .peka-tax-intro-title {
    display: block;
    margin: -4px -8px 14px;
    padding: 12px 10px;
    border: 3px solid #fff8dc;
    border-radius: 16px;
    background:
        linear-gradient(110deg, transparent 0 28%, rgba(255, 248, 220, 0.78) 38%, transparent 48% 100%),
        linear-gradient(145deg, #8b5a00 0%, #b8860b 28%, #ffd700 68%, #fff8dc 100%);
    background-size: 240% 100%, auto;
    color: #2e1900;
    font-size: clamp(1.28rem, 4.8vw, 2.05rem);
    line-height: 1.02;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 0 #fff8dc, 0 3px 0 rgba(139, 90, 0, 0.28);
    box-shadow: inset 0 2px 0 rgba(255, 248, 220, 0.72), 0 5px 0 #8b5a00;
    animation: pekaPillShimmer 2800ms linear infinite;
}

body.in-peka-zone .peka-tax-intro-body {
    margin: 0 auto 18px;
    max-width: 420px;
    color: #2a1700;
    font-size: clamp(0.94rem, 2.8vw, 1.06rem);
    font-weight: 800;
    line-height: 1.36;
    text-shadow: 0 1px 0 rgba(255, 248, 220, 0.66);
}

body.in-peka-zone .peka-tax-intro-body p {
    margin: 0 0 9px;
}

body.in-peka-zone .peka-tax-intro-body p:last-child {
    margin-bottom: 0;
}

body.in-peka-zone .peka-tax-intro-body strong {
    color: #5b3400;
    text-shadow: 0 1px 0 #fff8dc, 0 0 9px rgba(255, 215, 0, 0.68);
}

body.in-peka-zone .peka-tax-intro-fine {
    font-size: 0.9em;
    color: #5c3700;
    font-style: italic;
}

body.in-peka-zone .peka-tax-intro-btn,
body.in-peka-zone .peka-tax-intro-accept {
    min-width: 210px;
    padding: 13px 18px;
    border: 4px solid #fff8dc;
    border-radius: 999px;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 248, 220, 0.92), transparent 34%),
        linear-gradient(145deg, #fff8dc 0%, #ffd700 42%, #b8860b 100%);
    color: #2b1700;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.02rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow:
        inset 0 2px 0 rgba(255, 248, 220, 0.78),
        0 5px 0 #8b5a00,
        0 12px 20px rgba(0, 0, 0, 0.26),
        0 0 20px rgba(255, 215, 0, 0.5);
}

body.in-peka-zone .peka-tax-intro-btn:active,
body.in-peka-zone .peka-tax-intro-accept:active {
    transform: translateY(4px);
    box-shadow:
        inset 0 2px 0 rgba(255, 248, 220, 0.78),
        0 1px 0 #8b5a00,
        0 6px 12px rgba(0, 0, 0, 0.24);
}

body.in-peka-zone .peka-tax-confetti {
    position: absolute;
    left: 50%;
    top: 42%;
    width: 8px;
    height: 14px;
    border-radius: 3px;
    background: var(--peka-confetti-color, #ffd700);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.58);
    pointer-events: none;
    animation: pekaConfettiBurst 1100ms ease-out forwards;
}

body.in-peka-zone .claim-pop.peka-tax-pop {
    color: #ffd700;
    z-index: 75;
    animation: pekaTaxPopFly 1050ms cubic-bezier(0.18, 0.88, 0.28, 1) forwards;
    text-shadow:
        2px 2px 0 #8b5a00,
        3px 4px 0 rgba(0, 0, 0, 0.34),
        0 0 12px rgba(255, 248, 220, 0.72),
        0 0 22px rgba(255, 215, 0, 0.54);
}

@keyframes pekaTaxPopFly {
    0% {
        opacity: 0;
        transform: translate(-50%, -35%) scale(0.72) rotate(-5deg);
    }
    14% {
        opacity: 1;
        transform: translate(-50%, -70%) scale(1.12) rotate(-2deg);
    }
    72% {
        opacity: 1;
        transform:
            translate(
                calc(-50% + var(--peka-tax-pop-mid-dx, 0px)),
                calc(-50% + var(--peka-tax-pop-mid-dy, -80px))
            )
            scale(0.9)
            rotate(4deg);
    }
    100% {
        opacity: 0;
        transform:
            translate(
                calc(-50% + var(--peka-tax-pop-dx, 0px)),
                calc(-50% + var(--peka-tax-pop-dy, -110px))
            )
            scale(0.44)
            rotate(10deg);
    }
}

@keyframes pekaTabPulse {
    0%, 100% {
        box-shadow:
            0 5px 0 #8d4510,
            0 12px 22px rgba(0, 0, 0, 0.28),
            0 0 15px rgba(255, 217, 74, 0.48),
            inset 0 2px 0 rgba(255, 255, 255, 0.72);
    }
    50% {
        box-shadow:
            0 5px 0 #8d4510,
            0 12px 22px rgba(0, 0, 0, 0.28),
            0 0 28px rgba(255, 230, 89, 0.88),
            inset 0 2px 0 rgba(255, 255, 255, 0.78);
    }
}

@keyframes pekaTabShimmer {
    from { background-position: 180% 0, 0 0, 0 0; }
    to { background-position: -40% 0, 0 0, 0 0; }
}

@keyframes pekaLuxeShimmerWave {
    0%, 56%, 100% {
        opacity: 0;
        transform: translateX(-86%) rotate(8deg);
    }
    64% {
        opacity: 0.62;
    }
    78% {
        opacity: 0;
        transform: translateX(86%) rotate(8deg);
    }
}

@keyframes pekaGoldOverlayShimmer {
    from { background-position: 240% 0, 0 0, 0 0, 0 0; }
    to { background-position: -60% 0, 0 0, 0 0, 0 0; }
}

@keyframes pekaUiShimmer {
    from { background-position: 220% 0; }
    to { background-position: -60% 0; }
}

@keyframes pekaPillShimmer {
    from { background-position: 220% 0, 0 0; }
    to { background-position: -60% 0, 0 0; }
}

@keyframes pekaBadgeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@keyframes pekaTaxSessionPulse {
    0% { transform: translateY(0) scale(1); }
    32% { transform: translateY(-3px) scale(1.06); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes pekaPortraitBob {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(6px) rotate(1deg); }
}

@keyframes pekaAdBob {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(7px) rotate(1deg); }
}

@keyframes pekaSparkleSeal {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.36) rotate(0deg);
    }
    18% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(16deg);
    }
    100% {
        opacity: 0;
        transform:
            translate(
                calc(-50% + var(--peka-sparkle-x, 0px)),
                calc(-50% + var(--peka-sparkle-y, -28px))
            )
            scale(1.55)
            rotate(var(--peka-sparkle-rotate, 80deg));
    }
}

@keyframes pekaCoronationReveal {
    0% {
        opacity: 0;
        transform: translate(-50%, -58px) scale(0.82);
        filter: blur(6px) brightness(1.3);
    }
    18% {
        opacity: 1;
        transform: translate(-50%, 8px) scale(1.08);
        filter: blur(0) brightness(1.2);
    }
    74% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
        filter: brightness(1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
        filter: brightness(1.06);
    }
}

@keyframes pekaCoronationBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.42);
    }
    14% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform:
            translate(
                calc(-50% + var(--peka-coronation-x, 0px)),
                calc(-50% + var(--peka-coronation-y, -120px))
            )
            scale(0.82);
    }
}

@keyframes pekaModalPop {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pekaConfettiBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(0deg) scale(0.5);
    }
    12% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform:
            translate(
                calc(-50% + var(--peka-confetti-x, 0px)),
                calc(-50% + var(--peka-confetti-y, -160px))
            )
            rotate(var(--peka-confetti-rotation, 240deg))
            scale(0.86);
    }
}

@keyframes pekaTeleportRingSpinScale {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
    }
    18% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.62) rotate(120deg);
    }
    42% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.72) rotate(320deg);
    }
    58% {
        opacity: 0.92;
        transform: translate(-50%, -50%) scale(1.48) rotate(520deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.18) rotate(900deg);
    }
}

@keyframes pekaTeleportRingGlow {
    from {
        filter: brightness(1) saturate(1);
    }
    to {
        filter: brightness(1.28) saturate(1.18);
    }
}

@media (max-width: 540px) {
    .peka-tab {
        right: 14px;
        bottom: 88px;
        min-width: 144px;
        min-height: 38px;
        padding: 7px 8px;
        gap: 5px;
        border-width: 3px;
    }

    .peka-tab-icon {
        width: 22px;
        height: 22px;
        font-size: 0.98rem;
    }

    .peka-tab-label {
        font-size: 0.74rem;
    }

    .peka-tab-tax-pill {
        padding: 3px 5px;
        font-size: 0.58rem;
    }

    body.in-peka-zone .peka-tax-badge {
        top: 54px;
        padding: 8px 12px 9px;
        font-size: 0.72rem;
        max-width: calc(100vw - 24px);
        white-space: nowrap;
    }

    body.in-peka-zone .peka-tax-session-pill {
        left: 8px;
        bottom: 10px;
        min-height: 30px;
        max-width: 150px;
        padding: 6px 8px 7px;
        gap: 5px;
        font-size: 0.58rem;
    }

    body.in-peka-zone .peka-tax-session-pill strong {
        padding: 2px 5px 3px;
    }

    body.in-peka-zone .peka-portrait {
        left: 8px;
        top: 92px;
        width: 82px;
        opacity: 0.94;
    }

    body.in-peka-zone .peka-portrait-crown {
        top: -14px;
        font-size: 1.28rem;
    }

    body.in-peka-zone .peka-portrait-frame {
        border-width: 4px;
    }

    body.in-peka-zone .peka-portrait-caption {
        width: calc(100% + 14px);
        margin-left: -7px;
        padding: 4px 5px 5px;
        border-width: 2px;
        font-size: 0.52rem;
    }

    body.in-peka-zone .peka-coronation {
        top: 76px;
        height: 92px;
    }

    body.in-peka-zone .peka-coronation-headline {
        top: 16px;
        font-size: clamp(1.54rem, 8vw, 2.45rem);
        text-shadow:
            0 3px 0 #7a4600,
            0 7px 14px rgba(0, 0, 0, 0.34),
            0 0 18px rgba(255, 248, 220, 0.74),
            0 0 30px rgba(255, 215, 0, 0.68);
    }

    body.in-peka-zone .peka-ad {
        width: 116px;
        padding: 7px 8px;
        border-width: 2px;
        border-radius: 10px;
        font-size: 0.62rem;
        opacity: 0.9;
    }

    body.in-peka-zone .peka-ad-left-one {
        left: 6px;
        top: 37%;
    }

    body.in-peka-zone .peka-ad-right-one {
        right: 6px;
        top: 50%;
    }

    body.in-peka-zone .peka-ad-left-two {
        display: none;
    }

    body.in-peka-zone .peka-tax-intro-card {
        padding: 16px;
        border-radius: 18px;
    }

    body.in-peka-zone .peka-tax-intro-banner,
    body.in-peka-zone .peka-tax-intro-title {
        margin-bottom: 12px;
        padding: 10px 8px;
    }

    body.in-peka-zone .peka-tax-intro-btn,
    body.in-peka-zone .peka-tax-intro-accept {
        min-width: 0;
        width: 100%;
        font-size: 0.96rem;
    }
}

@media (pointer: coarse) {
    body.in-peka-zone .peka-sparkle {
        display: none;
    }
}

@media (max-width: 720px) {
    body.in-peka-zone .peka-ad {
        display: none;
    }

    body.in-peka-zone .peka-tax-badge {
        right: 8px;
        top: 52px;
        max-width: calc(100vw - 16px);
        padding: 5px 8px 6px;
        font-size: 0.62rem;
    }
}
