/* =========================================================
   DIGICAFE — MASTER STYLESHEET
   Clean reconstruction
   Midnight navy • warm gold • readable typography
========================================================= */

/* =========================================================
   01. DESIGN TOKENS
========================================================= */

:root {
    --navy-dark: #050d1a;
    --navy: #08172b;
    --navy-soft: #102746;
    --navy-light: #17385f;

    --gold: #d6b36a;
    --gold-light: #f3d99a;
    --gold-dark: #a88342;

    --cream: #f5efe6;
    --cream-light: #fbf8f2;
    --white: #ffffff;

    --text: #172033;
    --text-soft: #667085;
    --text-light: #8a94a6;

    --border: #dfe6ef;
    --border-dark: rgba(255,255,255,.12);

    --surface: #ffffff;
    --card: #ffffff;
    --background: #f5efe6;

    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 26px;

    --shadow-sm: 0 4px 15px rgba(7,20,38,.08);
    --shadow: 0 10px 30px rgba(7,20,38,.12);
    --shadow-lg: 0 20px 55px rgba(7,20,38,.20);

    --transition: .25s ease;

    --navbar-height: 76px;
}


/* =========================================================
   02. RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;

    font-family: "Kumbh Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;

    background: var(--background);
    color: var(--text);

    padding-top: var(--navbar-height);

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

ul,
ol {
    padding-left: 1.4rem;
}

p {
    margin: 0 0 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    line-height: 1.25;
    color: var(--navy-dark);
}

::selection {
    background: var(--gold);
    color: var(--navy-dark);
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}


/* =========================================================
   03. NAVBAR
========================================================= */

.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 9999;

    min-height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px clamp(18px, 4vw, 50px);

    background: rgba(5,13,26,.97);
    border-bottom: 1px solid rgba(214,179,106,.20);
    box-shadow: 0 6px 25px rgba(0,0,0,.20);

    backdrop-filter: blur(12px);
}

.logo {
    flex-shrink: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: 1.5px;

    color: var(--gold-light);
    white-space: nowrap;

    transition: transform var(--transition);
}

.logo:hover {
    transform: scale(1.03);
}

.navbar__menu {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 38px);

    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar__menu li {
    margin: 0;
    list-style: none;
}

.navbar__links {
    position: relative;

    display: inline-flex;
    align-items: center;

    min-height: 44px;
    padding: 8px 2px;

    color: var(--cream);
    font-size: clamp(1rem, 1.4vw, 1.12rem);
    font-weight: 600;
    white-space: nowrap;

    transition: color var(--transition);
}

.navbar__links::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 3px;

    width: 0;
    height: 2px;

    background: var(--gold);

    transition: width var(--transition);
}

.navbar__links:hover,
.navbar__links.active {
    color: var(--gold-light);
}

.navbar__links:hover::after,
.navbar__links.active::after {
    width: 100%;
}

#mobile-menu {
    display: none;

    width: 44px;
    height: 44px;

    padding: 8px;

    border: 1px solid rgba(214,179,106,.25);
    border-radius: 10px;

    background: var(--navy);
}

#mobile-menu .bar {
    display: block;

    width: 100%;
    height: 3px;

    margin: 4px 0;

    border-radius: 5px;
    background: var(--gold-light);
}


/* =========================================================
   04. GENERIC COMPONENTS
========================================================= */

.card,
.content-box {
    padding: 24px;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow-sm);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.card:hover,
.content-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn,
.read-btn,
.feature-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 10px 20px;

    border: 0;
    border-radius: 999px;

    background: var(--gold);
    color: var(--navy-dark);

    font-weight: 700;

    transition:
        transform var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.btn:hover,
.read-btn:hover,
.feature-button:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(214,179,106,.22);
}


/* =========================================================
   05. HOME PAGE
========================================================= */

.cafe-home {
    width: 100%;
    padding: 25px 20px 70px;
    text-align: center;
}

.hero {
    width: min(100%, 850px);
    margin: 25px auto 50px;
}

.hero h1 {
    margin-bottom: 15px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--navy-dark);
}

.hero .subtitle {
    margin-bottom: 15px;
    color: var(--gold-dark);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero .intro {
    max-width: 700px;
    margin: 0 auto 18px;
    color: var(--text-soft);
}

.hero .status {
    color: var(--text-light);
    font-size: .98rem;
}

.card-grid {
    width: min(100%, 900px);
    margin: 40px auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;

    text-align: left;
}

.card-grid a {
    display: flex;
    flex-direction: column;

    min-height: 235px;
    padding: 26px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.card-grid a:hover {
    transform: translateY(-5px);
    border-color: rgba(214,179,106,.55);
    box-shadow: var(--shadow);
}

.card-grid h2 {
    margin-bottom: 12px;
    color: var(--navy-dark);
}

.card-grid p {
    flex: 1;
    color: var(--text-soft);
}

.card-grid span {
    color: var(--gold-dark);
    font-weight: 700;
}

.feature {
    width: min(100%, 760px);
    margin: 60px auto;
    padding: 35px;

    background: linear-gradient(135deg, var(--navy-dark), var(--navy));

    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);

    color: var(--cream);
}

.feature h2 {
    color: var(--gold-light);
}

.feature p {
    max-width: 650px;
    margin-inline: auto;
    color: rgba(255,255,255,.86);
}

.quote {
    width: min(100%, 700px);
    margin: 60px auto 20px;
    padding: 25px;

    border-top: 1px solid rgba(214,179,106,.45);
    border-bottom: 1px solid rgba(214,179,106,.45);

    color: var(--navy-soft);

    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-style: italic;
}


/* =========================================================
   06. ABOUT / CONTACT
========================================================= */

.about-container {
    width: min(calc(100% - 40px), 1000px);
    margin: 35px auto 70px;
}

.about-hero {
    margin-bottom: 30px;
    padding: clamp(45px, 7vw, 65px) 25px;

    background: linear-gradient(135deg, var(--navy-dark), var(--navy-soft));

    color: var(--cream);
    text-align: center;

    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about-hero h1 {
    color: var(--gold-light);
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.about-hero .subtitle {
    max-width: 700px;
    margin: auto;
    color: var(--cream);
}

.about-section,
.contact-section,
.closing {
    margin-bottom: 25px;
    padding: clamp(22px, 4vw, 32px);

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow-sm);
}

.about-section h2,
.contact-section h2 {
    margin-bottom: 18px;
    padding-bottom: 10px;

    border-bottom: 1px solid var(--border);
    color: var(--navy-dark);
}

.about-section p,
.contact-section p,
.closing p {
    line-height: 1.8;
}

.about-section strong,
.contact-section strong {
    color: var(--gold-dark);
}

.stream-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stream-links a {
    display: inline-flex;
    align-items: center;

    min-height: 44px;
    padding: 10px 18px;

    background: var(--cream-light);
    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--navy-soft);
    font-weight: 700;

    transition: var(--transition);
}

.stream-links a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-dark);
}

.closing {
    text-align: center;
}

.closing p:first-child {
    color: var(--gold-dark);
    font-size: 1.25rem;
    font-weight: 700;
}


/* =========================================================
   LIBRARY CONTAINER
========================================================= */

.library {
    width: min(1180px, calc(100% - 48px));

    margin: 0 auto;

    padding: 70px 0 100px;

    box-sizing: border-box;
}


/* =========================================================
   LIBRARY HEADER
========================================================= */

.library-header {
    max-width: 820px;

    margin: 0 auto 70px;

    text-align: center;
}

.library-eyebrow,
.section-eyebrow,
.category-label {
    display: inline-block;

    color: var(--gold-dark);

    font-size: .75rem;
    font-weight: 800;

    letter-spacing: .18em;

    text-transform: uppercase;
}

.library-header h1 {
    margin: 12px 0 18px;

    color: var(--navy-dark);

    font-family: "DM Serif Display", Georgia, serif;

    font-size: clamp(2.8rem, 5vw, 4.5rem);

    line-height: 1.05;
}

.library-intro {
    max-width: 650px;

    margin: 0 auto;

    color: var(--text-soft);

    font-size: 1.05rem;

    line-height: 1.8;
}


/* =========================================================
   LIBRARY SECTIONS
========================================================= */

.library-section {
    margin-bottom: 80px;
}

