:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #111111;
  --panel-2: #171717;
  --text: #f4f4f1;
  --muted: #989898;
  --line: #2a2a2a;
  --danger: #c62828;
  --danger-hover: #a91f1f;
  --radius: 12px;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.viewer-body {
  min-height: 100vh;
  background: #050505;
}

.viewer-shell {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.state-screen {
  width: min(100%, 720px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
}

.brand-lockup h1,
.admin-header h1,
.section-heading h2 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.brand-lockup h1 {
  font-size: clamp(48px, 12vw, 104px);
  line-height: 0.9;
}

.brand-lockup p {
  margin: 12px 0 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}

.brand-kicker,
.eyebrow {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.state-copy {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.6;
}

.loader {
  width: 28px;
  height: 28px;
  border: 2px solid #252525;
  border-top-color: #f4f4f1;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.deck-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
  overflow-x: hidden;
}

.pdf-page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: #111;
}

.pdf-page + .pdf-page {
  margin-top: 1px;
}

.pdf-page canvas {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto;
}

.progress-badge {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 30;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 11px;
  letter-spacing: .08em;
}

.admin-body {
  min-height: 100vh;
  background: var(--bg);
}

.admin-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 28px;
}

.admin-header h1 {
  font-size: clamp(30px, 6vw, 56px);
}

.text-link {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
}

.warning-panel {
  margin-bottom: 18px;
  border-color: #6b5020;
  background: #1a1409;
}

.warning-panel h2,
.warning-panel p {
  margin: 0;
}

.warning-panel p {
  margin-top: 8px;
  color: #cdbd98;
  line-height: 1.5;
}

.warning-panel code {
  color: #fff;
}

.auth-panel {
  max-width: 520px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: clamp(24px, 4vw, 38px);
}

.section-heading p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #090909;
  color: var(--text);
  padding: 0 13px;
}

.field input:focus {
  border-color: #777;
}

.button {
  appearance: none;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, opacity .18s ease;
}

.button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.button-light {
  background: #f4f4f1;
  color: #090909;
}

.button-light:hover:not(:disabled) {
  background: #d9d9d5;
}

.button-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.button-danger {
  margin-top: 18px;
  background: var(--danger);
  color: #fff;
}

.button-danger:hover {
  background: var(--danger-hover);
}

.form-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.form-message.success {
  color: #a4d6a4;
}

.form-message.error {
  color: #ff9f9f;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 18px;
}

.file-card {
  min-height: 112px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a0a0a;
}

.file-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.file-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.drop-zone {
  min-height: 190px;
  border: 1px dashed #454545;
  border-radius: 10px;
  background: #090909;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  cursor: pointer;
}

.drop-zone.dragging {
  border-color: #f4f4f1;
  background: #151515;
}

.drop-title {
  font-weight: 700;
}

.drop-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #242424;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: #f4f4f1;
  transition: width .2s ease;
}

.info-panel {
  margin-top: 18px;
}

.clean-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

@media (max-width: 760px) {
  .admin-shell {
    padding: 22px 14px 56px;
  }

  .admin-header {
    align-items: flex-end;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
  }

  .file-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .button-ghost {
    width: 100%;
  }
}
