/* MEGRA Signage: "Simple" look (Henry, 12 Oct 2026: "looks nice"; mockup docs/mockups/2026-10-12-styles/simple.html).
   Organized lists, calm colours, Morning (light, default) + Night (dark). No outside fonts, scripts or services.
   Redesign phase 1 = frame + My TVs + TV page; the other pages follow in phases 2 and 3. */
@font-face { font-family: "MEGRA"; src: url("MEGRA-Approved.ttf") format("truetype"); font-display: swap; }   /* MEGRA Master v3.0 Approved (full alphabet) */
:root {
  color-scheme: light;
  --page: #F6F7F9; --surface: #FFFFFF; --hover: #F2F4F7; --field: #FFFFFF;
  --ink: #16181D; --ink-2: #5A606B; --ink-3: #868C97; --line: #E4E7EC; --line-2: #D3D8E0;
  --accent: #1D5BD6; --accent-hi: #1749AE; --accent-soft: #EAF0FC; --on-accent: #FFFFFF;
  --ok: #1A9A55; --ok-soft: #E8F6EE; --warn: #A15C00; --warn-soft: #FFF4E0;
  --bad: #D93025; --bad-soft: #FDEEEC; --bad-line: #F5C6C1;
  --logo: invert(1);
  /* older names, still used by the pages not redone yet (phases 2 and 3) */
  --paper: var(--page); --accent-bg: var(--accent-soft); --ok-bg: var(--ok-soft); --warn-bg: var(--warn-soft); --red: var(--bad); --red-bg: var(--bad-soft);
  --btn: var(--accent); --btn-ink: var(--on-accent); --bezel: 0 0 0 1px var(--line); --hi: 0 0 #0000; --lift: 0 0 #0000;
  --spring: cubic-bezier(.22, 1, .36, 1); --press: cubic-bezier(.32, .72, 0, 1);
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
[data-theme="dark"] {
  color-scheme: dark;
  --page: #0C0D10; --surface: #15171B; --hover: #1C1F24; --field: #101216;
  --ink: #EEF0F3; --ink-2: #A3A9B4; --ink-3: #747B87; --line: #262A30; --line-2: #343941;
  --accent: #7BA4FF; --accent-hi: #A5C1FF; --accent-soft: #17223A; --on-accent: #0C0D10;
  --ok: #3CC47D; --ok-soft: #12261B; --warn: #FFC56E; --warn-soft: #2A2112;
  --bad: #FF6257; --bad-soft: #2A1514; --bad-line: #4A2422;
  --logo: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1 { font: 700 26px/1.2 var(--body); letter-spacing: -.01em; margin: 0; }
h2 { font: 700 16px/1.3 var(--body); margin: 0 0 6px; }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* frame ("Apple minimal", Henry 13 Oct 2026, docs/REDESIGN_DESIGN.md): the logo stacked like the app icon top-left, the
   menu in work order, the shop at the bottom (= Account) with a small, readable Log out */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 28px 16px 22px; display: flex; flex-direction: column; }
.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; align-self: flex-start; margin: 0 0 34px 12px; text-decoration: none; }
.logo img { height: 20px; display: block; filter: var(--logo); }
.logo .product { font-size: 17px; color: var(--ink-2); letter-spacing: .03em; transform: none; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; }
.nav a:hover { background: rgb(0 0 0 / .04); }
.nav a[aria-current] { background: var(--surface); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .06); }
.nav svg { width: 19px; height: 19px; flex: none; color: var(--ink-2); }
.nav a[aria-current] svg { color: var(--accent); }
.me { margin-top: auto; padding: 0 12px; }
.acct { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 8px; margin: 0 -8px;
  border-radius: 10px; color: var(--ink); text-decoration: none; }
.acct:hover, .acct[aria-current] { background: rgb(0 0 0 / .04); }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--page);
  font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.acct-txt { display: flex; flex-direction: column; min-width: 0; }
.acct-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct small { font-size: 12.5px; color: var(--ink-2); }
.me form, .phone-end form { margin: 0; }
button.out { background: none; border: 0; padding: 0; margin: 6px 0 0 42px; font-size: 13px; color: var(--ink-2); cursor: pointer; }   /* Henry 13 Oct: quiet but readable */
button.out:hover { color: var(--ink); text-decoration: underline; }
[data-theme="dark"] .nav a:hover, [data-theme="dark"] .acct:hover, [data-theme="dark"] .acct[aria-current] { background: rgb(255 255 255 / .06); }
/* Morning / Night (on the Account page since 13 Oct) */
.look { display: grid; grid-template-columns: 1fr 1fr; max-width: 280px; background: var(--hover); border-radius: 9px; padding: 3px; }
.look button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; border-radius: 7px; padding: 7px 4px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.look button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.look svg { width: 15px; height: 15px; flex: none; }
button.link { background: none; border: 0; color: var(--ink-2); padding: 6px 8px; border-radius: 8px; cursor: pointer; font-weight: 500; text-align: left; }
button.link:hover { color: var(--ink); background: var(--hover); }
.main { min-width: 0; }
.page { padding: 44px clamp(16px, 4vw, 56px) 64px; max-width: 1036px; width: 100%; }
.page.solo { margin: 0 auto; }
.topbar, .tabs, .phone-end { display: none; }
/* the message in the middle of the screen (Henry 13 Oct: "top there, hard to notice"): ✓ done, ! not done; app.js fades it */
.pop-back { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgb(0 0 0 / .18); transition: opacity .4s; }
.pop-back.gone { opacity: 0; pointer-events: none; }
.pop { width: min(300px, 100%); background: var(--surface); border-radius: 20px; padding: 28px 24px 24px; text-align: center; box-shadow: 0 24px 60px rgb(0 0 0 / .18); }
.pop p { margin: 0; font: 600 16.5px/1.4 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.pop-ic { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 14px; border-radius: 50%; color: var(--on-accent);
  font-size: 25px; font-weight: 700; animation: pop-in .4s var(--spring); }
.pop.ok .pop-ic { background: var(--ok); }
.pop.ok .pop-ic::before { content: "✓"; }
.pop.bad .pop-ic { background: var(--warn); }
.pop.bad .pop-ic::before { content: "!"; }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* page heading: title on the left, buttons on the right, one line under it */
.head { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { margin-right: auto; }
.head .sub { width: 100%; margin: -4px 0 0; color: var(--ink-2); display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.head-note { margin: 0; flex-basis: 100%; }
.back { margin: 0 0 12px; }
.back a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.back a:hover { color: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.panel.narrow { max-width: 480px; }
.panel.wide-ok { max-width: 640px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.grid-2 .panel { margin: 0; display: flex; flex-direction: column; }
.grid-2 .panel form { margin-top: auto; padding-top: 12px; }
.grid-2 .panel.wide { grid-column: 1 / -1; }
.sec-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 30px 0 12px; }
.head + .sec-title { margin-top: 0; }
.stats-head { margin-bottom: 12px; }
.stats-head h2 { margin: 0 auto 0 0; }
.empty { text-align: center; padding: 40px 24px; }
.empty .btn { margin-top: 8px; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 4px 10px 4px 8px; border-radius: 999px; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--bad-soft); color: var(--bad); }
.temp { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.temp-pw { font-size: 28px; letter-spacing: .08em; color: var(--accent); margin: 6px 0 8px; user-select: all; }

/* state: a coloured dot + words (green playing, blue downloading, grey waiting, red offline / problem) */
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink-2); }
.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.state.s-playing i { background: var(--ok); }
.state.s-downloading i { background: var(--accent); }
.state.s-offline, .state.s-problem { color: var(--bad); font-weight: 600; }
.state.s-offline i, .state.s-problem i { background: var(--bad); }
.state.s-offline.quiet { color: var(--ink-2); font-weight: 500; }   /* offline for less than the alert time: not red yet */
.state.s-offline.quiet i { background: var(--ink-3); }
.dot-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink-2); }
.dot-state::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dot-state.on::before { background: var(--ok); }
.dot-state.off { color: var(--bad); font-weight: 600; }

