/* --------------------------
    GLOBAL STYLES
    -------------------------- */

:root {
    --bg: #0d1120;
    --accentl: #b6bbf5;
    --accent: #4b5499;
    --accent2: #303c6c;
    --accent3: #151b33;
    --white: #fff;
    --ring: var(--accent2);
    --menu-radius: 150px;
    --menu-stage-scale: 1;

    --button-size: 100px;
    --button-gap: 20px;
    --ring-rotation-duration: 60s;
    --card-scale: 0.875;

    --overlay-transition: 3000ms;
    --card-gap: 12px;
    --max-columns: 5;

    --color-0: #00000000;
    --color-1: #0BA0A7;
    --color-2: #6569FF;
    --color-3: #C894F9;
    --color-4: #FE446B;
    --color-5: #8AFFB1;
    --color-6: #151B33;
    --color-7: #FF725E;
    --color-8: #F450B3;
    --color-9: #6CC0FF;
    --color-10: #FFFFFF;
    --color-11: #ffcf70;
    --color-12: #86a3ff;
    --color-13: #9fe551;
    --color-14: #ff8d57;
    --color-15: #432cae;
}

@font-face {
    font-family: 'Righteous';
    font-weight: 800;
    font-display: swap;
    src: url(fonts/Righteous-Regular.woff) format('woff');
}

@font-face {
    font-family: 'Genotheta';
    font-weight: 800;
    font-display: swap;
    src: url(fonts/GENOTHETAEX.ttf) format('truetype');
}

@font-face {
    font-family: 'starstroke';
    font-weight: 800;
    font-display: swap;
    src: url(fonts/starstroke.ttf) format('truetype');
}


* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--white);
    font-family: 'Righteous', 'Ubuntu', verdana, sans-serif;
    overscroll-behavior: none;
}

.app {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    position: fixed;
    inset: 0;
    overflow: hidden;
    touch-action: none;
}

/* Main menu stage */
.menu-stage {
    position: relative;
    width: 520px;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    transition: filter 0.5s, transform 0.5s cubic-bezier(.2, .9, .2, 1);
}

.menu-stage,
.menu-stage * {
    .menu-subtitle {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%) rotate(0deg);
        white-space: nowrap;
        font-size: 16px;
        color: var(--white);
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
        font-family: 'Righteous', 'Ubuntu', verdana, sans-serif;
        pointer-events: none;
    }

    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}


.menu-stage.blur {
    filter: blur(0.5rem);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: none;
}

::-webkit-scrollbar-thumb {
    background: var(--accent2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent2);
}

/* Rings */
.ring {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 0;
    pointer-events: none;
}

.orbit-visual {
    position: absolute;
    border-radius: 50%;
    border: 3px solid var(--ring);
    box-shadow: 0 0 12px var(--ring) inset;
    /* pointer-events: none; */
    pointer-events: auto;
    z-index: -1;
    transform-origin: center center;
    transition:
        transform 0.5s cubic-bezier(.2, .9, .2, 1),
        opacity 0.6s ease;
}

@keyframes orbitPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.6;
    }
}

.orbit-visual.pulse {
    animation: orbitPulse 6s ease-in-out infinite;
}

/* Menu buttons */
.menu-button {
    --size: var(--button-size);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    transition: transform 50ms, opacity 300ms, box-shadow 0.2s;
    user-select: none;
    font-weight: 700;
    color: #111;
    margin: auto;
    border: 0px;
    z-index: 12;
    pointer-events: auto;
}

.menu-button:hover {
    box-shadow: 0 0 50px var(--glow, rgba(255, 255, 255, 0.75));
}

.menu-button .label-number {
    font-size: 18px
}

.menu-button .label-name {
    display: block;
    font-size: 11px;
    opacity: .85
}

.menu-button {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
}

.menu-thumb {
    width: 60%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-bottom: 6px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4) inset;
}

.menu-button .inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-thumb-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    scale: 1.1375;
}

.menu-center-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    /* pointer-events: none; */
    z-index: 20;
    font-family: 'Righteous', 'Ubuntu', verdana, sans-serif;
}

.menu-logo {
    max-width: 200px;
    pointer-events: auto;
    transition: transform 0.1s ease-in-out;
    cursor: pointer;
}

.menu-logo:hover {
    transform: scale(1.05);
}

