/* ============ Tokens ============ */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #ececf0;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --sep: rgba(60, 60, 67, 0.16);
  --accent: #7a0019;          /* UMD maroon */
  --accent-ink: #ffffff;
  --gold: #ffcc33;            /* UMD gold */
  --danger: #d70015;
  --success: #248a3d;
  --success-ink: #ffffff;
  --material: rgba(248, 248, 250, 0.82);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.05), 0 22px 48px rgba(0, 0, 0, 0.12);
  --brand-grad: linear-gradient(100deg, #7a0019 0%, #c8102e 30%, #ff6a3d 62%, #ffb81c 100%);
  --aurora-opacity: .32;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --radius-lg: 30px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);      /* iOS sheet curve */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 48px;
  --tab-h: 76px;            /* floating tab bar plus its gap */
  --gutter: 16px;
  --max: 980px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #98989d;
    --sep: rgba(84, 84, 88, 0.55);
    --accent: #ff6482;
    --accent-ink: #000000;
    --danger: #ff453a;
    --success: #30d158;
    --success-ink: #000000;
    --material: rgba(22, 22, 24, 0.82);
    --shadow: none;
    --shadow-lift: 0 22px 48px rgba(0, 0, 0, 0.5);
    --brand-grad: linear-gradient(100deg, #ff3b5c 0%, #ff6a3d 45%, #ffcc33 100%);
    --aurora-opacity: .55;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #98989d;
  --sep: rgba(84, 84, 88, 0.55);
  --accent: #ff6482;
  --accent-ink: #000000;
  --danger: #ff453a;
  --success: #30d158;
  --success-ink: #000000;
  --material: rgba(22, 22, 24, 0.82);
  --shadow: none;
  --shadow-lift: 0 22px 48px rgba(0, 0, 0, 0.5);
  --brand-grad: linear-gradient(100deg, #ff3b5c 0%, #ff6a3d 45%, #ffcc33 100%);
  --aurora-opacity: .55;
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
/* Behave like an app, not a web page: no text selection or link pop-ups on
   long-press, no double-tap zoom. Fields and codes stay selectable. */
html { touch-action: manipulation; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable], .selectable { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; }

/* Launch screen, shown only in the installed app. */
.splash { display: none; }
.standalone .splash {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #a3122f, #4a0010 70%); transition: opacity .45s ease;
}
.splash .logo { width: 104px; height: 104px; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .35)); }
.splash.gone { opacity: 0; pointer-events: none; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.ic { width: 24px; height: 24px; flex: none; }
.muted { color: var(--text-2); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ============ Nav bar ============ */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: calc(var(--nav-h) + var(--safe-t));
  padding: var(--safe-t) calc(8px + var(--safe-r)) 0 calc(8px + var(--safe-l));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  border-bottom: 0.5px solid transparent;
  view-transition-name: navbar;
}
.navbar.scrolled {
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--sep);
}
.nav-title {
  grid-column: 2; font-weight: 600; font-size: 17px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .2s, transform .3s var(--ease-out);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw;
}
.navbar.scrolled .nav-title { opacity: 1; transform: none; }
.navbar, .tabbar { transition: background-color .35s, border-color .35s, color .35s; }
.nav-back {
  grid-column: 1; grid-row: 1; justify-self: start;
  display: inline-flex; align-items: center; gap: 0; height: 44px; padding: 0 8px 0 0;
  color: var(--accent); font-size: 17px;
}
.nav-back .ic { width: 26px; height: 26px; }
.nav-back:active, .nav-action:active { opacity: .4; }
.nav-action {
  grid-column: 3; justify-self: end; width: 44px; height: 44px;
  display: grid; place-items: center; color: var(--accent);
}
.nav-action .ic.filled { fill: currentColor; }
.nav-action.pop .ic { animation: pop .4s var(--ease-out); }
@keyframes pop { 40% { transform: scale(1.3); } }

/* ============ Page ============ */
.view {
  max-width: var(--max); margin: 0 auto;
  padding: calc(var(--nav-h) + var(--safe-t)) calc(var(--gutter) + var(--safe-r)) calc(var(--tab-h) + var(--safe-b) + 32px) calc(var(--gutter) + var(--safe-l));
  background: var(--bg);
  min-height: 100dvh;
  outline: none;
}
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-2); }
.large-title { margin: 0; font-family: var(--font-display); font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.03em; }
@media (min-width: 700px) { .large-title { font-size: 40px; } }
.page-head { padding: 8px 0 2px; }