.library-section:last-child {
    margin-bottom: 0;
}


/* =========================================================
   SECTION HEADING
========================================================= */

.library-section-heading {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}

.library-section-heading h2 {
    margin: 0;

    color: var(--navy-dark);

    font-family: "DM Serif Display", Georgia, serif;

    font-size: 2.2rem;

    line-height: 1.1;
}

.section-decoration {
    color: var(--gold);

    font-size: 1.5rem;
}


/* =========================================================
   FICTION
   Same visual language on desktop and mobile
========================================================= */

.fiction-grid {
    display: grid;

    grid-template-columns: 1fr;

    gap: 16px;

    width: 100%;
}


/* =========================================================
   BASE FICTION CARD
========================================================= */

.fiction-card {
    position: relative;

    width: 100%;

    min-height: 170px;

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    overflow: hidden;

    padding: 28px;

    box-sizing: border-box;

    border-radius: 24px;

    text-decoration: none;

    transition:
        transform .35s ease,
        box-shadow .35s ease,
        border-color .35s ease;
}

.fiction-card:hover {
    transform: translateY(-5px);
}

.fiction-card::after {
    content: "→";

    position: absolute;

    right: 28px;
    bottom: 24px;

    font-size: 1.4rem;

    opacity: .55;

    transition:
        transform .3s ease,
        opacity .3s ease;
}

.fiction-card:hover::after {
    transform: translateX(6px);

    opacity: 1;
}


/* =========================================================
   FICTION CARD CONTENT
========================================================= */

.fiction-card-content {
    display: block;

    position: relative;

    z-index: 2;
}

.fiction-card-content strong {
    display: block;

    line-height: 1.1;
}

.fiction-card-icon {
    display: none;
}

.fiction-card-content small {
    display: none;
}


/* =========================================================
   ROMANCE
   Soft / elegant / intimate
========================================================= */

.fiction-card[data-page="romance"] {
    min-height: 190px;

    background:
        linear-gradient(
            145deg,
            #fff8f7,
            #f5e7e7
        );

    border: 1px solid #ead4d4;

    box-shadow:
        0 15px 35px rgba(112, 66, 66, .10);
}

.fiction-card[data-page="romance"]::before {
    content: "♡";

    position: absolute;

    top: 20px;
    right: 28px;

    color: #c99494;

    font-family: Georgia, serif;

    font-size: 4rem;

    opacity: .35;
}

.fiction-card[data-page="romance"] strong {
    color: #704b52;

    font-family: "DM Serif Display", Georgia, serif;

    font-size: 2.1rem;
}

.fiction-card[data-page="romance"]::after {
    color: #a56d77;
}


/* =========================================================
   COMEDY
   Playful / energetic
========================================================= */

.fiction-card[data-page="comedy"] {
    min-height: 170px;

    background:
        linear-gradient(
            135deg,
            #fff9e9,
            #f7edc8
        );

    border: 2px dashed #d8c27d;

    border-radius: 18px;

    box-shadow:
        7px 7px 0 rgba(214, 179, 106, .22);
}

.fiction-card[data-page="comedy"] strong {
    color: #68552b;

    font-size: 1.9rem;

    font-weight: 800;
}

.fiction-card[data-page="comedy"]::before {
    content: "HA!";

    position: absolute;

    top: 23px;
    left: 28px;

    color: #c49d32;

    font-size: .85rem;

    font-weight: 900;

    letter-spacing: .15em;

    transform: rotate(-8deg);
}

.fiction-card[data-page="comedy"]::after {
    color: #80651e;
}


/* =========================================================
   SCI-FI
   Futuristic / mysterious
========================================================= */

.fiction-card[data-page="scifi"] {
    min-height: 180px;

    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(214,179,106,.18),
            transparent 28%
        ),
        linear-gradient(
            145deg,
            var(--navy-dark),
            #101f35 55%,
            #172f4c
        );

    border: 1px solid rgba(214,179,106,.28);

    box-shadow:
        0 20px 45px rgba(7,20,38,.28);
}

.fiction-card[data-page="scifi"] strong {
    color: var(--gold-light);

    font-family: "DM Serif Display", Georgia, serif;

    font-size: 2rem;
}

.fiction-card[data-page="scifi"]::before {
    content: "✦";

    position: absolute;

    top: 22px;
    right: 28px;

    color: var(--gold-light);

    font-size: 3rem;

    opacity: .5;

    animation:
        libraryStar 4s ease-in-out infinite;
}

.fiction-card[data-page="scifi"]::after {
    color: var(--gold-light);
}


/* =========================================================
   SCI-FI STAR ANIMATION
========================================================= */

@keyframes libraryStar {

    0%,
    100% {
        transform: scale(1);

        opacity: .4;
    }

    50% {
        transform: scale(1.25);

        opacity: .9;
    }

}


/* =========================================================
   NON-FICTION
========================================================= */

.nonfiction-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 24px;

    width: 100%;
}


/* =========================================================
   NON-FICTION CATEGORY
========================================================= */

.nonfiction-category {
    padding: 28px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 24px;

    box-shadow: var(--shadow-sm);

    box-sizing: border-box;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.nonfiction-category:hover {
    transform: translateY(-5px);

    box-shadow: var(--shadow);
}


/* =========================================================
   CATEGORY HEADER
========================================================= */

.category-header {
    display: flex;

    align-items: flex-start;

    gap: 18px;

    padding-bottom: 20px;

    border-bottom: 1px solid var(--border);
}

.category-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: var(--cream-light);

    font-size: 1.5rem;
}

.category-header h3 {
    margin: 5px 0 7px;

    color: var(--navy-dark);

    font-family: "DM Serif Display", Georgia, serif;

    font-size: 1.7rem;
}

.category-header p {
    margin: 0;

    color: var(--text-soft);

    font-size: .95rem;

    line-height: 1.6;
}


/* =========================================================
   BLOG
========================================================= */

.blog-category {
    border-top: 4px solid var(--gold);
}

.blog-category .category-icon {
    background: #f8f0dd;
}


/* =========================================================
   DISCUSSION
========================================================= */

.discussion-category {
    border-top: 4px solid var(--navy-soft);
}

.discussion-category .category-icon {
    background: #eaf0f7;
}


/* =========================================================
   CONTENT LIST
========================================================= */

.content-list {
    padding-top: 18px;
}

.content-list:empty {
    min-height: 45px;
}
/* =========================================================
   08. STORIES / CATEGORY PAGES
========================================================= */

.stories {
    width: min(calc(100% - 40px), 1000px);
    margin: 0 auto;
    padding: 35px 0 100px;
}

.stories > h1 {
    margin-bottom: 35px;
    color: var(--navy-dark);
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.story-card {
    display: flex;
    align-items: flex-start;
    gap: 25px;

    width: 100%;
    margin-bottom: 25px;
    padding: 24px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition: var(--transition);
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.story-card img {
    flex-shrink: 0;

    width: 180px;
    height: 260px;

    object-fit: cover;

    border-radius: 12px;
}

.story-content {
    flex: 1;
    min-width: 0;
}

.story-content h3 {
    margin-bottom: 10px;
    color: var(--navy-dark);
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.story-content p {
    color: var(--text-soft);
    line-height: 1.8;
}

.story-link:hover h3 {
    color: var(--gold-dark);
}


/* =========================================================
   09. READER / PDF.JS
========================================================= */

.book-layout {
    width: min(calc(100% - 30px), 1050px);
    margin: 25px auto 70px;
    text-align: center;
}

.book-page {
    width: 100%;
    padding: 15px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow);
}

#chapterTitle {
    margin: 5px 0 18px;
    color: var(--navy-dark);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

#chapterContent {
    width: 100%;
    margin: 0;
    padding: 0;

    background: #e9edf2;
}

.pdf-viewer {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;

    overflow: hidden;

    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.pdf-page {
    display: block;

    width: 100%;
    height: auto;

    margin: 0 auto;

    background: #fff;
}

.pdf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;

    padding: 12px 15px;

    background: var(--navy-dark);
    color: var(--white);
}

.pdf-controls button {
    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: var(--gold);
    color: var(--navy-dark);

    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;

    transition: var(--transition);
}

.pdf-controls button:hover {
    transform: scale(1.08);
    background: var(--gold-light);
}

.pdf-controls button:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
}

