/* App Reset & Mobile Lock */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body, html {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevents vertical bouncing on mobile browser */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Set background */
body {
	background-image: url("../images/overlay.png"), url("../images/bg.jpg");
	background-repeat: repeat, no-repeat;
	background-size: auto, 100% 100%;
	background-attachment: fixed;
	overflow-y: auto;
}

/* Headers */
h1 {
/*		font-size: clamp(1.2rem, 2.5vw, 2.2rem); */
        font-size: calc((100dvw + 100dvh) / 75);
        padding: 5px;
		letter-spacing: -0.015em;
		font-family: 'nasalization', sans-serif;
		color: #ffffff;
		text-shadow: 0 calc((100dvw + 100dvh) / 3000) calc((100dvw + 100dvh) / 500) #ffffffaa;
        filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
	}
h2 {
		font-size: calc((100dvw + 100dvh) / 50);
        padding: 10px;
		letter-spacing: -0.015em;
		font-family: 'nasalization', sans-serif;
		color: #ffffff;
		text-shadow: 0 calc((100dvw + 100dvh) / 3000) calc((100dvw + 100dvh) / 500) #ffffffaa;
        filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
	}
h3 {
		font-size: calc((100dvw + 100dvh) / 250);
        padding: 10px;
		letter-spacing: -0.015em;
		font-family: 'nasalization', sans-serif;
		color: #ffffff;
		text-shadow: 0 0 calc((100dvh + 100dvw) / 400) #ffffffaa;
        filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
	}



/* Horizontal Swipe Container */
.app-container {
    display: flex;
    width: 100%;
    height: calc(100dvh * 0.95); /* Leaves room for bottom nav */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory; /* Forces touch swiping to stick to tab boundaries */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.app-container::-webkit-scrollbar {
    display: none;
    height: 0;
}

@media (orientation: landscape) {
    .app-container { height: calc(100dvh * 0.9); }
}

/* Individual Tab Setup */
.tab-view {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    overflow-y: auto; /* Allows independent vertical scrolling inside a tab */
    padding: 20px;
    overflow: visible; /* Ensure shadows on child elements are not clipped */
}

#Home {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: calc(100% - 40px);
    position: relative; /* anchor for home footer */
}

/* Home swipe hint (runway style >>> on the right side)
   - Hidden at load, fades in once, then each char pulses in sequence
   - Uses a smooth fade-in for container and a staggered pulse per char
*/
.home-swipe-hint {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0; /* start hidden */
    animation: homeHintContainerAppear 4000ms ease forwards 4000ms; /* fade in after page load (slower) */
    background: transparent;
    background-image: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
    color: inherit;
    z-index: 20;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}

.home-swipe-hint:hover,
.home-swipe-hint:focus {
    outline: none;
    background: transparent;
}

.home-swipe-hint .hint-light,
.home-swipe-hint .hint-light > .hint-char {
    background: transparent;
}

.home-swipe-hint .hint-light {
    color: rgba(255, 255, 255, 0.95);
    font-family: 'nasalization', sans-serif;
    font-size: calc((100dvh + 100dvw) / 60);
    line-height: 1;
    text-shadow: 0 0 6px rgba(255,255,255,0.18);
    filter: saturate(1.05);
}

/* Use Cabin Regular for the individual glowing > characters */
.home-swipe-hint .hint-light > .hint-char {
    font-family: 'Cabin', 'nasalization', sans-serif;
    display: inline-block;

    margin: 0 -0.08em; /* reduce spacing between each character */
    padding: 0;
    opacity: 0.05; /* base low visibility when not pulsing */
    animation: homeHintGlow 4000ms cubic-bezier(.4,0,.2,1) infinite;
}

/* Container fade-in */
@keyframes homeHintContainerAppear {
    from { opacity: 0; transform: translateY(-48%); }
    to   { opacity: 0.95; transform: translateY(-50%); }
}

/* Per-character smooth pulse: ease up, hold, then fade out smoothly */
@keyframes homeHintGlow {
    0%   { opacity: 0.0; text-shadow: 0 0 4px rgba(255,255,255,0.08); }
    30%  { opacity: 1;    text-shadow: 0 0 18px rgba(255,255,255,0.8); }
    55%  { opacity: 0.0; text-shadow: 0 0 8px rgba(255,255,255,0.22); }
    100% { opacity: 0.0; text-shadow: 0 0 4px rgba(255,255,255,0.08); }
}

/* Stagger the pulses left -> right (short offsets produce a smooth travelling glow) */
.home-swipe-hint .hint-light > .hint-char:nth-child(1) { animation-delay: 0s; }
.home-swipe-hint .hint-light > .hint-char:nth-child(2) { animation-delay: 0.75s; }
.home-swipe-hint .hint-light > .hint-char:nth-child(3) { animation-delay: 1.5s; }




@media (max-width: 520px) {
    .home-swipe-hint { right: 8px; }
}


.home-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 2080px;
    flex-wrap: wrap; /* allow wrapping; portrait media will stack explicitly */
}

.home-head img {
    display: block;
    width: 100%;
    height: auto;
}

/* Make flex children share available space and avoid overlap when images resize */
.home-head > * {
    flex: 0 1 auto; /* natural sizing, allow shrinking but no forced equal grow */
    min-width: 96px; /* prevents extreme shrink that causes overlap */
}

/* Constrain image heights relative to viewport so they don't overflow */
.home-logo img {
    height: auto;
    max-height: 55vh; /* large logo can use more vertical space */
    object-fit: contain;
    filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 100) rgba(225, 137, 137,1));
    animation: homeLogoGlowPulse 6000ms ease-in-out infinite;
    will-change: filter;
}

