:root {
  color-scheme: light dark;
  --bg: #f5f1e9;
  --bg-elevated: #fffdf8;
  --bg-soft: #ebe5da;
  --surface: rgba(255, 253, 248, .9);
  --surface-solid: #fffdf8;
  --surface-strong: #171b23;
  --text: #1c2029;
  --text-soft: #62656e;
  --text-faint: #8f918f;
  --line: rgba(36, 38, 42, .12);
  --line-strong: rgba(36, 38, 42, .22);
  --accent: #c85d3c;
  --accent-hover: #ab492d;
  --accent-soft: #f5ddd2;
  --gold: #c99a39;
  --success: #2d8063;
  --danger: #b33d42;
  --danger-soft: #f7dedf;
  --shadow-sm: 0 4px 18px rgba(40, 33, 23, .07);
  --shadow-md: 0 18px 55px rgba(40, 33, 23, .13);
  --shadow-lg: 0 30px 90px rgba(22, 18, 13, .22);
  --sidebar-width: 228px;
  --topbar-height: 72px;
  --bottom-nav-height: 72px;
  --mini-player-height: 76px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 34px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Iowan Old Style, Palatino Linotype, Book Antiqua, Palatino, Georgia, serif;
}

:root[data-resolved-theme="dark"] {
  --bg: #0d1117;
  --bg-elevated: #141922;
  --bg-soft: #1b212c;
  --surface: rgba(20, 25, 34, .92);
  --surface-solid: #141922;
  --surface-strong: #f1e9dc;
  --text: #f3eee6;
  --text-soft: #aeb3bd;
  --text-faint: #777f8c;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .17);
  --accent: #eb7b58;
  --accent-hover: #f08a68;
  --accent-soft: #3b251f;
  --gold: #e3b95f;
  --success: #65b797;
  --danger: #ef777c;
  --danger-soft: #3b2226;
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, .18);
  --shadow-md: 0 18px 55px rgba(0, 0, 0, .28);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, .45);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0d1117; --bg-elevated: #141922; --bg-soft: #1b212c; --surface: rgba(20,25,34,.92); --surface-solid: #141922; --surface-strong: #f1e9dc;
    --text: #f3eee6; --text-soft: #aeb3bd; --text-faint: #777f8c; --line: rgba(255,255,255,.09); --line-strong: rgba(255,255,255,.17);
    --accent: #eb7b58; --accent-hover: #f08a68; --accent-soft: #3b251f; --gold: #e3b95f; --success: #65b797; --danger: #ef777c; --danger-soft: #3b2226;
    --shadow-sm: 0 4px 18px rgba(0,0,0,.18); --shadow-md: 0 18px 55px rgba(0,0,0,.28); --shadow-lg: 0 30px 90px rgba(0,0,0,.45);
  }
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 15px; line-height: 1.5; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
img { display: block; max-width: 100%; }
code { padding: .12em .4em; border-radius: 6px; background: var(--bg-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; }
pre { overflow: auto; padding: 16px; border-radius: var(--radius-sm); background: #0c1016; color: #dfe7ef; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 12px; font-family: var(--font-display); font-size: clamp(2.15rem, 4.5vw, 4.4rem); font-weight: 600; line-height: .98; letter-spacing: -.035em; }
h2 { letter-spacing: -.025em; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; width: var(--sidebar-width); flex-direction: column; padding: 22px 16px max(18px, env(safe-area-inset-bottom)); border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg-elevated) 92%, transparent); backdrop-filter: blur(20px); }
.brand, .mobile-brand { display: flex; align-items: center; gap: 11px; background: none; text-align: left; }
.brand { padding: 2px 8px 26px; }
.brand__mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--surface-strong); color: var(--bg); box-shadow: var(--shadow-sm); }
.brand__mark svg { width: 27px; height: 27px; }
.brand__mark svg path:first-child { fill: var(--accent); stroke: none; }
.brand__mark svg path:last-child { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.brand strong { display: block; font-family: var(--font-display); font-size: 21px; line-height: 1; }
.brand small { display: block; margin-top: 4px; color: var(--text-faint); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.sidebar__nav { display: grid; gap: 5px; }
.nav-item { position: relative; display: flex; width: 100%; align-items: center; gap: 13px; min-height: 45px; padding: 0 13px; border-radius: 12px; background: transparent; color: var(--text-soft); font-weight: 590; text-align: left; transition: background .18s, color .18s, transform .18s; }
.nav-item:hover { background: var(--bg-soft); color: var(--text); transform: translateX(2px); }
.nav-item.is-active { background: var(--surface-strong); color: var(--bg); box-shadow: var(--shadow-sm); }
.nav-item.is-active::before { position: absolute; left: -16px; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--accent); content: ""; }
.sidebar__footer { margin-top: auto; padding: 10px 4px; }
.connection-pill { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 11px; background: var(--bg-soft); color: var(--text-soft); font-size: 12px; }
.connection-pill.is-online .icon { color: var(--success); }
.connection-pill.is-offline .icon { color: var(--danger); }

.workspace { position: relative; grid-column: 2; min-width: 0; padding-bottom: 0; }
.topbar { position: sticky; top: 0; z-index: 35; display: flex; height: var(--topbar-height); align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) clamp(18px, 3vw, 42px) 10px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(24px) saturate(1.2); }
.topbar__spacer { flex: 1; }
.mobile-brand { display: none; }
.status-button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: var(--bg-soft); color: var(--text-soft); font-size: 12px; }
.status-button--error { background: var(--danger-soft); color: var(--danger); }
.main-content { width: min(100%, 1560px); min-height: calc(100vh - var(--topbar-height)); margin: 0 auto; }
.page { padding: clamp(24px, 4vw, 58px) clamp(18px, 4vw, 62px) calc(70px + env(safe-area-inset-bottom)); }
.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.page-intro h1 { margin-bottom: 8px; }
.page-intro p { margin: 0; color: var(--text-soft); }
.eyebrow { display: inline-block; margin-bottom: 12px; color: var(--accent); font-size: 11px; font-weight: 780; letter-spacing: .18em; text-transform: uppercase; }
.muted { color: var(--text-soft); }
.spacer { flex: 1; }
.long-copy { max-width: 78ch; color: var(--text-soft); line-height: 1.75; white-space: pre-line; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; background: var(--bg-soft); color: var(--text); font-weight: 680; transition: transform .16s, background .16s, box-shadow .16s; }
.button:hover { transform: translateY(-1px); }
.button--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 25%, transparent); }
.button--primary:hover { background: var(--accent-hover); }
.button--secondary { border-color: var(--line-strong); background: var(--surface-solid); }
.button--ghost { border-color: var(--line); background: transparent; }
.button--danger { background: var(--danger); color: #fff; }
.button--large { min-height: 50px; padding-inline: 24px; border-radius: 14px; }
.button--small { min-height: 34px; padding-inline: 11px; font-size: 13px; }
.button--full { width: 100%; }
.icon-button { display: inline-grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: transparent; color: var(--text-soft); transition: background .16s, color .16s, transform .16s; }
.icon-button:hover { background: var(--bg-soft); color: var(--text); transform: scale(1.04); }
.icon-button--border { border: 1px solid var(--line); background: var(--surface-solid); }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 0; background: transparent; color: var(--accent); font-weight: 680; }
.text-button--danger { color: var(--danger); }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; padding: 5px 0; background: transparent; color: var(--text-soft); font-weight: 650; }