#pdfPageNumber {
    min-width: 70px;
    text-align: center;
    font-size: .95rem;
}

.book-nav {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    padding: 15px 5px;
}

.book-nav button {
    flex: 1;
    max-width: 260px;

    min-height: 48px;
    padding: 12px 18px;

    border: none;
    border-radius: 999px;

    background: var(--navy-dark);
    color: var(--white);

    font-weight: 700;

    transition: var(--transition);
}

.book-nav button:hover:not(:disabled) {
    background: var(--gold);
    color: var(--navy-dark);
    transform: translateY(-2px);
}

.book-nav button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.audio-bottom {
    width: min(calc(100% - 30px), 700px);
    margin: 20px auto;
}

.audio-bottom audio {
    width: 100%;
}

.reader-note {
    width: min(calc(100% - 30px), 700px);
    margin: 20px auto;

    padding: 15px 20px;

    background: var(--cream-light);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-sm);

    color: var(--text-soft);
    text-align: left;
}

.reader-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 25px;
}

.reader-nav a {
    display: inline-flex;
    align-items: center;

    min-height: 44px;
    padding: 9px 15px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--navy-soft);

    transition: var(--transition);
}

.reader-nav a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-dark);
}


/* =========================================================
   10. MUSIC LOUNGE
========================================================= */

.music-app {
    display: flex;
    width: 100%;
    min-height: calc(100vh - var(--navbar-height));
}

.sidebar {
    position: fixed;

    top: var(--navbar-height);
    left: 0;

    width: 260px;
    height: calc(100vh - var(--navbar-height));

    overflow-y: auto;

    padding: 25px;

    background: var(--navy-dark);
    color: var(--cream);

    border-right: 1px solid rgba(214,179,106,.16);

    z-index: 100;
}

.sidebar h3 {
    margin-bottom: 18px;
    color: var(--gold-light);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 7px;

    margin-bottom: 25px;
}

.sidebar nav a {
    display: block;

    min-height: 44px;
    padding: 10px 14px;

    border-radius: var(--radius-sm);

    color: var(--cream);

    transition: var(--transition);
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: var(--gold);
    color: var(--navy-dark);
}

.sidebar-card {
    margin-bottom: 20px;
    padding: 18px;

    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: var(--radius);
}

.sidebar-card h4 {
    color: var(--gold-light);
    margin-bottom: 12px;
}

.sidebar-card a {
    display: block;
    padding: 7px 0;
}

.music-content {
    flex: 1;
    min-width: 0;

    margin-left: 260px;
    padding: 40px 40px 170px;
}

.music-content section {
    margin-bottom: 45px;
}

.music-content section h2 {
    margin-bottom: 20px;
    color: var(--navy-dark);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.music-hero {
    padding: clamp(30px, 5vw, 60px);

    background: linear-gradient(135deg, var(--navy-dark), var(--navy-soft));

    color: var(--cream);

    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.music-hero h1 {
    margin-bottom: 15px;
    color: var(--gold-light);
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.music-hero p {
    max-width: 700px;
    color: rgba(255,255,255,.86);
}

.library-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.library-panel {
    padding: 22px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow-sm);
}

.library-panel h2 {
    margin-bottom: 15px;
    color: var(--navy-dark);
}

.library-panel ul {
    list-style: none;
    padding: 0;
}

.library-panel li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.library-panel li:last-child {
    border-bottom: none;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin: 15px 0 25px;
}

.category-buttons button {
    min-height: 42px;
    padding: 8px 16px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: var(--white);
    color: var(--navy-soft);

    font-size: .95rem;

    transition: var(--transition);
}

.category-buttons button:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-dark);
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.song-card {
    padding: 20px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow-sm);

    transition: var(--transition);
}

.song-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.song-card h3 {
    margin-bottom: 7px;
    color: var(--navy-dark);
    font-size: 1.15rem;
}

.song-card p {
    margin-bottom: 16px;
    color: var(--text-soft);
    font-size: .95rem;
}

.song-buttons,
.song-actions {
    display: flex;
    gap: 8px;
}

.song-buttons button,
.song-actions button {
    min-width: 40px;
    min-height: 40px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--cream-light);
    color: var(--navy-dark);

    transition: var(--transition);
}

.song-buttons button:hover,
.song-actions button:hover {
    background: var(--gold);
    border-color: var(--gold);
}

.active-favorite,
.active-queue {
    color: var(--gold-dark) !important;
}

.collection {
    margin-bottom: 14px;
    overflow: hidden;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 56px;
    padding: 15px 18px;

    cursor: pointer;
    font-weight: 700;
}

.collection-header:hover {
    background: var(--cream-light);
}

.collection-body {
    display: none;
    border-top: 1px solid var(--border);
}

.collection.open .collection-body {
    display: block;
}

.song-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
    padding: 14px 18px;

    border-bottom: 1px solid var(--border);
}

.song-row:last-child {
    border-bottom: none;
}

.song-title {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
}


/* =========================================================
   11. MUSIC PLAYER
========================================================= */

.player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 9998;

    min-height: 88px;

    display: flex;
    align-items: center;
    gap: 16px;

    padding: 12px 18px;

    background: rgba(5,13,26,.98);
    border-top: 1px solid rgba(214,179,106,.20);

    color: var(--cream);

    box-shadow: 0 -10px 30px rgba(0,0,0,.22);
}

.now-playing {
    width: 250px;
    min-width: 0;
    flex-shrink: 0;
}

.now-playing h3 {
    margin-bottom: 3px;
    color: var(--gold-light);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing p {
    margin-bottom: 2px;
    color: rgba(255,255,255,.72);
    font-size: .9rem;
}

#playbackSource {
    color: var(--gold);
    font-size: .78rem;
}

.controls {
    display: flex;
    align-items: center;
    gap: 7px;
}

.controls button,
.player-actions button {
    width: 42px;
    height: 42px;

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;

    background: rgba(255,255,255,.06);
    color: var(--cream);

    transition: var(--transition);
}

.controls button:hover,
.player-actions button:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

#playBtn {
    width: 50px;
    height: 50px;
    border-radius: 50%;

    background: var(--gold);
    color: var(--navy-dark);

    font-size: 1.15rem;
}

.progress {
    flex: 1;
    min-width: 120px;

    display: flex;
    align-items: center;
    gap: 8px;
}

.progress span {
    width: 42px;
    color: rgba(255,255,255,.68);
    font-size: .8rem;
    text-align: center;
}

.progress input,
.volume input {
    accent-color: var(--gold);
}

.progress input {
    flex: 1;
    min-width: 60px;
}

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

.volume input {
    width: 90px;
}

.player-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.player-actions button.active-playlist {
    background: var(--gold);
    color: var(--navy-dark);
    border-color: var(--gold);
}


/* =========================================================
   12. AMBIENCE
========================================================= */

#ambience-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;

    z-index: 9990;

    padding: 10px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);

    user-select: none;
    touch-action: none;
}

#toggle {
    width: 46px;
    height: 46px;

    border: none;
    border-radius: 50%;

    background: var(--navy-dark);
    color: var(--gold-light);

    font-size: 20px;
}

.ambience-menu {
    margin-top: 10px;
    padding: 10px;

    background: var(--cream-light);
    border-radius: var(--radius-sm);

    box-shadow: var(--shadow-sm);
}

.sound-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.sound-row button {
    width: 38px;
    height: 38px;

    border: none;
    border-radius: 9px;

    background: var(--white);
    color: var(--navy-dark);

    transition: var(--transition);
}

.sound-row button:hover {
    background: var(--gold);
    transform: scale(1.06);
}

.volume-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

#volumeSlider {
    width: 100px;
    accent-color: var(--gold);
}


/* =========================================================
   13. BESHY
========================================================= */

.beshy-toggle,
.beshy-chat,
.beshy-chat * {
    box-sizing: border-box;
}

.beshy-toggle {
    position: fixed;

    right: 20px;
    bottom: 90px;

    z-index: 9999;

    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--gold);
    border-radius: 50%;

    background: var(--navy-dark);
    color: var(--gold-light);

    font-size: 28px;
    line-height: 1;

    box-shadow:
        var(--shadow),
        0 0 25px rgba(214,179,106,.18);

    transition: transform var(--transition);
}

