.top-tools, .top-tools nav { display:flex; align-items:center; gap:12px; }
.top-tools a { display:grid; align-items:center; min-height:44px; padding:0 5px; color:#e4d7fb; font-size:13px; font-weight:750; }
.top-tools a:hover, .account-back:hover, .legal-links a:hover { color:#fff; }
.account-view { max-width:980px; padding-block:35px 56px; }
.account-view h1 { margin:8px 0 14px; font-size:clamp(34px,6.3vw,76px); font-weight:800; letter-spacing:-.065em; line-height:1.03; overflow-wrap:anywhere; }
.account-view h1 span { color:var(--accent); }
.account-view h2 { font-size:clamp(20px,3vw,26px); }
.account-back { display:inline-flex; align-items:center; min-height:44px; color:#ded0f4; font-size:14px; }
.account-preview { color:#d9bffa; font-size:12px; font-weight:750; margin:10px 0; }
.account-lede { color:#e0d6ee; margin:0 0 26px; }
.account-card { min-width:0; padding:24px; border:1px solid #493b59; border-radius:18px; background:linear-gradient(145deg,#221b31,#151422 66%); }
.plan-grid, .profile-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; margin-top:24px; }
.plan-caption { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.plan-featured { border-color:#aa87db; background:linear-gradient(142deg,#35244a,#1a1529 75%); }
.plan-saving { color:#f1deff; background:#412e57; border-radius:8px; padding:5px 8px; font-size:12px; font-weight:750; }
.plan-price { font-size:clamp(38px,5vw,57px); font-weight:800; letter-spacing:-.055em; margin:14px 0; }
.account-primary { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:46px; width:100%; padding:9px 13px; border:1px solid #c2a6f2; border-radius:9px; background:#c2a6f2; color:#171022; text-align:left; font-size:14px; font-weight:800; }
.account-primary:hover { background:#d5bafa; }
.account-primary:disabled { background:#2d253a; color:#c1b2d0; border-color:#5d4f6b; cursor:default; }
.plan-note { margin-top:14px; }
.account-card p, .account-card li { line-height:1.55; }
.account-card p:last-child { margin-bottom:0; }
.checkout-card { max-width:635px; margin-top:18px; }
.account-facts { margin:16px 0; }
.account-facts div, .payment-row { display:flex; justify-content:space-between; gap:14px; padding-block:10px; border-bottom:1px solid #514360; }
.account-facts dd { margin:0; text-align:right; }
.account-facts strong, .payment-row strong { color:#e7cfff; font-size:21px; }
.account-muted { color:#c9bedb; font-size:13px; }
.legal-links { display:flex; flex-wrap:wrap; gap:5px 14px; margin:9px 0 13px; }
.legal-links a { display:inline-flex; align-items:center; min-height:44px; color:#e6ccff; text-decoration:underline; font-size:13px; }
.profile-person { display:flex; gap:13px; align-items:center; }
.profile-person p, .subscription-summary p:first-child { font-size:13px; color:#c9bedb; margin:4px 0; }
.profile-avatar { display:grid; place-items:center; width:54px; height:54px; flex:0 0 54px; border-radius:15px; background:#403052; color:#ead6ff; font-size:24px; font-weight:800; }
.subscription-summary { margin:18px 0; padding-top:16px; border-top:1px solid #514360; }
.subscription-summary .account-primary { margin-top:14px; }
.fixture-control { display:block; color:#c9bedb; font-size:13px; }
.fixture-control select { display:block; margin-top:6px; min-height:44px; }
.profile-sections { padding-block:8px; }
.profile-row { display:flex; justify-content:space-between; align-items:center; min-height:49px; padding:10px 0; width:100%; background:transparent; color:inherit; border:0; text-align:left; font-size:14px; font-weight:700; }
.profile-row + .profile-row { border-top:1px solid #493b59; }
details.profile-row { display:block; padding:0; }
.profile-row summary { min-height:49px; padding:14px 0; cursor:pointer; }
.profile-row p, .profile-row ul { color:#dbd0ec; margin:0 0 13px; font-weight:500; }
.payment-row { border:0; padding:0; }
.payment-row > div:last-child { text-align:right; }
.payment-state { color:#e3cafb; font-size:13px; }
#account-info { width:min(470px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; padding:20px; color:#f5f3ff; background:#211a30; border:1px solid #59496d; border-radius:15px; }
#account-info::backdrop { background:#05040bd9; }
#account-info button { min-height:44px; padding:8px; border:1px solid #5d4d73; border-radius:9px; background:#30233f; }
#close-account-info { float:right; width:44px; margin-left:8px; }
#account-info p { color:#e0d6ed; line-height:1.55; }
@media(max-width:650px) {
  .top-tools, .top-tools nav { gap:4px; }
  .top-tools a { font-size:12px; }
  .top-tools .top-note { display:none; }
  .account-view { padding-block:14px 34px; }
  .plan-grid, .profile-grid { grid-template-columns:minmax(0,1fr); gap:10px; margin-top:16px; }
  .account-card { padding:16px; }
  .profile-sections { padding-block:4px; }
  .plan-price { margin-block:8px; }
  .account-facts div, .payment-row { gap:8px; }
}

#taste-home { padding-top:12px; }
#taste-home button { background:transparent; border:0; color:#e6ccff; min-height:44px; padding:5px 0; font:inherit; font-size:13px; }
#taste-reminder { margin-top:12px; padding:14px; }
#taste-reminder p { margin:0; }
#taste-dialog { width:min(570px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; overscroll-behavior:contain; padding:20px; color:#f5f3ff; background:#211a30; border:1px solid #59496d; border-radius:15px; }
#taste-dialog::backdrop { background:#05040bd9; }
#taste-dialog h2 { padding-right:50px; }
#taste-dialog button { min-height:44px; }
#taste-dialog button:not(.account-primary) { padding:8px 12px; border:1px solid #5d4d73; border-radius:9px; background:#30233f; color:#f0e4ff; }
#taste-dialog button:disabled { opacity:.65; cursor:default; }
#taste-close { float:right; width:44px; }
#taste-dialog label { font-weight:750; }
#taste-dialog .hint { margin:8px 0; }
#taste-current { margin:12px 0; padding:10px; border-radius:9px; background:#151422; }
#taste-current h3 { margin:0; font-size:13px; color:#d9bffa; }
#taste-saved { margin:5px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.profile-taste { display:block; }
.profile-taste h2 { font-size:17px; }
.profile-taste p { white-space:pre-wrap; overflow-wrap:anywhere; margin:6px 0; }
.profile-taste button { min-height:44px; padding:7px 10px; border:1px solid #5d4d73; border-radius:9px; background:#30233f; color:#f0e4ff; }
body[data-mode=solo] .hero h1 { font-size:clamp(40px,5.2vw,75px); }
body[data-mode=solo] .hero h1 span { white-space:nowrap; }
#cinema-message { margin-top:12px; }
#cinema-message .account-card { max-width:660px; padding:14px 16px; }
#cinema-message p { margin:0; line-height:1.5; }
@media(max-width:650px) {
  body[data-mode=solo] .hero h1 { font-size:clamp(27px,8.1vw,48px); }
}
@media(max-width:350px) {
  body[data-mode=solo] .hero .hero-inner { padding-top:144px; }
  body[data-mode=solo] .hero h1 { margin-top:10px; }
}
.account-view [data-info="plus-example"] { min-height:44px; padding:8px 12px; border:1px solid #5d4d73; border-radius:9px; background:#30233f; color:#f0e4ff; }

.quick-settings summary { cursor:pointer; min-height:44px; padding:12px 0; color:#dec9fc; font-size:14px; font-weight:750; }
.quick-settings[open] { display:grid; gap:12px; }
.quick-settings > label { display:block; margin-bottom:8px; }
#watch #pilot-select { width:100%; margin-bottom:12px; justify-content:space-between; background:#c2a6f2; color:#171022; border-color:#c2a6f2; }
#watch #pilot-select:hover { background:#d4baff; }
#pilot-select span { font-size:12px; }
#pilot-history, #pilot-library { list-style:none; padding:0; }
.pilot-entry { display:block; min-height:44px; border:0; background:none; color:#e3cafa; text-align:left; cursor:pointer; padding:6px 0; }
@media(max-width:650px) {
  body:not([data-mode=solo]) .hero .hero-inner { padding-top:105px; }
  body:not([data-mode=solo]) .hero:after { background:linear-gradient(180deg,transparent 45px,#151523 170px); }
  body[data-mode=pair] .hero h1,body[data-mode=family] .hero h1 { font-size:clamp(32px,9vw,45px); }
  #pair .viewer-list { display:grid; grid-template-columns:1fr; gap:8px; }
  #pair .viewer textarea { min-height:48px; }
}

#search-extra { margin-top:10px; }
#search-extra summary { min-height:44px; padding-block:12px; cursor:pointer; color:#e6ccff; }
#search-extra-links { margin-top:3px; }

.test-indicator { position:relative; z-index:4; font-size:12px; color:#dacaf1; }
.test-indicator summary { cursor:pointer; border:1px solid #5d4d73; border-radius:12px; padding:5px 8px; list-style:none; }
.test-indicator div { position:absolute; right:0; top:calc(100% + 6px); width:220px; padding:12px; border:1px solid #59496d; border-radius:10px; background:#211a30; }
.test-indicator a { display:block; min-height:0; margin-top:6px; padding:0; text-decoration:underline; }
#pilot-bar { margin-top:12px; }
.quota-status { display:flex; gap:12px; align-items:center; flex-wrap:wrap; font-size:12px; color:#d9cdeb; }
.quota-status progress { width:85px; height:8px; accent-color:#c2a6f2; }
#where-film { color:#eee3fa; font-weight:750; overflow-wrap:anywhere; }
#watch-options .watch-platforms { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
#watch-options .watch-platforms a { text-align:center; white-space:normal; padding-inline:6px; }
.plus-rules { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:12px 18px; }
.plus-rules div { border-top:1px solid #514360; padding-top:10px; }
.plus-rules dt { font-weight:800; color:#eedafa; }
.plus-rules dd { margin:4px 0 0; line-height:1.5; }
.profile-row input[type=checkbox] { accent-color:#b79ae9; width:16px; height:16px; vertical-align:middle; }
[data-pilot-preferences] { min-height:44px; margin:8px 0; padding:8px 12px; border:1px solid #5d4d73; border-radius:9px; background:#30233f; color:#f0e4ff; }
#pilot-history-link { align-self:center; padding:9px 4px; font-size:13px; color:#dfc5ff; text-decoration:underline; }
#watch-options #where-title { padding-right:50px; font-size:clamp(23px,5vw,30px); }
#watch-options .dialog-close { margin-left:8px; }
@media(max-width:350px) {
  .top-inner { gap:8px; }
  .top-tools a { padding-inline:3px; }
  .test-indicator summary { padding-inline:6px; }
}
@media(max-width:650px) {
  #work > *, #pair .viewer, .results-head > div { min-width:0; }
  #pair .viewer-list { grid-template-columns:minmax(0,1fr); }
}

html[data-channel=miniapp] .top-inner {
  min-height:calc(58px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  padding-top:calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}
html[data-channel=miniapp] .footer {
  padding-bottom:calc(28px + max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px)));
}
