/* Swipe Clean: Material 3 Expressive shapes & motion on a WinUI 3 (Mica/Acrylic, Segoe) base */
/* Segoe UI where Windows has it installed; elsewhere Microsoft's open-source Segoe UI look-alike,
   Selawik (SIL Open Font License, see fonts/Selawik-LICENSE.txt) */
@font-face { font-family: "Selawik"; src: url("fonts/selawk.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Selawik"; src: url("fonts/selawksb.woff2") format("woff2"); font-weight: 500 650; font-display: swap; }
@font-face { font-family: "Selawik"; src: url("fonts/selawkb.woff2") format("woff2"); font-weight: 651 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0f1115;
  --mica-1: #1b2a44;
  --mica-2: #2a1d3a;
  --surface: rgba(32, 34, 40, .72);
  --surface-strong: #1d2027;
  --surface-hi: rgba(255, 255, 255, .06);
  --stroke: rgba(255, 255, 255, .08);
  --text: #f2f3f7;
  --text-2: #a9adb8;
  --accent: #4cc2ff;            /* Windows 11 accent */
  --on-accent: #00283d;
  --accent-tonal: rgba(76, 194, 255, .16);
  --accent-ink: var(--accent);
  --keep-ink: var(--keep);
  --del-ink: var(--del);
  --keep: #5fe3a1;
  --keep-tonal: rgba(95, 227, 161, .18);
  --del: #ff6b6b;
  --del-tonal: rgba(255, 107, 107, .18);
  --radius-xl: 32px;
  --radius-l: 24px;
  --radius-m: 16px;
  --spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017, 1.077 24.3%, 1.104, 1.111 29.9%, 1.1, 1.074 37.6%, 1.007 46.5%, .987 52%, .981, .985 63.6%, 1.002 79.7%, 1);
  --ease: cubic-bezier(.2, 0, 0, 1);
  --nav-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", "Selawik", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
/* Light theme (System/Light/Dark is chosen in Settings; JS sets data-theme). The blue theme color is the
   same in both modes; --accent-ink is the same hue, darkened only where it is used as text on light. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f6; --mica-1: #d6e8fb; --mica-2: #e8e2f6;
  --surface: rgba(255, 255, 255, .7); --surface-strong: #ffffff; --surface-hi: rgba(0, 0, 0, .045);
  --stroke: rgba(0, 0, 0, .08); --text: #15171c; --text-2: #5c6170;
  --accent-ink: #0b7cc0; --accent-tonal: rgba(76, 194, 255, .24);
  --keep-ink: #0f9a5c; --del-ink: #d64545;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: var(--app-h, 100%); background: var(--bg); color: var(--text); overflow: hidden; overscroll-behavior: none; }
body { -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
.ic { width: 22px; height: 22px; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 30px; height: 30px; }

/* Mica: soft, wallpaper-like tint behind everything */
.mica { position: fixed; inset: -20%; z-index: -1; filter: blur(60px); opacity: .9;
  background: radial-gradient(40% 35% at 15% 10%, var(--mica-1), transparent 70%),
              radial-gradient(45% 40% at 90% 85%, var(--mica-2), transparent 70%), var(--bg); }
.acrylic { background: var(--surface); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--stroke); }

/* --app-h is the real screen height (set from JS for iOS Home Screen apps, whose layout viewport
   comes up short by about the status bar height); everything is laid out from the top against it. */
.screen { position: fixed; top: 0; left: 0; right: 0; height: var(--app-h, 100dvh); display: flex; flex-direction: column; padding-top: var(--safe-t); }
#app .screen { height: calc(var(--app-h, 100dvh) - var(--nav-h) - var(--safe-b) - 8px); }

/* Sign in */
.signin { align-items: center; justify-content: center; padding: 24px; }
.signin-card { max-width: 380px; text-align: center; display: grid; gap: 16px; justify-items: center;
  animation: rise .7s var(--spring) both; }
