/* App screens on the landing page.

   Each phone is an HTML copy of a real Gallery screen, built from the
   app's own sources: colours from lib/theme/ (Midnight palette, dark by
   default), the type scale of AppTypography (system font, weights
   400/500/600), the spacing grid of AppSpacing, the copy of each screen and
   its Material icons. A screen is drawn at phone size (360 × 780 dp, one
   CSS px per dp) and scaled with `zoom`, so every size below reads as dp.

   Icons: the Flutter SDK's MaterialIcons font (CC BY 4.0, credited in the footer), cut down to the
   glyphs these pages use — tool/subset_website_icons.py. Glyphs are written
   by the same code points as `Icons.*` in the app.

   The logo is never drawn here: the site shows it only from icon.png, so a
   new logo is a file swap (README.md). */

@font-face {
  font-family: "Gallery Icons";
  src: url("fonts/app-icons.woff2") format("woff2");
  font-display: block;
}

/* ── Phone frame ─────────────────────────────────────────── */

.phone {
  --z: 0.74;
  zoom: var(--z);
  flex: none;
  width: 380px;
  padding: 10px;
  border-radius: 54px;
  background: #0b0b0f;
  box-shadow:
    inset 0 0 0 2px #2b2b33,
    0 40px 70px -20px rgb(12 12 40 / 0.45),
    0 18px 30px -18px rgb(12 12 40 / 0.4);
}

.phone.lg {
  --z: 0.82;
}

@media (max-width: 420px) {
  .phone {
    --z: 0.66;
  }
}

.screen {
  /* AppColors, Midnight, dark (the app's default). */
  --bg: #000000;
  --surface: #0a0a12;
  --raised: #14141f;
  --raised-94: rgb(20 20 31 / 0.94);
  --high: #1d1d21;
  --border: #24253a;
  --accent: #8f73ff;
  --on-accent: #ffffff;
  --t1: #f7f7f9;
  --t2: #9c9ca6;
  --t3: #6a6a74;
  --tint: rgb(247 247 249 / 0.14);
  --placeholder: #121216;

  position: relative;
  display: flex;
  flex-direction: column;
  width: 360px;
  height: 780px;
  overflow: hidden;
  border-radius: 44px;
  background: var(--bg);
  color: var(--t1);
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: left;
  user-select: none;
}

.screen.light {
  --bg: #fcfcff;
  --surface: #f3f3fa;
  --raised: #ffffff;
  --raised-94: rgb(255 255 255 / 0.94);
  --high: #ececf1;
  --border: #dfdfec;
  --accent: #5b3fe0;
  --t1: #0e0e11;
  --t2: #57575f;
  --t3: #8a8a94;
  --tint: rgb(14 14 17 / 0.08);
  --placeholder: #eaeaef;
}

.screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--placeholder);
}

/* Front camera. */
.screen::before {
  content: "";
  position: absolute;
  z-index: 5;
  top: 9px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: #050507;
  box-shadow: inset 0 0 0 2px #15151c;
}

/* ── System bars ─────────────────────────────────────────── */

.sb {
  position: relative;
  z-index: 4;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 22px 0 26px;
  font-size: 13px;
  font-weight: 500;
}

.sb .i {
  font-size: 15px;
  margin-left: 3px;
}

.gest {
  position: relative;
  z-index: 4;
  flex: none;
  height: 18px;
  background: var(--surface);
}

.gest::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 108px;
  height: 4px;
  margin-left: -54px;
  border-radius: 2px;
  background: var(--t1);
  opacity: 0.55;
}

.gest.clear {
  background: transparent;
}

.screen.black .gest,
.screen.black .sb {
  color: #ffffff;
}

.screen.black .gest::after {
  background: #ffffff;
}

/* ── Icons ───────────────────────────────────────────────── */

.i {
  display: inline-block;
  width: 1em;
  height: 1em;
  font-family: "Gallery Icons";
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
  overflow: hidden;
  flex: none;
}

.s12 { font-size: 12px; }
.s13 { font-size: 13px; }
.s14 { font-size: 14px; }
.s16 { font-size: 16px; }
.s18 { font-size: 18px; }
.s22 { font-size: 22px; }
.s26 { font-size: 26px; }
.s36 { font-size: 36px; }
.s40 { font-size: 40px; }
.s44 { font-size: 44px; }
.s48 { font-size: 48px; }

