* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
}

body {
    color: #ffffff;
    font-family: 'Fredoka', sans-serif;
    overflow-x: hidden;
    image-rendering: pixelated;
    background: #87CEEB;
}

#loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-size: 18px;
    color: #888;
}

#game-container {
    display: none;
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Full-screen background canvas */
#game-canvas {
    display: block;
    width: 100%;
    height: 100vh;
    cursor: pointer;
}

/* Top Bar - floats over the background */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 1.2vw, 20px) clamp(16px, 2vw, 36px);
}

.top-left, .top-right {
    display: flex;
    gap: clamp(8px, 0.7vw, 16px);
    align-items: center;
}

.top-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(28px, 2.4vw, 52px);
    font-weight: 600;
    letter-spacing: clamp(3px, 0.3vw, 6px);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.4);
    pointer-events: none;
}
.top-center span {
    display: inline-block;
    animation: waddle 3s ease-in-out infinite;
}
.top-center span:nth-child(2) { animation-delay: 0.15s; }
.top-center span:nth-child(3) { animation-delay: 0.3s; }
.top-center span:nth-child(4) { animation-delay: 0.45s; }
.top-center span:nth-child(5) { animation-delay: 0.6s; }
.top-center span:nth-child(6) { animation-delay: 0.75s; }
.top-center span:nth-child(7) { animation-delay: 0.9s; }
.top-center span:nth-child(8) { animation-delay: 1.05s; }
.top-center span:nth-child(9) { animation-delay: 1.2s; }
@keyframes waddle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-2deg); }
    75% { transform: translateY(-3px) rotate(2deg); }
}

.coin-display {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(20, 20, 40, 0.8);
    padding: clamp(4px, 0.4vw, 10px) clamp(10px, 1vw, 20px);
    border: 2px solid #555;
    font-size: clamp(14px, 1.2vw, 24px);
    font-weight: bold;
    color: #ffd700;
}

.coin-icon {
    display: inline-block;
    font-size: clamp(14px, 1.1vw, 22px);
    line-height: 1;
    background: none;
    border: none;
    border-radius: 0;
    width: auto;
    height: auto;
}
.coin-icon::before {
    content: '\1F35E';
}

.btn {
    background: rgba(40, 40, 60, 0.8);
    color: #ffffff;
    border: 2px solid #555;
    padding: clamp(6px, 0.5vw, 12px) clamp(14px, 1.3vw, 28px);
    font-family: inherit;
    font-size: clamp(15px, 1.2vw, 24px);
    cursor: pointer;
    transition: background 0.15s;
}

.btn:hover {
    background: rgba(60, 60, 90, 0.9);
}

.fullscreen-overlay .btn,
.modal .btn {
    background: #fff;
    color: #3a3020;
    border: 2px solid #c8c0a8;
    border-radius: 6px;
}

.fullscreen-overlay .btn:hover,
.modal .btn:hover {
    background: #f0ece0;
}

.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dev-controls {
    position: fixed;
    bottom: 94px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 6px;
}
.dev-controls .btn {
    font-size: 11px;
    padding: 3px 8px;
    opacity: 0.6;
}
.dev-controls .btn:hover {
    opacity: 1;
}

/* Ad Banner - fixed above footer */
.ad-banner {
    position: fixed;
    bottom: 28px;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ad-banner:empty {
    display: none;
}

.ad-banner img {
    display: block;
    image-rendering: auto;
    pointer-events: auto;
}

/* Your Goose Panel - floats above the ad banner + footer */
.your-goose-panel {
    position: fixed;
    bottom: 118px;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    padding: 8px 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.your-goose-panel.ready {
    opacity: 1;
}

.rich-badge {
    position: fixed;
    bottom: 36px;
    right: 12px;
    width: 48px;
    height: 48px;
    z-index: 15;
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.5));
    animation: rich-glow 2s ease-in-out infinite alternate;
    image-rendering: pixelated;
    cursor: pointer;
    transform-origin: center bottom;
    transition: transform 0.15s ease;
}
.rich-badge.squish {
    transform: scaleX(1.15) scaleY(0.85);
}
.rich-badge.hidden {
    display: none;
}
@keyframes rich-glow {
    from { filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.3)); }
    to { filter: drop-shadow(0 2px 10px rgba(255, 215, 0, 0.8)); }
}

.your-goose-group {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1vw, 24px);
    pointer-events: auto;
    margin-right: 6px;
}

.goose-preview {
    flex-shrink: 0;
}

#your-goose-canvas {
    background: transparent;
}

.goose-info-header {
    font-size: clamp(16px, 1.3vw, 24px);
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
    text-align: center;
    margin-bottom: 2px;
    cursor: pointer;
}

.goose-info-header:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}

.goose-name-inline {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    color: #fff;
    font-family: inherit;
    font-size: clamp(14px, 1.1vw, 20px);
    font-weight: bold;
    text-align: center;
    padding: 2px 6px;
    width: 100%;
    outline: none;
}

.goose-actions {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.5vw, 12px);
    flex-shrink: 0;
    min-width: clamp(180px, 14vw, 280px);
    background: rgba(0, 0, 0, 0.25);
    padding: clamp(10px, 0.8vw, 18px) clamp(14px, 1.1vw, 22px);
    border-radius: 8px;
}

.btn-sell {
    background: #2d8a2d;
    border-color: #44bb44;
    font-size: clamp(15px, 1.2vw, 24px);
    font-weight: bold;
    padding: clamp(8px, 0.6vw, 14px) clamp(20px, 1.6vw, 34px);
    width: 100%;
}

.btn-sell:hover {
    background: #3a9a3a;
}

.btn-sell.disabled {
    background: #555;
    border-color: #666;
}
.btn-sell.overcharged {
    background: #ffd700;
    border-color: #ffaa00;
    color: #3a3020;
    animation: overcharge-pulse 0.6s ease infinite alternate;
}
@keyframes overcharge-pulse {
    from { box-shadow: 0 0 4px #ffd700; }
    to { box-shadow: 0 0 12px #ffaa00; }
}

.btn-pond {
    background: #2a4a7a;
    border-color: #4488cc;
    width: 100%;
}

.btn-pond:hover {
    background: #3a5a8a;
}

.sell-meter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#sell-meter {
    display: flex;
    gap: 3px;
}

.sell-bar {
    width: clamp(28px, 2.2vw, 46px);
    height: clamp(8px, 0.6vw, 14px);
    background: #444;
    border: 1px solid #555;
    position: relative;
    overflow: hidden;
}

.sell-bar.active {
    background: #44bb44;
    border-color: #66dd66;
}

.sell-bar.filling::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: #44bb44;
    animation: sell-fill var(--fill-duration, 120s) linear forwards;
    animation-delay: var(--fill-delay, 0s);
}

@keyframes sell-fill {
    from { width: 0%; }
    to { width: 100%; }
}

#sell-timer {
    display: none;
}

.sell-spark {
    position: fixed;
    width: 5px;
    height: 5px;
    background: #44bb44;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: sell-spark-fly 0.45s ease-out forwards;
}

@keyframes sell-spark-fly {
    0% { transform: translate(0, 0); opacity: 1; }
    100% { transform: translate(var(--sx, 10px), var(--sy, -10px)); opacity: 0; }
}

