:root {
  --black: #050505;
  --text: #e9e9e9;
  --border: rgba(255, 255, 255, 0.12);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--border);
  background: #0b0b0c;
}

.bar__logo { height: 34px; width: auto; display: block; }

.bar__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font: 500 14px var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.btn:hover, .btn:focus-visible { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.btn svg { width: 16px; height: 16px; }

.viewer { flex: 1; display: flex; }
.viewer object { flex: 1; width: 100%; height: 100%; border: 0; }

.fallback {
  margin: auto;
  padding: 32px 20px;
  text-align: center;
}

@media (max-width: 520px) {
  .bar__title { display: none; }
  .bar__logo { margin-right: auto; }
  .btn__label--long { display: none; }
}