.offline-banner, .update-banner { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 6px 18px; background: #8b5e25; color: #fff; font-size: 12px; text-align: center; }
.update-banner { background: var(--success); }
.update-banner button { margin-left: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.18); color: inherit; font-weight: 700; }
.bottom-nav { display: none; }

.welcome-hero { position: relative; display: grid; min-height: 390px; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr); align-items: center; gap: 30px; overflow: hidden; margin-bottom: 34px; padding: clamp(34px, 6vw, 72px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface-strong); color: var(--bg); box-shadow: var(--shadow-md); }
.welcome-hero::before { position: absolute; inset: auto -10% -60% 35%; height: 120%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 68%); content: ""; filter: blur(10px); }
.welcome-hero h1 { max-width: 720px; font-size: clamp(2.5rem, 6vw, 5.4rem); }
.welcome-hero p { max-width: 660px; color: color-mix(in srgb, var(--bg) 70%, transparent); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.hero-art { position: relative; height: 280px; }
.hero-book { position: absolute; width: 135px; height: 210px; border-radius: 8px 14px 14px 8px; box-shadow: 18px 22px 40px rgba(0,0,0,.25); transform: rotate(-9deg); }
.hero-book::before { position: absolute; inset: 15px; border: 1px solid rgba(255,255,255,.4); border-radius: 4px 8px 8px 4px; content: ""; }
.hero-book--one { right: 92px; bottom: 20px; background: linear-gradient(145deg, #c85d3c, #7d2c25); }
.hero-book--two { right: 5px; bottom: 0; background: linear-gradient(145deg, #d8ab52, #786127); transform: rotate(8deg); }
.hero-headphones { position: absolute; right: 52px; top: 5px; width: 190px; height: 150px; border: 18px solid color-mix(in srgb, var(--bg) 65%, transparent); border-bottom: 0; border-radius: 100px 100px 0 0; transform: rotate(5deg); }
.hero-headphones::before,.hero-headphones::after { position: absolute; bottom: -45px; width: 38px; height: 74px; border-radius: 18px; background: color-mix(in srgb, var(--bg) 78%, transparent); content: ""; }
.hero-headphones::before { left: -27px; transform: rotate(-8deg); }.hero-headphones::after { right: -27px; transform: rotate(8deg); }

.continue-card { position: relative; display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); gap: clamp(25px, 5vw, 64px); overflow: hidden; margin-bottom: 26px; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface-strong); color: var(--bg); box-shadow: var(--shadow-md); }
.continue-card__cover { z-index: 1; aspect-ratio: 1; border-radius: 18px; box-shadow: 0 22px 50px rgba(0,0,0,.28); }
.continue-card__content { z-index: 1; align-self: center; max-width: 760px; }
.continue-card__content h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1; }
.continue-card__content p { color: color-mix(in srgb, var(--bg) 68%, transparent); font-size: 17px; }
.continue-card__meta { display: flex; justify-content: space-between; margin: 8px 0 22px; color: color-mix(in srgb, var(--bg) 65%, transparent); font-size: 12px; }
.continue-card__actions { display: flex; gap: 10px; }
.continue-card__number { position: absolute; right: 15px; bottom: -45px; color: rgba(255,255,255,.035); font-family: var(--font-display); font-size: 220px; font-weight: 700; line-height: 1; }
.stats-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; overflow: hidden; margin-bottom: 50px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--line); }
.stats-strip > div { display: flex; min-height: 88px; flex-direction: column; justify-content: center; padding: 18px 22px; background: var(--surface-solid); }
.stats-strip strong { font-family: var(--font-display); font-size: 23px; }
.stats-strip span { color: var(--text-soft); font-size: 12px; }
.content-section { margin: 0 0 48px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-family: var(--font-display); font-size: 25px; font-weight: 600; }
.section-heading > span { color: var(--text-faint); font-size: 12px; }
.book-row { display: grid; grid-auto-columns: minmax(160px, 210px); grid-auto-flow: column; gap: 20px; overflow-x: auto; padding: 3px 2px 20px; scroll-snap-type: x proximity; scrollbar-width: thin; }