.acc { color: var(--accent); }
.mut { color: var(--t2); }
.red { color: #ff4d4f; }
.amber { color: #ffb020; }
.wh { color: #ffffff; }

/* ── Type (AppTypography) ────────────────────────────────── */

.t-title { font-size: 22px; font-weight: 600; }
.t-head { font-size: 18px; font-weight: 600; }
.t-ts { font-size: 15px; font-weight: 500; }
.t-body { font-size: 15px; }
.t-small { font-size: 13px; color: var(--t2); }
.t-label { font-size: 13px; font-weight: 500; }
.t-cap { font-size: 11px; font-weight: 500; color: var(--t2); }
.t-over { color: #ffffff; text-shadow: 0 1px 3px rgb(0 0 0 / 0.5); }

/* ── Bars ────────────────────────────────────────────────── */

.top {
  flex: none;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 4px 0 16px;
}

.appbar {
  flex: none;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 8px 0 4px;
  gap: 4px;
}

.appbar .t-title {
  margin-left: 4px;
}

.sp {
  flex: 1;
}

.btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.txtbtn {
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.fill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 500;
}

.pro {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  vertical-align: 3px;
}

.body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* NavigationBar: Photos · Albums · For You · Search. */
.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 64px;
  background: var(--surface);
}

.tabbar span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
}

.tabbar .on {
  color: var(--accent);
  font-weight: 600;
}

/* The Photos tab's view switch, and the vault's type filter. */
.pill {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--raised-94);
  border: 1px solid var(--border);
}

.pill span {
  flex: 1;
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  white-space: nowrap;
}

.pill .on {
  background: var(--tint);
  color: var(--t1);
  font-weight: 600;
}

.pill.float {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  z-index: 3;
}

.pill.small {
  height: 40px;
  margin: 4px 12px 8px;
}

.pill.small span {
  height: 32px;
}

.fab {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 76px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--raised);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.5);
}

.scrub {
  position: absolute;
  z-index: 3;
  right: 4px;
  top: 150px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scrub b {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 600;
}

.scrub span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}

/* ── Grids ───────────────────────────────────────────────── */

.g3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.g3 > * {
  position: relative;
  aspect-ratio: 1;
}

.dh {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
}

/* All Photos, "Large": a 6-column cell grid, 7 photos per cycle. */
.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 58.33px;
  gap: 2px;
}

.mosaic > * {
  position: relative;
}

.w6h4 { grid-column: span 6; grid-row: span 4; }
.w2h2 { grid-column: span 2; grid-row: span 2; }
.w4h4 { grid-column: span 4; grid-row: span 4; }

/* Video badge and favourite heart on a tile. */
.vb {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 1px 6px 1px 3px;
  border-radius: 8px;
  background: rgb(0 0 0 / 0.6);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
}

.fv {
  position: absolute;
  left: 5px;
  bottom: 4px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.5);
}

/* ── Albums ──────────────────────────────────────────────── */

.head-row {
  display: flex;
  align-items: center;
  padding: 12px 4px 8px 16px;
}

.shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 24px;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px;
  border-radius: 20px;
  background: var(--raised);
  border: 1px solid var(--border);
}

.shortcut .dot {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.shortcut strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.shortcut small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--t2);
}

.hue-blue .dot { background: rgb(78 168 245 / 0.18); color: #4ea8f5; }
.hue-red .dot { background: rgb(255 90 100 / 0.18); color: #ff5a64; }
.hue-green .dot { background: rgb(76 195 138 / 0.18); color: #4cc38a; }
.hue-amber .dot { background: rgb(255 181 71 / 0.18); color: #ffb547; }

.albums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 12px;
  padding: 0 16px;
}

.cover {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
}

.cover.quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.cover .badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgb(0 0 0 / 0.6);
  color: #ffffff;
}

.cover.trash {
  display: grid;
  place-items: center;
  background: var(--high);
  color: var(--t2);
}

.album-name {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── For You ─────────────────────────────────────────────── */

.sec {
  padding: 24px 16px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--t2);
}

.row {
  display: flex;
  gap: 12px;
  padding: 0 16px;
}

.memory {
  position: relative;
  flex: none;
  width: 288px;
  aspect-ratio: 0.8;
  overflow: hidden;
  border-radius: 20px;
}

.scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgb(0 0 0 / 0.7));
}

.cap {
  position: absolute;
  z-index: 1;
  left: 16px;
  bottom: 16px;
  color: #ffffff;
}

.cap strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
}

.rediscover {
  position: relative;
  flex: none;
  width: 120px;
  height: 160px;
  overflow: hidden;
  border-radius: 12px;
}

.rediscover .cap {
  left: 8px;
  bottom: 8px;
  font-size: 13px;
}

.rediscover .cap strong {
  font-size: 15px;
}

/* ── Full-screen media (story, viewer) ───────────────────── */

.screen.black {
  background: #000000;
}

.media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.media img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: none;
}

.fade-top,
.fade-bottom {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  color: #ffffff;
}

.fade-top {
  top: 0;
  padding-top: 30px;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.6), transparent);
}

.fade-bottom {
  bottom: 0;
  background: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.8));
}

.bars {
  display: flex;
  gap: 4px;
  padding: 12px 8px 4px;
}

.bars span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.35);
}

.bars .done {
  background: #ffffff;
}