@keyframes homeLogoGlowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 110) rgba(225, 137, 137, 0.65));
        transform: translateZ(0);
    }
    50% {
        filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 70) rgba(225, 137, 137, 1));
    }
}

.home-avatar img {
    height: auto;
    max-height: 45vh; /* avatar kept smaller to avoid pushing the logo */
    filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 0.534));
    object-fit: contain;
}

/* When items wrap, keep them centered and with consistent spacing */
.home-head {
    align-content: center;
}

/* Home footer (quote + social icons) — sits just above bottom nav */
.home-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.5dvh; /* closer above the fixed bottom nav */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0px 5px;
    pointer-events: auto;
}

@media (orientation: landscape) {
    /* bottom nav is slightly shorter in landscape; move footer accordingly */
    .home-footer { bottom: 22px; }
}
.home-quote {
    color: rgba(255,255,255,0.2);
    font-size: 0.92rem;
    text-align: center;
    max-width: 92%;
}
.home-social {
    list-style: none;
    display: flex;
    gap: 12px;
    padding: 0;
    margin: 0;
}
.home-social li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    text-align: center;
    color: #ffffff3f; /* light grey */
    background: transparent; /* no box */
    border-radius: 0;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: color 160ms ease, text-shadow 160ms ease, transform 160ms ease;
}
.home-social li a:hover {
    color: #ffffff; /* glow to white */
    text-shadow: 0 0 10px rgba(255,255,255,0.95);
    transform: translateY(-2px);
}

/* Brand-colored glows on hover */
.home-social li a.fa-youtube:hover {
    color: #ff8585;
    text-shadow: 0 0 14px rgba(255,0,0,0.95);
    transform: translateY(-2px) scale(1.02);
}
.home-social li a.fa-discord:hover {
    color: #b4bbff;
    text-shadow: 0 0 14px rgba(88,101,242,0.95);
    transform: translateY(-2px) scale(1.02);
}
.home-social li a.fa-facebook:hover {
    color: #acd0ff;
    text-shadow: 0 0 14px rgba(24,119,242,0.95);
    transform: translateY(-2px) scale(1.02);
}

/* Local Font Awesome (load from assets/webfonts) */
@font-face {
    font-family: 'Font Awesome 5 Free';
    font-style: normal;
    font-weight: 900;
    src: url('webfonts/fa-solid-900.woff2') format('woff2'),
         url('webfonts/fa-solid-900.woff') format('woff');
}
@font-face {
    font-family: 'Font Awesome 5 Free';
    font-style: normal;
    font-weight: 400;
    src: url('webfonts/fa-regular-400.woff2') format('woff2'),
         url('webfonts/fa-regular-400.woff') format('woff');
}
@font-face {
    font-family: 'Font Awesome 5 Brands';
    font-style: normal;
    font-weight: 400;
    src: url('webfonts/fa-brands-400.woff2') format('woff2'),
         url('webfonts/fa-brands-400.woff') format('woff');
}

/* Minimal Font Awesome helper classes used by the markup */
.icon { display: inline-block; font-style: normal; font-variant: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.solid { font-family: 'Font Awesome 5 Free'; font-weight: 900; }
.regular { font-family: 'Font Awesome 5 Free'; font-weight: 400; }
.brands { font-family: 'Font Awesome 5 Brands'; font-weight: 400; }
/* Aliases for common Font Awesome classnames */
.fas { font-family: 'Font Awesome 5 Free'; font-weight: 900; }
.far { font-family: 'Font Awesome 5 Free'; font-weight: 400; }
.fab { /* archived: removed from active stylesheet */ }

/* Specific icons used on the site */
.fa-envelope:before { content: "\f0e0"; }
.fa-discord:before { content: "\f392"; }
.fa-facebook:before { content: "\f09a"; }
.fa-youtube:before { content: "\f167"; }
.fa-pen:before { content: "\f304"; }
.fa-play:before { content: "\f04b"; }
.fa-pause:before { content: "\f04c"; }
.fa-step-backward:before { content: "\f048"; }
.fa-step-forward:before { content: "\f051"; }

/* Custom icons for HUMANIA tab */
.fa-map-signs:before { content: "\f277"; }
.fa-map:before { content: "\f279"; }
.fa-flask:before { content: "\f0c3"; }

/* TBA tab */  
.fa-download:before { content: "\f019"; font-size: calc(1dvh + 1dvw * 0.7); text-shadow: 0 0 calc((100dvh + 100dvw) / 600) rgba(0,0,0,1); }
.fa-list:before { content: "\f03a"; font-size: calc(1dvh + 1dvw * 0.7); text-shadow: 0 0 calc((100dvh + 100dvw) / 600) rgba(0,0,0,1); }
.fa-commenting:before { content: "\f27a"; font-size: calc(1dvh + 1dvw * 0.7); text-shadow: 0 0 calc((100dvh + 100dvw) / 600) rgba(0,0,0,1); }
.fa-notes:before { content: "\f249"; font-size: calc(1dvh + 1dvw * 0.7); text-shadow: 0 0 calc((100dvh + 100dvw) / 600) rgba(0,0,0,1); }

/* Main bottom-nav icons */
.fa-book:before { content: "\f02d"; }
.fa-music:before { content: "\f001"; }
.fa-project-diagram:before { content: "\f542"; }

/* Ensure the pseudo-element is visible and centered */
.icon:before {
    font-style: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
}

/* Ensure pseudo-elements use the correct font family/weight */
.solid:before, .fas:before { font-family: 'Font Awesome 5 Free'; font-weight: 900; }
.regular:before, .far:before { font-family: 'Font Awesome 5 Free'; font-weight: 400; }
.brands:before { font-family: 'Font Awesome 5 Brands'; font-weight: 400; }

.home-logo {
    order: 0;
    flex: 0 1 auto; /* allow natural sizing and shrinking but not forced full-width */
    display: flex;
    margin: 0 auto;
    opacity: 1;
    transition: opacity 280ms ease;
}

.home-avatar {
    order: 1;
    flex: 0 1 auto;
    display: flex;
    margin: 0 auto;
}

@media (min-height: 400px) and (orientation: landscape) {
    .home-logo { order: 0; justify-content: right; margin-right: 0; margin-left: auto; }
    .home-avatar { order: 1; justify-content: left; margin-right: auto; margin-left: 0; }
}

@media (max-height: 399px) and (orientation: landscape) {
    .home-avatar { order: 0; justify-content: center}
    .home-logo { order: 1; justify-content: center}

}

@media (orientation: portrait) {
    /* Stack vertically in portrait: logo above avatar */
    .home-head { flex-direction: column; align-items: center; }
    .home-logo { order: 1; width: min(250px, 70vw); flex: 0 0 auto; justify-content: center; width: min(250px, 55vw); }
    .home-avatar { order: 0; width: min(150px, 40vw); flex: 0 0 auto; justify-content: center; width: min(150px, 30vw); }
}

/* Fade the text logo to transparent on extremely short viewports while keeping layout space */
@media (max-height: 399px) {
    .home-logo { opacity: 0 !important; pointer-events: none; }
    .home-head { flex-direction: column; align-items: center; }
    .home-logo { order: 1; width: min(250px, 70vw); flex: 0 0 auto; }
    .home-avatar { order: 0; width: min(150px, 40vw); flex: 0 0 auto; }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(100dvh * 0.05); /* 5% of viewport height */
    background: rgba(17, 17, 17, 0.95);
    display: flex;
    justify-content: space-around;
    align-items: center;
/*    border-top: 1px solid rgba(255, 255, 255, 0.08); */
    overflow: hidden;
}
.bottom-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.nav-item {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: calc((100dvh + 100dvw) / 85); 
    font-family: 'nasalization', sans-serif;
    padding: 0 14px;
    line-height: 1;
    min-width: 0;
    transition: color 0.2s ease;
}
.nav-item--book.active, .nav-item--matrix.active, .nav-item--music.active {
    color: #ffffff;
		text-shadow: 0 0 calc((100dvh + 100dvw) / 300) rgba(225, 137, 137, 1);
}

.nav-item--home.active {
/*    transform: translateY(-2px) scale(1.02);*/
    filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 600) rgba(225, 137, 137, 1));
}