.beshy-toggle:hover {
    transform: scale(1.08);
}

.beshy-chat {
    position: fixed;

    right: 20px;
    bottom: 160px;

    z-index: 9999;

    display: none;
    flex-direction: column;

    width: 360px;
    height: 500px;

    overflow: hidden;

    background: var(--cream-light);
    color: var(--text);

    border: 1px solid rgba(214,179,106,.40);
    border-radius: var(--radius-lg);

    font-size: .95rem;

    box-shadow: var(--shadow-lg);
}

.beshy-chat.open {
    display: flex;
}

.beshy-header {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 60px;
    padding: 10px 14px;

    background: var(--navy-dark);
    color: var(--cream);
}

.beshy-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.beshy-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    font-size: 28px;
}

.beshy-identity h3 {
    margin: 0;
    color: var(--gold-light);
    font-size: 1rem;
}

.beshy-identity p {
    margin: 2px 0 0;
    color: rgba(255,255,255,.70);
    font-size: .78rem;
}

.beshy-close {
    width: 34px;
    height: 34px;

    border: none;
    background: transparent;

    color: var(--cream);
    font-size: 24px;
}

.beshy-messages {
    flex: 1;
    min-height: 0;

    padding: 12px;

    overflow-y: auto;
}

.beshy-message {
    width: fit-content;
    max-width: 84%;

    margin: 0 0 9px;
    padding: 9px 13px;

    border-radius: 14px;

    font-size: .95rem;
    line-height: 1.55;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.beshy-message p {
    margin: 0 0 6px;
    font-size: inherit;
    line-height: inherit;
}

.beshy-message p:last-child {
    margin-bottom: 0;
}

.beshy-message.bot {
    background: var(--white);
    color: var(--text);
}

.beshy-message.user {
    margin-left: auto;
    background: var(--navy);
    color: var(--cream);
}

.beshy-options {
    flex-shrink: 0;

    display: flex;
    gap: 6px;

    padding: 7px;

    overflow-x: auto;

    background: var(--white);
}

.beshy-options button {
    flex-shrink: 0;

    min-height: 36px;
    padding: 6px 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: var(--cream-light);
    color: var(--navy-soft);

    font-size: .85rem;
    white-space: nowrap;
}

.beshy-input-area {
    position: relative;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    gap: 6px;

    min-height: 60px;
    padding: 8px;

    background: var(--white);
    border-top: 1px solid var(--border);
}

.beshy-input-area input {
    flex: 1;
    min-width: 0;

    height: 42px;
    padding: 8px 13px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: var(--cream-light);
    color: var(--text);

    font-size: .95rem;
    outline: none;
}

.beshy-input-area input:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(214,179,106,.15);
}

.beshy-input-area button {
    flex-shrink: 0;

    width: 40px;
    height: 40px;

    border: none;
    background: transparent;

    color: var(--gold-dark);
    font-size: 20px;
}

.beshy-memory-controls {
    flex-shrink: 0;

    padding: 6px;

    background: var(--white);
    text-align: center;
}

.beshy-memory-controls button {
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: .78rem;
}


/* =========================================================
   14. FOOTER
========================================================= */

.footer {
    margin-top: 4rem;

    background: var(--navy-dark);
    color: var(--cream);

    border-top: 1px solid rgba(214,179,106,.18);
}

.footer__container {
    width: min(calc(100% - 40px), 1100px);
    margin: auto;

    padding: 42px 0;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer__logo {
    margin-bottom: 8px;

    font-family: Georgia, serif;
    font-size: 1.8rem;

    color: var(--gold-light);
}

.footer__text,
.small {
    color: rgba(255,255,255,.72);
}

.social__block {
    text-align: center;
}

.social__icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social__icons a {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(214,179,106,.55);
    border-radius: 50%;

    background: rgba(255,255,255,.04);

    transition: var(--transition);
}

.social__icons a:hover {
    background: var(--gold);
    color: var(--navy-dark);
    transform: translateY(-3px);
}

.social__custom-icon {
    width: 65%;
    height: 65%;
    object-fit: contain;
    border-radius: 50%;
}

.footer__bottom {
    padding: 15px;

    border-top: 1px solid rgba(255,255,255,.08);

    color: rgba(255,255,255,.55);
    text-align: center;
    font-size: .85rem;
}


/* =========================================================
   15. WELCOME / CAFÉ ENTRANCE
========================================================= */

:root {
    --cafe-night: #030914;
    --cafe-navy: #08172b;
    --cafe-blue: #102746;

    --cafe-gold: #d6b36a;
    --cafe-gold-light: #f3d99a;
    --cafe-cream: #fff4d6;

    --cafe-window: #f7d98c;
}

#welcome-screen {
    position: fixed;
    inset: 0;

    z-index: 99999;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    padding: 20px;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(35,71,110,.32),
            transparent 45%
        ),
        linear-gradient(
            180deg,
            #030914 0%,
            #050d1a 55%,
            #020711 100%
        );

    color: var(--cafe-cream);

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transition:
        opacity .8s ease,
        visibility .8s ease;
}

#welcome-screen::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;

    width: min(700px, 90vw);
    height: min(700px, 90vw);

    transform: translate(-50%, -50%);

    background:
        radial-gradient(
            circle,
            rgba(214,179,106,.10),
            rgba(214,179,106,.04) 35%,
            transparent 70%
        );

    pointer-events: none;
}

#welcome-screen::after {
    content: "✦     ·       ✧       ·     ✦       ·       ✧";

    position: absolute;
    top: 10%;
    left: 0;

    width: 100%;

    color: rgba(243,217,154,.40);
    font-size: 12px;
    letter-spacing: 28px;
    text-align: center;

    pointer-events: none;

    animation: floatingLights 8s ease-in-out infinite;
}

@keyframes floatingLights {
    0%, 100% {
        transform: translateY(0);
        opacity: .4;
    }

    50% {
        transform: translateY(-10px);
        opacity: .8;
    }
}

.welcome-title {
    position: relative;
    z-index: 5;

    margin: 0 0 22px;

    color: var(--cafe-gold-light);

    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 600;
    letter-spacing: .28em;
    text-align: center;
    text-transform: uppercase;

    text-shadow:
        0 0 12px rgba(214,179,106,.3),
        0 4px 20px rgba(0,0,0,.7);
}

.welcome-title::before,
.welcome-title::after {
    content: "✦";
    display: inline-block;
    margin: 0 14px;

    color: var(--cafe-gold);
    font-size: .5em;
    vertical-align: middle;
}

.cafe-entrance {
    position: relative;
    z-index: 2;

    width: min(390px, 78vw);
    height: 470px;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding-top: 32px;

    background:
        linear-gradient(
            145deg,
            #122744 0%,
            #08182d 55%,
            #061326 100%
        );

    border: 1px solid rgba(214,179,106,.45);
    border-radius: 180px 180px 28px 28px;

    box-shadow:
        0 35px 80px rgba(0,0,0,.6),
        0 0 50px rgba(214,179,106,.08),
        inset 0 0 40px rgba(255,255,255,.025);

    overflow: hidden;
}

.cafe-entrance::before {
    content: "";

    position: absolute;
    top: 15px;
    left: 50%;

    width: 72%;
    height: 80px;

    transform: translateX(-50%);

    border: 1px solid rgba(214,179,106,.30);
    border-bottom: none;
    border-radius: 50% 50% 0 0;

    pointer-events: none;
}

.cafe-sign {
    position: relative;
    z-index: 5;

    padding: 8px 20px;

    background: rgba(5,13,26,.90);

    border: 1px solid rgba(214,179,106,.55);
    border-radius: 50px;

    color: var(--cafe-gold-light);

    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.cafe-window {
    position: absolute;
    top: 125px;

    width: 62px;
    height: 82px;

    background:
        linear-gradient(
            90deg,
            transparent 46%,
            rgba(91,61,25,.7) 47%,
            rgba(91,61,25,.7) 53%,
            transparent 54%
        ),
        linear-gradient(
            0deg,
            transparent 46%,
            rgba(91,61,25,.7) 47%,
            rgba(91,61,25,.7) 53%,
            transparent 54%
        ),
        var(--cafe-window);

    border: 5px solid #7e6336;
    border-radius: 12px;

    box-shadow: 0 0 25px rgba(247,217,140,.30);

    overflow: hidden;
}

.cafe-window.left {
    left: 45px;
}

.cafe-window.right {
    right: 45px;
}

.cafe-window::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle,
            rgba(255,246,208,.45),
            transparent 70%
        );

    animation: windowGlow 4s ease-in-out infinite;
}

