/* second pass: centred place bar, a lit "go to" console, home rack tiles that keep their own height */

/* ---------- place bar: centred on the page ---------- */
#pane-bar { align-items: center; padding-bottom: 8px; }
#pane-bar > .switch { align-self: center; }
#pane-bar > .station-bar { align-self: stretch; }

/* ---------- the go to panel: a lit console, tinted by the theme ---------- */
#launcher-scrim {
  background:
    radial-gradient(90% 70% at 50% 45%, color-mix(in srgb, var(--chi) 16%, transparent), transparent 70%),
    var(--scrim);
}
.launcher-sheet {
  --cut: 18px;
  isolation: isolate;
  background:
    radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--chi) 20%, transparent), transparent 62%),
    linear-gradient(180deg, var(--panel-hi), transparent 34%),
    var(--panel-solid);
  border-top: 0;
  box-shadow: inset 0 1px 0 var(--chi), 0 -30px 70px -28px color-mix(in srgb, var(--chi) 38%, transparent), 0 -2px 0 color-mix(in srgb, var(--chi) 40%, transparent);
}
/* faint scanlines and the corner brackets, drawn on layers so nothing is clipped */
.launcher-sheet::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background: repeating-linear-gradient(0deg, transparent 0 2px, color-mix(in srgb, var(--chi) 7%, transparent) 2px 3px);
}
.launcher-sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--brackets); }
.launcher-title {
  display: flex; align-items: center; gap: 12px;
  font: 600 28px/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase;
  text-shadow: 0 0 14px color-mix(in srgb, var(--chi) 55%, transparent);
}
.launcher-title::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--chi); box-shadow: 0 0 10px var(--chi);
  animation: launcher-led 1.6s ease-in-out infinite;
}
@keyframes launcher-led { 50% { opacity: 0.35; } }
.launcher-head .search { box-shadow: inset 0 0 0 1px var(--line-2); background: var(--well); }
.launcher-head .search:focus-within { box-shadow: inset 0 0 0 1px var(--chi), 0 0 18px -4px var(--chi); }
.launcher-sheet .bank-label { color: var(--chi); text-shadow: 0 0 8px color-mix(in srgb, var(--chi) 40%, transparent); }
.launcher-sheet .key-deck::before { background: linear-gradient(180deg, color-mix(in srgb, var(--chi) 7%, var(--panel-hi)), var(--panel-hi)); }
.launcher-sheet .key-deck:hover { transform: translateY(-2px); }
.launcher-sheet .key-deck:hover::before, .launcher-sheet .key-deck.active::before, .launcher-sheet .station-tile:hover::before {
  background: color-mix(in srgb, var(--chi) 20%, var(--panel-hi)); box-shadow: inset 0 0 0 1px var(--chi), 0 0 18px -6px var(--chi);
}
.launcher-sheet .key-deck, .launcher-sheet .station-tile { transition: transform 0.18s var(--spring); }
/* tiles light up one after another when the sheet opens (--i is set when the sheet is painted) */
@keyframes launcher-tile { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
html:not(.calm) body.deck-open .launcher-sheet :is(.station-tile, .bank-keys > *) {
  animation: launcher-tile 0.34s var(--spring) backwards;
  animation-delay: calc(min(var(--i, 0), 16) * 22ms + 90ms);
}
@media (prefers-reduced-motion: reduce) {
  .launcher-title::after { animation: none; }
  body.deck-open .launcher-sheet :is(.station-tile, .bank-keys > *) { animation: none !important; }
}

/* ---------- pages slide the way you moved on the dial ---------- */
@keyframes view-slide-next { from { opacity: 0; transform: translate3d(36px, 0, 0); } }
@keyframes view-slide-prev { from { opacity: 0; transform: translate3d(-36px, 0, 0); } }
html:not(.calm) body[data-dir="next"] .view.entering { animation: view-slide-next 0.4s var(--spring); }
html:not(.calm) body[data-dir="prev"] .view.entering { animation: view-slide-prev 0.4s var(--spring); }
/* a swipe past the last place in a station gives a small rubber-band nudge */
@keyframes swipe-end { 40% { transform: translate3d(-10px, 0, 0); } }
#content.swipe-end { animation: swipe-end 0.28s ease-out; }
@media (prefers-reduced-motion: reduce) {
  body[data-dir] .view.entering, #content.swipe-end { animation: none !important; }
}

/* ---------- home rack: short tiles keep their own height ---------- */
/* a tall neighbour no longer drags a one-line tile or an input row up to its height */
.rack { align-items: start; }
.mod.panel { align-self: stretch; max-height: min(460px, 72vh); }
.mod.mod-bare, .mod[data-mod="profile"] { align-self: start; }
/* widgets keep their own content height (the Me tile used to stretch to its neighbour), and a small tile never stretches */
.mod.panel.widget, .mod.panel[data-size="s"] { align-self: start; }
/* the suggestions board and the question size themselves */
.mod.panel[data-mod="suggest"], .mod.panel[data-mod="poll"] { max-height: none; }
.mod.panel[data-mod="poll"] { align-self: start; }
.mod.mod-bare > .inline-form { height: auto; }
/* long lists scroll inside their tile instead of growing it */
.mod.panel > :is(.w-body, .card-list, .rank-list, .board-list, .suggest-list, #today-goals) { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