.signin-logo { width: 96px; height: 96px; border-radius: 28px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.signin h1 { font-size: 34px; }
.signin p { color: var(--text-2); margin: 0; line-height: 1.45; }
.fine { font-size: 12.5px; color: var(--text-2); }

/* Buttons (Material 3 expressive: pill shapes that morph on press) */
.btn { border-radius: 999px; padding: 12px 22px; font-weight: 600; transition: transform .35s var(--spring), border-radius .3s var(--ease), background .2s; }
.btn:active { transform: scale(.96); border-radius: 14px; }
.btn-xl { width: 100%; padding: 16px 24px; font-size: 16px; }
.btn-filled { background: var(--accent); color: var(--on-accent); }
.btn-tonal { background: var(--accent-tonal); color: var(--accent-ink); }
.btn-outline { border: 1px solid var(--stroke); background: var(--surface-hi); }
.btn-danger { background: var(--del); color: #fff; }
.btn-text { color: var(--accent-ink); }

/* Top bars */
.topbar { margin: 10px 12px 0; padding: 10px 12px; border-radius: var(--radius-l); display: flex; align-items: center; gap: 12px; z-index: 5; }
.topbar-tall { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; }
.title { font-size: 28px; }
.subtitle { margin: 0; color: var(--text-2); font-size: 14px; }
.chip { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--accent-tonal); color: var(--accent-ink);
  font-weight: 600; max-width: 62%; transition: transform .35s var(--spring); }
.chip:active { transform: scale(.95); }
.chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-wrap { flex: 1; display: grid; gap: 4px; min-width: 0; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-hi); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--keep)); transition: width .5s var(--ease); }
.progress-text { font-size: 12px; color: var(--text-2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Card stage */
.stage { position: relative; flex: 1; margin: 12px 14px 0; }
.card { position: absolute; inset: 0; border-radius: var(--radius-xl); overflow: hidden; background: var(--surface-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 0 0 1px var(--stroke); touch-action: none; will-change: transform;
  transition: transform .55s var(--spring), opacity .3s; cursor: grab; }
.card.dragging { transition: none; cursor: grabbing; }
.card.behind { transform: scale(.94) translateY(14px); opacity: .7; pointer-events: none; }
.card.behind2 { transform: scale(.88) translateY(28px); opacity: .35; pointer-events: none; }
.card img, .card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
.card .meta { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; border-radius: var(--radius-m);
  background: rgba(10, 12, 16, .55); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: #fff; font-size: 13px;
  display: flex; justify-content: space-between; gap: 10px; }
.card .meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.card .meta span { opacity: .75; white-space: nowrap; }
.card .play { position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 26px;
  background: rgba(0, 0, 0, .45); backdrop-filter: blur(12px); display: grid; place-items: center; color: #fff; }
.stamp { position: absolute; top: 22px; padding: 8px 16px; border-radius: 14px; font-weight: 800; font-size: 20px; letter-spacing: .06em;
  opacity: 0; transform: scale(.8); transition: opacity .1s; border: 3px solid currentColor; background: rgba(0, 0, 0, .35); }
.stamp-keep { left: 20px; color: var(--keep); rotate: -12deg; }
.stamp-del { right: 20px; color: var(--del); rotate: 12deg; }
.card.fly-left { transform: translateX(-140%) rotate(-24deg) !important; opacity: 0; transition: transform .45s var(--ease), opacity .45s; }
.card.fly-right { transform: translateX(140%) rotate(24deg) !important; opacity: 0; transition: transform .45s var(--ease), opacity .45s; }

/* Action buttons */
.actions { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 16px 0 14px; }
.fab { display: grid; place-items: center; border-radius: 22px; transition: transform .45s var(--spring), border-radius .35s var(--ease), background .2s; }
.fab:active { transform: scale(.9); border-radius: 50%; }
.fab-sm { width: 52px; height: 52px; background: var(--surface); border: 1px solid var(--stroke); backdrop-filter: blur(20px); }
.fab-lg { width: 76px; height: 76px; border-radius: 28px; }
.fab-delete { background: var(--del-tonal); color: var(--del-ink); }
.fab-keep { background: var(--keep-tonal); color: var(--keep-ink); }
.fab:disabled { opacity: .35; }

.empty, .loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; }
.empty p { color: var(--text-2); margin: 0; max-width: 300px; }
.empty-badge { width: 84px; height: 84px; border-radius: 30px; background: var(--keep-tonal); color: var(--keep); display: grid; place-items: center;
  animation: pop .8s var(--spring) both; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--accent-tonal); border-top-color: var(--accent-ink); animation: spin .9s linear infinite; }

/* Bottom navigation (Material 3 nav bar with pill indicator, acrylic surface) */
.bottom-nav { position: fixed; left: 10px; right: 10px; top: calc(var(--app-h, 100dvh) - var(--nav-h) - var(--safe-b) - 8px); height: var(--nav-h); border-radius: 28px;
  display: flex; justify-content: space-around; align-items: center; z-index: 20; }
.nav-item { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); flex: 1; }
.nav-item .pill { position: relative; width: 60px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background .3s var(--ease), width .45s var(--spring); }
.nav-item.active { color: var(--text); }
.nav-item.active .pill { background: var(--accent-tonal); color: var(--accent-ink); width: 64px; }
.badge { position: absolute; top: -4px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--del); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; }

