/* ===== MODO CELULAR / TABLET =====
   Ativado pelo mobile.js (classe .is-mobile no <html>).
   No totem nenhuma regra deste arquivo se aplica.
   No celular a página rola normalmente; trabalho, apresentação e
   administração abrem em tela cheia por cima da lista. */

/* Página rolável (no totem tudo é travado em uma tela só) */
html.is-mobile { height:auto; overflow-x:hidden; overflow-y:auto; overscroll-behavior-y:auto; }
.is-mobile body { height:auto; min-height:100%; overflow:visible; overscroll-behavior-y:auto; }
.is-mobile .app-shell { height:auto; min-height:100vh; min-height:100dvh; overflow:visible; }
html.is-mobile:has(.viewer-view.active),
html.is-mobile:has(.presentation-view:not(.hidden)),
html.is-mobile:has(.admin-panel:not(.hidden)) { overflow:hidden; }

/* Cabeçalho fixo com os logos centralizados */
.is-mobile .topbar { position:sticky; top:0; z-index:20; height:60px; padding:8px 16px; display:flex; align-items:center; justify-content:center; gap:20px; }
.is-mobile #homeBtn, .is-mobile .admin-hotspot, .is-mobile #keyboard { display:none !important; }
.is-mobile .event-logo { height:40px; max-width:46%; }
.is-mobile .institution-logo { height:32px; max-height:32px; max-width:30%; padding-left:20px; border-left:1px solid var(--line); box-sizing:content-box; }

/* Tela inicial: a lista continua visível por baixo do trabalho aberto,
   assim ao voltar a pessoa está no mesmo ponto da lista. */
.is-mobile #catalogView { display:flex !important; flex:none; padding:18px 16px 32px; }
.is-mobile .hero-copy { order:0; margin:0 0 14px; }
.is-mobile .eyebrow { font-size:12px; margin-bottom:6px; }
.is-mobile h1 { font-size:25px; line-height:1.15; letter-spacing:-.02em; }
.is-mobile .hero-copy > p:last-child { margin-top:8px; font-size:15px; line-height:1.4; }