.ring {
    animation: none !important;
}

.menu-button .inner {
    animation: none !important;
}

.menu-button {
    will-change: transform;
    transform: translateZ(0);
}



/* Expander circle */
.expander {
    position: fixed;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 60;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: transform var(--overlay-transition) cubic-bezier(.2, .9, .2, 1), opacity var(--overlay-transition)
}

/* content view */
.content-view {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 36px;
    gap: 18px;
    align-items: stretch;
    justify-content: flex-start;
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: color-mix(in srgb, var(--bg) 50%, transparent);
    box-shadow: 30px color-mix(in srgb, var(--bg) 50%, transparent);
    transform: scale(0);
    transition: opacity 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 300ms;
}

.content-view.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.content-header {
    gap: 12px;
    align-items: center
}

.content-title {
    font-size: 24px;
    font-weight: 700
}

.content-sub {
    color: color-mix(in srgb, var(--accentl) 75%, transparent)
}

.content-title.separator {
    font-size: 18px;
    margin-top: -50px;
}

.content-sub.separator {
    font-size: 14px;
}

.card-separator {
    margin-bottom: 50px;
}

.hidden {
    display: none;
}


/* Cards */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: var(--card-gap);
    margin-bottom: 80px;
    flex: 0 0 auto;
}

.card {
    background: color-mix(in srgb, var(--accent2) 40%, transparent);
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    width: calc(250px * var(--card-scale));
    height: calc(310px * var(--card-scale));
    margin: 0;
    display: flex;
    flex-direction: column;
    transition: transform 150ms, opacity 100ms, filter 100ms;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(2rem);
    box-shadow: inset 0 0 30px color-mix(in srgb, var(--accent2) 50%, transparent);
    flex-shrink: 0;
}

.card:hover {
    transform: scale(1.075);
}

.card .thumb {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    margin: 0 auto 8px auto;
    display: block;
}

.card .card-text {
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    flex: 0 0 auto;
    max-height: 60px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card .card-text strong {
    display: block;
    font-size: calc(16px * var(--card-scale));
    /* margin-bottom: calc(4px * var(--card-scale)); */
}

.card .card-text .excerpt,
.card .card-text small {
    font-size: calc(12px * var(--card-scale));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: color-mix(in srgb, var(--accentl) 75%, transparent)
}

.card .card-text.full {
    flex: 1;
    max-height: none;
    padding: 1rem;
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    flex-direction: column;
    align-content: center;
}

.card[data-link="true"] {
    background: color-mix(in srgb, var(--bg) 60%, transparent);
    cursor: pointer;
    border: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);

    .card-text {
        background: color-mix(in srgb, var(--accent2) 50%, transparent);
        mix-blend-mode: screen;
    }
}

.card[data-link="true"]::after {
    content: url("data:image/svg+xml,%3Csvg fill='%23ffffff' width='20px' height='20px' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.293,20.707a1,1,0,0,1,0-1.414L17.586,5H12a1,1,0,0,1,0-2h8a1,1,0,0,1,1,1v8a1,1,0,0,1-2,0V6.414L4.707,20.707a1,1,0,0,1-1.414,0Z'/%3E%3C/svg%3E%0A");
    position: absolute;
    top: 6px;
    right: 16px;
    font-size: 30px;
    opacity: 0.7;
}

.card[data-noclick="true"] {
    background: color-mix(in srgb, var(--bg) 60%, transparent);
    cursor: auto;
    border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);

    .card-text {
        background: transparent;
        max-height: 100%;
        flex-wrap: wrap;

        .excerpt,
        small {
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
        }
    }
}

.card[data-noclick="true"] .card-text .excerpt,
.card.focused .card-text .excerpt {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.card[data-noclick="true"]:hover {
    transform: scale(1)
}

.card .menu-button {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
    transform: scale(1.2);
}

.card[data-link="true"] .menu-button {
    border-radius: 5px;
    box-shadow: none;
    overflow: hidden;
}

.card[data-link="true"]:has(.menu-button) {
    background: transparent;
    backdrop-filter: blur(0.5rem);
}

.card[data-link="true"]:has(.menu-button)::after {
    content: none;
}

.menu-button.bubble {
    width: 140px;
    height: 140px;
    position: absolute;
    bottom: -65px;
    z-index: 2;
}

@media (max-width:770px) {
    .menu-button.bubble {
        width: 95px;
        height: 95px;
        position: absolute;
        bottom: -50px;
        z-index: 2;
    }
}

@keyframes bubbleFloat {

    0%,
    100% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.2);
    }
}

