:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #121212;
  --surface-2: #1f1f1f;
  --text: #fff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.5);
  --accent: #8b7bff;
  --known: #25d366;
  --saved: #ffc83d;
  --shadow-text: 0 1px 3px rgba(0, 0, 0, 0.6);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --column: 100vw;
  --app-height: 100vh;
}

/* Dynamic viewport units track the mobile URL bar; older browsers keep vh. */
@supports (height: 100dvh) {
  :root {
    --app-height: 100dvh;
  }
}

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

html,
body {
  margin: 0;
  height: var(--app-height);
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.app {
  position: relative;
  height: var(--app-height);
  width: var(--column);
  margin-inline: auto;
}

@media (min-width: 600px) {
  :root {
    --column: min(480px, 100vw);
  }

  body {
    background: #0b0b0b;
  }

  .app {
    background: var(--bg);
  }
}