/* Humania active state: HUMANIA-colored glow */
.nav-item--humania.active {
    filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 600) rgba(137, 242, 88, 1));
}

.nav-item--book:hover, .nav-item--matrix:hover, .nav-item--music:hover {
    color: #ffffff;
		text-shadow: 0 0 calc((100dvh + 100dvw) / 300) rgba(225, 137, 137, 1);
}

/* If already selected, prevent hover from adding extra glow (webfont icons) */
.nav-item--book.active:hover,
.nav-item--matrix.active:hover,
.nav-item--music.active:hover {
    color: #ffffff;
    text-shadow: none;
    /* keep the same selected drop-shadow as the .active rule */
		text-shadow: 0 0 calc((100dvh + 100dvw) / 300) rgba(225, 137, 137, 1);
}

.nav-item--home:hover {
    color: #ffffff;
    filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 600) rgba(225, 137, 137, 1));
}

.nav-item--humania:hover {
    color: #ffffff;
    filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 600) rgba(137, 242, 88, 1));
}

/* Main tab icon layout */
.nav-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:0;
}

.nav-icon-img{
    width: calc((100dvh + 100dvw) / 80);
    height: auto;
    max-height: 60%;
    display:block;
    filter: drop-shadow(0 0.2dvh calc((100dvh + 100dvw) / 600) rgba(0,0,0,1));
    transition: filter 160ms ease, transform 160ms ease;
}

.nav-icon{
    font-size: calc((100dvh + 100dvw) / 95);
    line-height: 1;
    display:inline-block;
}
.nav-item--book,
.nav-item--matrix,
.nav-item--music {    
    text-shadow: 0 0.2dvh calc((100dvh + 100dvw) / 600) rgba(0,0,0,1);
}
.nav-item--home .nav-icon-img:focus-visible,
.nav-item--book .nav-icon-img:focus-visible,
.nav-item--matrix .nav-icon-img:focus-visible,
.nav-item--music .nav-icon-img:focus-visible,
.nav-item--humania .nav-icon-img:focus-visible{
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.75));
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: calc(100dvh * 0.005);
    width: calc(100dvw / 5); /* 5 tabs */
    background: linear-gradient(90deg, #e18989, #e18989);
    filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 600) rgba(225, 137, 137, 1));
    border-radius: 2px 2px 0 0;
    transition: transform 0.25s ease, width 0.25s ease, background 0.25s ease;
    z-index: 0;
}


@media (orientation: landscape) {
    .bottom-nav { height: calc(100dvh * 0.07); }
    .nav-indicator { height: calc(100dvh * 0.007); }
    .app-container { height: calc(100dvh * 0.93); }
}


/* ========================================== */
/* ADAPTIVE ORIENTATION LAYOUTS              */
/* ========================================== */

@media (orientation: portrait) {
    /* In portrait, stack all tab content vertically with some spacing */
    .docs-layout, .tcm-layout, .player-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
        overflow: visible; /* Ensure shadows on child elements are not clipped */
    }
}