.card[data-link="true"] .menu-button {
    animation: bubbleFloat 3s ease-in-out infinite;
}





/* Detail view */
.panel {
    flex: 1;
    display: flex;
    gap: 18px
}

.panel-left {
    min-width: 200px;
    max-width: 200px;
    transition: transform 400ms, opacity 300ms
}

.panel-right {
    flex: 1;
    background: color-mix(in srgb, var(--accent2) 30%, transparent);
    border-radius: 10px;
    padding: 16px;
    max-width: 1100px;
    min-height: 220px;
    overflow: auto;
    backdrop-filter: blur(2rem);
}

/* Detail area for text n stuff*/
#detailArea,
#detailArea small,
#detailArea details {
    color: color-mix(in srgb, var(--accentl) 75%, transparent);
}

details[open] {
    background: color-mix(in srgb, var(--bg) 60%, transparent);
    padding: 12px;
}

#detailArea * {
    color: var(--white);
}

#detailArea li {
    color: color-mix(in srgb, var(--accentl) 75%, transparent);
}

#detailArea img {
    display: block;
    margin: auto;
    max-width: 60%;
    max-height: 60%;
    border-radius: 10px;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease-out;
}

#detailArea img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

hr {
    border: none;
    border-top: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);
    margin: 12px 0;
}

a,
a:link,
a:visited,
a:hover,
a:active {
    color: var(--white) !important;
    opacity: 1;
    text-decoration: underline;
    transition: color 0.2s, opacity 0.2s;
}

a[data-open-card] {
    cursor: pointer;
    text-decoration: underline;
}

#detailArea .imgContainer {
    container-name: imgContainer;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 12px 16px;
    scroll-behavior: smooth;
    max-width: 100%;
    box-sizing: border-box;
}

#detailArea .imgContainer img {
    flex: 0 0 auto;
    max-width: 30%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    user-select: none;
    pointer-events: auto;
    transition: transform 0.2s ease;
}

/* Caption overlay */
#detailArea .imgContainer img[data-caption]::after {
    content: attr(data-caption);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -18px;
    /* adjust distance below image */
    font-size: 13px;
    color: var(--accentl);
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.8;
}

#instaCard iframe {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    font-family: 'Righteous', 'Ubuntu', verdana, sans-serif;
}




/* On-focus */
.card.focused {
    transform: translateX(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    height: 100%;
    width: 100%;
    cursor: auto;
}

.card.focused .card-text {
    max-height: 100%;
}

.card.focused .card-text strong {
    font-size: 16px;
    /* margin-bottom: 4px; */
}

.card.focused .card-text .excerpt,
.card.focused .card-text small {
    font-size: 12px;
    white-space: normal;
}

.card.focused .thumb {
    width: 100%;
}

.cards-grid.hidden .card {
    opacity: 0;
    transform: scale(.92);
    pointer-events: none
}

.copy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s;
}

.copy-link:hover {
    opacity: 1;
}

.copy-link svg {
    width: 16px;
    height: 16px;
    stroke: var(--accentl);
    stroke-width: 2;
    transition: stroke 0.3s ease, transform 0.2s ease;
}

.copy-link.copied svg {
    stroke: var(--color-5);
    transform: scale(1.2) rotate(45deg);
}

#searchBox {
    border: none;
    border-radius: 20px;
    padding: 0;
    background: color-mix(in srgb, var(--accent3) 50%, transparent);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    color: var(--white);
    width: min(90%, 420px);
    max-width: 420px;
    animation: fadeInDialog 0.1s ease-out;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#searchBox[open] {
    opacity: 1;
    transform: scale(1);
}

#searchBox::backdrop {
    background: color-mix(in srgb, var(--bg) 50%, transparent);
}

#searchForm {
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    text-align: center;
}

#searchForm h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accentl);
    margin-bottom: 4px;
}

#searchText {
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    border: 2px solid var(--accent2);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 1rem;
    color: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#searchText:focus {
    border-color: var(--accent);
}

