.app-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 16px var(--content-pb);
  min-height: 100vh;
}

.sticky { position: sticky; top: 8px; z-index: 10; }

.page { display: none; }
.page.active { display: block; animation: fade .2s ease; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.grid  { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack  { display: grid; gap: 10px; }

.title-row    { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-row      { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tag-row::-webkit-scrollbar { display: none; }

.tab-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 10px 14px;
  padding-bottom: calc(10px + var(--safe-area-bottom));
  gap: 6px;
  height: var(--tab-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 20;
}

@supports (backdrop-filter: blur(1px)) {
  .tab-bar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  [data-theme="dark"] .tab-bar {
    background: rgba(30, 41, 59, 0.9);
  }
}

/* Responsive breakpoints */
@media (max-width: 480px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
}

@media (min-width: 1025px) {
  .app-shell { padding-left: 24px; padding-right: 24px; }
  .tab-bar {
    max-width: 980px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}
