/* ===================================================================
   Ducktopia 2.x  |  NetDynamic.Net
   Mobile-first. On desktop the app stays in a centered phone-width frame.
   =================================================================== */

:root {
    --c-blue:      #5bc0de;   /* primary - matches legacy sky blue */
    --c-blue-dark: #4a6fa5;   /* darker accent (legacy recent_ducks header) */
    --c-teal:      #4dcfca;
    --c-yellow:    #ffc058;
    --c-coral:     #fe7a7e;   /* used for the Donate CTA only */
    --c-purple:    #a0a0ff;
    --c-bg:        #f5f7fb;
    --c-card:      #ffffff;
    --c-line:      #e5ebf2;
    --c-text:      #1f2937;
    --c-muted:     #66748a;
    --c-danger:    #dc3545;
    --c-success:   #28a745;
    --frame-max:   480px;
    --shadow-sm:   0 1px 3px rgba(40,80,160,0.08);
    --shadow-md:   0 6px 18px rgba(40,80,160,0.10);
    --shadow-lg:   0 16px 40px rgba(40,80,160,0.22);
    --radius:      14px;
    --radius-sm:   8px;
}

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

html, body { height: 100%; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--c-text);
    background:
        radial-gradient(1200px 800px at 10% -10%, rgba(91,192,222,0.22), transparent 60%),
        radial-gradient(900px 700px at 110% 10%, rgba(77,207,202,0.20), transparent 60%),
        linear-gradient(180deg, #eaf2f8 0%, #dde8f1 100%);
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    line-height: 1.45;
}

/* -------- Phone frame (desktop visual) ------------------------------- */
.device-frame {
    max-width: var(--frame-max);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--c-bg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

@media (min-width: 600px) {
    body { padding: 24px 0; }
    .device-frame {
        min-height: calc(100vh - 48px);
        border-radius: 24px;
        overflow: hidden;
    }
}

/* -------- Main / footer --------------------------------------------- */
.app-main { flex: 1; padding: 0 0 24px; }
/* Most content sections want side padding except full-bleed media (hero, banner). */
.app-main > *:not(.bleed) { margin-left: 14px; margin-right: 14px; }
.app-main > .bleed:first-child { margin-top: 0; }

/* Floating admin badge over the hero / banner */
.admin-corner-badge {
    position: absolute;
    top: 8px; right: 8px;
    background: #d6212f;
    color: #fff;
    font-size: 11px; font-weight: 800;
    padding: 5px 10px; border-radius: 999px;
    letter-spacing: .12em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
    text-decoration: none;
    user-select: none;
}
a.admin-corner-badge:hover { background: #b51823; }
span.admin-corner-badge { cursor: default; }

/* Slim page header (used on pages without a hero) */
.page-header {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--c-blue), var(--c-blue-dark));
    color: #fff;
    margin: 0 0 12px;
    box-shadow: var(--shadow-sm);
}
.page-header .home-corner-btn { position: static; flex-shrink: 0; }
.page-header h1 {
    font-size: 17px; font-weight: 700; line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    flex: 1; margin: 0;
}

/* Floating home button on top-left of hero / banner */
.home-corner-btn {
    position: absolute;
    top: 8px; left: 8px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.40);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    font-size: 18px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: background .12s, transform .08s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.home-corner-btn:hover { background: rgba(0,0,0,0.65); }
.home-corner-btn:active { transform: scale(0.94); }
.app-footer {
    padding: 12px 16px 18px;
    border-top: 1px solid var(--c-line);
    background: #fafafd;
}
.footer-links {
    display: flex; flex-wrap: wrap; gap: 10px 14px;
    justify-content: center;
    margin-bottom: 8px;
}
.footer-links a {
    color: var(--c-muted); text-decoration: none;
    font-size: 13px; font-weight: 500;
}
.footer-links a:hover { color: var(--c-blue-dark); }
.footer-credit {
    text-align: center; font-size: 11px; color: var(--c-muted);
}
.footer-credit a { color: var(--c-blue-dark); text-decoration: none; }