@keyframes windowGlow {
    0%, 100% { opacity: .6; }
    50% { opacity: 1; }
}

.cafe-door {
    position: absolute;
    left: 50%;
    bottom: 0;

    z-index: 4;

    width: 155px;
    height: 255px;

    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    background: linear-gradient(145deg,#172f4c,#09182b);

    border: 2px solid var(--cafe-gold);
    border-bottom: none;

    border-radius: 85px 85px 0 0;

    color: var(--cafe-cream);

    appearance: none;
    -webkit-appearance: none;

    box-shadow:
        inset 0 0 30px rgba(0,0,0,.35),
        0 0 35px rgba(214,179,106,.08);

    transition:
        transform .35s ease,
        box-shadow .35s ease,
        background .35s ease;
}

.cafe-door::before {
    content: "";

    position: absolute;
    left: -35px;
    right: -35px;
    bottom: 0;

    height: 260px;

    z-index: -1;

    background:
        radial-gradient(
            ellipse at center bottom,
            rgba(255,222,145,.28),
            transparent 68%
        );

    opacity: .5;
}

.cafe-door::after {
    content: "";

    position: absolute;
    inset: 18px;

    border: 1px solid rgba(214,179,106,.25);
    border-radius: 68px 68px 5px 5px;

    pointer-events: none;
}

.cafe-door:hover {
    transform: translateX(-50%) translateY(-6px);

    background: linear-gradient(145deg,#1d3c5f,#0c2038);

    box-shadow:
        0 0 25px rgba(214,179,106,.3),
        0 0 60px rgba(214,179,106,.12),
        inset 0 0 35px rgba(255,255,255,.04);
}

.cafe-door:hover::before {
    opacity: 1;
}

.door-content {
    position: relative;
    z-index: 5;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 12px;

    pointer-events: none;
}

.door-icon {
    color: var(--cafe-gold-light);
    font-size: 1.8rem;
    line-height: 1;

    filter: drop-shadow(0 0 10px rgba(243,217,154,.45));
}

.door-text {
    color: var(--cafe-gold-light);

    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .16em;
    line-height: 1.6;

    text-align: center;
    text-transform: uppercase;
}

.door-handle {
    position: absolute;
    top: 50%;
    right: 20px;

    width: 9px;
    height: 9px;

    transform: translateY(-50%);

    border-radius: 50%;
    background: var(--cafe-gold-light);

    box-shadow:
        0 0 8px rgba(243,217,154,.9),
        0 0 16px rgba(243,217,154,.3);
}

.welcome-tagline {
    position: relative;
    z-index: 5;

    margin: 20px 0 0;

    color: rgba(255,244,214,.78);

    font-size: .9rem;
    line-height: 1.6;
    letter-spacing: .08em;
    text-align: center;
}

.welcome-tagline span {
    display: block;
    margin-top: 4px;

    color: rgba(214,179,106,.75);
    font-size: .75rem;
    letter-spacing: .12em;
}

#welcome-screen.door-opening::before {
    animation: entranceLight 1.4s ease forwards;
}

#welcome-screen.door-opening .cafe-door {
    animation: doorOpen 1.1s ease forwards;
}

#welcome-screen.door-opening .cafe-entrance {
    animation: cafeGlow 1.2s ease forwards;
}

@keyframes entranceLight {
    0% {
        opacity: 1;
        transform: translate(-50%,-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%,-50%) scale(1.15);
    }

    100% {
        opacity: 1;
        transform: translate(-50%,-50%) scale(2.5);
    }
}

@keyframes doorOpen {
    0% {
        transform: translateX(-50%) scaleX(1);
        opacity: 1;
    }

    35% {
        transform: translateX(-50%) scaleX(.92);
    }

    100% {
        transform: translateX(-50%) scaleX(.08);
        opacity: .15;
    }
}

@keyframes cafeGlow {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.25); }
    100% { filter: brightness(1.7); }
}

#welcome-screen.exit {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


/* =========================================================
   16. RESPONSIVE — TABLET
========================================================= */

@media (max-width: 900px) {

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        width: 230px;
    }

    .music-content {
        margin-left: 230px;
    }

    .now-playing {
        width: 210px;
    }
}


/* =========================================================
   17. RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 768px) {

    :root {
        --navbar-height: 70px;
    }

    html {
        font-size: 17px;
    }

    body {
        font-size: 17px;
        line-height: 1.75;
    }

    /* NAV */

    #mobile-menu {
        display: block;
    }

    .navbar {
        min-height: var(--navbar-height);
        padding: 10px 16px;
    }

    .navbar__menu {
        display: none;

        position: absolute;
        top: 100%;
        left: 10px;
        right: 10px;

        flex-direction: column;
        align-items: stretch;
        gap: 4px;

        max-height: calc(100vh - 80px);
        overflow-y: auto;

        padding: 10px;

        background: var(--navy-dark);

        border: 1px solid rgba(214,179,106,.20);
        border-radius: 0 0 16px 16px;

        box-shadow: var(--shadow-lg);
    }

    .navbar__menu.active {
        display: flex;
    }

    .navbar__menu li {
        width: 100%;
    }

    .navbar__links {
        display: flex;
        width: 100%;

        min-height: 50px;
        padding: 12px 14px;

        border-radius: 10px;

        font-size: 1.08rem;
        white-space: normal;
    }

    .navbar__links::after {
        display: none;
    }

    .navbar__links:hover,
    .navbar__links.active {
        background: var(--navy-soft);
    }

    /* GLOBAL MOBILE TEXT */

    p,
    li,
    label,
    summary {
        font-size: 1rem;
        line-height: 1.75;
    }

    /* HOME */

    .cafe-home {
        padding: 20px 15px 60px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card-grid a {
        min-height: auto;
        padding: 22px;
    }

    .feature {
        padding: 28px 20px;
    }

    /* ABOUT */

    .about-container {
        width: calc(100% - 30px);
        margin-top: 25px;
    }

    .about-hero {
        padding: 45px 20px;
    }

    .about-section,
    .contact-section,
    .closing {
        padding: 22px 18px;
    }

    .stream-links {
        flex-direction: column;
    }

    .stream-links a {
        justify-content: center;
        width: 100%;
    }

    /* LIBRARY */

    .library {
        width: calc(100% - 30px);
        margin-top: 25px;
    }

    .library li a {
        padding: 16px;
        font-size: 1rem;
    }

    /* STORIES */

    .stories {
        width: calc(100% - 24px);
        padding: 25px 0 100px;
    }

    .story-card {
        flex-direction: column;
        align-items: center;

        text-align: center;

        padding: 20px;
    }

    .story-card img {
        width: min(220px, 70vw);
        height: auto;
        aspect-ratio: 2 / 3;
    }

    .story-content {
        width: 100%;
    }

    .story-content p {
        text-align: left;
        font-size: 1rem;
    }

    .read-btn {
        width: 100%;
    }

    /* READER */

    .book-layout {
        width: 100%;
        margin-top: 10px;
        padding: 0;
    }

    .book-page {
        padding: 6px;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        box-shadow: none;
    }

    #chapterTitle {
        padding: 12px 8px;
        font-size: 1.05rem;
    }

    .pdf-viewer {
        width: 100%;
        max-width: none;

        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .pdf-page {
        width: 100%;
        max-width: 100%;
    }

    .pdf-controls {
        gap: 20px;
        padding: 10px;
    }

    .pdf-controls button {
        width: 44px;
        height: 44px;
    }

    .book-nav {
        padding: 12px 5px;
        gap: 10px;
    }

    .book-nav button {
        max-width: none;
        min-height: 50px;
        padding: 11px 8px;
        font-size: .95rem;
    }

    .reader-nav {
        gap: 8px;
        padding-inline: 10px;
    }

    .reader-nav a {
        font-size: .95rem;
    }

    /* MUSIC */

    .music-app {
        flex-direction: column;
    }

    .music-content {
        order: 1;
        margin-left: 0;
        padding: 25px 15px 250px;
    }

    .sidebar {
        position: relative;
        top: auto;
        left: auto;
        order: 2;

        width: 100%;
        height: auto;

        padding: 20px;

        border-top: 1px solid rgba(214,179,106,.18);
        border-right: none;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar nav a {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .library-panels {
        grid-template-columns: 1fr;
    }

    .song-grid {
        grid-template-columns: 1fr;
    }

    .song-card {
        padding: 20px;
    }

    .song-card h3 {
        font-size: 1.15rem;
    }

    .song-card p {
        font-size: .95rem;
    }

    .category-buttons button {
        min-height: 44px;
        font-size: .95rem;
    }

    .song-row {
        padding: 14px 12px;
    }

    .song-title {
        font-size: 1rem;
    }

    /* MUSIC PLAYER */

    .player {
        display: grid;

        grid-template-columns: minmax(0,1fr) auto;

        gap: 7px 8px;

        min-height: 125px;

        padding: 9px 10px;
    }

    .now-playing {
        grid-column: 1;
        width: auto;
    }

    .now-playing h3 {
        font-size: .95rem;
    }

    .now-playing p {
        font-size: .82rem;
    }

    .controls {
        grid-column: 2;
        gap: 4px;
    }

    .controls button,
    .player-actions button {
        width: 38px;
        height: 38px;
    }

    #playBtn {
        width: 46px;
        height: 46px;
    }

    .progress {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
    }

    .volume {
        display: none;
    }

    .player-actions {
        grid-column: 2;
        grid-row: 3;
    }

    /* AMBIENCE */

    #ambience-panel {
        right: 10px;
        bottom: 10px;
    }

    /* BESHY */

    .beshy-toggle {
        right: 14px;
        bottom: 80px;

        width: 54px;
        height: 54px;

        font-size: 25px;
    }

    .beshy-chat {
        right: 10px;
        bottom: 145px;

        width: calc(100vw - 20px);
        height: min(75vh, 600px);
    }

    .beshy-message {
        max-width: 88%;
        font-size: .95rem;
    }

    .beshy-options button {
        min-height: 38px;
        font-size: .85rem;
    }

    .beshy-input-area input {
        font-size: 1rem;
    }

    /* FOOTER */

    .footer__container {
        flex-direction: column;
        text-align: center;
        padding: 35px 20px;
    }

    /* WELCOME */

    #welcome-screen {
        padding: 16px;
    }

    .welcome-title {
        margin-bottom: 16px;
        font-size: 1.35rem;
        letter-spacing: .18em;
    }

    .cafe-entrance {
        width: min(340px, 82vw);
        height: 430px;
        padding-top: 28px;
    }

    .cafe-window {
        top: 112px;
        width: 52px;
        height: 70px;
    }

    .cafe-window.left {
        left: 32px;
    }

    .cafe-window.right {
        right: 32px;
    }

    .cafe-door {
        width: 135px;
        height: 225px;
    }

    .welcome-tagline {
        margin-top: 16px;
        font-size: .82rem;
    }
}


