/* Settings, profiles, setup, dashboard, about, dialogs, themes and the top bar.
   This file loads last, so it also holds the theme overrides for base.css. */

/* ---------- themes (data-theme on <html>, set by js/extras/display.js) ---------- */
:root {
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.28);
  --hover: rgba(255, 255, 255, 0.08);
  --bar-bg: rgba(16, 16, 16, 0.9);
  --danger: #d6444a;
  --ok: #34b36f;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
:root[data-theme="black"] {
  --bg: #000;
  --surface: #121212;
  --surface-2: #1f1f1f;
  --bar-bg: rgba(0, 0, 0, 0.92);
}
:root[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #e5e8ed;
  --text: #15181d;
  --muted: #5b626e;
  --accent: #007fae;
  --accent-ink: #ffffff;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.28);
  --hover: rgba(0, 0, 0, 0.06);
  --bar-bg: rgba(244, 245, 247, 0.92);
  --shadow: 0 18px 48px rgba(20, 30, 50, 0.22);
  color-scheme: light;
}
:root[data-theme="blue"] {
  --bg: #0d1626;
  --surface: #16233a;
  --surface-2: #213252;
  --text: #eef3fb;
  --muted: #9cabc4;
  --accent: #4d9cff;
  --accent-ink: #04152e;
  --bar-bg: rgba(13, 22, 38, 0.92);
}
:root[data-theme="purple"] {
  --bg: #160f22;
  --surface: #221834;
  --surface-2: #302347;
  --text: #f4eefb;
  --muted: #b3a5c9;
  --accent: #b17dff;
  --accent-ink: #1e0a3d;
  --bar-bg: rgba(22, 15, 34, 0.92);
}
:root:not([data-theme="light"]) { color-scheme: dark; }

/* The interface size setting changes the root font size; let the body follow it. */
body { font-size: 1rem; }

/* Colours that base.css writes out directly, made to follow the theme. */
.topbar { background: var(--bar-bg); }
.thumb .ph { color: var(--line-strong); }
.facts .chip { border-color: var(--line-strong); }
.icon-btn:hover { background: var(--hover); }
:root[data-theme="light"] .backdrop { filter: blur(28px) brightness(1.15) opacity(0.35); }
:root[data-theme="light"] .card .play-hint svg,
:root[data-theme="light"] .count { color: #fff; }

/* Display options */
:root[data-no-backdrops] .backdrop { display: none !important; }
:root[data-reduce-motion] *,
:root[data-reduce-motion] *::before,
:root[data-reduce-motion] *::after {
  transition: none !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
}
:root[data-reduce-motion] .spinner { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; }
:root[data-reduce-motion] .card:hover .thumb,
:root[data-reduce-motion] .card:focus-visible .thumb { transform: none; }

/* ---------- top bar ---------- */
.topbar { flex-wrap: nowrap; row-gap: 8px; }
.brand { min-width: 0; flex: none; }
.brand span { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplinks.empty { visibility: hidden; }
.toplinks a { display: flex; align-items: center; min-height: 44px; }
.toplinks a:focus-visible { color: var(--text); box-shadow: 0 0 0 3px var(--accent); }
.search { flex: 0 1 auto; }
.topactions .icon-btn .avatar { width: 34px; height: 34px; font-size: 1rem; }
.topactions .icon-btn:focus-visible .avatar { box-shadow: 0 0 0 3px var(--accent-ink); }
body.locked .topbar, body.locked #setup-banner { display: none; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding-top: 8px; padding-bottom: 6px; }
  .brand { order: 1; padding-right: 6px; }
  .brand span { max-width: 7.5rem; }
  .search { order: 2; flex: 1 1 0; width: auto; min-width: 0; }
  .topactions { order: 3; }
  .toplinks {
    order: 4;
    flex: 1 0 calc(100% + 2 * var(--gutter));
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
    scroll-padding: 0 var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .toplinks.empty { display: none; }
  .toplinks a { min-height: 40px; padding: 6px 12px; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
}

/* ---------- avatars ---------- */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--av, #0b8fc0);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  user-select: none;
}
.avatar.big { width: 7.5rem; height: 7.5rem; border-radius: 22%; font-size: 3.2rem; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.avatar.add { background: var(--surface-2); color: var(--muted); font-weight: 400; }
.swatch { display: inline-block; width: 1.15rem; height: 1.15rem; border-radius: 50%; vertical-align: middle; }

/* ---------- shared page parts ---------- */
.xp { padding-bottom: 3rem; }
.page-narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); }
.xp-head { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0 0.5rem; }
.xp-head h1 { margin: 0; font-size: 1.8rem; font-weight: 600; }
.xp-head .icon-btn { margin-left: -0.5rem; }
.xp-lead { color: var(--muted); line-height: 1.5; margin: 0.25rem 0 1rem; }
.xp-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0 0; }
.xp-note { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.xp-note p { margin: 0 0 0.75rem; }
.xp-note strong { color: var(--text); }
.xp code, .dlg code { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); font-size: 0.9em; }
.inline-link { color: var(--accent); text-decoration: underline; border-radius: 3px; }