/* App-like density: sections sit close, like an iOS list. */
.section { margin-top: 30px; }
@media (min-width: 700px) { .section { margin-top: 40px; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-title { margin: 0 0 10px; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.see-all { color: var(--accent); font-size: 17px; white-space: nowrap; }
.caption { margin: 8px 4px 0; font-size: 13px; color: var(--text-2); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease-out) var(--delay, 0ms), transform .6s var(--ease-out) var(--delay, 0ms); }
.reveal.in { opacity: 1; transform: none; }
/* Going back shows a page as it was, with no reveal replay. */
.instant .reveal, .instant .stagger > * { transition: none !important; }

/* Where supported, scroll-linked effects run as CSS scroll-driven animations,
   off the main thread; js/motion.js only drives them elsewhere. */
@supports (animation-timeline: scroll()) {
  .hero .hero-inner { animation: hero-away-soft linear both; animation-timeline: scroll(root); animation-range: 0 45svh; }
  .hero::before { animation: fade-away linear both; animation-timeline: scroll(root); animation-range: 0 45svh; }
}
@keyframes hero-away-soft { to { opacity: .1; transform: translateY(50px) scale(.94); } }
@keyframes fade-away { to { opacity: 0; } }

/* Children of a .stagger grid rise one after another. They move with the
   individual translate/scale properties so transform stays free for press effects. */
.stagger > * {
  opacity: 0; translate: 0 10px; scale: .96;
  transition: opacity .45s var(--ease-out), translate .55s var(--ease-out), scale .55s var(--ease-out), transform .3s var(--ease-out), box-shadow .3s;
  transition-delay: calc(var(--i, 0) * 35ms), calc(var(--i, 0) * 35ms), calc(var(--i, 0) * 35ms), 0s, 0s;
}
.reveal.in .stagger > * { opacity: 1; translate: none; scale: none; }

/* ============ Tiles ============ */
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  padding: 16px; min-height: 124px; overflow: hidden; isolation: isolate;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .35s var(--ease-out), box-shadow .35s;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
/* A soft wash of the tile's color from the top corner. */
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(110% 90% at 100% 0%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 62%);
}
.tile:active { transform: scale(0.96); transition-duration: .12s; }
@media (hover: hover) { .tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); } }
.tile-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--tint) 62%, #fff), var(--tint) 58%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px color-mix(in srgb, var(--tint) 32%, transparent);
}
.tile-icon .ic { width: 23px; height: 23px; }
/* A picture icon (the campus map) fills its tile, with a thin neutral edge
   and a plain shadow instead of the tinted one. */
