/* App shell + phone frame. Mobile-first: on a phone the app is full-bleed;
   on a wider screen it renders inside a centered phone frame for the demo. */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--f-family);
  background: var(--c-bg);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* Desktop: draw a phone frame. */
.device-frame {
  width: var(--frame-w);
  height: var(--frame-h);
  max-height: 100vh;
  background: var(--c-bg);
  border-radius: 44px;
  border: 10px solid #000;
  box-shadow: var(--shadow-frame);
  overflow: hidden;
  position: relative;
}

/* Mobile: fill the screen, drop the frame chrome. */
@media (max-width: 480px) {
  body {
    align-items: stretch;
  }
  .device-frame {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-bg);
}

/* App header */
.app-header {
  flex: 0 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0 var(--s-4);
  border-bottom: 1px solid var(--c-border-soft);
  background: var(--c-surface);
}
.app-header__title {
  font-size: var(--f-lg);
  font-weight: 700;
  margin: 0;
}
.app-header__spacer {
  flex: 1;
}

/* Scrollable screen body */
.screen {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--s-4);
}

/* Bottom tab bar */
.tabbar {
  flex: 0 0 auto;
  height: var(--tabbar-h);
  display: flex;
  border-top: 1px solid var(--c-border-soft);
  background: var(--c-surface);
}
.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--c-text-faint);
  font-size: var(--f-xs);
  cursor: pointer;
}
.tabbar__item.is-active {
  color: var(--c-accent);
}
.tabbar__icon {
  font-size: 20px;
  line-height: 1;
}

/* Full-screen boot / splash */
.boot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  text-align: center;
  padding: var(--s-6);
}
.boot__logo {
  font-size: var(--f-3xl);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.boot__logo span {
  color: var(--c-accent);
}
.boot__status {
  color: var(--c-text-muted);
  font-size: var(--f-sm);
}