@media (orientation: landscape) {
    /* In landscape, use the default layouts defined for each tab */
    .docs-layout {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
        gap: 20px;
        align-items: stretch;
        height: 100%;
        min-height: 0;
    }
    .docs-viewer {
        min-height: 0;
        display: flex;
        flex-direction: column;
        min-height: calc(100vh * 0.99);
        filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
    }
    .docs-viewer iframe {
        height: calc(100vh * 0.99);
        min-height: 0;
    }
    .docs-sidebar {
        align-self: stretch;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
    }
}

@media (max-width: 520px) and (orientation: portrait) {
    .docs-layout {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .docs-viewer {
        min-height: 0;
        display: flex;
        flex-direction: column;
        filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
    }
    .docs-viewer iframe {
        height: 50vh; /* fixed height for mobile portrait */
        max-height: 50dvh;
    }
    .docs-sidebar {
        align-self: stretch;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
    }
}

/* --- Google Docs Tab / Book Reader --- */
.docs-layout {
    display: grid;
    gap: 15px;
}

.docs-viewer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
}

.docs-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 1dvh;
    min-height: 65vh;
}

.docs-sidebar {
    text-align: center;
    position: relative; /* Anchor UTFOF help/edit buttons to sidebar */
    min-height: 10vh;
}


.utfof-header {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
}

.utfof-titleblock {
    flex: 0 1 80vw;
    min-width: 0;
    text-align: center;
}

.utfof-title {
    color: #fff;
    font-family: 'nasalization', sans-serif;
    text-shadow: 0 0 10px #fff;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70vw;
    margin: 0 auto;
    padding: 10px;
	text-shadow: 0 calc((100dvw + 100dvh) / 3000) calc((100dvw + 100dvh) / 500) #ffffffaa;
    filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
    text-align: center;
}

.utfof-subtitle {
    color: rgba(255,255,255,0.85);
    font-family: 'Cabin', sans-serif;
    margin-top: 0px;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.utfof-nav-btn, .utfof-counter {
    appearance: none;
    -webkit-appearance: none;
    color: rgba(255,255,255,0);
    font-family: 'nasalization', sans-serif;
    font-size: 0.95rem;
    padding: 5px 10px; /* smaller + tighter */
    margin-top: 3px;
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(0,0,0,0.25);
    vertical-align: middle;
    cursor: default;
    filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
    text-shadow: (0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));

}
.utfof-nav-btn {
    cursor: pointer;
    color: #fff;
}

.utfof-controls {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    gap: 10px;
}

