:root {
  /* Alexandra Palace palette, sampled from alexandrapalace.com (theme style.css) */
  --ice: #e5f6f6; --teal: #003dc6; --teal-2: #2f63d6; --teal-soft: #aae2e0; --pink: #ff8cd6; --pink-strong: #ffa3de; --pink-soft: #ffe7f7;
  --ink: #231f20; --muted: #4f5a5c; --line: #cfe3e3; --bg: #e5f6f6; --card: #fff;
  --ok: #007249; --ok-2: #009e65; --ok-soft: #ccf1e4; --yellow: #ffe46f; --cream: #fff7d5;
  --warn: #8a5a00; --warn-soft: #fff7d5; --bad: #c4201d; --bad-soft: #ffe1e0;
  --r: 4px; --gut: 16px;
  --head: Outfit, "GranbyAP-bold", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { font: 15px/1.5 Outfit, "GranbyAP-Medium", system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg);
  -webkit-tap-highlight-color: transparent; padding-bottom: env(safe-area-inset-bottom); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font: 700 25px/1.15 var(--head); color: var(--teal); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
a { color: var(--teal); }
button { font: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) var(--gut) 10px; background: var(--teal); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font: 700 18px var(--head); }
.brand small { font-size: 11.5px; opacity: .85; }
.sync { font-size: 12px; padding: 4px 9px; border-radius: 99px; background: rgba(255,255,255,.18); white-space: nowrap; }
.sync.off { background: #f3c26b; color: #3b2a00; }

main { max-width: 980px; margin: 0 auto; padding: 18px var(--gut) 60px; }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }
.crumbs { font-size: 13px; margin-bottom: 10px; }
.crumbs a { text-decoration: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--teal); background: var(--teal); color: #fff; font-weight: 600; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--teal); }
.btn.pink { background: var(--pink); border-color: var(--pink); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select { font: inherit; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); width: 100%; }

/* home */
.hero { margin: 4px 0 18px; }
.hero p { margin: 0; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tile { display: block; padding: 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--teal-2); }
.tile .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px;
  background: var(--teal-soft); color: var(--teal); }
.tile.p .ic { background: var(--pink-soft); color: var(--pink); }
.tile b { display: block; font-size: 16px; margin-bottom: 3px; }
.tile span { color: var(--muted); font-size: 13.5px; }
.whoami { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.whoami label { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* class list */
.list { display: grid; gap: 10px; }
.cls { display: flex; align-items: center; gap: 14px; padding: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); text-decoration: none; color: var(--ink); }
.lvl { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--teal); color: #fff;
  display: grid; place-items: center; font: 700 20px var(--head); }
.lvl small { display: block; font: 600 9px var(--head); letter-spacing: .06em; text-transform: uppercase; margin-bottom: -3px; }
.cls .meta { flex: 1; min-width: 0; }
.cls .meta b { display: block; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--teal-soft); color: var(--teal); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.pink { background: var(--pink-soft); color: var(--pink); }

/* marking */
.seg { display: inline-flex; background: #e6eeee; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.seg button.on { background: #fff; color: var(--teal); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.els { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin: 0 calc(-1 * var(--gut)); padding-left: var(--gut);
  padding-right: var(--gut); scrollbar-width: none; }