.coin-burst-particle {
    position: fixed;
    font-size: 14px;
    font-size: 18px;
    text-shadow: none;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #f0efe8;
    border: 3px solid #c8b888;
    border-radius: 12px;
    padding: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    color: #3a3020;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    color: #3a3020;
    position: sticky;
    top: -20px;
    z-index: 1;
    background: #f0efe8;
    margin: -20px -20px 16px;
    padding: 16px 20px;
    border-bottom: 2px solid #e0dcc8;
    border-radius: 12px 12px 0 0;
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ccc;
    color: #333;
    font-size: 18px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 1px 0;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.modal-close:hover {
    background: #eee;
    border-color: #999;
}

/* Inventory Panel */
.inventory-toggle {
    position: fixed;
    left: 12px;
    bottom: 120px;
    z-index: 200;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #5a9a3a;
    background: #fff;
    font-size: 32px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: left 0.25s ease, transform 0.2s;
}
.inventory-toggle:hover {
    transform: scale(1.1);
}
.inventory-toggle.shifted {
    left: 212px;
}

.mute-toggle {
    position: fixed;
    left: 24px;
    bottom: 220px;
    z-index: 200;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: left 0.25s ease, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}
.mute-toggle:hover {
    transform: scale(1.1);
}
.mute-toggle.muted {
    opacity: 0.5;
}
.mute-toggle.shifted {
    left: 224px;
}

.milestone-badge {
    position: relative;
}
.milestone-badge::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: #e8c030;
    border-radius: 50%;
    border: 2px solid #1a1a2e;
    animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}
.settings-row-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}
.settings-row-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #5a9a3a;
    cursor: pointer;
}
.settings-btn.pink {
    background: #d85a8a;
    color: #fff;
    border-color: #b84a70;
}
.settings-btn.pink:hover {
    background: #e06a9a;
}
.settings-btn.link {
    background: none;
    color: #3a7aba;
    border: none;
    text-decoration: underline;
    padding: 6px 12px;
}
.settings-btn.link:hover {
    color: #2a5a8a;
}
.top-center.squish {
    animation: logo-squish 0.3s ease;
}
@keyframes logo-squish {
    0% { transform: translateX(-50%) scale(1, 1); }
    30% { transform: translateX(-50%) scale(1.15, 0.8); }
    60% { transform: translateX(-50%) scale(0.9, 1.1); }
    100% { transform: translateX(-50%) scale(1, 1); }
}




/* Speed Slider (inside your-goose-panel) */
.speed-slider-widget.hidden {
    display: none;
}
.speed-slider-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 12px;
    padding: 8px 5px;
    pointer-events: auto;
    align-self: stretch;
}

.speed-reset {
    background: none;
    border: none;
    font-size: 16px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.speed-reset:hover {
    color: #fff;
}

.speed-label {
    font-size: 12px;
    line-height: 1;
}

.speed-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 24px;
    flex: 1;
    min-height: 0;
    cursor: pointer;
    accent-color: #5a9a3a;
}

.inventory-panel {
    position: fixed;
    left: -230px;
    bottom: 100px;
    z-index: 199;
    width: 210px;
    max-height: 400px;
    background: #fffdf5;
    border: 2px solid #d4c9a8;
    border-radius: 0 12px 12px 0;
    box-shadow: 2px 2px 12px rgba(0,0,0,0.15);
    padding: 12px;
    overflow-y: auto;
    transition: left 0.25s ease;
}
.inventory-panel.open {
    left: 0;
}

.inventory-header {
    font-size: 14px;
    font-weight: 600;
    color: #3a3020;
    margin-bottom: 10px;
    text-align: center;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.inventory-slot {
    position: relative;
    width: 56px;
    height: 56px;
    background: #f5f0e0;
    border: 2px solid #d4c9a8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s;
}
.inventory-slot.active-toggle {
    border-color: #cc2222;
    box-shadow: 0 0 6px rgba(204,34,34,0.4);
}
.inventory-slot:hover {
    border-color: #5a9a3a;
}

.inventory-icon {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.inventory-qty {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #3a3020;
    background: #fffdf5;
    border-radius: 4px;
    padding: 0 3px;
    line-height: 1.2;
}

.inventory-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #8a7a5a;
    font-size: 13px;
    padding: 20px 0;
}

.inventory-popup {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
}
.inventory-popup.active {
    display: block;
}

.inventory-popup-card {
    background: #fffdf5;
    border: 2px solid #d4c9a8;
    border-radius: 12px;
    padding: 24px;
    min-width: 280px;
    max-width: 360px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.inventory-popup-title {
    font-size: 18px;
    font-weight: 700;
    color: #3a3020;
    margin-bottom: 12px;
    text-align: center;
}

.inventory-popup-body {
    font-size: 14px;
    color: #5a5040;
    line-height: 1.5;
    margin-bottom: 16px;
}
.inventory-popup-body p {
    margin-bottom: 8px;
}
.inventory-popup-body .popup-effect {
    color: #2d7a2d;
    font-weight: 500;
}
.inventory-popup-body .popup-note {
    color: #b8860b;
    font-size: 12px;
    font-style: italic;
}
.inventory-popup-body .popup-steps {
    font-size: 13px;
    color: #5a5040;
}

.inventory-popup-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Shop */
#shop-timer {
    color: #b8860b;
    font-size: 13px;
    margin-bottom: 12px;
    text-align: center;
}

#shop-offers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.shop-card {
    background: #fff;
    border: 2px solid #d4c89a;
    border-radius: 8px;
    padding: 8px;
    width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}
.shop-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.shop-preview {
    image-rendering: pixelated;
}

.shop-info {
    text-align: center;
    color: #3a3020;
}

.shop-item-name {
    font-weight: bold;
    font-size: 14px;
}

.shop-rarity {
    font-size: 11px;
}

.shop-category {
    font-size: 11px;
    color: #888;
}

.shop-buy-btn {
    background: #5a9a3a;
    border: 2px solid #78b856;
    border-radius: 6px;
    color: #fff;
    padding: 6px 16px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    width: 100%;
}

.shop-buy-btn:hover {
    background: #6aaa4a;
}

.shop-buy-btn.disabled {
    background: #bbb;
    border-color: #ccc;
    color: #888;
    cursor: not-allowed;
}

.shop-buy-btn .coin-icon {
    font-size: 12px;
    vertical-align: middle;
    margin: 0 2px;
}

.shop-modal {
    max-width: 800px;
}

.shop-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.shop-tab {
    flex: 1;
    padding: 8px 14px;
    background: #e8e4d4;
    border: 2px solid #c8c0a8;
    border-radius: 6px;
    color: #5a5040;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.shop-tab:hover {
    background: #ddd8c4;
}

.shop-tab.active {
    background: #5a9a3a;
    border-color: #4a8a2a;
    color: #fff;
}

.shop-section {
    min-height: 200px;
}