.xp .btn, .dlg .btn, .toast .btn, .setup-banner .btn, .state-actions .btn {
  min-height: 2.9rem;
  padding: 0.7rem 1.25rem;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
}
.xp .btn:focus-visible, .dlg .btn:focus-visible, .toast .btn:focus-visible,
.setup-banner .btn:focus-visible, .state-actions .btn:focus-visible {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--text);
}
.btn.danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; filter: none; }
.link-btn {
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}
.link-btn:hover { background: var(--hover); }
.state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- settings ---------- */
.who-chip {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.75rem 0 0.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: var(--surface);
}
.who-chip > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.who-chip small { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.who-chip:focus-visible { background: var(--surface-2); box-shadow: inset 0 0 0 3px var(--accent); }

.set-sec { margin-top: 1.75rem; }
.set-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.set-sec-head h2 { margin: 0; font-size: 1.2rem; font-weight: 600; }
.set-rows { border-radius: 12px; overflow: hidden; background: var(--surface); }
.set-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 4.25rem;
  margin: 0;
  padding: 0.85rem 1.15rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.set-row:first-child { border-top: 0; }
.set-row.static { cursor: default; }
.set-row:hover { background: var(--hover); }
.set-row.focusable:focus-visible { background: var(--surface-2); box-shadow: inset 0 0 0 3px var(--accent); }
.set-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.set-label { font-size: 1.05rem; }
.set-help { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.set-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  vertical-align: 2px;
  white-space: nowrap;
}
.set-value {
  flex: 0 1 auto;
  max-width: 45%;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set-row:focus-visible .set-value { color: var(--text); }
.chev { display: grid; flex: none; color: var(--muted); }
.chev svg { width: 1.4rem; height: 1.4rem; }

.switch {
  position: relative;
  flex: none;
  width: 3.3rem;
  height: 1.9rem;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 0.15s ease;
}
.switch i {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(1.4rem); }

.slider { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 min(46%, 19rem); }
.slider .track { position: relative; flex: 1; height: 0.4rem; border-radius: 999px; background: var(--line-strong); cursor: pointer; }
.slider .track::before { content: ""; position: absolute; inset: -0.8rem 0; }
.slider .track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.slider .step {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 1.2rem;
  cursor: pointer;
  user-select: none;
}
.set-row:focus-visible .slider .step { background: var(--bg); }
.slider .set-value { flex: none; min-width: 3.5rem; max-width: none; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) {
  .set-row.range { flex-wrap: wrap; }
  .slider { flex: 1 0 100%; }
  .set-value { max-width: 40%; }
}

/* ---------- who's watching ---------- */
.who {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: 2rem var(--gutter);
  text-align: center;
}
body.locked .who { min-height: calc(100vh - 80px); }
.who-title { margin: 0 0 2rem; font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 600; }
.who-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem 1.5rem; max-width: 64rem; }
.who-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: 9rem;
  padding: 0.75rem 0.5rem;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.who-tile.focusable:focus-visible { box-shadow: none; color: var(--text); }
.who-tile:hover .avatar.big { transform: scale(1.04); }
.who-tile:focus-visible .avatar.big { transform: scale(1.08); box-shadow: 0 0 0 4px var(--bg), 0 0 0 8px var(--text); }
.who-name { max-width: 100%; overflow: hidden; font-size: 1.1rem; text-overflow: ellipsis; white-space: nowrap; }
.who-tile:hover .who-name, .who-tile:focus-visible .who-name { color: var(--text); }
.who-lock {
  position: absolute;
  top: 0.4rem;
  right: 0.9rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
}
.who-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2.5rem; }
@media (max-width: 480px) {
  .who-tile { width: 7.5rem; }
  .avatar.big { width: 6rem; height: 6rem; font-size: 2.6rem; }
}