.utfof-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.utfof-audio-wrap audio {
    width: 100%;
}

		/* UTFOF: top-left ? hover popup (top-left of book panel) */
		#UTFOF{ position:relative; }
		#UTFOF .utfof-quest{

			position:absolute;
			top:0px;
			margin:0;
			border-radius:50%;
			background:rgba(0,0,0,0.0);
			color:#fff;
			display:flex;
			align-items:center;
			justify-content:center;
			font-size:18px;
			font-weight:700;
			z-index:5;
			cursor:help;
			transition: color 150ms ease-in-out, text-shadow 150ms ease-in-out;
		}

		/* Ensure the help button remains circular even on small screens */
		#UTFOF .utfof-quest{
			width:26px !important;
			min-width:26px !important;
			height:26px !important;
			padding:0 !important;
			display:inline-flex !important;
			align-items:center !important;
			justify-content:center !important;
			box-sizing:border-box !important;
		}

		#UTFOF .utfof-quest:hover,
		#UTFOF .utfof-quest:focus{
			color:#fff;
			text-shadow: 0 0 8px rgba(255,255,255,0.95), 0 0 16px rgba(255,255,255,0.65);
		}

		/* Prevent the "?" button from staying visually "hovered" after closing the modal.
		   Likely caused by focus being returned to the button. */
		#UTFOF .utfof-quest:focus:not(:hover){
			color:#fff;
			text-shadow:none;
		}

        /* Mirror the same help-button styles for the TCM tab */
        #TCM{ position:relative; }
        #TCM .utfof-quest{

            position:absolute;
            top:0px;
            margin:0;
            border-radius:50%;
            background:rgba(0,0,0,0.0);
            color:#fff;
            display:flex;
            align-items:center;
            justify-content:center;
            font-size:18px;
            font-weight:700;
            z-index:5;
            cursor:help;
            transition: color 150ms ease-in-out, text-shadow 150ms ease-in-out;
        }

        #TCM .utfof-quest{
            width:26px !important;
            min-width:26px !important;
            height:26px !important;
            padding:0 !important;
            display:inline-flex !important;
            align-items:center !important;
            justify-content:center !important;
            box-sizing:border-box !important;
        }

        #TCM .utfof-quest:hover,
        #TCM .utfof-quest:focus{
            color:#fff;
            text-shadow: 0 0 8px rgba(255,255,255,0.95), 0 0 16px rgba(255,255,255,0.65);
        }

        #TCM .utfof-quest:focus:not(:hover){
            color:#fff;
            text-shadow:none;
        }

        /* HUMANIA help button style matches the other tabs */
        /* Ensure the WHITEPAPER section is a positioned container so the help button
           anchored absolutely inside it doesn't float over other tabs */
        #HUMANIA, #HUMANIA-Model, #HUMANIA-WhitePaper{ position:relative; }
        #HUMANIA .utfof-quest, #HUMANIA-Model .utfof-quest, #HUMANIA-WhitePaper .utfof-quest{
            position:absolute;
            top:0px;
            margin:0;
            border-radius:50%;
            background:rgba(0,0,0,0.0);
            color:#fff;
            display:flex;
            align-items:center;
            justify-content:center;
            font-size:18px;
            font-weight:700;
            z-index:5;
            cursor:help;
            transition: color 150ms ease-in-out, text-shadow 150ms ease-in-out;
        }

        #HUMANIA .utfof-quest, #HUMANIA-Model .utfof-quest, #HUMANIA-WhitePaper .utfof-quest{
            width:26px !important;
            min-width:26px !important;
            height:26px !important;
            padding:0 !important;
            display:inline-flex !important;
            align-items:center !important;
            justify-content:center !important;
            box-sizing:border-box !important;
        }

        #HUMANIA .utfof-quest:hover, #HUMANIA-Model .utfof-quest:hover, #HUMANIA-WhitePaper .utfof-quest:hover,
        #HUMANIA .utfof-quest:focus, #HUMANIA-Model .utfof-quest:focus, #HUMANIA-WhitePaper .utfof-quest:focus{
            color:#fff;
            text-shadow: 0 0 8px rgba(255,255,255,0.95), 0 0 16px rgba(255,255,255,0.65);
        }

        #HUMANIA .utfof-quest:focus:not(:hover), #HUMANIA-Model .utfof-quest:focus:not(:hover), #HUMANIA-WhitePaper .utfof-quest:focus:not(:hover){
            color:#fff;
            text-shadow:none;
        }


		#UTFOF .utfof-edit{
			position:absolute;
			top:0px;
			margin:0;
			border-radius:50%;
			background:rgba(0,0,0,0.0);
			color:#fff;
			display:flex;
			align-items:center;
			justify-content:center;
			font-size:12px;
			font-weight:700;
			z-index:5;
			cursor:pointer;
			transition: color 150ms ease-in-out, text-shadow 150ms ease-in-out;
		}

		/* Ensure the help button remains circular even on small screens */
		#UTFOF .utfof-edit{
			width:26px !important;
			min-width:26px !important;
			height:26px !important;
			padding:0 !important;
			display:inline-flex !important;
			align-items:center !important;
			justify-content:center !important;
			box-sizing:border-box !important;
		}

		#UTFOF .utfof-edit:hover,
		#UTFOF .utfof-edit:focus{

			color:#fff;
			text-shadow: 0 0 8px rgba(255,255,255,0.95), 0 0 16px rgba(255,255,255,0.65);
		}
		#UTFOF #utfof-quest{ left:10px; }
		#UTFOF #utfof-edit{ right:0px; }

        /* HUMANIA White Paper edit button styling (match UTFOF) */
        #HUMANIA-WhitePaper .utfof-edit{
            position:absolute;
            top:0px;
            margin:0;
            border-radius:50%;
            background:rgba(0,0,0,0.0);
            color:#fff;
            display:flex;
            align-items:center;
            justify-content:center;
            font-size:12px;
            font-weight:700;
            z-index:5;
            cursor:pointer;
            transition: color 150ms ease-in-out, text-shadow 150ms ease-in-out;
        }

        #HUMANIA-WhitePaper .utfof-edit{
            width:26px !important;
            min-width:26px !important;
            height:26px !important;
            padding:0 !important;
            display:inline-flex !important;
            align-items:center !important;
            justify-content:center !important;
            box-sizing:border-box !important;
        }

        #HUMANIA-WhitePaper .utfof-edit:hover,
        #HUMANIA-WhitePaper .utfof-edit:focus{

            color:#fff;
            text-shadow: 0 0 8px rgba(255,255,255,0.95), 0 0 16px rgba(255,255,255,0.65);
        }

		/* Modal overlay that covers the viewport and centers the modal box */
        #utfof-modal-overlay, #tcm-modal-overlay, #tba-modal-overlay, #humania-model-modal-overlay, #humania-whitepaper-modal-overlay{
            position:fixed;
		inset:0;
		display:none;
		align-items:center;
		justify-content:center;
		background:rgba(0,0,0,0.0);
		z-index:9999;
	}
        /* Modal opened */
		#utfof-modal-overlay.visible,
		#tba-modal-overlay.visible,
		#tcm-modal-overlay.visible,
		#humania-model-modal-overlay.visible,
		#humania-whitepaper-modal-overlay.visible{
			display:flex;
			background:rgba(0,0,0,0.35);
		}

		/* If JS closes via hidden attribute, ensure it can be reopened */
		#utfof-modal-overlay[hidden],
		#tba-modal-overlay[hidden],
		#tcm-modal-overlay[hidden],
		#humania-model-modal-overlay[hidden],
		#humania-whitepaper-modal-overlay[hidden]{
			display:none !important;
		}
		#utfof-modal-overlay:not([hidden]).visible,
		#tba-modal-overlay:not([hidden]).visible,
		#tcm-modal-overlay:not([hidden]).visible,
		#humania-model-modal-overlay:not([hidden]).visible,
		#humania-whitepaper-modal-overlay:not([hidden]).visible{
			display:flex !important;
		}

		#tcm-modal a{
    text-align: center;
    color: #ffffff; /* light grey */
    transition: color 160ms ease, text-shadow 160ms ease, transform 160ms ease;
}
		#tcm-modal a:hover {
    color: #ffffff; /* glow to white */
    text-shadow: 0 0 10px rgba(255,255,255,0.95);
    transform: translateY(-2px);
}

		#utfof-modal,
		#tcm-modal,
		#humania-model-modal,
		#humania-whitepaper-modal{
			background:#222;
			color:#ffffff;
			padding:1.25em;
			border-radius:8px;
			max-width:42em;
			width:calc(100% - 40px);
			box-shadow:0 10px 30px rgba(0,0,0,0.5);
			border:1px solid rgba(255,255,255,0.12);
            text-align: justify;
            font-size: calc((100dvh + 100dvw) / 85);
		}

		#tba-modal{
			background:#222;
			color:#ffffff;
			padding:1.25em;
			border-radius:8px;
			max-width:98dvw;
            max-height:98dvh;
			width:calc(100% - 40px);
			box-shadow:0 10px 30px rgba(0,0,0,0.5);
			border:1px solid rgba(255,255,255,0.12);
            text-align: justify;
            font-size: calc((100dvh + 100dvw) / 100);
		}


        #utfof-modal h3,
		#tba-modal h3,
		#tcm-modal h3,
		#humania-model-modal h3,
		#humania-whitepaper-modal h3{ margin:0 0 .5em 0; font-size:1.2em; }
		#utfof-modal .utfof-modal-content,
		#tba-modal .utfof-modal-content,
		#tcm-modal .utfof-modal-content,
		#humania-model-modal .utfof-modal-content,
		#humania-whitepaper-modal .utfof-modal-content{ font-size:1em; line-height:1.4; margin-bottom:1em; }
		#utfof-modal .utfof-modal-actions,
		#tba-modal .utfof-modal-actions,
		#tcm-modal .utfof-modal-actions,
		#humania-model-modal .utfof-modal-actions,
		#humania-whitepaper-modal .utfof-modal-actions{ text-align:right; }
		#utfof-modal .utfof-modal-actions .button,
		#tba-modal .utfof-modal-actions .button,
		#tcm-modal .utfof-modal-actions .button,
		#humania-model-modal .utfof-modal-actions .button,
		#humania-whitepaper-modal .utfof-modal-actions .button{ background:#444; color:#fff; font-size: calc((100dvh + 100dvw) / 85); padding:.45em .9em; border-radius:4px; border:0; cursor:pointer; }
		#utfof-modal .utfof-modal-actions .button:hover,
		#tba-modal .utfof-modal-actions .button:hover,
		#tcm-modal .utfof-modal-actions .button:hover,
		#humania-whitepaper-modal .utfof-modal-actions .button:hover{ background:#555; }





        