.bars .half {
  background: linear-gradient(90deg, #ffffff 45%, rgb(255 255 255 / 0.35) 45%);
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-items: center;
  padding: 4px 0;
}

/* ── Search ──────────────────────────────────────────────── */

.searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  margin: 8px 16px 4px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--raised);
  font-size: 15px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.chip.on {
  background: rgb(143 115 255 / 0.16);
  border-color: transparent;
  color: var(--accent);
}

.tag {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgb(0 0 0 / 0.6);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
}

.note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px 8px 24px;
  font-size: 13px;
  color: var(--t2);
}

.note b {
  flex: none;
  font-weight: 600;
  color: var(--accent);
}

/* ── Editor (always dark) ────────────────────────────────── */

.editor {
  --panel: #111114;
  --t1: #f2f2f5;
  --t2: #9a9aa3;
}

.edit-photo {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
}

.edit-photo img {
  width: auto;
  max-width: 100%;
  height: 100%;
  background: none;
}

.round-btn {
  position: absolute;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgb(28 28 33 / 0.8);
  color: #ffffff;
}

.round-btn.left { left: 24px; }
.round-btn.right { right: 24px; }

.panel {
  flex: none;
  background: var(--panel);
}

.slider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 4px;
  font-size: 13px;
  color: var(--t2);
}

.slider .track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.18);
}

.slider .track::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 70%;
  border-radius: 2px;
  background: var(--accent);
}

.slider .track::after {
  content: "";
  position: absolute;
  left: 70%;
  top: -8px;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: var(--accent);
}

.filters {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

.filters figure {
  flex: none;
  width: 72px;
  margin: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--t1);
}

.filters img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  margin-bottom: 6px;
}

.filters .on img {
  box-shadow: 0 0 0 2.5px var(--accent);
}

.filters .on {
  color: var(--accent);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 4px;
  font-size: 15px;
  font-weight: 600;
}

/* Filter looks (the app runs shaders; these are close CSS stand-ins). */
.f-vivid { filter: saturate(1.45) contrast(1.06); }
.f-warm { filter: sepia(0.28) saturate(1.25) brightness(1.03); }
.f-cool { filter: saturate(1.05) hue-rotate(12deg) brightness(1.03); }
.f-mono { filter: grayscale(1); }
.f-noir { filter: grayscale(1) contrast(1.45) brightness(0.92); }
.f-sepia { filter: sepia(0.85); }

/* ── Collage ─────────────────────────────────────────────── */

.collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  width: 280px;
  height: 280px;
  margin: 14px auto;
  padding: 6px;
  background: #ffffff;
}

.collage > div {
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
}

.collage .tall {
  grid-row: span 2;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 16px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--t2);
}

.tabs .on {
  position: relative;
  color: var(--accent);
}

.tabs .on::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 40px;
  height: 2px;
  margin-left: -20px;
  background: var(--accent);
}

.chips {
  display: flex;
  gap: 8px;
  padding: 16px 16px 10px;
  overflow: hidden;
}

.layouts {
  display: flex;
  gap: 10px;
  padding: 2px 16px 12px;
}

.layout {
  flex: none;
  display: grid;
  gap: 3px;
  width: 52px;
  height: 52px;
  padding: 5px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.layout i {
  border: 1.5px solid var(--t3);
  border-radius: 2px;
}

.layout.on {
  border: 2px solid var(--accent);
}

.layout.on i {
  border-color: rgb(143 115 255 / 0.7);
}

.l-2x2 { grid-template: 1fr 1fr / 1fr 1fr; }
.l-1-2 { grid-template: 1fr 1fr / 1fr 1fr; }
.l-1-2 i:first-child { grid-row: span 2; }
.l-3 { grid-template: 1fr / 1fr 1fr 1fr; }
.l-2 { grid-template: 1fr 1fr / 1fr; }
.l-top { grid-template: 1fr 1fr / 1fr 1fr; }
.l-top i:first-child { grid-column: span 2; }

.toolbar {
  flex: none;
  display: flex;
  justify-content: space-around;
  height: 64px;
  border-top: 1px solid var(--border);
}

.toolbar span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 46px;
  font-size: 11px;
  font-weight: 500;
  color: var(--t2);
}

.toolbar .on {
  color: var(--t1);
}

.toolbar .on .i {
  color: var(--accent);
}

/* ── Trim ────────────────────────────────────────────────── */

.trim-video {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trim-video img {
  width: auto;
  height: 100%;
  background: none;
}

.play {
  position: absolute;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.45);
  color: #ffffff;
}

.trim-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  height: 56px;
  margin: 8px 40px 24px;
}

.strip img {
  height: 56px;
}

.strip .dim {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgb(0 0 0 / 0.54);
}

.strip .dim.a { left: 0; width: 14%; }
.strip .dim.b { right: 0; width: 24%; }

.strip .keep {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14%;
  right: 24%;
  border-top: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
}

.strip .h {
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 16px;
  background: var(--accent);
  color: var(--on-accent);
}

.strip .h.a { left: calc(14% - 16px); border-radius: 6px 0 0 6px; }
.strip .h.b { right: calc(24% - 16px); border-radius: 0 6px 6px 0; }