.shop-offers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Packs */
.shop-packs {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.shop-pack-card {
    background: #fff;
    border: 3px solid #d4c89a;
    border-radius: 10px;
    padding: 18px;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}
.shop-pack-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.shop-pack-name {
    font-size: 18px;
    font-weight: bold;
    color: #3a3020;
    text-align: center;
}

.shop-pack-odds {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
    padding: 8px 0;
}

.shop-pack-odd {
    color: #5a5040;
}

/* Shop Items (consumables) */
.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.shop-item-card {
    background: #fff;
    border: 2px solid #d4c89a;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.shop-item-icon {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
}

.shop-pack-icon {
    width: 120px;
    height: 150px;
    image-rendering: pixelated;
}

.shop-item-card-name {
    font-weight: bold;
    font-size: 14px;
    color: #3a3020;
}

.shop-item-card-desc {
    font-size: 11px;
    color: #888;
    flex: 1;
}

.shop-item-card-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.shop-item-card-qty {
    font-size: 11px;
    color: #2d7a2d;
    font-weight: bold;
    white-space: nowrap;
}

/* Upgrades */
.shop-boosts-summary {
    background: #fff;
    border: 2px solid #d4c89a;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.shop-boosts-title {
    font-size: 15px;
    font-weight: bold;
    color: #3a3020;
    margin-bottom: 6px;
}

.shop-boosts-list {
    font-size: 13px;
    color: #888;
    font-style: italic;
}

.shop-upgrades-grid {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.shop-upgrade-card {
    background: #fff;
    border: 2px solid #6aaade;
    border-radius: 10px;
    padding: 18px;
    width: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.shop-upgrade-name {
    font-weight: bold;
    font-size: 15px;
    color: #3a3020;
}

.shop-upgrade-level {
    font-size: 13px;
    color: #888;
}

/* Pack Reveal Modal */
.pack-reveal-title {
    font-size: 22px;
    font-weight: bold;
    color: #3a3020;
    margin-bottom: 8px;
}

.pack-reveal-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
}

.pack-reveal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pack-reveal-equip {
    background: #5a9a3a !important;
    border-color: #78b856 !important;
    color: #fff !important;
}

.pack-reveal-equip:hover {
    background: #6aaa4a !important;
}

.pack-reveal-pond {
    background: #4a8abf !important;
    border-color: #6aaade !important;
    color: #fff !important;
}

.pack-reveal-pond:hover {
    background: #5a9acf !important;
}

/* Item Picker */
#item-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.picker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 2px solid #d4c89a;
    border-radius: 6px;
    color: #3a3020;
    padding: 10px 14px;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
}

.picker-item:hover {
    background: #f5f0e0;
    border-color: #b8a060;
}

.picker-name {
    font-weight: bold;
}

.picker-category {
    font-size: 12px;
    color: #999;
}

/* Toast */
#toast-container {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: #ffffffee;
    border: 2px solid #d4c89a;
    border-radius: 8px;
    padding: 8px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    color: #3a3020;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer {
    display: none;
}

.game-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 6px 20px;
    background: rgba(30, 30, 40, 0.75);
    font-size: 12px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

/* Leaderboard Overlay */
.leaderboard-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background: rgba(30, 30, 40, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}
.leaderboard-overlay.active {
    display: flex;
}
.leaderboard-header {
    width: 100%;
    max-width: 720px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 24px 12px;
}
.leaderboard-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 28px;
    color: #f5d060;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.leaderboard-body {
    width: 100%;
    max-width: 720px;
    padding: 8px 24px 40px;
}
.leaderboard-loading, .leaderboard-empty {
    color: rgba(255,255,255,0.7);
    text-align: center;
    font-size: 16px;
    padding: 40px 0;
}
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.leaderboard-table thead th {
    text-align: left;
    color: #b8a860;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 10px;
    border-bottom: 2px solid rgba(245, 208, 96, 0.3);
}
.leaderboard-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.15s;
}
.leaderboard-table tbody tr:hover {
    background: rgba(255,255,255,0.05);
}
.leaderboard-table td {
    padding: 10px 10px;
    color: rgba(255,255,255,0.85);
}
.lb-rank {
    width: 50px;
    text-align: center !important;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
}
.lb-name {
    font-weight: 500;
}
.lb-coins, .lb-flock, .lb-earned {
    text-align: right !important;
}
.lb-earned {
    font-weight: 600;
    color: #f5d060 !important;
}
.lb-medal {
    font-size: 18px;
}
.lb-me {
    background: rgba(245, 208, 96, 0.1) !important;
}
.lb-me td {
    color: #f5d060 !important;
}
.lb-me .lb-name {
    font-weight: 700;
}
.lb-country {    text-align: center !important;    color: rgba(255,255,255,0.6);    font-size: 12px;    text-transform: uppercase;}.lw-wins {    text-align: right !important;    font-weight: 600;    color: #7ddf64 !important;}.lw-played {    text-align: right !important;}.lw-winnings {    text-align: right !important;    font-weight: 600;    color: #f5d060 !important;}
.lb-coins .coin-icon, .lb-earned .coin-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 2px;
    font-size: 12px;
}

@media (max-width: 700px) {
    .leaderboard-header {
        padding: 20px 12px 8px;
    }
    .leaderboard-title {
        font-size: 22px;
    }
    .leaderboard-body {
        padding: 8px 8px 32px;
    }
    .leaderboard-table {
        font-size: 12px;
    }
    .leaderboard-table td, .leaderboard-table th {
        padding: 8px 6px;
    }
    .lb-coins {
        display: none;
    }
    thead .lb-coins {
    .lb-country, thead .lb-country {        display: none;    }    .lw-played, thead .lw-played {        display: none;    }
        display: none;
    }
}

/* Page Overlay */
.page-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background: rgba(30, 30, 40, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.page-overlay.active {
    display: flex;
}

.page-overlay-header {
    width: 100%;
    max-width: 720px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 24px 12px;
}

.page-overlay-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 28px;
    color: #fff;
}

.page-overlay-body {
    width: 100%;
    max-width: 720px;
    padding: 8px 24px 40px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.7;
}

.page-overlay-body h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 24px 0 8px;
    color: #fff;
}

.page-overlay-body p {
    margin: 0 0 12px;
}

.page-overlay-body ul,
.page-overlay-body ol {
    margin: 0 0 12px;
    padding-left: 24px;
}

.page-overlay-body li {
    margin-bottom: 4px;
}

@media (max-width: 700px) {
    .game-footer {
        flex-wrap: wrap;
        gap: 10px 14px;
        padding: 6px 12px;
        font-size: 11px;
    }
    .page-overlay-header {
        padding: 20px 16px 8px;
    }
    .page-overlay-title {
        font-size: 24px;
    }
    .page-overlay-body {
        padding: 8px 16px 32px;
        font-size: 17px;
    }
}

/* Full-screen Overlays */
.fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e8e4d4;
    z-index: 50;
    flex-direction: column;
}

.fullscreen-overlay.active {
    display: flex;
}

/* Pond */
.pond-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #5a9a3a;
    border-bottom: 3px solid #4a8a2a;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pond-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tab-divider {
    width: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 2px 6px;
    border-radius: 1px;
}

.pond-tab {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: clamp(6px, 0.5vw, 12px) clamp(12px, 1.1vw, 22px);
    font-family: inherit;
    font-size: clamp(13px, 1vw, 20px);
    cursor: pointer;
    white-space: nowrap;
}

.pond-tab.active {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
}

.pond-tab.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pond-filters {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background: #ddd8c4;
    border-bottom: 2px solid #c8c0a8;
    flex-wrap: wrap;
}

.pond-input, .pond-select {
    background: #fff;
    color: #3a3020;
    border: 2px solid #c8c0a8;
    border-radius: 6px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 13px;
}

.pond-input {
    flex: 1;
    min-width: 150px;
}

