/* New version on its way (spec §22): the full-screen update screen (js/update/screen.js) and the
   设置 →「关于」 rows (js/update/about.js). Colours come from the hero tokens, so dark mode follows. */

.update-screen {
  position: fixed;
  inset: 0;
  z-index: 240; /* over sheets, dialogs, viewers and toasts; under the top progress bar */
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 24px) max(var(--gutter), var(--safe-right)) calc(var(--safe-bottom) + 24px) max(var(--gutter), var(--safe-left));
  background:
    radial-gradient(120% 70% at 50% 32%, var(--hero-glow), transparent 62%),
    linear-gradient(180deg, var(--hero-2), var(--hero-1));
  color: var(--hero-text);
  text-align: center;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out);
  outline: none;
  touch-action: none;
}
.update-screen.is-open { opacity: 1; }

.upd-inner {
  display: grid;
  justify-items: center;
  width: min(100%, 320px);
}
.upd-art {
  display: block;
  width: 168px;
  aspect-ratio: 200 / 184;
  animation: upd-bob 2.4s ease-in-out infinite alternate;
}
.upd-art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.upd-title {
  margin: 22px 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
.upd-sub {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--hero-text-2);
}

/* Fixed size from the first frame: the caption keeps one line's height whatever it says. */
.upd-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--hero-glass);
  overflow: hidden;
}
.upd-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pineapple), var(--cta-3));
  box-shadow: 0 0 10px var(--hero-glow);
  transform: scaleX(0.04);
  transform-origin: 0 50%;
  transition: transform var(--dur-2) var(--ease-out);
}
.upd-bar.is-indeterminate .upd-fill {
  width: 34%;
  transform: none;
  transition: none;
  animation: upd-slide 1.3s var(--ease-out) infinite;
}
.upd-caption {
  margin: 10px 0 0;
  height: 1.5em;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hero-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes upd-bob { from { transform: translateY(0); } to { transform: translateY(-6px); } }
@keyframes upd-slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

@media (prefers-reduced-motion: reduce) {
  .upd-art { animation: none; }
  .upd-bar.is-indeterminate .upd-fill { animation: none; width: 100%; transform: scaleX(0.04); }
  .upd-fill { transition: none; }
}

/* ---------- 设置 → 关于 ---------- */

.about-card + .about-list { margin-top: var(--gap); }
/* The three version rows share one height: each has a title and a one-line sub. The home-screen
   name hint below them (spec §36) wraps, without leaving one character alone on the last line. */
.about-row { min-height: 64px; }
.about-rename .row-sub { text-wrap: pretty; }
.about-build { font-family: var(--font-rounded); letter-spacing: 0.02em; }
.about-check-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--positive);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
}
.about-check-mark svg { width: 22px; height: 22px; }
.about-check-mark.is-shown { opacity: 1; transform: none; }
.about-row.is-checking { pointer-events: none; }
.about-row.is-checking .row-title { color: var(--text-2); }