.strip .head {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 41%;
  width: 2px;
  background: #ffffff;
}

/* ── Vault lock ──────────────────────────────────────────── */

.lock {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 64px;
  color: #ffffff;
}

.dots {
  display: flex;
  gap: 16px;
  margin: 28px 0 0;
}

.dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgb(255 255 255 / 0.38);
}

.dots .on {
  border-color: var(--accent);
  background: var(--accent);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  justify-content: space-between;
  row-gap: 20px;
  width: 100%;
  margin-top: auto;
  padding: 0 40px 36px;
  font-size: 26px;
  font-weight: 500;
}

.keypad span {
  display: grid;
  place-items: center;
  height: 72px;
}

/* ── Clean up ────────────────────────────────────────────── */

.dup-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--accent);
  vertical-align: middle;
}

.switch::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
}

.switch.off {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--t3);
}

.switch.off::after {
  right: auto;
  left: 5px;
  width: 14px;
  height: 14px;
  top: 6px;
  background: var(--t3);
}

.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 4px 16px;
}

.box {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  border: 1.5px solid #bdbdbd;
  background: rgb(0 0 0 / 0.38);
  color: #ffffff;
}

.box.on {
  border-color: var(--accent);
  background: var(--accent);
}

.dup {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 0 16px;
}

.dup > * {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
}

.dup .box {
  position: absolute;
  right: 8px;
  bottom: 8px;
}

.dup .picked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: rgb(0 0 0 / 0.35);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.dup .picked .box {
  z-index: 1;
}

.best {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgb(0 0 0 / 0.6);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
}

.delete-bar {
  flex: none;
  padding: 8px 16px 12px;
}

.delete-bar .fill-btn {
  width: 100%;
  height: 48px;
  font-size: 15px;
}

/* ── Settings ────────────────────────────────────────────── */

.set-title {
  padding: 24px 28px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}

.set-card {
  margin: 0 12px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--raised);
  border: 1px solid var(--border);
}

.set-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 8px 16px;
}

.set-row + .set-row {
  border-top: 1px solid var(--border);
}

.set-row > div {
  flex: 1;
}

.set-row small {
  display: block;
  font-size: 13px;
  color: var(--t2);
}

.set-row small.acc {
  color: var(--accent);
}

.palettes {
  display: flex;
  gap: 12px;
  padding: 4px 16px 14px;
  overflow: hidden;
}

.palettes figure {
  flex: none;
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: var(--t1);
}

.swatch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  width: 64px;
  height: 72px;
  margin-bottom: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.swatch i {
  height: 30px;
  border-radius: 4px;
}

.swatch b {
  width: 22px;
  height: 6px;
  border-radius: 3px;
}

.palettes .on .swatch {
  border: 2px solid var(--accent);
}

.palettes .on {
  font-weight: 600;
}