/* Buttons */
.form-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

#searchForm button,
#detailArea button {
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 1rem;
    font-family: 'Righteous', 'Ubuntu', verdana, sans-serif;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

#searchForm button:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

#detailArea button:hover {
    transform: scale(1.05);
}

#searchForm button[type="button"] {
    background: color-mix(in srgb, var(--accent2) 50%, transparent);
}

@keyframes fadeInDialog {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


.focused-layout {
    /* height: 100%;
    position: absolute; */
    height: 100vh;
    position: fixed;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding-top: 72px;
    padding-bottom: 90px;
    padding-left: 50px;
    padding-right: 50px;
    overflow-y: auto;
    background: color-mix(in srgb, var(--bg) 50%, transparent);
}

.focused-layout .panel-left {
    transform: translateX(0)
}

/* Back button */
.ui-btn {
    background: var(--white);
    color: var(--bg);
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    transition: opacity 300ms, transform 100ms;
    font-family: 'Righteous', 'Ubuntu', verdana, sans-serif;
}

.ui-btn:hover {
    transform: scale(1.15);
}

.back-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    opacity: 0;
    pointer-events: none;
}

.back-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-btn svg {
    width: 18px;
    height: 18px
}

.center-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    opacity: 1;
}

.center-btn.hide {
    opacity: 0;
    pointer-events: none;
}

.reroll-btn-top {
    position: fixed;
    right: 190px;
    bottom: 30px;
    opacity: 0;
    pointer-events: none;
}

.reroll-btn-top.visible {
    opacity: 1;
    pointer-events: auto;
}



textarea {
    width: 100%;
    min-height: 100px;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    border: 2px solid var(--accent2);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 1rem;
    color: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Righteous', 'Ubuntu', verdana, sans-serif;
    resize: vertical;
}


/* Keyboard Layout Styles */
.keyboardLayout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 5px;
    margin-top: 10px;
    padding: 12px;
    background: color-mix(in srgb, var(--accent2) 30%, transparent);
    border-radius: 12px;
    backdrop-filter: blur(1rem);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

#detailArea .keycap {
    background: var(--accent3);
    border: 2px solid var(--accent2);
    border-radius: 10%;
    color: var(--white);
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    min-width: 35px;
    user-select: none;
}

#detailArea .keycap:hover {
    background: color-mix(in srgb, var(--accent2) 60%, transparent);
    transform: translateY(2px);
}

#detailArea .keycap:active {
    transform: translateY(5px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Genotheta font styling */
#detailArea .genotheta {
    font-family: 'Genotheta', 'Righteous', 'Ubuntu', verdana, sans-serif;
    font-size: 2rem;
}

textarea#genothetaOutput,
textarea#genothetaOutputEx {
    font-family: 'Genotheta', 'Righteous', 'Ubuntu', verdana, sans-serif;
    font-size: 2rem;
}

#detailArea .starstroke {
    font-family: 'starstroke', 'Righteous', 'Ubuntu', verdana, sans-serif;
    font-size: 2rem;
}

textarea#starstrokeOutput {
    font-family: 'starstroke', 'Righteous', 'Ubuntu', verdana, sans-serif;
    font-size: 1.5rem;
}




/* Image preview */
.img-preview-overlay {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.img-preview-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.img-preview-overlay img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    cursor: zoom-out;
    transition: transform 0.3s ease;
}

.img-preview-overlay img[data-hasCaption="true"] {
    max-width: 80%;
    max-height: 80%;
}

.img-preview-overlay img:hover {
    transform: scale(1.01);
}


/* General fade-in transition */
.lazy,
.lazy-bg {
    opacity: 0;
    transition: opacity 0.2s ease-out;
    background-size: cover;
    background-position: center;
}

/* Active (after loaded) */
.lazy.loaded,
.lazy-bg.loaded {
    opacity: 1;
}

/* Optional: size hints to prevent layout shift */
.lazy {
    display: block;
}

/* Background-image elements */
.lazy-bg {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    /* make ::before fit properly */
}

/* Placeholder overlay */
.lazy-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(21, 27, 51, 0.5);
    /* <-- your solid placeholder */
    opacity: 1;
    transition: opacity 0.2s ease;
    z-index: 1;
}

/* When loaded, fade out the placeholder */
.lazy-bg.loaded::before {
    opacity: 0;
    pointer-events: none;
}