.book-cover { position: relative; display: grid; overflow: hidden; aspect-ratio: 1; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #374151, #111827); color: rgba(255,255,255,.84); box-shadow: var(--shadow-sm); }
.book-cover::after { position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; content: ""; pointer-events: none; }
.book-cover > span { font-family: var(--font-display); font-size: clamp(24px, 5vw, 54px); font-weight: 600; letter-spacing: -.04em; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-v0{background:linear-gradient(145deg,#8f4938,#40211e)}.cover-v1{background:linear-gradient(145deg,#526b6b,#1e3437)}.cover-v2{background:linear-gradient(145deg,#8b6c35,#3e301b)}.cover-v3{background:linear-gradient(145deg,#61547e,#29243c)}
.cover-v4{background:linear-gradient(145deg,#2d6a75,#172f38)}.cover-v5{background:linear-gradient(145deg,#8d5361,#3c222d)}.cover-v6{background:linear-gradient(145deg,#6e7350,#2f3423)}.cover-v7{background:linear-gradient(145deg,#5d5860,#27242b)}
.book-card { position: relative; min-width: 0; scroll-snap-align: start; }
.book-card__open { display: block; width: 100%; padding: 0; background: transparent; text-align: left; }
.book-card__cover { width: 100%; margin-bottom: 13px; transition: transform .2s, box-shadow .2s; }
.book-card:hover .book-card__cover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.book-card__body { display: grid; gap: 4px; }
.book-card__body strong { overflow: hidden; color: var(--text); font-size: 14px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.book-card__body > span { overflow: hidden; color: var(--text-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.book-card__body small { color: var(--text-faint); font-size: 10px; }
.book-card__play { position: absolute; right: 9px; top: 9px; width: 38px; height: 38px; background: rgba(13,17,23,.8); color: #fff; opacity: 0; backdrop-filter: blur(8px); transform: translateY(5px); transition: opacity .18s, transform .18s; }
.book-card:hover .book-card__play,.book-card:focus-within .book-card__play { opacity: 1; transform: none; }
.offline-badge { position: absolute; left: 9px; top: 9px; display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: rgba(13,17,23,.78); color: #fff; backdrop-filter: blur(8px); }
.book-progress { position: relative; overflow: hidden; width: 100%; height: 3px; margin-top: 5px; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); }
.book-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.library-toolbar { display: grid; grid-template-columns: minmax(220px,1fr) auto auto; gap: 12px; margin-bottom: 16px; }
.search-control { display: flex; min-height: 46px; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); color: var(--text-soft); box-shadow: var(--shadow-sm); }
.search-control input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-control--large { width: min(760px,100%); min-height: 62px; margin: 28px auto 0; padding-inline: 20px; border-radius: 18px; font-size: 18px; }
.select-control { min-height: 42px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-solid); color: var(--text); }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-solid); }
.segmented button { display: grid; width: 36px; place-items: center; border-radius: 8px; background: transparent; color: var(--text-soft); }.segmented button.is-active{background:var(--surface-strong);color:var(--bg)}
.filter-chips { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 28px; padding-bottom: 4px; }
.chip { flex: 0 0 auto; min-height: 35px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text-soft); font-size: 12px; font-weight: 650; }
.chip.is-active { border-color: var(--surface-strong); background: var(--surface-strong); color: var(--bg); }
.book-collection--grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); gap: clamp(24px,3vw,38px) clamp(16px,2.5vw,28px); }
.book-collection--list { display: grid; gap: 7px; }
.book-card--list { display: flex; align-items: center; min-height: 88px; padding: 9px; border: 1px solid transparent; border-radius: 14px; }
.book-card--list:hover { border-color: var(--line); background: var(--surface-solid); }
.book-card--list .book-card__open { display: grid; grid-template-columns: 68px 1fr; align-items: center; gap: 15px; }
.book-card--list .book-card__cover { width: 68px; margin: 0; border-radius: 9px; }
.book-card--list .book-card__body { grid-template-columns: minmax(180px,1.2fr) minmax(120px,.8fr) minmax(130px,.7fr); align-items: center; gap: 18px; }
.book-card--list .book-progress { max-width: 180px; }
.book-card--list .book-card__play { position: static; margin-left: auto; opacity: 1; transform: none; }

.empty-state { display: grid; min-height: 280px; place-items: center; align-content: center; padding: 42px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--text-soft); text-align: center; }
.empty-state > .icon { margin-bottom: 13px; color: var(--accent); }
.empty-state h2 { margin-bottom: 7px; color: var(--text); font-family: var(--font-display); font-size: 27px; }
.empty-state p { max-width: 520px; margin-bottom: 20px; }

.book-hero { display: grid; grid-template-columns: minmax(220px,330px) minmax(0,1fr); gap: clamp(32px,6vw,88px); align-items: center; margin-bottom: 54px; }
.book-hero__cover { border-radius: 22px; box-shadow: var(--shadow-lg); }
.book-hero__cover-wrap{position:relative}.book-hero__cover-wrap>.book-hero__cover{width:100%}.book-hero__cover-edit{position:absolute;right:12px;bottom:12px;background:var(--surface-solid);box-shadow:var(--shadow-md);color:var(--text)}.book-hero__title-row{display:flex;align-items:center;gap:10px}.book-hero__title-row h1{margin:0}.book-hero__title-edit{flex:0 0 auto;color:var(--text-soft)}
.book-hero__content { max-width: 780px; }
.book-hero__content h1 { font-size: clamp(2.5rem,5.5vw,5.2rem); }
.book-hero__author { color: var(--text-soft); font-size: 20px; }
.book-hero__progress { max-width: 620px; height: 5px; margin-top: 25px; }
.book-hero__meta { display: flex; max-width: 620px; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--text-faint); font-size: 11px; }
.book-hero__actions { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.book-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,330px); gap: clamp(30px,5vw,70px); align-items: start; }
.detail-section { padding: 30px 0; border-top: 1px solid var(--line); }
.book-sidebar { display: grid; gap: 14px; position: sticky; top: calc(var(--topbar-height) + 20px); }
.side-card { padding: 21px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-solid); box-shadow: var(--shadow-sm); }
.side-card h3 { margin-bottom: 9px; font-size: 15px; }.side-card p{color:var(--text-soft);font-size:13px}.side-card dl{margin:0}.side-card dl div{display:flex;justify-content:space-between;gap:15px;padding:8px 0;border-bottom:1px solid var(--line)}.side-card dl div:last-child{border:0}.side-card dt{color:var(--text-soft)}.side-card dd{margin:0;text-align:right}.side-card--danger{text-align:center}
.chapter-list { display: grid; gap: 4px; }
.chapter-row { display: grid; width: 100%; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 60px; padding: 8px 13px; border-radius: 12px; background: transparent; text-align: left; transition: background .16s; }
.chapter-row:hover { background: var(--bg-soft); }.chapter-row.is-current{background:var(--accent-soft);color:var(--accent)}
.chapter-row__number { color: var(--text-faint); font-family: ui-monospace,monospace; font-size: 11px; }.chapter-row strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chapter-row small{display:block;color:var(--text-faint);font-size:11px}
.bookmark-list { display:grid;gap:7px }.bookmark-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--line);border-radius:12px}.bookmark-row>button:first-child{display:grid;flex:1;grid-template-columns:90px 1fr;gap:10px;background:transparent;text-align:left}.bookmark-row span{color:var(--text-soft)}