.sw-midnight { background: #fcfcfd; }
.sw-midnight i { background: #f4f4f7; }
.sw-midnight b { background: #5b3fe0; }
.sw-graphite { background: #fdfcfa; }
.sw-graphite i { background: #f5f3ef; }
.sw-graphite b { background: #ffb020; }
.sw-ocean { background: #fafdfd; }
.sw-ocean i { background: #eff6f7; }
.sw-ocean b { background: #32d2c8; }
.sw-rose { background: #fffcfc; }
.sw-rose i { background: #f9f0f2; }
.sw-rose b { background: #ff6b8a; }
.sw-mono { background: #ffffff; }
.sw-mono i { background: #f2f2f2; }
.sw-mono b { background: #1a1a1e; }
.sw-paper { background: #fbf9f5; }
.sw-paper i { background: #f3f0ea; }
.sw-paper b { background: #3d5afe; }

/* ── Where phones sit on the page ────────────────────────── */

.phones {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Two or three phones: side by side on wide screens, a sideways strip on
   narrow ones (the strip scrolls, never the page). */
@media (max-width: 899px) {
  .phones.many {
    justify-content: flex-start;
    margin: 0 calc(-1 * var(--gutter));
    padding: 8px var(--gutter) 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
  }

  .phones.many .phone {
    scroll-snap-align: start;
  }
}

/* ── Screen parts used once ──────────────────────────────── */

.sb.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  color: #ffffff;
}

.top.tall {
  height: 56px;
  padding-left: 4px;
}

.top.tall .t-title {
  margin-left: 4px;
}

.head-row.pad {
  padding: 16px;
}

.sec.first {
  padding-top: 4px;
}

.sec small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
}

/* Months: year heading, then 2 columns of 3:4 cards. */
.year {
  padding: 16px 16px 8px;
  font-size: 18px;
  font-weight: 600;
}

.months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}

.month {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
}

.month::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, transparent 55%, rgb(0 0 0 / 0.7));
}

.month span {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 9px;
  font-size: 18px;
  font-weight: 600;
}

.viewer-date {
  display: flex;
  flex-direction: column;
  margin-left: 4px;
  line-height: 1.25;
}

.viewer-date b {
  font-size: 15px;
  font-weight: 500;
}

.viewer-date small {
  font-size: 13px;
  color: rgb(255 255 255 / 0.75);
}

.story-head {
  display: flex;
  align-items: center;
  padding: 8px 4px 8px 16px;
}

.story-head > div {
  flex: 1;
}

.story-head b {
  display: block;
  font-size: 18px;
  font-weight: 600;
}

.story-head small {
  font-size: 13px;
}

.story-foot {
  display: flex;
  align-items: center;
  padding: 4px 4px 8px;
}

.story-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
}

.note-line {
  margin: 0;
  padding: 8px 24px 4px;
  font-size: 13px;
  color: var(--t2);
}

.ai-grid {
  padding: 4px;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 0 12px 0 16px;
}

.list-row.small {
  min-height: 36px;
}

.panel-light {
  flex: none;
}

.dim-wh {
  color: rgb(255 255 255 / 0.7);
}

.lock-title {
  margin-top: 16px;
}

.t-cap .switch {
  margin-left: 10px;
}

/* ── Live demos (assets/site.js) ─────────────────────────────
   The phones in the Explore stage and the hero are interactive. Their
   controls are real buttons and inputs; everything else stays a drawing. */

.screen button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.screen button:focus-visible,
.screen input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.screen {
  transition: background-color 0.4s, color 0.4s;
}

.layer {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  scrollbar-width: none;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s, visibility 0s 0s;
}

.layer::-webkit-scrollbar,
.pv::-webkit-scrollbar,
.sx-chips::-webkit-scrollbar,
.filters::-webkit-scrollbar,
.palettes::-webkit-scrollbar {
  display: none;
}

.layer:not(.is-on) {
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s, visibility 0s 0.5s;
}

.js .layer:not(.is-on) {
  opacity: 0;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
}

.pop {
  animation: pop-in 0.45s cubic-bezier(0.22, 1.3, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

/* Hero: a tapped tile opens the viewer. */
.tile {
  position: relative;
  display: block;
  overflow: hidden;
}

.tile img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.tile:hover img {
  transform: scale(1.05);
}

.tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--t2);
}

.tabbar button.on {
  color: var(--accent);
  font-weight: 600;
}

.hv {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: rgb(0 0 0 / 1);
  color: #ffffff;
  transition: background-color 0.3s;
}

.hv[hidden] {
  display: none;
}

.hv.closing {
  background: rgb(0 0 0 / 0);
}

.hv-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hv-media img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: none;
  transform-origin: 0 0;
}

.hv .fade-top,
.hv .fade-bottom {
  transition: opacity 0.3s;
}

.hv.closing .fade-top,
.hv.closing .fade-bottom,
.hv.opening .fade-top,
.hv.opening .fade-bottom {
  opacity: 0;
}

.heart[aria-pressed="true"] {
  color: #ff4d4f;
}

.heart[aria-pressed="true"] .i {
  animation: heart-pop 0.5s cubic-bezier(0.22, 1.6, 0.36, 1);
}

@keyframes heart-pop {
  40% {
    transform: scale(1.45);
  }
}

/* Photos: four views, pinch for columns. */
.pv {
  position: absolute;
  inset: 0;
  padding-bottom: 80px;
  overflow-y: auto;
  scrollbar-width: none;
  touch-action: pan-y;
  transition: opacity 0.35s, transform 0.5s cubic-bezier(0.22, 1.2, 0.36, 1), visibility 0s;
}

.pv:not(.is-on) {
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.94);
  transition: opacity 0.25s, transform 0.4s, visibility 0s 0.4s;
}

.js .pv:not(.is-on) {
  opacity: 0;
}

.pv.from-big:not(.is-on) {
  transform: scale(1.06);
}

.pg {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 2px;
}

.pg > * {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.years {
  display: grid;
  gap: 12px;
  padding: 4px 16px;
}

.yr {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
}

.yr::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgb(0 0 0 / 0.6));
}

.yr span {
  position: absolute;
  z-index: 1;
  left: 16px;
  bottom: 10px;
  font-size: 28px;
  font-weight: 600;
}

.zoom-ctl {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 72px;
  display: flex;
  gap: 8px;
  transition: opacity 0.3s, transform 0.3s;
}

.screen:not([data-cur="days"]) .zoom-ctl {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.zoom-ctl button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--raised-94);
  border: 1px solid var(--border);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.4);
}

.zoom-ctl button:disabled {
  opacity: 0.35;
  cursor: default;
}

.pill button {
  flex: 1;
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  white-space: nowrap;
  text-align: center;
  transition: background-color 0.3s, color 0.3s;
}

.pill button.on {
  background: var(--tint);
  color: var(--t1);
  font-weight: 600;
}

.pill.small button {
  height: 32px;
}

/* Albums. */
.al-home:not(.is-on) {
  transform: translateX(-22%);
}

.al-page:not(.is-on) {
  transform: translateX(100%);
}

.al-page {
  background: var(--bg);
}

.shortcut {
  text-align: left;
  transition: transform 0.3s cubic-bezier(0.22, 1.3, 0.36, 1);
}

.shortcut:active,
.albums button:active {
  transform: scale(0.96);
}

.albums .cover {
  display: block;
}

.albums button {
  display: block;
  min-width: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1.3, 0.36, 1);
}

.albums .album-name,
.albums .t-cap {
  display: block;
}

.al-title {
  display: grid;
  margin-left: 4px;
  line-height: 1.2;
}

.al-grid > div {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

/* Viewer: swipe, double-tap zoom, bars on tap. */
.vw-track {
  position: absolute;
  inset: 0;
  display: flex;
  touch-action: pan-y;
  cursor: grab;
  will-change: transform;
}

.vw-track.dragging {
  cursor: grabbing;
}

.vw-track.settle {
  transition: transform 0.45s cubic-bezier(0.22, 1.1, 0.36, 1);
}

.vw-slide {
  flex: none;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.vw-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: none;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.vw-slide.zoomed img {
  transform: scale(2.2);
}

.vw-chrome {
  transition: opacity 0.3s;
}

.bars-off .vw-chrome,
.bars-off .vw-nav {
  opacity: 0;
  pointer-events: none;
}

.vw-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.4) !important;
  color: #ffffff;
  transition: opacity 0.3s;
}

.vw-nav.prev { left: 8px; }
.vw-nav.next { right: 8px; }

.vw-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.vw-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-bottom: 6px;
}

.vw-dots span {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgb(255 255 255 / 0.4);
  transition: width 0.3s, background-color 0.3s;
}

.vw-dots .on {
  width: 18px;
  background: #ffffff;
}

/* For You: memories play as a story. */
.memory,
.rediscover {
  display: block;
  text-align: left;
}

.memory img,
.rediscover img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.memory:hover img,
.rediscover:hover img {
  transform: scale(1.05);
}

.fy-story {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #000000;
  color: #ffffff;
  animation: story-in 0.45s cubic-bezier(0.22, 1.1, 0.36, 1);
}

.fy-story[hidden] {
  display: none;
}

@keyframes story-in {
  from {
    opacity: 0;
    transform: scale(0.88);
    border-radius: 28px;
  }
}

.fy-media img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
}

.fy-media img.on {
  opacity: 1;
  animation: ken 4s ease-out forwards;
}

@keyframes ken {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.12) translate(-2%, -1%);
  }
}

.fy-story .bars span {
  position: relative;
  overflow: hidden;
  background: rgb(255 255 255 / 0.35);
}

.fy-story .bars span::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: #ffffff;
}

.fy-story .bars .done::after {
  transform: none;
}

.fy-story .bars .run::after {
  animation: bar-fill var(--dur, 3.2s) linear forwards;
}

@keyframes bar-fill {
  to {
    transform: none;
  }
}

.fy-zone {
  position: absolute;
  z-index: 1;
  top: 110px;
  bottom: 90px;
  width: 45%;
}

.fy-zone.prev { left: 0; }
.fy-zone.next { right: 0; }

/* Search. */
.sx-body {
  overflow-y: auto;
  scrollbar-width: none;
}

.sx-body::-webkit-scrollbar {
  display: none;
}

.searchbar {
  cursor: text;
  transition: box-shadow 0.3s;
}

.searchbar:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}

.sx-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--t1);
  caret-color: var(--accent);
  font: inherit;
}