/* Lists */
.list-wrap { flex: 1; overflow-y: auto; padding: 12px 12px 24px; -webkit-overflow-scrolling: touch; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-m); background: var(--surface);
  border: 1px solid var(--stroke); cursor: pointer; transition: transform .35s var(--spring), border-radius .3s var(--ease); }
.list li:active { transform: scale(.98); border-radius: 24px; }
.list li .ic { color: var(--accent-ink); }
.list li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.list li small { color: var(--text-2); white-space: nowrap; }
.list-compact li { padding: 12px 14px; }
.segmented { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button { padding: 8px 14px; border-radius: 999px; background: var(--surface-hi); white-space: nowrap; font-weight: 600; font-size: 13.5px;
  transition: background .2s, transform .35s var(--spring); }
.segmented button.on { background: var(--accent); color: var(--on-accent); }
.crumbs { display: flex; flex-wrap: wrap; gap: 2px; font-size: 13px; color: var(--text-2); }
.crumbs button { padding: 4px 6px; border-radius: 8px; color: var(--text-2); }
.crumbs button:last-child { color: var(--text); font-weight: 600; }
.review-here { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; border-radius: var(--radius-l);
  background: var(--accent); color: var(--on-accent); text-align: left; transition: transform .4s var(--spring), border-radius .3s; }
.review-here:active { transform: scale(.98); border-radius: 18px; }
.rh-icon { width: 40px; height: 40px; border-radius: 14px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }
.rh-text { flex: 1; display: grid; }
.rh-text small { opacity: .8; }

/* Review bin grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-strong); animation: pop .5s var(--spring) both; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile button { position: absolute; right: 6px; bottom: 6px; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(10px); }
.bin-footer { margin-top: 18px; display: grid; gap: 8px; text-align: center; }

/* Settings */
.card-group { border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--stroke); margin-bottom: 14px; overflow: hidden; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--stroke); }
.row:last-child { border-bottom: 0; }
.row span { color: var(--text-2); }
.row small { color: var(--text-2); text-align: right; }
.toggle input { display: none; }
.toggle i { width: 52px; height: 32px; border-radius: 16px; background: var(--surface-hi); border: 2px solid var(--text-2); position: relative; transition: background .2s; }
.toggle i::after { content: ""; position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2);
  transition: all .4s var(--spring); }
.toggle input:checked + i { background: var(--accent); border-color: var(--accent-ink); }
.toggle input:checked + i::after { left: 24px; top: 2px; width: 24px; height: 24px; background: var(--on-accent); }

/* Sheets, dialogs, viewer, toast */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 40; display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s both; }
.sheet { width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; border-radius: 32px 32px 0 0; padding: 10px 16px calc(20px + var(--safe-b));
  display: grid; gap: 12px; animation: slideup .55s var(--spring) both; }
