/* Template WebGL do Interlagos: tela cheia, barra no visual do site, carregamento e avisos acessíveis. */
:root {
  --ink: #112c38;
  --text: #163440;
  --paper: #f5f7f4;
  --muted: #5d7079;
  --accent: #277aa4;
  --line: #d4dedc;
  --bar-h: 52px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 20; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { left: 8px; }

.app-bar { height: var(--bar-h); display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(16px, env(safe-area-inset-left)); background: var(--ink); color: #f3f6f5;
  border-bottom: 1px solid rgba(255, 255, 255, .08); }
.app-brand { font-weight: 700; letter-spacing: .01em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-nav { display: flex; align-items: center; gap: 4px; }
.app-nav a, .app-nav button { color: #dfe8e6; background: transparent; border: 1px solid transparent; border-radius: 6px;
  padding: 6px 10px; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.app-nav a:hover, .app-nav button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.app-nav button { border-color: rgba(255, 255, 255, .25); }
.app-nav button:disabled { opacity: .45; cursor: default; }

#unity-container { position: relative; width: 100vw; height: calc(100vh - var(--bar-h)); height: calc(100dvh - var(--bar-h)); background: #dde5e3; }
#unity-canvas { display: block; width: 100%; height: 100%; background: #dde5e3; }

.app-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(233, 240, 239, .96); }
.app-overlay[hidden] { display: none; }
.app-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px;
  box-shadow: 0 12px 40px rgba(17, 44, 56, .12); }
.app-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.app-card h1 { margin: 0 0 16px; font-size: 22px; line-height: 1.25; color: var(--ink); }
.app-card p { margin: 0 0 12px; }
.app-progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 10px; }
#app-progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
#app-progress-text { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.app-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.app-button { display: inline-block; border: 1px solid var(--ink); border-radius: 8px; padding: 10px 14px; background: #fff;
  color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.app-button.primary { background: var(--ink); color: #fff; }

#unity-warning { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: min(640px, calc(100% - 24px)); z-index: 10; }
.app-banner { margin-bottom: 8px; padding: 10px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(17, 44, 56, .12); }
.app-banner.warning { border-color: #d9a400; }
.app-banner.error { border-color: #b3261e; color: #7a1b15; }

@media (max-width: 560px) {
  .app-nav a { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #app-progress-bar { transition: none; }
}