.storage-card { display: grid; grid-template-columns: auto minmax(180px,auto) minmax(150px,1fr) auto; align-items: center; gap: 16px; margin-bottom: 38px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-solid); }
.storage-card__icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }.storage-card strong,.storage-card span{display:block}.storage-card span{color:var(--text-soft);font-size:12px}
.storage-meter,.download-progress { overflow:hidden;height:6px;border-radius:999px;background:var(--bg-soft)}.storage-meter span,.download-progress span{display:block;height:100%;border-radius:inherit;background:var(--accent)}
.download-list{display:grid;gap:9px}.download-row{display:flex;align-items:center;gap:14px;min-height:82px;padding:10px 13px;border:1px solid var(--line);border-radius:14px;background:var(--surface-solid)}.download-row__cover{width:61px;flex:0 0 auto;border-radius:9px}.download-row__body{display:grid;flex:1;gap:4px;min-width:0}.download-row__body strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.download-row__body span{color:var(--text-soft);font-size:12px}.download-row__open{border:0;background:transparent;text-align:left}.download-row__actions{display:flex;align-items:center;gap:4px}

.search-hero { padding: clamp(35px,7vw,90px) 0 55px; text-align:center }.search-hero h1{margin-bottom:0}.search-results{margin-top:20px}.search-hints{display:grid;grid-template-columns:repeat(2,minmax(0,320px));justify-content:center;gap:16px;margin-top:28px}.search-hints>div{display:grid;gap:6px;padding:24px;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface-solid);text-align:left}.search-hints .icon{color:var(--accent)}.search-hints span{color:var(--text-soft);font-size:13px}

.settings-layout { display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,350px);gap:26px;align-items:start }.settings-layout main,.settings-layout aside{display:grid;gap:18px}.settings-card{overflow:hidden;padding:22px;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface-solid);box-shadow:var(--shadow-sm)}.settings-card__heading{display:flex;gap:13px;padding-bottom:17px}.settings-card__heading>.icon{color:var(--accent)}.settings-card h2{margin:0 0 4px;font-size:17px}.settings-card p{margin:0;color:var(--text-soft);font-size:13px}.setting-row{display:flex;min-height:70px;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid var(--line)}.setting-row>div{display:grid;gap:3px}.setting-row strong{font-size:14px}.setting-row span{color:var(--text-soft);font-size:12px}.switch{position:relative;width:45px;height:26px;flex:0 0 auto}.switch input{position:absolute;opacity:0}.switch>span{display:block;width:45px;height:26px;border-radius:999px;background:var(--bg-soft);transition:background .18s}.switch>span::after{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.25);content:"";transition:transform .18s}.switch input:checked+span{background:var(--accent)}.switch input:checked+span::after{transform:translateX(19px)}.account-card{text-align:center}.account-card__icon{display:grid;width:62px;height:62px;place-items:center;margin:0 auto 13px;border-radius:20px;background:var(--accent-soft);color:var(--accent)}.account-card .button{margin-top:14px}.account-card .text-button{margin-top:12px}.account-card small{display:block;margin-top:16px;color:var(--text-faint)}.privacy-card{display:flex;gap:12px}.privacy-card>.icon{flex:0 0 auto;color:var(--accent)}