.ic.ic-photo {
  width: 100%; height: 100%; box-sizing: border-box; display: block; object-fit: cover;
  border: 1px solid var(--sep); border-radius: inherit;
}
.tile-icon:has(> .ic-photo), .hero-icon:has(> .ic-photo), .mini-icon:has(> .ic-photo) {
  background: none; box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
}
.app-tile .tile-icon .ic.ic-photo, .mini-icon.app-icon .ic.ic-photo, .hero-icon .ic.ic-photo, .mini-icon .ic.ic-photo { width: 100%; height: 100%; }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-title { font-weight: 600; font-size: 17px; line-height: 1.25; letter-spacing: -0.02em; }
.tile-sub { font-size: 13px; color: var(--text-2); line-height: 1.3; }
.tile-go {
  position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text-2);
  transition: transform .35s var(--ease-out), background-color .25s, color .25s;
}
.tile-go .ic { width: 15px; height: 15px; stroke-width: 2.4; }
@media (hover: hover) { .tile:hover .tile-go { transform: translateX(2px); background: var(--tint); color: #fff; } }

.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Quick Access: a home-screen grid of icons with names underneath. */
.icon-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 8px;
  padding: 18px 10px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
@media (min-width: 700px) { .icon-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; transition: transform .2s var(--ease-out); }
.app-tile:active { transform: scale(.9); transition-duration: .1s; }
.app-tile .tile-icon { width: 60px; height: 60px; border-radius: 15px; }
.app-tile .tile-icon .ic { width: 30px; height: 30px; }
.app-label { max-width: 100%; font-size: 12px; font-weight: 500; letter-spacing: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Home widgets, iOS style. */
.widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.widget {
  display: flex; flex-direction: column; min-height: 156px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.w-label { font-size: 13px; font-weight: 700; letter-spacing: .01em; color: var(--accent); }
.widget strong { margin-top: 4px; }
.w-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: 13px; font-weight: 500; color: var(--text-2); }
.weather-w { color: #fff; background: linear-gradient(165deg, #a3122f, #4a0010); }
.weather-w .w-label { color: rgba(255, 255, 255, .85); }
.weather-w strong { font-size: 46px; font-weight: 300; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.weather-w .w-foot { color: rgba(255, 255, 255, .85); }
.next-w { transition: transform .2s var(--ease-out); }
.next-w:active { transform: scale(.97); }
.w-title { font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 42%); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; scroll-padding: 0 var(--gutter);
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 700px) { .scroller { grid-auto-columns: 200px; } }

/* ============ Grouped lists ============ */
.group { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.group.padded { padding: 14px 16px; }
.group.padded p { margin: 0 0 10px; }
.group.padded p:last-child { margin-bottom: 0; }
.group > li + li .row, .group > .row + .row { box-shadow: inset 0 0.5px 0 var(--sep); }
.group > li:first-child .row { box-shadow: none; }
.row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px; width: 100%; text-align: left; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-sub { font-size: 13px; color: var(--text-2); }
.row-meta { color: var(--text-2); font-size: 15px; white-space: nowrap; }
.row-link, .row-btn { color: var(--accent); transition: background-color .2s; }
.row-link:active, .row-btn:active { background: var(--surface-2); transition: none; }
.row-link.danger, .row-btn.danger { color: var(--danger); }
.row-icon { width: 18px; height: 18px; color: var(--text-2); opacity: .7; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.reminder.past { opacity: .5; }
.reminder.past .dot { background: var(--text-2); }
.reminder { transition: opacity .25s, transform .25s var(--ease); }
.reminder.removing { opacity: 0; transform: translateX(-24px); }

.empty-card {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  border-radius: var(--radius); border: 1.5px dashed var(--sep); color: var(--text-2); font-size: 15px;
  transition: transform .3s var(--ease-out);
}
.empty-card:active { transform: scale(.98); }

.install-card {
  margin-top: 20px; padding: 14px; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: opacity .3s, transform .4s var(--ease);
}
.install-card.leaving { opacity: 0; transform: scale(.95); }
.install-icon .logo { display: block; width: 46px; height: 46px; border-radius: 12px; }
.install-text { flex: 1; display: flex; flex-direction: column; font-size: 15px; line-height: 1.35; }
.install-text span { color: var(--text-2); font-size: 13px; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); flex: none; }
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn.close { font-size: 22px; line-height: 1; background: var(--surface-2); }
.icon-btn:active { opacity: .5; }

.credit { margin: 18px 0 0; text-align: center; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--text-2); }
.heart { color: var(--accent); font-weight: 800; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ============ Buttons & inputs ============ */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px;
  transition: transform .2s var(--ease-out), opacity .2s;
}
.pill-btn:active { transform: scale(.95); opacity: .85; }
.pill-btn.wide { width: 100%; min-height: 44px; margin-top: 12px; }
.pill-btn.big { min-height: 46px; padding: 0 24px; font-size: 17px; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.pill-btn .ic { width: 20px; height: 20px; }

.search {
  margin-top: 12px; display: flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 10px; border-radius: 11px; background: var(--surface-2); color: var(--text-2);
}
.search .ic { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 17px; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.no-results { text-align: center; color: var(--text-2); margin-top: 48px; }

.segmented {
  display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; padding: 2px; gap: 2px;
  background: var(--surface-2); border-radius: 10px;
}
.segmented button { min-height: 34px; border-radius: 8px; font-size: 15px; font-weight: 500; transition: background-color .25s, box-shadow .25s; }
.segmented button[aria-checked="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }

/* iOS-style on/off switch: <input type="checkbox" class="switch"> */
.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; margin: 0; cursor: pointer;
  width: 51px; height: 31px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--sep);
  transition: background-color .25s, box-shadow .25s;
}
.switch::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .25s;
}
.switch:checked { background: var(--accent); box-shadow: none; }
.switch:checked::before { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.map-toggle-group { margin-top: 12px; }
label.row { cursor: pointer; }

.steps { margin: 0; padding-left: 20px; }
.steps li + li { margin-top: 6px; }

.add-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }
.add-form input[name="title"] { grid-column: 1 / -1; }
@media (min-width: 600px) { .add-form { grid-template-columns: 1fr auto auto; } .add-form input[name="title"] { grid-column: auto; } }
.add-form input {
  min-width: 0; height: 44px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 0; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font-size: 16px;
}
.add-form input[type="date"] { width: 100%; }
@media (min-width: 600px) { .add-form input[type="date"] { width: 11em; } }
.add-form .pill-btn { width: 44px; height: 44px; padding: 0; }

/* ============ Module page ============ */
/* Centered product-page hero with an ambient glow in the feature's color. */
.hero { position: relative; isolation: isolate; padding: 16px 0 4px; text-align: center; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: calc(-1 * (var(--nav-h) + var(--safe-t))) calc(50% - 50vw) -60px;
  background: radial-gradient(55% 60% at 50% 20%, color-mix(in srgb, var(--tint) 24%, transparent), transparent 70%);
  opacity: calc(1 - var(--hp, 0));
}
.hero .hero-inner { transform: translateY(calc(var(--hp, 0) * 50px)) scale(calc(1 - var(--hp, 0) * .06)); opacity: calc(1 - var(--hp, 0) * .9); will-change: transform, opacity; }
.hero-icon {
  width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 14px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--tint) 62%, #fff), var(--tint) 58%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 20px 44px color-mix(in srgb, var(--tint) 42%, transparent);
}
.hero-icon .ic { width: 40px; height: 40px; stroke-width: 1.6; }
.hero-eyebrow { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: color-mix(in srgb, var(--tint) 70%, var(--text)); }
.hero-blurb { margin: 8px auto 0; max-width: 30em; color: var(--text-2); font-size: 16px; line-height: 1.4; letter-spacing: -0.01em; }
.pickers { display: grid; gap: 10px; }
.picker {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: 60px; padding: 8px 40px 8px 16px; border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow);
  animation: picker-in .45s var(--ease-out) both;
}
.picker.set { animation: none; }
.picker-label { font-size: 13px; color: var(--text-2); }
.picker select {
  appearance: none; -webkit-appearance: none; border: 0; background: none; outline: none;
  font: inherit; font-size: 17px; font-weight: 600; color: var(--text); padding: 0; width: 100%; cursor: pointer;
}
.picker:focus-within { box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.picker-chev { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; color: var(--text-2); transform: translateY(-50%) rotate(90deg); pointer-events: none; }
@keyframes picker-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

.laundry-result { margin-top: 14px; animation: picker-in .5s var(--ease-out) both; }
.laundry-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.laundry-where { font-weight: 600; }
.laundry-head .pill-btn .ic, .laundry-result .pill-btn .ic { width: 16px; height: 16px; }
.laundry-frame { border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); height: min(70vh, 640px); }
.laundry-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.laundry-missing { margin: 0 0 4px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }

.alert {
  margin: 20px 0 0; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--radius-sm); font-weight: 500;
  background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 30%, transparent);
}
.alert .ic { color: var(--danger); width: 22px; height: 22px; margin-top: 1px; }
/* ============ Campus map ============ */
.caption.map-note { margin: 0 4px 10px; }
.map-data-group { margin-top: 12px; }
#map-download { flex: none; }
#map-download:disabled { opacity: .5; }
.map-search { position: relative; z-index: 2; margin-bottom: 12px; }
.map-search .search { margin-top: 0; background: var(--surface); box-shadow: var(--shadow); height: 44px; }
.map-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 50vh; overflow-y: auto;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 12px 40px rgba(0,0,0,.18);
  animation: picker-in .25s var(--ease-out) both;
}
.map-results .row-btn { color: var(--text); }
.code { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
.map-status { margin: -4px 4px 10px; font-size: 13px; color: var(--text-2); }
.link-btn { color: var(--accent); font-weight: 600; font-size: inherit; }

.map-wrap {
  position: relative; isolation: isolate; z-index: 0;
  scroll-margin: calc(var(--nav-h) + var(--safe-t) + 8px) 0 calc(var(--tab-h) + var(--safe-b) + 12px);
}
.map-card {
  height: min(62vh, 560px); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: var(--surface-2);
}
.map-card.leaflet-container { font: inherit; background: var(--surface-2); }
.map-card .leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--surface) 75%, transparent); color: var(--text-2); border-top-left-radius: 6px; }
.map-card .leaflet-control-attribution a { color: inherit; }
.map-card .leaflet-bar { border: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.map-card .leaflet-bar a { background: var(--surface); color: var(--text); border-bottom-color: var(--sep); width: 34px; height: 34px; line-height: 34px; }
/* Dark mode: invert the light map and turn the hues back around. */
.map-card.dim-tiles .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); }
.map-card .leaflet-interactive { transition: fill-opacity .25s, stroke-width .25s; }

