/* Página dos aplicativos (fase 3) */
.menu a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.apps-hero { padding: 44px 0 20px; background: radial-gradient(800px 420px at 90% 0%, var(--warm-soft), transparent 65%); }
.apps-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--marinho); letter-spacing: -.02em; margin-bottom: .3em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .apps-hero h1, :root:not([data-theme="light"]) .app h2 { color: #eaf2fb; } }
.apps-hero .lead { max-width: 46em; }
.apps-aviso { max-width: 46em; font-size: .95rem; }
.apps-indice { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.apps-indice a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.apps-indice a:hover { border-color: var(--laranja); }
.apps-indice img { width: 30px; height: 30px; border-radius: 8px; }

.app { position: relative; overflow: hidden; padding: 24px; margin: 22px 0; scroll-margin-top: 84px; }
.app::before { content: ""; position: absolute; inset: -60px -60px auto auto; width: 220px; height: 220px; opacity: .12;
  background: var(--app); border-radius: 46% 54% 52% 48% / 58% 44% 56% 42%; pointer-events: none; }
.app-topo { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center; position: relative; }
.app-icone { width: 96px; height: 96px; border-radius: 22%; box-shadow: var(--shadow); background: #fff; }
.app h2 { font-size: 1.7rem; margin: 0; color: var(--marinho); }
.app-outros { margin: 0; font-size: .88rem; }
.app-tema { margin: .2em 0 .5em; font-weight: 600; color: var(--app); filter: saturate(1.1) brightness(.8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-tema { filter: none; } }
.app-topo .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.app-resumo { font-size: 1.05rem; color: var(--ink-2); max-width: 52em; margin: 16px 0; position: relative; }
@media (max-width: 720px) {
  .app { padding: 18px 16px; }
  .app-topo { grid-template-columns: 72px minmax(0, 1fr); }
  .app-icone { width: 72px; height: 72px; }
  .app-acao { grid-column: 1 / -1; }
}

.telas { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; margin: 0 -2px; }
.tela { flex: 0 0 min(360px, 78%); scroll-snap-align: start; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: #111; cursor: zoom-in; line-height: 0; }
.tela img { width: 100%; height: auto; display: block; transition: transform .25s; }
.tela:hover img { transform: scale(1.03); }
.tela:focus-visible { outline: 3px solid var(--laranja); outline-offset: 2px; }

.app-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 26px; margin-top: 8px; }
@media (max-width: 860px) { .app-cols { grid-template-columns: 1fr; } }
.app blockquote { margin: 0; padding: 10px 16px; border-left: 4px solid var(--app); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2); font-size: .95rem; }
.pubs { padding-left: 1.1em; font-size: .92rem; }
.pubs a { word-break: break-all; }
.app-ficha { background: var(--surface-2); border-radius: var(--radius-sm); padding: 16px 18px; font-size: .9rem; align-self: start; }
.app-ficha h3 { font-size: .95rem; margin: 1.1em 0 .5em; }
.app-ficha dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; }
.app-ficha dt { color: var(--ink-3); font-weight: 600; }
.app-ficha dd { margin: 0; }
.app-ficha .ids { font-size: .82rem; word-break: break-word; }
.versoes { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-left: 2px solid var(--app); }
.versoes li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0 3px 14px; position: relative; }
.versoes li::before { content: ""; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--surface); border: 2px solid var(--app); }
.versoes li:last-child::before { background: var(--app); }
.versoes span { color: var(--ink-3); }

.linha { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 2px; }
.linha li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.linha .ano { font-family: var(--display); font-size: 1.05rem; color: var(--laranja); }
.linha li.bio a { font-weight: 700; }
.fontes p { font-size: .92rem; }

.foto { width: min(1200px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); padding: 0; overflow: hidden; background: #111; color: #eee; border: 0; }
.foto::backdrop { background: rgba(0, 0, 0, .75); }
.foto figure { margin: 0; }
.foto img { display: block; width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.foto figcaption { padding: 10px 16px 0; font-size: .92rem; }
.foto-nav { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 6px 10px 10px; }
.foto-nav .btn { color: #eee; }
.foto-nav .btn:hover { background: rgba(255, 255, 255, .12); }
.foto-nav span { margin-right: auto; padding-left: 6px; color: #aaa; }

/* ligação com a página de História */
.apps-voltar { margin-bottom: 14px; }
.apps-contexto { max-width: 46em; font-size: 1rem; color: var(--ink-2); border-left: 4px solid var(--laranja); padding: 4px 0 4px 14px; }
.desc-trad { font-size: .92rem; color: var(--ink-2); margin-top: .6em; }