/* table */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--ink-3); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  padding: 11px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table a { text-decoration: none; font-weight: 600; color: var(--ink); }
.table a:hover { color: var(--accent); }

/* MEGRA admin: three number boxes, the TVs that need help (red), search */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.stat b { display: block; font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-weight: 500; }
.stat.bad { border-color: var(--bad-line); }
.stat.bad b, .stat.bad span { color: var(--bad); }
.stat.bad:hover { background: var(--bad-soft); }
.needs { display: flex; gap: 14px; align-items: flex-start; background: var(--bad-soft); border: 1px solid var(--bad-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 24px; }
.needs-ic { width: 22px; height: 22px; color: var(--bad); flex: none; margin-top: 1px; }
.needs ul { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: grid; gap: 12px; }
.needs li { display: flex; align-items: center; gap: 14px; }
.needs li + li { border-top: 1px solid var(--bad-line); padding-top: 12px; }
.needs p { margin: 0 auto 0 0; color: var(--ink-2); min-width: 0; }
.needs p b { color: var(--ink); font-weight: 600; }
.needs .more { color: var(--ink-2); }
.tv-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; display: block; flex: 1 1 260px; max-width: 420px; }
.search svg { position: absolute; left: 13px; top: 12px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.tv-filter .search input { padding-left: 40px; }
.tv-filter select { width: auto; max-width: 220px; }
.tv-filter .export { margin-left: auto; }
.chev { color: var(--ink-3); font-size: 18px; text-align: right; }
.warn { display: block; font-size: 13.5px; color: var(--warn); background: var(--warn-soft); padding: 6px 10px; border-radius: 8px; }

/* page title (redesign 13 Oct): a big title, its buttons on the right (pill shaped, like the mock-ups) */
.top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 4px; }
.top h1 { font: 700 34px/1.1 var(--display); letter-spacing: -.02em; margin: 0 auto 0 0; }
.top .btn, .first .btn { border-radius: 999px; }
.btn.quiet { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgb(0 0 0 / .06); }
.btn.quiet:hover { background: var(--hover); }
.btn.big { height: 46px; padding: 0 26px; font-size: 16px; }
.lead { color: var(--ink-2); margin: 8px 0 26px; max-width: 62ch; }

/* My TVs (mock-ups docs/mockups/2026-10-13-mytvs/apple.html, step1.html): one sentence, one list per location, links below */
.sum { display: flex; align-items: center; gap: 8px; margin: 10px 0 34px; font-size: 16px; font-weight: 500; color: var(--ink-2); }
.sum i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.sum.bad { color: var(--bad); }
.sum.bad i { background: var(--bad); }
.sum.ok { color: var(--ok); }
.sum.ok i { background: var(--ok); }
.sum + .tv-filter { margin: -16px 0 26px; }
.loc { margin: 0 0 28px; }
.loc-name { font: 600 13px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin: 0; padding: 0 18px 8px; }
.rows { background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.tv-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 16px; padding: 14px 18px;
  color: var(--ink); text-decoration: none; }
.tv-row + .tv-row::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; height: 1px; background: var(--line); }
.tv-row:hover { background: var(--hover); }
.tv-main { display: grid; min-width: 0; }
.tv-name { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.tv-sub { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.tv-warn { font-size: 13.5px; color: var(--warn); overflow-wrap: anywhere; }   /* needs setting up (FIX_LATER 26b) */
.loc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit;
  letter-spacing: inherit; text-transform: inherit; cursor: pointer; }   /* a location's name opens its box (FIX_LATER 26c) */
.loc-btn:hover { color: var(--ink); }
.loc-btn .chev { font-size: 16px; color: var(--ink-3); }
.loc-empty { margin: 0; padding: 14px 18px; font-size: 14px; color: var(--ink-2); }
.tv-row .state { font-size: 14px; font-weight: 400; }
.tv-row .state.s-playing { color: var(--ok); }
.tv-row .chev { font-size: 20px; line-height: 1; }
.foot { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 34px 18px 0; font-size: 13px; color: var(--ink-2); }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.first { margin: 56px auto 0; max-width: 980px; text-align: center; }   /* a new customer: nothing yet, one thing to do */
.first h2 { font: 700 26px/1.2 var(--display); letter-spacing: -.01em; margin: 0 0 8px; }
.first p { color: var(--ink-2); font-size: 16px; margin: 0 0 26px; }
/* where to get the app, each step with its real picture (Henry 15 Oct: like a new Google TV's setup) */
.first-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 26px 0 30px; padding: 0; text-align: left; }
.first-steps li { counter-increment: step; display: grid; align-content: start; gap: 14px; }
.first-steps img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #0A0D13; border: 5px solid #1B1E24; box-shadow: 0 10px 28px rgba(10, 13, 19, .16); }
.first-steps img.web { background: #fff; border-color: var(--line); }
.first-steps span { position: relative; padding-left: 38px; color: var(--ink-2); font-size: 15.5px; line-height: 1.45; }
.first-steps span::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--page); font: 600 14px/26px var(--body); text-align: center; }
@media (max-width: 760px) { .first-steps { grid-template-columns: minmax(0, 1fr); max-width: 420px; margin-inline: auto; gap: 26px; } }

/* A location's box on My TVs (FIX_LATER 26c): its name, what its TVs play (+ Change), its kiosks, Add kiosk, Delete location */
.pop .sheet-label { margin: 18px 0 6px; font: 400 13px/1.4 var(--body); color: var(--ink-2); }
.switch-form { display: flex; gap: 6px; }
.switch-form select { max-width: 180px; }
.pop.loc-sheet .btn { margin: 0; width: auto; flex: 0 0 auto; }
.loc-sheet .switch-form select { flex: 1; max-width: none; }
.kiosk-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.kiosk-line form { margin: 0; }
.kiosk-line .name-form { flex: 1 1 100%; }
.kiosk-line .name-form input { height: 42px; font-size: 15px; }
.kiosk-line .switch-form { flex: 1; }
.kiosk-add { margin-top: 4px; }
.new-loc { margin-top: 10px; }

/* My TVs after Add TV (step3.html): what's next, and the live Connecting box (a wave only while really waiting) */
.next { display: flex; align-items: center; gap: 22px; background: var(--surface); border-radius: 16px; padding: 22px 24px; margin: -10px 0 30px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.next-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.next-ic svg { width: 24px; height: 24px; }
.next h3 { margin: 0 0 2px; font: 600 17px var(--display); }
.next p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.next .btn { margin-left: auto; border-radius: 999px; }
.pop small { display: block; margin-top: 5px; color: var(--ink-2); font-size: 14px; }
.pop small:empty { display: none; }
.pop .btn { margin-top: 16px; width: 100%; border-radius: 999px; }
.pop.wait .pop-ic { background: none; animation: none; }
.pop:not(.wait) .wave { display: none; }
.wave { display: inline-flex; gap: 7px; }
.wave i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: wave 1.2s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .15s; }
.wave i:nth-child(3) { animation-delay: .3s; }
@keyframes wave { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-6px); opacity: 1; } }