.page--player { min-height:calc(100vh - var(--topbar-height));padding:0 }.player-stage{position:relative;display:grid;min-height:calc(100vh - var(--topbar-height));grid-template-columns:minmax(0,1fr) minmax(280px,390px);overflow:hidden}.player-stage__ambient{position:absolute;inset:0;overflow:hidden;pointer-events:none;opacity:.15;filter:blur(80px) saturate(1.3);transform:scale(1.2)}.player-ambient-cover{width:100%;height:100%;border-radius:0}.player-main{position:relative;z-index:1;display:flex;min-width:0;flex-direction:column;align-items:center;justify-content:center;padding:40px clamp(24px,6vw,90px)}.player-collapse{position:absolute;top:22px;left:25px;display:grid;width:42px;height:42px;place-items:center;border-radius:50%;background:var(--surface);color:var(--text)}.player-cover{width:min(42vh,380px);max-width:75vw;border-radius:22px;box-shadow:var(--shadow-lg)}.player-title{width:min(650px,100%);margin:25px auto 16px;text-align:center}.player-title>span{color:var(--accent);font-size:11px;font-weight:750;letter-spacing:.1em;text-transform:uppercase}.player-title h1{margin:6px 0;font-size:clamp(2rem,4vw,3.4rem)}.player-title p{margin:0;color:var(--text-soft)}.player-timeline{width:min(680px,100%);margin-top:8px}.player-timeline__tools{display:flex;align-items:center;justify-content:space-between;margin-bottom:3px}.player-timeline__history{display:flex;gap:3px}.player-timeline__lock{color:var(--accent)}.player-timeline input{width:100%;accent-color:var(--accent)}.player-timeline input:disabled{cursor:not-allowed;opacity:.42}.player-timeline>div:last-child{display:flex;justify-content:space-between;color:var(--text-faint);font-size:11px}.player-loading{display:flex;min-height:24px;align-items:center;justify-content:center;gap:8px;margin-top:8px;color:var(--accent);font-size:12px;font-weight:700}.player-loading small{color:var(--text-faint);font-weight:500}.player-loading__spinner{width:14px;height:14px;border:2px solid color-mix(in srgb,var(--accent) 25%,transparent);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}.player-controls{display:grid;grid-template-columns:54px 64px 82px 64px 54px;align-items:center;gap:clamp(8px,2vw,20px);margin-top:22px}.player-controls button{background:transparent}.player-play{display:grid;width:76px;height:76px;place-items:center;border-radius:50%;background:var(--surface-strong)!important;color:var(--bg);box-shadow:var(--shadow-md)}.player-skip{display:grid;width:60px;height:60px;place-items:center;color:var(--text)}.player-secondary{display:grid;width:50px;height:50px;place-items:center;border-radius:50%;color:var(--text-soft);font-weight:750}.player-secondary:hover,.player-skip:hover{background:var(--bg-soft)}.timer-active{color:var(--accent)}.player-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin-top:20px}.player-actions button{display:flex;align-items:center;gap:7px;padding:8px 12px;border-radius:999px;background:transparent;color:var(--text-soft);font-size:12px}.player-actions button:hover{background:var(--bg-soft);color:var(--text)}.player-queue{position:relative;z-index:2;overflow:auto;padding:38px 25px;border-left:1px solid var(--line);background:color-mix(in srgb,var(--surface-solid) 84%,transparent);backdrop-filter:blur(25px)}.player-queue__header{display:flex;align-items:end;justify-content:space-between;margin-bottom:20px}.player-queue__header h2{margin:0;font-family:var(--font-display);font-size:28px}.player-queue__header>span{color:var(--text-faint)}.chapter-list--player .chapter-row{grid-template-columns:34px minmax(0,1fr) auto}.playing-bars{display:flex;height:16px;align-items:end;gap:2px}.playing-bars i{width:2px;height:8px;background:var(--accent);animation:bars .8s ease-in-out infinite alternate}.playing-bars i:nth-child(2){height:14px;animation-delay:.2s}.playing-bars i:nth-child(3){height:5px;animation-delay:.4s}@keyframes bars{to{height:15px}}

.mini-player{position:fixed;right:clamp(16px,3vw,42px);bottom:22px;left:calc(var(--sidebar-width) + clamp(16px,3vw,42px));z-index:50;display:grid;grid-template-columns:minmax(0,1fr) auto auto auto auto;align-items:center;gap:6px;min-height:var(--mini-player-height);padding:8px 11px;border:1px solid var(--line-strong);border-radius:18px;background:color-mix(in srgb,var(--surface-solid) 89%,transparent);box-shadow:var(--shadow-lg);backdrop-filter:blur(24px)}.mini-player__open{display:flex;min-width:0;align-items:center;gap:12px;padding:0;background:transparent;text-align:left}.mini-player__cover{width:56px;flex:0 0 auto;border-radius:10px}.mini-player__text{display:grid;min-width:0}.mini-player__text strong,.mini-player__text small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mini-player__text small{color:var(--text-soft)}.mini-player__timeline{position:absolute;right:12px;bottom:0;left:80px}.mini-player__timeline .book-progress{height:2px}.mini-player__play{display:grid;width:48px;height:48px;place-items:center;border-radius:50%;background:var(--surface-strong);color:var(--bg)}.mini-player__stop{color:var(--text-soft)}