/* -------- Cards ----------------------------------------------------- */
.card {
    background: var(--c-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 14px;
}
.card-title {
    font-size: 13px; font-weight: 700;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 10px;
    display: flex; align-items: center; justify-content: space-between;
}
.card-title .more {
    font-size: 12px; color: var(--c-blue-dark);
    text-decoration: none; text-transform: none; letter-spacing: 0;
    font-weight: 600;
}

/* -------- Hero (home banner) - full-bleed, image at natural ratio ---- */
.hero {
    position: relative;
    margin: 0 0 14px;
    background: transparent;
}
.hero img { width: 100%; height: auto; display: block; }

/* -------- Search ---------------------------------------------------- */
.search-card { padding: 10px; }
.search-wrap { position: relative; }
.search-wrap input {
    width: 100%;
    padding: 14px 40px 14px 44px;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    font-size: 16px;
    background: #fafafd url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c6c75' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 14px center;
    background-size: 18px 18px;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.search-wrap input:focus {
    border-color: var(--c-blue);
    box-shadow: 0 0 0 3px rgba(91,192,222,0.25);
}
.search-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    border: none; background: transparent; font-size: 22px; color: var(--c-muted);
    cursor: pointer; line-height: 1; padding: 4px;
}
#suggestions {
    margin-top: 8px;
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
#suggestions:empty { display: none; }
.suggestion-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--c-line);
    text-decoration: none;
    color: var(--c-text);
    font-weight: 500;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: #fafafd; }

/* -------- Donate button (kept warm to stand out against the blue) ---- */
.donate {
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    flex-wrap: nowrap; white-space: nowrap;
    background: linear-gradient(135deg, #d65068, #9b2e4a);
    color: #fff; text-decoration: none;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-weight: 600; font-size: 12px;
    letter-spacing: .8px;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0,0,0,0.18);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    box-shadow: 0 8px 18px rgba(254,122,126,0.40);
    margin-bottom: 14px;
    transition: transform .15s ease, box-shadow .15s ease;
    animation: donatePulse 2.4s ease-in-out infinite;
    will-change: transform, box-shadow;
}
@media (max-width: 360px) {
    .donate { font-size: 11px; padding: 11px 10px; gap: 6px; letter-spacing: .4px; }
}
.donate:hover, .donate:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 26px rgba(254,122,126,0.55);
    animation-play-state: paused;
}
.donate .icon { font-size: 16px; display: inline-block; line-height: 1; }
.donate .icon-right { animation: donateBob 1.6s ease-in-out infinite; transform-origin: 50% 70%; }
.donate .donate-label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; }
.donate .donate-sub {
    font-size: 9px;
    font-weight: 300;
    letter-spacing: .4px;
    text-transform: uppercase;
    opacity: .82;
    line-height: 1;
    align-self: center;
}
@media (max-width: 360px) {
    .donate .donate-sub { font-size: 8px; letter-spacing: .3px; }
}
.donate .donate-cta {
    color: #ffe14d;
    text-shadow: 0 1px 0 rgba(0,0,0,0.25);
    font-weight: 700;
    animation: donateCtaGlow 1.6s ease-in-out infinite;
}
@keyframes donateCtaGlow {
    0%, 100% { color: #ffe78a; }
    50%      { color: #ffe14d; }
}
@media (prefers-reduced-motion: reduce) {
    .donate .donate-cta { animation: none; }
}

/* Shimmer sweep across the button */
.donate .donate-shimmer {
    position: absolute;
    top: 0; left: -60%;
    width: 45%; height: 100%;
    background: linear-gradient(
        100deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.35) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-20deg);
    animation: donateShimmer 3.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes donatePulse {
    0%, 100% {
        box-shadow: 0 8px 18px rgba(254,122,126,0.40),
                    0 0 0 0 rgba(254,122,126,0.55);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 10px 22px rgba(254,122,126,0.55),
                    0 0 0 10px rgba(254,122,126,0);
        transform: translateY(-1px);
    }
}

@keyframes donateBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-2px) rotate(-8deg); }
}

@keyframes donateShimmer {
    0%   { left: -60%; }
    60%  { left: 120%; }
    100% { left: 120%; }
}

@media (prefers-reduced-motion: reduce) {
    .donate,
    .donate .icon-left,
    .donate .icon-right,
    .donate .donate-shimmer { animation: none; }
}

