/**
 * Flipbook — Estilos
 * Design System: "The Digital Atelier" (Stitch)
 * Aesthetic: Soft Minimalism / Editorial Premium
 * 
 * Font: Inter
 * Palette: Blue primary + tonal white surfaces
 */

/* ── Reset & Variables ──────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ── Surface hierarchy (light — default) ── */
    --surface: #f8f9ff;
    --surface-dim: #cbdbf5;
    --surface-bright: #f8f9ff;
    --surface-lowest: #ffffff;
    --surface-low: #eff4ff;
    --surface-container: #e5eeff;
    --surface-high: #dce9ff;
    --surface-highest: #d3e4fe;

    /* ── Primary ── */
    --primary: #0058be;
    --primary-container: #2170e4;
    --primary-fixed-dim: #adc6ff;
    --on-primary: #ffffff;
    --on-primary-container: #fefcff;

    /* ── Secondary ── */
    --secondary: #515f74;
    --secondary-container: #d5e3fc;
    --on-secondary: #ffffff;

    /* ── Tertiary ── */
    --tertiary: #4648d4;
    --tertiary-container: #6063ee;

    /* ── Neutral text ── */
    --on-surface: #0b1c30;
    --on-surface-variant: #424754;
    --outline: #727785;
    --outline-variant: #c2c6d6;

    /* ── Status ── */
    --error: #ba1a1a;
    --error-container: #ffdad6;
    --on-error: #ffffff;
    --success: #16a34a;
    --success-container: #dcfce7;

    /* ── Inverse (for dark mode) ── */
    --inverse-surface: #213145;
    --inverse-on-surface: #eaf1ff;
    --inverse-primary: #adc6ff;

    /* ── Semantic aliases ── */
    --bg-deep: var(--surface);
    --bg-surface: var(--surface-lowest);
    --bg-elevated: var(--surface-container);
    --bg-card: var(--surface-lowest);
    --accent: var(--primary);
    --accent-glow: rgba(0, 88, 190, 0.15);
    --accent-hover: var(--primary-container);
    --text-primary: var(--on-surface);
    --text-secondary: var(--on-surface-variant);
    --text-muted: var(--outline);
    --danger: var(--error);
    --danger-bg: var(--error-container);

    /* ── Layout tokens ── */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    --shadow-ambient: 0 12px 40px rgba(11, 28, 48, 0.06);
    --shadow-md: 0 4px 20px rgba(11, 28, 48, 0.08);
    --shadow-lg: 0 20px 60px rgba(11, 28, 48, 0.10);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* ── Glass ── */
    --glass-bg: rgba(248, 249, 255, 0.78);
    --glass-blur: 20px;

    /* ── Gradient ── */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-container));
    --bg-gradient-center: #e5eeff;
    --bg-gradient-edge: #cbdbf5;
}

/* ── Dark theme ── */
:root.theme-dark {
    --surface: #111827;
    --surface-dim: #0f172a;
    --surface-bright: #1e293b;
    --surface-lowest: #1e293b;
    --surface-low: #1a2332;
    --surface-container: #1e293b;
    --surface-high: #283548;
    --surface-highest: #334155;

    --on-surface: #eaf1ff;
    --on-surface-variant: #94a3b8;
    --outline: #64748b;
    --outline-variant: #334155;

    --primary: #adc6ff;
    --primary-container: #5b9bff;
    --on-primary: #001a42;
    --on-primary-container: #fefcff;

    --secondary: #b9c7df;
    --secondary-container: #3a485b;

    --tertiary: #c0c1ff;
    --tertiary-container: #4648d4;

    --inverse-surface: #eaf1ff;
    --inverse-on-surface: #213145;
    --inverse-primary: #0058be;

    --bg-deep: var(--surface);
    --bg-surface: var(--surface-lowest);
    --bg-elevated: var(--surface-container);
    --bg-card: var(--surface-lowest);
    --accent: var(--primary);
    --accent-glow: rgba(173, 198, 255, 0.20);
    --accent-hover: var(--primary-container);
    --text-primary: var(--on-surface);
    --text-secondary: var(--on-surface-variant);
    --text-muted: var(--outline);

    --glass-bg: rgba(17, 24, 39, 0.85);
    --bg-gradient-center: #1a2332;
    --bg-gradient-edge: #0f172a;

    --gradient-primary: linear-gradient(135deg, #3b82f6, #60a5fa);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--on-primary);
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px var(--accent-glow);
}

.btn-accent {
    background: var(--gradient-primary);
    color: var(--on-primary);
}
.btn-accent:hover { filter: brightness(1.08); }

.btn-outline {
    background: var(--surface-high);
    color: var(--text-secondary);
    border: none;
}
.btn-outline:hover {
    background: var(--surface-highest);
    color: var(--accent);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: none;
}
.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success) !important;
    color: white !important;
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }


/* ════════════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════════════ */

.admin-body {
    background: var(--bg-deep);
    min-height: 100vh;
}

.admin-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-main {
    padding-bottom: 60px;
}

/* ── Nav ────────────────────────────────────────── */
.admin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-bottom: 40px;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.logo-icon { font-size: 1.5rem; }

.admin-nav-links {
    display: flex;
    gap: 4px;
}
.admin-nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}
.admin-nav-links a:hover {
    color: var(--text-primary);
    background: var(--surface-high);
}
.admin-nav-links a.active {
    background: var(--primary);
    color: var(--on-primary);
}

/* ── Header ─────────────────────────────────────── */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.admin-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--on-surface);
}

/* ── Alerts ─────────────────────────────────────── */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 0.9rem;
    border: none;
}
.alert-success {
    background: var(--success-container);
    color: var(--success);
}
.alert-error {
    background: var(--error-container);
    color: var(--error);
}

/* ── Upload Form ────────────────────────────────── */
.upload-form {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-ambient);
}

.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--on-surface);
}
.label-hint {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8rem;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-low);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition);
}
.form-group input[type="text"]:focus {
    outline: none;
    background: var(--surface-lowest);
    border-bottom-color: var(--primary);
}
.form-group input[type="text"]::placeholder {
    color: var(--text-muted);
}

/* File drop zone */
.file-drop {
    position: relative;
    border: 2px dashed var(--outline-variant);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--surface-low);
}
.file-drop:hover, .file-drop.drag-over {
    border-color: var(--primary);
    background: rgba(0, 88, 190, 0.04);
}
.file-drop.has-file {
    border-color: var(--success);
    border-style: solid;
    background: var(--success-container);
}
.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.file-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.file-drop-icon { font-size: 2.5rem; }
.file-drop-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.file-drop-name {
    color: var(--success);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ── Link Result ────────────────────────────────── */
.link-result {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-ambient);
}
.link-result h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.link-copy-box {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.link-copy-box input {
    flex: 1;
    padding: 10px 14px;
    background: var(--surface-low);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
}
.link-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Preview Section (After Upload) ──────────── */
.preview-section {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-ambient);
}
.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.preview-header h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}
.preview-frame-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-dim);
}
.preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Empty State ────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-ambient);
}
.empty-icon { font-size: 3rem; display: block; margin-bottom: 16px; }
.empty-state h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 600;
}
.empty-state p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ── Presentation Cards ─────────────────────────── */
.presentations-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.presentation-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: all var(--transition);
    box-shadow: var(--shadow-ambient);
}
.presentation-card:hover {
    background: var(--surface-high);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.card-icon { font-size: 1.4rem; }
.card-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.card-link-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.card-link-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--surface-low);
    border: none;
    border-radius: var(--radius-xs);
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.82rem;
}
.meta-date { color: var(--text-muted); }
.meta-preview {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.meta-preview:hover { text-decoration: underline; }

.card-actions {
    margin-top: 14px;
    padding-top: 14px;
}


/* ════════════════════════════════════════════════
   VIEWER — PUBLIC
   ════════════════════════════════════════════════ */

.viewer-body {
    background: var(--bg-deep);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ── Loader ──────────────────────────────────────── */
.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
.loader-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}
.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--surface-high);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-family: var(--font-display);
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
    font-weight: 500;
}
.loader-progress {
    width: 220px;
    height: 4px;
    background: var(--surface-high);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 8px;
}
.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.loader-percent {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-weight: 500;
}

/* ── Viewer Layout ──────────────────────────────── */
.viewer-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}
.viewer-wrapper.visible { opacity: 1; }