.els button { flex: none; max-width: 210px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 8px 12px; color: var(--ink); }
.els button.on { border-color: var(--teal); background: var(--teal); color: #fff; }
.els button i { font-style: normal; font-weight: 700; margin-right: 6px; }
.els button span { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.elname { font: 600 18px/1.3 var(--head); margin: 6px 0 2px; }
.skr { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.skr:last-child { border-bottom: 0; }
.skr .nm { flex: 1; min-width: 0; }
.skr .nm a { color: var(--ink); text-decoration: none; font-weight: 600; }
.skr .nm small { display: block; color: var(--muted); font-size: 12px; }
.marks { display: flex; gap: 6px; flex: none; }
.mk { width: 52px; height: 52px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 22px;
  font-weight: 700; color: #9fb0b3; display: grid; place-items: center; padding: 0; transition: transform .06s; }
.mk:active { transform: scale(.94); }
.mk.side { font-size: 17px; }
.mk.on-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.mk.on-pr { background: #f3b23a; border-color: #f3b23a; color: #3b2a00; }
.mk.on-side { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.passbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin: 4px 0 2px;
  border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 14px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.legend b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; margin-right: 4px; color: #fff; font-size: 12px; }

/* grid */
.gridwrap { overflow-x: auto; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 520px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.grid th, .grid td { padding: 6px; border-bottom: 1px solid var(--line); text-align: center; font-size: 13px; }
.grid th { background: var(--ice); font-weight: 600; vertical-align: bottom; }
.grid th.el { width: 54px; }
.grid th.el span { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); line-height: 1.2; max-height: 3.6em; overflow: hidden; }
.grid td.n, .grid th.n { text-align: left; position: sticky; left: 0; background: #fff; min-width: 120px; }
.grid th.n { background: var(--ice); }
.grid tr:last-child td { border-bottom: 0; }
.gc { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; color: #9fb0b3; padding: 0; font-size: 15px; }
.gc.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.gc.pr { background: #f3b23a; border-color: #f3b23a; color: #3b2a00; }

/* record (card) */
.rec h2 { display: flex; align-items: center; gap: 10px; }
.lvlblock { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.lvlblock + .lvlblock { margin-top: 10px; }
.lvlhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; background: var(--teal-soft); font-weight: 600; }
.lvlhead.done { background: var(--ok-soft); color: var(--ok); }
.lvlhead.cur { background: var(--teal); color: #fff; }
.elrow { display: flex; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); align-items: center; font-size: 14px; }
.elrow .t { flex: 1; }
.elrow .st { flex: none; font-size: 12px; text-align: right; color: var(--muted); min-width: 92px; }
.dot { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid var(--line); color: #9fb0b3; }
.dot.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.dot.pr { background: #f3b23a; border-color: #f3b23a; color: #3b2a00; }
.src { font-size: 10.5px; padding: 1px 5px; border-radius: 5px; background: #eef2f3; color: var(--muted); margin-left: 4px; }

/* import */
.drop { border: 2px dashed var(--teal-2); border-radius: var(--r); background: #fff; padding: 26px 16px; text-align: center; }
.drop .btn { margin: 6px 4px 0; }
.samples { display: flex; gap: 10px; margin-top: 12px; }
.samples button { flex: 1; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; }
.samples img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; display: block; }
.samples span { display: block; font-size: 12px; color: var(--muted); padding-top: 4px; }
.spin { width: 34px; height: 34px; border: 3px solid var(--teal-soft); border-top-color: var(--teal); border-radius: 50%; animation: sp 0.9s linear infinite; margin: 0 auto 10px; }
@keyframes sp { to { transform: rotate(360deg); } }
.review { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .review { grid-template-columns: 340px 1fr; } .review .ph { position: sticky; top: 76px; align-self: start; } }
.ph img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.rv { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.rv.low { background: var(--warn-soft); }
.rv .t { flex: 1; min-width: 0; }
.rv .t small { display: block; color: var(--muted); font-size: 12px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 9px; min-width: 40px; height: 36px; padding: 0 8px; font-weight: 700; color: #9fb0b3; }
.chip.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.chip.pr { background: #f3b23a; border-color: #f3b23a; color: #3b2a00; }
.chip.s { min-width: 34px; font-size: 13px; }
.chip.s.on { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.match { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.match button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; }
.match button.on { background: var(--teal); color: #fff; border-color: var(--teal); }

/* manager */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.kpi b { display: block; font: 700 28px var(--head); }
.kpi span { color: var(--muted); font-size: 13px; }
.bars .b { display: grid; grid-template-columns: 64px 1fr 92px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; }
.track { height: 12px; border-radius: 99px; background: #e8eeef; overflow: hidden; display: flex; }
.track i { display: block; height: 100%; }
.track .a { background: var(--teal); } .track .r { background: var(--ok); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th, .t td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.t th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.two { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .two { grid-template-columns: 1fr 1fr; } }

/* parent */
.pcard { background: linear-gradient(180deg, var(--teal) 0, var(--teal) 64%, #fff 64%); border-radius: var(--r); padding: 20px 16px 16px; color: #fff; border: 1px solid var(--line); }
.pcard h1 { color: #fff; margin: 0; }
.ring { width: 120px; height: 120px; margin: 14px auto 0; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring div { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--ink); font-size: 12px; }
.ring div b { display: block; font: 700 28px var(--head); }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 700 17px var(--head);
  background: #e8eeef; color: #9fb0b3; }
.badge.done { background: var(--pink); color: #fff; }
.badge.cur { background: #fff; color: var(--teal); border: 2.5px solid var(--teal); }

/* certificate */
.cert { max-width: 760px; margin: 0 auto; background: #fff; border: 10px solid var(--teal-soft); outline: 2px solid var(--teal); outline-offset: -16px;
  padding: 48px 32px; text-align: center; }
.cert .k { letter-spacing: .25em; text-transform: uppercase; color: var(--pink); font-weight: 700; font-size: 12px; }
.cert h1 { font-size: 40px; margin: 14px 0 6px; color: var(--teal); }
.cert .who { font: 700 34px var(--head); margin: 22px 0 6px; }
.cert .lv { font: 600 22px var(--head); color: var(--pink); }
.cert .sig { display: flex; justify-content: space-around; gap: 16px; margin-top: 40px; font-size: 13px; color: var(--muted); }
.cert .sig div { flex: 1; max-width: 200px; border-top: 1px solid var(--line); padding-top: 6px; }
@media (max-width: 520px) { .cert { padding: 36px 18px; } .cert h1 { font-size: 32px; } .cert .who { font-size: 28px; } }
@media print { .top, .noprint { display: none !important; } main { padding: 0; } body { background: #fff; } }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(10,30,32,.45); display: grid; place-items: end center; padding: 16px; }
@media (min-width: 600px) { .modal { place-items: center; } }
.modal .card { width: 100%; max-width: 420px; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px); }
.err { color: var(--bad); font-size: 14px; }
.login { max-width: 380px; margin: 40px auto; }

/* ---- Alexandra Palace brand layer ---- */
.top { background: var(--teal); padding-top: calc(env(safe-area-inset-top) + 8px); padding-bottom: 8px; }
.brand .aplogo { width: 92px; height: auto; flex: none; display: block; }
.brand .aplogo path, .brand .aplogo g { fill: #fff; }
.brand span { border-left: 2px solid var(--pink); padding-left: 10px; }
.brand b { font: 700 16px var(--head); text-transform: uppercase; letter-spacing: .04em; }
.brand small { color: var(--pink); opacity: 1; font-weight: 600; }
.btn { border-radius: 2px; text-transform: uppercase; letter-spacing: .03em; font-family: var(--head); font-weight: 700; }
.btn.pink { background: var(--pink-strong); border-color: var(--pink-strong); color: var(--teal); }
.tile, .cls, .card, .kpi, .lvlblock, table.grid, .drop, .samples button { border-radius: 4px; }
.tile .ic { border-radius: 50%; background: var(--teal); color: #fff; }
.tile.p .ic { background: var(--pink); color: var(--teal); }
.tile b { font-family: var(--head); text-transform: uppercase; color: var(--teal); letter-spacing: .02em; }
.tile:hover { border-color: var(--teal); }
.hero { background: var(--teal-soft); margin: -18px calc(-1 * var(--gut)) 18px; padding: 22px var(--gut) 20px; }
.hero h1 { margin-bottom: 8px; }
.hero p { color: var(--ink); }
.lvl { border-radius: 50%; background: var(--teal); }
.els button { border-radius: 4px; }
.els button.on { background: var(--teal); }
.mk { border-radius: 6px; }
.mk.on-ok, .gc.ok, .dot.ok, .chip.ok { background: var(--ok-2); border-color: var(--ok-2); }
.mk.on-pr, .gc.pr, .dot.pr, .chip.pr { background: var(--yellow); border-color: #e9c93a; color: var(--ink); }
.mk.on-side, .chip.s.on { background: var(--ok-soft); border-color: var(--ok-2); color: var(--ok); }
.legend b[style*="f3b23a"] { background: var(--yellow) !important; }
.gc, .chip { border-radius: 4px; }
.passbar { border-radius: 4px; }
.lvlhead { background: var(--teal-soft); color: var(--teal); text-transform: uppercase; font-family: var(--head); letter-spacing: .03em; }
.lvlhead.cur { background: var(--teal); color: #fff; }
.lvlhead.done { background: var(--ok-soft); color: var(--ok); }
.seg { border-radius: 4px; background: #d3ecec; } .seg button { border-radius: 3px; text-transform: uppercase; font-size: 13px; letter-spacing: .03em; }
.kpi b { color: var(--teal); }
.track .a { background: var(--teal); }
.pill { border-radius: 2px; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.pcard { background: linear-gradient(180deg, var(--teal) 0, var(--teal) 64%, #fff 64%); border-radius: 4px; }
.pcard .small { color: var(--pink); opacity: 1 !important; font-weight: 600; }
.badge.done { background: var(--pink); color: var(--teal); }
.cert { border: 12px solid var(--teal-soft); outline: 2px solid var(--teal); }
.cert .aplogo { width: 150px; margin: 0 auto 10px; display: block; }
.cert .aplogo path, .cert .aplogo g { fill: var(--teal); }
.cert .k { color: var(--teal); }
.cert h1 { color: var(--teal); text-transform: uppercase; }
.cert .lv { color: var(--ink); background: var(--pink-soft); display: inline-block; padding: 4px 14px; }
.login h1 { color: var(--teal); }
.match button, .samples button { border-radius: 2px; }
.match button.on { background: var(--teal); }
.brand .aplogo { color: #fff; }
.cert .aplogo { color: var(--teal); }
.btn.sm { border-radius: 2px; }

/* ---- navigation: back button + tabs ---- */
.crumbs { display: none; }
.top { flex-wrap: nowrap; }
.back { flex: none; display: inline-flex; align-items: center; gap: 2px; border: 0; background: rgba(255,255,255,.14); color: #fff;
  min-height: 44px; padding: 0 12px 0 6px; border-radius: 2px; font: 700 14px var(--head); text-transform: uppercase; letter-spacing: .03em; }
.back:active { background: rgba(255,255,255,.28); }
.back[hidden] + .brand { margin-left: 0; }
.top .brand { flex: 1; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0,61,198,.06); }
.tabs[hidden] { display: none; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; text-decoration: none;
  color: var(--muted); font: 600 11.5px var(--head); text-transform: uppercase; letter-spacing: .03em; border-top: 3px solid transparent; }
.tabs a svg { width: 24px; height: 24px; }
.tabs a.on { color: var(--teal); border-top-color: var(--pink); }
body.has-tabs main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.has-tabs .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* phones: logo smaller when the back button is showing */
@media (max-width: 480px) {
  .back:not([hidden]) ~ .brand .aplogo { width: 64px; }
  .back:not([hidden]) ~ .brand small { display: none; }
  .back span { display: none; }
  .back { padding: 0 8px; }
}

/* ---- iPad / tablet ---- */
@media (min-width: 768px) {
  :root { --gut: 28px; }
  main { max-width: 1240px; padding-top: 24px; }
  .top { padding-left: var(--gut); padding-right: var(--gut); gap: 16px; }
  .top .brand { flex: none; }
  .brand .aplogo { width: 104px; }
  /* tabs move into the header */
  .tabs { position: static; flex: 1; justify-content: flex-end; background: none; border: 0; box-shadow: none; padding: 0; gap: 4px; }
  .tabs a { flex: none; flex-direction: row; gap: 8px; color: #fff; font-size: 14px; padding: 10px 14px; border-top: 0;
    border-bottom: 3px solid transparent; }
  .tabs a svg { width: 20px; height: 20px; }
  .tabs a.on { color: #fff; border-bottom-color: var(--pink); }
  .tabs a:hover { background: rgba(255,255,255,.1); }
  body.has-tabs main { padding-bottom: 60px; }
  body.has-tabs .toast { bottom: 24px; }
  h1 { font-size: 30px; }
  .hero { margin-top: -24px; padding: 34px var(--gut) 30px; }
  .hero h1 { font-size: 38px; max-width: 760px; }
  .hero p { font-size: 17px; max-width: 720px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tile { padding: 24px; }
  .list { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .whoami { max-width: 520px; }
  .samples button img { height: 200px; }
  /* class marking: element list on the left, skaters on the right */
  .markwrap { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
  .markwrap .els { flex-direction: column; overflow: visible; margin: 0; padding: 0; position: sticky; top: 92px; }
  .markwrap .els button { max-width: none; width: 100%; padding: 12px 14px; }
  .markwrap .els button span { -webkit-line-clamp: 3; font-size: 14px; }
  .mk { width: 60px; height: 60px; }
  .gc { width: 48px; height: 48px; font-size: 17px; }
  .grid td.n { min-width: 170px; font-size: 15px; }
  main.narrow { max-width: 860px; }
}
@media (min-width: 1100px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .list { grid-template-columns: repeat(3, 1fr); }
  .sklist { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .sklist .skr { border-bottom: 1px solid var(--line) !important; }
}
.back[hidden] { display: none; }

/* ---- smooth move switching ---- */
.els { scroll-behavior: smooth; scroll-snap-type: x proximity; }
.els button { scroll-snap-align: center; transition: background .18s, color .18s, border-color .18s; }
.elstage { overflow: hidden; margin: 0 -4px; padding: 0 4px; }
.elcard { will-change: transform, opacity; touch-action: pan-y; }
.elnum { display: block; font: 700 11.5px var(--head); color: var(--pink); text-transform: uppercase; letter-spacing: .08em; }
.elhead { padding-bottom: 6px; }
.elnav { display: flex; gap: 10px; margin-top: 14px; }
.elnav .btn { flex: 1; }
.elnav .btn:disabled { visibility: hidden; }
.sk { animation: none; }
.mk { transition: background .12s, border-color .12s, color .12s, transform .06s; }
@media (prefers-reduced-motion: reduce) { .els { scroll-behavior: auto; } .elcard { transition: none !important; } }

/* ---- QA polish ---- */
.brand b { white-space: nowrap; }
@media (max-width: 480px) {
  .top:has(.sync:not([hidden])) .brand small { display: none; }
  .top:has(.sync:not([hidden])) .brand b { font-size: 13px; }
  .top:has(.sync:not([hidden])) .brand .aplogo { width: 58px; }
  .sync { font-size: 11px; padding: 4px 8px; }
}
@media (min-width: 768px) { .grid th.el { width: auto; } .grid td.n, .grid th.n { width: 200px; } }
