/* demo/css/shell.css — the frame: a compact navigation rail (a bottom bar on phones),
   an uncluttered toolbar with the date control, and content sitting directly on cream. */
.shell { min-height: 100vh; }
.rail {
  position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 96px;
  display: flex; flex-direction: column; align-items: center; gap: var(--s5); padding: var(--s4) 0;
  background: var(--paper); border-right: 1.5px solid var(--ink-line); overflow-y: auto; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-logo { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--r-md); color: var(--ink); }
.rail-logo:hover { background: var(--fog); }
.rail-items { display: flex; flex-direction: column; gap: 6px; }
.rail-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; padding: 4px 0; color: var(--ink-muted); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.rail-ico {
  display: grid; place-items: center; width: 46px; height: 36px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  transition: background-color 180ms, border-color 180ms, transform var(--dur-press) ease-out, box-shadow var(--dur-press) ease-out;
}
.rail-btn:hover { color: var(--ink); }
.rail-btn:hover .rail-ico { background: var(--fog); }
.rail-btn:active .rail-ico { transform: translateY(1px); }
.rail-btn.on { color: var(--ink); }
.rail-btn.on .rail-ico { background: var(--mint); border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.rail-label { font: 700 11px/1.15 var(--font-body); text-align: center; max-width: 80px; }
.rail-btn:focus-visible { box-shadow: none; }
.rail-btn:focus-visible .rail-ico { box-shadow: var(--focus); }

.main-col { margin-left: 96px; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  padding: 10px var(--s8); background: rgba(247, 244, 237, 0.94); border-bottom: 1.5px solid var(--ink-line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.top-logo { display: none; color: var(--ink); }
.chan { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chan > span:last-child { display: grid; line-height: 1.2; min-width: 0; }
.chan b { font: 600 var(--fs-md)/1.2 var(--font-display); white-space: nowrap; }
.chan small { color: var(--ink-muted); font-size: var(--fs-xs); font-weight: 600; }
.chan-dot { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--lilac); border: var(--line); font: 600 12px/1 var(--font-display); }
.top-range { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.top-range-ico { color: var(--ink-muted); }
.top-right { display: flex; align-items: center; gap: var(--s2); }

.main { padding: var(--s10) var(--s8) var(--s16); max-width: 1180px; outline: none; }
.main:focus, .main:focus-visible, .onboard-main:focus-visible { box-shadow: none; }
.main.enter > .view > * { animation: viewIn 320ms var(--ease-settle) both; }
.main.enter > .view > *:nth-child(2) { animation-delay: 30ms; }
.main.enter > .view > *:nth-child(3) { animation-delay: 60ms; }
.main.enter > .view > *:nth-child(n + 4) { animation-delay: 90ms; }
.main.refresh > .view { animation: refreshIn 300ms var(--ease-settle) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes refreshIn { from { opacity: 0.55; } }
.demo-foot { display: grid; gap: 4px; justify-items: start; padding: var(--s6) var(--s8) var(--s10); border-top: 1.5px solid var(--ink-line); color: var(--ink-muted); font-size: var(--fs-sm); max-width: 1180px; }

/* ---- tablets and phones: the rail becomes a bottom bar, the date control scrolls */
@media (max-width: 1023px) {
  .rail {
    top: auto; right: 0; bottom: 0; width: auto; height: auto; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1.5px solid var(--ink-line); overflow-x: auto; overflow-y: hidden;
  }
  .rail-logo { display: none; }
  .rail-items { flex-direction: row; gap: 0; margin: 0 auto; }
  .rail-btn { width: 74px; }
  .rail-label { font-size: 10.5px; }
  .main-col { margin-left: 0; }
  .topbar { padding: 8px var(--s4); gap: var(--s2) var(--s3); }
  .top-logo { display: block; }
  .main { padding: var(--s6) var(--s4) 120px; }
  .demo-foot { padding: var(--s5) var(--s4) 110px; }
}
@media (max-width: 720px) {
  .chan small { display: none; }
  .top-right { margin-left: auto; }
  .top-range { order: 5; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .top-range::-webkit-scrollbar { display: none; }
  .top-range-ico { display: none; }
  .about-btn span { display: none; }
}
