        /* ══ Design system ReadEdy: dark + laranja, único em todas as telas ══
           O botão de tema já não troca a cor da interface — apenas inverte as
           cores da página do PDF (papel claro ⇄ papel escuro). */
        :root {
            --primary: #141414;
            --bg: #0f0f0f;
            --text: #ffffff;
            --panel: #1c1c1c;
            --accent: #F8991D;
            --on-accent: #111111;
            --highlight: #4a3f1a;
            --read-surface: #0f0f0f;
            --read-page: #141414;
            --home-bg: #0f1117;
            --home-card: #1a1d26;
            --home-accent: #F8991D;
            --home-text: #ffffff;
            --home-muted: #9a9a9a;
            --home-border: rgba(255,255,255,0.08);
            --nav-h: 56px;
            --reader-bar-h: 62px;
        }
        body.dark {
            --primary: #141414;
            --bg: #0f0f0f;
            --text: #ffffff;
            --panel: #1c1c1c;
            --accent: #F8991D;
            --on-accent: #111111;
            --highlight: #4a3f1a;
            --read-surface: #0f0f0f;
            --read-page: #141414;
        }
        html, body {
            margin: 0 !important;
            padding: 0 !important;
            width: 100% !important;
            height: 100% !important;
            overflow: hidden !important;
            position: fixed !important;
            top: 0;
            left: 0;
        }
        html { -webkit-text-size-adjust: 100%; }
        body { font-family: system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; box-sizing: border-box; }
        #app-container {
            display: -webkit-box !important;
            display: -webkit-flex !important;
            display: -ms-flexbox !important;
            display: flex !important;
            width: 100% !important;
            height: 100% !important;
            overflow: hidden !important;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-height: 0;
        }
        #main-container, .pdf-viewer-area, #viewer-container {
            -webkit-box-flex: 1 !important;
            -webkit-flex: 1 !important;
            -ms-flex: 1 !important;
            flex: 1 !important;
            height: 100% !important;
            display: -webkit-box !important;
            display: -webkit-flex !important;
            display: -ms-flexbox !important;
            display: flex !important;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            overflow: auto !important;
            background-color: var(--bg) !important;
            min-height: 0;
            min-width: 0;
        }
        body.reading-mode { background: var(--read-surface); }
        body.reading-mode #viewer-container { padding-top: 22px; }
        body.reading-mode #pdf-render-area .pdf-page-wrap { box-shadow: 0 10px 44px rgba(0,0,0,0.2); border-radius: 6px; overflow: hidden; }
        body.reading-mode #pdf-render-area .pdf-page-inner { background: var(--read-page); }
        header:not(.app-topbar) { background: var(--primary); color: var(--text); padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top, 0px)); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; gap: 10px; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; border-bottom: 1px solid var(--home-border); -webkit-box-flex: 0; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; }
        header:not(.app-topbar) .header-actions { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; gap: 8px; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: end; -webkit-justify-content: flex-end; -ms-flex-pack: end; justify-content: flex-end; -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
        body.ui-chrome-hidden header:not(.app-topbar) { display: none; }
        #viewer-container { -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; min-height: 0; min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; overflow: auto; overflow-x: hidden; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; -webkit-align-items: stretch; -ms-flex-align: stretch; align-items: stretch; padding: 15px; padding-bottom: 15px; -webkit-overflow-scrolling: touch; }
        body.pdf-is-open #viewer-container { padding: 0 !important; }
        body.pdf-is-open:not(.ui-chrome-hidden) #viewer-container {
            padding-top: calc(58px + env(safe-area-inset-top, 0px)) !important;
            padding-bottom: calc(var(--reader-bar-h) + 24px + env(safe-area-inset-bottom, 0px)) !important;
        }
        body.pdf-is-open.ui-chrome-hidden #viewer-container { padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
        #pdf-render-area { width: 100%; max-width: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
        #pdf-render-area .pdf-page-wrap { margin: 0 auto; max-width: 100%; }
        #pdf-render-area .pdf-page-inner { position: relative; transform-origin: 0 0; }
        #pdf-render-area canvas { display: block; box-shadow: 0 4px 15px rgba(0,0,0,0.2); background: white; border-radius: 4px; }
        body.reading-mode #pdf-render-area canvas { box-shadow: none; border-radius: 0; }
        /* Tema escuro: inverte o PDF (texto claro em fundo escuro); hue-rotate preserva cores em páginas ilustradas */
        body.dark #pdf-render-area canvas {
            -webkit-filter: invert(1) hue-rotate(180deg);
            filter: invert(1) hue-rotate(180deg);
            background: #1a1a1a;
            box-shadow: 0 4px 18px rgba(0,0,0,0.45);
        }
        body.dark.reading-mode #pdf-render-area canvas {
            box-shadow: none;
        }
        body.dark.reading-mode #pdf-render-area .pdf-page-inner {
            background: #0d0d0d;
        }
        .text-layer { position: absolute; left: 0; top: 0; overflow: hidden; line-height: 1; pointer-events: none; }
        .text-layer span { position: absolute; color: transparent; white-space: pre; transform-origin: 0 0; box-sizing: content-box; }
        .text-layer span.tts-active { background: rgba(255, 214, 74, 0.68); border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 180, 0, 0.35); }
        body.dark .text-layer span.tts-active { background: rgba(212, 168, 42, 0.62); box-shadow: 0 0 0 1px rgba(255, 200, 80, 0.25); }
        body.tts-paused .text-layer span.tts-active { box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.55); }
        /* Barra de leitura: cartão flutuante na mesma linguagem da Home */
        .controls-bottom {
            position: fixed;
            bottom: calc(12px + env(safe-area-inset-bottom, 0px));
            left: 10px;
            right: 10px;
            max-width: 520px;
            margin: 0 auto;
            box-sizing: border-box;
            background: rgba(28,28,28,0.94);
            color: var(--text);
            padding: 8px 10px;
            z-index: 1000;
            border: 1px solid var(--home-border);
            border-radius: 16px;
            box-shadow: 0 8px 28px rgba(0,0,0,0.45);
        }
        body.ui-chrome-hidden .controls-bottom { display: none; }
        .controls-inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; width: 100%; box-sizing: border-box; }
        .controls-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
        .controls-row.tts-options label { font-size: 0.8rem; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
        .controls-row.tts-options select { max-width: 200px; border-radius: 8px; padding: 6px 8px; border: none; background: #333; color: #fff; }
        .controls-row.tts-options input[type="range"] { width: 100px; vertical-align: middle; }
        .controls-row.page-jump label { font-size: 0.8rem; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
        .controls-row.page-jump input[type="number"] { width: 76px; border-radius: 8px; padding: 6px 8px; border: none; background: #333; color: #fff; font-size: 0.9rem; }
        .controls-row.page-jump input[type="number"]::-webkit-outer-spin-button,
        .controls-row.page-jump input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .controls-row.page-jump input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
        .btn { border: none; border-radius: 20px; padding: 8px 15px; cursor: pointer; font-weight: 600; transition: 0.2s; font-size: 0.9rem; }
        .btn-main { background: var(--accent); color: var(--on-accent); }
        .btn-ghost { background: rgba(255,255,255,0.12); color: white; }
        .btn-nav-arrow {
            min-width: 44px;
            width: 44px;
            height: 44px;
            padding: 0;
            line-height: 44px;
            text-align: center;
            background: rgba(255,255,255,0.1);
            color: var(--text);
            font-size: 1.15rem;
            border: none;
            border-radius: 999px;
            cursor: pointer;
            font-weight: 600;
        }
        .btn-tts-ui {
            position: relative;
            min-width: 44px;
            width: 44px;
            height: 44px;
            padding: 0;
            border: none;
            border-radius: 999px;
            cursor: pointer;
            display: -webkit-inline-box;
            display: -webkit-inline-flex;
            display: -ms-inline-flexbox;
            display: inline-flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            vertical-align: middle;
        }
        .btn-tts-ui .ico { width: 22px; height: 22px; }
        .btn-tts-ui.tts-state-idle,
        .btn-tts-ui.tts-state-continue { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 16px rgba(248,153,29,0.3); }
        .btn-tts-ui.tts-state-playing { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3px rgba(248,153,29,0.28); }
        .btn-tts-ui:disabled { opacity: 0.45; cursor: not-allowed; }
        #btn-tts-float { display: none; }
        body.ui-chrome-hidden.pdf-is-open #btn-tts-float {
            display: -webkit-inline-flex !important;
            display: -ms-inline-flexbox !important;
            display: inline-flex !important;
        }
        .hidden { display: none !important; }
        #loading { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.75); color: white; padding: 20px; border-radius: 10px; z-index: 2000; }
        .sr-hint { font-size: 0.7rem; opacity: 0.75; width: 100%; text-align: center; }
        .nowrap { white-space: nowrap; }
        .cloud-library-wrap { position: relative; flex-shrink: 0; max-width: 160px; vertical-align: middle; }
        .cloud-library-wrap.hidden { display: none !important; }
        .cloud-library-trigger {
            display: block;
            width: 100%;
            max-width: 160px;
            border-radius: 8px;
            padding: 6px 8px;
            border: 1px solid rgba(255,255,255,0.35);
            background: rgba(255,255,255,0.18);
            color: #fff;
            font-size: 0.8rem;
            text-align: left;
            cursor: pointer;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .cloud-library-panel {
            position: fixed;
            z-index: 4500;
            min-width: min(92vw, 280px);
            max-width: min(92vw, 380px);
            max-height: min(50vh, 360px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            background: #252525;
            color: #fff;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 12px;
            box-shadow: 0 10px 28px rgba(0,0,0,0.45);
        }
        .cloud-library-panel.hidden { display: none !important; }
        .cloud-library-item {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 6px;
            padding: 8px 8px 8px 10px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        .cloud-library-item:last-child { border-bottom: none; }
        .cloud-library-item-name {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-width: 0;
            border: none;
            background: transparent;
            color: inherit;
            font-size: 0.8rem;
            text-align: left;
            cursor: pointer;
            padding: 6px 4px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .cloud-library-item-name:active { opacity: 0.85; }
        .cloud-library-item-del {
            width: 36px;
            height: 36px;
            min-width: 36px;
            border: none;
            border-radius: 8px;
            background: rgba(192, 57, 43, 0.45);
            color: #fff;
            font-size: 1rem;
            line-height: 1;
            cursor: pointer;
            flex-shrink: 0;
        }
        .cloud-library-item-del:active { -webkit-transform: scale(0.95); transform: scale(0.95); }
        .cloud-library-empty { padding: 12px 14px; font-size: 0.8rem; opacity: 0.75; }
        #btn-cloud-save:disabled,
        #btn-cloud-delete:disabled { opacity: 0.45; cursor: not-allowed; }
        #tts-toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(10px); background: rgba(30,30,30,0.92); color: #fff; padding: 9px 20px; border-radius: 20px; font-size: 0.82rem; pointer-events: none; opacity: 0; transition: opacity 0.25s, transform 0.25s; z-index: 3000; white-space: nowrap; }
        body.pdf-is-open:not(.ui-chrome-hidden) #tts-toast { bottom: calc(var(--reader-bar-h) + 30px + env(safe-area-inset-bottom, 0px)); }
        #tts-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
        .header-actions { gap: 6px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
        .app-topbar .header-actions { overflow: visible; overflow-x: visible; }
        .header-actions::-webkit-scrollbar { display: none; }
        .hdr-icon-btn {
            width: 40px;
            height: 40px;
            min-width: 40px;
            border: none;
            border-radius: 999px;
            background: rgba(255,255,255,0.14);
            color: #fff;
            font-size: 1.05rem;
            line-height: 1;
            cursor: pointer;
            display: -webkit-inline-box;
            display: -webkit-inline-flex;
            display: -ms-inline-flexbox;
            display: inline-flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            padding: 0;
            flex-shrink: 0;
            vertical-align: middle;
        }
        .hdr-icon-btn:active { -webkit-transform: scale(0.96); transform: scale(0.96); }
        .hdr-icon-btn.hdr-icon-pill { width: auto; min-width: 40px; padding: 0 11px; gap: 3px; }
        .hdr-icon-danger { background: #c0392b; }
        .hdr-micro { font-size: 0.58rem; font-weight: 800; letter-spacing: 0.04em; opacity: 0.95; }
        #cloud-badge {
            cursor: default;
            font-size: 1.15rem;
        }
        #cloud-badge.cloud-status-on { background: rgba(39, 174, 96, 0.45); box-shadow: 0 0 0 2px #2ecc71; }
        #cloud-badge.cloud-status-off { background: rgba(192, 57, 43, 0.4); box-shadow: 0 0 0 2px #e74c3c; }
        #cloud-badge.cloud-status-error { background: rgba(192, 57, 43, 0.55); box-shadow: 0 0 0 2px #e74c3c; }
        #cloud-badge.cloud-status-wait,
        #cloud-badge.cloud-status-pending { background: rgba(255,255,255,0.1); opacity: 0.85; }
        .cloud-library-wrap.hdr-library-select { width: -webkit-fit-content; width: fit-content; max-width: none; min-width: 0; }
        .cloud-library-wrap.hdr-library-select .cloud-library-trigger {
            width: auto;
            max-width: none;
            min-width: 0;
            border-radius: 999px;
            padding: 8px 11px;
            border: 1px solid rgba(255,255,255,0.35);
            background: rgba(255,255,255,0.16);
            font-size: 0.78rem;
            text-align: center;
        }
        #settings-screen {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 5000;
            background: var(--bg);
            color: var(--text);
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            overflow: hidden;
        }
        #settings-screen.open { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; }
        #settings-screen.open .settings-screen-card {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-height: 0;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
        }
        .settings-scroll-wrap {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-height: 0;
            position: relative;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
        }
        .settings-screen-header {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            background: var(--primary);
            color: #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            flex-shrink: 0;
        }
        .settings-screen-header h1 { margin: 0; font-size: 1.05rem; font-weight: 700; -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; }
        .settings-back-btn {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 999px;
            background: rgba(255,255,255,0.15);
            color: #fff;
            font-size: 1.25rem;
            cursor: pointer;
            line-height: 1;
            padding: 0;
        }
        .settings-screen-scroll {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            touch-action: pan-y;
            padding: 16px 14px 28px;
            box-sizing: border-box;
        }
        .settings-screen-inner { max-width: 520px; margin: 0 auto; width: 100%; }
        .settings-group {
            background: var(--panel);
            border: 1px solid var(--home-border);
            border-radius: 12px;
            padding: 4px 0;
            margin-bottom: 14px;
        }
        .settings-group-title {
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            opacity: 0.55;
            margin: 0;
            padding: 12px 14px 6px;
        }
        .settings-row {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: start;
            -webkit-align-items: flex-start;
            -ms-flex-align: start;
            align-items: flex-start;
            gap: 12px;
            padding: 12px 14px;
            margin: 0;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 600;
            border-top: 1px solid rgba(128,128,128,0.12);
        }
        .settings-group .settings-row:first-of-type { border-top: none; }
        .settings-row input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; }
        .settings-row-text { -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
        .settings-group .panel-hint {
            font-size: 0.72rem;
            opacity: 0.72;
            margin: -4px 14px 12px;
            padding: 0;
            font-weight: 400;
            line-height: 1.4;
        }
        .settings-danger-wrap { padding: 0 0 8px; }
        .settings-field {
            padding: 12px 14px;
            border-top: 1px solid rgba(128,128,128,0.12);
        }
        .settings-group .settings-field:first-of-type { border-top: none; }
        .settings-field-label {
            display: block;
            font-size: 0.88rem;
            font-weight: 600;
            margin-bottom: 8px;
        }
        .settings-field-control {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-flex-wrap: wrap;
            -ms-flex-wrap: wrap;
            flex-wrap: wrap;
            gap: 8px;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
        }
        #settings-panel #voice-select,
        #settings-panel #tts-engine-select {
            width: 100%;
            max-width: 100%;
            border-radius: 8px;
            padding: 8px 10px;
            border: 1px solid rgba(128,128,128,0.22);
            background: var(--bg);
            color: var(--text);
            font-size: 0.88rem;
            box-sizing: border-box;
        }
        #settings-panel #tts-engine-select option:disabled {
            color: rgba(128,128,128,0.65);
        }
        #tts-engine-hint {
            margin-top: -6px;
        }
        .rate-btn-group {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            gap: 7px;
            -webkit-flex-wrap: wrap;
            -ms-flex-wrap: wrap;
            flex-wrap: wrap;
            margin-top: 2px;
        }
        .rate-btn {
            padding: 7px 16px;
            border-radius: 999px;
            border: 1px solid rgba(128,128,128,0.3);
            background: var(--panel);
            color: var(--text);
            font-size: 0.88rem;
            font-weight: 600;
            cursor: pointer;
            -webkit-transition: background 0.15s, color 0.15s, border-color 0.15s;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
            min-width: 52px;
            text-align: center;
        }
        .rate-btn.rate-active {
            background: var(--accent);
            color: var(--on-accent);
            border-color: transparent;
        }
        @media (pointer: coarse) {
            .rate-btn { min-height: 44px; padding: 10px 18px; }
        }
        #settings-panel #rate-label {
            display: none;
        }
        #settings-panel #rate-range {
            display: none;
        }
        /* mantido para compatibilidade — antigo rate-label */
        #settings-panel #rate-label {
            font-size: 0.88rem;
            font-weight: 600;
            min-width: 2.2em;
            text-align: right;
        }
        #settings-panel #page-jump-input {
            width: 80px;
            border-radius: 8px;
            padding: 8px 10px;
            border: 1px solid rgba(128,128,128,0.22);
            background: var(--bg);
            color: var(--text);
            font-size: 0.9rem;
        }
        #settings-panel #btn-page-jump {
            border: none;
            border-radius: 8px;
            padding: 8px 16px;
            background: var(--accent);
            color: var(--on-accent);
            font-weight: 600;
            font-size: 0.88rem;
            cursor: pointer;
        }
        .settings-panel .sr-hint-block {
            font-size: 0.72rem;
            opacity: 0.72;
            margin: 0 14px 12px;
            line-height: 1.45;
        }
        .controls-inner-compact { gap: 6px; }
        .controls-row-main { margin: 0; }
        .settings-save-wrap {
            padding: 10px 14px 4px;
        }
        #btn-save-settings {
            display: block;
            width: 100%;
            padding: 14px;
            border: none;
            border-radius: 10px;
            background: var(--accent);
            color: var(--on-accent);
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 0.01em;
            box-shadow: 0 2px 10px rgba(0,0,0,0.18);
            -webkit-transition: opacity 0.15s;
            transition: opacity 0.15s;
        }
        #btn-save-settings:active { opacity: 0.82; }
        #btn-reset-storage {
            display: block;
            width: calc(100% - 28px);
            margin: 8px 14px 14px;
            padding: 12px;
            border: none;
            border-radius: 10px;
            background: #c0392b;
            color: #fff;
            font-weight: 600;
            font-size: 0.88rem;
            cursor: pointer;
        }
        @media (min-width: 640px) {
            #settings-screen { padding: 24px; box-sizing: border-box; background: rgba(0,0,0,0.4); }
            #settings-screen.open {
                -webkit-box-align: center;
                -webkit-align-items: center;
                -ms-flex-align: center;
                align-items: center;
                -webkit-box-pack: center;
                -webkit-justify-content: center;
                -ms-flex-pack: center;
                justify-content: center;
            }
            .settings-screen-card {
                max-width: 480px;
                margin: auto;
                width: 100%;
                max-height: calc(100vh - 48px);
                background: var(--bg);
                border-radius: 14px;
                overflow: hidden;
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                -webkit-flex-direction: column;
                -ms-flex-direction: column;
                flex-direction: column;
                box-shadow: 0 16px 48px rgba(0,0,0,0.28);
            }
            .settings-scroll-wrap {
                position: relative;
                -webkit-box-flex: 1;
                -webkit-flex: 1;
                -ms-flex: 1;
                flex: 1;
                min-height: 0;
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                -webkit-flex-direction: column;
                -ms-flex-direction: column;
                flex-direction: column;
            }
            .settings-scroll-wrap .settings-screen-scroll {
                padding-right: 52px;
            }
        }
        .scroll-nav-stack {
            display: none;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            gap: 8px;
            z-index: 6;
            pointer-events: none;
        }
        .scroll-nav-stack .scroll-nav-btn { pointer-events: auto; }
        .scroll-nav-btn {
            width: 40px;
            height: 40px;
            min-width: 40px;
            min-height: 40px;
            border: 1px solid rgba(128,128,128,0.28);
            border-radius: 999px;
            background: var(--panel);
            color: var(--text);
            font-size: 1rem;
            line-height: 1;
            cursor: pointer;
            box-shadow: 0 2px 10px rgba(0,0,0,0.12);
            padding: 0;
        }
        .scroll-nav-btn .ico { width: 20px; height: 20px; }
        .scroll-nav-btn:active:not(:disabled) {
            -webkit-transform: scale(0.96);
            transform: scale(0.96);
        }
        .scroll-nav-btn:disabled {
            opacity: 0.32;
            cursor: default;
            box-shadow: none;
        }
        .scroll-nav-stack.is-dimmed { opacity: 0.35; }
        @media (min-width: 641px) {
            .scroll-nav-stack--settings {
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
                position: absolute;
                right: 10px;
                top: 50%;
                -webkit-transform: translateY(-50%);
                transform: translateY(-50%);
            }
            body.pdf-is-open .scroll-nav-stack--reader {
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
                position: fixed;
                right: 14px;
                top: 50%;
                -webkit-transform: translateY(-50%);
                transform: translateY(-50%);
                z-index: 3650;
            }
            .scroll-nav-stack--reader .scroll-nav-btn {
                background: rgba(28,28,28,0.92);
                color: var(--home-text);
                border-color: var(--home-border);
                box-shadow: 0 6px 20px rgba(0,0,0,0.4);
            }
        }
        /* ☰ + 🔊 na tela de leitura (canto inferior esquerdo) */
        .reader-float-left {
            display: none;
            position: fixed;
            left: 12px;
            bottom: 12px;
            z-index: 3700;
            gap: 10px;
            pointer-events: none;
        }
        body.pdf-is-open:not(.ui-chrome-hidden) .reader-float-left {
            bottom: calc(var(--reader-bar-h) + 24px + env(safe-area-inset-bottom, 0px));
        }
        /* ☰ flutua no canto inferior esquerdo sempre que há PDF aberto */
        body.pdf-is-open .reader-float-left {
            display: -webkit-box !important;
            display: -webkit-flex !important;
            display: -ms-flexbox !important;
            display: flex !important;
        }
        .reader-float-left .reader-chrome-fab,
        .reader-float-left .btn-tts-ui,
        .reader-float-actions .reader-chrome-fab,
        .reader-float-actions .btn-tts-ui {
            position: static;
            display: inline-block;
            line-height: 44px;
            text-align: center;
            pointer-events: auto;
        }
        .reader-float-actions {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: horizontal;
            -webkit-box-direction: normal;
            -webkit-flex-direction: row;
            -ms-flex-direction: row;
            flex-direction: row;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 8px;
            pointer-events: none;
        }
        #btn-toggle-layout { display: none; }
        body.ui-chrome-hidden.pdf-is-open #btn-toggle-layout { display: inline-block !important; }
        .reader-zoom-btn {
            display: none !important;
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            line-height: 1;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
        }
        @media (max-width: 768px) {
            body.pdf-is-open.ui-chrome-hidden .reader-zoom-btn {
                display: -webkit-inline-flex !important;
                display: -ms-inline-flexbox !important;
                display: inline-flex !important;
            }
        }
        /* reader-float-bar obsoleto — ⏪ ⏩ movidos para barra inferior */
        #reader-float-bar { display: none !important; }
        #reader-float-bar {
            display: none;
            position: fixed;
            left: 0;
            right: 0;
            bottom: 12px;
            z-index: 3600;
            padding: 0 12px;
            padding-left: 118px;
            box-sizing: border-box;
            pointer-events: none;
        }
        .reader-float-bar-track {
            width: 100%;
            pointer-events: none;
            -webkit-box-pack: end;
            -webkit-justify-content: flex-end;
            -ms-flex-pack: end;
            justify-content: flex-end;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 10px;
        }
        .reader-float-bar-mid {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            gap: 10px;
            pointer-events: none;
        }
        .reader-chrome-fab,
        #reader-float-bar .reader-float-btn {
            display: none;
            pointer-events: auto;
            border: none;
            border-radius: 999px;
            padding: 0;
            width: 44px;
            height: 44px;
            line-height: 44px;
            text-align: center;
            cursor: pointer;
            font-weight: 600;
            font-size: 1.15rem;
            background: rgba(28,28,28,0.92);
            color: var(--home-text);
            border: 1px solid var(--home-border);
            box-shadow: 0 6px 20px rgba(0,0,0,0.4);
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .reader-chrome-fab .ico { width: 20px; height: 20px; }
        /* Barra inferior do leitor: 7 controles, compactos e responsivos */
        .controls-bottom .btn-nav-arrow {
            min-width: 38px; width: 38px; height: 38px;
            line-height: 1; padding: 0;
            background: rgba(255,255,255,0.08);
            color: var(--text);
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
        }
        .controls-bottom .btn-nav-arrow .ico { width: 20px; height: 20px; }
        .controls-bottom .btn-nav-arrow:active:not(:disabled) { -webkit-transform: scale(0.94); transform: scale(0.94); }
        .controls-bottom .btn-tts-ui {
            min-width: 44px; width: 44px; height: 44px;
        }
        .controls-row-main { gap: 6px; flex-wrap: nowrap; }
        #page-info { min-width: 46px; text-align: center; }
        @media (max-width: 380px) {
            .controls-row-main { gap: 4px; }
            .controls-bottom .btn-nav-arrow { min-width: 34px; width: 34px; height: 34px; }
            .controls-bottom .btn-nav-arrow .ico { width: 18px; height: 18px; }
            .controls-bottom .btn-tts-ui { min-width: 40px; width: 40px; height: 40px; }
            #page-info { min-width: 40px; font-size: 0.74rem; }
        }
        @media (max-width: 640px) {
            header:not(.app-topbar) { flex-direction: column; align-items: stretch; }
            header:not(.app-topbar) > span:first-of-type { text-align: center; }
            header:not(.app-topbar) .header-actions { justify-content: center; }
            #viewer-container { padding: 12px 10px; padding-bottom: 12px; }
            body.pdf-is-open.ui-chrome-hidden #viewer-container { padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
            .controls-row.tts-options { flex-direction: column; align-items: stretch; gap: 10px; }
            .controls-row.tts-options label { justify-content: space-between; width: 100%; }
            .controls-row.tts-options select { max-width: none; width: 100%; }
            .controls-row.tts-options input[type="range"] { width: 100%; max-width: none; flex: 1; }
            .cloud-library-wrap { max-width: 100%; }
            .cloud-library-wrap .cloud-library-trigger { max-width: 100%; }
            .controls-row.page-jump .nowrap { white-space: normal; }
            /* Com barra inferior: ☰ acima da área dos controlos */
            body.pdf-is-open:not(.ui-chrome-hidden) .reader-float-left {
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                -webkit-flex-direction: column;
                -ms-flex-direction: column;
                flex-direction: column;
                -webkit-box-align: start;
                -webkit-align-items: flex-start;
                -ms-flex-align: start;
                align-items: flex-start;
                gap: 8px;
                bottom: calc(var(--reader-bar-h) + 26px + env(safe-area-inset-bottom, 0px));
            }
            /* Modo leitura (barras ocultas): ☰ 🔊 ↔ numa linha */
            body.pdf-is-open.ui-chrome-hidden .reader-float-left {
                -webkit-box-orient: horizontal;
                -webkit-box-direction: normal;
                -webkit-flex-direction: row;
                -ms-flex-direction: row;
                flex-direction: row;
                -webkit-box-align: center;
                -webkit-align-items: center;
                -ms-flex-align: center;
                align-items: center;
                gap: 8px;
                bottom: max(12px, env(safe-area-inset-bottom, 0px));
            }
            body.pdf-is-open.ui-chrome-hidden .reader-float-actions {
                display: contents;
            }
        }
        @media (min-width: 1400px) {
            .controls-inner { max-width: 720px; }
        }
        @media (pointer: coarse) {
            .btn { min-height: 44px; padding: 10px 16px; }
        }

        /* Mobile: PDF em largura total (modo leitura OU barras ocultas) */
        @media (max-width: 768px) {
            body.reading-mode.pdf-is-open #viewer-container,
            body.pdf-is-open.ui-chrome-hidden #viewer-container {
                padding: 0 !important;
                padding-bottom: max(56px, env(safe-area-inset-bottom, 0px)) !important;
            }
            body.reading-mode #pdf-render-area,
            body.pdf-is-open.ui-chrome-hidden #pdf-render-area {
                align-items: stretch;
                width: 100%;
            }
            body.reading-mode #pdf-render-area .pdf-page-wrap,
            body.pdf-is-open.ui-chrome-hidden #pdf-render-area .pdf-page-wrap {
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 !important;
                border-radius: 0 !important;
                box-shadow: none !important;
            }
            body.pdf-is-open.ui-chrome-hidden #pdf-render-area canvas {
                box-shadow: none;
                border-radius: 0;
            }
        }

        /* ── Modo leitura larga (mobile): PDF mais largo, SEM girar a UI ── */
        @media screen and (max-width: 768px) {
            /* btn-toggle-layout aparece no float quando barras ocultas */

            /* Tela cheia de leitura — conteúdo permanece na horizontal */
            #app-container.forced-landscape {
                position: fixed !important;
                top: 0 !important;
                left: 0 !important;
                right: 0 !important;
                bottom: 0 !important;
                width: 100% !important;
                height: 100% !important;
                margin: 0 !important;
                -webkit-transform: none !important;
                transform: none !important;
                overflow: hidden !important;
            }

            #app-container.forced-landscape header,
            #app-container.forced-landscape #app-sidebar,
            #app-container.forced-landscape .app-topbar,
            #app-container.forced-landscape .sidebar-books-list {
                display: none !important;
            }

            #app-container.forced-landscape #main-container,
            #app-container.forced-landscape #viewer-container {
                width: 100% !important;
                height: 100% !important;
                -webkit-box-flex: 1 !important;
                -webkit-flex: 1 !important;
                flex: 1 !important;
            }

            #app-container.forced-landscape #viewer-container {
                padding: 2px 4px !important;
                padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
            }

            #app-container.forced-landscape #pdf-render-area {
                width: 100% !important;
                max-width: 100% !important;
            }

            #app-container.forced-landscape #pdf-render-area .pdf-page-wrap {
                margin-left: auto !important;
                margin-right: auto !important;
                max-width: 100% !important;
            }
        }

        /* ── Barra de progresso de operações ─────────────────────── */
        #rdr-status-bar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            z-index: 9985;
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
            -webkit-transition: opacity 0.35s ease;
            transition: opacity 0.35s ease;
        }
        #rdr-status-bar.sb-active { opacity: 1; }
        #rdr-status-fill {
            height: 100%;
            width: 0%;
            border-radius: 0 2px 2px 0;
            -webkit-transition: width 0.45s cubic-bezier(0.4,0,0.2,1);
            transition: width 0.45s cubic-bezier(0.4,0,0.2,1);
        }
        #rdr-status-bar.sb-pdf    #rdr-status-fill { background: #4f8ef7; box-shadow: 0 0 8px rgba(79,142,247,0.7); }
        #rdr-status-bar.sb-tts    #rdr-status-fill { background: #f7a14f; box-shadow: 0 0 8px rgba(247,161,79,0.7); }
        #rdr-status-bar.sb-upload #rdr-status-fill { background: #4fca71; box-shadow: 0 0 8px rgba(79,202,113,0.7); }

        /* ── Home (mockup Audible-style) ─────────────────────────── */
        :root {
            --home-bg: #0f1117;
            --home-card: #1a1d26;
            --home-accent: #F8991D;
            --home-text: #ffffff;
            --home-muted: #9a9a9a;
            --home-border: rgba(255,255,255,0.08);
        }
        body:not(.pdf-is-open) {
            background: var(--home-bg) !important;
            color: var(--home-text);
        }
        body:not(.pdf-is-open) #main-container,
        body:not(.pdf-is-open) #viewer-container {
            background: var(--home-bg) !important;
        }
        body:not(.pdf-is-open) header,
        body:not(.pdf-is-open) .app-topbar {
            background: var(--home-bg);
            box-shadow: none;
        }
        .header-home-bar {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            width: 100%;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: justify;
            -webkit-justify-content: space-between;
            -ms-flex-pack: justify;
            justify-content: space-between;
        }
        /* Leitura = tela cheia: sem cabeçalho e sem navegação inferior */
        body.pdf-is-open header,
        body.pdf-is-open .app-topbar { display: none !important; }
        .home-toolbar {
            width: 100%;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: end;
            -webkit-justify-content: flex-end;
            -ms-flex-pack: end;
            justify-content: flex-end;
            min-width: 0;
        }
        .home-logo {
            font-size: 1.35rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            color: var(--home-text);
        }
        .home-avatar-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: none;
            background: #3a3a3a;
            color: #ccc;
            font-size: 1.1rem;
            cursor: pointer;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
        }
        .home-avatar-btn .ico { width: 22px; height: 22px; }
        .home-screen {
            width: 100%;
            max-width: 560px;
            margin: 0 auto;
            padding: 0 16px 16px;
            box-sizing: border-box;
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            overflow: visible;
        }
        body:not(.pdf-is-open) #viewer-container {
            padding: 0 !important;
            padding-bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px)) !important;
        }
        body.has-mini-player:not(.pdf-is-open) #viewer-container {
            padding-bottom: calc(var(--nav-h) + 92px + env(safe-area-inset-bottom, 0px)) !important;
        }
        .home-tab-panel { padding-top: 4px; }
        /* Ícones de linha (SVG) — nítidos e iguais em qualquer plataforma */
        .ico {
            width: 1.25em;
            height: 1.25em;
            display: inline-block;
            vertical-align: middle;
            fill: none;
            stroke: currentColor;
            stroke-width: 1.8;
            stroke-linecap: round;
            stroke-linejoin: round;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .ico-solid { fill: currentColor; stroke: none; }
        .home-section-label {
            margin: 0 0 12px;
            font-size: 1rem;
            font-weight: 700;
            color: var(--home-text);
        }
        .home-continue-card {
            background: var(--home-card);
            border-radius: 16px;
            padding: 16px;
        }
        .home-card-label {
            margin: 0 0 14px;
            font-size: 1rem;
            font-weight: 700;
            color: var(--home-text);
        }
        .home-continue-row {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            gap: 16px;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
        }
        .home-continue-row.hidden { display: none !important; }
        .home-continue-cover,
        .home-book-cover,
        .home-mini-thumb,
        .home-library-cover {
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            border-radius: 8px;
            background: linear-gradient(145deg, #3d2817, #1a1208);
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            color: var(--home-accent);
            font-weight: 800;
            font-size: 1.4rem;
            overflow: hidden;
        }
        .home-continue-cover { width: 104px; height: 122px; border-radius: 10px; font-size: 1.7rem; }
        .home-continue-body {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-width: 0;
        }
        .home-continue-title {
            margin: 0 0 6px;
            font-size: 1.12rem;
            font-weight: 700;
            line-height: 1.25;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .home-continue-meta {
            margin: 0 0 14px;
            font-size: 0.84rem;
            color: var(--home-muted);
        }
        .home-continue-progress-track {
            height: 5px;
            background: #3d3d3d;
            border-radius: 999px;
            overflow: hidden;
        }
        .home-continue-progress-fill {
            height: 100%;
            width: 0%;
            background: var(--home-accent);
            border-radius: 999px;
            -webkit-transition: width 0.3s ease;
            transition: width 0.3s ease;
        }
        .home-continue-pct {
            display: block;
            margin-top: 8px;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--home-accent);
        }
        .home-continue-play {
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            width: 68px;
            height: 68px;
            border-radius: 50%;
            border: none;
            background: var(--home-accent);
            color: var(--on-accent);
            cursor: pointer;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            box-shadow: 0 6px 20px rgba(248,153,29,0.32);
        }
        .home-continue-play .ico { width: 30px; height: 30px; }
        .home-continue-play:active { -webkit-transform: scale(0.96); transform: scale(0.96); }
        .home-continue-empty {
            padding: 8px 0 4px;
            color: var(--home-muted);
            font-size: 0.88rem;
        }
        .home-continue-empty p { margin: 0 0 6px; }
        .home-continue-empty-hint { font-size: 0.78rem; opacity: 0.85; }
        .home-continue-empty.hidden { display: none !important; }
        .home-actions {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            gap: 10px;
            margin: 18px 0 22px;
        }
        .home-btn {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            gap: 10px;
            padding: 15px 10px;
            border-radius: 12px;
            font-size: 0.95rem;
            font-weight: 700;
            cursor: pointer;
            border: 2px solid var(--home-accent);
            background: transparent;
            color: var(--home-accent);
        }
        .home-btn-filled {
            background: var(--home-accent);
            color: var(--on-accent);
            border-color: var(--home-accent);
        }
        .home-btn .ico { width: 20px; height: 20px; }
        .home-btn:active { -webkit-transform: scale(0.98); transform: scale(0.98); }
        .home-books { margin-bottom: 20px; }
        .home-books-header {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: justify;
            -webkit-justify-content: space-between;
            -ms-flex-pack: justify;
            justify-content: space-between;
            margin-bottom: 12px;
        }
        .home-books-header .home-section-label { margin: 0; }
        .home-link-btn {
            background: none;
            border: none;
            color: var(--home-muted);
            font-size: 0.82rem;
            cursor: pointer;
            padding: 4px 0;
        }
        .home-books-scroll {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            gap: 14px;
            overflow-x: auto;
            padding-bottom: 4px;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -webkit-box-align: start;
            -webkit-align-items: flex-start;
            -ms-flex-align: start;
            align-items: flex-start;
        }
        .home-books-scroll::-webkit-scrollbar { display: none; }
        .home-book-item {
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            width: 84px;
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            text-align: center;
            color: var(--home-text);
        }
        .home-book-cover { width: 84px; height: 104px; margin: 0 auto 8px; font-size: 1.5rem; }
        .home-book-title {
            font-size: 0.74rem;
            line-height: 1.3;
            opacity: 0.9;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .home-btn:disabled { opacity: 0.45; cursor: not-allowed; }
        .home-book-add {
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            width: 84px;
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            color: var(--home-muted);
        }
        .home-book-add-box {
            width: 84px;
            height: 104px;
            margin: 0 auto 8px;
            border-radius: 8px;
            background: var(--home-card);
            border: 1px solid var(--home-border);
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            color: var(--home-accent);
        }
        .home-book-add-box .ico { width: 34px; height: 34px; }
        .home-book-add-label { font-size: 0.74rem; line-height: 1.3; display: block; }
        .home-pro-banner {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 12px;
            background: var(--home-accent);
            color: var(--on-accent);
            border-radius: 14px;
            padding: 14px 16px;
            margin-bottom: 8px;
            cursor: pointer;
        }
        .home-pro-banner--compact { margin-top: 20px; }
        .home-pro-icon { width: 28px; height: 28px; }
        .home-pro-text {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-width: 0;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            gap: 2px;
            font-size: 0.82rem;
        }
        .home-pro-text strong { font-size: 0.92rem; }
        .home-pro-badge {
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            background: #111;
            color: #fff;
            font-size: 0.72rem;
            font-weight: 700;
            padding: 6px 10px;
            border-radius: 8px;
        }
        .home-library-header { margin-bottom: 16px; }
        .home-library-sub { margin: 4px 0 0; font-size: 0.82rem; color: var(--home-muted); }
        .home-library-list { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; gap: 8px; }
        .home-library-item {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 12px;
            background: var(--home-card);
            border-radius: 12px;
            padding: 10px 12px;
        }
        .home-library-cover { width: 48px; height: 64px; font-size: 1rem; }
        .home-library-info { -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
        .home-library-title { font-size: 0.88rem; font-weight: 600; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .home-library-meta { font-size: 0.75rem; color: var(--home-muted); margin: 0; }
        .home-library-open,
        .home-library-del {
            border: none;
            background: rgba(255,255,255,0.08);
            color: var(--home-text);
            border-radius: 8px;
            padding: 8px 10px;
            cursor: pointer;
            font-size: 0.85rem;
        }
        .home-library-del { color: #ff6b6b; }
        .home-library-restore {
            border: none;
            background: rgba(248,153,29,0.15);
            color: var(--home-accent);
            border-radius: 8px;
            padding: 8px 10px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 600;
        }
        .home-library-fav,
        .home-fav-btn {
            border: none;
            background: rgba(255,255,255,0.08);
            color: var(--home-muted);
            border-radius: 8px;
            width: 36px;
            height: 36px;
            padding: 0;
            cursor: pointer;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .home-fav-btn .ico { width: 18px; height: 18px; }
        .home-fav-btn.is-fav { color: var(--home-accent); background: rgba(248,153,29,0.15); }
        .home-fav-btn.is-fav .ico { fill: var(--home-accent); stroke: none; }
        .home-notes-list {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            gap: 10px;
        }
        .home-note-item {
            width: 100%;
            text-align: left;
            background: var(--home-card);
            border: 1px solid var(--home-border);
            border-radius: 12px;
            padding: 14px;
            color: var(--home-text);
            cursor: pointer;
        }
        .home-note-item:hover { border-color: rgba(248,153,29,0.35); }
        .home-note-top {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: justify;
            -webkit-justify-content: space-between;
            -ms-flex-pack: justify;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 6px;
        }
        .home-note-book {
            margin: 0;
            font-size: 0.88rem;
            font-weight: 700;
            line-height: 1.3;
        }
        .home-note-page {
            font-size: 0.76rem;
            color: var(--home-accent);
            font-weight: 600;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .home-note-text {
            margin: 0 0 8px;
            font-size: 0.84rem;
            line-height: 1.45;
            color: var(--home-text);
            opacity: 0.92;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .home-note-date {
            margin: 0;
            font-size: 0.72rem;
            color: var(--home-muted);
        }
        .home-note-actions {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }
        .home-note-action-btn {
            border: none;
            background: rgba(255,255,255,0.08);
            color: var(--home-text);
            border-radius: 8px;
            padding: 6px 10px;
            font-size: 0.76rem;
            cursor: pointer;
        }
        .home-note-action-btn--danger { color: #ff6b6b; }
        .note-modal {
            position: fixed;
            inset: 0;
            z-index: 5000;
            background: rgba(0,0,0,0.65);
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            padding: 16px;
        }
        .note-modal.hidden { display: none !important; }
        .note-modal-card {
            width: 100%;
            max-width: 420px;
            background: var(--home-card);
            border: 1px solid var(--home-border);
            border-radius: 16px;
            padding: 18px 16px;
            box-shadow: 0 16px 48px rgba(0,0,0,0.45);
        }
        .note-modal-title {
            margin: 0 0 6px;
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--home-text);
        }
        .note-modal-meta {
            margin: 0 0 12px;
            font-size: 0.82rem;
            color: var(--home-muted);
        }
        .note-modal-text {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid var(--home-border);
            border-radius: 10px;
            background: rgba(255,255,255,0.04);
            color: var(--home-text);
            padding: 10px 12px;
            font-size: 0.88rem;
            line-height: 1.45;
            resize: vertical;
            min-height: 110px;
            font-family: inherit;
        }
        .note-modal-actions {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: end;
            -webkit-justify-content: flex-end;
            -ms-flex-pack: end;
            justify-content: flex-end;
            gap: 8px;
            margin-top: 14px;
        }
        .note-modal-btn {
            border: none;
            border-radius: 999px;
            padding: 9px 16px;
            font-size: 0.84rem;
            font-weight: 600;
            cursor: pointer;
        }
        .note-modal-btn--ghost {
            background: rgba(255,255,255,0.08);
            color: var(--home-text);
        }
        .note-modal-btn--primary {
            background: var(--home-accent);
            color: #111;
        }
        .home-library-empty {
            text-align: center;
            color: var(--home-muted);
            padding: 32px 16px;
            font-size: 0.88rem;
        }
        .home-search-empty {
            -webkit-flex: 0 0 100%;
            -ms-flex: 0 0 100%;
            flex: 0 0 100%;
            text-align: center;
            color: var(--home-muted);
            padding: 24px 16px;
            font-size: 0.88rem;
        }
        .home-stats-header { margin-bottom: 20px; }
        .home-stats-sub {
            margin: -4px 0 0;
            font-size: 0.85rem;
            color: var(--home-muted);
        }
        .home-stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 24px;
        }
        .home-stat-card {
            background: var(--home-card);
            border: 1px solid var(--home-border);
            border-radius: 14px;
            padding: 16px 14px;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            gap: 4px;
        }
        .home-stat-value {
            font-size: 1.45rem;
            font-weight: 800;
            color: var(--home-text);
            line-height: 1.1;
        }
        .home-stat-label {
            font-size: 0.76rem;
            color: var(--home-muted);
            line-height: 1.35;
        }
        .home-stats-section { margin-bottom: 24px; }
        .home-stats-section-title {
            margin: 0 0 12px;
            font-size: 0.92rem;
            font-weight: 700;
            color: var(--home-text);
        }
        .home-stats-overall-bar {
            height: 10px;
            border-radius: 999px;
            background: rgba(255,255,255,0.08);
            overflow: hidden;
        }
        .home-stats-overall-fill {
            height: 100%;
            width: 0;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--home-accent), #ffb347);
            -webkit-transition: width 0.35s ease;
            transition: width 0.35s ease;
        }
        .home-stats-overall-meta {
            margin: 8px 0 0;
            font-size: 0.82rem;
            color: var(--home-muted);
        }
        .home-stats-books {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            gap: 10px;
        }
        .home-stats-book-item {
            width: 100%;
            text-align: left;
            background: var(--home-card);
            border: 1px solid var(--home-border);
            border-radius: 12px;
            padding: 12px 14px;
            color: var(--home-text);
            cursor: pointer;
        }
        .home-stats-book-item:hover { border-color: rgba(248,153,29,0.35); }
        .home-stats-book-item.is-selected {
            border-color: var(--home-accent);
            background: rgba(248,153,29,0.08);
            box-shadow: 0 0 0 1px rgba(248,153,29,0.2);
        }
        .home-stats-back {
            display: -webkit-inline-box;
            display: -webkit-inline-flex;
            display: -ms-inline-flexbox;
            display: inline-flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 6px;
            margin-bottom: 14px;
            padding: 0;
            border: none;
            background: none;
            color: var(--home-accent);
            font-size: 0.84rem;
            font-weight: 600;
            cursor: pointer;
        }
        .home-stats-back .ico { width: 16px; height: 16px; }
        .home-stats-detail-card {
            background: var(--home-card);
            border: 1px solid var(--home-border);
            border-radius: 16px;
            padding: 18px 16px;
        }
        .home-stats-detail-head {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            gap: 14px;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            margin-bottom: 18px;
        }
        .home-stats-detail-cover {
            width: 64px;
            height: 88px;
            border-radius: 8px;
            background: #2a2d36;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            overflow: hidden;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            font-size: 1.4rem;
        }
        .home-stats-detail-cover.has-cover-img {
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }
        .home-stats-detail-title {
            margin: 0 0 6px;
            font-size: 1rem;
            font-weight: 700;
            line-height: 1.35;
            color: var(--home-text);
        }
        .home-stats-detail-badge {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 600;
            background: rgba(248,153,29,0.15);
            color: var(--home-accent);
        }
        .home-stats-detail-badge.is-done {
            background: rgba(76,175,80,0.15);
            color: #81c784;
        }
        .home-stats-detail-badge.is-new {
            background: rgba(255,255,255,0.08);
            color: var(--home-muted);
        }
        .home-stats-detail-progress { margin-bottom: 16px; }
        .home-stats-detail-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
        .home-stat-card--compact { padding: 12px 10px; }
        .home-stat-card--compact .home-stat-value { font-size: 1.05rem; }
        .home-stats-book-top {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: justify;
            -webkit-justify-content: space-between;
            -ms-flex-pack: justify;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 8px;
        }
        .home-stats-book-title {
            margin: 0;
            font-size: 0.88rem;
            font-weight: 600;
            line-height: 1.3;
        }
        .home-stats-book-pct {
            font-size: 0.82rem;
            font-weight: 700;
            color: var(--home-accent);
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .home-stats-book-meta {
            margin: 0 0 8px;
            font-size: 0.76rem;
            color: var(--home-muted);
        }
        .home-stats-book-bar {
            height: 5px;
            border-radius: 999px;
            background: rgba(255,255,255,0.08);
            overflow: hidden;
        }
        .home-stats-book-bar-fill {
            height: 100%;
            border-radius: 999px;
            background: var(--home-accent);
        }
        .home-stats-empty {
            text-align: center;
            color: var(--home-muted);
            padding: 24px 12px;
            font-size: 0.86rem;
            line-height: 1.45;
        }
        .home-account-card {
            text-align: center;
            padding: 24px 16px 20px;
            background: var(--home-card);
            border-radius: 14px;
            margin-bottom: 16px;
        }
        .home-account-avatar {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: #3a3a3a;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            margin: 0 auto 12px;
            color: #ccc;
        }
        .home-account-avatar .ico { width: 32px; height: 32px; }
        .home-account-name { margin: 0 0 4px; font-size: 1.1rem; }
        .home-account-sub { margin: 0; font-size: 0.82rem; color: var(--home-muted); }
        .home-account-actions { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; gap: 8px; }
        .home-account-btn {
            width: 100%;
            text-align: left;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
            border: none;
            border-radius: 12px;
            background: var(--home-card);
            color: var(--home-text);
            font-size: 0.92rem;
            font-weight: 600;
            cursor: pointer;
        }
        .home-mini-player {
            position: fixed;
            left: 12px;
            right: 12px;
            bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom, 0px));
            z-index: 900;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 12px;
            padding: 10px 14px;
            background: var(--home-card);
            border: 1px solid var(--home-border);
            border-radius: 14px;
            max-width: 536px;
            margin: 0 auto;
            box-sizing: border-box;
        }
        body.pdf-is-open .home-mini-player { display: none !important; }
        .home-mini-thumb {
            width: 40px;
            height: 48px;
            border: none;
            padding: 0;
            cursor: pointer;
            font-size: 0.9rem;
            border-radius: 6px;
        }
        .home-mini-info {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-width: 0;
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            text-align: left;
            color: var(--home-text);
        }
        .home-mini-title {
            display: block;
            font-size: 0.88rem;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 8px;
        }
        .home-mini-progress-track {
            display: block;
            height: 4px;
            background: #3d3d3d;
            border-radius: 999px;
            overflow: hidden;
        }
        .home-mini-progress-fill {
            display: block;
            height: 100%;
            width: 0%;
            background: var(--home-accent);
            border-radius: 999px;
        }
        .home-mini-tts {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 50%;
            background: transparent;
            color: var(--home-text);
            cursor: pointer;
            padding: 0;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .home-mini-tts .ico { width: 26px; height: 26px; }
        .home-mini-tts:active { -webkit-transform: scale(0.94); transform: scale(0.94); }
        .home-bottom-nav {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 950;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            background: #1a1a1a;
            border-top: 1px solid var(--home-border);
            padding-bottom: env(safe-area-inset-bottom, 0px);
            max-width: 560px;
            margin: 0 auto;
        }
        /* Navegação pertence à Home; a leitura ocupa a tela inteira */
        body.pdf-is-open .home-bottom-nav,
        body.ui-chrome-hidden .home-bottom-nav { display: none !important; }
        .home-bottom-nav .home-nav-item {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            gap: 2px;
            padding: 8px 4px 10px;
            border: none;
            background: none;
            color: var(--home-muted);
            cursor: pointer;
            font-size: 0.68rem;
        }
        .home-bottom-nav .home-nav-item.is-active { color: var(--home-accent); }
        .home-nav-icon { width: 24px; height: 24px; }

        /* ── Leitor em tela cheia: barra superior flutuante ───────── */
        .reader-topbar {
            display: none;
            position: fixed;
            top: max(10px, env(safe-area-inset-top, 0px));
            left: 10px;
            right: 10px;
            z-index: 3700;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 10px;
            pointer-events: none;
        }
        body.pdf-is-open:not(.ui-chrome-hidden) .reader-topbar {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
        }
        .reader-icon-btn {
            width: 40px;
            height: 40px;
            min-width: 40px;
            border: 1px solid var(--home-border);
            border-radius: 999px;
            background: rgba(28,28,28,0.92);
            color: var(--home-text);
            line-height: 1;
            padding: 0;
            cursor: pointer;
            pointer-events: auto;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            box-shadow: 0 6px 20px rgba(0,0,0,0.4);
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        #btn-reader-back {
            border-color: var(--home-accent);
            color: var(--home-accent);
            box-shadow: 0 0 0 1px rgba(248,153,29,0.15), 0 6px 20px rgba(0,0,0,0.4);
        }
        #btn-reader-back:hover {
            background: rgba(248,153,29,0.12);
            border-color: var(--home-accent);
        }
        #btn-theme-reader.is-active,
        #btn-theme.is-active {
            border-color: var(--home-accent);
            color: var(--home-accent);
            background: rgba(248,153,29,0.12);
            box-shadow: 0 0 0 1px rgba(248,153,29,0.2), 0 6px 20px rgba(0,0,0,0.4);
        }
        #btn-theme-reader:hover,
        #btn-theme:hover {
            border-color: rgba(248,153,29,0.55);
        }
        .reader-icon-btn .ico { width: 20px; height: 20px; }
        .reader-icon-btn:active { -webkit-transform: scale(0.96); transform: scale(0.96); }
        .reader-book-title {
            font-size: 0.85rem;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
            padding: 7px 14px;
            border-radius: 999px;
            background: rgba(28,28,28,0.92);
            border: 1px solid var(--home-border);
            color: var(--home-text);
            box-shadow: 0 6px 20px rgba(0,0,0,0.4);
        }

        /* ── Toolbar da Home (nuvem, biblioteca, tema) ────── */
        .home-toolbar { margin-top: 10px; }
        .home-toolbar .header-actions { gap: 8px; }
        .hdr-icon-btn {
            background: var(--home-card);
            border: 1px solid var(--home-border);
            color: var(--home-text);
        }
        .hdr-icon-btn .ico { width: 20px; height: 20px; }
        .hdr-icon-danger { background: rgba(214,60,60,0.16); border-color: rgba(214,60,60,0.45); color: #ff8080; }
        #cloud-badge.cloud-status-on { background: rgba(45,170,100,0.16); box-shadow: none; border-color: rgba(45,170,100,0.5); color: #4ed693; }
        #cloud-badge.cloud-status-off,
        #cloud-badge.cloud-status-error { background: rgba(214,60,60,0.16); box-shadow: none; border-color: rgba(214,60,60,0.45); color: #ff8080; }
        #cloud-badge.cloud-status-wait,
        #cloud-badge.cloud-status-pending { background: var(--home-card); box-shadow: none; opacity: 0.8; }
        .cloud-library-wrap.hdr-library-select .cloud-library-trigger {
            background: var(--home-card);
            border: 1px solid var(--home-border);
            color: var(--home-text);
            font-weight: 600;
            height: 40px;
        }
        .cloud-library-panel { background: var(--home-card); border-color: var(--home-border); border-radius: 14px; }

        /* ── Botão "Visualizar livro" no card da Home (mobile legado) ─ */
        .home-continue-footer {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            -webkit-box-align: start;
            -webkit-align-items: flex-start;
            -ms-flex-align: start;
            align-items: flex-start;
            gap: 12px;
        }
        .controls-bottom .controls-inner { gap: 8px; }
        #page-info {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--home-muted);
            padding: 0 2px;
        }
        .home-mini-player,
        .home-bottom-nav,
        .controls-bottom {
            padding-left: max(14px, env(safe-area-inset-left, 0px));
            padding-right: max(14px, env(safe-area-inset-right, 0px));
        }
        .home-bottom-nav { padding-left: 0; padding-right: 0; }
        @media (min-width: 641px) {
            .home-mini-player,
            .home-bottom-nav {
                border-left: 1px solid var(--home-border);
                border-right: 1px solid var(--home-border);
            }
        }
        /* ══ Dashboard desktop (mockup ReadEdy) ═══════════════════ */
        :root {
            --sidebar-w: 240px;
            --topbar-h: 64px;
            --player-h: 80px;
        }
        #app-container.app-layout {
            -webkit-box-orient: horizontal;
            -webkit-flex-direction: row;
            -ms-flex-direction: row;
            flex-direction: row;
        }
        .app-shell {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-width: 0;
            min-height: 0;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            overflow: hidden;
        }
        .app-sidebar {
            width: var(--sidebar-w);
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            background: #12141c;
            border-right: 1px solid var(--home-border);
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            padding: 20px 14px 16px;
            box-sizing: border-box;
            overflow-y: auto;
        }
        .sidebar-brand {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 10px;
            margin-bottom: 24px;
            padding: 0 6px;
            width: 100%;
            box-sizing: border-box;
        }
        .sidebar-brand-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            object-fit: cover;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            display: block;
        }
        .sidebar-brand-text { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
        .sidebar-close-btn,
        .topbar-menu-btn,
        .mobile-nav-backdrop { display: none; }
        .sidebar-close-btn {
            margin-left: auto;
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 10px;
            background: rgba(255,255,255,0.06);
            color: var(--home-text);
            cursor: pointer;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .sidebar-close-btn .ico { width: 20px; height: 20px; }
        .topbar-menu-btn {
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            border: 1px solid var(--home-border);
            border-radius: 12px;
            background: var(--home-card);
            color: var(--home-text);
            cursor: pointer;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .topbar-menu-btn .ico { width: 22px; height: 22px; }
        .mobile-nav-backdrop {
            position: fixed;
            inset: 0;
            z-index: 1150;
            background: rgba(0,0,0,0.55);
            -webkit-backdrop-filter: blur(2px);
            backdrop-filter: blur(2px);
            opacity: 0;
            pointer-events: none;
            -webkit-transition: opacity 0.25s ease;
            transition: opacity 0.25s ease;
        }
        body.mobile-nav-open .mobile-nav-backdrop {
            opacity: 1;
            pointer-events: auto;
        }
        body.mobile-nav-open { overflow: hidden; }
        .sidebar-nav { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; gap: 4px; }
        .sidebar-nav-item,
        .sidebar-sub-item {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: horizontal;
            -webkit-box-direction: normal;
            -webkit-flex-direction: row;
            -ms-flex-direction: row;
            flex-direction: row;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: start;
            -webkit-justify-content: flex-start;
            -ms-flex-pack: start;
            justify-content: flex-start;
            gap: 12px;
            width: 100%;
            min-height: 42px;
            border: none;
            background: none;
            color: var(--home-muted);
            font-size: 0.9rem;
            font-weight: 600;
            padding: 10px 12px;
            border-radius: 10px;
            cursor: pointer;
            text-align: left;
            box-sizing: border-box;
        }
        .sidebar-nav-item .ico {
            width: 20px;
            height: 20px;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .sidebar-nav-item span {
            line-height: 1.2;
            white-space: nowrap;
        }
        .sidebar-nav-item.is-active,
        .sidebar-nav-item.home-nav-item.is-active {
            color: var(--home-accent);
            background: rgba(248,153,29,0.1);
            box-shadow: inset 3px 0 0 var(--home-accent);
        }
        .sidebar-nav-item:hover,
        .sidebar-sub-item:hover { background: rgba(255,255,255,0.04); color: var(--home-text); }
        .sidebar-sub-item.is-active {
            color: var(--home-accent);
            background: rgba(248,153,29,0.1);
        }
        .sidebar-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--home-border); }
        .sidebar-section-label {
            margin: 0 0 8px;
            padding: 0 12px;
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--home-muted);
            opacity: 0.7;
        }
        .sidebar-sub-item {
            font-size: 0.84rem;
            font-weight: 500;
            padding: 8px 12px 8px 44px;
        }
        .sidebar-premium {
            margin-top: auto;
            padding: 16px;
            border-radius: 14px;
            background: linear-gradient(145deg, #3d2817, #1a1208);
            border: 1px solid rgba(248,153,29,0.25);
        }
        .sidebar-premium strong { display: block; font-size: 0.92rem; margin-bottom: 4px; }
        .sidebar-premium p { margin: 0 0 12px; font-size: 0.75rem; color: var(--home-muted); line-height: 1.4; }
        .sidebar-premium-btn {
            width: 100%;
            border: none;
            border-radius: 999px;
            padding: 10px;
            background: var(--home-accent);
            color: var(--on-accent);
            font-weight: 700;
            font-size: 0.85rem;
            cursor: pointer;
        }
        .app-topbar {
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            display: grid !important;
            grid-template-columns: 1fr minmax(280px, 560px) 1fr;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 16px;
            min-height: var(--topbar-h);
            height: auto;
            padding: 14px 24px;
            padding-top: max(14px, env(safe-area-inset-top, 0px));
            box-sizing: border-box;
            background: #12141c;
            border-bottom: 1px solid var(--home-border);
            overflow: visible;
            position: relative;
            z-index: 200;
            -webkit-box-orient: horizontal !important;
            -webkit-flex-direction: row !important;
            -ms-flex-direction: row !important;
            flex-direction: row !important;
            -webkit-flex-wrap: nowrap !important;
            -ms-flex-wrap: nowrap !important;
            flex-wrap: nowrap !important;
        }
        body.pdf-is-open .app-topbar { display: none !important; }
        .topbar-search-wrap {
            grid-column: 2;
            -webkit-box-flex: 0;
            -webkit-flex: none;
            -ms-flex: none;
            flex: none;
            width: 100%;
            max-width: none;
            position: relative;
            min-width: 0;
        }
        .topbar-search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
            width: 18px;
            height: 18px;
            color: var(--home-muted);
            pointer-events: none;
        }
        .topbar-search {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid var(--home-border);
            border-radius: 999px;
            background: #1a1d26;
            color: var(--home-text);
            font-size: 0.88rem;
            padding: 10px 16px 10px 42px;
            outline: none;
        }
        .topbar-search:focus { border-color: rgba(248,153,29,0.45); }
        .topbar-search::-webkit-search-cancel-button { -webkit-appearance: none; }
        .topbar-actions {
            grid-column: 3;
            justify-self: end;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 8px;
            margin-left: 0;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            overflow: visible;
        }
        .app-topbar .header-actions {
            -webkit-box-flex: 0;
            -webkit-flex: none;
            -ms-flex: none;
            flex: none;
            -webkit-flex-wrap: nowrap;
            -ms-flex-wrap: nowrap;
            flex-wrap: nowrap;
            overflow: visible;
            gap: 8px;
        }
        .app-topbar #btn-theme {
            border: 1px solid var(--home-border);
            background: var(--home-card);
            color: var(--home-text);
        }
        .app-topbar #btn-theme.is-active {
            border-color: var(--home-accent);
            color: var(--home-accent);
            background: rgba(248,153,29,0.12);
        }
        .app-topbar .hdr-icon-btn,
        .app-topbar .home-avatar-btn,
        .app-topbar .topbar-add-btn {
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .app-topbar .cloud-library-wrap {
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            max-width: none;
        }
        .topbar-add-btn {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 50%;
            background: var(--home-accent);
            color: var(--on-accent);
            cursor: pointer;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
        }
        .topbar-add-btn .ico { width: 20px; height: 20px; }
        body:not(.pdf-is-open) #main-container {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-height: 0;
        }
        body:not(.pdf-is-open) #viewer-container {
            padding: 24px 28px !important;
            padding-bottom: calc(var(--player-h) + 24px + env(safe-area-inset-bottom, 0px)) !important;
            max-width: none;
            overflow-x: hidden !important;
            overflow-y: auto !important;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        body:not(.pdf-is-open) #viewer-container::-webkit-scrollbar { display: none; width: 0; height: 0; }
        body.has-mini-player:not(.pdf-is-open) #viewer-container {
            padding-bottom: calc(var(--player-h) + 24px + env(safe-area-inset-bottom, 0px)) !important;
        }
        .home-screen {
            max-width: 1100px;
            margin: 0;
            padding: 0;
            overflow: visible;
        }
        .home-stats-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 14px;
        }
        .home-stats-detail-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }
        .home-stat-value { font-size: 1.65rem; }
        .home-card-label {
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--home-muted);
            margin-bottom: 16px;
        }
        .home-continue-card {
            background: linear-gradient(135deg, #1a1d26 0%, #151820 100%);
            border: 1px solid var(--home-border);
            padding: 24px 28px;
            margin-bottom: 20px;
            overflow: hidden;
        }
        .home-continue-row {
            overflow: hidden;
            -webkit-box-align: stretch;
            -webkit-align-items: stretch;
            -ms-flex-align: stretch;
            align-items: stretch;
            -webkit-box-pack: justify;
            -webkit-justify-content: space-between;
            -ms-flex-pack: justify;
            justify-content: space-between;
        }
        .home-continue-left {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            gap: 24px;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-width: 0;
        }
        .home-continue-body {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            min-width: 0;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
        }
        .home-continue-cover-wrap { position: relative; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; }
        .home-continue-cover { width: 120px; height: 150px; border-radius: 10px; font-size: 2rem; }
        .home-pdf-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            background: rgba(0,0,0,0.65);
            color: #fff;
            font-size: 0.62rem;
            font-weight: 700;
            padding: 3px 7px;
            border-radius: 4px;
            letter-spacing: 0.04em;
        }
        .home-continue-title {
            font-size: 1.35rem;
            margin: 0 0 6px;
            line-height: 1.25;
        }
        .home-continue-meta {
            margin: 0 0 16px;
            font-size: 0.88rem;
            color: var(--home-muted);
        }
        .home-continue-progress-track {
            width: 100%;
            max-width: 340px;
        }
        .home-continue-pct {
            display: block;
            margin: 10px 0 18px;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--home-accent);
        }
        .home-continue-actions {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 12px;
            -webkit-flex-wrap: nowrap;
            -ms-flex-wrap: nowrap;
            flex-wrap: nowrap;
        }
        .home-continue-btn {
            display: -webkit-inline-box;
            display: -webkit-inline-flex;
            display: -ms-inline-flexbox;
            display: inline-flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            gap: 8px;
            min-height: 42px;
            padding: 0 22px;
            border: none;
            border-radius: 999px;
            background: var(--home-accent);
            color: var(--on-accent);
            font-size: 0.88rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            box-shadow: 0 4px 14px rgba(248,153,29,0.28);
        }
        .home-continue-btn .ico { width: 16px; height: 16px; }
        .home-continue-btn:active { -webkit-transform: scale(0.98); transform: scale(0.98); }
        .home-view-btn {
            display: -webkit-inline-box;
            display: -webkit-inline-flex;
            display: -ms-inline-flexbox;
            display: inline-flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            gap: 8px;
            min-height: 42px;
            padding: 0 20px;
            border-radius: 999px;
            border: 1.5px solid rgba(248,153,29,0.55);
            background: transparent;
            color: var(--home-accent);
            font-size: 0.88rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
        }
        .home-view-btn .ico { width: 16px; height: 16px; }
        .home-view-btn:active { -webkit-transform: scale(0.98); transform: scale(0.98); }
        .home-continue-art {
            position: relative;
            width: min(320px, 34vw);
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
        }
        .home-continue-art-img {
            display: block;
            width: 100%;
            max-width: 320px;
            height: auto;
            object-fit: contain;
            border-radius: 12px;
            pointer-events: none;
            -webkit-user-select: none;
            user-select: none;
        }
        .home-quick-actions {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 14px;
            margin-bottom: 24px;
        }
        .home-quick-card {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            -webkit-box-align: start;
            -webkit-align-items: flex-start;
            -ms-flex-align: start;
            align-items: flex-start;
            gap: 6px;
            padding: 18px 16px;
            border-radius: 14px;
            border: 1px solid var(--home-border);
            background: var(--home-card);
            color: var(--home-text);
            cursor: pointer;
            text-align: left;
        }
        .home-quick-card strong { font-size: 0.95rem; }
        .home-quick-desc { font-size: 0.78rem; color: var(--home-muted); line-height: 1.35; }
        .home-quick-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: rgba(248,153,29,0.12);
            color: var(--home-accent);
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            margin-bottom: 4px;
        }
        .home-quick-icon .ico { width: 22px; height: 22px; }
        .home-quick-card:hover { border-color: rgba(248,153,29,0.35); }
        .home-quick-card--outline {
            background: transparent;
            border: 2px solid var(--home-accent);
            color: var(--home-accent);
        }
        .home-quick-card--outline .home-quick-icon {
            background: rgba(248,153,29,0.12);
            color: var(--home-accent);
        }
        .home-quick-card--filled {
            background: var(--home-accent);
            border-color: var(--home-accent);
            color: var(--on-accent);
        }
        .home-quick-card--filled .home-quick-desc { color: rgba(0,0,0,0.55); }
        .home-quick-card--filled .home-quick-icon {
            background: rgba(0,0,0,0.14);
            color: var(--on-accent);
        }
        .home-pro-banner--inicio { display: none; margin-top: 8px; margin-bottom: 0; }
        .topbar-mobile-brand { display: none; }
        .home-account-mobile-nav { display: none; }
        .home-continue-play--fab { display: none; }
        .home-continue-foot {
            display: none;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--home-border);
        }
        .home-continue-view--mobile { width: 100%; justify-content: center; }
        .ad-slot {
            min-height: 90px;
            border-radius: 12px;
            border: 1px dashed rgba(255,255,255,0.12);
            background: rgba(255,255,255,0.02);
            margin-bottom: 24px;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            color: var(--home-muted);
            font-size: 0.78rem;
        }
        .home-books-nav { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; gap: 6px; }
        .home-carousel-btn {
            width: 32px;
            height: 32px;
            border: 1px solid var(--home-border);
            border-radius: 50%;
            background: var(--home-card);
            color: var(--home-text);
            cursor: pointer;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
        }
        .home-carousel-btn .ico { width: 16px; height: 16px; }
        .home-book-item {
            width: 140px;
            text-align: left;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            -webkit-box-align: stretch;
            -webkit-align-items: stretch;
            -ms-flex-align: stretch;
            align-items: stretch;
            padding: 0;
            border: none;
            background: none;
            cursor: pointer;
            color: var(--home-text);
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .home-book-cover-wrap { position: relative; margin-bottom: 10px; width: 140px; height: 190px; }
        .home-book-cover {
            width: 140px;
            height: 190px;
            margin: 0;
            font-size: 2rem;
            border-radius: 10px;
            overflow: hidden;
        }
        .home-book-cover.has-cover-img {
            font-size: 0;
            color: transparent;
        }
        .home-continue-cover.has-cover-img,
        .home-mini-thumb.has-cover-img,
        .home-library-cover.has-cover-img {
            font-size: 0;
            color: transparent;
            background-size: cover;
            background-position: center top;
            background-repeat: no-repeat;
        }
        .home-book-cover-wrap .home-pdf-badge { top: 10px; left: 10px; }
        .home-book-meta { font-size: 0.72rem; color: var(--home-muted); margin-bottom: 8px; }
        .home-book-progress {
            height: 4px;
            background: #3d3d3d;
            border-radius: 999px;
            overflow: hidden;
        }
        .home-book-progress-fill {
            height: 100%;
            background: var(--home-accent);
            border-radius: 999px;
        }
        .home-book-title { font-size: 0.82rem; text-align: left; margin-bottom: 4px; line-height: 1.3; }
        .home-book-add {
            width: 140px;
            text-align: left;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            -webkit-box-align: stretch;
            -webkit-align-items: stretch;
            -ms-flex-align: stretch;
            align-items: stretch;
            padding: 0;
            border: none;
            background: none;
            cursor: pointer;
            color: var(--home-muted);
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
        }
        .home-book-add-box {
            width: 140px;
            height: 190px;
            margin: 0 0 10px 0;
            border-radius: 10px;
            background: var(--home-card);
            border: 1px dashed rgba(248,153,29,0.35);
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            color: var(--home-accent);
            box-sizing: border-box;
        }
        .home-book-add-label {
            font-size: 0.82rem;
            line-height: 1.3;
            text-align: left;
            display: block;
            margin-bottom: 8px;
        }
        /* Player bar inferior */
        .app-player-bar {
            position: relative;
            left: 0;
            right: 0;
            bottom: 0;
            max-width: none;
            margin: 0;
            height: var(--player-h);
            min-height: var(--player-h);
            border-radius: 0;
            border: none;
            border-top: 1px solid var(--home-border);
            background: #12141c;
            padding: 0 20px;
            padding-bottom: env(safe-area-inset-bottom, 0px);
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 16px;
            box-sizing: border-box;
        }
        body.pdf-is-open .app-player-bar { display: none !important; }
        .player-left {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 12px;
            min-width: 200px;
            max-width: 280px;
        }
        .player-left .home-mini-thumb { width: 48px; height: 58px; border-radius: 6px; }
        .home-mini-page { display: block; font-size: 0.72rem; color: var(--home-muted); margin-top: 2px; }
        .player-center {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            gap: 12px;
        }
        .player-ctrl-btn {
            width: 36px;
            height: 36px;
            border: none;
            border-radius: 50%;
            background: transparent;
            color: var(--home-muted);
            cursor: pointer;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
        }
        .player-ctrl-btn .ico { width: 18px; height: 18px; }
        .player-ctrl-btn:hover:not(:disabled) { color: var(--home-text); }
        .player-ctrl-btn:disabled { opacity: 0.35; cursor: default; }
        .player-play-btn {
            width: 48px;
            height: 48px;
            border: none;
            border-radius: 50%;
            background: var(--home-accent);
            color: var(--on-accent);
            cursor: pointer;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            box-shadow: 0 4px 16px rgba(248,153,29,0.3);
        }
        .player-play-btn .ico { width: 22px; height: 22px; }
        .player-right {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            gap: 8px;
            min-width: auto;
            -webkit-flex-shrink: 0;
            -ms-flex-negative: 0;
            flex-shrink: 0;
            -webkit-box-pack: end;
            -webkit-justify-content: flex-end;
            -ms-flex-pack: end;
            justify-content: flex-end;
        }
        .player-ctrl-btn#player-repeat.is-active {
            color: var(--home-accent);
            background: rgba(248,153,29,0.12);
        }
        .player-progress {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: transparent;
            border-radius: 0;
        }
        .player-progress .home-mini-progress-fill { border-radius: 0; }
        .home-bottom-nav--mobile { display: none !important; }

        @media (max-width: 1023px) {
            .app-sidebar {
                position: fixed;
                top: 0;
                left: 0;
                bottom: 0;
                z-index: 1200;
                width: min(280px, 86vw);
                max-width: 280px;
                -webkit-transform: translateX(-105%);
                transform: translateX(-105%);
                -webkit-transition: -webkit-transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
                transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
                box-shadow: 4px 0 28px rgba(0,0,0,0.45);
                padding-top: max(20px, env(safe-area-inset-top, 0px));
                padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }
            body.mobile-nav-open .app-sidebar {
                -webkit-transform: translateX(0);
                transform: translateX(0);
            }
            body.pdf-is-open .app-sidebar,
            body.pdf-is-open .mobile-nav-backdrop,
            body.pdf-is-open .topbar-menu-btn { display: none !important; }
            .sidebar-close-btn,
            .topbar-menu-btn,
            .mobile-nav-backdrop { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; }
            .mobile-nav-backdrop { display: block; }
            .sidebar-brand { margin-bottom: 20px; }
            .sidebar-nav-item,
            .sidebar-sub-item { min-height: 48px; }
            #app-container.app-layout {
                -webkit-box-orient: vertical;
                -webkit-flex-direction: column;
                -ms-flex-direction: column;
                flex-direction: column;
            }
            .home-continue-art { display: none; }
            .home-continue-play--fab {
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
                -webkit-flex-shrink: 0;
                -ms-flex-negative: 0;
                flex-shrink: 0;
            }
            .home-continue-play--desktop,
            .home-continue-view--desktop { display: none !important; }
            .home-continue-actions { display: none; }
            .home-continue-foot:not(.hidden) {
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
            }
            .home-continue-card { padding: 16px 18px; margin-bottom: 16px; }
            .home-card-label {
                font-size: 1rem;
                letter-spacing: normal;
                text-transform: none;
                color: var(--home-text);
                margin-bottom: 12px;
            }
            .home-continue-row {
                gap: 12px;
                -webkit-box-align: center;
                -webkit-align-items: center;
                -ms-flex-align: center;
                align-items: center;
            }
            .home-continue-left {
                gap: 12px;
                -webkit-box-align: start;
                -webkit-align-items: flex-start;
                -ms-flex-align: start;
                align-items: flex-start;
                min-width: 0;
            }
            .home-continue-cover { width: 72px; height: 96px; font-size: 1.4rem; }
            .home-continue-title { font-size: 0.95rem; margin-bottom: 4px; }
            .home-continue-meta { margin-bottom: 8px; font-size: 0.78rem; }
            .home-continue-pct { margin: 6px 0 0; font-size: 0.78rem; }
            .home-continue-play--fab {
                width: 56px;
                height: 56px;
                min-width: 56px;
                min-height: 56px;
                border-radius: 50%;
                border: none;
                background: var(--home-accent);
                color: var(--on-accent);
                box-shadow: 0 6px 18px rgba(248,153,29,0.32);
            }
            .home-continue-play--fab .ico { width: 26px; height: 26px; }
            .home-quick-actions {
                grid-template-columns: 1fr 1fr;
                gap: 10px;
                margin-bottom: 18px;
            }
            #home-btn-stats { display: none; }
            .home-quick-card {
                min-height: 48px;
                padding: 12px 14px;
                -webkit-box-orient: horizontal;
                -webkit-box-direction: normal;
                -webkit-flex-direction: row;
                -ms-flex-direction: row;
                flex-direction: row;
                -webkit-box-align: center;
                -webkit-align-items: center;
                -ms-flex-align: center;
                align-items: center;
                gap: 10px;
            }
            .home-quick-desc { display: none; }
            .home-quick-icon {
                width: 36px;
                height: 36px;
                margin-bottom: 0;
                -webkit-flex-shrink: 0;
                -ms-flex-negative: 0;
                flex-shrink: 0;
            }
            .home-quick-icon .ico { width: 20px; height: 20px; }
            .home-quick-card strong { font-size: 0.88rem; }
            .home-pro-banner--inicio { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; }
            .home-account-mobile-nav {
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                -webkit-flex-direction: column;
                -ms-flex-direction: column;
                flex-direction: column;
                gap: 8px;
                margin-bottom: 16px;
            }
            .home-bottom-nav--mobile {
                display: -webkit-box !important;
                display: -webkit-flex !important;
                display: -ms-flexbox !important;
                display: flex !important;
                max-width: none;
            }
            .home-bottom-nav .home-nav-item {
                min-height: 48px;
                padding: 6px 4px calc(10px + env(safe-area-inset-bottom, 0px) / 2);
            }
            body:not(.pdf-is-open) #viewer-container {
                padding: 0 16px 16px !important;
                padding-bottom: calc(var(--nav-h) + var(--player-h) + 16px + env(safe-area-inset-bottom, 0px)) !important;
            }
            .home-screen { max-width: none; margin: 0; }
            .home-stats-grid,
            .home-stats-detail-grid { grid-template-columns: repeat(2, 1fr); }
            .app-player-bar {
                position: fixed;
                left: 0;
                right: 0;
                bottom: var(--nav-h);
                z-index: 900;
                padding: 0 12px;
            }
            .player-center { gap: 8px; }
            .app-topbar {
                display: -webkit-box !important;
                display: -webkit-flex !important;
                display: -ms-flexbox !important;
                display: flex !important;
                -webkit-flex-wrap: nowrap !important;
                -ms-flex-wrap: nowrap !important;
                flex-wrap: nowrap !important;
                -webkit-box-align: center;
                -webkit-align-items: center;
                -ms-flex-align: center;
                align-items: center;
                grid-template-columns: none;
                padding: 10px 12px;
                padding-top: max(10px, env(safe-area-inset-top, 0px));
                gap: 8px;
            }
            .topbar-menu-btn {
                -webkit-flex-shrink: 0;
                -ms-flex-negative: 0;
                flex-shrink: 0;
                width: 40px;
                height: 40px;
                min-width: 40px;
                min-height: 40px;
            }
            .topbar-mobile-brand {
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-align: center;
                -webkit-align-items: center;
                -ms-flex-align: center;
                align-items: center;
                -webkit-flex-shrink: 0;
                -ms-flex-negative: 0;
                flex-shrink: 0;
                min-width: 0;
            }
            .topbar-mobile-brand-icon {
                width: 36px;
                height: 36px;
                border-radius: 8px;
                display: block;
            }
            .topbar-mobile-brand-text { display: none !important; }
            .topbar-search-wrap {
                -webkit-box-flex: 1;
                -webkit-flex: 1 1 auto;
                -ms-flex: 1 1 auto;
                flex: 1 1 auto;
                min-width: 0;
                width: auto;
            }
            .topbar-search {
                min-height: 40px;
                height: 40px;
                padding: 0 12px 0 34px;
                font-size: 0.85rem;
            }
            .topbar-search-icon {
                left: 10px;
                width: 16px;
                height: 16px;
            }
            .topbar-actions {
                -webkit-flex-shrink: 0;
                -ms-flex-negative: 0;
                flex-shrink: 0;
                margin-left: 0;
            }
            .app-topbar #btn-theme { display: none; }
            .home-avatar-btn {
                width: 40px;
                height: 40px;
                min-width: 40px;
                min-height: 40px;
            }
            .home-books-header { margin-bottom: 10px; }
            .home-section-label { font-size: 0.95rem; }
            .home-library-list .home-library-row { padding: 12px 0; }
        }
        @media (max-width: 640px) {
            .home-continue-left {
                -webkit-box-orient: horizontal;
                -webkit-flex-direction: row;
                -ms-flex-direction: row;
                flex-direction: row;
                -webkit-box-align: start;
                -webkit-align-items: flex-start;
                -ms-flex-align: start;
                align-items: flex-start;
            }
            .home-continue-progress-track { max-width: none; }
            .player-left { min-width: 0; max-width: 140px; }
            .player-left .home-mini-title { font-size: 0.82rem; }
        }
        @media (max-width: 380px) {
            .home-quick-actions { grid-template-columns: 1fr; }
            .home-continue-cover { width: 64px; height: 86px; }
            .home-continue-play--fab { width: 52px; height: 52px; min-width: 52px; min-height: 52px; }
            .app-topbar { gap: 6px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top, 0px)); }
            .topbar-menu-btn,
            .home-avatar-btn { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
            .topbar-mobile-brand-icon { width: 32px; height: 32px; }
            .topbar-search { min-height: 36px; height: 36px; font-size: 0.8rem; padding-left: 30px; }
        }

        .home-auth-panel { margin: 16px 0; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; gap: 10px; }
        .home-auth-lead { margin: 0 0 8px; font-size: 0.86rem; color: var(--home-muted); line-height: 1.45; }
        .home-auth-email-form { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; gap: 8px; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; }
        body.password-recovery .home-account-card,
        body.password-recovery .home-plan-cards { display: none !important; }
        body.access-locked.password-recovery .auth-glass-title { display: block; }
        .home-auth-email-input {
            -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1;
            min-width: 180px;
            min-height: 42px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.12);
            background: rgba(255,255,255,0.04);
            color: var(--home-text);
            padding: 0 12px;
        }
        .home-auth-btn-primary { background: linear-gradient(135deg, #6c8cff, #4f6ef7); color: #fff; border: none; font-weight: 600; }
        .home-auth-lead--success { color: #7dcea0; }
        .home-auth-recover-toggle {
            margin-top: 4px;
            background: none;
            border: none;
            color: var(--home-muted);
            font-size: 0.82rem;
            text-decoration: underline;
            cursor: pointer;
            align-self: flex-start;
            padding: 4px 0;
        }
        .home-signup-block {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 14px;
            margin-bottom: 14px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.03);
        }
        .home-auth-tabs { display: flex; gap: 6px; }
        .home-auth-tab {
            flex: 1;
            min-height: 36px;
            border-radius: 9px;
            border: 1px solid rgba(255,255,255,0.12);
            background: transparent;
            color: var(--home-muted);
            font-size: 0.84rem;
            cursor: pointer;
        }
        .home-auth-tab.is-active { background: rgba(255,255,255,0.08); color: var(--home-text); font-weight: 600; }
        .home-signup-form { display: flex; flex-direction: column; gap: 8px; }
        .home-signup-form .home-auth-email-input { flex: none; width: 100%; box-sizing: border-box; }
        .home-auth-divider { margin: 0; text-align: center; font-size: 0.78rem; color: var(--home-muted); }
        .home-plan-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 12px;
            margin-bottom: 8px;
        }
        .home-plan-card {
            padding: 16px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.03);
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .home-plan-card--premium { border-color: rgba(248,153,29,0.45); }
        .home-plan-name { margin: 0; font-size: 1rem; font-weight: 700; }
        .home-plan-price { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--accent, #F8991D); }
        .home-plan-price span { font-size: 0.75rem; font-weight: 500; color: var(--home-muted); }
        .home-plan-features { margin: 0; padding-left: 18px; font-size: 0.82rem; color: var(--home-muted); line-height: 1.5; }
        .home-plan-card .home-account-btn {
            margin-top: auto;
            justify-content: center;
            text-align: center;
            border-radius: 999px;
            background: linear-gradient(135deg, #F8991D, #ffb347);
            color: #111;
            min-height: 46px;
            font-weight: 800;
        }

        body.access-locked .sidebar-nav-item:not([data-home-nav="conta"]),
        body.access-locked .sidebar-sub-item,
        body.access-locked .home-nav-item:not([data-home-nav="conta"]) {
            opacity: 0.42;
        }
        body.access-locked #nav-controls,
        body.access-locked #pdf-render-area {
            display: none !important;
        }

        .auth-stage { display: flex; flex-direction: column; gap: 16px; }
        .auth-stage-brand { display: none; }
        .auth-glass { display: contents; }
        .auth-glass-title { display: none; }
        .auth-field-label { font-size: 0.8rem; font-weight: 600; color: var(--home-text); }
        .auth-form-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin: 2px 0 6px;
        }
        .auth-remember { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--home-muted); cursor: pointer; }
        .auth-remember input { accent-color: var(--home-accent); }

        body.access-locked .app-sidebar,
        body.access-locked .app-topbar,
        body.access-locked .home-account-mobile-nav,
        body.access-locked .home-account-actions,
        body.access-locked .home-pro-banner,
        body.access-locked .sidebar-premium,
        body.access-locked .home-mini-player {
            display: none !important;
        }
        body.access-locked .app-shell,
        body.access-locked #welcome,
        body.access-locked #viewer-container,
        body.access-locked #home-tab-conta {
            display: block !important;
            height: 100%;
            min-height: 100%;
        }
        body.access-locked .home-tab-panel:not(#home-tab-conta) { display: none !important; }
        body.access-locked:not(.auth-session) .home-plan-cards,
        body.access-locked:not(.auth-session) .home-account-card { display: none; }
        body.access-locked .auth-stage {
            position: fixed;
            inset: 0;
            z-index: 70;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 56px;
            padding: 32px 40px;
            box-sizing: border-box;
            background:
                radial-gradient(ellipse 50% 60% at 18% 50%, rgba(248,153,29,0.22), transparent 58%),
                radial-gradient(ellipse 40% 50% at 85% 20%, rgba(248,153,29,0.08), transparent 50%),
                #0a0b10;
        }
        body.access-locked .auth-stage-brand {
            display: flex;
            flex-direction: column;
            align-items: center;
            max-width: 360px;
            text-align: center;
        }
        .auth-logo-wrap {
            position: relative;
            width: 280px;
            height: 280px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .auth-logo-glow {
            position: absolute;
            inset: 8%;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(248,153,29,0.55) 0%, rgba(248,153,29,0.12) 42%, transparent 70%);
            filter: blur(18px);
            animation: auth-pulse 3.2s ease-in-out infinite;
        }
        .auth-logo {
            position: relative;
            width: 240px;
            height: 240px;
            object-fit: contain;
            filter: drop-shadow(0 0 22px rgba(248,153,29,0.55)) drop-shadow(0 12px 28px rgba(0,0,0,0.55));
        }
        .auth-wordmark {
            margin: 8px 0 0;
            font-size: 2.4rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            color: #fff;
            text-shadow: 0 0 24px rgba(248,153,29,0.45);
        }
        .auth-tagline {
            margin: 6px 0 0;
            font-size: 1rem;
            color: rgba(255,255,255,0.72);
            line-height: 1.45;
        }
        body.access-locked .auth-glass {
            position: relative;
            display: block;
            width: min(440px, 100%);
            padding: 28px 26px 24px;
            border-radius: 22px;
            background: rgba(18, 20, 28, 0.58);
            border: 1px solid rgba(255,255,255,0.18);
            box-shadow: 0 24px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12);
            -webkit-backdrop-filter: blur(22px);
            backdrop-filter: blur(22px);
            max-height: calc(100vh - 48px);
            overflow: auto;
        }
        body.access-locked .auth-glass::before {
            content: "";
            position: absolute;
            inset: 0;
            pointer-events: none;
            border-radius: inherit;
            background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, transparent 38%);
        }
        body.access-locked .home-auth-email-input {
            width: 100%;
            box-sizing: border-box;
            border-radius: 12px;
            background: rgba(8, 9, 14, 0.55);
            border: 1px solid rgba(255,255,255,0.14);
        }
        body.access-locked .home-auth-recover-toggle {
            margin-top: 0;
            color: rgba(255,255,255,0.78);
        }
        body.access-locked .home-auth-lead {
            color: rgba(255,255,255,0.68);
        }
        body.access-locked .auth-glass-title {
            display: block;
            margin: 0 0 6px;
            font-size: 1.7rem;
            font-weight: 800;
            color: #fff;
        }
        body.access-locked.auth-session .auth-glass-title { display: none; }
        body.access-locked .home-account-card {
            background: transparent;
            padding: 0 0 8px;
            margin: 0;
            text-align: left;
        }
        body.access-locked .home-account-avatar { display: none; }
        body.access-locked .home-signup-block {
            padding: 0;
            margin: 0;
            border: none;
            background: transparent;
        }
        body.access-locked .home-auth-btn-primary {
            justify-content: center;
            text-align: center;
            border-radius: 999px;
            background: linear-gradient(135deg, #F8991D, #ffb347);
            color: #111;
            min-height: 46px;
            font-weight: 800;
        }
        body.access-locked #home-btn-google-signup {
            justify-content: center;
            text-align: center;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.16);
            background: rgba(255,255,255,0.06);
        }
        body.access-locked .home-auth-tab.is-active {
            background: rgba(248,153,29,0.18);
            color: #fff;
            border-color: rgba(248,153,29,0.45);
        }
        @keyframes auth-pulse {
            0%, 100% { opacity: 0.7; transform: scale(1); }
            50% { opacity: 1; transform: scale(1.06); }
        }
        @media (max-width: 860px) {
            body.access-locked .auth-stage {
                flex-direction: column;
                gap: 16px;
                padding: 20px 16px;
                justify-content: flex-start;
                overflow: auto;
            }
            .auth-logo-wrap { width: 148px; height: 148px; }
            .auth-logo { width: 128px; height: 128px; }
            .auth-wordmark { font-size: 1.7rem; }
            .auth-tagline { font-size: 0.88rem; }
            body.access-locked .auth-glass { width: 100%; max-height: none; }
        }