.map-mode { margin-bottom: 12px; }
.arcgis-card iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--surface-2); }
.map-caption { margin: 10px 4px 0; }
.map-name { margin: 0 4px 10px; font-size: 15px; font-weight: 600; color: var(--text-2); }
.map-caption a { color: var(--accent); font-weight: 600; }

.map-fab {
  position: absolute; top: 12px; right: 12px; z-index: 1000; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--accent);
  background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 2px 12px rgba(0,0,0,.18); transition: transform .25s var(--ease-out), background-color .25s, color .25s;
}
.map-fab .ic { width: 22px; height: 22px; }
.map-fab:active { transform: scale(.9); }
.map-fab.active { background: #0a84ff; color: #fff; }
.map-fab.active .ic { fill: currentColor; }

.place-card {
  position: absolute; left: 12px; right: 12px; bottom: 24px; z-index: 1000;
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: var(--radius-sm);
  background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.place-card.enter { animation: place-in .45s var(--ease) both; }
.place-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.place-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.place-text span { font-size: 13px; color: var(--text-2); }
.place-card .pill-btn .ic { width: 18px; height: 18px; }
@keyframes place-in { from { transform: translateY(24px); opacity: 0; } }

/* Your location: a pulsing blue dot. */
.me-marker span { position: absolute; inset: 3px; border-radius: 50%; background: #0a84ff; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.35); }
.me-marker::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; background: rgba(10, 132, 255, .35); animation: me-pulse 2s ease-out infinite; }
@keyframes me-pulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* ============ Class schedule ============ */
.day-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 3px; margin-bottom: 14px; background: var(--surface-2); border-radius: 12px; }
.day-tabs button {
  position: relative; min-height: 44px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--text-2);
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.day-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.day-tabs i { position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; }
.day-tabs i.has { background: var(--accent); }
.day-tabs.with-weekend { grid-template-columns: repeat(7, 1fr); }
.day-tabs.has-toggle { grid-template-columns: repeat(5, 1fr) auto; }
.day-tabs.with-weekend.has-toggle { grid-template-columns: repeat(7, 1fr) auto; }
.day-tabs .weekend-btn { display: flex; align-items: center; gap: 2px; padding: 0 8px; font-size: 13px; color: var(--text-2); }
.day-tabs .weekend-btn .ic { width: 16px; height: 16px; }
.day-list { margin-bottom: 14px; }
.day-list.from-right { animation: day-in-right .38s var(--ease-out) both; }
.day-list.from-left { animation: day-in-left .38s var(--ease-out) both; }
@keyframes day-in-right { from { opacity: 0; transform: translateX(24px); } }
@keyframes day-in-left { from { opacity: 0; transform: translateX(-24px); } }
.day-empty { margin: 0; padding: 28px 16px; text-align: center; color: var(--text-2); background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }

.class-row { display: flex; align-items: center; transition: opacity .3s; }
.class-row + .class-row { box-shadow: inset 0 .5px 0 var(--sep); }
.class-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 8px 10px 16px; text-align: left; transition: background-color .2s; }
.class-main:active { background: var(--surface-2); transition: none; }
.class-time { display: flex; flex-direction: column; width: 4.8em; flex: none; font-size: 13px; line-height: 1.35; color: var(--text-2); font-variant-numeric: tabular-nums; }
.class-time span:first-child { color: var(--text); font-weight: 600; }
.class-bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); flex: none; }
.class-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.class-row.done { opacity: .45; }
.badge { flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.badge.now { background: var(--accent); color: var(--accent-ink); }
.icon-btn.pin { width: 40px; height: 40px; margin-right: 8px; color: var(--accent); }
.icon-btn.pin .ic { width: 20px; height: 20px; }
#add-class .ic { width: 20px; height: 20px; }

/* ============ Sheet (slides up from the bottom) ============ */
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0; overflow: auto;
  border-radius: 16px 16px 0 0; background: var(--bg); color: var(--text); box-shadow: 0 -10px 40px rgba(0,0,0,.25);
  overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-up .5s var(--ease) both; }