/* ── Top Header ──────────────────────────────────── */
.viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    flex-shrink: 0;
    z-index: 10;
    height: 44px;
}
.viewer-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.2;
}
.viewer-header-left {
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}
.viewer-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-icon-theme {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon-theme:hover {
    color: var(--primary);
    background: var(--surface-high);
}

.btn-icon-theme svg {
    width: 20px;
    height: 20px;
}

/* Toggle visibility based on theme */
/* Light default: show moon (to switch to dark) */
.sun-icon { display: none; }
.moon-icon { display: block; }

/* Dark mode: show sun (to switch to light) */
.theme-dark .sun-icon { display: block; }
.theme-dark .moon-icon { display: none; }

.viewer-page-info {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.viewer-page-info #currentPage {
    color: var(--text-primary);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════
   FLIPBOOK AREA — fills all remaining space
   ═══════════════════════════════════════════════ */
.flipbook-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 0;
    background: radial-gradient(ellipse at center, var(--bg-gradient-center) 0%, var(--bg-gradient-edge) 100%);
}

/* Cursor changes when zoom is active */
.flipbook-area.zoom-active {
    cursor: crosshair;
}
/* Hide arrows during zoom */
.flipbook-area.zoom-active .nav-arrow {
    opacity: 0;
    pointer-events: none;
}

/* ── Navigation Arrows ───────────────────────────── */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
}
.nav-arrow:hover {
    background: var(--surface-lowest);
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}
.nav-arrow:active {
    transform: translateY(-50%) scale(0.93);
}
.nav-arrow svg {
    width: 22px;
    height: 22px;
}
.nav-prev { left: 16px; }
.nav-next { right: 16px; }

/* ── Flipbook Container ──────────────────────────── */
.flipbook-container {
    position: relative;
    transition: transform 0.08s linear;
    cursor: default;
}

.flipbook-container.zoomed {
    cursor: none;
    transition: transform 0.06s linear;
}

/* StPageFlip canvas container */
#flipbook {
    position: relative;
}

/* ── Page Styling ────────────────────────────────── */
.page-wrapper {
    background: white;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.page-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* ── Footer / Toolbar — 3 columns ──────────────── */
.viewer-footer {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    flex-shrink: 0;
    z-index: 10;
    height: 40px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.footer-center {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 16px;
}
.footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Page indicator text */
.page-indicator {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 55px;
}

/* ── Scrubber (range slider) ─────────────────────── */
.page-scrubber {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--surface-high);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}
.page-scrubber:hover {
    background: var(--surface-highest);
}

/* Track — WebKit */
.page-scrubber::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: transparent;
}

/* Thumb — WebKit */
.page-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.page-scrubber::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(0, 88, 190, 0.4);
}

/* Track — Firefox */
.page-scrubber::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: var(--surface-high);
    border: none;
}

/* Thumb — Firefox */
.page-scrubber::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.page-scrubber::-moz-range-thumb:hover {
    transform: scale(1.3);
}

/* Tool buttons */
.tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    border: none;
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.tool-btn svg {
    width: 18px;
    height: 18px;
}
.tool-btn:hover {
    color: var(--primary);
    background: var(--surface-high);
}
.tool-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 10px var(--accent-glow);
}

/* ── Error Page ─────────────────────────────────── */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
}
.error-content {
    text-align: center;
}
.error-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
    opacity: 0.5;
}
.error-content h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}
.error-content p {
    color: var(--text-muted);
}

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Admin */
    .admin-nav {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .admin-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .upload-form {
        padding: 20px;
    }
    .link-copy-box {
        flex-direction: column;
    }
    .card-link-row {
        flex-direction: column;
    }

    /* Viewer */
    .viewer-header {
        padding: 6px 12px;
        height: 38px;
    }
    .viewer-title {
        font-size: 0.8rem;
        max-width: 55%;
    }
    .viewer-page-info {
        font-size: 0.75rem;
    }
    .viewer-footer {
        padding: 6px 12px;
        height: 38px;
    }
    .nav-arrow {
        width: 36px;
        height: 36px;
    }
    .nav-prev { left: 6px; }
    .nav-next { right: 6px; }
    .nav-arrow svg {
        width: 18px;
        height: 18px;
    }
    .tool-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    .tool-btn svg {
        width: 14px;
        height: 14px;
    }
    .tool-btn span {
        display: none;
    }
}

/* Landscape mobile */
@media (max-height: 500px) {
    .viewer-header {
        padding: 4px 12px;
        height: 32px;
    }
    .viewer-header .viewer-title {
        font-size: 0.75rem;
    }
    .viewer-footer {
        padding: 4px 12px;
        height: 32px;
    }
}