.sheet h2 { font-size: 22px; }
.sheet h3 { font-size: 13px; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--text-2); opacity: .5; justify-self: center; }
#dialog { align-items: center; }
.dialog { width: min(92vw, 400px); border-radius: 28px; padding: 24px; display: grid; gap: 12px; animation: pop .45s var(--spring) both; }
.dialog p { margin: 0; color: var(--text-2); line-height: 1.45; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.viewer { position: fixed; inset: 0; z-index: 50; background: #000; display: grid; grid-template-rows: 1fr auto; animation: fade .2s both; }
.viewer-media { position: relative; overflow: hidden; }
.viewer-media img, .viewer-media video { width: 100%; height: 100%; object-fit: contain; }
.viewer-close { position: absolute; top: calc(12px + var(--safe-t)); right: 12px; z-index: 2; }
.viewer-info { margin: 0 12px calc(12px + var(--safe-b)); border-radius: var(--radius-l); padding: 14px 16px; font-size: 13.5px; display: grid; gap: 4px; }
.viewer-info b { font-size: 15px; word-break: break-all; }
.viewer-info span { color: var(--text-2); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 108px); transform: translateX(-50%); z-index: 60; padding: 12px 18px;
  border-radius: 16px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; animation: rise .45s var(--spring) both;
  max-width: 90vw; text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translate(var(--tx, 0), 24px); } }
.toast { --tx: -50%; }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
@keyframes slideup { from { transform: translateY(100%); } }

/* Desktop: center the phone-like column, keep the same app feel; the swipe view gets a wide stage
   where each card takes its photo's shape (set from JS) and fills without black bars. */
