/* Garage — base: reset, shell, screens, typography, nav (ported from mockup/styles.css) */

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #e7e2db;
  color: var(--text);
  font-family: var(--font);
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body { overscroll-behavior: none; }

button { font: inherit; color: inherit; }

@media (min-width: 500px) {
  body {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    background: #d9d2ca;
  }
  .phone {
    width: 412px;
    height: 915px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 0 0 10px #1f1c1a, 0 0 0 12px #cfc6bd, 0 40px 80px rgba(17,24,39,.25);
  }
}

.phone {
  width: 100%;
  height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 40% at 100% 0%, rgba(124,94,74,0.08), transparent 50%),
    radial-gradient(ellipse 60% 30% at 0% 100%, rgba(212,196,189,0.5), transparent 50%),
    var(--bg);
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* Screens */
.screen {
  position: absolute;
  inset: 0;
  padding: 8px 16px calc(var(--nav-h) + var(--safe-bottom));
  border-top: var(--top-gap) solid var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s;
  z-index: 2;
}
.screen.lock { padding: 0; border-top: 0; }

/* Typography */
.kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 4px;
}
h1.serif, .serif-title {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Page heads */
.page-head, .back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.page-head h1, .back-row h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.back-row h1 { font-size: 22px; flex: 1; }
.back-row button.back {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: var(--shadow);
}
.back-row button.back svg { width: 18px; height: 18px; }

.top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  min-height: 48px;
}
.top-row h1 { font-size: 28px; line-height: 1.1; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 8px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* Nav */
.nav {
  position: absolute;
  inset: auto 16px calc(16px + var(--safe-bottom)) 16px;
  height: 64px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.8);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: var(--shadow-lg), var(--inset);
}
.nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 10px;
  border-radius: 999px;
  min-width: 48px;
  position: relative;
  transition: background 0.2s, color 0.2s, padding 0.2s;
}
.nav button svg { width: 22px; height: 22px; flex-shrink: 0; }
.nav button span {
  display: none;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.nav button.is-on {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding-inline: 14px;
}
.nav button.is-on span { display: inline; }
.nav .nbadge {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--due);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  display: grid;
  place-items: center;
}
.nav .nbadge[hidden] { display: none; }
.nav button.is-on .nbadge { inset-inline-end: 8px; }

html[data-screen="lock"] .nav { display: none; }