/* =========================================================
   18. SMALL PHONES
========================================================= */

@media (max-width: 480px) {

    html {
        font-size: 17px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .hero h1,
    .library > h1,
    .stories > h1 {
        font-size: 1.9rem;
    }

    .cafe-home {
        padding-inline: 12px;
    }

    .about-container,
    .library {
        width: calc(100% - 24px);
    }

    .book-layout {
        padding: 0;
    }

    .book-page {
        padding: 4px;
    }

    .book-nav {
        flex-direction: column;
    }

    .reader-nav a {
        width: 100%;
        justify-content: center;
    }

    .beshy-chat {
        right: 6px;
        width: calc(100vw - 12px);
        bottom: 135px;
        height: 78vh;
    }

    .beshy-toggle {
        right: 10px;
        bottom: 75px;
    }

    .footer__container {
        width: calc(100% - 24px);
    }

    /* Welcome */

    .welcome-title {
        margin-bottom: 14px;
        font-size: 1.12rem;
        letter-spacing: .13em;
    }

    .welcome-title::before,
    .welcome-title::after {
        margin-inline: 6px;
    }

    .cafe-entrance {
        width: min(300px, 84vw);
        height: 390px;
        padding-top: 24px;
        border-radius: 140px 140px 22px 22px;
    }

    .cafe-sign {
        padding: 7px 15px;
        font-size: .72rem;
    }

    .cafe-window {
        top: 98px;
        width: 44px;
        height: 60px;
        border-width: 4px;
    }

    .cafe-window.left {
        left: 25px;
    }

    .cafe-window.right {
        right: 25px;
    }

    .cafe-door {
        width: 120px;
        height: 205px;
    }

    .door-text {
        font-size: .65rem;
    }

    .door-icon {
        font-size: 1.5rem;
    }

    .welcome-tagline {
        margin-top: 14px;
        font-size: .76rem;
    }

    .welcome-tagline span {
        font-size: .68rem;
    }
}


/* =========================================================
   19. VERY SHORT SCREENS
========================================================= */

@media (max-height: 650px) and (max-width: 600px) {

    #welcome-screen {
        padding: 10px;
    }

    .welcome-title {
        margin-bottom: 8px;
        font-size: 1rem;
    }

    .cafe-entrance {
        width: min(280px, 72vw);
        height: 315px;
        padding-top: 18px;
    }

    .cafe-sign {
        padding: 5px 12px;
        font-size: .65rem;
    }

    .cafe-window {
        top: 75px;
        width: 38px;
        height: 50px;
    }

    .cafe-window.left {
        left: 22px;
    }

    .cafe-window.right {
        right: 22px;
    }

    .cafe-door {
        width: 100px;
        height: 170px;
    }

    .door-icon {
        font-size: 1.2rem;
    }

    .door-text {
        font-size: .55rem;
    }

    .welcome-tagline {
        margin-top: 8px;
        font-size: .65rem;
    }
}


/* =========================================================
   20. ACCESSIBILITY / MOTION
========================================================= */

.cafe-door:focus-visible {
    outline: 3px solid var(--cafe-gold-light);
    outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* =========================================================
   DIGICAFE — CONSOLIDATED PERSONALITY LAYER
   ---------------------------------------------------------
   Keep the existing page/component class names.
   Playroom styling stays in playroom.css.

   Background images:
   Add the real image URL to the matching custom property,
   or change the url() directly when you know the filename.
========================================================= */

:root {
    --dc-ink: #172033;
    --dc-navy: #050d1a;
    --dc-navy-2: #0b1c33;
    --dc-gold: #d6b36a;
    --dc-gold-soft: #f3d99a;
    --dc-cream: #f5efe6;
    --dc-paper: #fbf8f2;
    --dc-white: #ffffff;
    --dc-muted: #667085;
    --dc-border: rgba(23, 32, 51, .10);
    --dc-glass: rgba(255,255,255,.84);
    --dc-glass-strong: rgba(255,255,255,.94);

    /* Put your real paths here when ready. */
    --dc-lobby-bg: none;
    --dc-music-bg: none;
    --dc-library-bg: none;
    --dc-reader-bg: none;
    --dc-creative-bg: none;
}

/* ---------- Shared page atmosphere ---------- */

body.lobby-page,
body.music-page,
body.library-page,
body.reader-page,
body.creative-page {
    position: relative;
    min-height: 100vh;
    isolation: isolate;
    background-color: var(--dc-cream);
}

body.lobby-page::before,
body.music-page::before,
body.library-page::before,
body.reader-page::before,
body.creative-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    pointer-events: none;
}

body.lobby-page::after,
body.music-page::after,
body.library-page::after,
body.reader-page::after,
body.creative-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(5,13,26,.06), rgba(5,13,26,.16));
}

body.lobby-page::before { background-image: var(--dc-lobby-bg); }
body.music-page::before { background-image: var(--dc-music-bg); }
body.library-page::before { background-image: var(--dc-library-bg); }
body.reader-page::before { background-image: var(--dc-reader-bg); }
body.creative-page::before { background-image: var(--dc-creative-bg); }

/* ---------- Shared glass surfaces ---------- */

body.lobby-page .hero,
body.lobby-page .card-grid a,
body.lobby-page .feature,
body.library-page .library li a,
body.library-page .library details,
body.reader-page .book-page,
body.creative-page .about-section,
body.creative-page .contact-section,
body.creative-page .closing,
body.music-page .library-panel,
body.music-page .song-card,
body.music-page .collection,
body.reader-page .reader-note,
body.account-page-body .account-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ---------- Shared room headers ---------- */