.sheet.closing { animation: sheet-down .32s var(--ease) both; }
.sheet::backdrop { background: rgba(0, 0, 0, .35); animation: vt-fade-in .3s ease both; }
.sheet.closing::backdrop { animation: vt-fade-out .32s ease both; }
@media (min-width: 700px) {
  .sheet { margin: auto; border-radius: 16px; }
  .sheet[open] { animation-name: sheet-pop; }
  .sheet.closing { animation-name: sheet-unpop; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes sheet-pop { from { transform: scale(.94); opacity: 0; } }
@keyframes sheet-unpop { to { transform: scale(.94); opacity: 0; } }

.sheet-head {
  position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 56px; padding: 0 16px; border-bottom: .5px solid var(--sep);
  background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.sheet-btn { justify-self: start; color: var(--accent); font-size: 17px; }
.sheet-btn.strong { justify-self: end; font-weight: 600; }
.sheet-body { display: grid; gap: 16px; padding: 16px 16px calc(28px + var(--safe-b)); }
.form-group { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; }
.form-group > * + * { box-shadow: inset 0 .5px 0 var(--sep); }
.form-group > input, .form-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; padding: 0 16px;
  border: 0; background: none; color: var(--text); font-size: 17px; outline: none;
}
.form-row input { border: 0; background: none; outline: none; color: var(--accent); font-size: 17px; text-align: right; }
.form-group > input:focus-visible, .form-row:focus-within { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.form-label { padding: 0 0 8px 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--text-2); }
.day-toggle { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.day-toggle.with-weekend { grid-template-columns: repeat(7, 1fr); }
.day-toggle label { position: relative; cursor: pointer; }
.day-toggle label[hidden] { display: none; }
.weekend-more { display: inline-flex; align-items: center; gap: 2px; margin: 10px 2px 0; font-size: 15px; }
.weekend-more .ic { width: 16px; height: 16px; }
.weekend-more[hidden] { display: none; }
.day-toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.day-toggle span[aria-hidden] {
  display: grid; place-items: center; height: 44px; border-radius: 12px; font-weight: 600;
  background: var(--surface); box-shadow: var(--shadow); transition: background-color .2s, color .2s, transform .2s var(--ease-out);
}
.day-toggle input:checked + span { background: var(--accent); color: var(--accent-ink); }
.day-toggle input:active + span { transform: scale(.92); }
.day-toggle input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
/* ============ Get the app ============ */
.app-list { display: grid; gap: 14px; }
@media (min-width: 700px) { .app-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.app-card {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 14px;
  padding: 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.app-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 80% at 100% 0%, color-mix(in srgb, var(--tint) 14%, transparent), transparent 65%);
}
.app-top { display: flex; gap: 14px; align-items: flex-start; }
.mini-icon.app-icon { width: 52px; height: 52px; border-radius: 14px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px color-mix(in srgb, var(--tint) 30%, transparent); }
.mini-icon.app-icon .ic { width: 28px; height: 28px; }
.app-text h3 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.app-text p { margin: 4px 0 0; font-size: 15px; line-height: 1.4; color: var(--text-2); }
/* Label above the code, so a code like UMNSAFE-U never wraps. */
.code-chip {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px;
  min-height: 56px; padding: 8px 10px 8px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); text-align: left; transition: background-color .3s;
}
.code-label { grid-column: 1; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); }
.code-chip strong { grid-column: 1; font-size: 18px; letter-spacing: .06em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.code-chip .code-action { grid-column: 2; grid-row: 1 / span 2; }
.code-action {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--accent); background: var(--surface); transition: background-color .3s, color .3s;
}
.code-action .ic, .code-action .check-draw { width: 16px; height: 16px; }
.code-chip.copied .code-action { background: var(--success); color: var(--success-ink); }
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* Official badges, both at the same height (Google asks that its badge be
   the same size or larger than other store badges). */
.store-badge { display: inline-flex; align-items: center; height: 44px; border-radius: 9px; transition: transform .2s var(--ease-out); }
.store-badge:active { transform: scale(.95); }
.store-badge img { display: block; height: 44px; width: auto; }
.store-badge .badge-dark { display: none; }
:root[data-theme="dark"] .store-badge .badge-light { display: none; }
:root[data-theme="dark"] .store-badge .badge-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .store-badge .badge-light { display: none; }
  :root:not([data-theme="light"]) .store-badge .badge-dark { display: block; }
}
.store-badge.fallback img { display: none !important; }
.badge-fallback { display: none; }
.store-badge.fallback img { display: none; }
.store-badge.fallback .badge-fallback {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-size: 16px; font-weight: 600; background: var(--text); color: var(--bg);
}
.store-badge.fallback .ic { width: 18px; height: 18px; }

.app-nudge {
  margin-top: 22px; display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center;
  padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  transition: opacity .3s, transform .3s var(--ease);
}
.app-nudge.leaving { opacity: 0; transform: scale(.96); }
.nudge-text { display: flex; flex-direction: column; }
.nudge-text strong { font-size: 17px; }
.nudge-text span { font-size: 14px; color: var(--text-2); }
.nudge-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.store-btn {
  flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--sep); transition: transform .2s var(--ease-out), background-color .25s;
}
.store-btn .ic { width: 19px; height: 19px; stroke-width: 2.1; }
.store-btn.primary { background: var(--text); color: var(--bg); box-shadow: none; }
.store-btn:active { transform: scale(.96); }
@media (hover: hover) { .store-btn:not(.primary):hover { background: var(--surface-2); } }