.dialog{width:min(94vw,560px);max-height:min(88vh,820px);padding:0;border:0;border-radius:22px;background:transparent;color:var(--text);box-shadow:var(--shadow-lg)}.dialog::backdrop{background:rgba(7,9,12,.62);backdrop-filter:blur(8px)}.dialog--wide{width:min(94vw,760px)}.dialog--form{width:min(94vw,720px)}.dialog__surface{overflow:hidden;border:1px solid var(--line);border-radius:22px;background:var(--surface-solid)}.dialog__header{display:flex;align-items:center;justify-content:space-between;padding:19px 21px;border-bottom:1px solid var(--line)}.dialog__header h2{margin:0;font-family:var(--font-display);font-size:24px}.dialog__content{overflow:auto;max-height:calc(88vh - 74px);padding:22px}.dialog__message{color:var(--text-soft)}.dialog__actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin-top:22px}.dialog-note{display:flex;gap:9px;margin-top:16px;padding:12px;border-radius:10px;background:var(--bg-soft);color:var(--text-soft);font-size:12px}.choice-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.choice-grid--three{grid-template-columns:repeat(3,1fr)}.choice-card{display:grid;min-height:180px;align-content:center;justify-items:start;gap:8px;padding:22px;border:1px solid var(--line);border-radius:16px;background:var(--bg-elevated);text-align:left;transition:border .18s,transform .18s}.choice-card:hover{border-color:var(--accent);transform:translateY(-2px)}.choice-card>.icon{color:var(--accent)}.choice-card strong{font-size:17px}.choice-card span{color:var(--text-soft);font-size:13px}.progress-dialog{display:grid;justify-items:center;gap:14px;padding:16px 0;text-align:center}.spinner{width:36px;height:36px;border:3px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.progress-track{overflow:hidden;width:100%;height:5px;border-radius:999px;background:var(--bg-soft)}.progress-track span{display:block;height:100%;background:var(--accent);transition:width .2s}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.form-grid label,.form-field{display:grid;gap:6px}.form-grid label>span,.form-field>span{font-size:12px;font-weight:650}.form-grid input,.form-grid textarea,.form-field textarea{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg-elevated);outline:0}.form-grid input:focus,.form-grid textarea:focus,.form-field textarea:focus{border-color:var(--accent)}.form-full{grid-column:1/-1}.option-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.option-button{min-height:45px;border:1px solid var(--line);border-radius:10px;background:var(--bg-elevated);font-weight:700}.option-button.is-active{border-color:var(--accent);background:var(--accent);color:#fff}.option-list{display:grid;gap:5px}.option-list button{min-height:45px;padding:0 14px;border-radius:10px;background:transparent;text-align:left}.option-list button:hover{background:var(--bg-soft)}.setup-steps li{margin:8px 0}

.toast-region{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:1000;display:grid;width:min(390px,calc(100vw - 32px));gap:9px;pointer-events:none}.toast{display:flex;align-items:center;gap:10px;padding:13px 13px;border:1px solid var(--line-strong);border-radius:14px;background:var(--surface-solid);box-shadow:var(--shadow-lg);opacity:0;pointer-events:auto;transform:translateY(15px);transition:opacity .22s,transform .22s}.toast.is-visible{opacity:1;transform:none}.toast__icon{display:grid;width:30px;height:30px;flex:0 0 auto;place-items:center;border-radius:50%;background:var(--bg-soft)}.toast__message{flex:1}.toast__action,.toast__close{background:transparent}.toast__action{color:var(--accent);font-weight:700}.toast__close{display:grid;width:28px;height:28px;place-items:center;color:var(--text-soft)}.toast--error .toast__icon{background:var(--danger-soft);color:var(--danger)}.toast--success .toast__icon{background:color-mix(in srgb,var(--success) 18%,transparent);color:var(--success)}

@media (max-width: 1060px) {
  :root{--sidebar-width:82px}.brand>span:last-child,.nav-item span,.connection-pill span{display:none}.brand{justify-content:center;padding-inline:0}.sidebar{padding-inline:12px}.nav-item{justify-content:center;padding:0}.nav-item.is-active::before{left:-12px}.mini-player{left:calc(var(--sidebar-width) + 22px)}.book-layout{grid-template-columns:minmax(0,1fr) 280px}.player-stage{grid-template-columns:minmax(0,1fr) 330px}
}

@media (max-width: 820px) {
  :root{--topbar-height:60px}.app-shell{display:block}.sidebar{display:none}.workspace{grid-column:1;padding-bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom))}.topbar{height:calc(var(--topbar-height) + env(safe-area-inset-top));padding:env(safe-area-inset-top) 14px 0}.mobile-brand{display:flex}.mobile-brand .brand__mark{width:34px;height:34px;border-radius:10px}.mobile-brand .brand__mark svg{width:24px}.mobile-brand strong{font-family:var(--font-display);font-size:20px}.topbar__add span{display:none}.topbar__add{width:42px;padding:0}.bottom-nav{position:fixed;right:0;bottom:0;left:0;z-index:55;display:grid;height:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));grid-template-columns:repeat(5,1fr);padding:6px 6px env(safe-area-inset-bottom);border-top:1px solid var(--line);background:color-mix(in srgb,var(--surface-solid) 92%,transparent);backdrop-filter:blur(24px)}.bottom-nav .nav-item{display:flex;min-height:58px;flex-direction:column;justify-content:center;gap:2px;padding:2px;border-radius:10px;font-size:10px}.bottom-nav .nav-item span{display:block}.bottom-nav .nav-item.is-active{background:var(--accent-soft);color:var(--accent);box-shadow:none}.bottom-nav .nav-item.is-active::before{display:none}.main-content{min-height:calc(100dvh - var(--topbar-height) - var(--bottom-nav-height))}.page{padding:26px 17px calc(35px + env(safe-area-inset-bottom))}.page-intro{align-items:center}.welcome-hero{grid-template-columns:1fr;min-height:0;padding:35px 25px}.hero-art{display:none}.continue-card{grid-template-columns:105px minmax(0,1fr);gap:18px;padding:19px;border-radius:22px}.continue-card__cover{border-radius:13px}.continue-card__content h2{font-size:26px}.continue-card__content .eyebrow,.continue-card__content p,.continue-card__number{display:none}.continue-card__meta{display:none}.continue-card__actions{margin-top:14px}.continue-card__actions .button--ghost{display:none}.stats-strip{grid-template-columns:repeat(2,1fr)}.book-row{grid-auto-columns:minmax(142px,42vw)}.book-card__play{opacity:1;transform:none}.library-toolbar{grid-template-columns:1fr auto}.library-toolbar .select-control{grid-column:1/2;grid-row:2}.library-toolbar .segmented{grid-column:2;grid-row:2}.book-collection--grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 14px}.book-card--list .book-card__body{display:grid;grid-template-columns:1fr}.book-card--list .book-card__body>.book-progress,.book-card--list .book-card__body small{display:none}.book-hero{grid-template-columns:125px minmax(0,1fr);gap:20px;align-items:start;margin-bottom:32px}.book-hero__cover{border-radius:14px}.book-hero__content h1{font-size:30px}.book-hero__author{font-size:15px}.book-hero__content>p:not(.book-hero__author),.book-hero__meta span:nth-child(2){display:none}.book-hero__progress{margin-top:15px}.book-hero__actions{margin-top:15px}.book-hero__actions .button{min-height:43px;padding-inline:16px}.book-layout{grid-template-columns:1fr}.book-sidebar{position:static;grid-row:1}.book-sidebar .side-card{display:block}.settings-layout{grid-template-columns:1fr}.storage-card{grid-template-columns:auto 1fr auto}.storage-meter{grid-column:1/-1;grid-row:2}.player-stage{display:block;min-height:calc(100dvh - var(--topbar-height) - var(--bottom-nav-height));padding-bottom:0}.player-main{min-height:calc(100dvh - var(--topbar-height) - var(--bottom-nav-height));padding:48px 22px 28px}.player-cover{width:min(40vh,70vw)}.player-queue{display:none}.player-title{margin-top:18px}.player-title h1{font-size:28px}.player-controls{grid-template-columns:45px 54px 72px 54px 45px;gap:4px}.player-play{width:68px;height:68px}.player-actions{margin-top:12px}.player-actions button{font-size:0}.player-actions button .icon{width:22px;height:22px}.mini-player{right:8px;bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 7px);left:8px;min-height:66px;padding:7px 8px;border-radius:15px}.mini-player__cover{width:49px}.mini-player__forward{display:none}.mini-player__timeline{left:68px}.search-hints{grid-template-columns:1fr}.choice-grid{grid-template-columns:1fr}.choice-card{min-height:130px}.toast-region{bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 12px)}
}