.hero,
.music-hero,
.about-hero {
    position: relative;
    overflow: hidden;
}

.hero::before,
.music-hero::before,
.about-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(243,217,154,.14), transparent 35%),
        radial-gradient(circle at 88% 82%, rgba(255,255,255,.06), transparent 34%);
}

/* ---------- Lobby ---------- */

body.lobby-page .card-grid a::before {
    content: "✦";
    position: absolute;
    top: 18px;
    right: 20px;
    color: rgba(214,179,106,.32);
    font-size: 1.1rem;
    pointer-events: none;
}

body.lobby-page .card-grid a {
    position: relative;
    overflow: hidden;
}

/* ---------- Library ---------- */

body.library-page .library > h1,
body.library-page .library-section h2 {
    text-shadow: 0 2px 20px rgba(255,255,255,.65);
}

body.library-page .library details[open] {
    box-shadow: 0 12px 34px rgba(7,20,38,.13);
}

/* ---------- Reader ---------- */

body.reader-page .book-layout {
    position: relative;
}

body.reader-page .book-page {
    border-color: rgba(214,179,106,.22);
}

/* ---------- Creative Studio ---------- */

body.creative-page .creative-highlight > div {
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

body.creative-page .creative-highlight > div:hover {
    border-color: rgba(214,179,106,.48);
    box-shadow: 0 14px 34px rgba(7,20,38,.13);
}

/* ---------- Account ---------- */

body.account-page-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 10%, rgba(214,179,106,.14), transparent 34%),
        linear-gradient(180deg, #f8f2e9, #f5efe6);
}

body.account-page-body .account-card {
    border-color: rgba(214,179,106,.28);
}

/* ---------- Interaction component ---------- */

.digi-interactions {
    position: relative;
}