/* -------- Recent ducks strip ---------------------------------------- */
.recent-strip {
    display: flex; gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--c-blue) #e5ebf2;
}
.recent-strip::-webkit-scrollbar { height: 10px; }
.recent-strip::-webkit-scrollbar-track { background: #e5ebf2; border-radius: 999px; }
.recent-strip::-webkit-scrollbar-thumb {
    background: var(--c-blue);
    border-radius: 999px;
    border: 2px solid #e5ebf2;
    min-width: 40px;
}
.recent-strip::-webkit-scrollbar-thumb:hover { background: var(--c-blue-dark); }
.recent-card {
    position: relative;
    flex: 0 0 130px;
    scroll-snap-align: start;
    background: var(--c-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column;
    transition: transform .12s;
}
.recent-card:hover { transform: translateY(-2px); }
.recent-card .pic {
    width: 100%; height: 100px;
    background: #f0f0f4 center/cover no-repeat;
    border: none; padding: 0; margin: 0;
    cursor: zoom-in;
    display: block;
}
.recent-card .pic:focus-visible { outline: 2px solid var(--c-blue); outline-offset: -2px; }
.recent-visit {
    position: absolute;
    bottom: 4px; right: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 2px 6px;
    font-size: 8px; font-weight: 700; line-height: 1.2;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffcb45, #f5a300);
    color: #4a2c00;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.recent-visit:hover { filter: brightness(.95); }
.recent-card .meta {
    padding: 8px 10px;
}
.recent-card .label {
    font-weight: 600; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recent-card .owner {
    font-size: 11px; color: var(--c-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 2px;
}
.recent-card .type-tag {
    display: inline-block;
    font-size: 10px; font-weight: 700;
    padding: 1px 6px; border-radius: 999px;
    background: var(--c-blue); color: #fff;
    margin-top: 4px;
    text-transform: capitalize;
}
.recent-card .type-tag.virtual { background: var(--c-purple); }
.recent-card .type-tag.super   { background: var(--c-yellow); color: #563d00; }
.recent-card .type-tag.actual  { background: var(--c-teal); }

/* -------- Latest VIPs vertical feed (home page) -------------------- */
.vip-feed { display: flex; flex-direction: column; gap: 10px; }
.vip-post {
    position: relative;
    display: flex; gap: 12px;
    background: #fffdf3;
    border: 1px solid #f3e3a8;
    border-radius: var(--radius-sm);
    padding: 10px;
    padding-bottom: 14px;
    text-decoration: none; color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform .12s, box-shadow .12s;
}
.vip-post:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(245,163,0,.18); }
.vip-thumb {
    position: relative;
    flex: 0 0 84px;
    width: 84px; height: 84px;
    background: #f0f0f4 center/cover no-repeat;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 0 0 2px #f5b800 inset;
    border: none;
    padding: 0;
    cursor: zoom-in;
    transition: transform .12s, box-shadow .12s;
}
.vip-thumb:hover, .vip-thumb:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 0 0 2px #f5b800 inset, 0 6px 14px rgba(245,163,0,.25);
    outline: none;
}
.vip-thumb .vip-tag {
    position: absolute; top: 4px; left: 4px;
    background: linear-gradient(135deg, #ffcb45, #f5a300);
    color: #4a2c00; font-weight: 800; font-size: 10px;
    padding: 1px 6px; border-radius: 999px;
    letter-spacing: .5px;
}
.vip-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vip-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
    font-size: 12px;
}
.vip-owner {
    font-weight: 700; color: var(--c-blue-dark);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vip-time { color: var(--c-muted); font-size: 11px; flex-shrink: 0; }
.vip-label {
    font-weight: 700; font-size: 15px; line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.vip-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    font-size: 11px; color: var(--c-muted); margin-top: 2px;
}
.vip-meta .type-tag {
    display: inline-block; font-weight: 700;
    padding: 1px 6px; border-radius: 999px;
    background: var(--c-blue); color: #fff; text-transform: capitalize;
}
.vip-meta .type-tag.virtual { background: var(--c-purple); }
.vip-meta .type-tag.super   { background: var(--c-yellow); color: #563d00; }
.vip-meta .type-tag.actual  { background: var(--c-teal); }
.vip-acq { color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.vip-visit {
    position: absolute;
    bottom: 4px; right: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 2px 6px;
    font-size: 8px; font-weight: 700; line-height: 1.2;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffcb45, #f5a300);
    color: #4a2c00;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.vip-visit:hover { filter: brightness(.95); }
@media (max-width: 360px) {
    .vip-thumb { flex: 0 0 68px; width: 68px; height: 68px; }
    .vip-label { font-size: 14px; }
}

/* -------- Bulletin posts -------------------------------------------- */
.post {
    background: var(--c-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}
.post-img {
    width: 100%; height: auto;
    display: block; cursor: zoom-in;
}
.post-body { padding: 12px 14px; }
.post-date {
    font-size: 11px; color: var(--c-muted);
    margin-bottom: 6px;
}
.post-text {
    font-size: 14px; color: var(--c-text);
    white-space: pre-wrap; word-wrap: break-word;
}
.post-actions {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px 12px;
    color: var(--c-muted); font-size: 13px;
}
.post-actions .reaction-btn {
    background: #fafafd;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    color: var(--c-muted);
    transition: background .12s, color .12s;
}
.post-actions .reaction-btn:hover { background: #f0f0f4; }
.post-actions .reaction-btn.like-btn:hover { color: var(--c-success); }
.post-actions .reaction-btn.dislike-btn:hover { color: var(--c-danger); }
.post-admin-btns {
    position: absolute; top: 8px; right: 8px;
    display: flex; gap: 6px;
}

/* -------- Generic buttons ------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 16px;
    border: none; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none;
    color: #fff;
    transition: transform .08s, box-shadow .12s, opacity .12s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary   { background: var(--c-blue-dark); }
.btn-secondary { background: #6c6c75; }
.btn-success   { background: var(--c-success); }
.btn-danger    { background: var(--c-danger); }
.btn-ghost     { background: transparent; color: var(--c-muted); border: 1px solid var(--c-line); }
.btn-info      { background: var(--c-sky); }
.btn-warning   { background: var(--c-yellow); color: #563d00; }
.btn-sm        { padding: 6px 10px; font-size: 12px; }
.btn-block     { width: 100%; }

/* Stack of full-width buttons used in admin tool cards */
.admin-tools { display: flex; flex-direction: column; gap: 8px; }
.admin-tools .btn { width: 100%; }

/* -------- Forms ----------------------------------------------------- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--c-muted); margin-bottom: 4px; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px;
    background: #fff;
    outline: none;
}
.form-control:focus { border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(91,192,222,0.20); }
textarea.form-control { min-height: 100px; resize: vertical; }

.alert { padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 13px; }
.alert-success { background: #e7f5ec; color: #1d6b34; }
.alert-error   { background: #fde9eb; color: #8a1f25; }

/* -------- User detail page ------------------------------------------ */
.user-banner {
    position: relative;
    overflow: hidden;
    height: 160px;
    background: #222 center/cover no-repeat;
    margin: 0 0 12px;
    display: flex; align-items: center; justify-content: center;
    padding: 30px 20px;
}
.user-banner-name {
    color: #fff; font-weight: 900;
    text-shadow: 0 2px 6px rgba(0,0,0,0.65);
    text-align: center;
    width: 100%;
    line-height: 1.05;
    /* Fluid font sized by JS to fit width on .makefit */
    font-size: 56px;
    white-space: nowrap;
    overflow: hidden;
}

.stat-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    margin-bottom: 10px;
}
.stat-tile {
    background: var(--c-card);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 8px;
}
.stat-tile .lbl { font-size: 11px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-tile .val { font-size: 18px; font-weight: 700; }
.stat-tile.duck      { border-left: 3px solid var(--c-yellow); }
.stat-tile.star      { border-left: 3px solid var(--c-teal); }
.stat-tile.duck-rank { border-left: 3px solid var(--c-blue); }
.stat-tile.top1      { border-left: 3px solid var(--c-blue-dark); }

.big-tile {
    background: linear-gradient(135deg, var(--c-blue), var(--c-blue-dark));
    color: #fff;
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
}
.big-tile .num {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 42px; font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.18);
}
.big-tile .num img { width: 56px; height: 56px; }
.big-tile .lbl { font-size: 12px; letter-spacing: .12em; opacity: .9; text-transform: uppercase; }
.big-tile.stars { background: linear-gradient(135deg, var(--c-teal), #2bb3a8); }
.big-tile.warm  { background: linear-gradient(135deg, var(--c-yellow), #ffae3a); color:#563d00; }

.milestone-card {
    background: var(--c-card);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    border-left: 4px solid var(--c-blue);
    font-size: 13px;
}
.milestone-card .row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.milestone-card .achieved { color: var(--c-success); font-weight: 600; }
.milestone-card .needed { color: var(--c-blue-dark); font-weight: 700; }
.progress { height: 8px; background: #eef0f3; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-teal), var(--c-blue-dark)); }

/* -------- Duck carousel -------------------------------------------- */
.duck-carousel {
    display: flex; gap: 10px;
    overflow-x: auto; padding: 4px 2px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--c-blue) #e5ebf2;
}
.duck-carousel::-webkit-scrollbar { height: 10px; }
.duck-carousel::-webkit-scrollbar-track { background: #e5ebf2; border-radius: 999px; }
.duck-carousel::-webkit-scrollbar-thumb {
    background: var(--c-blue);
    border-radius: 999px;
    border: 2px solid #e5ebf2;
    min-width: 40px;
}
.duck-carousel::-webkit-scrollbar-thumb:hover { background: var(--c-blue-dark); }
.duck-tile {
    position: relative;
    flex: 0 0 38%;
    max-width: 160px;
    background: var(--c-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    text-align: center;
    display: flex; flex-direction: column;
}
.duck-tile.is-vip {
    box-shadow: 0 0 0 2px #f5b800, var(--shadow-sm);
}
.duck-tile img {
    width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block;
}
.duck-tile .ducklabel { font-size: 12px; padding: 6px 6px 8px; font-weight: 600; word-wrap: break-word; }
.duck-tile .vip-badge {
    position: absolute; top: 6px; left: 6px;
    background: linear-gradient(135deg, #ffcb45, #f5a300);
    color: #4a2c00; font-weight: 800; font-size: 10px;
    padding: 2px 6px; border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,.20);
    letter-spacing: .5px;
}
.form-check.vip-check label {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; cursor: pointer;
}
.form-check.vip-check input[type=checkbox] {
    width: 18px; height: 18px; accent-color: #f5a300;
}

/* -------- Lucky stars block --------------------------------------- */
.stars-block {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px;
}
.stars-block img { width: 50px; height: 50px; }
.stars-block .num { font-size: 38px; font-weight: 900; color: #2bb3a8; }
.stars-block .icon-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: none; color: #fff;
    font-size: 22px; font-weight: 700; cursor: pointer;
}
.stars-block .icon-btn.minus { background: var(--c-danger); }
.stars-block .icon-btn.plus  { background: var(--c-success); }

.note-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--c-line);
    display: flex; justify-content: space-between; gap: 8px; align-items: flex-start;
    font-size: 13px;
}
.note-item:last-child { border-bottom: none; }

/* -------- Duckaccess (store) - items overlay the white area of bg --- */
.duckaccess-bg {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.duckaccess-bg > img { width: 100%; display: block; }
.duckaccess-overlay {
    position: absolute;
    /* Fits inside the white area of duckaccess-bg.jpg, avoiding the star border + the headphones on the right */
    top: 22%; left: 14%; right: 22%; bottom: 24%;
    display: grid; grid-template-columns: 1fr 1fr;
    column-gap: 14px; row-gap: 1px;
    align-content: start;
}
.duckaccess-item {
    background: transparent;
    padding: 1px 0;
    font-size: 12px;
    line-height: 1.15;
    display: flex; justify-content: space-between;
    color: #1f2937;
    border-bottom: 1px dotted rgba(0,0,0,0.18);
}
.duckaccess-item .cost { font-weight: 700; color: #d6212f; margin-left: 6px; }

/* -------- Modal ----------------------------------------------------- */
.modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center; justify-content: center;
    padding: 20px;
}
.modal.open { display: flex; }
.modal-content {
    background: #fff; border-radius: var(--radius);
    width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
    position: relative;
}
.modal-close {
    position: absolute; top: 10px; right: 10px;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(0,0,0,0.5); color: #fff;
    border: none; font-size: 18px; cursor: pointer;
    z-index: 5;
}
.modal-img { width: 100%; max-height: 60vh; object-fit: contain; background: #000; display: block; }
.modal-body { padding: 14px; }
.modal-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--c-line); font-size: 13px; }
.modal-row:last-child { border-bottom: none; }
.modal-row .label { color: var(--c-muted); }

.fullscreen-img {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.9); z-index: 1000;
    align-items: center; justify-content: center;
    cursor: zoom-out;
}
.fullscreen-img.open { display: flex; }
.fullscreen-img img { max-width: 100%; max-height: 100%; }

/* -------- Advanced search (collapsed) ------------------------------- */
.adv-search summary {
    cursor: pointer; padding: 12px 14px;
    background: var(--c-card); border-radius: var(--radius-sm);
    font-weight: 600; color: var(--c-muted);
    box-shadow: var(--shadow-sm);
    list-style: none;
}
.adv-search summary::-webkit-details-marker { display: none; }
.adv-search summary::after { content: '▾'; float: right; }
.adv-search[open] summary::after { content: '▴'; }
.adv-search > .panel { padding: 12px 4px; }

.alpha-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
    margin: 10px 0;
}
.alpha-grid button {
    padding: 6px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--c-line); background: #fff;
    border-radius: var(--radius-sm); cursor: pointer;
}
.alpha-grid button:hover { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }

.search-results { background: var(--c-card); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.search-result {
    display: flex; align-items: center; padding: 10px 12px;
    border-bottom: 1px solid var(--c-line);
    font-size: 14px;
}
.search-result:last-child { border-bottom: none; }
.search-result a { color: var(--c-text); text-decoration: none; flex: 1; font-weight: 500; }
.search-result .result-index { color: var(--c-muted); font-size: 12px; margin-right: 10px; min-width: 20px; }

/* -------- Calculator inputs (admin) -------------------------------- */
.calc-row { display: flex; gap: 8px; }
.calc-row .calc-input { flex: 2; }
.calc-row .calc-modifier { flex: 1; }
.calc-input.modified-increase { background-color: #d4edda; border-color: #c3e6cb; }
.calc-input.modified-decrease { background-color: #f8d7da; border-color: #f5c6cb; }

/* -------- Misc utility ---------------------------------------------- */
.divider { height: 1px; background: var(--c-line); margin: 14px 0; }
.text-center { text-align: center; }
.text-muted { color: var(--c-muted); }
.empty-state { text-align: center; padding: 30px 20px; color: var(--c-muted); }
.empty-state h3 { margin-bottom: 6px; color: var(--c-text); }
.row-flex { display: flex; gap: 8px; }

/* -------- Voting grid (preserved from original) -------------------- */
.vote-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.vote-btn {
    background: var(--c-card); border: 1px solid var(--c-line);
    border-radius: var(--radius-sm); padding: 6px;
    cursor: pointer; text-align: center;
    font-size: 11px; font-weight: 600;
    transition: transform .08s, border-color .12s;
}
.vote-btn:hover { transform: translateY(-2px); border-color: var(--c-blue); }
.vote-btn.highlight { border-color: var(--c-blue); background: #eaf6fb; }
.vote-btn img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }

/* -------- Status modal (background-submit feedback) ----------------- */
.status-modal {
    display: none;
    position: fixed; inset: 0;
    align-items: center; justify-content: center;
    background: rgba(0,0,0,0.45);
    z-index: 3000;
    padding: 20px;
    animation: smFadeIn .12s ease-out;
}
.status-modal.open { display: flex; }
.status-modal .box {
    background: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    min-width: 220px;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    transform: translateY(0);
    animation: smPop .18s ease-out;
}
.status-modal .icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px; font-weight: 800;
}
.status-modal.success .icon { background: var(--c-success); }
.status-modal.error   .icon { background: var(--c-danger); }
.status-modal.loading .icon {
    background: var(--c-blue);
    animation: smSpin 1.1s linear infinite;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
}
.status-modal.loading .icon::before { content: ''; }
.status-modal .msg { font-weight: 600; color: var(--c-text); }
@keyframes smFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes smPop   { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes smSpin  { to { transform: rotate(360deg); } }

/* Toast kept for tiny inline confirmations */
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    padding: 10px 16px; border-radius: 999px; color: #fff;
    z-index: 2000; font-size: 13px; font-weight: 600;
    box-shadow: var(--shadow-md);
    animation: toastIn .25s ease-out, toastOut .35s ease-in 1.8s forwards;
}
.toast.success { background: var(--c-success); }
.toast.error   { background: var(--c-danger); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, -10px); } }