.pond-input::placeholder {
    color: #aaa;
}

#pond-section-geese,
#pond-section-head,
#pond-section-swapper,
#pond-section-studio {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.pond-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.pond-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
    max-width: 900px;
    margin: 0 auto;
}

.pond-card {
    background: #fff;
    border: 2px solid #d4c89a;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.pond-card:hover {
    background: #faf8f0;
    border-color: #b8a060;
    transform: translateY(-2px);
}

.pond-card-canvas {
    image-rendering: pixelated;
}

.pond-card-name {
    margin-top: 6px;
    font-size: 12px;
    text-align: center;
    color: #5a5040;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.pond-empty {
    text-align: center;
    color: #999;
    font-size: 16px;
    padding: 60px 20px;
}

/* Pond Detail Panel — centered overlay */
.pond-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pond-detail-inner {
    background: #f0efe8;
    border: 3px solid #c8b888;
    border-radius: 12px;
    padding: 24px 28px;
    width: 600px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    color: #3a3020;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.pond-detail-inner .modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 1;
}

.pond-detail-name {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-right: 30px;
}

.pond-name-input {
    flex: 1;
    background: #fff;
    border: 2px solid #c8c0a8;
    border-radius: 6px;
    color: #3a3020;
    padding: 8px 12px;
    font-size: 15px;
    font-family: inherit;
}

.pond-name-input:focus {
    outline: none;
    border-color: #5a9a3a;
}

.pond-rename-btn {
    white-space: nowrap;
}

.pond-detail-body {
    display: flex;
    gap: 20px;
}

.pond-detail-preview {
    image-rendering: pixelated;
    background: #87CEEB;
    border: 2px solid #c8c0a8;
    border-radius: 8px;
    flex-shrink: 0;
}

.pond-detail-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pond-detail-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #d4c89a;
    margin-bottom: 10px;
}

.pond-dtab {
    flex: 1;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: #aaa;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.15s;
}

.pond-dtab:hover {
    color: #777;
}

.pond-dtab.active {
    color: #3a3020;
    border-bottom-color: #5a9a3a;
}

.pond-tab-panel {
    flex: 1;
    overflow-y: auto;
    max-height: 240px;
}

.pond-stats-placeholder {
    color: #aaa;
    font-size: 13px;
    padding: 30px 0;
    text-align: center;
    font-style: italic;
}

.pond-detail-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pond-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid #e0dcc8;
    border-radius: 4px;
    font-size: 12px;
}

.pond-detail-item:hover {
    background: #faf8f0;
}

.pond-item-category {
    color: #999;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    min-width: 80px;
}

.pond-item-name {
    color: #5a5040;
    text-align: right;
    flex: 1;
}

.pond-trash-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    color: #c0392b;
    opacity: 0.35;
    transition: opacity 0.15s;
    margin-left: 6px;
    font-weight: bold;
}

.pond-trash-btn:hover {
    opacity: 1;
}

.pond-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
    border-top: 2px solid #d4c89a;
}

.pond-actions-row {
    display: flex;
    gap: 8px;
}

.pond-action-btn {
    flex: 1;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
}

.pond-action-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.pond-share-btn {
    background: #4a8abf;
    border-color: #6aaade;
    color: #fff;
    border-radius: 6px;
}

.pond-share-btn:hover {
    background: #5a9acf;
}

.share-bg-options {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.share-bg-btn {
    padding: 6px 14px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background: #f5f0e8;
    color: #5a4a30;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.share-bg-btn:hover {
    border-color: #8a7a5a;
}

.share-bg-btn.active {
    background: #5a4a30;
    color: #fff;
    border-color: #5a4a30;
}

.pond-sell-meter-row {
    display: flex;
    justify-content: center;
    padding-bottom: 6px;
}

.pond-sell-meter {
    display: flex;
    gap: 3px;
}

.pond-sell-meter .sell-bar {
    width: 28px;
    height: 8px;
    background: #ccc;
    border: 1px solid #bbb;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.pond-sell-meter .sell-bar.active {
    background: #44bb44;
    border-color: #66dd66;
}

.pond-sell-btn {
    flex: 1;
    background: #5a9a3a;
    border-color: #78b856;
    border-radius: 6px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: bold;
}

.pond-sell-btn:hover {
    background: #6aaa4a;
}

.pond-delete-btn {
    background: #cc5544;
    border-color: #dd7766;
    color: #fff;
    border-radius: 6px;
}

.pond-delete-btn:hover {
    background: #dd6655;
}

/* Head Goose Section */
.head-goose-container {
    max-width: 700px;
    margin: 0 auto;
}

.head-goose-empty {
    background: #fff;
    border: 2px solid #d4c89a;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    color: #5a5040;
    font-size: 16px;
}

.head-goose-empty p {
    margin-bottom: 20px;
}

.head-goose-appointed {
    display: flex;
    gap: 24px;
}

.head-goose-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.head-goose-name {
    font-size: 20px;
    font-weight: bold;
    color: #3a3020;
}

.head-goose-preview {
    image-rendering: pixelated;
    background: #87CEEB;
    border: 2px solid #c8c0a8;
    border-radius: 8px;
}

.head-goose-remove-btn {
    background: #cc5544 !important;
    border-color: #dd7766 !important;
    color: #fff !important;
    font-size: 12px;
    width: 100%;
}

.head-goose-remove-btn:hover {
    background: #dd6655 !important;
}

.head-goose-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.head-goose-boosts-title {
    font-size: 16px;
    font-weight: bold;
    color: #3a3020;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.head-goose-boosts-box {
    background: #fff;
    border: 2px solid #d4c89a;
    border-radius: 8px;
    padding: 14px 18px;
}

.head-goose-boosts-heading {
    font-size: 14px;
    font-weight: bold;
    color: #3a3020;
    margin-bottom: 10px;
}

.head-goose-boosts-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.head-goose-no-boosts {
    color: #aaa;
    font-size: 13px;
    font-style: italic;
}

.head-goose-breakdown-title {
    font-size: 14px;
    font-weight: bold;
    color: #3a3020;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.head-goose-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.head-goose-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid #e0dcc8;
    border-radius: 4px;
    font-size: 12px;
}

.head-goose-item:hover {
    background: #faf8f0;
}

.head-goose-item-name {
    font-weight: bold;
}

.head-goose-item-cat {
    color: #999;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
}

.head-goose-boost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f0faf0;
    border: 1px solid #b5d8b5;
    border-radius: 4px;
}

.head-goose-boost-row .boost-label {
    font-weight: bold;
    color: #3a3020;
    font-size: 13px;
}

.head-goose-boost-row .boost-value {
    color: #2d8a2d;
    font-weight: bold;
    font-size: 14px;
}

.head-goose-item-boost {
    color: #2d8a2d;
    font-size: 10px;
    font-weight: bold;
    margin-left: 6px;
}

.head-goose-no-items {
    color: #aaa;
    font-size: 13px;
    font-style: italic;
    padding: 8px 0;
}

/* Swapper */
.swapper-container {
    max-width: 700px;
    margin: 0 auto;
}

.swapper-instructions {
    text-align: center;
    color: #5a5040;
    font-size: 15px;
    margin-bottom: 24px;
}