.is-mobile .search-wrap { order:2; margin:0 0 12px; }
.is-mobile .search-field { display:none; }
.is-mobile .mobile-search { display:flex; align-items:center; gap:8px; min-height:54px; padding:0 8px 0 16px; border:2px solid #c9dced; border-radius:16px; background:#fff; box-shadow:0 6px 18px rgba(28,70,112,.08); cursor:text; }
.is-mobile .mobile-search:focus-within { border-color:var(--blue-600); }
.is-mobile .mobile-search-icon { font-size:24px; color:var(--blue-600); }
.is-mobile .mobile-search-input { flex:1; min-width:0; height:50px; border:0; outline:none; background:transparent; color:var(--ink); font:inherit; font-size:17px; font-weight:600; -webkit-user-select:text; user-select:text; -webkit-appearance:none; appearance:none; }
.is-mobile .mobile-search-input::placeholder { color:#8391a3; font-weight:500; }
.is-mobile .summary-row { padding:12px 4px 0; font-size:14px; }

.is-mobile .start-presentation-wrap { order:1; margin:0 0 10px; }
.is-mobile .presentation-start-btn { min-height:48px; padding:8px 14px; gap:10px; border-radius:14px; justify-content:flex-start; background:#fff; color:var(--blue-900); border:1px solid #c9dced; box-shadow:none; }
.is-mobile .presentation-start-icon { width:30px; height:30px; font-size:13px; background:var(--blue-900); color:#fff; }
.is-mobile .presentation-start-btn strong { font-size:15px; }
.is-mobile .presentation-start-btn small { display:none; }

/* Lista de trabalhos (rola junto com a página) */
.is-mobile .cards { order:3; flex:none; overflow:visible; touch-action:auto; grid-template-columns:1fr; grid-auto-rows:max-content; gap:10px; padding:0; }
.is-mobile .work-card { min-height:0; padding:14px 16px; gap:8px; border-radius:16px; touch-action:auto; }
.is-mobile .work-number { padding:4px 10px; border-radius:8px; font-size:14px; }
.is-mobile .work-title { font-size:15px; line-height:1.3; -webkit-line-clamp:4; }
.is-mobile .work-action { min-height:24px; font-size:14px; }
.is-mobile .work-action span:last-child { font-size:22px; }
.is-mobile .empty-state { order:3; flex:none; padding:30px 10px; }
.is-mobile .empty-icon { font-size:48px; }
.is-mobile .empty-state h2 { font-size:21px; }
.is-mobile .empty-state p { font-size:15px; }
.is-mobile .primary-btn { min-height:48px; padding:0 20px; border-radius:14px; font-size:16px; }

/* Trabalho aberto: tela cheia por cima da lista */
.is-mobile .viewer-view.active { position:fixed; inset:0; z-index:30; padding:8px 8px max(10px, env(safe-area-inset-bottom)); gap:8px; }
.is-mobile .viewer-toolbar { min-height:44px; grid-template-columns:auto 1fr; gap:10px; }
.is-mobile #viewerHomeBtn, .is-mobile .viewer-tip { display:none; }
.is-mobile .toolbar-btn { min-height:44px; padding:0 14px; border-radius:12px; font-size:15px; }
.is-mobile .viewer-title { text-align:left; font-size:13px; line-height:1.25; white-space:normal; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.is-mobile .viewer-stage { border-radius:12px; }
.is-mobile .zoom-indicator { right:8px; top:8px; min-width:52px; min-height:30px; border-radius:10px; font-size:13px; }
.is-mobile .viewer-touchbar { min-height:48px; gap:10px; }
.is-mobile .touch-control-btn { height:46px; min-width:56px; padding:0 12px; border-radius:12px; font-size:24px; }
.is-mobile .touch-control-btn.fit { min-width:120px; font-size:14px; }

/* Pôster desenhado pelo PDF.js */
.mobile-pdf-canvas { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); background:#fff; box-shadow:0 6px 20px rgba(0,0,0,.25); }
.mobile-pdf-status { position:absolute; z-index:3; left:50%; top:50%; transform:translate(-50%,-50%); width:max-content; max-width:calc(100% - 40px); padding:12px 18px; border-radius:14px; background:rgba(8,25,54,.82); color:#fff; font-size:15px; font-weight:700; text-align:center; pointer-events:none; }

/* Modo Vitrine */
.is-mobile .presentation-view { position:fixed; z-index:40; }
.is-mobile .presentation-topbar { flex-basis:60px; height:60px; min-height:60px; grid-template-columns:auto 1fr auto; gap:8px; padding:6px 10px; }
.is-mobile .presentation-brand img { max-width:96px; max-height:40px; }
.is-mobile .presentation-work-label { font-size:11px; white-space:normal; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.is-mobile .presentation-search-btn { min-height:40px; padding:0 10px; border-radius:12px; font-size:13px; }
.is-mobile .presentation-nav { width:40px; height:64px; border-radius:12px; font-size:34px; }
.is-mobile .presentation-nav-prev { left:6px; }
.is-mobile .presentation-nav-next { right:6px; }
.is-mobile .presentation-help { bottom:max(12px, env(safe-area-inset-bottom)); max-width:calc(100% - 16px); gap:6px; padding:6px 8px; border-radius:14px; font-size:11px; flex-wrap:nowrap; }
.is-mobile .presentation-gesture-hint { display:none; }
.is-mobile .presentation-tool-btn { height:36px; min-width:38px; padding:0 8px; border-radius:10px; font-size:18px; }
.is-mobile .presentation-tool-btn.fit { min-width:70px; font-size:12px; white-space:nowrap; }
.is-mobile .presentation-pause-btn { min-height:36px; padding:0 8px; border-radius:10px; font-size:11px; white-space:nowrap; }
.is-mobile .presentation-pause-state { top:10px; min-height:36px; font-size:13px; }

/* Administração */
.is-mobile .admin-panel { position:fixed; padding:14px; }
.is-mobile .admin-card { padding:18px; border-radius:18px; }
.is-mobile .admin-head h2 { font-size:22px; }
.is-mobile .stat b { font-size:24px; }
.is-mobile .admin-note { font-size:14px; }