@media (min-width: 760px) {
  .screen, .bottom-nav { max-width: 560px; margin-left: auto; margin-right: auto; }
  #tab-swipe.screen { max-width: 1200px; }
  #tab-swipe .topbar { width: min(560px, calc(100% - 24px)); align-self: center; }
  .stage { margin: 16px 24px 0; }
  .card.shaped { transition: transform .55s var(--spring), opacity .3s, width .35s var(--ease), height .35s var(--ease), left .35s var(--ease), top .35s var(--ease); }
  .card.shaped img { object-fit: cover; }
  .card.shaped.dragging { transition: none; }
  .bottom-nav { left: 0; right: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* WinUI 3 style: outline icon normally, filled icon on the selected tab */
.nav-item .ic-on { display: none; }
.nav-item.active .ic-on { display: block; }
.nav-item.active .ic-off { display: none; }

/* Tap animations (Material 3 Expressive springs). JS adds .anim to the tapped button. */
.nav-item .pill > .ic, .nav-item .trash, .fab .ic { transform-origin: 50% 50%; }
.nav-item.anim[data-go="swipe"] .pill > .ic { animation: shuffle .6s var(--ease); }
.nav-item.anim[data-go="settings"] .pill > .ic { animation: gear .7s var(--spring); }

.trash { position: relative; width: 22px; height: 22px; display: block; }
.trash.ic-on { display: none; }
.nav-item.active .trash.ic-on { display: block; }
.nav-item.active .trash.ic-off { display: none; }
.trash .ic { position: absolute; inset: 0; }
.trash .body { clip-path: inset(29% 0 0 0); }
.trash .lid { clip-path: inset(0 0 71% 0); transform-origin: 18% 27%; }

#act-keep.anim .ic { animation: beat .55s var(--spring); }
#act-delete.anim .ic { animation: twist .45s var(--spring); }
#act-undo.anim .ic { animation: rewind .55s var(--spring); }
#act-info.anim .ic { animation: bounce .5s var(--spring); }

@keyframes shuffle {
  20% { transform: translateX(-3px) rotate(-12deg); }
  45% { transform: translateX(3px) rotate(10deg); }
  70% { transform: translateX(-1px) rotate(-4deg); }
}
@keyframes gear { from { transform: rotate(0); } to { transform: rotate(120deg); } }
@keyframes beat { 30% { transform: scale(1.3); } 55% { transform: scale(.92); } 75% { transform: scale(1.1); } }
@keyframes twist { 40% { transform: rotate(90deg) scale(.85); } }
@keyframes rewind { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
@keyframes bounce { 35% { transform: translateY(-5px); } 65% { transform: translateY(1px); } }

/* Folder: tilts to the side as it opens (cross-fading to the open folder), holds, then rights itself */
.folder { position: relative; width: 22px; height: 22px; display: block; transform-origin: 50% 80%; }
.folder.ic-on { display: none; }
.nav-item.active .folder.ic-on { display: block; }
.nav-item.active .folder.ic-off { display: none; }
.folder .ic { position: absolute; inset: 0; }
.folder .front { display: none; }
.folder .open { opacity: 0; }
.nav-item.anim[data-go="folders"] .folder { animation: folder-tilt .9s cubic-bezier(.33, 0, .2, 1); }
.nav-item.anim[data-go="folders"] .folder .back { animation: folder-closed .9s ease-in-out; }
.nav-item.anim[data-go="folders"] .folder .open { animation: folder-opened .9s ease-in-out; }
@keyframes folder-tilt {
  0% { transform: none; }
  35%, 68% { transform: rotate(-14deg) translateX(-1px) scale(1.06); }
  100% { transform: none; }
}
@keyframes folder-closed { 0%, 39% { opacity: 1; } 40%, 71% { opacity: 0; } 72%, 100% { opacity: 1; } }
@keyframes folder-opened { 0%, 16% { opacity: 0; } 38%, 72% { opacity: 1; } 94%, 100% { opacity: 0; } }

/* Trash: lid eases up and tilts back, holds, then eases shut; the can dips slightly with it */
.nav-item.anim[data-go="bin"] .trash .lid { animation: lid .9s cubic-bezier(.33, 0, .2, 1); }
.nav-item.anim[data-go="bin"] .trash .body { animation: bin-dip .9s ease-in-out; }
@keyframes lid {
  0% { transform: none; }
  35% { transform: translate(-.5px, -2.5px) rotate(-26deg); }
  65% { transform: translate(-.5px, -2.5px) rotate(-24deg); }
  100% { transform: none; }
}
@keyframes bin-dip { 0%, 100% { transform: none; } 35%, 65% { transform: translateY(.6px); } }

/* Glass navigation bar: content scrolls underneath it */
#app .screen { height: var(--app-h, 100dvh); }
#tab-swipe { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px); }
.list-wrap { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 28px); }
.bottom-nav { background: rgba(38, 42, 52, .42); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 12px 32px rgba(0, 0, 0, .35); }
:root[data-theme="light"] {
  .bottom-nav { background: rgba(255, 255, 255, .5); border-color: rgba(0, 0, 0, .06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 12px 32px rgba(0, 0, 0, .12); }
}

/* One highlight pill that slides (and stretches a little) to the tapped tab */
.nav-item { position: relative; z-index: 1; }
.nav-item.active .pill { background: none; }
.nav-indicator { position: absolute; left: 0; top: 0; width: 64px; height: 32px; border-radius: 16px; background: none;
  pointer-events: none; z-index: 0; transition: transform .6s var(--spring); background: none; }
.nav-indicator.instant { transition: none; }
.nav-indicator i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--accent-tonal); }
.nav-indicator.moving i { animation: stretch .45s var(--ease); }
@keyframes stretch { 40% { transform: scaleX(1.35); } }

/* Subtle progress: quiet counter + hairline under the top bar */
#tab-swipe .topbar { position: relative; overflow: hidden; }
.progress-wrap { display: flex; justify-content: flex-end; }
.progress { position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; border-radius: 2px; background: transparent; }
.progress-bar { background: var(--accent); opacity: .85; }
.progress-text { font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: .01em; opacity: .8; }
.segmented.wide { padding: 4px; border-radius: 999px; background: var(--surface-hi); }
.segmented.wide button { flex: 1; background: none; }
.segmented.wide button.on { background: var(--accent); color: var(--on-accent); }
#theme-seg { flex: 1; }