/* --- MP3 Player Tab --- */
.player-layout {
    display: grid;
    grid-template-rows: 1fr auto; /* Portrait: Stacked vertically */
    gap: 20px;
    align-items: center;
    min-height: 0;
}
.player-art {
    display: flex;
    justify-content: center;
    min-height: 0;
}
/* .album-disc archived */

/* ========================================== */
/* LANDSCAPE MODE CONTROLS (Flipped Sideways) */
/* ========================================== */

/* --- TCM: portrait layout defaults (image above, text below) --- */
#TCM .tcm-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1980px;
    gap: 20px;
    align-items: center;
}

#TCM .tcm-media {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}

#TCM .tcm-media .image.fit {
    display: inline-flex;
    justify-content: center;
    width: auto;
}

#TCM .tcm-media img {
    /* Similar scaling logic to Home (me.webp): size relative to viewport, constrain height */
    width: calc((100dvh + 100dvw) /  3);
    max-width: 100%;
    height: auto;
    max-height: 55vh;
    object-fit: contain;
    display: block;
}

#TCM .tcm-copy {
    padding: 0 10px;
    line-height: 1.3em;
    text-align: justify;
    max-width: 700px;
    background: #1111118e;
    border-radius: 1dvh;
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.15);
    color: #aaaaaa;
    overflow: hidden; /* helps the fit-text logic prevent spillover */
}


#TCM .tcm-copy p {
    margin: 0;
    padding: 24px;
    font-size: clamp(0.95rem, 0.6rem + 0.15vw, 1.15rem);
    line-height: 1.55;
}

#TCM h2 {
    width: 100%;
    text-align: center;
    margin-bottom: 18px;
}

#TCM .tcm-copy strong {
    font-weight: 700;
    color: #ddd;
}



/* --- TBA: portrait layout defaults (artwork above, controls below) --- */

        /* Mirror the same help-button styles for the TCM tab */
        #TBA{ position:relative; }
        #TBA .utfof-quest{

            position:absolute;
            top:0px;
            margin:0;
            border-radius:50%;
            background:rgba(0,0,0,0.0);
            color:#fff;
            display:flex;
            align-items:center;
            justify-content:center;
            font-size:18px;
            font-weight:700;
            z-index:5;
            cursor:help;
            transition: color 150ms ease-in-out, text-shadow 150ms ease-in-out;
        }

        #TBA .utfof-quest{
            width:26px !important;
            min-width:26px !important;
            height:26px !important;
            padding:0 !important;
            display:inline-flex !important;
            align-items:center !important;
            justify-content:center !important;
            box-sizing:border-box !important;
        }

        #TBA .utfof-quest:hover,
        #TBA .utfof-quest:focus{
            color:#fff;
            text-shadow: 0 0 8px rgba(255,255,255,0.95), 0 0 16px rgba(255,255,255,0.65);
        }

        #TBA .utfof-quest:focus:not(:hover){
            color:#fff;
            text-shadow:none;
        }



		#utfof-modal .utfof-modal-content a,
		#tba-modal .utfof-modal-content a,
		#tcm-modal .utfof-modal-content a,
		#humania-model-modal .utfof-modal-content a,
		#humania-whitepaper-modal .utfof-modal-content a{
    text-align: center;
    color: #ffffff; /* light grey */
    transition: color 160ms ease, text-shadow 160ms ease, transform 160ms ease;
}
		#utfof-modal .utfof-modal-content a:hover,
		#tba-modal .utfof-modal-content a:hover,
		#tcm-modal .utfof-modal-content a:hover,
		#humania-model-modal .utfof-modal-content a:hover,
		#humania-whitepaper-modal .utfof-modal-content a:hover {
    color: #ffffff; /* glow to white */
    text-shadow: 0 0 10px rgba(255,255,255,0.95);
    transform: translateY(-2px);
}