.sx-input::placeholder {
  color: var(--t3);
}

.sx-input:focus-visible {
  outline: 0;
}

.screen:not(.has-q) .sx-clear {
  visibility: hidden;
}

.sx-chips {
  display: flex;
  gap: 8px;
  padding: 6px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sx-chips .chip {
  flex: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.sx-chips .chip:hover {
  border-color: var(--accent);
}

.ondev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgb(143 115 255 / 0.16);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}

.sx-grid {
  padding: 4px;
}

.sx-grid > .out {
  display: none;
}

.sx-grid > .hit {
  animation: pop-in 0.45s cubic-bezier(0.22, 1.3, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.busy .sx-grid > * {
  background: linear-gradient(100deg, var(--placeholder) 30%, var(--high) 50%, var(--placeholder) 70%);
  background-size: 300% 100%;
  animation: shimmer 1s linear infinite;
}

.busy .sx-grid img,
.busy .sx-grid .vb {
  opacity: 0;
}

@keyframes shimmer {
  to {
    background-position: -150% 0;
  }
}

.sx-empty {
  padding: 32px 24px;
  font-size: 15px;
  text-align: center;
  color: var(--t2);
}

/* Editor. */
.ed-img {
  position: relative;
  display: flex;
  height: 100%;
  filter: brightness(var(--br, 1)) contrast(var(--ct, 1)) saturate(var(--sa, 1));
  transition: filter 0.25s;
}

.ed-img img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  background: none;
}

.ed-fx {
  position: absolute;
  inset: 0;
  width: 100% !important;
  transition: opacity 0.3s;
}

.comparing .ed-img {
  filter: none;
}

.comparing .ed-fx {
  opacity: 0 !important;
}

.round-btn {
  z-index: 2;
  touch-action: none;
}

.round-btn:active {
  background: var(--accent);
}

.ed-pane:not(.is-on) {
  display: none;
}

.ed-pane .slider {
  padding: 10px 16px 2px;
}

.ed-pane[data-pane="adjust"] {
  padding: 6px 0 14px;
}

.slider span:first-child {
  min-width: 70px;
}

.slider input {
  flex: 1;
  min-width: 0;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.slider output {
  min-width: 26px;
  color: var(--t1);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.filters {
  overflow-x: auto;
  scrollbar-width: none;
}

.filters button {
  flex: none;
  width: 72px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  color: var(--t1);
}

.filters button img {
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  border-radius: 8px;
  transition: box-shadow 0.25s;
}

.filters button.on {
  color: var(--accent);
}

.filters button.on img {
  box-shadow: 0 0 0 2.5px var(--accent);
}

.ed-tools {
  display: flex;
  justify-content: space-around;
  height: 62px;
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

.ed-tools button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 64px;
  font-size: 11px;
  font-weight: 500;
  color: var(--t2);
}

.ed-tools button.on {
  color: var(--t1);
}

.ed-tools button.on .i {
  color: var(--accent);
}

/* Vault. */
.vt-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 56px;
  overflow: hidden;
  background: #000000;
  color: #ffffff;
}

.vt-lock:not(.is-on) {
  transform: translateY(-100%);
}

.vt-grid:not(.is-on) {
  transform: scale(0.94);
}

.vt-icon {
  position: relative;
  width: 40px;
  height: 40px;
  color: rgb(255 255 255 / 0.7);
}

.vt-icon .i {
  position: absolute;
  inset: 0;
  transition: opacity 0.25s, transform 0.35s cubic-bezier(0.22, 1.4, 0.36, 1);
}

.vt-open,
.opening .vt-closed {
  opacity: 0;
  transform: scale(0.6);
}

.opening .vt-open {
  opacity: 1;
  transform: none;
  color: var(--accent);
}

.vt-lock .dots span {
  transition: background-color 0.2s, border-color 0.2s, transform 0.3s cubic-bezier(0.22, 1.6, 0.36, 1);
}

.vt-lock .dots .on {
  transform: scale(1.15);
}

.dots.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.vt-lock .keypad button {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 26px;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.15s;
}

.vt-lock .keypad button:hover {
  background: rgb(255 255 255 / 0.06);
}

.vt-lock .keypad button:active,
.vt-lock .keypad button.press {
  background: rgb(255 255 255 / 0.16);
}

.vt-grid .g3 > .out,
.vt-grid .dh.out {
  display: none;
}

/* Clean up. */
.cu-body {
  overflow-y: auto;
  scrollbar-width: none;
}

.cu-body::-webkit-scrollbar {
  display: none;
}

.sw-btn {
  display: inline-flex;
  align-items: center;
}

.sw-btn .switch {
  transition: background-color 0.25s, box-shadow 0.25s;
}

.sw-btn .switch::after {
  transition: all 0.3s cubic-bezier(0.22, 1.3, 0.36, 1);
}

.sw-btn[aria-checked="false"] .switch {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--t3);
}

.sw-btn[aria-checked="false"] .switch::after {
  right: 22px;
  width: 14px;
  height: 14px;
  top: 6px;
  background: var(--t3);
}

.best-t,
.pick {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
}

.pick .box {
  position: absolute;
  z-index: 1;
  right: 8px;
  bottom: 8px;
  transition: background-color 0.2s, border-color 0.2s;
}

.pick[aria-pressed="false"] .box .i {
  opacity: 0;
}

.pick[aria-pressed="true"] .box {
  border-color: var(--accent);
  background: var(--accent);
}

.pick::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.pick[aria-pressed="true"]::after {
  background: rgb(0 0 0 / 0.35);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.leaving {
  animation: leave 0.32s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes leave {
  to {
    opacity: 0;
    transform: scale(0.85);
  }
}

.cg.gone {
  display: none;
}

.cu-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 72px 28px;
  text-align: center;
}

.cu-done[hidden] {
  display: none;
}

.cu-check {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: rgb(76 195 138 / 0.18);
  color: #4cc38a;
  animation: pop-in 0.6s cubic-bezier(0.22, 1.5, 0.36, 1) both;
}

.delete-bar .fill-btn {
  transition: opacity 0.25s, transform 0.25s;
}

.delete-bar .fill-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.bin.play {
  animation: bin 0.6s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes bin {
  30% { transform: translateY(-4px) rotate(-14deg); }
  60% { transform: translateY(0) rotate(8deg); }
}

/* Your look: palettes recolour the phone. */
.lk-body {
  overflow-y: auto;
  scrollbar-width: none;
}

.lk-body::-webkit-scrollbar {
  display: none;
}

.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--tint);
}

.seg button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  transition: background-color 0.25s, color 0.25s;
}

.seg button.on {
  background: var(--raised);
  color: var(--t1);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}

.palettes {
  overflow-x: auto;
  scrollbar-width: none;
}

.palettes button {
  flex: none;
  font-size: 11px;
  text-align: center;
  color: var(--t1);
}

.palettes button.on .swatch {
  border: 2px solid var(--accent);
}

.palettes button.on {
  font-weight: 600;
}

.lk-preview {
  padding: 12px;
}

.lk-pv-top {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.lk-preview .g3 {
  overflow: hidden;
  border-radius: 10px;
}

.lk-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 52px;
  margin-top: 10px;
}

.lk-tabs span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--t2);
}