/* ============ Settings: editors, save buttons, feedback ============ */
.caption.lead { margin: -6px 4px 16px; font-size: 15px; }
.inline-ic { width: 16px; height: 16px; vertical-align: -3px; }
.form-label .count { float: right; text-transform: none; letter-spacing: 0; font-weight: 500; }
.edit-list { margin-bottom: 22px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.edit-row {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 8px 8px 14px;
  background: var(--surface); transition: transform .25s var(--ease-out), opacity .2s, box-shadow .25s;
}
.edit-row + .edit-row { box-shadow: inset 0 .5px 0 var(--sep); }
.edit-row.enter { animation: row-in .45s var(--ease-out) both; }
.edit-row.leaving { opacity: 0; transform: translateX(-24px); }
.edit-row.dragging { z-index: 2; transition: none; scale: 1.03; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); }
@keyframes row-in { from { opacity: 0; transform: translateY(-10px); background: color-mix(in srgb, var(--tint) 18%, var(--surface)); } }
.edit-btn { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform .2s var(--ease-out); }
.edit-btn .ic { width: 16px; height: 16px; stroke-width: 2.8; }
.edit-btn.remove { background: var(--danger); }
.edit-btn.add { background: var(--success); color: var(--success-ink); }
.edit-btn:active { transform: scale(.85); }
.mini-icon {
  width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--tint) 62%, #fff), var(--tint) 58%);
}
.mini-icon .ic { width: 18px; height: 18px; }
.drag-handle { width: 44px; height: 44px; flex: none; display: grid; place-items: center; color: var(--text-2); cursor: grab; touch-action: none; border-radius: 10px; }
.drag-handle:active { cursor: grabbing; color: var(--text); }

.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 16px; }
/* Floats above the tab bar while you edit the list, as a small glass pill. */
.save-row.sticky {
  position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 3;
  width: fit-content; margin: 0 auto; padding: 6px 18px 6px 6px; border-radius: 999px;
  background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: .5px solid var(--sep); box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}
.save-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; min-width: 9.5em; padding: 0 22px;
  border-radius: 999px; font-size: 16px; font-weight: 600; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 28%, transparent);
  transition: background-color .35s, color .35s, box-shadow .35s, transform .2s var(--ease-out);
}
.save-btn:active { transform: scale(.96); }
.save-btn:disabled { opacity: .45; box-shadow: none; cursor: default; }
.save-btn .ic { width: 18px; height: 18px; }
.save-btn.is-saved { background: var(--success); color: var(--success-ink); box-shadow: 0 8px 22px color-mix(in srgb, var(--success) 28%, transparent); cursor: default; animation: save-pop .45s var(--ease-out); }
.save-btn.is-saved.static { animation: none; }
@keyframes save-pop { 45% { transform: scale(1.06); } }
.check-draw { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.check-draw path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: check-draw .45s var(--ease-out) .08s forwards; }
.static .check-draw path { animation: none; stroke-dashoffset: 0; }
@keyframes check-draw { to { stroke-dashoffset: 0; } }
.shake { animation: shake .42s var(--ease-out); }
@keyframes shake { 20%, 60% { translate: -7px 0; } 40%, 80% { translate: 7px 0; } }

.mine-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 3px 10px 3px 7px; vertical-align: 2px;
  border-radius: 999px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success);
}
.mine-badge .ic { width: 14px; height: 14px; stroke-width: 3; }
.laundry-hint { margin-top: 14px; }
.feedback { color: var(--text); }
.feedback .row-sub { margin-top: 1px; }

.qa-num { width: 18px; flex: none; text-align: center; font-size: 14px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
#qa-preview { margin-bottom: 0; }
#qa-preview .edit-row { padding-left: 12px; }
#qa-edit .ic { width: 19px; height: 19px; }
.row-btn.centered { justify-content: center; font-weight: 500; }
.sheet-btn:disabled { opacity: .35; cursor: default; }
.sheet-btn.is-saved { display: inline-flex; align-items: center; gap: 4px; color: var(--success); animation: save-pop .45s var(--ease-out); }
.sheet-btn .check-draw { width: 18px; height: 18px; }
.delete-class { justify-content: center; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }

/* ============ Tab bar ============ */
/* Floating glass pill; a highlight glides under the active tab. */
.tabbar {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); z-index: 20; translate: -50% 0;
  display: flex; gap: 2px; height: 62px; padding: 5px; border-radius: 999px;
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 0.5px solid var(--sep);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .16), inset 0 .5px 0 rgba(255, 255, 255, .25);
  view-transition-name: tabbar;
}
.tab-glider {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: var(--w, 0); border-radius: 999px;
  translate: var(--x, 0) 0; background: color-mix(in srgb, var(--accent) 13%, transparent);
  transition: translate .55s var(--ease), width .55s var(--ease);
}
.tab {
  position: relative; z-index: 1; width: 88px; border-radius: 999px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--text-2);
  transition: color .3s;
}
.tab .ic { width: 25px; height: 25px; transition: transform .35s var(--ease-out); }
.tab:active .ic { transform: scale(.85); }
.tab.active { color: var(--accent); }
@media (min-width: 700px) {
  .tabbar { height: 56px; }
  .tab { width: auto; flex-direction: row; gap: 8px; padding: 0 20px; font-size: 15px; }
  .tab .ic { width: 21px; height: 21px; }
}

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 24px); z-index: 30;
  transform: translate(-50%, 12px) scale(.96); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 500;
  background: var(--material); color: var(--text);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 8px 30px rgba(0,0,0,.15); border: 0.5px solid var(--sep);
  transition: opacity .25s, transform .4s var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* Pull down to check for updates (js/update.js) */