.swapper-slots {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.swapper-slot {
    background: #fff;
    border: 2px solid #d4c89a;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 200px;
}

.swapper-preview {
    image-rendering: pixelated;
    background: #87CEEB;
    border: 2px solid #c8c0a8;
    border-radius: 8px;
}

.swapper-slot-name {
    font-weight: bold;
    font-size: 14px;
    color: #3a3020;
    text-align: center;
}

.swapper-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 160px;
}

.swapper-arrows {
    font-size: 28px;
    color: #b8860b;
}

.swapper-category-label {
    font-size: 12px;
    font-weight: bold;
    color: #5a5040;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.swapper-select {
    width: 100%;
    text-align: center;
}

.swapper-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px solid #d4c89a;
}

.swapper-token-status {
    font-size: 14px;
    font-weight: bold;
    color: #2d7a2d;
}

.swapper-go-btn {
    background: #5a9a3a !important;
    border-color: #78b856 !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: bold;
    padding: 10px 24px;
}

.swapper-go-btn:hover:not(:disabled) {
    background: #6aaa4a !important;
}

.swapper-go-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* === Wanted Bounties === */

.wanted-modal {
    max-width: 820px;
}

.wanted-title {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #6b4c2a;
    font-family: 'Fredoka', sans-serif;
}

.wanted-timer {
    text-align: center;
    color: #8a7a5a;
    font-size: 13px;
    margin-bottom: 16px;
    font-style: italic;
}

