/* Studio in Mappe — app sempre escuro, cores dos PDFs (navy + destaque da oferta) */
:root {
  --bg: #0C1424; --panel: #141E33; --card: #203A5F; --ink: #F3F5F9; --muted: #A3AFC2;
  --line: #26334C; --accent: #F2A541; --danger: #F08A7E;
  --f-display: "Poppins", system-ui, sans-serif;
  --f-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-label: "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
[hidden] { display: none !important; }
button, a { font: inherit; cursor: pointer; touch-action: manipulation; }
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
em { font-style: normal; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.link { background: none; border: 0; color: var(--muted); padding: 6px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.login-box { width: 100%; max-width: 400px; display: grid; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.05rem var(--f-display); }
.mark { width: 36px; height: 36px; border-radius: 9px; background: var(--card); color: var(--accent); display: grid; place-items: center; font-size: .82rem; }
.login h1 { font: 700 1.75rem/1.2 var(--f-display); margin: 0; text-wrap: balance; }
form { display: grid; gap: 10px; }
label { font: 700 .78rem var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input[type=email] { width: 100%; font-size: 1.05rem; padding: 14px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
input[type=email]:focus { border-color: var(--accent); outline: none; }
#login-btn { background: var(--accent); color: #1A1A1A; border: 0; border-radius: 10px; padding: 14px; font-weight: 700; font-size: 1rem; }
#login-btn[disabled] { opacity: .6; cursor: progress; }
.msg { margin: 2px 0 0; color: var(--danger); font-size: .92rem; line-height: 1.45; }
.hint { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* ---------- Home ---------- */
.appbar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px; background: rgba(12, 20, 36, .92); backdrop-filter: blur(8px); }
.logo { font: 700 1.02rem var(--f-display); white-space: nowrap; }
.who { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: .8rem; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home { max-width: 1180px; margin: 0 auto; padding: 4px 0 calc(40px + env(safe-area-inset-bottom)); }
.offer { --accent: #F2A541; }

.hero { margin: 8px 20px 6px; border-radius: 16px; background: var(--card); overflow: hidden; display: grid; grid-template-columns: 1fr; }
.hero-art { display: grid; place-items: center; padding: 18px 18px 0; }
.hero-art img { max-height: 210px; object-fit: contain; }
.hero-text { padding: 16px 18px 20px; display: grid; gap: 8px; }
.eyebrow { font: 700 .72rem var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.hero h2 { margin: 0; font: 700 1.35rem/1.2 var(--f-display); text-transform: uppercase; text-wrap: balance; }
.hero h2 span, .t span { color: var(--accent); }
.hero p { margin: 0; color: #D3DAE6; font-size: .92rem; line-height: 1.5; max-width: 60ch; }
.btn { justify-self: start; display: inline-flex; gap: 8px; align-items: center; background: var(--accent); color: #1A1A1A; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 700; font-size: .92rem; margin-top: 4px; }
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .hero-art { order: 2; padding: 24px; }
  .hero-art img { max-height: 280px; }
  .hero-text { padding: 32px; }
  .hero h2 { font-size: 1.8rem; }
}

.row { padding: 20px 0 4px; }
.row h3 { margin: 0 20px 10px; font: 600 1.02rem var(--f-display); }
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 2px 20px 8px; scroll-snap-type: x mandatory; scroll-padding-left: 20px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }

.card { flex: 0 0 136px; scroll-snap-align: start; background: none; border: 0; padding: 0; color: inherit; text-align: left; }
@media (min-width: 760px) { .card { flex-basis: 176px; } }
.poster { position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; transition: transform .15s ease; }
.card:hover .poster { transform: translateY(-3px); }
.tag { position: absolute; top: 8px; left: 8px; z-index: 2; font: 700 .62rem/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent); color: #1A1A1A; padding: 4px 8px; border-radius: 99px; }
.lock { position: absolute; top: 7px; right: 7px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .6); display: grid; place-items: center; }
.art { flex: 1; min-height: 0; display: grid; place-items: center; padding: 30px 8px 0; }
.art img { max-height: 100%; object-fit: contain; }
.t { padding: 8px 10px 11px; font: 700 .8rem/1.2 var(--f-display); text-transform: uppercase; }
@media (min-width: 760px) { .t { font-size: .88rem; } }
.strip { height: 5px; background: var(--accent); flex: none; }
.meta { margin-top: 6px; font-size: .75rem; color: var(--muted); }
.card.locked .meta { color: var(--accent); font-weight: 700; }

.empty { margin: 40px 20px; color: var(--muted); line-height: 1.5; }

/* ---------- Overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 10; }
.bar { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.x { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #26314A; color: #fff; font-size: 1.4rem; line-height: 1; }
.bar-title { flex: 1; min-width: 0; font-weight: 500; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl { flex: none; background: var(--accent); color: #1A1A1A; border-radius: 8px; padding: 9px 12px; font-weight: 700; font-size: .8rem; text-decoration: none; }

.viewer { background: #1B1F27; display: flex; flex-direction: column; }
.frame-wrap { position: relative; flex: 1; }
.frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #1B1F27; }
.loading { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 24px; color: var(--muted); font-size: .9rem; text-align: center; pointer-events: none; }
.slow { display: grid; gap: 14px; justify-items: center; line-height: 1.5; pointer-events: auto; }

.list { background: var(--bg); display: flex; flex-direction: column; }
.list-body { flex: 1; overflow-y: auto; padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); max-width: 720px; width: 100%; margin: 0 auto; display: grid; gap: 10px; align-content: start; }
.file { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; width: 100%; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: inherit; text-align: left; }
.file img { width: 56px; aspect-ratio: 1 / 1.414; object-fit: cover; border-radius: 4px; background: #fff; }
.file b { display: block; font-weight: 500; font-size: .95rem; line-height: 1.3; }
.file small { color: var(--muted); font-size: .78rem; }
.file .open { font: 700 .72rem var(--f-label); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

.sheet { background: rgba(5, 9, 18, .7); display: flex; align-items: flex-end; justify-content: center; }
.sheet-box { width: 100%; max-width: 520px; background: var(--panel); border-radius: 20px 20px 0 0; padding: 20px 20px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
@media (min-width: 760px) { .sheet { align-items: center; } .sheet-box { border-radius: 20px; } }
.sheet-box img { width: 100%; height: 170px; object-fit: contain; background: var(--card); border-radius: 14px; padding: 14px; }
.sheet h2 { margin: 4px 0 6px; font: 700 1.15rem/1.25 var(--f-display); }
.sheet p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.go { display: block; text-align: center; background: var(--accent); color: #1A1A1A; border-radius: 10px; padding: 13px; font-weight: 700; text-decoration: none; }

@media (prefers-reduced-motion: no-preference) {
  .viewer, .list, .sheet-box { animation: rise .2s ease-out; }
  @keyframes rise { from { transform: translateY(14px); opacity: .5; } }
}