/* ---------- manage profiles ---------- */
.xp-list { display: flex; flex-direction: column; gap: 0.75rem; }
.prof-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: var(--surface);
}
.prof-id { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.prof-name { font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }
.prof-sub { color: var(--muted); font-size: 0.85rem; }
.prof-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.xp .prof-btns .btn { min-height: 2.6rem; padding: 0.55rem 0.95rem; font-size: 0.95rem; }

/* ---------- setup ---------- */
.setup-form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field-label { font-weight: 600; }
.field-input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.field-input::placeholder { color: var(--muted); opacity: 0.8; }
.field-input.focusable:focus-visible, .field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); outline: none; }
.field-help { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.field-now { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin: 0.25rem 0 0; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.field-now .link-btn { padding: 0.35rem 0.6rem; font-size: 0.85rem; }
.setup-result { padding: 0.9rem 1.1rem; border-radius: 8px; line-height: 1.5; border-left: 4px solid var(--muted); background: var(--surface); }
.setup-result.ok { border-left-color: var(--ok); }
.setup-result.bad { border-left-color: var(--danger); }

.setup-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin: 0.5rem var(--gutter) 0;
  padding: 0.7rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}
.setup-banner span { flex: 1 1 16rem; }
.setup-banner .btn { min-height: 2.5rem; padding: 0.5rem 1rem; }

/* ---------- dashboard ---------- */
.dashboard { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter) 3rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.9rem; margin: 1rem 0; }
.stat { padding: 1.1rem 1.2rem; border-radius: 12px; background: var(--surface); }
.stat-value { font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 2px; color: var(--muted); }
.stat-sub { margin-top: 4px; color: var(--muted); font-size: 0.8rem; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); gap: 1rem; }
.dash-card { display: flex; flex-direction: column; padding: 1.25rem; border-radius: 12px; background: var(--surface); }
.dash-card h2 { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 600; }
.dash-card .xp-actions { margin-top: auto; padding-top: 1rem; }
.card-text { margin: 0 0 0.5rem; line-height: 1.5; }
.card-text.muted { color: var(--muted); font-size: 0.9rem; }
.meter { height: 0.5rem; margin: 0.5rem 0 0.75rem; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.danger-zone { box-shadow: inset 0 0 0 1px rgba(214, 68, 74, 0.55); }

/* ---------- about ---------- */
.about p, .about li { line-height: 1.6; }
.about-hero { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; }
.about-hero img { border-radius: 18px; }
.about-name { font-size: 1.5rem; font-weight: 600; }
.about-ver { color: var(--muted); }
.about-h { margin: 2rem 0 0.5rem; font-size: 1.25rem; font-weight: 600; }
.about-sub { margin: 1.25rem 0 0.5rem; color: var(--muted); font-size: 0.95rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.about-list { padding-left: 1.2rem; }
.about-list li { margin-bottom: 0.5rem; }
.keys { margin: 0; border-radius: 12px; background: var(--surface); overflow: hidden; }
.keys > div { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 1rem; padding: 0.7rem 1.1rem; border-top: 1px solid var(--line); }
.keys > div:first-child { border-top: 0; }
.keys dt, .keys dd { margin: 0; }
kbd {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-2);
  font: inherit;
  font-size: 0.85rem;
}
@media (max-width: 560px) {
  .keys > div { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ---------- dialogs ---------- */
body.has-dialog { overflow: hidden; }
.dlg-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
}
.dlg {
  width: min(520px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 1.4rem;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.dlg-title { margin: 0 0 0.9rem; font-size: 1.3rem; font-weight: 600; overflow-wrap: anywhere; }
.dlg-text, .dlg-help { margin: 0 0 1rem; color: var(--muted); line-height: 1.5; }
.dlg-error { margin: 0.75rem 0 0; color: var(--danger); font-weight: 600; }
.dlg-error[hidden] { display: none; }
.dlg-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem; margin-top: 1.25rem; }
.dlg-options { display: flex; flex-direction: column; gap: 2px; margin: 0 -0.5rem; }
.dlg-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.3rem;
  padding: 0.6rem 0.9rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
}
.dlg-option:hover { background: var(--hover); }
.dlg-option.focusable:focus-visible { background: var(--accent); color: #fff; box-shadow: none; }
.dlg-check { display: grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; color: var(--accent); }
.dlg-check svg { width: 1.4rem; height: 1.4rem; }
.dlg-option:focus-visible .dlg-check { color: #fff; }
.dlg-option-text { display: flex; flex-direction: column; min-width: 0; }
.dlg-option-text small { color: var(--muted); font-size: 0.82rem; }
.dlg-option:focus-visible .dlg-option-text small { color: rgba(255, 255, 255, 0.85); }
.dlg-option.on { font-weight: 600; }
@media (min-width: 761px) {
  .dlg.dlg-menu { position: absolute; top: 64px; right: var(--gutter); width: 300px; padding: 0.9rem; }
  .dlg.dlg-menu .dlg-title { margin: 0.2rem 0.4rem 0.6rem; font-size: 1.05rem; color: var(--muted); }
}
.dlg-menu .dlg-check { color: var(--muted); }

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(560px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.toast span { flex: 1 1 14rem; line-height: 1.4; }
.toast .btn { min-height: 2.5rem; padding: 0.5rem 1rem; }

/* ---------- profile pictures and the Edit profile dialog ---------- */
.avatar.pic { overflow: hidden; background: none; }
.avatar.pic svg { display: block; width: 100%; height: 100%; }
.dlg.dlg-profile { width: min(600px, 100%); }
.pe-top { display: flex; align-items: center; gap: 1.1rem; }
.pe-preview .avatar.big { width: 5.5rem; height: 5.5rem; font-size: 2.4rem; }
.pe-name { flex: 1; min-width: 0; }
.pe-label { margin: 1.2rem 0 0.6rem; }
.pe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr)); gap: 0.6rem; }
.pe-pic {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22%;
  background: var(--surface-2);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.pe-pic svg { display: block; width: 100%; height: 100%; }
.pe-pic .avatar { width: 100%; height: 100%; border-radius: 0; font-size: 1.8rem; }
.pe-pic:hover { transform: scale(1.05); }
.pe-pic.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--accent); }
.pe-pic.focusable:focus-visible { transform: scale(1.08); box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--text); outline: none; }
.pe-pic.on::after {
  content: '';
  position: absolute;
  right: 6%;
  bottom: 6%;
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 70% no-repeat;
}
@media (max-width: 480px) {
  .pe-top { flex-direction: column; align-items: stretch; text-align: center; }
  .pe-preview { align-self: center; }
  .pe-grid { grid-template-columns: repeat(4, 1fr); }
}