#TBA {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    height: auto;
    overflow: visible;
}

.tba-link {
     color:#e18989; 
     text-decoration:none; 
     word-break:break-all;
}

.tba-link:hover {
    color: #ffffff; /* glow to white */
    text-shadow: 0 0 5px rgba(255,255,255,0.95);
}


#TBA #tba-player {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    max-width: none;
    gap: 20px;
    align-items: center;
    min-height: 0;
    height: auto;
    overflow: visible;
}

#TBA .player-art {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
    min-width: 0;
    max-height: 65vh;
    box-sizing: border-box;
}

#TBA .player-art img {
    width: calc((100dvh + 100dvw) / 4.5);
    max-width: 100%;
    max-height: 45vh;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 2dvh;

    /* Use the border-radius on the image, but do NOT let shadows get clipped
       by any ancestor overflow rules. */
    box-shadow: 0 calc((100dvh + 100dvw) / 250) calc((100dvh + 100dvw) / 200) rgba(0, 0, 0, 0.534);
}

#tba-meta:empty {
    display: none;
}

#TBA .player-controls {
    width: 100%;
    max-width: 100%;
    height: 50vh;
    max-height: 50vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    overflow: visible;
    box-sizing: border-box;
}

/* #TBA .tba-playlist-wrap archived */


#TBA #tba-playlist {
    list-style: none;
    text-align: left;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    overflow: visible;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

#TBA #tba-playlist li {
    margin-bottom: 4px;
    padding: 6px 12px !important;
}

#TBA #tba-playlist::-webkit-scrollbar {
    width: 10px;
}
#TBA #tba-playlist::-webkit-scrollbar-track {
    background: transparent;
}
#TBA #tba-playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 6px;
}
#TBA #tba-playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.55);
}

/* --- TBA: Theme scrollbars for tab content box --- */
#TBA .tba-tab-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(225, 137, 137, 0.75) rgba(0, 0, 0, 0);
}

#TBA .tba-tab-content::-webkit-scrollbar {
    width: 10px;
}

#TBA .tba-tab-content::-webkit-scrollbar-track {
    background: transparent;
}

#TBA .tba-tab-content::-webkit-scrollbar-thumb {
    background: rgba(225, 137, 137, 0.35);
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0);
    background-clip: content-box;
}

#TBA .tba-tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(225, 137, 137, 0.55);
}


/* --- TBA: landscape reflow (artwork left, controls right) --- */
@media (orientation: landscape) {
    #TBA #tba-player {
        display: flex !important;
        flex-direction: row !important;
    /*    align-items: stretch; */
        justify-content: center;
    }

#TBA .player-art,
    #TBA .player-controls {
        width: calc(50% - 10px);
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
        min-height: 0;
        height: 75vh;
        max-height: 75vh;
        box-sizing: border-box;
        padding: 0 0 0 10px;
        box-sizing: border-box;
        /* allow album-art drop shadow to paint outside the borders */
        overflow: visible;
    }
    #TBA .player-art,
    #TBA .player-controls,
    #TBA .tba-content-box {
        min-width: 0;
        max-width: 100%;
    }
    #TBA .player-controls {
        overflow: visible;
    }

    #TBA .player-art {
        margin: auto 0;
    }

    #TBA .player-art {
        /* max-height: 55vh; */
        display: flex;
        justify-content: center;
        align-items: center;
    }


    #TBA .player-art img {
        max-width: 100%;
        max-height: 100%;
        height: auto;
    }
}

#TBA #tba-time {
        min-width: 55px;
        font-size: 12px;
        flex:0 0 auto;
        min-width:0;
        text-align:right;
        vertical-align: middle;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    /*    font-family: 'cabin', sans-serif;*/
        font-variant-numeric: tabular-nums;
        color:#ddd;
        white-space:nowrap;
        padding-left:2px;  
        /* keep the time in line with the waveform canvas */
        padding-top:9px;  
        text-shadow: 0 5px 5px rgba(0, 0, 0, 1);
    }

/* --- TBA: Playlist active state --- */
#TBA #tba-playlist li.active {
    background-color: #945a5a !important;
    color: #fff;
    text-shadow: 0 3px 3px rgb(0, 0, 0);
}

#TBA #tba-playlist li.active div {
    color: #fff;
}

/* --- TBA: Tab styles --- */
.tba-content-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    /*min-height: 0;*/
    min-height: 30dvh;
    height: auto; /* prevent portrait clipping of the bottom box-shadow */
    box-sizing: border-box;
    box-shadow: 0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 0.534);
    border-radius: 8px;
    overflow: hidden;
}


.tba-tabs {
    display: flex;
    border-bottom: 1px solid #444;
    min-height: 25px;
    background: #1a1a1a;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    overflow: hidden;
}

.tba-tab-btn {
    flex: 1;
    padding: 0.5dvw 0.5dvh;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    text-align: center;
    border-bottom: 2px solid #613a3a;
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s;
}

.tba-tab-btn.tba-tab-active {
    color: #fff;
    border-bottom-color: #e18989;
    filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 900) #e18989);
}

.tba-tab-btn:hover {
    color: #fff;
}

.tba-tab-content {
    padding: 0 8px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    display: none;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9em;
    color: #eee;
    text-shadow: 0 3px 3px rgba(0, 0, 0, 0.8);
}

.tba-tab-content.tba-tab-active { 
    display: block;
}


/* --- UTFOF: Prev/Next buttons theme (match TBA prev/next) --- */
#UTFOF #utfof-prev,
#UTFOF #utfof-next{

    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(225, 137, 137, 0.65);
    background: rgba(225, 137, 137, 0.12);
    color: #ffffff;
    border-radius: 8px;
    padding: 5px 10px; /* smaller + tighter */
    font-family: 'nasalization', sans-serif;
    font-size: 0.95em;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.05s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
    text-shadow: (0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
}

