/* QA910 · YPN unified monochrome interface. Loaded after all legacy themes. */
:root{--ui-page:#050505;--ui-surface:#131314;--ui-raised:#1c1c1e;--ui-ink:#f6f6f6;--ui-muted:#aaa;--ui-stroke:rgba(255,255,255,.115);--ui-highlight:#f5f5f5;--ui-shadow:0 12px 46px rgba(0,0,0,.17);}
html[data-ypn-theme="light"]{--ypn-bg:#f7f7f7!important;--ypn-panel:#fff!important;--ypn-panel-strong:#fff!important;--ypn-line:rgba(0,0,0,.12)!important;--ypn-line-soft:rgba(0,0,0,.11)!important;--ypn-text:#171717!important;--ypn-muted:#646464!important;--ypn-muted2:#777!important;--ypn-white:#111!important;--ypn-shadow:0 12px 42px rgba(0,0,0,.055)!important;--ui-page:#f7f7f7;--ui-surface:#fff;--ui-raised:#f5f5f5;--ui-ink:#171717;--ui-muted:#646464;--ui-stroke:rgba(0,0,0,.12);--ui-highlight:#0e0e0e;--ui-shadow:0 10px 32px rgba(0,0,0,.06);}
body.ypn-client-shell{color:var(--ui-ink)!important;}
html[data-ypn-theme="light"] body.ypn-client-shell{background:#f7f7f7!important;color:#171717!important;}
html[data-ypn-theme="light"] body.ypn-client-devices{background:#f7f7f7!important;}
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-sidebar,html[data-ypn-theme="light"] body.ypn-client-shell .ypn-client-top{background:#fff!important;border-color:var(--ui-stroke)!important;color:#171717!important;}
html[data-ypn-theme="light"] body.ypn-client-shell h1,html[data-ypn-theme="light"] body.ypn-client-shell h2,html[data-ypn-theme="light"] body.ypn-client-shell h3,html[data-ypn-theme="light"] body.ypn-client-shell strong,html[data-ypn-theme="light"] body.ypn-client-shell b{color:#171717!important;}
html[data-ypn-theme="light"] body.ypn-client-shell p,html[data-ypn-theme="light"] body.ypn-client-shell small{color:#626262!important;}
/* One card geometry for Home / Subscription / Devices / Support / Cabinet. */
body.ypn-client-shell :is(.ypn-overview-card,.ypn-home-action,.ypn-doc-card,.ypn-v3-panel,.ypn-plan-section,.ypn-access-card,.ypn-feature-strip>div,.ypn-account-hero,.ypn-cabinet-hero,.ypn-cabinet-header,.ypn-subscription-main,.ypn-subscription-current,.ypn-renew-section,.ypn-renew-card,.ypn-device-connect,.q87-hero,.q87-choice,.q87-no-plan,.q87-members,.q87-list-area,.ypn-chat,.ypn-thread-list,.card,.ypn-telegram-unified){
 background:var(--ui-surface)!important;color:var(--ui-ink)!important;border:1px solid var(--ui-stroke)!important;border-radius:22px!important;box-shadow:var(--ui-shadow)!important;min-width:0;}
body.ypn-client-shell :is(.ypn-overview-stats>div,.ypn-access-stats>div,.ypn-account-status>div,.ypn-status-card,.metric,.stat,.q87-symbol,.q87-choice-icon,.q87-device,.q87-list,.q87-device-data,.ypn-renew-card,.ypn-v4-specs,.ypn-v3-row){
 background:var(--ui-raised)!important;color:var(--ui-ink)!important;border-color:var(--ui-stroke)!important;}
body.ypn-client-shell :is(.q87-count,.q87-plan,.q87-choice strong,.q87-device-data strong,.ypn-access-title h2,.ypn-access-remaining strong,.ypn-status-card strong){color:var(--ui-ink)!important;}
body.ypn-client-shell :is(.q87-expiry,.q87-subline,.q87-count small,.q87-choice small,.q87-device-data small,.ypn-access-note,.ypn-access-remaining small,.ypn-page-head p,.ypn-feature-strip span,.kicker){color:var(--ui-muted)!important;}
body.ypn-client-shell .q87-list{background:var(--ui-surface)!important;border-radius:19px!important;}
body.ypn-client-shell .q87-device{border-radius:0!important;border-width:0 0 1px!important;box-shadow:none!important;}
body.ypn-client-shell .q87-device:last-child{border-bottom:0!important;}
body.ypn-client-shell .ypn-home-action:hover,body.ypn-client-shell .q87-choice:hover{border-color:var(--ui-ink)!important;box-shadow:0 18px 48px rgba(0,0,0,.1)!important;transform:translateY(-2px)}
html[data-ypn-theme="light"] body.ypn-client-shell .q87-progress{background:#eee!important;}
html[data-ypn-theme="light"] body.ypn-client-shell .q87-progress>span{background:linear-gradient(90deg,#222,#777)!important;}
/* Buttons are one component, including legacy inputs and inline links. */
body.ypn-client-shell :is(.btn,button.primary,button.secondary,a.primary,a.secondary,.q87-more,.ypn-device-connect-actions a,.q87-hero a[href]){
 border-radius:13px!important;min-height:44px!important;line-height:1.3!important;padding:11px 16px!important;font-weight:740!important;font-size:13px!important;letter-spacing:-.005em!important;text-decoration:none!important;white-space:normal!important;overflow-wrap:anywhere;box-sizing:border-box;transition:transform .14s,border-color .14s,background .14s!important;}
body.ypn-client-shell :is(.btn.primary,button.primary,a.primary,.q87-hero a[href]){background:#f0f0f0!important;color:#101010!important;border:1px solid #f0f0f0!important;box-shadow:none!important;}
body.ypn-client-shell :is(.btn.secondary,button.secondary,a.secondary){background:#272729!important;color:#f3f3f3!important;border:1px solid #4c4c4c!important;box-shadow:none!important;}
html[data-ypn-theme="light"] body.ypn-client-shell :is(.btn.primary,button.primary,a.primary,.q87-hero a[href]){background:#151515!important;color:#fff!important;border-color:#151515!important;}
html[data-ypn-theme="light"] body.ypn-client-shell :is(.btn.secondary,button.secondary,a.secondary){background:#fff!important;color:#1d1d1d!important;border:1px solid #ccc!important;}
body.ypn-client-shell :is(button,.btn,a[role="button"]):focus-visible{outline:2px solid var(--ui-highlight)!important;outline-offset:3px!important;}
body.ypn-client-shell :is(button,.btn):disabled{opacity:.45!important;cursor:not-allowed!important;transform:none!important;}
/* SVG Mac and Windows must remain their own actual icons; legacy ::after android mask was applied to both. */
body.ypn-client-devices .q87-choice:nth-child(n+3) .q87-choice-icon::after{display:none!important}
body.ypn-client-devices .q87-choice:nth-child(n+3) .q87-choice-icon svg{display:block!important;width:27px!important;height:27px!important;fill:currentColor!important;color:var(--ui-ink)!important}
body.ypn-client-devices .q87-choice:nth-child(2) .q87-choice-icon::after{background:var(--ui-ink)!important}
body.ypn-client-devices .q87-choice-main .q87-choice-icon::after{background:var(--ui-ink)!important}
html[data-ypn-theme="light"] body.ypn-client-devices :is(.q87-choice-icon,.q87-symbol){background:#f3f3f3!important;color:#171717!important;border-color:#e1e1e1!important;}
/* Telegram is a single compact, balanced card, never horizontal mini-columns. */
body.ypn-client-shell .ypn-telegram-unified{padding:22px!important;margin:14px 0!important;display:grid!important;gap:16px!important}
.ypn-telegram-unified .ypn-tg-top{display:flex;align-items:flex-start;gap:14px;min-width:0}
.ypn-telegram-unified .ypn-tg-logo{flex:0 0 48px;width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:#eee;color:#141414;border:1px solid var(--ui-stroke)}
html[data-ypn-theme="light"] .ypn-telegram-unified .ypn-tg-logo{background:#141414;color:#fff}
.ypn-telegram-unified .ypn-tg-logo svg{width:24px;height:24px}
.ypn-telegram-unified .ypn-tg-copy{min-width:0;flex:1}
.ypn-telegram-unified .ypn-tg-eyebrow{font-size:10px;letter-spacing:.12em;font-weight:800;color:var(--ui-muted);text-transform:uppercase}
.ypn-telegram-unified .ypn-tg-copy h3{font-size:19px!important;line-height:1.26;margin:4px 0 5px!important;overflow-wrap:anywhere}
.ypn-telegram-unified .ypn-tg-copy p{font-size:13px!important;color:var(--ui-muted)!important;margin:0!important;line-height:1.55}
.ypn-telegram-unified .ypn-tg-actions{display:flex;gap:9px;flex-wrap:wrap;align-items:stretch}
.ypn-telegram-unified .ypn-tg-actions>*{min-width:0;margin:0!important}
.ypn-telegram-unified .ypn-tg-actions .btn,.ypn-telegram-unified .ypn-tg-actions button{width:100%;min-height:43px!important}
.ypn-telegram-unified .ypn-tg-preference{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px!important;border-radius:14px;background:var(--ui-raised);border:1px solid var(--ui-stroke);flex-wrap:wrap}
.ypn-telegram-unified .ypn-tg-preference label{display:flex;align-items:center;gap:10px;min-width:0;cursor:pointer;font-size:13px;color:var(--ui-ink);margin:0!important;letter-spacing:0;flex:1}
.ypn-telegram-unified .ypn-tg-preference input[type=checkbox]{appearance:auto!important;min-width:18px!important;width:18px!important;height:18px!important;min-height:18px!important;margin:0;accent-color:#777}
.ypn-telegram-unified .ypn-tg-preference button{flex-shrink:0}
.ypn-telegram-unified .ypn-tg-note{color:var(--ui-muted)!important;font-size:11px!important;margin:0!important}
@media(max-width:640px){.ypn-telegram-unified .ypn-tg-actions{display:grid;grid-template-columns:1fr 1fr}.ypn-telegram-unified .ypn-tg-actions>*:first-child:last-child{grid-column:1/-1}.ypn-telegram-unified .ypn-tg-preference{display:grid}.ypn-telegram-unified .ypn-tg-preference button{width:100%}}
/* No gold/cream light inversion. Dark pages remain contrast-safe. */
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-account-hero,.ypn-cabinet-hero,html[data-ypn-theme="light"] body.ypn-client-shell .ypn-access-card,html[data-ypn-theme="light"] body.ypn-client-shell .ypn-feature-strip>div,html[data-ypn-theme="light"] body.ypn-client-shell .ypn-plan-section,html[data-ypn-theme="light"] body.ypn-client-shell .q87-hero{background:#fff!important;color:#161616!important}
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-subscription-current{background:#fff!important;color:#161616!important}
html[data-ypn-theme="light"] body.ypn-client-shell :is(.ypn-side-link.active,.ypn-side-link:hover){background:#ededed!important;border-color:#ddd!important;color:#181818!important}
html[data-ypn-theme="light"] body.ypn-client-shell :is(.ypn-account-avatar,.ypn-side-avatar){background:#ededed!important;color:#191919!important;border-color:#d6d6d6!important}
html[data-ypn-theme="light"] body.ypn-client-shell :is(.ypn-theme-switch,.ypn-globe-button){background:#fff!important;color:#181818!important;border:1px solid #dadada!important}
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-globe-menu{background:#fff!important;color:#171717!important;border-color:#ddd!important}
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-globe-menu button{color:#191919!important}
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-globe-menu button[aria-checked="true"]{background:#eee!important;color:#191919!important}
/* Opposite brand tiles: dark YPN app tile on dark UI; light YPN tile on white UI. */
html[data-ypn-theme="light"] body.ypn-client-shell :is(.ypn-side-brand,.ypn-client-mobile-brand,.ypn-side-brand img,.ypn-client-mobile-brand img) img{filter:grayscale(1) invert(1)!important}
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-side-brand img,html[data-ypn-theme="light"] body.ypn-client-shell .ypn-client-mobile-brand img{filter:grayscale(1) invert(1)!important}
body.ypn-client-shell .ypn-side-brand img,body.ypn-client-shell .ypn-client-mobile-brand img{filter:grayscale(1)!important}
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-side-brand img,html[data-ypn-theme="light"] body.ypn-client-shell .ypn-client-mobile-brand img{filter:grayscale(1) invert(1)!important}
/* iPhone W disclosure and Direct setup do not overflow or appear as mismatched dark boxes. */
body.ypn-client-shell #ypn-iphone-direct{background:var(--ui-surface)!important;border-color:var(--ui-stroke)!important;color:var(--ui-ink)!important;border-radius:22px!important}
body.ypn-client-shell #ypn-iphone-direct>div>div,body.ypn-client-shell #ypn-iphone-direct>div>div[style]{background:var(--ui-raised)!important;border-color:var(--ui-stroke)!important}
body.ypn-client-shell #ypn-iphone-direct a{max-width:100%;overflow-wrap:anywhere}
html[data-ypn-theme="light"] body.ypn-client-shell #ypn-iphone-direct :is(h2,strong){color:#171717!important}
html[data-ypn-theme="light"] body.ypn-client-shell #ypn-iphone-direct :is(p,summary){color:#555!important}
html[data-ypn-theme="light"] body.ypn-client-shell #ypn-iphone-direct input{background:#fff!important;color:#161616!important}
html[data-ypn-theme="light"] body.ypn-client-shell #ypn-iphone-direct a[style*="background:#ededed"]{background:#171717!important;color:#fff!important}
body.ypn-client-shell :is(.ypn-v3-grid,.ypn-v3-picker,.ypn-v4-terms,.q87-wrap,.ypn-cabinet-layout){min-width:0;max-width:100%}
body.ypn-client-shell .ypn-v3-panel{overflow-wrap:anywhere}
html[data-ypn-theme="light"] body.ypn-client-shell .card[style*="#8e526a"]{background:#fff!important;border:1px solid #d3d3d3!important;color:#111!important}
/* consistent focus and inclusive mobile controls */
body.ypn-client-shell input:not([type=checkbox]),body.ypn-client-shell select,body.ypn-client-shell textarea{border-radius:13px!important;max-width:100%}
body.ypn-client-shell :is(a,button,input,select,textarea):focus-visible{outline:2px solid var(--ui-highlight)!important;outline-offset:3px!important}
@media(max-width:720px){body.ypn-client-shell :is(.ypn-overview-card,.ypn-plan-section,.ypn-access-card,.q87-hero,.q87-choice,.ypn-telegram-unified){border-radius:19px!important}body.ypn-client-shell .ypn-access-actions{display:grid;grid-template-columns:1fr}body.ypn-client-shell .ypn-access-actions a{width:100%}}
@media(prefers-reduced-motion:reduce){body.ypn-client-shell .btn,body.ypn-client-shell .q87-choice{transition:none!important}}

html[data-ypn-theme="light"] body.ypn-client-shell .ypn-cabinet-hero{background:#fff!important;color:#171717!important;border:1px solid rgba(0,0,0,.12)!important;box-shadow:0 16px 45px rgba(0,0,0,.05)!important}
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-cabinet-hero :is(h1,h2,strong,b,small){color:#181818!important}
html[data-ypn-theme="light"] body.ypn-client-shell .ypn-cabinet-hero p{color:#5d5d5d!important}
body.ypn-client-shell .card[style*="#8e526a"]{background:var(--ui-surface)!important;border:1px solid var(--ui-stroke)!important;color:var(--ui-ink)!important;padding:20px!important;border-radius:22px!important;box-shadow:var(--ui-shadow)!important}
html[data-ypn-theme="light"] body.ypn-client-shell :is(.ypn-v3-panel,.ypn-plan-section,.ypn-access-card,.q87-hero,.q87-choice,.ypn-cabinet-hero) input:not([type=checkbox]){background:#fafafa!important;color:#181818!important;border-color:#d6d6d6!important}
