@import url('https://fonts.googleapis.com/css2?family=Comme:wght@300;400;500;600;700;800&display=swap');

body {
  font-family: 'Comme', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow: hidden;
  height: 100dvh;
  height: 100vh;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* Desktop notice */
@media (min-width: 600px) {
  body::before {
    content: '📱 Best viewed on a mobile device';
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-family: 'Comme', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
  }
  body {
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #app {
    border-radius: 40px;
    box-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
    overflow: hidden;
    height: 850px;
    max-height: 95vh;
  }
}

/* Page container */
.page {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
  display: none;
}
.page.active { display: block; }

/* Scrollbar */
.page::-webkit-scrollbar { width: 3px; }
.page::-webkit-scrollbar-track { background: transparent; }
.page::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Transitions */
.page-enter {
  animation: pageIn var(--dur-lg) var(--ease) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Typography */
.text-xs  { font-size: 11px; }
.text-sm  { font-size: 13px; }
.text-md  { font-size: 15px; }
.text-lg  { font-size: 18px; }
.text-xl  { font-size: 22px; }
.text-2xl { font-size: 28px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-muted  { color: var(--text-3); }
.text-2      { color: var(--text-2); }

/* Layout helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.p-4 { padding: 16px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.rounded { border-radius: var(--radius); }
.surface { background: var(--surface); }

/* Splash screen */
#splash {
  position: fixed; inset: 0;
  background: var(--primary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 1000;
  gap: 16px;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
#splash.hidden {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}
.splash-logo {
  width: 80px; height: 80px;
  background: rgba(255,255,255,.18);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
}
.splash-title {
  font-size: 32px; font-weight: 800;
  color: #fff; letter-spacing: -1px;
}
.splash-sub {
  font-size: 14px; color: rgba(255,255,255,.7);
  font-weight: 400;
}
.splash-loader {
  width: 40px; height: 3px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
  margin-top: 32px;
  overflow: hidden;
}
.splash-loader::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  animation: splashLoad 1.2s var(--ease) forwards;
}
@keyframes splashLoad {
  from { transform: translateX(-100%); }
  to   { transform: translateX(250%); }
}
