:root {
  color-scheme:dark;
  --bg:#071522;--bg2:#0b2030;--surface:#11283a;--surface2:#152c40;--border:#274256;
  --text:#f4f8fd;--muted:#a9becd;--subtle:#7e9aaa;--orange:#f49443;--orange2:#b95b33;
  --cyan:#41d9d0;--green:#5bdba7;--violet:#aa90e9;--shadow:0 16px 36px #0005;
  --nav-height:70px;
}
*,*::before,*::after{box-sizing:border-box}
html{min-height:100%;background:var(--bg);-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;color:var(--text);min-height:100dvh;font:14px/1.47 system-ui,-apple-system,Roboto,"Segoe UI",sans-serif;background:radial-gradient(ellipse 105% 43% at 89% -12%,#244a62b5,transparent 74%),radial-gradient(ellipse 85% 34% at 0% 35%,#102e4380,transparent 70%),#071522}
button,a,input{font:inherit;-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.6;cursor:not-allowed}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid #75e6e2;outline-offset:3px}
.app-shell{max-width:710px;min-height:100dvh;margin:0 auto;position:relative;padding:14px 15px calc(var(--nav-height) + 65px + env(safe-area-inset-bottom,0px))}
.browser-header{display:flex;align-items:center;gap:11px;margin:0 0 12px;padding:8px 2px 5px}
.browser-header__mark{width:36px;height:36px;border-radius:12px;background:linear-gradient(140deg,#eb9c56,#984b33);display:grid;place-items:center;font-weight:900;box-shadow:0 4px 14px #ed7e3e33}
.browser-header strong{display:block;font-size:15px;line-height:1.1}
.browser-header small{font-size:10px;letter-spacing:.12em;color:var(--muted);text-transform:uppercase}
.version-tag{margin-left:auto;font-size:11px;color:var(--muted);border:1px solid var(--border);padding:4px 8px;border-radius:9px}
html.in-telegram .browser-header{display:none}
html.in-telegram .app-shell{padding-top:max(76px,calc(var(--zen-tg-top-safe,var(--tg-content-safe-area-inset-top,0px)) + 46px));padding-bottom:calc(var(--nav-height) + 95px + var(--zen-tg-bottom-safe,var(--tg-content-safe-area-inset-bottom,0px)))}
.app-status{display:flex;align-items:center;gap:10px;min-height:54px;background:linear-gradient(110deg,#0c393c,#193b41 70%,#283a30);border:1px solid #347671;border-radius:15px;padding:9px 11px;margin:0 1px 16px;box-shadow:0 5px 21px #0002}
.app-status[data-state=error]{background:linear-gradient(110deg,#412a25,#26313c);border-color:#8c5944}
.app-status[data-state=demo]{background:linear-gradient(110deg,#4f341e,#263a3c);border-color:#8f6543}
.app-status__symbol{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;flex-shrink:0;color:#8bffe0;font-size:24px;background:#0a3e3b;border:1px solid #266f66}
.app-status__copy{flex:1;min-width:0}
.app-status__copy strong{font-size:12px;font-weight:800;line-height:1.25;display:block}
.app-status__copy small{display:block;font-size:10px;color:#bbded6;margin-top:2px;overflow-wrap:anywhere}
.app-status__flag{font-size:10px;font-weight:800;color:#fbc88d;white-space:nowrap;border:1px solid #987344;background:#423628;padding:5px 7px;border-radius:100px}
.page{animation:fadein .2s ease both;scroll-margin-top:110px}
@keyframes fadein{from{opacity:.5;transform:translateY(3px)}to{opacity:1;transform:none}}
.kicker{font-size:10px;font-weight:800;letter-spacing:.17em;text-transform:uppercase;color:#a4c5d5;margin:0 0 9px 3px}
.channel-switch{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:14px}
.channel-choice{display:flex;align-items:center;gap:9px;text-align:left;min-height:61px;padding:9px;border:1px solid #33495b;border-radius:15px;background:linear-gradient(135deg,#1a2d40,#101e2e);color:var(--text);min-width:0;box-shadow:inset 0 1px 0 #ffffff08}
.channel-choice[aria-pressed=true]{border-color:#f89c53;background:linear-gradient(125deg,#603b2b,#273345 88%);box-shadow:inset 0 0 0 1px #ffa65d55,0 0 18px #d8774130}
.channel-choice .choice-icon{height:37px;width:37px;display:grid;place-items:center;flex:0 0 37px;background:#142b3e;border-radius:11px;box-shadow:inset 0 0 0 1px #ffffff11}
.channel-choice[aria-pressed=true] .choice-icon{background:#3d342d}
.choice-icon svg{width:21px;height:21px}
.channel-choice__text{min-width:0;font-size:11px;line-height:1.18;font-weight:800;overflow-wrap:anywhere}
.channel-choice__text small{display:block;font-size:9px;font-weight:500;color:var(--muted);margin-top:3px}
.choice-check{color:#f0b075;align-self:flex-start;margin-left:auto;flex:0 0 auto}
.hero{position:relative;overflow:hidden;border:1px solid #365267;border-radius:19px;padding:16px 15px 14px;background:linear-gradient(119deg,#0d3544 0%,#193951 59%,#43382d 100%);box-shadow:var(--shadow);margin-bottom:13px}
.hero::after{content:"";position:absolute;width:240px;height:160px;right:-58px;top:5px;border-radius:40%;pointer-events:none;background:radial-gradient(closest-side,#d0773833,transparent 83%)}
.hero.family{background:linear-gradient(120deg,#192638,#38404c 58%,#613d35)}
.hero.family::after{background:radial-gradient(closest-side,#f2a15d33,transparent 85%)}
.hero__top{display:flex;align-items:center;gap:12px;position:relative;z-index:1}
.hero__icon{height:55px;width:55px;flex:0 0 55px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,#242e35,#704a2e);border:1px solid #9b704b55;box-shadow:inset 0 0 22px #ff9d3a22}
.hero.family .hero__icon{background:linear-gradient(135deg,#3e3540,#674b46)}
.hero__icon svg{height:37px;width:37px}
.hero__title{flex:1;min-width:0}
.hero__title h1{font-size:21px;letter-spacing:-.035em;line-height:1.07;margin:0 0 4px;font-weight:850}
.hero__title p{font-size:11px;color:#d1e1e8;margin:0}
.hero__metrics{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0;border-top:1px solid #ffffff29;margin-top:15px;padding-top:12px;position:relative;z-index:1}
.metric{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0;padding:0 6px}
.metric:first-child{padding-left:0}.metric:not(:last-child){border-right:1px solid #ffffff25}
.metric__label{font-size:10px;color:#bfd4df;min-width:0}
.metric__value{font-weight:850;font-size:14px;line-height:1.25}
.metric__value.orange{color:#ffba78}.metric__value.green{color:#8df0c6}
.metric svg{color:#89e1e3;width:15px;height:15px}
.segmented{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;border:1px solid #29485d;border-radius:15px;background:#132a3b;margin-bottom:14px}
.segmented button{border:0;min-height:41px;border-radius:11px;background:none;color:#b9d0dc;font-size:12px;font-weight:750;display:flex;justify-content:center;align-items:center;gap:7px;padding:7px}
.segmented button[aria-selected=true]{background:linear-gradient(100deg,#f9a34e,#c2623c);color:#fff;box-shadow:0 0 0 1px #ffb46a inset,0 3px 14px #f18c4533}
.segmented button svg{width:16px;height:16px}
.summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:15px}
.stat-tile{background:linear-gradient(120deg,#124a49,#193b43);border:1px solid #35686a;border-radius:14px;min-height:62px;padding:10px 12px;display:flex;gap:8px;align-items:center}
.stat-tile.orange{background:linear-gradient(110deg,#4e332b,#5c3425);border-color:#995e37}
.stat-tile .stat-title{font-size:10px;line-height:1.2;color:#d4e3e7;flex:1}
.stat-tile .stat-value{font-size:22px;font-weight:850;letter-spacing:-.03em}
.stat-tile svg{color:#a1f1e5;flex-shrink:0}
.stat-tile.orange svg{color:#ffb37a}
.section-line{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:11px 2px 10px}
.section-line h2{margin:0;font-size:11px;letter-spacing:.12em;color:#c5deea;text-transform:uppercase}
.tiny-button{padding:7px 9px;display:inline-flex;align-items:center;justify-content:center;gap:5px;color:#e3f1f9;font-weight:700;font-size:11px;background:#1a3448;border:1px solid #34536a;border-radius:10px;min-height:33px}
.tiny-button svg{width:14px;height:14px}
.article-list{display:grid;gap:10px}
.article-card{width:100%;min-height:96px;text-align:left;display:flex;align-items:stretch;gap:12px;padding:11px;background:linear-gradient(110deg,#162a3b,#0d1d2d);color:var(--text);border:1px solid #344a5f;border-radius:17px;box-shadow:0 4px 12px #0002}
.article-card:active{transform:scale(.995)}
.article-card__image{width:82px;min-width:82px;min-height:82px;border-radius:11px;background:radial-gradient(circle at 80% 70%,#ba70496c,transparent 49%),linear-gradient(135deg,#143749,#213449);position:relative;overflow:hidden;display:grid;place-items:center;flex-shrink:0}
.article-card__image img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}
.article-card__image svg{width:30px;height:30px;color:#ffbc7e;opacity:.9}
.article-card__body{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.article-card__type{font-size:10px;color:#88e3df;font-weight:750;display:inline-flex;gap:4px;align-items:center}
.article-card__title{font-size:13px;line-height:1.3;font-weight:760;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.card-footer{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-top:auto;padding-top:4px}
.pill{border-radius:100px;padding:4px 7px;font-size:10px;line-height:1.3;font-weight:700;border:1px solid #39596e;color:#d3e8ef;background:#1d3545;display:inline-flex;gap:4px;align-items:center}
.pill.success{background:#10503e;border-color:#28765a;color:#9effcf}.pill.warning{background:#4b3426;border-color:#86603d;color:#ffd0a2}.pill.info{background:#233b58;border-color:#3b6386;color:#b5dbff}
.card-menu{color:#a9c1d0;align-self:flex-start}
.card-menu svg{width:17px;height:17px}
.empty-state{position:relative;overflow:hidden;border-radius:19px;padding:31px 19px 29px;background:radial-gradient(ellipse at 85% 0%,#314b4980,transparent 52%),radial-gradient(ellipse at 0% 90%,#58402f70,transparent 50%),linear-gradient(115deg,#192c3d,#11273a);border:1px solid #33556a;text-align:center;min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center}
.empty-state__icon{border-radius:18px;width:58px;height:58px;display:grid;place-items:center;background:linear-gradient(125deg,#2c5361,#6d4a39);border:1px solid #7a735766;margin-bottom:13px;box-shadow:0 7px 30px #0004}
.empty-state h2{font-size:17px;margin:0 0 7px}.empty-state p{font-size:12px;color:#c6d8e3;max-width:310px;margin:0}
.empty-state .minor-action{margin-top:17px;font-size:11px;color:#ffbd84;background:#4e382b;border:1px solid #925f38;padding:8px 12px;border-radius:10px}
.notice-block{border:1px solid #37536a;border-radius:13px;background:#142b3d;padding:13px 14px;color:#c5dbe7;font-size:12px;line-height:1.55}
.notice-block a{text-decoration:underline;color:#a7e4ee}
.text-metadata{font-size:11px;color:var(--muted);margin:2px 0 12px}
.page-header{display:flex;align-items:center;gap:10px;margin:4px 0 15px}
.page-header h1{font-size:20px;margin:0;line-height:1.15}.page-header p{font-size:11px;color:var(--muted);margin:3px 0 0}
.back{border:1px solid #35516a;color:#e8f3fb;background:#1d364a;width:40px;height:40px;display:grid;place-items:center;border-radius:12px;flex-shrink:0}
.detail-title{font-size:20px;line-height:1.24;letter-spacing:-.025em;overflow-wrap:anywhere;margin:0 0 12px}
.detail-cover{position:relative;aspect-ratio:16/9;border-radius:17px;overflow:hidden;background:radial-gradient(ellipse at 80% 85%,#95592e55,transparent 48%),linear-gradient(135deg,#163c4b,#172c40);border:1px solid #395469;display:grid;place-items:center}
.detail-cover img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}.detail-cover svg{width:48px;height:48px;color:#e5ad77}
.detail-cover .image-label{font-size:11px;color:#cadce6;margin-top:72px;position:absolute}
.detail-badge-row{display:flex;align-items:center;gap:7px;margin:10px 0 12px;flex-wrap:wrap}
.detail-order{border:1px solid #955f3e;background:linear-gradient(105deg,#56352c,#2c2f33);min-height:43px;border-radius:12px;display:flex;gap:9px;align-items:center;padding:8px 12px;margin-bottom:12px}
.detail-order strong{margin-left:auto;font-size:13px;color:#ffc68d}
.detail-order .detail-order__label{font-size:12px;color:#f1d6bf}
.detail-text{overscroll-behavior-y:contain;touch-action:pan-y;scroll-padding-bottom:18px;border:1px solid #30576a;border-radius:14px;background:linear-gradient(110deg,#102b3c,#0e2030);padding:14px 15px;max-height:280px;overflow:auto;white-space:pre-wrap;color:#e7f1f9;font-size:13px;line-height:1.58;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text;scrollbar-color:#608294 #102b3c}
.detail-text.empty{color:var(--muted)}
.detail-text-label{font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:800;color:#a8cad9;margin:13px 3px 7px}
.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.action{border-radius:12px;min-height:46px;padding:10px 8px;border:1px solid #367087;background:linear-gradient(110deg,#163e4d,#183c49);color:var(--text);font-size:11px;font-weight:780;display:flex;align-items:center;justify-content:center;gap:6px;line-height:1.2;text-align:center}
.action svg{width:18px;height:18px;flex-shrink:0}.action.primary{background:linear-gradient(110deg,#d87838,#ad5033);border-color:#f9a35c;color:white;box-shadow:0 4px 15px #df7c3c27}.action.alt{background:#1b3041;border-color:#3b5065}
.action:disabled{opacity:.45}
.action.wide{grid-column:span 2}
.link-list{margin:13px 0 0;padding:12px 13px;background:#11283b;border:1px solid var(--border);border-radius:13px}
.link-list h3{font-size:12px;margin:0 0 9px}.link-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 0;border-top:1px solid #ffffff14;font-size:11px}.link-item span{flex:1;color:#cce0eb}
.link-item button{font-size:11px;background:#1f4855;border:1px solid #397b89;border-radius:9px;color:white;padding:7px 10px}
.readonly-note{margin:10px 2px 0;font-size:11px;color:#9fb3c3}
.bottom-nav{position:fixed;z-index:20;bottom:max(12px,env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);width:min(calc(100% - 20px),690px);min-height:var(--nav-height);display:grid;grid-template-columns:repeat(4,1fr);gap:3px;background:linear-gradient(120deg,#102437ed,#0d1b2ced);border:1px solid #345167;border-radius:20px;padding:5px;box-shadow:0 10px 30px #000b;backdrop-filter:blur(14px)}
html.in-telegram .bottom-nav{bottom:max(14px,calc(var(--zen-tg-bottom-safe,var(--tg-content-safe-area-inset-bottom,0px)) + 10px))}
.bottom-nav button{border:0;border-radius:15px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#c6d8e4;background:transparent;font-weight:700;font-size:10px}
.bottom-nav button[aria-current=page]{background:linear-gradient(155deg,#77472d88,#39352f40);color:#ffb36a}
.bottom-nav svg{width:22px;height:22px}
.toast{position:fixed;z-index:99;left:50%;transform:translateX(-50%) translateY(15px);bottom:calc(var(--nav-height) + 28px + env(safe-area-inset-bottom,0px));background:#1c443c;color:#e9fff6;border:1px solid #45a78b;border-radius:12px;padding:11px 16px;box-shadow:0 7px 24px #0008;font-size:12px;font-weight:700;max-width:min(90vw,390px);text-align:center;opacity:0;pointer-events:none;transition:.18s}
.toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}.toast.error{background:#56332d;border-color:#af7062}
.loader{display:flex;align-items:center;gap:9px;color:#b9d1dd;font-size:12px;padding:20px 10px}.spinner{width:20px;height:20px;border:2px solid #436777;border-top-color:#fa9d4d;border-radius:100%;animation:spin .65s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.setting-card{background:linear-gradient(115deg,#142c3f,#102537);border:1px solid #345266;border-radius:15px;padding:15px;margin-bottom:10px}
.setting-card h2{font-size:15px;margin:0 0 7px}.setting-card p{font-size:12px;color:#c2d4df;margin:0;line-height:1.6;overflow-wrap:anywhere}
.setting-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-top:1px solid #ffffff16;font-size:12px}.setting-row span{color:#bad0dd}.setting-row strong{font-size:11px;text-align:right}
.channels-big{display:grid;gap:11px}.channel-big{display:flex;align-items:center;gap:12px;text-align:left;width:100%;background:linear-gradient(120deg,#1d3547,#16273a);border:1px solid #476074;color:var(--text);border-radius:16px;padding:15px}
.channel-big strong{display:block;font-size:16px}.channel-big small{font-size:11px;color:var(--muted)}
.channel-big .choice-icon{height:54px;width:54px;display:grid;place-items:center;background:#384039;border-radius:14px}
.channel-big .choice-icon svg{width:31px;height:31px}
.channel-big .chev{margin-left:auto;color:#f4a56c}
@media(min-width:700px){.app-shell{padding-left:24px;padding-right:24px}.page{max-width:630px;margin:auto}.app-status{max-width:630px;margin:0 auto 16px}.browser-header{max-width:630px;margin:0 auto 14px}}
@media(max-width:370px){.app-shell{padding-left:10px;padding-right:10px}.channel-choice{gap:6px;padding:7px}.channel-choice .choice-icon{height:32px;width:32px;flex-basis:32px}.channel-choice__text{font-size:10px}.hero__title h1{font-size:19px}.article-card__image{width:69px;min-width:69px}.action{font-size:10px}.metric__label{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* SVG sizing is explicit in compact controls; intrinsic dimensions must never stretch cards. */
.stat-tile svg{width:22px;height:22px;flex:0 0 22px}
.pill svg{width:12px;height:12px;flex:0 0 12px}
.detail-order svg{width:18px;height:18px;flex:0 0 18px;color:#ffd1a5}
.channel-choice .choice-check svg,.channel-big .chev svg{width:14px;height:14px}
.article-card__type svg{width:12px;height:12px}
.empty-state__icon svg{width:31px;height:31px}

/* 0.5.1: native Telegram controls must not cover the first interactive element. */
html.in-telegram{scroll-padding-top:max(76px,calc(var(--zen-tg-top-safe,0px) + 46px))}
body.detail-mode .app-status{display:none}
body.detail-mode .page-header{margin-top:2px}
body.detail-mode .detail-title{margin-top:2px}
body.detail-mode .app-shell{padding-bottom:calc(var(--nav-height) + 105px + var(--zen-tg-bottom-safe,0px))}
@media(max-width:420px){.bottom-nav{width:calc(100% - 20px)}.detail-text{max-height:min(315px,46dvh)}}


/* v0.5.2 Android viewport fix: the navigation occupies its own row in the
   app layout. Only #view scrolls, so cards never pass underneath the menu. */
html, body {height:100%; overflow:hidden}
.app-shell {
  height:100dvh;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding-bottom:max(10px,env(safe-area-inset-bottom,0px));
}
html.in-telegram .app-shell {
  height:100dvh;
  padding-top:max(76px,calc(var(--zen-tg-top-safe,var(--tg-content-safe-area-inset-top,0px)) + 46px));
  padding-bottom:max(10px,calc(var(--zen-tg-bottom-safe,var(--tg-content-safe-area-inset-bottom,0px)) + 8px));
}
.browser-header,.app-status{flex:0 0 auto}
.page {
  flex:1 1 auto;
  min-height:0;
  width:100%;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  padding-bottom:26px;
  scroll-padding-top:12px;
  scrollbar-color:#476277 transparent;
}
.bottom-nav,
html.in-telegram .bottom-nav {
  position:relative;
  z-index:20;
  bottom:auto;
  left:auto;
  transform:none;
  margin:8px auto 0;
  width:100%;
  min-height:var(--nav-height);
  flex:0 0 var(--nav-height);
  box-shadow:0 4px 20px #0007;
}
body.detail-mode .app-shell {
  padding-bottom:max(10px,calc(var(--zen-tg-bottom-safe,var(--tg-content-safe-area-inset-bottom,0px)) + 8px));
}
@media(max-width:420px){.bottom-nav,html.in-telegram .bottom-nav{width:100%}}
/* Keep a useful visible cue when a long list can scroll. */
.page:focus{outline:none}