/* Add a TV (step2.html): one white card; the code in 6 boxes; Location + Name side by side; where the TV's logo is */
.add-card { background: var(--surface); border-radius: 16px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); padding: 28px 30px; max-width: 620px; margin-top: 22px; }
.add-card .field { margin: 0 0 26px; border: 0; padding: 0; min-width: 0; }
.add-card .label, .add-card label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 4px; padding: 0; }
.add-card .pair label { margin-bottom: 8px; }
.add-card .hint { font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; }
.add-card .hint.after { margin: 6px 0 0; }
.add-card input:where(:not([type=radio])), .add-card select { height: 48px; border-radius: 12px; font-size: 16px; }
.digits { display: flex; gap: 8px; align-items: center; }
.add-card .digits input { width: 48px; height: 58px; padding: 0; text-align: center; font: 600 26px var(--display); }
.digits .gap { width: 10px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.shapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.add-card .shape { position: relative; display: grid; justify-items: center; margin: 0; padding: 18px 10px 14px; border: 1px solid var(--line-2); border-radius: 14px;
  text-align: center; font-size: 14px; font-weight: 500; cursor: pointer; align-content: end; }   /* words on one line across the 3 pictures */
.shape input { position: absolute; opacity: 0; pointer-events: none; }
.shape:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.shape:has(input:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.shape small { display: block; color: var(--ink-2); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.same-tv label.opt { display: flex; align-items: center; flex-wrap: nowrap; padding: 12px 14px; margin: 0 0 8px; }   /* .add-card label is block, no padding */
.same-tv .opt > span:not(.tick) { flex: 1; }
.same-tv .opt .tick { flex: none; }
.same-tv .opt small { display: block; font-weight: 400; color: var(--ink-2); margin-top: 3px; }
.tv2 { position: relative; margin: 0 auto 12px; background: #0A0D13; border: 3px solid #1B1E24; border-radius: 5px; display: grid; place-items: center;
  color: #EEF2FF; font-size: 17px; }
.tv2 b { font-weight: 400; }
.tv2.landscape { width: 92px; height: 54px; border-bottom-width: 10px; }
.tv2.portrait_right, .tv2.portrait_left { width: 44px; height: 70px; }
.tv2.portrait_right { border-left-width: 10px; }
.tv2.portrait_left { border-right-width: 10px; }
.tv2 i { position: absolute; background: #C9CED6; border-radius: 2px; }   /* the TV's logo */
.tv2.landscape i { width: 14px; height: 3px; left: 50%; bottom: -7px; transform: translateX(-50%); }
.tv2.portrait_right i { width: 3px; height: 14px; top: 50%; left: -7px; transform: translateY(-50%); }
.tv2.portrait_left i { width: 3px; height: 14px; top: 50%; right: -7px; transform: translateY(-50%); }
.btn.wide { width: 100%; height: 48px; font-size: 16px; border-radius: 999px; }
.shape { position: relative; display: grid; justify-items: center; align-content: end; margin: 0; padding: 14px 6px 12px; border: 1px solid var(--line-2);
  border-radius: 14px; background: var(--surface); color: var(--ink); text-align: center; font: 500 14px var(--body); cursor: pointer; }
.shape[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }

/* One TV (redesign step 5; mock-up tv.html): one status line, the picture, one settings list, boxes in the middle */
.stline { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 8px 0 0; font-size: 15.5px; }
.stline .st-loc { color: var(--ink-2); }
.stline .st-loc::after { content: " ·"; }
.stline .state { font-size: 15.5px; }
.st-detail { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.stline ~ .warn { margin-top: 10px; max-width: 640px; }
.stline ~ .tvgrid { margin-top: 22px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; }
.shotcard { background: var(--surface); border-radius: 16px; padding: 14px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.shotcard .pic { display: grid; place-items: center; aspect-ratio: 16 / 9; background: #0A0D13; border: 5px solid #1B1E24; border-radius: 9px; overflow: hidden; }
.shotcard .pic.portrait { aspect-ratio: 9 / 16; width: min(100%, calc(70vh * 9 / 16)); margin: 0 auto; }
.shotcard .pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pic-text { color: #6E7480; font-size: 14px; padding: 12px; text-align: center; }
.shotrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 4px 2px; font-size: 13.5px; color: var(--ink-2); }
.shotrow form { margin: 0; }
.shotrow .btn { border-radius: 999px; }
.settings { background: var(--surface); border-radius: 16px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); overflow: hidden; }
.srow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; gap: 12px; align-items: center; width: 100%; padding: 15px 18px;
  border: 0; background: none; color: var(--ink); font: 400 15.5px var(--body); text-align: left; cursor: pointer; }
.srow + .srow::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; height: 1px; background: var(--line); }
.srow:hover { background: var(--hover); }
.srow .v { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.srow .chev { color: var(--ink-3); }
.mk { display: inline-block; vertical-align: -2px; margin-right: 6px; width: 18px; height: 11px; background: #0A0D13; border-radius: 2px; border: 0 solid #9AA0A8; border-bottom-width: 3px; }
.mk.portrait_right, .mk.portrait_left { width: 9px; height: 15px; border-bottom-width: 0; }
.mk.portrait_right { border-left-width: 3px; }
.mk.portrait_left { border-right-width: 3px; }
.about { margin-top: 18px; background: var(--surface); border-radius: 16px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.about summary { list-style: none; padding: 14px 18px; font-size: 15px; color: var(--ink-2); cursor: pointer; display: flex; justify-content: space-between; }
.about summary::-webkit-details-marker { display: none; }
.about[open] summary { border-bottom: 1px solid var(--line); }
.about dl { margin: 0; padding: 6px 18px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 13.5px; }
.about dt { color: var(--ink-2); }
.about dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.remove-row { display: block; width: 100%; margin: 18px 0 0; background: var(--surface); border: 0; border-radius: 16px; padding: 14px 18px; color: var(--bad);
  font: 400 15.5px var(--body); text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.remove-row:hover { background: var(--bad-soft); }
.sheet { width: min(400px, 100%); text-align: left; padding: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.sheet h3 { margin: 0 0 14px; text-align: center; font: 600 18px var(--display); }
.opts { display: grid; gap: 2px; margin: 0; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-radius: 11px; background: none;
  color: var(--ink); font: 400 15.5px var(--body); text-align: left; cursor: pointer; }
.opt:hover { background: var(--hover); }
.opt .tick { visibility: hidden; }
.opt[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.opt[aria-pressed="true"] .tick { visibility: visible; }
/* a choice that waits for Send (TV page Playing box, Henry 15 Oct): the radio is hidden, the row shows the choice */
label.opt { cursor: pointer; border: 1px solid var(--line-2); margin-bottom: 6px; }   /* looks like a choice, not plain text */
label.opt .tick { visibility: visible; color: transparent; width: 22px; height: 22px; border: 2px solid var(--line-2); border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; }
label.opt:has(input:checked) .tick { color: #fff; background: var(--accent); border-color: var(--accent); }
label.opt input { position: absolute; opacity: 0; pointer-events: none; }
label.opt:has(input:checked) { background: var(--accent-soft); color: var(--accent); font-weight: 600; border-color: var(--accent); }
label.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.opts > .btn { margin-top: 12px; }
.tv-pl.none { color: var(--warn); }   /* added, no playlist chosen yet */
.cancel { display: block; width: 100%; margin-top: 10px; padding: 8px; border: 0; background: none; color: var(--ink-2); font: 400 14px var(--body); cursor: pointer; }
.cancel:hover { color: var(--ink); }
.pop .sheet-note { margin: 12px 0 0; font: 400 13px/1.45 var(--body); color: var(--ink-2); text-align: center; }
.sheet-note a { color: var(--accent); text-decoration: none; }
.name-form { margin: 0; }
.name-form input { height: 48px; border-radius: 12px; font-size: 16px; }
.sheet .shapes { gap: 8px; }
@media (max-width: 820px) { .stline ~ .tvgrid { grid-template-columns: minmax(0, 1fr); } }

/* Account (redesign step 7; mock-up account.html): like iPhone Settings */
.acc-who { display: flex; align-items: center; gap: 14px; margin: 22px 0 22px; }
.mark.big { width: 52px; height: 52px; font-size: 17px; }
.acc-name { font: 600 18px var(--display); }
.acc-login { font-size: 14px; color: var(--ink-2); }
.acc-list { max-width: 620px; margin-bottom: 18px; }
.acc-alerts { cursor: default; margin: 0; grid-template-columns: minmax(0, 1fr) auto; }
.acc-alerts:hover, .acc-look:hover { background: none; }
.acc-alerts-txt { display: grid; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.acc-alerts-txt small { font-size: 13px; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.acc-look { grid-template-columns: minmax(0, 1fr) auto; cursor: default; }
.acc-look .look { width: 220px; }
.srow.red { color: var(--bad); grid-template-columns: 1fr; }
.acc-note { max-width: 620px; margin: -8px 0 18px; font-size: 13px; color: var(--warn); }
.acc-legal { margin: 26px 0 0; font-size: 13px; color: var(--ink-2); }
.acc-legal a { color: var(--ink-2); text-decoration: none; }
.acc-legal a:hover { color: var(--ink); text-decoration: underline; }
.acc-legal + .acc-legal { margin-top: 10px; }
.acc-del { padding: 0; border: 0; background: none; font: inherit; color: var(--bad); cursor: pointer; }   /* V1_PLAN A3: small, at the bottom */
.acc-del:hover { text-decoration: underline; }
/* a box that opens gently (V1_PLAN A2: the e-mail address box, "no sudden pop-up") */
.pop-back.soft:not([hidden]) { animation: soft-in .25s ease-out; }
.pop-back.soft:not([hidden]) .pop { animation: sheet-in .35s var(--spring); }
@keyframes soft-in { from { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.acc-form { gap: 12px; margin-top: 8px; }
.acc-form .btn.wide { margin-top: 4px; }
.sheet .error { margin: 10px 0 0; }
.switch { appearance: none; -webkit-appearance: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 999px; background: var(--line-2);
  cursor: pointer; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / .2); transition: transform .2s var(--spring); }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
@media (max-width: 820px) { .acc-look .look { width: 180px; } }
@media (max-width: 820px) {
  .next { flex-wrap: wrap; gap: 14px 16px; padding: 18px; }
  .next > div { flex: 1 1 200px; }
  .next .btn { margin: 0; width: 100%; }
  .add-card { padding: 22px 18px; }
  .add-card .digits input { width: 40px; height: 52px; font-size: 22px; }
  .digits { gap: 8px; }
  .shapes { gap: 8px; }
  .add-card .shape { padding: 14px 6px 12px; }
}

/* MEGRA admin: plain lists (no pictures), short words */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.list-head, .list-row { display: grid; align-items: center; gap: 4px 16px; padding: 12px 18px; }
.list-head { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line);
  padding-top: 10px; padding-bottom: 10px; }
.list-row { color: var(--ink); text-decoration: none; min-width: 0; }
.list-row + .list-row { border-top: 1px solid var(--line); }
a.list-row:hover { background: var(--hover); }
.list-row > * { min-width: 0; overflow-wrap: anywhere; }
.list-row .name { font-weight: 600; color: var(--ink); text-decoration: none; }
.list-row a.name:hover { color: var(--accent); }
.cols-customers { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 70px minmax(0, 1fr) 130px 20px; }
.cols-their-tvs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 20px; }
.look-row { margin-top: 16px; }
.cols-tvs { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 20px; }
.pl-changed { color: var(--warn); font-weight: 500; }
/* Playlists (redesign step 6; mock-up playlists.html): one plain sentence per playlist */
.pls { margin-top: 26px; background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.plrow2 { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 14px; gap: 12px; align-items: center; padding: 18px 22px; color: var(--ink); text-decoration: none; }
.plrow2 + .plrow2::before { content: ""; position: absolute; top: 0; left: 22px; right: 0; height: 1px; background: var(--line); }
.plrow2:hover { background: var(--hover); }
.plname { font: 600 18px var(--display); overflow-wrap: anywhere; }
.plsent { font-size: 15px; color: var(--ink-2); margin-top: 3px; }
.top .btn { cursor: pointer; }
.name-form .btn.wide { margin-top: 14px; }
.cols-files { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 100px; }
.tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.tools form { margin: 0; }
.tools button.link, .tools a { padding: 2px 4px; color: var(--ink-2); font-size: inherit; }
.admin-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.admin-row h2 { margin: 0 6px 0 0; font-size: 15px; }
.panel.admin-row { gap: 12px 28px; }
.admin-row form { margin: 0; }
.admin-row .quota-gb { width: 80px; }

/* one TV: the picture (the only page with one) beside the facts, then the TV's settings */
.tvgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.shot { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.shot .pic { display: grid; place-items: center; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.shot .pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shot .pic.portrait { aspect-ratio: 9 / 16; width: min(100%, calc(70vh * 9 / 16)); margin: 0 auto; }   /* a portrait TV: the shape its viewers see */
.pic-none { width: 44px; height: 44px; color: #3a3f47; }
.shot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; color: var(--ink-2); font-size: 14px; flex-wrap: wrap; }
.shot-row form { margin: 0; }
.shot > p { margin: 10px 0 0; }
.facts-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts { margin: 0; }
.facts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--ink-2); flex: none; }
.facts dd { margin: 0; font-weight: 600; text-align: right; display: grid; justify-items: end; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.facts .line { font-weight: 500; }
.facts dd br { display: none; }   /* dd is a grid: each part is already its own line */
.facts.quiet { border-top: 1px solid var(--line); background: var(--hover); }
.facts.quiet div { padding: 9px 18px; font-size: 14px; }
.facts.quiet dd { font-weight: 500; color: var(--ink-2); }
.facts-card .warn { margin: 0 18px 12px; }
.facts-card .help { margin: 0; padding: 0 18px 14px; color: var(--ink-2); font-size: 14px; }
.panel .facts { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; }
.tv-line { margin: 0 0 8px; color: var(--ink); }
.snap-pic { display: block; max-width: 100%; max-height: 70vh; height: auto; margin: 4px 0 16px; border-radius: 8px; background: #000; }

/* a TV drawn in CSS (Add TV): the thick edge is the TV's bottom edge (where its logo is) */
.tv-shape { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 28px; border: 2px solid var(--ink-3);
  border-bottom-width: 5px; border-radius: 4px; color: var(--accent); font-weight: 700; }
.tv-shape.portrait_right { width: 28px; height: 44px; border-width: 2px 2px 2px 5px; }
.tv-shape.portrait_left { width: 28px; height: 44px; border-width: 2px 5px 2px 2px; }
.tv-shape.big { width: 96px; height: 60px; border-bottom-width: 8px; font-size: 22px; }
.tv-shape.big.portrait_right { width: 60px; height: 96px; border-width: 2px 2px 2px 8px; }
.tv-shape.big.portrait_left { width: 60px; height: 96px; border-width: 2px 8px 2px 2px; }
.orient { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.orient legend { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 10px; padding: 0; }
.orient > small { grid-column: 1 / -1; }
.form .orient-card { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 18px 12px; text-align: center;
  border-radius: 12px; cursor: pointer; color: var(--ink); min-height: 190px; background: var(--surface); border: 1px solid var(--line); }
.orient-card .tv-shape { margin: 4px 0 6px; }
.orient-card input { position: absolute; opacity: 0; pointer-events: none; }
.orient-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.orient-card:has(input:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.orient-name { font-weight: 600; font-size: 14px; }
.code-input { font-size: 26px !important; letter-spacing: .2em; height: 60px !important; }

/* bars (5 % steps: no inline styles under the page's security rules) */
.w0 { width: 0%; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; }
.w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; }
.w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }

/* Photos & videos (redesign step 3; mock-ups step4.html, step4b.html): slim drop bar, the upload list split Videos / Photos,
   tiles split Videos / Photos with a blue "New", what's next */
.quota { margin: -8px 0 24px; max-width: 420px; }   /* MEGRA admin, a customer's storage */
.quota-bar { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.quota-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.media-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-line { margin: 10px 0 30px; font-size: 16px; color: var(--ink-2); }
.top label.btn { cursor: pointer; }
.drop { display: flex; align-items: center; gap: 18px; margin: 22px 0 0; padding: 18px 22px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--surface); }
.drop-ic { width: 48px; height: 48px; flex: none; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.drop-ic svg { width: 24px; height: 24px; }
.drop-txt { flex: 1; min-width: 0; }
.drop h2 { font: 700 17px var(--display); margin: 0; }
.drop small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13px; }
.drop .btn { border-radius: 999px; cursor: pointer; }
body.dropping .page { outline: 2px dashed var(--accent); outline-offset: -8px; border-radius: 16px; }   /* a file held over the page */
.uploads { margin: 22px 0 30px; background: var(--surface); border-radius: 16px; padding: 8px 20px 14px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.uphead { padding: 14px 0 2px; font: 600 12.5px var(--body); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.up-list { list-style: none; margin: 0; padding: 0; }
.up-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.uth { display: block; width: 56px; height: 34px; border-radius: 7px; overflow: hidden; background: #0E1013; }
.uth img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-main { display: grid; gap: 7px; min-width: 0; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-bar { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
.up-state { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.up-list li.done .up-state { color: var(--ok); font-weight: 500; }
.up-list li.done .up-bar i { background: var(--ok); }
.up-list li.failed .up-state { color: var(--bad); white-space: normal; }
.keep { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
.keep:empty { display: none; }
.small-btn { height: 34px; padding: 0 14px; font-size: 13px; grid-column: 1 / -1; justify-self: start; }
.next select { width: auto; max-width: 200px; }
.sect { font: 600 13px var(--body); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); margin: 26px 4px 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.tile { margin: 0; background: var(--surface); border-radius: 14px; padding: 10px 10px 12px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); min-width: 0; }
.tth { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #000; margin-bottom: 10px; text-decoration: none; }
.tth img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tth.video { display: grid; place-items: center; background: #0E1013; }
.tth b { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .12); color: #fff; font-size: 15px; padding-left: 3px; }
.tth em { position: absolute; right: 8px; bottom: 8px; font: 500 12px var(--body); color: #fff; background: rgb(0 0 0 / .5); padding: 2px 7px; border-radius: 999px; }
.newtag { position: absolute; left: 8px; top: 8px; z-index: 1; font: 600 11.5px var(--body); color: #fff; background: var(--accent); padding: 3px 8px; border-radius: 999px; }
[data-theme="dark"] .newtag { color: var(--on-accent); }
.tile figcaption { display: grid; gap: 1px; padding: 0 4px; }
.tname { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsub { font-size: 13px; color: var(--ink-2); }
.tile form { margin: 4px 0 0; }
button.danger-link { color: var(--bad); padding: 0; font-size: 13px; }
button.danger-link:hover { background: none; text-decoration: underline; }
@media (max-width: 820px) {
  .drop { flex-wrap: wrap; }
  .drop .btn { width: 100%; }
  .up-list li { grid-template-columns: 44px minmax(0, 1fr); }
  .uth { width: 44px; height: 28px; }
  .up-state { grid-column: 2; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* One playlist (redesign step 4; mock-ups step5.html, step6.html): the list on the left, Preview + Send on the right.
   TV pictures stay dark, like a TV. */
.pill { align-self: center; font-size: 13px; color: var(--ink-2); background: var(--surface); border-radius: 999px; padding: 5px 12px; box-shadow: 0 1px 2px rgb(0 0 0 / .06); }
a.pill, button.pill { border: 0; font-family: inherit; text-decoration: none; cursor: pointer; }   /* tap = which TVs (FIX_LATER 26a) */
a.pill:hover, button.pill:hover { color: var(--ink); }
a.opt { text-decoration: none; }
.opt .chev { color: var(--ink-3); }
.top:has(.pill) h1 { margin-right: 0; }
.top .pill { margin-right: auto; }
.plgrid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; margin-top: 24px; align-items: start; }
.pl-card { background: var(--surface); border-radius: 16px; padding: 8px 20px 16px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); margin-bottom: 18px; }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0 8px; font-size: 13px; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.cardhead .secs { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; }
.pl-list { list-style: none; margin: 0; padding: 0; }
.pl-item { display: grid; grid-template-columns: 22px 56px minmax(0, 1fr) auto auto 20px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); cursor: grab; }
.pl-item.dragging { opacity: .4; }
.pl-item img, .pl-item .pl-vid, .pl-item .wg-mini { width: 56px; height: 34px; border-radius: 7px; object-fit: contain; background: #000; display: block; }
.pl-item .pl-vid, .pl-vid { display: grid; place-items: center; background: #0E1013; color: #fff; font-size: 12px; }
.pl-num { color: var(--ink-3); font-size: 14px; text-align: center; }
.pl-info { display: grid; min-width: 0; }
.pl-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-kind { font-size: 13px; color: var(--ink-2); }
.time { font: 600 14px var(--body); color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer; white-space: nowrap; }
.time::after { content: " ▾"; font-size: 10px; }
.len { font-size: 14px; color: var(--ink-2); padding: 5px 12px; }
.pl-ctl { display: flex; gap: 2px; }
.icon-btn { width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 12px; }
.icon-btn:hover { color: var(--ink); background: var(--hover); }
.grip { color: var(--ink-3); letter-spacing: -2px; cursor: grab; user-select: none; }
.pl-empty { margin: 8px 0; }
.addmore { display: block; margin-top: 12px; padding: 0; border: 0; background: none; color: var(--accent); font: 500 15px var(--body); cursor: pointer; }
.pl-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 8px; }
.lib-item { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 8px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; min-width: 0; }
.lib-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.lib-item img, .lib-item .pl-vid, .lib-item .wg-mini { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; background: #000; border-radius: 6px; display: grid; }
.lib-item > span:nth-child(2) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-add { color: var(--accent); font-weight: 600; }
.sendbox { position: sticky; top: 24px; background: var(--surface); border-radius: 16px; padding: 18px; display: grid; gap: 10px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.mini-tv { aspect-ratio: 16 / 9; background: #0A0D13; border: 4px solid #1B1E24; border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
.mini-tv img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mini-tv .pl-vid { width: 100%; height: 100%; font-size: 22px; }
.sendbox .btn { border-radius: 999px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* a long TV name never widens the page (review 14 Oct) */
@media (max-width: 520px) { .sendbox { grid-template-columns: minmax(0, 1fr) !important; } }
.sendbox small { color: var(--ink-2); font-size: 12.5px; text-align: center; }
.pl-settings .pl-card { padding: 16px 20px; display: grid; gap: 12px; max-width: 620px; }
.pl-delete { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; }
/* the time box (tap a photo's time) and the Sending box (a bar from the TV's bytes, the time left from its speed) */
.time-pop { text-align: left; }
.time-pop h3 { margin: 0 0 14px; font: 600 18px var(--display); }
.time-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.time-choices .btn { border-radius: 12px; height: 44px; }
.time-choices .btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.time-other { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--ink-2); font-size: 14px; }
.time-other input { width: 90px; height: 40px; }
.pop-bar { display: block; height: 5px; border-radius: 3px; background: var(--line); margin: 14px auto 0; width: 80%; overflow: hidden; }
.pop-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
.eta { display: inline-flex; margin-top: 12px; font: 500 13px var(--body); color: var(--ink-2); background: var(--hover); padding: 5px 11px; border-radius: 999px; }
.wg-mini { width: 72px; height: 45px; border-radius: 6px; display: grid; place-items: center; padding: 4px; text-align: center; font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; color: #A5C1FF; background: #15171B; }
.lib-item .wg-mini { width: 100%; height: auto; aspect-ratio: 16 / 10; font-size: 11px; }
.lay-group { margin-top: 16px; }
.lay-shape { margin: 0 0 10px; color: var(--ink-2); font-weight: 500; }
.lay-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.lay-tile { display: grid; gap: 8px; justify-items: center; align-content: start; padding: 10px; border-radius: 10px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.lay-tile:hover { border-color: var(--line-2); background: var(--hover); }
.lay-tile.on { background: var(--accent-soft); border-color: var(--accent); }
.lay-pic { position: relative; display: block; width: 100%; background: #000; border-radius: 4px; }
.lay-pic.landscape { aspect-ratio: 16 / 9; }
.lay-pic.portrait { aspect-ratio: 9 / 16; width: 46%; }
.lay-pic i { position: absolute; display: block; border: 1px solid #000; border-radius: 3px; }
.lay-pic .ad { background: #3d4870; }
.lay-pic .bx { background: rgb(123 164 255 / .35); }
.lay-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.lay-boxes label { display: grid; gap: 6px; color: var(--ink-2); }
.lay-boxes select { height: 40px; font-size: 14px; }
.lay-hint { margin: 10px 0 0; }
.top-ed { margin-top: 20px; }
.top-ed .lay-hint { margin: 0 0 12px; max-width: 62ch; }
.top-pic { position: relative; width: 100%; max-width: 640px; background: #000; border-radius: 6px; overflow: hidden; user-select: none; }
.top-pic.landscape { aspect-ratio: 16 / 9; }
.top-pic.portrait { aspect-ratio: 9 / 16; max-width: 300px; }
.top-pic i { position: absolute; display: block; border: 1px solid #000; border-radius: 3px; }
.top-pic .ad { background: #232a44; }
.top-pic .bx { background: rgb(123 164 255 / .16); }
.top-w { position: absolute; display: grid; place-content: center; gap: 2px; padding: 4px; text-align: center; border-radius: 8px; overflow: hidden;
  background: rgb(8 10 16 / .86); box-shadow: inset 0 0 0 1px #7BA4FF, 0 10px 24px -10px rgb(0 0 0 / .9); color: #EEF0F3;
  cursor: grab; touch-action: none; font-size: 12px; line-height: 1.2; }
.top-w.dragging { cursor: grabbing; box-shadow: inset 0 0 0 2px #7BA4FF, 0 16px 32px -12px rgb(0 0 0 / .9); }
.top-w:focus-visible { outline: 2px solid #3CC47D; outline-offset: 2px; }
.top-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-size { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; border-radius: 0 0 8px 0;
  background: linear-gradient(135deg, transparent 52%, #7BA4FF 52%); }
.top-list { display: grid; gap: 8px; max-width: 640px; margin-top: 12px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); }
.top-add { display: grid; gap: 6px; color: var(--ink-2); }
.top-add select { height: 40px; font-size: 14px; }
.pl-tvs { display: grid; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.pl-send-msg p { margin: 0 0 6px; }
.pl-send-msg.bad { color: var(--bad); }
.pl-send-msg:empty { display: none; }
.save-state { min-height: 1em; }
/* narrower screens: one column, Preview + Send above the list (the list gets the full width) */
@media (max-width: 1180px) { .plgrid { grid-template-columns: minmax(0, 1fr); } .sendbox { position: static; order: -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sendbox small, .sendbox .pl-send-msg { grid-column: 1 / -1; } .mini-tv { display: none; } }   /* Preview + Send above the list */
@media (max-width: 520px) { .pl-item { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 6px; } .pl-num, .grip { display: none; }
  .pl-item img, .pl-item .pl-vid, .pl-item .wg-mini { width: 44px; height: 28px; } .pl-ctl { grid-column: 1 / -1; justify-content: flex-end; } }

.admin-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -8px 0 24px; }
.admin-tools p { margin: 0 auto 0 0; }
.admin-tools form { margin: 0; }
.admin-tools .small-btn { grid-column: auto; }

/* forms and buttons */
.form { display: grid; gap: 16px; }
.form.row { display: flex; gap: 10px; align-items: center; }
.form.row input { flex: 1; min-width: 0; }
.form label { display: grid; gap: 7px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.form small { font-weight: 400; color: var(--ink-3); }
input:where(:not([type=checkbox], [type=hidden], [type=radio])), select {   /* :where = no weight, so page rules win */
  height: 42px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--field); font: 400 15px var(--body);
  color: var(--ink); width: 100%; }
input::placeholder { color: var(--ink-3); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid transparent;
  border-radius: 9px; background: var(--accent); color: var(--on-accent); font: 600 14.5px var(--body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--accent-hi); }
.btn-ic { display: none; }
.btn.plain, .btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.plain:hover, .btn.ghost:hover { background: var(--hover); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-soft); }
.error { background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad-line); border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; font-size: 14px; }
.note { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 10px 14px; margin: 0 0 20px; font-size: 14px; font-weight: 500; }

/* Widgets: your widgets (each drawn as the TV shows it), then the kinds you can add; one widget = settings + preview.
   A slide is drawn in a 16:9 box and every size follows the box width (cqw), so small and big previews match */
.wg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 12px; }
.wg-item { display: grid; gap: 2px; padding: 10px 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink); }
.wg-item:hover { border-color: var(--line-2); background: var(--hover); }
.wg-item .wg-tv { margin-bottom: 10px; }
.wg-item-name { font-weight: 600; padding: 0 4px; }
.wg-item > .small { padding: 0 4px; }
.wg-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wg-type { display: grid; gap: 4px; align-content: start; padding: 14px 16px; border-radius: 12px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); }
.wg-type:hover { border-color: var(--accent); background: var(--accent-soft); }
.wg-type-name { font-weight: 600; }
.wg-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.wg-side { position: sticky; top: 24px; }
.wg-preview .wg-tv { margin-top: 14px; }
.wg-note { margin: 14px 0 0; }
.wg-for { margin-top: 12px; align-items: end; }
.wg-for label { flex: 1; min-width: 0; }
@media (max-width: 960px) { .wg-layout { grid-template-columns: 1fr; } .wg-side { position: static; } }
.form .check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 400; color: var(--ink); cursor: pointer; }
textarea { min-height: 42px; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--field);
  font: 400 15px/1.45 var(--body); color: var(--ink); width: 100%; resize: vertical; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.swatches, .cur-grid { border: 0; padding: 0; margin: 0; min-width: 0; }
.swatches legend, .cur-grid legend { font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 10px; padding: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.form .swatch { position: relative; display: block; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.sw-dot { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--wa); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }
.swatch input:checked + .sw-dot { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.swatch input:focus-visible + .sw-dot { outline: 2.5px solid var(--accent); outline-offset: 6px; }
.cur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.cur-grid small { grid-column: 1 / -1; }
.place-form { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: end; margin-top: 12px; }
.place-form .btn { justify-self: start; }

/* the slide itself (what the TV draws), one accent colour per widget */
.ac-8b97ff { --wa: #8b97ff; } .ac-4fe3c9 { --wa: #4fe3c9; } .ac-ffc56e { --wa: #ffc56e; } .ac-ff8d7d { --wa: #ff8d7d; }
.ac-c49bff { --wa: #c49bff; } .ac-7cc8ff { --wa: #7cc8ff; } .ac-9be37a { --wa: #9be37a; } .ac-f2f4f8 { --wa: #f2f4f8; }
.wg-tv { container-type: inline-size; aspect-ratio: 16 / 9; padding: 4px; border-radius: 10px; background: #000;
  box-shadow: 0 0 0 1px var(--line); }
.wg { position: relative; height: 100%; border-radius: 6px; overflow: hidden; display: grid; place-items: center; text-align: center; color: #eef1f7;
  font-family: var(--display); line-height: 1.15;
  background: radial-gradient(90% 80% at 15% 0%, color-mix(in srgb, var(--wa) 24%, transparent), transparent 70%),
              radial-gradient(70% 70% at 100% 100%, color-mix(in srgb, var(--wa) 10%, transparent), transparent 70%), #05070c; }
.wg p { margin: 0; }
.wg-card { width: 84%; display: grid; gap: 1.4cqw; justify-items: center; padding: 3.2cqw 4cqw; border-radius: 2.6cqw; background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 0 0 .12cqw rgba(255, 255, 255, .12), inset 0 .14cqw 0 rgba(255, 255, 255, .10), 0 3cqw 6cqw -3cqw rgba(0, 0, 0, .7); }
.wg-big { font-size: 12cqw; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1; }
.wg-sub { font-size: 3.1cqw; color: rgba(255, 255, 255, .72); }
.wg-title { font-size: 4cqw; font-weight: 600; letter-spacing: -.02em; }
.wg-meta { font-size: 2.1cqw; color: rgba(255, 255, 255, .6); }
.wg-h { font-size: 6.2cqw; font-weight: 600; letter-spacing: -.03em; color: var(--wa); }
.wg-body { font-size: 2.9cqw; line-height: 1.35; color: rgba(255, 255, 255, .86); white-space: pre-line; max-width: 66cqw; }
.wg-src { font-size: 1.5cqw; color: rgba(255, 255, 255, .45); letter-spacing: .02em; }
.wg-none { font-size: 4cqw; color: rgba(255, 255, 255, .5); }
.wx-days { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1.8cqw; width: 100%; }
.wx-day { display: grid; gap: .5cqw; justify-items: center; padding: 1.6cqw 1cqw; border-radius: 1.8cqw; background: rgba(255, 255, 255, .04); }
.wx-ic { width: 6.6cqw; height: 6.6cqw; color: var(--wa); }
.wx-label { font-size: 1.8cqw; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.wx-temp { font-size: 5.2cqw; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wx-text { font-size: 2cqw; color: rgba(255, 255, 255, .86); }
.wx-when { font-size: 1.6cqw; color: rgba(255, 255, 255, .55); }
.pr-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(14cqw, 1fr)); gap: 1.2cqw; width: 100%; }
.pr-row { display: grid; gap: .4cqw; padding: 1.4cqw .8cqw; border-radius: 1.6cqw; background: rgba(255, 255, 255, .04); }
.pr-row span { font-size: 1.9cqw; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.pr-row b { font-size: 4cqw; font-weight: 600; font-variant-numeric: tabular-nums; }
.pr-row.is-extra b { font-size: 3cqw; color: rgba(255, 255, 255, .7); }
.pr-row.is-next { background: color-mix(in srgb, var(--wa) 20%, transparent); box-shadow: inset 0 0 0 .14cqw var(--wa); }
.pr-row.is-next span { color: var(--wa); }
.cd { display: flex; gap: 3.2cqw; justify-content: center; }
.cd-part { display: grid; justify-items: center; gap: .6cqw; }
.cd-n { font-size: 12cqw; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--wa); line-height: 1; }
.cd-u { font-size: 2.3cqw; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.tk { width: 100%; overflow: hidden; padding: 2.4cqw 0; background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 .14cqw 0 rgba(255, 255, 255, .12), inset 0 -.12cqw 0 rgba(255, 255, 255, .08); }
.tk-run { display: inline-block; padding-left: 100%; white-space: nowrap; font-size: 5.2cqw; font-weight: 600; animation: tk 20s linear infinite; }
@keyframes tk { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.qr-card { width: auto; max-width: 84%; padding: 2.6cqw 4cqw; }
.qr { width: 30cqw; height: 30cqw; border-radius: 1.2cqw; display: block; }
.qr-card .wg-src { max-width: 60cqw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-img { max-width: 60%; max-height: 60%; object-fit: contain; }
.op10 { opacity: .1; } .op20 { opacity: .2; } .op30 { opacity: .3; } .op40 { opacity: .4; } .op50 { opacity: .5; }
.op60 { opacity: .6; } .op70 { opacity: .7; } .op80 { opacity: .8; } .op90 { opacity: .9; } .op100 { opacity: 1; }
.rt-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(30cqw, 1fr)); gap: .9cqw 1.4cqw; width: 100%; }
.rt-row { display: flex; justify-content: space-between; align-items: baseline; gap: 2cqw; padding: 1.1cqw 2cqw; border-radius: 1.4cqw; background: rgba(255, 255, 255, .04); }
.rt-row span { font-size: 2.6cqw; font-weight: 600; letter-spacing: .06em; color: var(--wa); }
.rt-row b { font-size: 3.4cqw; font-weight: 600; font-variant-numeric: tabular-nums; }


/* login card */
body.bare { display: grid; place-items: center; padding: 24px 16px; }
.card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 30px; }
.brand, .card-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.card-brand { justify-content: center; margin-bottom: 24px; }
.card-brand img { height: 18px; display: block; filter: var(--logo); }
.product { font: 19px/1 "MEGRA", var(--body); color: var(--ink-3); letter-spacing: .02em; transform: translateY(1px); text-transform: lowercase; }
.card h1 { font-size: 24px; text-align: center; }
.card > .muted { text-align: center; margin: 8px 0 24px; }
.card .btn { width: 100%; margin-top: 6px; }
.card .empty { padding: 8px 0; }

/* S7 MEGRA monitoring: view-only pages */
.badge.view-only { background: var(--hover); color: var(--ink-2); }
.admin-links { display: flex; flex-wrap: wrap; gap: 10px; }
.ro-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.ro-list .media-name { white-space: normal; }
.warn-text { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* phone: a top bar with the name and Morning / Night, the menu as tabs at the bottom */
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 6px; }   /* logo + the shop's badge (Account) */
  .topbar .logo { margin: 0; }
  .topbar .logo img { height: 17px; }
  .topbar .logo .product { font-size: 15px; }
  .me-badge { text-decoration: none; }
  .page { padding: 12px 16px 100px; }
  .top h1 { font-size: 30px; flex-basis: 100%; }
  .top .btn { flex: 1 1 auto; }
  .tv-row { grid-template-columns: minmax(0, 1fr) 14px; row-gap: 4px; }   /* status under the name */
  .tv-row .state { grid-column: 1; grid-row: 2; }
  .tv-row .chev { grid-column: 2; grid-row: 1 / 3; }
  .loc-line.kiosk { padding-left: 30px; }
  .switch-form { flex-basis: 100%; }
  .head h1 { flex-basis: 100%; }
  .head .btn { flex: 1 1 auto; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .stat b { font-size: 24px; }
  .stat span { font-size: 13px; }
  .needs { padding: 12px; gap: 10px; }
  .needs li .btn { height: 36px; padding: 0 12px; }
  .search { max-width: none; flex-basis: 100%; }
  .tv-filter .btn, .tv-filter select { flex: 1 1 auto; max-width: none; }
  .tv-filter .export { margin-left: 0; }
  .list-head { display: none; }
  .list-row { grid-template-columns: minmax(0, 1fr) 20px; gap: 2px 10px; }
  .list-row > :not(.chev) { grid-column: 1; }
  .list-row .chev { grid-column: 2; grid-row: 1 / span 4; }
  .tvgrid { grid-template-columns: minmax(0, 1fr); }
  .form.row { flex-wrap: wrap; }
  .phone-end { display: block; margin-top: 32px; text-align: center; }
  .phone-end button.out { margin: 0; padding: 8px 12px; }
  .phone-end form { margin: 0; }
  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0; color: var(--ink-3); text-decoration: none;
    font-size: 11px; font-weight: 600; min-width: 0; }
  .tabs a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabs a[aria-current] { color: var(--accent); }
  .tabs svg { width: 21px; height: 21px; }
}

/* V1 Preview (Henry, 12 Oct 2026): the playlist as the TV plays it, in the TV's shape */
.preview { border: 0; border-radius: 12px; padding: 16px; background: var(--surface); color: var(--ink); width: min(960px, 94vw); max-height: 94vh; }
.preview::backdrop { background: rgb(0 0 0 / .6); }
.pv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pv-head h2 { margin: 0 auto 0 0; font-size: 16px; }
.pv-shape { display: flex; gap: 6px; }
.pv-shape [aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pv-stage { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: 8px; overflow: hidden; margin: 0 auto; }
.pv-stage.portrait { aspect-ratio: 9 / 16; width: auto; height: min(72vh, 900px); max-width: 100%; }
.pv-stage img, .pv-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pv-stage img { opacity: 0; transition: opacity .8s; }
.pv-stage img.on { opacity: 1; }
.pv-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: #bbb; }
.pv-line { margin: 10px 0 0; }
.card:has(> .privacy) { width: min(720px, 100%); }   /* privacy + terms: reading pages, not the narrow login box (Henry 13 Oct: "so skinny") */
.privacy h1 { font-size: 22px; margin: 6px 0 4px; }
.privacy h2 { font-size: 15px; margin: 18px 0 4px; }
.privacy p { margin: 0; line-height: 1.55; }
/* Terms (Henry 14 Oct: "looks a bit messy"): left-aligned like the text, air between paragraphs and sections, clause
   numbers in their own column, (a) items indented */
.terms { text-align: left; }
.card .terms h1 { font-size: 24px; margin: 8px 0 4px; text-align: left; }
.terms > .small { margin-bottom: 18px; }
.terms p { margin: 0 0 10px; line-height: 1.6; }
.terms h2 { font-size: 16px; margin: 28px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.terms .cl { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 0 6px; }
.terms .cl b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.terms .cl.sub { margin: -4px 0 8px 48px; grid-template-columns: 30px minmax(0, 1fr); }
.terms .cl.sub b { font-weight: 500; }
@media (max-width: 520px) { .terms .cl.sub { margin-left: 20px; } }
/* Front page (Henry 13 Oct; mock-up docs/mockups/2026-10-13-login/screen.html): the page's own TV on the left, the form on
   the right, the logo stacked like the app icon (megra over signage) in the page's top-left corner */
body.bare:has(.stage) { padding: 110px 36px 40px; }
.card:has(> .stage) { width: min(1040px, 100%); background: none; border: 0; border-radius: 0; padding: 0; display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 380px); column-gap: 72px; align-items: center; justify-content: center; }
.card:has(> .stage) > * { grid-column: 2; }
.card:has(> .stage) > .stage { grid-column: 1; grid-row: 1 / span 9; }
.card:has(> .stage) > .card-brand { position: absolute; top: 30px; left: 36px; margin: 0; flex-direction: column; gap: 6px; }
.card:has(> .stage) > .card-brand img { height: 22px; }
.card:has(> .stage) > .card-brand .product { font-size: 18.5px; letter-spacing: .03em; transform: none; }
.stage { display: grid; justify-items: center; }
.tv { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0; background: #0A0D13; border: 6px solid #1B1E24; border-radius: 10px; overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(16, 24, 48, .45), 0 12px 24px -16px rgba(16, 24, 48, .25); }
.tv::before { content: ""; position: absolute; inset: 0; background: linear-gradient(155deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 38%); }
.tv-badge { position: absolute; top: 14px; left: 16px; font: 15px/1 "MEGRA", var(--body); color: #EEF2FF; opacity: .55; }
.tv-loop { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; }
.tv-loop span { grid-area: 1 / 1; font: clamp(28px, 4.4vw, 50px)/1 "MEGRA", var(--body); color: #EEF2FF; opacity: 0; animation: tv-item 10.4s infinite; }
.tv-loop span:nth-child(2) { animation-delay: 2.6s; }   /* 4 words, 2.6 s each (web.login.loop) */
.tv-loop span:nth-child(3) { animation-delay: 5.2s; }
.tv-loop span:nth-child(4) { animation-delay: 7.8s; }
@keyframes tv-item { 0% { opacity: 0; transform: translateY(8px); } 4%, 21% { opacity: 1; transform: none; } 25%, 100% { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .tv-loop span { animation: none; } .tv-loop span:first-child { opacity: 1; } }
.tv-feet { width: 84%; display: flex; justify-content: space-between; }
.tv-feet i { width: 7%; height: 16px; background: #C5CBD4; clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); }
[data-theme="dark"] .tv { border-color: #24272E; }
[data-theme="dark"] .tv-feet i { background: #2C3038; }
.stage .about { margin: 24px 0 0; max-width: 34ch; text-align: center; color: var(--ink-2); font-size: 14px; }
.login-form { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px 32px 26px; }
.login-form .login-title { font: 650 30px/1.15 var(--display); letter-spacing: -.01em; text-align: left; margin: 0; }
.login-sub { color: var(--ink-2); font-size: 15px; margin: 6px 0 22px; }
.choice { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 0 20px; border: 1px solid var(--line-2);
  border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 15.5px var(--body); text-decoration: none; cursor: pointer; }
.choice:hover { background: var(--hover); }
.choice-ic { width: 20px; height: 20px; flex: none; color: var(--ink-2); }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-form input:where(:not([type=checkbox], [type=hidden], [type=radio])) { height: 48px; border-radius: 10px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 64px; }
.pw-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px 10px;
  color: var(--ink-2); font: 500 14px var(--body); cursor: pointer; border-radius: 8px; }
.pw-show:hover { color: var(--ink); background: var(--hover); }
.forgot { justify-self: end; margin-top: -6px; color: var(--accent); text-decoration: none; font-weight: 500; }
.forgot:hover { text-decoration: underline; }
.card .btn-big { height: 50px; border-radius: 10px; font-size: 16px; margin-top: 2px; }
.new-here { text-align: center; margin: 18px 0 0; font-size: 14.5px; color: var(--ink-2); }   /* open: 'Create a free account'; closed: 'coming soon' (Henry 15 Oct) */
.new-here a { color: var(--accent); font-weight: 600; text-decoration: none; }
.new-here a:hover { text-decoration: underline; }
.login-links { margin: 26px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.login-links a { color: var(--ink-2); text-decoration: none; }   /* no underline: it broke around p / y and looked split (Henry 13 Oct) */
.login-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-skip-ink: none; }
@media (max-width: 860px) {
  body.bare:has(.stage) { padding: 28px 20px 40px; }
  .card:has(> .stage) { grid-template-columns: minmax(0, 420px); }
  .card:has(> .stage) > * { grid-column: 1; }
  .card:has(> .stage) > .card-brand { position: static; justify-self: start; margin: 0 0 28px; }
  .card:has(> .stage) > .stage { grid-row: auto; order: 9; margin-top: 40px; }   /* phone: the form first, the TV below */
}
