:root {
  --blue-950:#0b2451;
  --blue-900:#102e67;
  --blue-800:#123d82;
  --blue-600:#148fc9;
  --cyan:#12b9e8;
  --ink:#14213d;
  --muted:#68758b;
  --line:#dce6f2;
  --surface:#ffffff;
  --surface-soft:#f3f8fc;
  --success:#137a4b;
  --danger:#b42318;
  --radius:26px;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
}
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { margin:0; width:100%; height:100%; overflow:hidden; overscroll-behavior:none; background:#eaf4fb; color:var(--ink); }
body { touch-action:manipulation; user-select:none; -webkit-user-select:none; }
button { font:inherit; touch-action:manipulation; user-select:none; -webkit-user-select:none; }
button:focus-visible { outline:4px solid rgba(18,185,232,.55); outline-offset:2px; }
.app-shell { width:100vw; height:100vh; min-height:620px; background:linear-gradient(180deg,#f9fcff 0%,#edf7fc 100%); display:flex; flex-direction:column; position:relative; overflow:hidden; }
.app-shell::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.55; background-image:radial-gradient(circle at 12% 12%,rgba(18,185,232,.16),transparent 20%),radial-gradient(circle at 90% 25%,rgba(16,46,103,.09),transparent 18%),radial-gradient(circle at 30% 93%,rgba(18,185,232,.09),transparent 22%); }
.topbar { height:132px; flex:0 0 auto; padding:22px 34px; display:grid; grid-template-columns:90px 1fr 230px; align-items:center; border-bottom:1px solid rgba(18,61,130,.10); position:relative; z-index:2; background:rgba(255,255,255,.90); backdrop-filter:blur(8px); }
.event-logo { height:88px; max-width:530px; object-fit:contain; justify-self:center; }
.institution-logo { max-width:195px; max-height:80px; object-fit:contain; justify-self:end; }
.icon-btn { width:72px; height:72px; border:0; border-radius:20px; font-size:34px; color:#fff; background:var(--blue-900); cursor:pointer; }
.icon-btn.ghost { background:#eaf3fa; color:var(--blue-900); }
.view { display:none; position:relative; z-index:1; flex:1; min-height:0; }
.view.active { display:flex; flex-direction:column; }
#catalogView { padding:32px 42px 34px; }
.hero-copy { flex:0 0 auto; text-align:center; max-width:850px; margin:0 auto 24px; }
.eyebrow { margin:0 0 8px; color:var(--blue-600); font-weight:800; font-size:20px; letter-spacing:.15em; }
h1 { margin:0; font-size:48px; line-height:1.07; letter-spacing:-.035em; color:var(--blue-950); }
.hero-copy > p:last-child { margin:14px 0 0; font-size:23px; color:var(--muted); }
.start-presentation-wrap { flex:0 0 auto; width:100%; max-width:980px; margin:0 auto 20px; }
.presentation-start-btn { width:100%; min-height:88px; border:0; border-radius:22px; padding:14px 24px; background:linear-gradient(135deg,var(--blue-900),var(--blue-800)); color:#fff; display:flex; align-items:center; justify-content:center; gap:18px; cursor:pointer; box-shadow:0 10px 26px rgba(16,46,103,.18); }
.presentation-start-btn:active { transform:scale(.99); }
.presentation-start-icon { width:52px; height:52px; display:grid; place-items:center; border-radius:50%; background:rgba(255,255,255,.15); font-size:27px; padding-left:3px; }
.presentation-start-btn strong { display:block; font-size:24px; line-height:1.15; }
.presentation-start-btn small { display:block; margin-top:5px; font-size:16px; font-weight:600; opacity:.9; }
.search-wrap { flex:0 0 auto; max-width:980px; width:100%; margin:0 auto 24px; }
.search-field { min-height:94px; width:100%; border:2px solid #c9dced; border-radius:24px; background:#fff; display:grid; grid-template-columns:60px 1fr 60px; align-items:center; padding:0 22px; text-align:left; box-shadow:0 10px 24px rgba(28,70,112,.08); cursor:pointer; touch-action:manipulation; }
.search-field:active { transform:scale(.996); }
.search-icon { font-size:39px; color:var(--blue-600); }
.search-text { font-size:28px; font-weight:600; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.search-text.placeholder { font-weight:500; color:#8391a3; }
.clear-search { min-width:52px; min-height:52px; display:grid; place-items:center; font-size:40px; color:#6d7f91; text-align:center; }
.summary-row { display:flex; justify-content:space-between; align-items:center; padding:18px 10px 0; font-size:21px; font-weight:700; color:var(--blue-950); }
.badge { background:#dff4fb; color:var(--blue-800); padding:8px 16px; border-radius:999px; font-size:19px; }
.cards { min-height:0; flex:1; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; display:grid; grid-template-columns:1fr 1fr; gap:20px; align-content:start; padding:3px 4px 44px; scrollbar-width:none; }
.cards::-webkit-scrollbar { display:none; }
.work-card { min-height:228px; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:26px; display:flex; flex-direction:column; gap:14px; box-shadow:0 8px 22px rgba(20,33,61,.065); cursor:pointer; transition:transform .12s ease,box-shadow .12s ease; text-align:left; touch-action:pan-y; }
.work-card:active { transform:scale(.982); box-shadow:0 4px 12px rgba(20,33,61,.10); }
.work-number { align-self:flex-start; padding:9px 15px; border-radius:12px; background:#e9f8fd; color:var(--blue-800); font-size:22px; font-weight:900; letter-spacing:.04em; }
.work-title { font-size:24px; line-height:1.28; font-weight:800; color:var(--blue-950); display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.work-action { margin-top:auto; min-height:48px; display:flex; justify-content:space-between; align-items:center; font-size:20px; font-weight:800; color:var(--blue-600); }
.work-action span:last-child { font-size:34px; }
.empty-state { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:30px; }
.empty-icon { font-size:76px; color:#8aa9c1; }
.empty-state h2 { font-size:34px; margin:12px 0; color:var(--blue-950); }
.empty-state p { font-size:22px; color:var(--muted); max-width:600px; }
.primary-btn { min-height:68px; border:0; border-radius:18px; padding:0 30px; background:var(--blue-900); color:#fff; font-size:21px; font-weight:800; cursor:pointer; }
.hidden { display:none !important; }

/* ===== VISUALIZAÇÃO INDIVIDUAL TOUCH ===== */
.viewer-view { background:#dfeaf2; padding:14px 18px 16px; gap:10px; }
.viewer-toolbar { flex:0 0 auto; min-height:72px; display:grid; grid-template-columns:180px 1fr 180px; align-items:center; gap:14px; }
.toolbar-btn { min-height:68px; border:0; border-radius:18px; padding:0 18px; background:var(--blue-900); color:#fff; font-size:20px; font-weight:800; cursor:pointer; }
.toolbar-btn.secondary { background:#fff; color:var(--blue-900); border:1px solid #cad8e6; }
.toolbar-btn:active { transform:scale(.98); }
.viewer-title { text-align:center; font-size:20px; font-weight:800; color:var(--blue-950); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.viewer-stage { position:relative; min-height:0; flex:1; background:#3d4650; border-radius:18px; overflow:hidden; box-shadow:0 12px 34px rgba(19,37,62,.2); isolation:isolate; }
.pdf-touch-canvas { position:absolute; inset:0; width:100%; height:100%; transform-origin:center center; will-change:transform; }
.pdf-touch-canvas.is-animating { transition:transform .2s ease-out; }
#pdfFrame, #presentationPdfFrame { border:0; width:100%; height:100%; background:#3d4650; pointer-events:none; }
.gesture-layer { position:absolute; inset:0; z-index:2; touch-action:none; cursor:grab; }
.gesture-layer:active { cursor:grabbing; }
.zoom-indicator { position:absolute; z-index:5; right:14px; top:14px; min-width:68px; min-height:44px; padding:0 12px; border-radius:14px; background:rgba(8,25,54,.74); color:#fff; display:grid; place-items:center; font-size:16px; font-weight:800; pointer-events:none; backdrop-filter:blur(8px); }
.viewer-touchbar { flex:0 0 auto; display:flex; align-items:center; justify-content:center; gap:12px; min-height:66px; }
.touch-control-btn { min-width:68px; height:60px; border:1px solid #c4d5e3; border-radius:17px; background:#fff; color:var(--blue-950); font-size:31px; font-weight:900; padding:0 18px; cursor:pointer; box-shadow:0 3px 10px rgba(20,33,61,.06); }
.touch-control-btn.fit { min-width:178px; font-size:18px; }
.touch-control-btn:active { transform:scale(.96); background:#e9f5fb; }
.viewer-tip { flex:0 0 auto; text-align:center; font-size:15px; color:#607084; }

/* ===== TECLADO VIRTUAL TOUCH ===== */
.keyboard { position:absolute; inset:0; z-index:50; background:rgba(7,24,52,.45); display:flex; align-items:flex-end; touch-action:none; }
.keyboard-panel { width:100%; background:#f8fbfe; padding:22px 28px 30px; border-radius:30px 30px 0 0; box-shadow:0 -18px 50px rgba(0,0,0,.20); }
.keyboard-display-row { display:grid; grid-template-columns:1fr 150px; gap:18px; align-items:end; margin-bottom:18px; }
.keyboard-label { font-size:17px; font-weight:800; color:var(--blue-600); letter-spacing:.07em; }
.keyboard-display { height:70px; background:#fff; border:2px solid #bdd3e6; border-radius:16px; padding:15px 18px; font-size:27px; font-weight:700; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.keyboard-close { height:70px; border:0; border-radius:16px; background:#dceaf5; color:var(--blue-950); font-weight:800; font-size:19px; }
.keyboard-keys { display:flex; flex-direction:column; gap:11px; }
.key-row { display:flex; justify-content:center; gap:9px; }
.key { height:68px; min-width:62px; flex:1 1 0; max-width:94px; border:1px solid #c9dae7; border-radius:14px; background:#fff; color:var(--blue-950); font-size:25px; font-weight:800; box-shadow:0 2px 0 #b9ccdc; touch-action:manipulation; }
.key:active { transform:translateY(2px); background:#eaf5fb; box-shadow:none; }
.key.wide { max-width:180px; flex-grow:1.8; font-size:18px; }
.key.space { max-width:440px; flex-grow:4; }
.key.action { background:var(--blue-900); color:#fff; border-color:var(--blue-900); box-shadow:none; }

/* ===== ADMIN ===== */
.admin-panel { position:absolute; inset:0; z-index:70; background:rgba(7,24,52,.60); display:flex; align-items:center; justify-content:center; padding:40px; touch-action:none; }
.admin-card { width:min(900px,100%); max-height:90vh; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; background:#fff; border-radius:28px; padding:30px; box-shadow:0 30px 80px rgba(0,0,0,.30); }
.admin-head { display:flex; justify-content:space-between; align-items:flex-start; }
.admin-head h2 { margin:2px 0 18px; font-size:36px; color:var(--blue-950); }
.stats-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; margin:16px 0 24px; }
.stat { background:#f4f9fd; border:1px solid #dce8f1; border-radius:20px; padding:20px; }
.stat b { display:block; font-size:34px; color:var(--blue-900); margin-top:5px; }
.admin-note { background:#fff7e8; border:1px solid #f2ddb5; padding:18px; border-radius:16px; line-height:1.5; font-size:18px; }
.admin-hotspot { position:absolute; z-index:10; right:0; bottom:0; width:88px; height:88px; opacity:0; border:0; background:transparent; touch-action:none; }

/* ===== MODO VITRINE TOUCH ===== */
.presentation-view { position:absolute; inset:0; z-index:40; background:#111820; display:flex; flex-direction:column; overflow:hidden; touch-action:none; }
.presentation-topbar { flex:0 0 96px; min-height:96px; display:grid; grid-template-columns:250px 1fr 210px; align-items:center; gap:18px; padding:12px 24px; background:rgba(8,25,54,.97); color:#fff; border-bottom:1px solid rgba(255,255,255,.12); }
.presentation-brand img { max-height:68px; max-width:230px; object-fit:contain; }
.presentation-work-label { min-width:0; text-align:center; font-weight:800; font-size:18px; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.presentation-search-btn { min-height:66px; border:2px solid rgba(255,255,255,.5); border-radius:18px; padding:0 22px; background:#fff; color:var(--blue-950); font-size:21px; font-weight:900; cursor:pointer; }
.presentation-search-btn:active { transform:scale(.975); background:#eaf6fb; }
.presentation-stage { position:relative; min-height:0; flex:1; background:#242d36; overflow:hidden; touch-action:none; isolation:isolate; }
.presentation-gesture-layer { z-index:2; }
.presentation-nav { position:absolute; z-index:4; top:50%; transform:translateY(-50%); width:82px; height:116px; border:1px solid rgba(255,255,255,.34); border-radius:24px; background:rgba(8,25,54,.72); color:#fff; font-size:66px; line-height:1; display:grid; place-items:center; cursor:pointer; backdrop-filter:blur(8px); touch-action:manipulation; }
.presentation-nav:active { transform:translateY(-50%) scale(.95); background:rgba(18,143,201,.9); }
.presentation-nav-prev { left:18px; }
.presentation-nav-next { right:18px; }
.presentation-help { position:absolute; z-index:4; left:50%; bottom:24px; transform:translateX(-50%); display:flex; align-items:center; justify-content:center; gap:10px; max-width:calc(100% - 210px); padding:10px 12px; border-radius:18px; background:rgba(8,25,54,.78); color:#fff; font-size:15px; font-weight:700; backdrop-filter:blur(8px); }
.presentation-gesture-hint { white-space:nowrap; padding:0 8px; pointer-events:none; }
.presentation-zoom-controls { display:flex; gap:7px; }
.presentation-tool-btn { min-width:48px; height:46px; border:1px solid rgba(255,255,255,.35); border-radius:12px; padding:0 10px; background:rgba(255,255,255,.13); color:#fff; font-size:24px; font-weight:900; cursor:pointer; }
.presentation-tool-btn.fit { min-width:104px; font-size:14px; }
.presentation-tool-btn:active { transform:scale(.95); background:rgba(18,185,232,.4); }
.presentation-pause-btn { min-height:46px; border:1px solid rgba(255,255,255,.35); border-radius:12px; padding:0 14px; background:rgba(255,255,255,.12); color:#fff; font-size:15px; font-weight:800; cursor:pointer; touch-action:none; }
.presentation-pause-btn:active, .presentation-pause-btn.is-paused { background:rgba(18,185,232,.38); }
.presentation-pause-state { position:absolute; z-index:5; left:50%; top:18px; transform:translateX(-50%); min-height:48px; display:grid; place-items:center; padding:0 18px; border-radius:15px; background:rgba(8,25,54,.82); color:#fff; font-size:16px; font-weight:800; pointer-events:none; backdrop-filter:blur(8px); }
.presentation-zoom-indicator { top:16px; right:18px; }
.presentation-progress { position:absolute; z-index:5; left:0; right:0; bottom:0; height:7px; background:rgba(255,255,255,.15); overflow:hidden; pointer-events:none; }
.presentation-progress span { display:block; width:0; height:100%; background:#12b9e8; }
.presentation-progress.running span { animation:presentationCountdown 12s linear forwards; }
.presentation-progress.paused span { animation-play-state:paused; }
@keyframes presentationCountdown { from { width:0; } to { width:100%; } }

/* ===== RESPONSIVIDADE TOUCH / TOTEM VERTICAL ===== */
@media (orientation:portrait) {
  .topbar { height:112px; padding:16px 26px; grid-template-columns:82px 1fr 190px; }
  .event-logo { height:78px; max-width:440px; }
  .institution-logo { max-width:165px; max-height:72px; }
  #catalogView { padding:26px 30px 28px; }
  .hero-copy { margin-bottom:20px; }
  h1 { font-size:44px; }
  .hero-copy > p:last-child { font-size:21px; }
  .presentation-start-btn { min-height:84px; }
  .search-field { min-height:88px; }
  .viewer-toolbar { grid-template-columns:160px 1fr 160px; min-height:68px; }
  .toolbar-btn { min-height:64px; font-size:18px; }
  .viewer-title { white-space:normal; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-height:1.15; font-size:17px; }
  .presentation-topbar { min-height:88px; height:88px; grid-template-columns:190px 1fr 190px; padding:9px 16px; gap:10px; }
  .presentation-brand img { max-width:175px; max-height:62px; }
  .presentation-work-label { font-size:15px; }
  .presentation-search-btn { min-height:60px; font-size:18px; padding:0 14px; }
  .presentation-nav { width:72px; height:108px; font-size:58px; }
  .presentation-nav-prev { left:12px; }
  .presentation-nav-next { right:12px; }
  .presentation-help { max-width:calc(100% - 170px); bottom:20px; flex-wrap:wrap; gap:7px; padding:8px 10px; }
}

@media (max-width:760px) {
  .topbar { grid-template-columns:62px 1fr 130px; height:102px; padding:14px 18px; }
  .event-logo { height:68px; max-width:330px; }
  .institution-logo { max-width:120px; }
  #catalogView { padding:22px 22px 24px; }
  h1 { font-size:38px; }
  .hero-copy > p:last-child { font-size:19px; }
  .presentation-start-btn { min-height:78px; }
  .presentation-start-btn strong { font-size:21px; }
  .search-field { min-height:80px; grid-template-columns:48px 1fr 48px; }
  .search-text { font-size:22px; }
  .cards { grid-template-columns:1fr; }
  .viewer-toolbar { grid-template-columns:138px 1fr 138px; gap:8px; }
  .toolbar-btn { min-height:60px; padding:0 10px; font-size:17px; }
  .viewer-title { font-size:15px; }
  .touch-control-btn { height:56px; min-width:62px; }
  .touch-control-btn.fit { min-width:150px; font-size:16px; }
  .viewer-tip { font-size:13px; }
  .keyboard-panel { padding:18px 14px 22px; }
  .keyboard-display-row { grid-template-columns:1fr 110px; gap:10px; }
  .key-row { gap:5px; }
  .key { height:58px; min-width:30px; max-width:76px; font-size:20px; border-radius:10px; }
  .key.wide { font-size:14px; max-width:130px; }
  .presentation-topbar { grid-template-columns:145px 1fr 150px; min-height:82px; height:82px; padding:8px 10px; gap:6px; }
  .presentation-brand img { max-width:140px; max-height:56px; }
  .presentation-work-label { font-size:13px; }
  .presentation-search-btn { min-height:56px; padding:0 10px; font-size:16px; }
  .presentation-nav { width:62px; height:94px; font-size:50px; }
  .presentation-nav-prev { left:8px; }
  .presentation-nav-next { right:8px; }
  .presentation-help { max-width:calc(100% - 138px); font-size:12px; bottom:16px; gap:5px; }
  .presentation-gesture-hint { display:none; }
  .presentation-tool-btn { height:42px; min-width:44px; }
  .presentation-tool-btn.fit { min-width:90px; }
  .presentation-pause-btn { min-height:42px; font-size:13px; }
}
