:root {
  color-scheme: light;
  --ink: #202a31;
  --muted: #8d9695;
  --paper: #f6f4ee;
  --white: #fffefa;
  --line: #e9e7df;
  --green: #304c43;
  --coral: #e8866b;
  --sidebar-width: 246px;
  font-family: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body:not(.authenticated) .app-shell,
body:not(.authenticated) .player-bar { display: none; }
body.authenticated .auth-screen { display: none; }

.auth-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow-y: auto;
  padding: 28px 18px;
  background:
    radial-gradient(ellipse at 85% 12%, rgba(196, 169, 126, .18), transparent 34%),
    var(--paper);
}
.auth-card {
  width: min(100%, 410px);
  padding: 38px;
  border: 1px solid #e9e7df;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 18px 55px rgba(48, 57, 48, .08);
}
.auth-brand { margin: 0 0 45px; }
.auth-eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; color: #838d85; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.auth-card h1 { margin-bottom: 8px; font-size: 30px; }
.auth-intro { margin-bottom: 25px; color: #858f87; font-size: 13px; line-height: 1.6; }
#auth-form { display: grid; gap: 14px; }
.auth-field { display: grid; gap: 7px; color: #56635b; font-size: 11px; font-weight: 700; }
.auth-field input { width: 100%; min-height: 47px; padding: 0 12px; border: 1px solid #dedfd7; border-radius: 6px; background: #fff; color: var(--ink); font-size: 16px; }
.auth-field input:focus { border-color: #829589; outline: 3px solid rgba(130, 149, 137, .2); }
.auth-submit { min-height: 47px; margin-top: 3px; border: 0; border-radius: 6px; background: var(--green); color: #fffdf6; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .18s, opacity .18s; }
.auth-submit:hover { background: #263f36; }
.auth-submit:disabled { cursor: wait; opacity: .65; }
.auth-reset { justify-self: center; padding: 8px 12px; border: 0; background: transparent; color: #61796b; font-size: 11px; font-weight: 600; cursor: pointer; }
.auth-reset:hover { text-decoration: underline; }
.auth-error { margin: 0; padding: 10px 12px; border-radius: 5px; background: #fbefeb; color: #9c5145; font-size: 11px; line-height: 1.5; }
.auth-loading { margin: 0; color: #79867d; font-size: 12px; }
.auth-note { margin: 24px 0 0; padding-top: 17px; border-top: 1px solid #efede6; color: #9aa198; font-size: 10px; text-align: center; }

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid #e8a68f; outline-offset: 3px; }

.app-shell { min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: 31px 18px 22px;
  background: #fffefa;
  border-right: 1px solid #efede6;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin: 1px 0 52px 7px;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1.3px;
  text-decoration: none;
}

.brand-light { color: #a0a7a0; font-weight: 500; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--green); color: #f3c9a4; font-family: Georgia, serif; font-size: 24px; font-style: italic; line-height: 1; }
.sidebar-label { padding: 0 10px; color: #9da29e; font-size: 9px; font-weight: 700; letter-spacing: 1.45px; }
.main-nav { display: grid; gap: 5px; margin-top: 12px; }

.nav-link, .family-person, .settings-link {
  display: flex;
  align-items: center;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-link { gap: 12px; min-height: 44px; padding: 0 11px; border-radius: 8px; color: #727d79; font-size: 12px; font-weight: 500; transition: background .2s, color .2s; }
.nav-link svg, .settings-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover, .family-person:hover, .settings-link:hover { background: #f5f4ee; color: var(--ink); }
.nav-link.active { background: #edf0e9; color: var(--green); font-weight: 700; }
.nav-link.active svg { stroke-width: 1.8; }
.nav-count { margin-left: auto; color: #a3aaa5; font-size: 10px; }
.sidebar-divider { height: 1px; margin: 23px 10px 25px; background: #efede7; }
.family-list { display: grid; gap: 7px; margin-top: 12px; }
.family-person { gap: 11px; min-height: 39px; padding: 0 10px; border-radius: 8px; color: #68736f; font-size: 12px; }
.family-person.selected { color: var(--ink); font-weight: 600; }
.avatar { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; font-size: 10px; font-weight: 700; }
.avatar-all { background: #f2e3ce; color: #9c6845; font-size: 14px; }
.avatar-mom { background: #e9d8d1; color: #986a5e; }
.avatar-dad { background: #d7e3dd; color: #567262; }
.avatar-kids { background: #e3dcef; color: #7a6895; }
.sidebar-bottom { margin-top: auto; }
.family-note { padding: 17px 15px 15px; position: relative; overflow: hidden; border-radius: 10px; background: #f1f0e8; }
.note-sparkle { color: #be9361; font-size: 18px; }
.family-note p { margin: 10px 0 13px; color: #78817b; font-size: 10px; line-height: 1.7; }
.family-note p strong { color: #394841; font-size: 11px; font-weight: 700; }
.note-link { padding: 0; border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 700; cursor: pointer; }
.note-link span { margin-left: 4px; font-size: 13px; }
.settings-link { gap: 11px; width: 100%; margin-top: 20px; padding: 9px 10px; border-radius: 7px; color: #79827e; font-size: 11px; }

.main-content { min-height: 100vh; margin-left: var(--sidebar-width); padding: 0 5.1% 118px; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9e7df; }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: #9ba19b; font-size: 11px; }
.crumb-slash { color: #d2d2ca; }
.breadcrumbs strong { color: #59645f; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 19px; }
.search-box { display: flex; align-items: center; gap: 9px; width: 216px; height: 36px; padding: 0 10px; border: 1px solid #e8e6de; border-radius: 6px; background: #fffefa; color: #9ca39e; }
.search-box svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.search-box input::placeholder { color: #a5aaa4; }
.search-box kbd { flex: 0 0 auto; padding: 3px 4px; border: 1px solid #efeee8; border-radius: 3px; color: #a4aaa4; font-family: inherit; font-size: 8px; }
.icon-button { display: grid; place-items: center; width: 33px; height: 33px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #68746d; cursor: pointer; transition: background .18s, transform .18s; }
.icon-button:hover { background: #eeede6; transform: translateY(-1px); }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.notification-button { position: relative; }
.notification-dot { position: absolute; top: 6px; right: 7px; width: 5px; height: 5px; border: 1px solid var(--paper); border-radius: 50%; background: var(--coral); }
.logout-button { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid #e8e6de; border-radius: 6px; background: #fffefa; color: #58685e; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .18s, border-color .18s; }
.logout-button:hover { border-color: #cbd4ca; background: #f0f2ec; }
.logout-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.page-view { max-width: 1220px; margin: 0 auto; animation: page-in .3s ease both; }
.page-view.hidden { display: none; }
.welcome-row { display: flex; align-items: end; justify-content: space-between; padding: 33px 0 23px; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: #838d85; font-size: 8px; font-weight: 700; letter-spacing: 1.35px; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: #c3a778; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-family: Manrope, sans-serif; font-size: clamp(30px, 3vw, 39px); font-weight: 700; letter-spacing: -1.8px; line-height: 1.13; }
.title-period { color: #c39b6e; }
.page-intro { margin: 0; color: #929a94; font-size: 11px; }
.source-link { display: inline-block; margin-top: 7px; color: #6f8274; font-size: 8px; text-decoration: none; }
.source-link:hover, .drive-link:hover { text-decoration: underline; }
.listening-status { display: flex; align-items: center; gap: 11px; margin: 0 0 2px; padding: 10px 13px; border: 1px solid #e9e7df; border-radius: 7px; background: #fbfaf6; }
.status-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 7px; background: #e9eee7; color: #557366; font-size: 18px; }
.listening-status strong, .listening-status small { display: block; }
.listening-status strong { margin-bottom: 3px; color: #59665d; font-size: 10px; font-weight: 700; }
.listening-status small { color: #a0a69f; font-size: 8px; }

.featured { position: relative; display: flex; min-height: 265px; overflow: hidden; border-radius: 10px; background: #324b43; color: #fffdf6; }
.feature-copy { position: relative; z-index: 1; width: 53%; padding: 27px 0 24px 33px; }
.feature-label { display: flex; align-items: center; gap: 6px; color: #d5bd98; font-size: 8px; font-weight: 700; letter-spacing: 1.15px; }
.feature-label span { font-size: 12px; }
.feature-copy h2 { margin: 12px 0 8px; font-family: Manrope, sans-serif; font-size: clamp(25px, 3vw, 37px); font-weight: 600; letter-spacing: -1.4px; line-height: 1.12; }
.feature-copy h2 em { color: #e7c89e; font-family: Georgia, serif; font-weight: 400; }
.feature-copy > p { max-width: 310px; margin-bottom: 12px; color: #c3cfc6; font-size: 10px; line-height: 1.7; }
.feature-meta { display: flex; align-items: center; gap: 8px; color: #c2cec5; font-size: 8px; }
.meta-separator { color: #95a79c; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 35px; margin-top: 17px; padding: 0 14px; border: 0; border-radius: 5px; background: #eee5d3; color: #304a41; font-size: 9px; font-weight: 700; cursor: pointer; transition: background .18s, transform .18s; }
.primary-button:hover { background: #fff5e3; transform: translateY(-1px); }
.primary-button svg { width: 13px; height: 13px; fill: currentColor; }
.feature-art { position: absolute; inset: 0 0 0 45%; overflow: hidden; background: linear-gradient(126deg, #587267 0%, #79947c 53%, #bd9c6f 100%); }
.feature-art:after { position: absolute; inset: 0; background: linear-gradient(90deg, #324b43 0%, rgba(50,75,67,.4) 23%, transparent 55%); content: ""; }
.feature-sun { position: absolute; top: 23px; right: 16%; width: 120px; height: 120px; border-radius: 50%; background: #e5c595; opacity: .8; }
.feature-orbit { position: absolute; z-index: 1; border: 1px solid rgba(255,244,218,.31); border-radius: 50%; transform: rotate(-24deg); }
.orbit-one { top: -19px; right: 3%; width: 320px; height: 220px; }
.orbit-two { top: 5px; right: 10%; width: 235px; height: 170px; }
.feature-mountain { position: absolute; bottom: -34px; width: 65%; height: 139px; border-radius: 50% 50% 0 0; transform: rotate(-12deg); }
.mountain-back { right: -9%; background: #587362; }
.mountain-front { right: 29%; bottom: -58px; background: #435d50; transform: rotate(19deg); }
.feature-book { position: absolute; z-index: 2; top: 31px; right: 23%; display: flex; width: 133px; height: 190px; flex-direction: column; justify-content: space-between; padding: 15px 13px 12px; border: 1px solid rgba(255,255,255,.28); background: linear-gradient(145deg, #d6ba88, #a9825c 76%); box-shadow: 12px 15px 23px rgba(27,39,32,.24); color: #2e4038; transform: rotate(4deg); }
.book-author { font-size: 6px; font-weight: 700; letter-spacing: 1px; }
.feature-book strong { font-family: Georgia, serif; font-size: 23px; line-height: .96; letter-spacing: -1px; }
.book-subtitle { font-size: 5px; font-weight: 700; letter-spacing: .8px; }
.book-star { position: absolute; top: 74px; right: 13px; color: #f0dfbd; font-size: 31px; }
.art-caption { position: absolute; z-index: 2; right: 17px; bottom: 14px; color: rgba(255,255,255,.75); font-size: 7px; font-weight: 600; letter-spacing: 1.2px; }
.feature-index { position: absolute; z-index: 2; right: 19px; bottom: 42px; display: flex; align-items: center; gap: 8px; color: #d8dfd8; font-size: 7px; }
.index-line { width: 26px; height: 1px; background: rgba(255,255,255,.55); }

.library-section { margin-top: 31px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 15px; }
.section-heading h2 { margin: 0 0 4px; font-family: Manrope, sans-serif; font-size: 16px; font-weight: 700; letter-spacing: -.5px; }
.section-heading p { margin: 0; color: #969d97; font-size: 9px; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: #6c7d70; font-size: 9px; font-weight: 700; cursor: pointer; }
.text-button span { margin-left: 5px; font-size: 13px; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.book-card { min-width: 0; }
.cover-wrap { position: relative; overflow: hidden; aspect-ratio: 1.48 / 1; border-radius: 7px; background: #d9e2d6; }
.cover-button { display: block; width: 100%; padding: 0; border: 0; text-align: left; cursor: pointer; }
.cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.generated-cover { background: linear-gradient(135deg,#d9a774,#e9c7a2 53%,#758f77); }
.generated-cover-1 { background: linear-gradient(140deg,#202f46,#435b75 53%,#db9a5d); }
.generated-cover-2 { background: linear-gradient(135deg,#b2bc8e,#dec886 50%,#d68054); }
.generated-cover-3 { background: linear-gradient(145deg,#9ec4d0,#f1d8ae 59%,#63867c); }
.generated-cover-4 { background: linear-gradient(135deg,#e99c72,#d8bb7a 50%,#74a092); }
.generated-cover-5 { background: linear-gradient(145deg,#82788c,#c2a389 55%,#5f7773); }
.book-type { position: absolute; z-index: 2; top: 9px; right: 9px; padding: 4px 6px; border-radius: 3px; background: rgba(255,253,245,.87); color: #53675a; font-size: 6px; font-weight: 700; letter-spacing: .55px; }
.generated-cover .cover-title { max-width: 78%; font-size: 16px; }
.generated-cover .cover-subtitle { bottom: 17px; }
.cover-art { position: absolute; inset: 0; overflow: hidden; }
.cover-art:before, .cover-art:after { position: absolute; content: ""; }
.cover-art:before { top: 13%; right: 14%; width: 28%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,240,201,.76); }
.cover-art:after { right: -10%; bottom: -51%; left: -10%; height: 90%; border-radius: 50% 50% 0 0; background: rgba(38,69,55,.52); }
.cover-art .cover-title { position: absolute; z-index: 1; top: 17px; left: 16px; max-width: 65%; color: #fffdf4; font-family: Georgia, serif; font-size: 18px; line-height: 1.02; text-shadow: 0 1px 6px rgba(0,0,0,.12); }
.cover-art .cover-subtitle { position: absolute; z-index: 1; bottom: 12px; left: 16px; color: rgba(255,255,255,.85); font-size: 6px; font-weight: 700; letter-spacing: 1px; }
.cover-art.cover-lotta { background: linear-gradient(135deg,#d9a774,#e9c7a2 53%,#758f77); }
.cover-art.cover-lotta:after { background: #7f947a; }
.cover-art.cover-harry { background: linear-gradient(140deg,#202f46,#435b75 53%,#db9a5d); }
.cover-art.cover-harry:before { top: 22%; right: 18%; width: 20%; background: #e6ca82; }
.cover-art.cover-harry:after { background: #293d51; }
.cover-art.cover-pettson { background: linear-gradient(135deg,#b2bc8e,#dec886 50%,#d68054); }
.cover-art.cover-pettson:after { background: #69836b; }
.cover-art.cover-mumin { background: linear-gradient(145deg,#9ec4d0,#f1d8ae 59%,#63867c); }
.cover-art.cover-mumin:after { background: #72968f; }
.cover-art.cover-pippi { background: linear-gradient(135deg,#e99c72,#d8bb7a 50%,#74a092); }
.cover-art.cover-pippi:after { background: #6c9080; }
.cover-art.cover-bröder { background: linear-gradient(145deg,#82788c,#c2a389 55%,#5f7773); }
.cover-art.cover-bröder:after { background: #425f58; }
.cover-art.cover-bamse { background: linear-gradient(145deg,#dfb36c,#83a281 62%,#537265); }
.cover-art.cover-bamse:after { background: #56745f; }
.cover-art.cover-mysteriet { background: linear-gradient(145deg,#546e7b,#b08b65 55%,#354e4a); }
.cover-art.cover-mysteriet:after { background: #304a43; }
.cover-art.cover-lotta:before { width: 32%; }
.cover-art.cover-harry .cover-title, .cover-art.cover-pettson .cover-title { font-size: 16px; }
.book-progress { position: absolute; z-index: 2; right: 12px; bottom: 12px; left: 12px; height: 3px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.38); }
.book-progress span { display: block; height: 100%; border-radius: inherit; background: #fff8e9; }
.card-play { position: absolute; z-index: 2; right: 10px; bottom: 21px; display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 50%; background: #fffdf5; color: #40594b; box-shadow: 0 2px 8px rgba(34,45,38,.17); cursor: pointer; transition: transform .18s; }
.card-play:hover { transform: scale(1.09); }
.card-play svg { width: 12px; height: 12px; fill: currentColor; }
.book-details { display: flex; align-items: start; justify-content: space-between; gap: 7px; padding: 9px 1px 0; }
.book-details h3 { overflow: hidden; margin: 0 0 4px; color: #35423c; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.book-details p { margin: 0; color: #9ca39c; font-size: 8px; }
.duration { color: #9ca39c; font-size: 8px; white-space: nowrap; }
.popular-section { margin-top: 33px; }
.carousel-controls { display: flex; gap: 3px; }
.carousel-button { width: 26px; height: 26px; border: 1px solid #e7e5dd; }
.carousel-button svg { width: 14px; height: 14px; }
.popular-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.popular-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px; border: 1px solid #e9e7df; border-radius: 7px; background: #fbfaf6; cursor: pointer; transition: border-color .2s, transform .2s; }
.popular-card:hover { border-color: #c7d0c4; transform: translateY(-2px); }
.popular-cover { display: grid; width: 41px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 4px; background: linear-gradient(145deg,#d9ad7c,#667e6b); color: #fff9e9; font-family: Georgia, serif; font-size: 17px; }
.popular-cover .cover-photo { position: static; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.popular-cover .generated-cover { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; }
.popular-cover .generated-cover .cover-title { top: 5px; left: 4px; font-size: 6px; }
.popular-cover .generated-cover .cover-subtitle, .popular-cover .book-type { display: none; }
.popular-cover:nth-child(odd) { background: linear-gradient(145deg,#a4bac4,#526a61); }
.popular-info { min-width: 0; }
.popular-info strong, .popular-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popular-info strong { margin-bottom: 4px; color: #46534b; font-size: 9px; }
.popular-info span { color: #9ba39c; font-size: 8px; }
.page-footer { display: flex; justify-content: space-between; margin-top: 37px; padding-top: 12px; border-top: 1px solid #e9e7df; color: #a5aaa3; font-size: 8px; }
.footer-heart { color: #cf987f; }

.movie-feature { background: #435551; }
.movie-feature .feature-art { display: none; }
.movie-feature .feature-copy { width: 53%; }
.movie-feature { background: linear-gradient(102deg,#344d48 0%,#425e55 52%,#829378 100%); }
.movie-feature:before { position: absolute; inset: 0 0 0 48%; background: radial-gradient(circle at 69% 29%,rgba(243,204,137,.72) 0 9%,transparent 9.5%),linear-gradient(157deg,transparent 0 36%,rgba(137,160,119,.75) 36.2% 54%,transparent 54.2%),linear-gradient(24deg,#496555 0 44%,transparent 44.2%); content: ""; }
.movie-feature:after { position: absolute; right: 4%; bottom: -51px; width: 42%; height: 70%; border-radius: 50% 50% 0 0; background: #526e5a; content: ""; }
.jonas-feature { background: linear-gradient(102deg,#364c50 0%,#496b68 52%,#a17e68 100%); }
.jonas-feature-art { position: absolute; inset: 0 0 0 46%; overflow: hidden; background: linear-gradient(142deg,#879b91,#667b79 52%,#c09672); }
.jonas-feature-art:after { position: absolute; inset: 0; background: linear-gradient(90deg,#364c50 0%,rgba(54,76,80,.34) 22%,transparent 60%); content: ""; }
.jonas-art-sun { position: absolute; top: 24px; right: 19%; width: 112px; height: 112px; border-radius: 50%; background: #e8c49d; opacity: .8; }
.jonas-art-hill { position: absolute; right: -9%; bottom: -65px; left: 10%; height: 160px; border-radius: 50% 50% 0 0; background: #536e64; transform: rotate(-9deg); }
.jonas-art-card { position: absolute; z-index: 1; top: 37px; right: 23%; display: flex; width: 150px; height: 185px; flex-direction: column; justify-content: space-between; padding: 14px; background: linear-gradient(150deg,#dbc2a0,#a98068); box-shadow: 12px 15px 25px rgba(27,39,32,.24); color: #3a504b; transform: rotate(3deg); }
.jonas-art-card span, .jonas-art-card small { font-size: 6px; font-weight: 700; letter-spacing: 1px; }
.jonas-art-card strong { font-family: Georgia,serif; font-size: 23px; line-height: .96; }
.jonas-feature .feature-copy h2 em { color: #e8c7a6; }
.jonas-video-card { color: inherit; text-decoration: none; }
.jonas-video-art { height: 178px; background: linear-gradient(145deg,#596c69,#b29274 55%,#354e4b); }
.jonas-folder-art { background: linear-gradient(145deg,#afc3b4,#778c7b 55%,#435b50); }
.jonas-video-art:before { top: 18%; right: 16%; width: 23%; background: rgba(240,214,177,.55); }
.jonas-video-art:after { bottom: -65px; height: 145px; background: #435d54; }
.jonas-video-art strong { max-width: 70%; font-size: 24px; }
.jonas-play-icon { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.62); border-radius: 50%; background: rgba(255,254,250,.91); color: #40594b; transform: translate(-50%,-50%); transition: transform .18s; }
.jonas-play-icon svg { width: 17px; height: 17px; fill: currentColor; }
.jonas-video-card:hover .jonas-play-icon { transform: translate(-50%,-50%) scale(1.08); }
.jonas-open-label { color: #68796d; font-size: 8px; font-weight: 700; white-space: nowrap; }
.folder-access-note { margin: 20px 0 0; color: #929a94; font-size: 9px; }
.movie-welcome .eyebrow-dot { background: #e49a79; }
.movie-status { background: #f1e8dc; color: #a87555; }
.movie-primary { background: #f1dfca; }
.movie-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.movie-card { overflow: hidden; border: 1px solid #e8e6de; border-radius: 8px; background: #fffefa; transition: transform .18s, box-shadow .18s; }
.movie-card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(48,57,48,.08); }
.movie-art { position: relative; display: flex; height: 148px; align-items: end; overflow: hidden; padding: 14px; background: var(--movie-bg); }
.movie-art:before { position: absolute; top: 14px; right: 18%; width: 51px; height: 51px; border-radius: 50%; background: rgba(255,224,164,.8); content: ""; }
.movie-art:after { position: absolute; right: -5%; bottom: -53px; left: -5%; height: 120px; border-radius: 50% 50% 0 0; background: var(--movie-hill); content: ""; }
.movie-art strong { position: relative; z-index: 1; max-width: 73%; color: #fff9e9; font-family: Georgia,serif; font-size: 22px; font-weight: 400; letter-spacing: -.5px; line-height: .98; text-shadow: 0 2px 10px rgba(0,0,0,.18); }
.movie-badge { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 4px 6px; border-radius: 3px; background: rgba(255,253,245,.87); color: #59685c; font-size: 7px; font-weight: 700; letter-spacing: .6px; }
.movie-info { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 13px; }
.movie-info h3 { margin: 0 0 4px; color: #3e4b43; font-size: 10px; }
.movie-info p { margin: 0; color: #9ca39c; font-size: 8px; }
.movie-info button { padding: 6px 9px; border: 1px solid #e9e7df; border-radius: 4px; background: transparent; color: #68796d; font-size: 8px; font-weight: 700; cursor: pointer; }
.movie-info button:hover { background: #edf0e9; }
.onedrive-section .section-heading { align-items: center; }
.onedrive-actions { display: flex; align-items: center; gap: 12px; }
#onedrive-status { max-width: 640px; }
#onedrive-status.error { color: #a55347; }
#onedrive-status.success { color: #5f7968; }
.onedrive-video-card { width: 100%; padding: 0; color: inherit; text-align: left; cursor: pointer; }
.onedrive-video-card:disabled { cursor: wait; opacity: .7; }
.onedrive-video-art { height: 174px; background: linear-gradient(145deg,#718c7d,#445f58 55%,#c09773); }
.onedrive-video-art:before { top: 18%; right: 16%; width: 24%; background: rgba(240,214,177,.55); }
.onedrive-video-art:after { bottom: -65px; height: 145px; background: #3c5a50; }
.onedrive-video-art strong { display: -webkit-box; max-width: 75%; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.onedrive-video-card .movie-info { gap: 10px; }
.onedrive-video-card .movie-info > span:first-child { min-width: 0; }
.onedrive-video-card .movie-info strong, .onedrive-video-card .movie-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onedrive-video-card .movie-info strong { margin-bottom: 4px; color: #3e4b43; font-size: 10px; }
.onedrive-video-card .movie-info small { color: #9ca39c; font-size: 8px; }
.video-dialog { position: relative; width: min(940px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 12px; overflow: auto; border: 1px solid #e9e7df; border-radius: 12px; background: #fffefa; box-shadow: 0 24px 80px rgba(24,36,28,.25); color: var(--ink); }
.video-dialog::backdrop { background: rgba(24,34,29,.72); backdrop-filter: blur(3px); }
.video-dialog video { display: block; width: 100%; max-height: 72vh; border-radius: 7px; background: #101413; }
.video-dialog-caption { padding: 13px 5px 3px; }
.video-dialog-caption h2 { margin: 5px 0 0; overflow-wrap: anywhere; font-family: Manrope,sans-serif; font-size: 17px; }
.video-dialog .dialog-close { top: 18px; right: 18px; }

.player-bar { position: fixed; z-index: 5; right: 0; bottom: 0; left: var(--sidebar-width); display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: center; min-height: 77px; padding: 10px 4.5%; border-top: 1px solid #e9e7df; background: rgba(255,254,250,.97); backdrop-filter: blur(12px); }
.player-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini-cover { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 5px; background: linear-gradient(140deg,#d5bd94,#597365); color: #fff6db; font-size: 20px; }
.track-info { min-width: 0; }
.track-info strong, .track-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-info strong { margin-bottom: 4px; color: #445148; font-size: 9px; }
.track-info span { color: #9aa29b; font-size: 8px; }
.player-heart { padding: 4px; border: 0; background: transparent; color: #98a098; font-size: 19px; cursor: pointer; }
.player-heart.liked { color: #d47d6d; }
.player-controls { width: min(100%, 340px); justify-self: center; }
.playback-buttons { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 6px; }
.player-control { display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #62736a; cursor: pointer; }
.player-control svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.play-control { width: 28px; height: 28px; border-radius: 50%; background: #38544a; color: #fff9ed; }
.play-control svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.secondary-control:hover { color: #263d33; }
.progress-row { display: flex; align-items: center; gap: 8px; color: #a2a8a2; font-size: 7px; }
.progress-track { height: 3px; flex: 1; overflow: hidden; border-radius: 3px; background: #e9e8e1; }
.progress-fill { width: 0%; height: 100%; border-radius: inherit; background: #668477; transition: width .3s linear; }
.player-extra { display: flex; align-items: center; justify-content: end; gap: 17px; }
.demo-label { display: flex; align-items: center; gap: 6px; color: #a2a79f; font-size: 7px; font-weight: 700; letter-spacing: .7px; }
.demo-label span { width: 5px; height: 5px; border-radius: 50%; background: #d1a26d; }
.volume-button { width: 27px; height: 27px; border: 1px solid #e9e7df; }
.volume-button svg { width: 14px; height: 14px; }

.detail-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; overflow: visible; border: 0; border-radius: 12px; background: #fffefa; box-shadow: 0 24px 80px rgba(24,36,28,.25); color: var(--ink); }
.detail-dialog::backdrop { background: rgba(24,34,29,.48); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; z-index: 1; top: 10px; right: 10px; display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 50%; background: rgba(255,254,250,.88); color: #55645b; font-size: 21px; cursor: pointer; }
.dialog-art { height: 200px; border-radius: 12px 12px 0 0; background: linear-gradient(135deg,#d5bd94,#547064); }
.dialog-art.movie-dialog-art { background: linear-gradient(145deg,#e4bb83 0 35%,#879778 35% 64%,#435e50 64%); }
.dialog-content { padding: 22px 25px 25px; }
.dialog-kicker { color: #a78961; font-size: 8px; font-weight: 700; letter-spacing: 1.1px; }
.dialog-content h2 { margin: 8px 0; font-family: Manrope,sans-serif; font-size: 23px; letter-spacing: -.8px; }
.dialog-content p { margin: 0; color: #828c84; font-size: 11px; line-height: 1.7; }
.dialog-meta { display: flex; gap: 9px; margin-top: 12px; color: #929b93; font-size: 9px; }
.book-dialog-art { display: grid; place-items: center; background: linear-gradient(135deg,#d9a774,#e9c7a2 53%,#758f77); }
.book-dialog-art img { width: 100%; height: 100%; object-fit: contain; }
.drive-link { display: inline-block; margin-top: 13px; color: #6c7d70; font-size: 9px; font-weight: 700; text-decoration: none; }
.drive-link[hidden] { display: none; }
.dialog-action { margin-top: 18px; }
.toast { position: fixed; z-index: 8; right: 24px; bottom: 98px; max-width: calc(100vw - 48px); padding: 11px 15px; border-radius: 7px; background: #304c43; box-shadow: 0 5px 20px rgba(25,40,31,.18); color: white; font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s,transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.empty-state { grid-column: 1 / -1; padding: 23px 14px; border: 1px dashed #dcded5; border-radius: 7px; color: #87918a; font-size: 10px; text-align: center; }

@keyframes page-in { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  .main-content { padding-right: 6.5%; padding-left: 6.5%; }
  .featured { min-height: 290px; }
  .feature-book { width: 152px; height: 213px; }
}

@media (max-width: 1050px) {
  :root { --sidebar-width: 212px; }
  .main-content { padding-right: 3.5%; padding-left: 3.5%; }
  .book-grid, .popular-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .movie-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .feature-book { right: 18%; }
  .player-bar { grid-template-columns: 1fr 1.3fr .7fr; padding-right: 3%; padding-left: 3%; }
}

@media (max-width: 720px) {
  :root { --sidebar-width: 0px; }
  .sidebar { inset: auto 0 0; width: 100%; height: calc(64px + env(safe-area-inset-bottom)); flex-direction: row; align-items: center; justify-content: center; padding: 5px 12px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid #e9e7df; border-right: 0; }
  .brand, .sidebar-label, .sidebar-divider, .family-list, .sidebar-bottom { display: none; }
  .main-nav { display: flex; width: min(100%, 410px); justify-content: center; gap: 12px; margin: 0; }
  .nav-link { flex: 1; flex-direction: column; justify-content: center; gap: 3px; min-width: 76px; min-height: 54px; padding: 4px 7px; font-size: 11px; }
  .nav-link svg { width: 19px; height: 19px; }
  .nav-count { display: none; }
  .main-content { padding: 0 20px calc(154px + env(safe-area-inset-bottom)); }
  .topbar { position: sticky; z-index: 4; top: 0; height: 66px; background: rgba(246,244,238,.96); backdrop-filter: blur(10px); }
  .breadcrumbs { font-size: 10px; }
  .topbar-actions { gap: 7px; }
  .search-box { width: 44px; height: 44px; justify-content: center; padding: 0; border: 0; background: transparent; }
  .search-box input, .search-box kbd { display: none; }
  .search-box:focus-within { position: absolute; z-index: 4; right: 62px; left: 18px; width: auto; height: 44px; justify-content: start; padding: 0 12px; border: 1px solid #e8e6de; background: #fffefa; }
  .search-box:focus-within input { display: block; }
  .search-box input { font-size: 16px; }
  .notification-button { display: none; }
  .logout-button { min-height: 44px; padding: 0 10px; }
  .welcome-row { padding-top: 26px; }
  .listening-status { gap: 8px; padding: 7px; }
  .listening-status small { display: none; }
  .listening-status strong { font-size: 8px; }
  .status-icon { width: 25px; height: 25px; }
  .featured { min-height: 250px; }
  .feature-copy { width: 66%; padding: 23px 0 20px 22px; }
  .feature-copy h2 { font-size: 29px; }
  .feature-copy > p { max-width: 230px; font-size: 9px; }
  .feature-art { left: 48%; }
  .jonas-art-card { top: 39px; right: 15%; width: 106px; height: 155px; padding: 11px; }
  .jonas-art-card strong { font-size: 18px; }
  .feature-book { top: 39px; right: 15%; width: 106px; height: 155px; padding: 11px; }
  .feature-book strong { font-size: 18px; }
  .book-star { top: 60px; right: 8px; font-size: 24px; }
  .feature-sun { right: 6%; width: 94px; height: 94px; }
  .feature-index { right: 14px; bottom: 38px; }
  .art-caption { right: 12px; font-size: 6px; }
  .section-heading h2 { font-size: 14px; }
  .book-grid, .popular-grid { gap: 12px; }
  .book-details h3 { font-size: 12px; }
  .book-details p, .duration { font-size: 9px; }
  .popular-card { min-height: 68px; gap: 10px; padding: 8px; }
  .popular-cover { width: 44px; height: 50px; }
  .popular-info strong { font-size: 11px; }
  .popular-info span { font-size: 9px; }
  .player-bar { bottom: calc(64px + env(safe-area-inset-bottom)); grid-template-columns: minmax(0,1fr) minmax(130px,.8fr); min-height: 82px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); }
  .player-controls { width: 100%; }
  .player-extra { display: none; }
  .player-heart { display: none; }
  .mini-cover { width: 42px; height: 42px; }
  .track-info strong { font-size: 10px; }
  .track-info span { font-size: 9px; }
  .playback-buttons { gap: 8px; margin-bottom: 5px; }
  .player-control { width: 32px; height: 32px; }
  .play-control { width: 36px; height: 36px; }
  .progress-row { font-size: 8px; }
  .page-footer { margin-top: 27px; font-size: 7px; }
  .toast { right: 12px; bottom: calc(154px + env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .main-nav { gap: 5px; }
  .nav-link { gap: 4px; padding: 0 4px; font-size: 10px; }
}

@media (max-width: 460px) {
  .auth-card { padding: 27px 22px; }
  .auth-brand { margin-bottom: 36px; }
  .auth-card h1 { font-size: 27px; }
  .main-content { padding-right: 14px; padding-left: 14px; }
  .welcome-row { align-items: center; }
  .listening-status { display: none; }
  h1 { font-size: 34px; }
  .page-intro { font-size: 12px; line-height: 1.45; }
  .source-link { font-size: 9px; }
  .featured { min-height: 258px; }
  .feature-copy { width: 75%; padding-left: 17px; }
  .feature-copy h2 { font-size: 27px; }
  .feature-copy > p { max-width: 205px; font-size: 10px; }
  .feature-meta { gap: 5px; font-size: 8px; }
  .feature-art { left: 51%; opacity: .72; }
  .jonas-art-card { right: 8%; width: 84px; height: 128px; }
  .jonas-art-card strong { font-size: 15px; }
  .feature-book { right: 8%; width: 84px; height: 128px; }
  .feature-book strong { font-size: 15px; }
  .book-star { top: 51px; right: 6px; font-size: 19px; }
  .feature-label { font-size: 7px; }
  .primary-button { min-height: 44px; margin-top: 14px; padding-right: 16px; padding-left: 16px; font-size: 10px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0,1fr)); row-gap: 17px; }
  .book-details > div { min-width: 0; }
  .book-details h3 { max-width: 100%; }
  .popular-grid { grid-template-columns: 1fr; }
  .movie-grid { grid-template-columns: 1fr; }
  .onedrive-section .section-heading { align-items: start; gap: 8px; }
  .onedrive-actions { flex-direction: column; align-items: end; gap: 3px; flex: 0 0 auto; }
  .video-dialog { width: calc(100vw - 20px); padding: 8px; }
  .movie-art { height: 165px; }
  .movie-feature .feature-copy { width: 80%; }
  .movie-feature:before { left: 39%; }
  .movie-feature:after { right: -9%; width: 62%; }
  .page-footer span:last-child { display: none; }
  .section-heading p { font-size: 8px; }
  .text-button { font-size: 8px; }
  .detail-dialog { width: calc(100vw - 28px); }
}
