:root {
  --bg: #eef2f7; --card: #ffffff; --text: #18202b; --muted: #5b6676; --accent: #0a6cff; --accent-text: #ffffff;
  --line: #d6dde8; --ad: #f4f7fb; --err: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f141b; --card: #18202b; --text: #e8edf4; --muted: #9aa7b8; --accent: #4c95ff; --accent-text: #0b1220;
          --line: #2b3646; --ad: #1f2935; --err: #ff8a80; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
       font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Armenian", sans-serif;
       display: flex; align-items: flex-start; justify-content: center; padding: 16px; }
.card { width: 100%; max-width: 420px; background: var(--card); border-radius: 16px; padding: 20px;
        box-shadow: 0 6px 24px rgba(0,0,0,.08); margin-top: 4vh; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { font-weight: 800; font-size: 1.35rem; letter-spacing: .02em; color: var(--accent); }
.langs { display: flex; gap: 4px; }
.langs button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 8px;
                padding: 6px 9px; font: inherit; font-size: .85rem; cursor: pointer; min-width: 44px; min-height: 36px; }
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
h1 { font-size: 1.25rem; margin: 18px 0 12px; }
.ad { background: var(--ad); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.ad img { display: block; width: 100%; height: auto; border-radius: 8px; margin-bottom: 10px; }
.ad h2 { font-size: 1.05rem; margin: 0 0 4px; }
.ad p { margin: 0; color: var(--muted); }
.login { display: grid; gap: 8px; }
.login label { font-size: .9rem; color: var(--muted); }
.login input { font: inherit; font-size: 1.1rem; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
               background: transparent; color: var(--text); width: 100%; }
.login input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.login button { font: inherit; font-weight: 700; padding: 12px; border: 0; border-radius: 10px;
                background: var(--accent); color: var(--accent-text); cursor: pointer; min-height: 48px; }
.login button:disabled { opacity: .6; }
.status { background: var(--ad); border-radius: 12px; padding: 14px; margin: 0 0 12px; }
.status p { margin: 0 0 6px; }
.status .on { font-weight: 700; }
.logout { display: inline-block; margin-top: 6px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
          color: var(--text); text-decoration: none; min-height: 44px; }
.adwatch { display: grid; gap: 10px; margin-bottom: 8px; }
.adwatch h2 { font-size: 1.1rem; margin: 0; }
/* и вертикальное, и горизонтальное видео — целиком, по высоте экрана, без обрезки */
.adwatch video { display: block; margin: 0 auto; max-width: 100%; max-height: 70vh; width: auto; height: auto;
                 border-radius: 10px; background: #000; object-fit: contain; }
.sound { margin: 0 auto; }
.aw-site { display: grid; gap: 6px; }
.aw-site iframe { width: 100%; height: 60vh; min-height: 320px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.aw-open { font-size: .9rem; color: var(--accent); justify-self: center; }
.aw-left { margin: 0; color: var(--muted); min-height: 1.2em; }
.primary { font: inherit; font-weight: 700; padding: 12px; border: 0; border-radius: 10px;
           background: var(--accent); color: var(--accent-text); cursor: pointer; min-height: 48px; }
.primary:disabled { opacity: .6; }
.linkbtn { display: block; margin: 4px auto 10px; background: none; border: 0; color: var(--accent);
           font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }
.msg { min-height: 1.4em; color: var(--err); margin: 10px 0; }
.pay { width: 100%; font: inherit; padding: 12px; border: 1px dashed var(--line); border-radius: 10px;
       background: transparent; color: var(--muted); min-height: 48px; }
.soon { font-size: .8rem; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.foot { margin-top: 16px; text-align: center; font-size: .8rem; color: var(--muted); }