#UTFOF #utfof-prev:hover,
#UTFOF #utfof-next:hover {
    background: rgba(225, 137, 137, 0.22);
    border-color: rgba(225, 137, 137, 0.95);
    box-shadow: 0 0 18px rgba(225, 137, 137, 0.25), 0 0 28px rgba(255, 255, 255, 0.12);
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.95);
}

#UTFOF #utfof-prev,
#UTFOF #utfof-next {
    min-height: 28px;
    min-width: 28px;
    height: 28px;
}


#UTFOF #utfof-prev:active,
#UTFOF #utfof-next:active {
    transform: translateY(1px);
}

#UTFOF #utfof-prev:focus-visible,
#UTFOF #utfof-next:focus-visible {
    outline: none;
    border-color: rgba(225, 137, 137, 1);
    box-shadow: 0 0 0 3px rgba(225, 137, 137, 0.35);
}

#UTFOF #utfof-prev:disabled,
#UTFOF #utfof-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}


/* --- TBA: Prev/Play/Next button theme --- */
#TBA #tba-prev,
#TBA #tba-play,
#TBA #tba-next {

    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(225, 137, 137, 0.65);
    background: rgba(225, 137, 137, 0.12);
    color: #eaf4ff;
    border-radius: 8px;
    padding: 5px 10px; /* smaller + tighter */
    font-size: 0.95em;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.05s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
    text-shadow: (0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1));
}


#TBA #tba-prev:hover,
#TBA #tba-play:hover,
#TBA #tba-next:hover {
    background: rgba(225, 137, 137, 0.22);
    border-color: rgba(225, 137, 137, 0.95);
    filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(225, 137, 137, 1));
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.95);
}


#TBA #tba-prev,
#TBA #tba-play,
#TBA #tba-next {
    min-height: 28px;
    min-width: 28px;
    height: 28px;
}

#TBA #tba-prev:hover,
#TBA #tba-next:hover {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.95);
}

#TBA #tba-play:focus-visible {
    outline: none;
/*    border-color: rgba(225, 137, 137, 1);
    box-shadow: 0 0 0 3px rgba(225, 137, 137, 0.35);*/
}

#TBA #tba-prev:disabled,
#TBA #tba-play:disabled,
#TBA #tba-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- TBA waveform seek (SoundCloud-ish) --- */
#TBA #tba-wave-wrap canvas#tba-wave {
    background: rgba(0, 0, 0, 0);
    border-radius: 6px;
    opacity: 1; /* Waveform opacity */
}
#TBA #tba-wave-wrap .waveform-svg-wrapper {
    color: #00000040;
/*    color: rgba(74, 57, 57, 1); */
/*    filter: drop-shadow(0 calc((100dvh + 100dvw) / 800) calc((100dvh + 100dvw) / 600) rgba(0, 0, 0, 1)); */
    position: relative;
}
#TBA #tba-wave-wrap .waveform-svg-wrapper .waveform-progress {
    color: rgba(225, 137, 137, 1);
/*    filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 400) rgba(225, 137, 137, 1));*/
}
#TBA #tba-wave-wrap canvas#tba-wave:focus {
    outline: none;
}
#TBA #tba-seek {
    /* visible simple seek bar */
    touch-action: none;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #e18989 0%, #111111 0%);
    height: 10px;
    border-radius: 6px;
    outline: none;
}

/* WebKit thumb */
#TBA #tba-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(225,137,137,0.9);
    margin-top: -0px;
    cursor: pointer;
}

/* Firefox thumb */
#TBA #tba-seek::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(225,137,137,0.9);
    border: none;
    cursor: pointer;
}

/* Remove default focus outline and add subtle ring */
#TBA #tba-seek:focus {
    box-shadow: 0 0 0 4px rgba(225,137,137,0.12);
}


/* --- UTFOF waveform seek (SoundCloud-ish, mini-player) --- */
#UTFOF #utfof-wave-wrap canvas#utfof-wave {
    background: rgba(0, 0, 0, 0);
    border-radius: 6px;
    opacity: 1; /* Waveform opacity */
}
#UTFOF #utfof-wave-wrap .waveform-svg-wrapper {
    color: #00000040;
/*    color: rgba(74, 57, 57, 1);*/
/*    filter: drop-shadow(0 calc((100dvh + 100dvw) / 500) calc((100dvh + 100dvw) / 400) rgba(0, 0, 0, 1)); */
    position: relative;
}
#UTFOF #utfof-wave-wrap .waveform-svg-wrapper .waveform-progress {
    color: rgba(225, 137, 137, 1);
/*    filter: drop-shadow(0 0 calc((100dvh + 100dvw) / 400) rgba(225, 137, 137, 1));*/
}
#UTFOF #utfof-wave-wrap canvas#utfof-wave:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(225, 137, 137, 0), 0 0 0 3px rgba(225, 137, 137, 0);
}
#UTFOF #utfof-audio-progress {
    /* visible simple seek bar */
    touch-action: none;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #e18989 0%, #2a2a2a 0%);
    height: 10px;
    border-radius: 6px;
    outline: none;
}

/* WebKit thumb */
#UTFOF #utfof-audio-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(225,137,137,0.9);
    margin-top: -4px;
    cursor: pointer;
}

/* Firefox thumb */
#UTFOF #utfof-audio-progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(225,137,137,0.9);
    border: none;
    cursor: pointer;
}

#UTFOF #utfof-audio-progress:focus {
    box-shadow: 0 0 0 4px rgba(225,137,137,0.12);
}