.pull-update {
  position: fixed; left: 50%; top: calc(var(--safe-t) + var(--nav-h) + 4px); z-index: 25;
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--material); color: var(--text-2); border: 0.5px solid var(--sep);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 4px 16px rgba(0,0,0,.12); pointer-events: none;
  transform: translate(-50%, 0); opacity: 0; transition: transform .3s var(--ease-out), opacity .3s;
}
.pull-update .ic { width: 20px; height: 20px; }
.pull-update.ready { color: var(--accent); }
.pull-update.spinning { opacity: 1; transform: translate(-50%, 54px); color: var(--accent); }
.pull-update.spinning .ic { animation: pull-spin .8s linear infinite; }
@keyframes pull-spin { to { transform: rotate(360deg); } }


/* ============ Page transitions ============ */
/* View Transitions API (Chrome, Edge, Safari 18+). */
/* Pages move as the root snapshot, which is only one screen tall. (Naming
   #view instead would capture the whole page, several screens on Home, and
   the capture alone caused a visible hitch.) The nav bar, tab bar and the
   shared icon have their own names, so they stay put above the sliding page. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
html[data-dir="push"]::view-transition-old(root),
html[data-dir="push"]::view-transition-new(root),
html[data-dir="pop"]::view-transition-old(root),
html[data-dir="pop"]::view-transition-new(root) { mix-blend-mode: normal; }
html[data-dir="push"]::view-transition-old(root) { animation: .5s var(--ease) both vt-out-left; }
html[data-dir="push"]::view-transition-new(root) { animation: .5s var(--ease) both vt-in-right; }
html[data-dir="pop"]::view-transition-old(root)  { animation: .45s var(--ease) both vt-out-right; z-index: 2; }
html[data-dir="pop"]::view-transition-new(root)  { animation: .45s var(--ease) both vt-in-left; }
html[data-dir="fade"]::view-transition-old(root) { animation: .2s ease both vt-fade-out; }
html[data-dir="fade"]::view-transition-new(root) { animation: .36s var(--ease-out) both vt-fade-in; }
html[data-dir="theme"]::view-transition-old(root) { animation: .45s ease both vt-fade-out; }
html[data-dir="theme"]::view-transition-new(root) { animation: none; }
html[data-dir="theme"] *  { view-transition-name: none !important; }

/* The tab bar shows live, so its highlight visibly glides during page changes. */
::view-transition-old(tabbar) { display: none; }
::view-transition-new(tabbar) { animation: none; }
::view-transition-group(hero-icon) { animation-duration: .5s; animation-timing-function: var(--ease); z-index: 5; }
::view-transition-old(hero-icon), ::view-transition-new(hero-icon) { height: 100%; width: 100%; }

@keyframes vt-in-right  { from { transform: translateX(100%); } }
@keyframes vt-out-left  { to   { transform: translateX(-28%); opacity: .55; } }
@keyframes vt-in-left   { from { transform: translateX(-28%); opacity: .6; } }
@keyframes vt-out-right { to   { transform: translateX(100%); } }
@keyframes vt-fade-out  { to   { opacity: 0; } }
@keyframes vt-fade-in   { from { opacity: 0; transform: translateY(8px) scale(.99); } }