.menu-button.bubble .menu-thumb,
.menu-button.bubble .lazy-bg {
    position: absolute;
    inset: 0;
    /* fills the entire bubble */
    width: 100%;
    height: 100%;
    border-radius: inherit;
    /* keeps same corner shape as bubble */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    box-shadow: none;
}


/* Ensure card detail images fade in properly */
#detailArea img.lazy {
    opacity: 0;
    /* start hidden */
    display: block;
}

#detailArea img.lazy.loaded {
    opacity: 1;
}



/* small screens adjustments */
@media (max-width:770px) {
    .menu-stage {
        width: 360px;
        height: 360px
    }

    :root {
        /*
        --menu-radius: 100px;
        --button-size: 80px;
        */
        --menu-stage-scale: 0.75;
        --card-scale: 0.62;
        --card-gap: 10px;
    }

    .card .card-text {
        margin-top: -2px;
    }

    .content-view {
        padding-left: 6px;
        padding-right: 6px;
    }

    .content-header {
        padding-left: 36px;
        padding-right: 36px;
    }

    .panel-left {
        max-width: 100%;
        margin: 12px;
        margin-top: -50px;
        /*
        align-self: start;
        margin-left: 30px;
        margin-bottom: 12px;
        */
    }

    .panel-right {
        min-height: 320px;
        margin-bottom: 60px;
    }

    .focused-layout {
        display: flex;
        flex-direction: column;
        padding-top: 72px;
        padding-bottom: 48px;
        padding-left: 0px;
        padding-right: 0px;

        img {
            max-width: 100%;
            border-radius: 10px;
            margin-top: 12px;
            padding: 0px;
        }
    }

    #detailArea img {
        max-width: 80%;
        max-height: 80%;
    }

    #detailArea .imgContainer {
        gap: 4px;
    }

    #detailArea .imgContainer img {
        max-width: 45%;
    }

    .card.focused {
        width: 100% !important;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        padding: 12px;
    }

    .card.focused .thumb {
        width: 20%;
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: 10px;
        margin: 0;
        flex-shrink: 0;
    }

    .card.focused .card-text {
        width: 50%;
        padding-left: 12px;
        background: transparent;
        flex: 1;
        text-align: left;
        max-height: none;
    }

    .card.focused .card-text strong {
        font-size: 20px;
    }

    .card.focused .card-text .excerpt {
        font-size: 14px;
        white-space: normal;
    }

}

/* Stars*/
.starfield {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.star-layer {
    position: absolute;
    inset: 0;
}

.star {
    position: absolute;
    background: var(--accent2);
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle 3s infinite ease-in-out;
}

.starfield.blur {
    filter: blur(0.25rem);
}


@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.75);
    }

    50% {
        opacity: 1;
        transform: scale(2);
    }
}


.splash-text {
    position: absolute;
    top: 70%;
    left: 50%;
    font-size: 16px;
    font-weight: 800;
    color: var(--white);
    text-shadow: 2px 2px 0 var(--bg);
    white-space: nowrap;
    z-index: 10;
    transition: opacity 1s;
}

.splash-text[data-info="info"] {
    color: color-mix(in srgb, var(--accentl) 75%, transparent);
    position: absolute;
    top: 115%;
    left: 50%;
    font-size: 12px;
    transform: translate(-50%, 50%);
}

.splash-text[data-info="splash"] {
    position: absolute;
    top: 95%;
    left: 50%;
    animation: floatSplash 1s ease-in-out infinite alternate;
}

/* Floating animation */
@keyframes floatSplash {
    0% {
        transform: translate(-50%, 50%);
    }

    100% {
        transform: translate(-50%, 55%);
    }
}

.ticker-bar {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 2em;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    color: var(--white);
    font-size: 1.1em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding-left: 0.5em;
    box-sizing: border-box;
}

.ticker-text {
    position: absolute;
    white-space: nowrap;
    will-change: transform;
    animation-timing-function: linear;
}

.notFound {
    animation: shakeV 5s ease-in-out infinite;
}

@keyframes shakeV {

    0%,
    100% {
        transform: translateY(0);
    }

    25%,
    75% {
        transform: translateY(-5px);
    }

    50% {
        transform: translateY(5px);
    }
}