/* App shell — responsive rail nav / bottom tab bar, matching the prototype's own
   breakpoints exactly: phone <760px, tablet 760-1179px, desktop >=1180px. */

#app {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  background: var(--bg);
}

.shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.shell-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

.content-scroll {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 16px 16px 24px;
}

.content-inner {
  margin: 0 auto;
  max-width: 900px;
}

.content-inner--setup {
  max-width: 720px;
}

/* ---------- Rail (tablet + desktop) ---------- */
.rail {
  flex-shrink: 0;
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--sunken);
  padding: 24px 12px 16px;
  box-sizing: border-box;
  width: 76px;
}

.rail-expanded {
  display: none;
  white-space: nowrap;
}

/* ---------- Tab bar (phone only) ---------- */
.tab-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 8px 12px;
  background: var(--surface);
  border-top: 1px solid var(--sunken);
  box-sizing: border-box;
}

/* ---------- Sidebar (desktop round view only) ---------- */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid var(--sunken);
  background: var(--surface);
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
  display: none;
}

@media (min-width: 760px) {
  .rail {
    display: flex;
  }
  .tab-bar {
    display: none;
  }
  .content-scroll {
    padding: 24px;
  }
  .content-inner {
    max-width: 900px;
  }
  .content-inner--setup {
    max-width: 720px;
  }
}

@media (min-width: 1180px) {
  .rail {
    width: 232px;
  }
  .rail-expanded {
    display: block;
  }
  .content-scroll {
    padding: 32px;
  }
  .content-inner {
    max-width: 1200px;
  }
  .content-inner--setup {
    max-width: 1000px;
  }
  .sidebar:not([hidden]) {
    display: block;
  }
}