.wanted-board {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wanted-poster {
    background: #f5f0e0;
    border: 3px solid #c8b888;
    border-radius: 8px;
    padding: 16px 16px 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    box-shadow: inset 0 0 20px rgba(180, 160, 120, 0.15);
}

.wanted-poster.claimed {
    opacity: 0.55;
}

.wanted-poster-label {
    position: absolute;
    top: -10px;
    left: 16px;
    background: #6b4c2a;
    color: #f5f0e0;
    padding: 2px 12px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-radius: 3px;
}

.wanted-preview {
    image-rendering: pixelated;
    border: 2px solid #d4c89a;
    background: #ebe6d6;
    border-radius: 6px;
    flex-shrink: 0;
}

.wanted-info {
    flex: 1;
    min-width: 0;
}

.wanted-items-list {
    font-size: 14px;
    color: #3a3020;
    margin-bottom: 8px;
    line-height: 1.6;
}

.wanted-item-name {
    font-weight: bold;
}

.wanted-plus {
    color: #8a7a5a;
    margin: 0 2px;
}

.wanted-reward {
    font-size: 15px;
    font-weight: bold;
    color: #2d7a2d;
    margin-bottom: 10px;
}

.wanted-claim-btn {
    background: #5a9a3a;
    color: #fff;
    border: 2px solid #4a8a2a;
    border-radius: 6px;
    padding: 8px 20px;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
}

.wanted-claim-btn:hover {
    background: #4a8a2a;
}

.wanted-claim-btn.disabled {
    background: #b0a888;
    border-color: #a09878;
    color: #7a7060;
    cursor: default;
}

.wanted-claim-btn.disabled:hover {
    background: #b0a888;
}

.wanted-claimed-stamp {
    font-size: 20px;
    font-weight: bold;
    color: #2d7a2d;
    letter-spacing: 3px;
    text-transform: uppercase;
    transform: rotate(-3deg);
    border: 3px solid #5a9a3a;
    border-radius: 4px;
    padding: 4px 14px;
    display: inline-block;
}

.wanted-match-hint {
    font-size: 11px;
    color: #8a7a5a;
    margin-top: 4px;
    font-style: italic;
}

/* === Gallery === */


.gallery-filters {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    flex-wrap: wrap;
}

[id^="gallery-section-"] {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.gallery-content {
    padding: 0 24px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.gallery-category {
    margin-bottom: 8px;
}

.gallery-category-header {
    font-size: 16px;
    font-weight: bold;
    color: #3a3020;
    padding: 10px 0;
    border-bottom: 2px solid #d4c89a;
    cursor: pointer;
    user-select: none;
}

.gallery-category-header:hover {
    color: #2d7a2d;
}

.gallery-category-arrow {
    display: inline-block;
    width: 16px;
}

.gallery-category-count {
    font-weight: normal;
    color: #8a7a5a;
    font-size: 13px;
}

.gallery-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 12px 0;
}

.gallery-item-card {
    background: #fff;
    border: 3px solid #d4c89a;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    cursor: default;
    position: relative;
}

.gallery-bell-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.15s;
}

.gallery-bell-badge:hover {
    opacity: 0.8;
}

.gallery-bell-badge.active {
    opacity: 1;
}

.gallery-item-card.undiscovered {
    opacity: 0.6;
}

.gallery-item-preview {
    image-rendering: pixelated;
    display: block;
    margin: 0 auto 6px;
    background: #f5f0e0;
    border-radius: 4px;
}

.gallery-item-name {
    font-size: 12px;
    font-weight: bold;
    color: #3a3020;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-item-rarity {
    font-size: 11px;
    font-weight: bold;
}

/* Gallery — Sets */

.gallery-sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

.gallery-set-card {
    background: #f5f0e0;
    border: 3px solid #b0a888;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s;
}

.gallery-set-card:hover {
    border-color: #5a9a3a;
}

.gallery-set-card.complete {
    border-color: #5a9a3a;
    box-shadow: 0 0 8px rgba(90, 154, 58, 0.25);
}

.gallery-set-preview {
    image-rendering: pixelated;
    display: block;
    margin: 0 auto 8px;
    background: #e8e4d4;
    border-radius: 4px;
}

.gallery-set-name {
    font-size: 13px;
    font-weight: bold;
    color: #3a3020;
    margin-bottom: 4px;
}

.gallery-set-progress {
    font-size: 11px;
    color: #8a7a5a;
}

/* Set Detail Modal */

.gallery-set-detail-body {
    display: flex;
    gap: 20px;
    padding: 16px;
    align-items: flex-start;
}

.gallery-set-detail-preview {
    image-rendering: pixelated;
    background: #ebe6d6;
    border: 2px solid #d4c89a;
    border-radius: 6px;
    flex-shrink: 0;
}

.gallery-set-detail-info {
    flex: 1;
}

.gallery-set-detail-heading {
    font-size: 14px;
    font-weight: bold;
    color: #3a3020;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-set-detail-list {
    margin-bottom: 16px;
}

.gallery-set-piece {
    font-size: 14px;
    color: #8a7a5a;
    padding: 3px 0;
}

.gallery-set-piece.discovered {
    color: #3a3020;
}

.gallery-set-piece-dot {
    margin-right: 6px;
}

.gallery-set-piece-cat {
    color: #8a7a5a;
    font-size: 12px;
}

.gallery-set-detail-bonus {
    font-size: 14px;
    color: #2d7a2d;
    margin-bottom: 8px;
}

.gallery-set-detail-hint {
    font-size: 12px;
    font-style: italic;
}

/* Gallery — Achievements */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

.achievement-card {
    background: #f0ece0;
    border: 3px solid #c8c0a8;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.achievement-card.unclaimed,
.achievement-card.claimed {
    background: #fdf6d8;
    border-color: #d4a820;
}

.achievement-card.secret {
    border-color: #6ab0e8;
}

.achievement-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
    background: #d8d0c0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.achievement-card.unclaimed .achievement-icon,
.achievement-card.claimed .achievement-icon {
    background: #f0e060;
}

.achievement-card.secret .achievement-icon {
    background: #c0ddf0;
}

.achievement-check {
    color: #2d7a2d;
    font-weight: bold;
}

.achievement-question {
    color: #8a8070;
    font-weight: bold;
}

.achievement-card.secret .achievement-question {
    color: #5090c0;
}

.achievement-name {
    font-size: 14px;
    font-weight: bold;
    color: #3a3020;
    margin-bottom: 4px;
}

.achievement-desc {
    font-size: 12px;
    color: #6a6050;
    margin-bottom: 10px;
    min-height: 30px;
}

.achievement-progress {
    font-size: 14px;
    font-weight: bold;
    color: #8a7a5a;
}

.achievement-claim-btn {
    background: #5a9a3a;
    color: #fff;
    border: 2px solid #4a8a2a;
    border-radius: 6px;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

.achievement-claim-btn:hover {
    background: #4a8a2a;
}

.achievement-claimed-text {
    font-size: 14px;
    font-weight: bold;
    color: #2d7a2d;
    font-style: italic;
}

/* Achievement Notification Popup */
.achievement-notification {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    transition: top 0.4s ease;
    pointer-events: none;
}
.achievement-notification.active {
    top: 60px;
    pointer-events: auto;
}
.achievement-notification-card {
    background: #3a3a38;
    border: 3px solid #c8a832;
    outline: 3px solid #8a7a3a;
    border-radius: 6px;
    padding: 16px 24px;
    min-width: 280px;
    max-width: 380px;
    text-align: left;
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.achievement-notification-title {
    font-size: 18px;
    font-weight: bold;
    color: #d4aa20;
    margin-bottom: 8px;
    text-shadow: 1px 1px 0 #3a3020;
}
.achievement-notif-name {
    font-size: 16px;
    font-weight: bold;
    color: #f0efe8;
    margin-bottom: 2px;
}
.achievement-notif-desc {
    font-size: 13px;
    color: #a0a098;
    margin-bottom: 12px;
}
.achievement-notif-divider {
    border-top: 2px dashed #5a5a50;
    margin-bottom: 12px;
}
.achievement-notif-claim {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #5a9a3a, #3a7a1a);
    border: 2px solid #2a5a10;
    border-radius: 4px;
    color: #f0efe8;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}
.achievement-notif-claim:hover {
    background: linear-gradient(to bottom, #6aaa4a, #4a8a2a);
}
.achievement-notif-claim:disabled {
    opacity: 0.7;
    cursor: default;
}
.achievement-notif-claim .coin-icon {
    vertical-align: middle;
}

/* Settings Modal */
.settings-modal {
    background: #f0efe8;
    border: 3px solid #c8b888;
    border-radius: 10px;
    width: 520px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 2px solid #d4c89a;
}
.settings-header h2 {
    font-size: 20px;
    color: #3a3020;
}
.settings-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #8a7a5a;
    cursor: pointer;
    line-height: 1;
}
.settings-close:hover {
    color: #3a3020;
}
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
}
.settings-section {
    background: #faf8f0;
    border: 2px solid #d4c89a;
    border-radius: 8px;
    padding: 14px;
}
.settings-section-title {
    font-size: 13px;
    font-weight: bold;
    color: #8a7a5a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #d4c89a;
}
.settings-row {
    margin-bottom: 14px;
}
.settings-row:last-child {
    margin-bottom: 0;
}
.settings-row label {
    display: block;
    font-size: 13px;
    color: #5a4a30;
    margin-bottom: 4px;
}
.settings-row input[type="range"] {
    width: 100%;
    accent-color: #5a9a3a;
}
.settings-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 8px;
    border: 2px solid transparent;
    text-align: center;
}
.settings-btn:last-child {
    margin-bottom: 0;
}
.settings-btn.blue {
    background: #3a7aba;
    color: #fff;
    border-color: #2a5a8a;
}
.settings-btn.blue:hover {
    background: #4a8aca;
}
.settings-btn.grey {
    background: #d8d0c0;
    color: #3a3020;
    border-color: #c0b8a0;
}
.settings-btn.grey:hover {
    background: #e0d8c8;
}
.settings-player-id {
    font-size: 18px;
    font-weight: bold;
    color: #5a4a30;
    letter-spacing: 1px;
}
.settings-nickname-row {
    display: flex;
    gap: 8px;
}
.settings-nickname-row input {
    flex: 1;
    padding: 6px 10px;
    border: 2px solid #d4c89a;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #5a4a30;
}
.settings-nickname-row input:focus {
    outline: none;
    border-color: #b0a060;
}
.settings-nickname-save {
    padding: 6px 14px !important;
    margin: 0 !important;
    white-space: nowrap;
}
.btn-settings {
    font-size: clamp(18px, 1.5vw, 30px);
    padding: clamp(4px, 0.4vw, 10px) clamp(8px, 0.7vw, 16px);
    line-height: 1;
}

@media (max-width: 720px), (max-height: 500px) {
    .top-center {
        display: none;
    }
    .top-bar {
        padding: 6px 8px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    .top-left, .top-right {
        display: contents;
    }
    .btn {
        padding: 8px 12px;
        font-size: 15px;
    }
    .coin-display {
        padding: 6px 10px;
        font-size: 15px;
    }
    .dev-controls {
        bottom: 4px;
    }
    .inventory-toggle {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .inventory-toggle.shifted {
        left: 208px;
    }
}

@media (max-width: 380px) {
    .btn {
        padding: 6px 8px;
        font-size: 13px;
    }
    .coin-display {
        padding: 4px 8px;
        font-size: 13px;
    }
}

/* Goose Facts */
.facts-content {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 24px;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.fact-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #d4c89a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.fact-card-img {
    width: 100%;
    height: auto;
    display: block;
}

.fact-card-text {
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #3a3a2a;
    margin: 0;
}

/* ===== Goose Studio ===== */

.studio-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.studio-preview-area {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 24px;
    gap: 14px;
}

.studio-canvas {
    image-rendering: pixelated;
    border: 3px solid #333;
    border-radius: 8px;
    max-height: calc(100vh - 220px);
    width: auto;
    aspect-ratio: 500 / 600;
}

.studio-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.studio-bg-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.studio-action-btns {
    display: flex;
    gap: 8px;
}

.studio-picker-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    border-left: 2px solid #d4c89a;
}

.studio-picker-header {
    font-size: clamp(16px, 1.4vw, 24px);
    font-weight: 600;
    color: #3a3a2a;
    margin-bottom: 12px;
}

.studio-category {
    margin-bottom: 16px;
}

.studio-category-header {
    font-size: 14px;
    font-weight: 500;
    color: #6a5a3a;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #d4c89a;
}

.studio-item-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.studio-item-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;
    padding: 6px 4px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.studio-item-btn:hover {
    background: #f0ead0;
}

.studio-item-btn.selected {
    background: #e8f4d8;
    border-color: #5a9a3a;
    box-shadow: 0 0 0 2px rgba(90, 154, 58, 0.3);
}

.studio-item-btn img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    object-fit: contain;
}

.studio-item-label {
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .swapper-slots {
        flex-direction: column;
        gap: 10px;
    }
    .swapper-slot {
        width: 100%;
        max-width: 220px;
        padding: 10px;
    }
    .swapper-preview {
        width: 90px;
        height: 108px;
    }
    .swapper-center {
        min-width: unset;
    }
    .swapper-arrows {
        font-size: 22px;
    }
    #pond-section-studio {
        overflow-y: auto;
    }
    .studio-body {
        flex-direction: column;
        overflow: visible;
        flex: none;
    }
    .studio-preview-area {
        padding: 12px;
    }
    .studio-canvas {
        max-height: 40vh;
    }
    .studio-picker-area {
        border-left: none;
        border-top: 2px solid #d4c89a;
        overflow: visible;
    }

    /* Pond topbar mobile */
    .pond-topbar {
        flex-direction: column;
        padding: 8px;
        gap: 6px;
    }
    .pond-tabs {
        justify-content: center;
        gap: 3px;
    }
    .pond-tab {
        padding: 7px 10px;
        font-size: 12px;
    }
    .tab-divider {
        margin: 2px 2px;
    }
    .topbar-actions {
        width: 100%;
        justify-content: center;
        gap: 6px;
    }
    .topbar-actions .btn {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
        font-size: 13px;
    }
    .pond-filters {
        padding: 8px 10px;
        gap: 6px;
    }
    .pond-input {
        min-width: 100px;
    }

    /* Shop mobile */
    .shop-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }
    .shop-tab {
        font-size: 12px;
        padding: 6px 8px;
    }
    .shop-card {
        width: 100%;
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
    .shop-preview {
        width: 80px;
        height: 96px;
        flex-shrink: 0;
    }
    .shop-info {
        text-align: left;
        flex: 1;
    }
    .shop-buy-btn {
        width: auto;
        white-space: nowrap;
    }
    .shop-packs {
        flex-direction: column;
        align-items: stretch;
    }
    .shop-pack-card {
        width: 100%;
        padding: 12px;
    }
    .shop-pack-icon {
        width: 80px;
        height: 100px;
    }
    .shop-pack-name {
        font-size: 15px;
    }
    .shop-items-grid {
        grid-template-columns: 1fr;
    }
    .shop-upgrade-card {
        width: 100%;
        max-width: 300px;
        flex-direction: row;
        gap: 12px;
    }
    /* Pond detail mobile */
    .pond-detail-inner {
        padding: 16px 14px;
        gap: 10px;
        max-height: 90vh;
    }
    .pond-detail-body {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    .pond-detail-preview {
        width: 130px !important;
        height: 156px !important;
    }
    .pond-detail-right {
        width: 100%;
    }
    .pond-tab-panel {
        max-height: 160px;
    }
    .pond-detail-item {
        padding: 5px 8px;
        font-size: 11px;
    }
    .pond-item-category {
        min-width: 60px;
        font-size: 9px;
    }
    .pond-detail-actions {
        padding-top: 8px;
        gap: 6px;
    }
    .pond-actions-row {
        gap: 5px;
    }
    .pond-action-btn {
        padding: 7px 6px;
        font-size: 11px;
        letter-spacing: 0;
    }
    .pond-sell-btn,
    .pond-delete-btn {
        padding: 7px 6px;
        font-size: 12px;
    }
    .pond-detail-name {
        gap: 6px;
    }
    .pond-name-input {
        font-size: 13px;
        padding: 6px 10px;
    }
    .pond-rename-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    /* Gallery item detail mobile */
    .gallery-item-detail-body {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 14px;
    }
    .gallery-item-detail-preview {
        width: 120px !important;
        height: 144px !important;
    }
    .gallery-item-detail-info {
        width: 100%;
    }
    .gallery-item-detail-name {
        font-size: 16px;
        text-align: center;
    }
    .gallery-item-detail-desc {
        font-size: 12px;
        text-align: center;
        margin-bottom: 10px;
    }
    .gallery-item-detail-stats {
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    .gallery-item-stat-row {
        font-size: 12px;
    }
    .gallery-item-bell-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* Mobile: prevent page scroll/bounce */
@media (max-width: 768px) {
    html, body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    .mute-toggle {
        display: none !important;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .settings-modal {
        max-height: 85vh;
    }
}

/* Hide mute on tablets (iPad) */
@media (min-width: 769px) and (max-width: 1024px) {
    .mute-toggle {
        display: none !important;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .settings-modal {
        max-height: 85vh;
    }
}

@keyframes headbang {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    15% { transform: rotate(-6deg) translateY(2px); }
    30% { transform: rotate(4deg) translateY(-1px); }
    45% { transform: rotate(-5deg) translateY(3px); }
    60% { transform: rotate(3deg) translateY(-1px); }
    75% { transform: rotate(-4deg) translateY(2px); }
    90% { transform: rotate(2deg) translateY(0); }
}
#your-goose-canvas.headbanging {
    animation: headbang 0.45s ease-in-out infinite;
}

.save-code-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center;
    justify-content: center; z-index: 9999;
}
.save-code-box {
    background: #faf8f2; border: 3px solid #c8b888; border-radius: 12px;
    padding: 30px 40px; text-align: center; max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.save-code-box h3 {
    font-family: "Fredoka", sans-serif; font-size: 20px; color: #3a3020;
    margin: 0 0 16px;
}
.save-code-display {
    font-family: "Courier New", monospace; font-size: 28px; font-weight: bold;
    color: #2a6cb6; background: #fff; border: 2px solid #d4cfc5;
    border-radius: 8px; padding: 14px 20px; letter-spacing: 3px;
    margin-bottom: 12px; user-select: all;
}
.save-code-hint {
    font-size: 13px; color: #8a7a5a; margin: 0 0 18px; line-height: 1.4;
}
.save-code-copy {
    background: #3a8a3f; color: #fff; border: none; border-radius: 6px;
    padding: 10px 24px; font-family: "Fredoka", sans-serif; font-size: 14px;
    cursor: pointer; margin-right: 8px;
}
.save-code-copy:hover { background: #2e7a33; }
.save-code-close {
    background: #e8e4dc; color: #3a3020; border: 1px solid #c8b888;
    border-radius: 6px; padding: 10px 24px; font-family: "Fredoka", sans-serif;
    font-size: 14px; cursor: pointer;
}
.save-code-close:hover { background: #d4cfc5; }

/* SEO fallback - shown when API unavailable (e.g. Googlebot) */
.seo-fallback {
    position: absolute;
    inset: 0;
    z-index: 9999;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    background: linear-gradient(180deg, #87CEEB 0%, #a8dcf0 45%, #d4ecf8 65%, #e8f0f0 80%, #dde8e4 100%);
}
.seo-fallback::before {
    content: '';
    position: fixed;
    inset: 0;
    background: inherit;
    filter: blur(8px);
    z-index: -1;
}
.seo-fallback-inner {
    max-width: 640px;
    margin: 40px 16px 60px;
    padding: 36px 32px 40px;
    background: rgba(30, 30, 40, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
    font-family: 'Fredoka', sans-serif;
    line-height: 1.6;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    height: fit-content;
}
.seo-fallback .seo-logo { display: block; margin: 0 auto 12px; height: 64px; }
.seo-fallback h1 { color: #fff; font-size: 1.6rem; font-weight: 600; text-align: center; margin-bottom: 4px; }
.seo-fallback .seo-tagline { text-align: center; color: #ffd700; font-size: 1.05rem; margin-bottom: 20px; font-weight: 500; }
.seo-fallback h2 { color: #ffd700; font-size: 1.1rem; margin: 20px 0 8px; font-weight: 500; }
.seo-fallback p { margin-bottom: 12px; }
.seo-fallback ul { margin: 0 0 16px 20px; }
.seo-fallback li { margin-bottom: 6px; }
.seo-fallback li strong { color: #fff; }
.seo-fallback .seo-play-btn {
    display: inline-block;
    background: #2d8a2d;
    border: 2px solid #44bb44;
    color: #fff;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: 'Fredoka', sans-serif;
    transition: background 0.15s;
}
.seo-fallback .seo-play-btn:hover { background: #3a9a3a; }
.seo-fallback .seo-notice {
    margin-top: 4px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
}
.seo-fallback .seo-notice a { color: rgba(255,255,255,0.6); }
.seo-fallback .seo-notice a:hover { color: #fff; }
.seo-fallback .seo-nav {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.seo-fallback .seo-nav a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; }
.seo-fallback .seo-nav a:hover { color: #fff; text-decoration: underline; }
.seo-fallback .seo-copy { margin-top: 12px; font-size: 0.8rem; color: rgba(255,255,255,0.35); }

/* Save Reminder Modal */
.save-reminder-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center;
    justify-content: center; z-index: 9999; animation: fadeIn 0.2s ease;
}
.save-reminder-box {
    position: relative;
    background: #faf8f2; border: 3px solid #c8b888; border-radius: 12px;
    padding: 28px 32px; text-align: center; max-width: 340px; width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.save-reminder-x {
    position: absolute; top: 8px; right: 12px;
    background: none; border: none; font-size: 22px; color: #8a7a5a;
    cursor: pointer; line-height: 1;
}
.save-reminder-x:hover { color: #3a3020; }
.save-reminder-icon {
    font-size: 36px; margin-bottom: 8px;
}
.save-reminder-box h3 {
    font-family: "Fredoka", sans-serif; font-size: 20px; color: #3a3020;
    margin: 0 0 12px;
}
.save-reminder-box p {
    font-size: 14px; color: #5a5040; line-height: 1.5; margin: 0 0 10px;
}
.save-reminder-hint {
    font-size: 13px !important; color: #8a7a5a !important;
}
.save-reminder-buttons {
    display: flex; gap: 10px; justify-content: center; margin: 18px 0 14px;
}
.save-reminder-save-btn {
    background: #3a8a3f; color: #fff; border: none; border-radius: 6px;
    padding: 10px 24px; font-family: "Fredoka", sans-serif; font-size: 14px;
    cursor: pointer;
}
.save-reminder-save-btn:hover { background: #2e7a33; }
.save-reminder-later-btn {
    background: #e8e4dc; color: #3a3020; border: 1px solid #c8b888;
    border-radius: 6px; padding: 10px 24px; font-family: "Fredoka", sans-serif;
    font-size: 14px; cursor: pointer;
}
.save-reminder-later-btn:hover { background: #d4cfc5; }
.save-reminder-dismiss {
    font-size: 12px; color: #8a7a5a; cursor: pointer; display: inline-flex;
    align-items: center; gap: 6px;
}
.save-reminder-dismiss input { margin: 0; cursor: pointer; }

/* Contact Form */
.contact-form {
    max-width: 480px; margin: 20px 0 0;
}
.contact-form label {
    display: block; font-family: "Fredoka", sans-serif; font-size: 14px;
    font-weight: 500; color: rgba(255,255,255,0.7); margin: 18px 0 6px;
    text-align: left;
}
.contact-form label:first-of-type { margin-top: 0; }
.contact-form input,
.contact-form textarea {
    display: block; width: 100%; padding: 12px 14px;
    border: 2px solid rgba(255,255,255,0.15); border-radius: 8px;
    font-family: inherit; font-size: 15px; color: #fff;
    background: rgba(255,255,255,0.08); box-sizing: border-box; resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255,255,255,0.35);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none; border-color: rgba(138,191,106,0.6);
    background: rgba(255,255,255,0.12);
}
.contact-form button[type="submit"] {
    display: block; margin-top: 20px; width: 100%; padding: 14px;
    background: #3a8a3f; color: #fff; border: none; border-radius: 8px;
    font-family: "Fredoka", sans-serif; font-size: 16px; cursor: pointer;
    transition: background 0.15s;
}
.contact-form button[type="submit"]:hover { background: #2e7a33; }
.contact-form button[type="submit"]:disabled { background: #555; cursor: default; }
.contact-status {
    font-size: 14px; margin-top: 12px; min-height: 20px; text-align: center;
}
.contact-status.success { color: #8abf6a; }
.contact-status.error { color: #f77; }

/* Gallery item detail modal */
.gallery-item-detail-body {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
}
.gallery-item-detail-preview {
    image-rendering: pixelated;
    background: #e8e4d4;
    border: 2px solid #d4c89a;
    border-radius: 8px;
    flex-shrink: 0;
}
.gallery-item-detail-info {
    flex: 1;
    min-width: 0;
}
.gallery-item-detail-name {
    font-size: 20px;
    font-weight: 700;
    color: #3a3020;
    margin-bottom: 4px;
}
.gallery-item-detail-desc {
    font-style: italic;
    color: #8a7a5a;
    font-size: 14px;
    margin-bottom: 16px;
}
.gallery-item-detail-stats {
    background: #fff;
    border: 2px solid #d4c89a;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.gallery-item-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    padding: 4px 0;
}
.gallery-item-stat-label {
    font-weight: 600;
    color: #3a3020;
}
.gallery-item-stat-value {
    font-weight: 600;
}
.gallery-item-rarity-value {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}
.gallery-item-bell-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #daa520, #f0c040);
    color: #3a2800;
    border: 2px solid #c89a10;
    border-radius: 8px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.gallery-item-bell-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}
.gallery-item-bell-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.gallery-item-tracking-label {
    text-align: center;
    color: #5a9a3a;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 0;
}
.gallery-item-untrack-btn {
    display: block;
    margin: 4px auto 0;
    background: none;
    border: none;
    color: #8a7a5a;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

/* Overlay body layout: content + shared ad sidebar */
.overlay-body-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.overlay-body-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.overlay-ad-sidebar {
    width: 400px;
    flex-shrink: 0;
    padding: 16px 16px 16px 0;
    display: none;
    overflow-y: auto;
}
.overlay-ad-sidebar.visible {
    display: block;
}
@media (max-width: 999px) {
    .overlay-ad-sidebar { display: none !important; }
}
.overlay-sidebar-inner {
    position: sticky;
    top: 0;
}
.overlay-sidebar-slot {
    margin: 0 auto 16px;
    min-height: 10px;
    text-align: center;
}
#overlay-sidebar-ad-2 {
    display: none;
}
#overlay-sidebar-ad-2.active {
    display: block;
}

/* Corner video ad — fixed bottom-right */
#corner-ad {
    display: none;
    position: fixed;
    bottom: 12px;
    right: 12px;
    width: 400px;
    height: 225px;
    z-index: 90;
    overflow: visible;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
#corner-ad.active {
    display: block;
}
#corner-ad-close {
    position: absolute;
    top: -32px;
    right: 0;
    width: 28px;
    height: 28px;
    background: #333;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 91;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
#corner-ad-close:hover {
    background: #c00;
}
@media (max-width: 1199px) {
    #corner-ad, .cnx-player-wrapper, [id^="cnx-"] { display: none !important; }
}


