/* Refined mobile library: warm paper, editorial type, quiet controls. */
body[data-theme="light"] {
  --ink: #292c29; --muted: #72766e; --line: #e2e3db;
  --panel: #f9f8f3; --card: #efeee7; --soft: #eeeee6; --wash: #e5e7dc;
  --accent: #536347; --accent-dark: #45553b; --accent-contrast: #fff;
  --pill-bg: #e5eadf; --panel-bg: #f9f8f3; --card-bg: #f0efe9;
  --input-bg: #fffefa; --sidebar-bg: #f9f8f3; --tab-bg: #eeeee6;
  --toast-bg: #292c29; --shadow: 0 4px 18px #252e2410;
}
body[data-theme="dark"] {
  --ink: #e6e5dd; --muted: #a2a69a; --line: #343a32;
  --panel-bg: #1b201b; --card-bg: #252b24; --soft: #2b3229;
  --sidebar-bg: #1b201b; --input-bg: #222820; --tab-bg: #2b3229;
  --accent: #bdcaa9; --accent-dark: #bdcaa9; --accent-contrast: #1b201b;
  --pill-bg: #303a2b; --shadow: 0 4px 18px #0002;
}
body.phone-preview { font-size: 14px; -webkit-font-smoothing: antialiased; }
body.phone-preview .sidebar { padding: 17px 22px 18px; background: var(--panel-bg); border-bottom: 1px solid var(--line); backdrop-filter: none; }
.brand-identity { gap: 12px; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; font-family: Georgia, serif; font-size: 19px; font-weight: 400; color: var(--accent); background: var(--soft); border: 1px solid var(--line); }
.brand .welcome-label { font-size: 11px; letter-spacing: .15px; line-height: 1.6; }
.brand .welcome-name { font: 26px/1.1 Georgia, 'Times New Roman', serif; letter-spacing: -.6px; }
.menu-button { border: 0; background: transparent; color: var(--muted); width: 44px; height: 44px; font-size: 21px; }
body.phone-preview .workspace { padding: 24px 22px 102px; }
body.phone-preview.home-active .workspace { padding-top: 25px; }
h1, .section-heading h2, .rail-heading h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.6px; }
body.phone-preview .topbar h1 { font-size: 29px; line-height: 1.15; }
.section-heading h2, .rail-heading h2 { font-size: 25px; line-height: 1.2; }
.section-heading p, .rail-heading p { font-size: 11px; line-height: 1.6; color: var(--muted); margin: 5px 0 0; }
body.phone-preview .home-view { gap: 28px; }
.home-rails { gap: 28px; }
body.phone-preview .home-hero { padding: 0 0 23px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; }
.section-heading { margin-bottom: 16px; }
.rail-heading { margin-bottom: 13px; }
body.phone-preview .rail { grid-auto-columns: 132px; gap: 17px; padding: 2px 0 12px; scrollbar-color: var(--line) transparent; }
body.phone-preview .resume-rail { grid-auto-columns: calc(100% - 18px); gap: 12px; }
body.phone-preview .resume-rail .title-card { padding: 16px; grid-template-columns: 82px minmax(0, 1fr); gap: 18px; background: var(--card-bg); border-radius: 13px; border: 1px solid var(--line); }
body.phone-preview .resume-rail .cover { width: 82px; border-radius: 3px 6px 6px 3px; }
.resume-copy { gap: 10px; }
.resume-rail .title-card strong { font-family: Georgia, serif; font-size: 20px; font-weight: 400; line-height: 1.2; }
.title-card { padding: 0; border: 0; border-radius: 0; background: transparent; gap: 8px; align-content: start; }
.title-card.active, .title-card:hover { box-shadow: none; }
.title-card:focus-visible, .order-toggle:focus-visible, .bottom-nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.title-card.active .cover { outline: 2px solid var(--accent); outline-offset: 3px; }
.cover, .detail-cover { border-radius: 3px 6px 6px 3px; box-shadow: 0 3px 7px #00000012; }
.title-card strong { font-size: 13px; line-height: 1.35; font-weight: 580; }
.title-card small { font-size: 10px; line-height: 1.5; color: var(--muted); }
.mini-progress { height: 2px; border-radius: 2px; background: var(--line); }
body.phone-preview .collection-rail { grid-auto-columns: calc(100% - 18px); gap: 12px; }
.collection-card { padding: 15px; grid-template-columns: 84px minmax(0, 1fr); border-radius: 12px; background: transparent; gap: 15px; }
.collection-cover, .collection-cover.has-art { border-radius: 3px 5px 5px 3px; }
.collection-copy h3 { font-family: Georgia, serif; font-size: 20px; font-weight: 400; letter-spacing: -.4px; }
.collection-copy p { font-size: 11px; }
.collection-formats { gap: 5px; }
.collection-formats span { padding: 0; background: none; color: var(--muted); border-radius: 0; font-size: 9px; }
.collection-formats span + span::before { content: '·'; margin-right: 5px; }
.collection-order { gap: 4px; }
.order-toggle { padding: 5px 7px; font-size: 9px; border-radius: 5px; }
.collection-copy ol { font-size: 10px; gap: 4px; line-height: 1.5; }
body.phone-preview .bottom-nav { left: 0; right: 0; bottom: 0; padding: 10px 12px 8px; gap: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--panel-bg); box-shadow: 0 -6px 20px #00000003; backdrop-filter: none; }
.bottom-nav-item { min-height: 50px; gap: 3px; }
.bottom-nav-item > span, .bottom-nav-item.active > span { width: 38px; height: 29px; border: 0; border-radius: 0; background: transparent; color: inherit; }
.bottom-nav-item svg { width: 21px; height: 21px; stroke-width: 1.5; }
.bottom-nav-item small { font-size: 9px; letter-spacing: .15px; }
.bottom-nav-item.active small { font-weight: 650; }
.bottom-nav-item.active svg { stroke-width: 2; }
body.phone-preview .library-panel, body.phone-preview .detail-panel { padding: 16px; border-radius: 12px; box-shadow: none; }
body.phone-preview .title-grid { gap: 18px 13px; }
body.phone-preview .title-grid .title-card { padding: 0; }
.profile-panel, .settings-panel, .metric-card, .profile-intro { box-shadow: none; border-radius: 12px; }
.primary-button, .ghost-button, .icon-button { box-shadow: none; }
.primary-button, .ghost-button { border-radius: 8px; font-size: 12px; min-height: 40px; }
body.phone-preview .audio-dock, body.phone-preview .reader-stage { border-radius: 14px; box-shadow: 0 10px 32px #0002; bottom: 82px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