/* Fallback for browsers without View Transitions. */
.view.enter-push { animation: fb-push .45s var(--ease) both; }
.view.enter-pop  { animation: fb-pop .45s var(--ease) both; }
.view.enter-fade { animation: vt-fade-in .35s var(--ease-out) both; }
@keyframes fb-push { from { transform: translateX(40%); opacity: 0; } }
@keyframes fb-pop  { from { transform: translateX(-20%); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ Library hours ============ */
.hours-card { margin-bottom: 12px; }
.hours-now { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; }
.hours-now a { color: var(--accent); font-weight: 600; }
.hours-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--text-3, #aeaeb2); }
.is-open .hours-dot { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent); }
.is-closed .hours-dot { background: #ff453a; }
.is-unknown .hours-dot { display: none; }
.hours-list { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--sep); display: grid; gap: 8px; font-size: 15px; }
.hours-list li { display: flex; justify-content: space-between; gap: 12px; }
.hours-list li span:last-child { color: var(--text-2); text-align: right; }

/* ---------- Easter eggs (js/eggs.js) ---------- */
.about-app { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.about-logo .logo { width: 48px; height: 48px; display: block; filter: drop-shadow(0 4px 10px rgba(122, 0, 25, .25)); }
.about-app strong { display: block; font-size: 17px; }
.about-app .muted { display: block; font-size: 13px; }
.app-footer { margin: 36px 0 0; text-align: center; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.app-footer p { margin: 0; }
.app-footer .credit { margin: 0 0 2px; }
.version { font-size: 13px; color: var(--text-2); padding: 0; }
.app-footer a { color: var(--accent); }

/* ---------- Privacy Policy and Terms of Use (js/legal.js) ---------- */
.legal-intro { margin: 0; font-size: 17px; line-height: 1.45; }
.legal .group.padded { line-height: 1.45; }
.legal .group.padded ul { margin: 0 0 10px; padding-left: 20px; }
.legal .group.padded ul:last-child { margin-bottom: 0; }
.legal .group.padded li { margin: 4px 0; }

.egg-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.egg-rain span { position: absolute; top: -40px; animation: egg-fall var(--t) var(--d) cubic-bezier(.3, .1, .6, 1) both; }
@keyframes egg-fall { to { transform: translateY(calc(100vh + 80px)) rotate(var(--r)); } }

.egg-paws span { position: absolute; font-size: 26px; opacity: 0; animation: egg-paw 2.4s var(--d) ease-out both; }
@keyframes egg-paw { 0% { opacity: 0; transform: scale(.4) rotate(35deg); } 15%, 60% { opacity: 1; transform: scale(1) rotate(35deg); } 100% { opacity: 0; transform: scale(1) rotate(35deg); } }

.egg-shimmy { animation: egg-shimmy .55s ease-in-out; }
@keyframes egg-shimmy { 20% { transform: translateX(-10px); } 45% { transform: translateX(8px); } 70% { transform: translateX(-4px); } }
.egg-droop { animation: egg-droop 1s var(--ease-out); transform-origin: 50% 0; }
@keyframes egg-droop { 35% { transform: translateY(18px) scaleY(.96) rotate(-1deg); } 60% { transform: translateY(-4px); } }

/* Weather */
.weather-w { position: relative; overflow: hidden; }
.egg-frosty { background: linear-gradient(165deg, #8fb7d6, #3d5f7d); }
.egg-frosty::after {
  content: '❄'; position: absolute; right: 12px; top: 8px; font-size: 40px; line-height: 1; opacity: .4; pointer-events: none;
}
.egg-frosty { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45), inset 0 0 28px rgba(255, 255, 255, .5); }
.egg-sweaty #w-temp::after { content: '💦'; font-size: 22px; vertical-align: top; margin-left: 2px; }

/* Go Dogs mode */
.egg-go-dogs { --accent: #ffcc33; }
.egg-go-dogs body::before {
  content: ''; position: fixed; inset: 0; z-index: 35; pointer-events: none;
  background: linear-gradient(160deg, rgba(122, 0, 25, .28), rgba(255, 204, 51, .22));
  animation: egg-glow 10s ease-in-out both;
}
@keyframes egg-glow { 0%, 100% { opacity: 0; } 8%, 85% { opacity: 1; } }

/* Lake Mode */
#egg-waves { position: fixed; left: 0; right: 0; bottom: 0; height: 26vh; z-index: -1; pointer-events: none; overflow: hidden; }
.egg-wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; display: flex; animation: egg-wave 14s linear infinite; }
.egg-wave svg { width: 50%; height: 100%; fill: color-mix(in srgb, #2b7bb9 22%, transparent); }
.egg-wave.back { height: 82%; animation-duration: 22s; animation-direction: reverse; opacity: .7; }
@keyframes egg-wave { to { transform: translateX(-50%); } }

/* Slides across the screen: hockey puck on the tab bar, marathon runner */
.egg-slide span { position: absolute; left: 0; font-size: 26px; animation: egg-slide 3.6s cubic-bezier(.4, .1, .5, 1) both; }
.egg-slide:not(.egg-puck) span { top: calc(var(--safe-t) + var(--nav-h) + 6px); }
.egg-puck span {
  bottom: calc(var(--safe-b) + 14px); width: 22px; height: 9px; border-radius: 50%;
  background: #111; box-shadow: 0 2px 0 #444;
  animation-duration: 1.6s; animation-timing-function: cubic-bezier(.2, .7, .4, 1);
}
.egg-runner span { transform: scaleX(-1); }
@keyframes egg-slide { from { left: -40px; } to { left: calc(100% + 40px); } }

/* Bentleyville lights under the Home greeting */
.egg-lights { display: flex; gap: 10px; margin-top: 8px; }
.egg-lights span {
  width: 8px; height: 11px; border-radius: 50% 50% 45% 45%;
  background: hsl(calc(var(--i) * 67) 90% 58%); box-shadow: 0 0 8px hsl(calc(var(--i) * 67) 90% 58%);
  animation: egg-twinkle 2.4s calc(var(--i) * -0.37s) ease-in-out infinite alternate;
}
@keyframes egg-twinkle { from { opacity: .35; } to { opacity: 1; } }

/* April 1st: everything is walleye */
.egg-april .tile-icon > svg, .egg-april .hero-icon > svg { display: none; }
.egg-april .tile-icon::after, .egg-april .hero-icon::after { content: '🐟'; font-size: 24px; line-height: 1; }
.egg-april .app-tile .tile-icon::after { font-size: 32px; }
.egg-april .hero-icon::after { font-size: 40px; }

/* Fishing opener: Quick Access icons wiggle like they're on a hook */
.egg-opener .icon-grid .tile-icon { animation: egg-wiggle 1.2s calc(var(--i, 0) * .12s) ease-in-out 4; }
@keyframes egg-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg) translateY(2px); } 75% { transform: rotate(6deg) translateY(-1px); } }

@media (prefers-reduced-motion: reduce) {
  .egg-lights span, .egg-wave, .egg-opener .icon-grid .tile-icon { animation: none; }
}