@media (max-width: 520px) {
  .page-intro h1{font-size:40px}.page-intro .button{min-height:40px}.status-button{display:none}.continue-card{grid-template-columns:88px 1fr}.continue-card__content h2{font-size:22px}.continue-card__actions .button{min-height:40px}.stats-strip>div{min-height:74px;padding:13px}.stats-strip strong{font-size:19px}.book-hero{grid-template-columns:100px 1fr}.book-hero__content h1{font-size:26px}.book-hero__content .eyebrow,.book-hero__content>p:not(.book-hero__author){display:none}.book-hero__actions .icon-button{display:none}.book-hero__meta span:last-child{display:none}.chapter-row{grid-template-columns:33px minmax(0,1fr) auto;padding-inline:7px}.bookmark-row>button:first-child{grid-template-columns:70px 1fr}.storage-card__icon{display:none}.download-row__cover{width:52px}.download-row__actions .icon-button:first-child{display:none}.setting-row{gap:10px}.setting-row .select-control{max-width:135px}.form-grid{grid-template-columns:1fr}.form-full{grid-column:1}.dialog__content{padding:17px}.option-grid{grid-template-columns:repeat(3,1fr)}.player-main{justify-content:flex-start;padding-top:42px}.player-cover{width:min(36vh,72vw)}.player-title{margin-bottom:9px}.player-title h1{font-size:24px}.player-controls{margin-top:13px}.player-actions{margin-top:6px}.mini-player__text small{display:none}
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* Sincronización y gestión avanzada del audiolibro */
.player-timeline__primary-tools{display:flex;gap:3px}.player-timeline__time-jump{color:var(--text-soft)}.player-timeline__times{display:flex;justify-content:space-between;color:var(--text-faint);font-size:11px}.player-timeline__times [data-player-current-time].is-previewing{color:var(--accent);font-weight:750}
.form-error{margin:9px 0 0;color:var(--danger);font-size:13px}
@media (max-width:520px){.book-hero__cover-edit,.book-hero__title-edit{display:grid!important}.book-hero__cover-edit{right:7px;bottom:7px}}

/* Reproductor inmersivo: ocupa el alto disponible sin convertir la pantalla en una página desplazable. */
.app-shell--player .workspace{display:flex;height:100dvh;flex-direction:column;overflow:hidden}.app-shell--player .topbar,.app-shell--player .offline-banner,.app-shell--player .update-banner{flex:0 0 auto}.app-shell--player .main-content{height:auto;min-height:0;flex:1 1 auto}.app-shell--player .page--player{height:100%;min-height:0;padding:0;overflow:hidden}.player-stage{height:100%;min-height:0}.player-main{height:100%;min-height:0;display:grid;grid-template-rows:auto auto auto auto auto;align-content:space-between;justify-items:center;padding:clamp(18px,3.7vh,40px) clamp(24px,6vw,90px)}.player-collapse{right:25px;left:auto;z-index:3}.player-cover{width:min(42vh,380px,75vw)}.player-title{margin:0;text-align:center}.player-title h1{margin:6px 0}.player-timeline{margin:0}.player-loading{margin:0}.player-controls{margin:0}.player-actions{margin:0}

@media (max-width:820px){
  .app-shell--player .workspace{padding-bottom:0}.app-shell--player .main-content{height:auto;min-height:0}.app-shell--player .page--player{height:calc(100% - var(--bottom-nav-height) - env(safe-area-inset-bottom));padding:0}.app-shell--player .player-stage{height:100%;min-height:0}.app-shell--player .player-main{height:100%;min-height:0;padding:10px 12px 8px}.app-shell--player .player-collapse{top:8px;right:12px;left:auto}.app-shell--player .player-cover{width:min(34vh,70vw)}.app-shell--player .player-title h1{font-size:clamp(22px,6vw,28px)}.app-shell--player .player-title p{font-size:13px}.app-shell--player .player-controls{grid-template-columns:45px 54px 72px 54px 45px;gap:4px}.app-shell--player .player-play{width:68px;height:68px}.app-shell--player .player-actions button{font-size:0}.app-shell--player .player-actions button .icon{width:22px;height:22px}
}

@media (max-width:820px) and (orientation:landscape){
  .app-shell--player .player-main{grid-template-columns:minmax(110px,26vw) minmax(0,1fr);grid-template-rows:auto auto auto auto auto;align-content:center;column-gap:clamp(18px,4vw,42px);row-gap:4px;padding:10px max(16px,env(safe-area-inset-left)) 8px}.app-shell--player .player-collapse{top:5px;right:max(7px,env(safe-area-inset-right));left:auto;width:34px;height:34px}.app-shell--player .player-collapse .icon{width:20px;height:20px}.app-shell--player .player-cover{grid-column:1;grid-row:1/5;width:min(45vh,26vw,190px);align-self:center}.app-shell--player .player-title{grid-column:2;grid-row:1;width:100%;text-align:left}.app-shell--player .player-title>span{font-size:10px}.app-shell--player .player-title h1{margin:2px 0;font-size:clamp(20px,4vh,28px)}.app-shell--player .player-title p{font-size:12px}.app-shell--player .player-loading{grid-column:2;grid-row:2;justify-content:flex-start;min-height:18px}.app-shell--player .player-controls{grid-column:2;grid-row:3;justify-self:start;grid-template-columns:40px 50px 68px 50px 40px;gap:clamp(3px,1.2vw,13px)}.app-shell--player .player-play{width:62px;height:62px}.app-shell--player .player-skip{width:48px;height:48px}.app-shell--player .player-secondary{width:42px;height:42px}.app-shell--player .player-actions{grid-column:2;grid-row:4;justify-self:start}.app-shell--player .player-timeline{grid-column:1/-1;grid-row:5;width:min(760px,100%)}
}

@media (max-height:620px) and (orientation:portrait){.app-shell--player .player-main{padding-top:10px;padding-bottom:8px}.app-shell--player .player-cover{width:min(28vh,62vw)}.app-shell--player .player-title h1{font-size:22px}.app-shell--player .player-controls{transform:scale(.9);transform-origin:center}.app-shell--player .player-actions{transform:scale(.9);transform-origin:center}}
.storage-meter--split{position:relative}.storage-meter--split .storage-meter__offline,.storage-meter--split .storage-meter__temporary{position:absolute;top:0;bottom:0;display:block;height:100%;border-radius:0}.storage-meter--split .storage-meter__offline{left:0;background:var(--accent)}.storage-meter--split .storage-meter__temporary{background:var(--gold)}.storage-legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:7px}.storage-legend span{display:inline-flex;color:var(--text-faint);font-size:10px}.storage-legend i{width:8px;height:8px;margin:3px 4px 0 0;border-radius:50%;background:var(--accent)}.storage-legend .storage-legend__temporary{background:var(--gold)}.selected-file-list{display:grid;gap:5px;max-height:220px;margin:18px 0;padding:0;overflow:auto;list-style:none}.selected-file-list li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:var(--bg-elevated)}.selected-file-list li>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.sync-conflict{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;margin:18px 0 34px;padding:18px 20px;border:1px solid color-mix(in srgb,var(--gold) 45%,var(--line));border-radius:var(--radius-md);background:color-mix(in srgb,var(--gold) 10%,var(--surface-solid));box-shadow:var(--shadow-sm)}
.sync-conflict>div:first-child{display:flex;align-items:flex-start;gap:12px}.sync-conflict>div:first-child>.icon{flex:0 0 auto;color:var(--gold)}.sync-conflict strong{display:block}.sync-conflict p{margin:3px 0 0;color:var(--text-soft);font-size:13px}.sync-conflict__choices{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.sync-conflict__choices .button{display:grid;justify-items:start;height:auto;min-height:48px;padding:8px 12px;text-align:left}.sync-conflict__choices .button strong{font-size:14px}.sync-conflict__choices .button span{color:var(--text-soft);font-size:10px}
.side-card--actions{display:grid;gap:2px}.side-card--actions h3{margin-bottom:7px}.side-card--actions .text-button{width:100%;min-height:38px;justify-content:flex-start;padding:7px 0;color:var(--text)}.side-card--actions .text-button:hover{color:var(--accent)}
.track-order-list{display:grid;gap:8px;margin:18px 0 0;padding:0;list-style:none}.track-order-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--bg-elevated)}.track-order-row__handle{display:grid;width:34px;height:34px;place-items:center;border-radius:9px;background:var(--bg-soft);color:var(--text-soft);font-size:11px;font-weight:750}.track-order-row>span:nth-child(2){display:grid;min-width:0}.track-order-row strong,.track-order-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.track-order-row small{color:var(--text-soft);font-size:11px}.track-order-row__actions{display:flex;gap:6px}

@media (max-width:820px){.sync-conflict{grid-template-columns:1fr;margin-bottom:24px}.sync-conflict__choices{justify-content:flex-start}.book-sidebar .side-card{display:block}.track-order-row{grid-template-columns:32px minmax(0,1fr) auto}.track-order-row__actions .icon-button{width:36px;height:36px}}
@media (max-width:520px){.sync-conflict__choices{display:grid}.sync-conflict__choices .button{width:100%}.track-order-row{padding:8px;gap:8px}.track-order-row__actions{gap:3px}}