.lk-tabs .on {
  color: var(--accent);
}

.pal-graphite { --bg: #0d0d0f; --surface: #16161a; --raised: #1f1f24; --raised-94: rgb(31 31 36 / 0.94); --border: #2c2c33; --accent: #ffb020; }
.pal-ocean { --bg: #000407; --surface: #071015; --raised: #0e1c24; --raised-94: rgb(14 28 36 / 0.94); --border: #172a33; --accent: #32d2c8; }
.pal-rose { --bg: #080507; --surface: #120c0f; --raised: #1d1418; --raised-94: rgb(29 20 24 / 0.94); --border: #2e2026; --accent: #ff6b8a; }
.pal-mono { --bg: #000000; --surface: #0c0c0c; --raised: #161616; --raised-94: rgb(22 22 22 / 0.94); --border: #262626; --accent: #e8e8ec; --on-accent: #000000; }
.pal-paper { --bg: #0b0b10; --surface: #121218; --raised: #1a1a22; --raised-94: rgb(26 26 34 / 0.94); --border: #2a2a36; --accent: #7d8fff; }

.light.pal-graphite { --bg: #fdfcfa; --surface: #f5f3ef; --raised: #ffffff; --raised-94: rgb(255 255 255 / 0.94); --border: #e6e2da; --accent: #b77900; }
.light.pal-ocean { --bg: #fafdfd; --surface: #eff6f7; --raised: #ffffff; --raised-94: rgb(255 255 255 / 0.94); --border: #d9e7e9; --accent: #0e8f88; }
.light.pal-rose { --bg: #fffcfc; --surface: #f9f0f2; --raised: #ffffff; --raised-94: rgb(255 255 255 / 0.94); --border: #efdde2; --accent: #d63c62; }
.light.pal-mono { --bg: #ffffff; --surface: #f2f2f2; --raised: #ffffff; --raised-94: rgb(255 255 255 / 0.94); --border: #e2e2e2; --accent: #1a1a1e; --on-accent: #ffffff; }
.light.pal-paper { --bg: #fbf9f5; --surface: #f3f0ea; --raised: #ffffff; --raised-94: rgb(255 255 255 / 0.94); --border: #e5e0d6; --accent: #3d5afe; }

@media (prefers-reduced-motion: reduce) {
  .screen *,
  .screen *::before,
  .screen *::after {
    animation: none !important;
    transition: none !important;
  }
}

.pick.cut,
.finished .dup-summary,
.finished .cu-groups {
  display: none;
}

/* Swatches follow the phone's theme: each palette's own dark colours. */
.screen:not(.light) .sw-midnight { background: #000000; }
.screen:not(.light) .sw-midnight i { background: #14141f; }
.screen:not(.light) .sw-midnight b { background: #8f73ff; }
.screen:not(.light) .sw-graphite { background: #0d0d0f; }
.screen:not(.light) .sw-graphite i { background: #1f1f24; }
.screen:not(.light) .sw-graphite b { background: #ffb020; }
.screen:not(.light) .sw-ocean { background: #000407; }
.screen:not(.light) .sw-ocean i { background: #0e1c24; }
.screen:not(.light) .sw-ocean b { background: #32d2c8; }
.screen:not(.light) .sw-rose { background: #080507; }
.screen:not(.light) .sw-rose i { background: #1d1418; }
.screen:not(.light) .sw-rose b { background: #ff6b8a; }
.screen:not(.light) .sw-mono { background: #000000; }
.screen:not(.light) .sw-mono i { background: #161616; }
.screen:not(.light) .sw-mono b { background: #e8e8ec; }
.screen:not(.light) .sw-paper { background: #0b0b10; }
.screen:not(.light) .sw-paper i { background: #1a1a22; }
.screen:not(.light) .sw-paper b { background: #7d8fff; }

.swatch,
.swatch i,
.swatch b {
  transition: background-color 0.4s;
}