.digi-interactions::before {
    content: "";
    display: block;
    width: 46px;
    height: 2px;
    margin: 0 auto 15px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.interaction-like:focus-visible,
.interaction-comment:focus-visible,
.comment-submit:focus-visible,
.account-button:focus-visible,
.btn:focus-visible,
.read-btn:focus-visible {
    outline: 3px solid var(--gold-light);
    outline-offset: 3px;
}


/* =========================================================
   MOBILE POLISH — MASTER SHEET
========================================================= */

@media (max-width: 768px) {

    body.lobby-page::before,
    body.music-page::before,
    body.library-page::before,
    body.reader-page::before,
    body.creative-page::before {
        background-attachment: scroll;
    }

    body.lobby-page .hero,
    body.music-page .music-hero,
    body.creative-page .about-hero {
        border-radius: 22px;
    }

    .content-wrapper {
        width: calc(100% - 24px);
        padding: 18px;
        border-radius: 22px;
    }
}

@media (max-width: 480px) {

    .hero,
    .music-hero,
    .about-hero {
        border-radius: 18px;
    }

    .card,
    .content-box,
    .library-panel,
    .song-card,
    .collection,
    .account-card {
        border-radius: 16px;
    }
}

/* =========================================================
   DIGICAFE MASTER CSS — MOBILE CORRECTION LAYER
   Preserve existing HTML classes, IDs and JavaScript.
   Add this entire section at the END of DigiCafe_master_style.css.
   Playroom-specific styling remains in playroom.css.
========================================================= */


/* ---------------------------------------------------------
   1. MOBILE-SAFE GLOBAL BASE
--------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

img,
video,
iframe,
canvas,
svg {
    max-width: 100%;
}

input,
textarea,
select,
button {
    max-width: 100%;
}

button,
a,
input,
textarea,
select {
    touch-action: manipulation;
}

:focus-visible {
    outline: 3px solid var(--gold-light, #f3d99a);
    outline-offset: 3px;
}


/* ---------------------------------------------------------
   2. SHARED CONTENT AND CARDS
--------------------------------------------------------- */

main,
section,
article,
.content-wrapper,
.music-content,
.music-container {
    min-width: 0;
}

.card-grid,
.card-container,
.card-grid,
.feature-grid,
.creative-highlight {
    min-width: 0;
}

.card,
.content-box,
.library-panel,
.song-card,
.collection,
.account-card {
    min-width: 0;
    overflow-wrap: anywhere;
}

.card img,
.song-card img,
.collection img {
    height: auto;
    max-width: 100%;
    object-fit: cover;
}

pre,
code {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

table {
    max-width: 100%;
}

button {
    -webkit-tap-highlight-color: transparent;
}


/* ---------------------------------------------------------
   3. TABLETS AND SMALLER LAPTOPS
--------------------------------------------------------- */

@media (max-width: 900px) {

    .music-app {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .sidebar {
        width: 100%;
        max-width: 100%;
    }

    .music-content {
        width: 100%;
        min-width: 0;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .now-playing {
        min-width: 0;
    }

}


/* ---------------------------------------------------------
   4. MOBILE NAVIGATION
--------------------------------------------------------- */

@media (max-width: 768px) {

    :root {
        --navbar-height: 70px;
    }

    body {
        padding-top: var(--navbar-height);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10000;

        width: 100%;
        min-height: var(--navbar-height);
        padding: 10px 14px;
    }

    .navbar__menu {
        max-width: calc(100vw - 20px);
        max-height: calc(100dvh - var(--navbar-height) - 16px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .navbar__links {
        overflow-wrap: anywhere;
    }

    #mobile-menu {
        min-width: 44px;
        min-height: 44px;
    }

    main {
        width: 100%;
        min-width: 0;
    }

    .content-wrapper {
        width: calc(100% - 24px);
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 18px;
    }

    .hero,
    .music-hero,
    .about-hero {
        padding: clamp(20px, 5vw, 32px);
        border-radius: 22px;
        overflow-wrap: anywhere;
    }

    h1 {
        font-size: clamp(1.65rem, 6vw, 2.5rem);
        overflow-wrap: anywhere;
    }

    h2 {
        font-size: clamp(1.35rem, 5vw, 2rem);
        overflow-wrap: anywhere;
    }

    p {
        overflow-wrap: anywhere;
    }

    .card-grid,
    .card-container,
    .feature-grid,
    .creative-highlight {
        grid-template-columns: minmax(0, 1fr);
    }

    .card,
    .content-box,
    .library-panel,
    .song-card,
    .collection,
    .account-card {
        max-width: 100%;
        border-radius: 16px;
    }

    button,
    .btn,
    .read-btn,
    .account-button {
        min-height: 42px;
    }

    input,
    textarea,
    select {
        min-width: 0;
        font-size: 16px;
    }

}


/* ---------------------------------------------------------
   5. MUSIC LOUNGE LAYOUT
   Preserve existing music page classes and controls.
--------------------------------------------------------- */

@media (max-width: 768px) {

    .music-app {
        display: block;
        width: 100%;
        min-height: auto;
        padding-bottom: 150px;
    }

    .music-app .sidebar {
        position: relative;
        top: auto;
        left: auto;

        width: 100%;
        height: auto;
        max-height: none;

        padding: 16px;
        overflow: visible;
    }

    .music-app .sidebar nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .music-app .sidebar nav a {
        flex: 1 1 130px;
        min-width: 0;
    }

    .music-content {
        width: 100%;
        margin-left: 0;
        padding: 20px 14px 30px;
    }

    .music-content section {
        margin-bottom: 28px;
    }

    .music-hero {
        padding: 24px 18px;
    }

    .song-row {
        min-width: 0;
        gap: 10px;
        flex-wrap: wrap;
    }

    .song-title {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .stream-links {
        min-width: 0;
        overflow-wrap: anywhere;
    }

}


/* ---------------------------------------------------------
   6. GLOBAL MUSIC PLAYER
   Keep the original .player and control IDs.
--------------------------------------------------------- */

.player {
    z-index: 9998;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
}

.player *,
.player *::before,
.player *::after {
    min-width: 0;
}

.now-playing h3,
#trackTitle,
#trackArtist,
#playbackSource {
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
}

#progressBar,
#volumeSlider {
    accent-color: var(--gold, #d6b36a);
}

@media (max-width: 768px) {

    body {
        padding-bottom: 155px;
    }

    .player {
        left: 0;
        right: 0;
        bottom: 0;

        width: 100%;
        max-width: 100%;

        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;

        gap: 8px 10px;
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));

        min-height: 0;
    }

    .now-playing {
        grid-column: 1;
        grid-row: 1;

        width: 100%;
        min-width: 0;
        flex-shrink: 1;
    }

    .now-playing h3,
    #trackTitle {
        margin-bottom: 2px;
        font-size: .9rem;
        line-height: 1.3;
    }

    .now-playing p,
    #trackArtist,
    #playbackSource {
        font-size: .72rem;
        line-height: 1.3;
    }

    .controls {
        grid-column: 2;
        grid-row: 1;

        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .controls button,
    .player-actions button {
        width: 34px;
        height: 38px;
        min-width: 34px;
        min-height: 38px;
        padding: 3px;
        font-size: .9rem;
    }

    #playBtn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }

    .progress {
        grid-column: 1 / -1;
        grid-row: 2;

        display: flex;
        width: 100%;
        min-width: 0;
        gap: 6px;
    }

    .progress span {
        width: auto;
        min-width: 34px;
        font-size: .7rem;
    }

    .progress input {
        width: 100%;
        min-width: 0;
    }

    .volume {
        display: none;
    }

    .player-actions {
        display: flex;
        flex-shrink: 0;
        gap: 4px;
    }

    #favoriteBtn {
        font-size: 1.1rem;
    }

}


/* ---------------------------------------------------------
   7. BESHY CHAT
   Preserve the existing open class and chat functionality.
--------------------------------------------------------- */

.beshy-toggle {
    z-index: 10001;
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    touch-action: manipulation;
}

.beshy-chat {
    z-index: 10002;
    overscroll-behavior: contain;
}

.beshy-messages {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    overflow-wrap: anywhere;
    -webkit-overflow-scrolling: touch;
}

.beshy-message {
    max-width: 90%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.beshy-options {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.beshy-input-area {
    flex-shrink: 0;
}

.beshy-input-area input,
.beshy-input-area textarea {
    min-width: 0;
    width: 100%;
    font-size: 16px;
}

.beshy-input-area button,
.beshy-close {
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
}

@media (max-width: 768px) {

    .beshy-toggle {
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
        font-size: 24px;

        right: 12px;
        bottom: calc(165px + env(safe-area-inset-bottom, 0px));
    }

    .beshy-chat {
        position: fixed;

        left: 10px;
        right: 10px;
        top: auto;

        bottom: calc(225px + env(safe-area-inset-bottom, 0px));

        width: auto;
        max-width: none;

        height: min(58dvh, 500px);
        max-height: calc(100dvh - 250px - env(safe-area-inset-bottom, 0px));
        min-height: 220px;

        border-radius: 20px;
    }

    .beshy-header {
        min-height: 54px;
        padding: 8px 12px;
    }

    .beshy-messages {
        padding: 10px;
    }

    .beshy-message {
        max-width: 92%;
        padding: 9px 11px;
        font-size: .9rem;
    }

    .beshy-options {
        gap: 6px;
        padding: 7px;
    }

    .beshy-options button {
        min-height: 40px;
        font-size: .85rem;
    }

    .beshy-input-area {
        gap: 6px;
        padding: 8px;
    }

    .beshy-memory-controls {
        flex-wrap: wrap;
    }

}


/* ---------------------------------------------------------
   8. CAFÉ ENTRANCE / WELCOME SCREEN
   Preserve entrance dimensions on desktop and existing effects.
--------------------------------------------------------- */

#welcome-screen {
    max-width: 100%;
    overflow-x: clip;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
}

.cafe-entrance {
    flex-shrink: 0;
    max-width: 100%;
}

.cafe-door {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.cafe-door:focus-visible {
    outline: 3px solid var(--cafe-gold-light, #f3d99a);
    outline-offset: 4px;
}

@media (max-width: 768px) {

    #welcome-screen {
        min-height: calc(100svh - var(--navbar-height, 70px));
        padding-top: 20px;
        padding-bottom: 24px;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .welcome-title {
        max-width: 100%;
        margin-bottom: 16px;

        font-size: clamp(1rem, 4.5vw, 1.5rem);
        line-height: 1.4;
        letter-spacing: .12em;
        overflow-wrap: anywhere;
    }

    .welcome-title::before,
    .welcome-title::after {
        margin: 0 5px;
    }

    .cafe-entrance {
        width: min(340px, 88vw);
        height: clamp(330px, 58svh, 430px);
        padding-top: clamp(22px, 5vh, 30px);
    }

    .cafe-window {
        top: 24%;
        width: clamp(38px, 13vw, 52px);
        height: clamp(52px, 17vw, 70px);
    }

    .cafe-window.left {
        left: 9%;
    }

    .cafe-window.right {
        right: 9%;
    }

    .cafe-door {
        width: clamp(105px, 37vw, 135px);
        height: clamp(175px, 31vh, 225px);
        max-width: 75%;
    }

    .door-text {
        overflow-wrap: anywhere;
        text-align: center;
    }

    .welcome-tagline {
        max-width: 90vw;
        margin-top: 12px;
        font-size: clamp(.72rem, 3vw, .88rem);
        text-align: center;
        overflow-wrap: anywhere;
    }

}


/* ---------------------------------------------------------
   9. SMALL PHONES
--------------------------------------------------------- */

@media (max-width: 480px) {

    html {
        font-size: 16px;
    }

    body {
        font-size: 16px;
        line-height: 1.65;
    }

    .content-wrapper {
        width: calc(100% - 16px);
        padding: 14px;
        border-radius: 18px;
    }

    .hero,
    .music-hero,
    .about-hero {
        padding: 20px 14px;
        border-radius: 18px;
    }

    .card,
    .content-box,
    .library-panel,
    .song-card,
    .collection,
    .account-card {
        padding: 14px;
        border-radius: 14px;
    }

    .music-content {
        padding: 16px 10px 24px;
    }

    .music-app {
        padding-bottom: 145px;
    }

    .player {
        gap: 7px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .controls {
        gap: 3px;
    }

    .controls button,
    .player-actions button {
        width: 31px;
        min-width: 31px;
        height: 36px;
        min-height: 36px;
        font-size: .82rem;
    }

    #playBtn {
        width: 39px;
        min-width: 39px;
        height: 39px;
        min-height: 39px;
    }

    .now-playing h3,
    #trackTitle {
        font-size: .82rem;
    }

    #trackArtist,
    #playbackSource {
        font-size: .68rem;
    }

    .progress span {
        min-width: 30px;
        font-size: .66rem;
    }

    .beshy-chat {
        left: 8px;
        right: 8px;
        bottom: calc(218px + env(safe-area-inset-bottom, 0px));
        height: min(55dvh, 440px);
        max-height: calc(100dvh - 235px - env(safe-area-inset-bottom, 0px));
    }

    .beshy-toggle {
        right: 10px;
    }

    .footer__container {
        padding: 28px 14px;
    }

}


/* ---------------------------------------------------------
   10. VERY SHORT PHONE SCREENS
--------------------------------------------------------- */

@media (max-height: 650px) and (max-width: 600px) {

    #welcome-screen {
        justify-content: flex-start;
        padding-top: 10px;
        padding-bottom: 14px;
    }

    .welcome-title {
        margin-bottom: 8px;
        font-size: 1rem;
    }

    .cafe-entrance {
        width: min(280px, 72vw);
        height: min(315px, 52svh);
        min-height: 245px;
        padding-top: 18px;
    }

    .cafe-window {
        top: 23%;
        width: 38px;
        height: 50px;
    }

    .cafe-door {
        width: 100px;
        height: min(170px, 29svh);
        min-height: 125px;
    }

    .door-icon {
        font-size: 1.2rem;
    }

    .door-text {
        font-size: .55rem;
    }

    .welcome-tagline {
        margin-top: 8px;
        font-size: .68rem;
    }

    .beshy-chat {
        height: min(48dvh, 340px);
        min-height: 200px;
    }

}


/* ---------------------------------------------------------
   11. ACCESSIBILITY AND REDUCED MOTION
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }

}


/* ---------------------------------------------------------
   END OF MOBILE CORRECTION LAYER
--------------------------------------------------------- */
