/* KINO//DOSSIER 0.7.98
   Wide-screen presentation layer. Desktop and landscape tablet share one responsive interface; portrait/mobile keep the touch layout. */

.desktop-page-heading,
.desktop-library-workspace,
.desktop-diary-summary,
.desktop-diary-timeline,
.desktop-detail-modebar,
.tonight-desktop-preview,
.nav-label-desktop{display:none}

@media (min-width:1024px), (orientation:landscape) and (min-width:821px){
  .mobile-home-title{display:none}

  :root{
    --desktop-rail:236px;
    --desktop-command:72px;
    --desktop-page-pad:clamp(30px,3.5vw,64px);
    --desktop-max:1480px;
    --desktop-card-radius:14px;
  }

  body{overflow:hidden;background:var(--bg)}
  .kd-runtime{width:100%;height:100dvh;min-height:100dvh;border:0;border-radius:0;box-shadow:none}
  .app{
    margin-left:var(--desktop-rail);
    width:calc(100% - var(--desktop-rail));
    height:100dvh;
    border-left:1px solid #252a24;
    background-color:var(--bg);
    background-image:
      linear-gradient(color-mix(in srgb,var(--ink) 3%,transparent) 1px,transparent 1px),
      linear-gradient(90deg,color-mix(in srgb,var(--ink) 3%,transparent) 1px,transparent 1px);
    background-size:28px 28px;
  }

  /* Desktop rail */
  .bottom-nav,
  .bottom-nav.hidden{
    position:fixed!important;
    inset:0 auto 0 0!important;
    transform:none!important;
    width:var(--desktop-rail)!important;
    min-height:100dvh!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:4px!important;
    padding:102px 14px 18px!important;
    border:0!important;
    background:#0b0e0b!important;
    color:#eef0e8!important;
    z-index:60!important;
  }
  .bottom-nav::before{
    content:"KINO//DOSSIER";
    position:absolute;
    top:29px;
    left:20px;
    color:#f4f5ef;
    font:900 18px/1 var(--mono);
    letter-spacing:.045em;
  }
  .bottom-nav::after{
    content:"ARCHIVIO PERSONALE · 0.9.75";
    position:absolute;
    top:62px;
    left:20px;
    color:#747c71;
    font:750 7.5px/1 var(--mono);
    letter-spacing:.13em;
  }
  .desktop-nav-only{display:flex}
  .desktop-archive-card{
    order:0;
    display:grid;
    grid-template-columns:9px minmax(0,1fr);
    gap:11px;
    align-items:start;
    margin:0 2px 14px;
    padding:14px 13px;
    border:1px solid #2c332a;
    border-radius:10px;
    background:#121712;
    color:#dfe4da;
  }
  .desktop-archive-dot{width:8px;height:8px;margin-top:3px;border-radius:50%;background:var(--lime);box-shadow:0 0 0 4px color-mix(in srgb,var(--lime) 12%,transparent)}
  .desktop-archive-card span:last-child{display:block;min-width:0}
  .desktop-archive-card small,
  .desktop-archive-card strong,
  .desktop-archive-card em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .desktop-archive-card small{color:#7f897b;font:750 7px/1.2 var(--mono);letter-spacing:.12em}
  .desktop-archive-card strong{margin-top:6px;color:#f1f2ec;font:800 12px/1.25 var(--mono)}
  .desktop-archive-card em{margin-top:4px;color:#727a70;font:650 8px/1.3 var(--mono);font-style:normal}
  .bottom-nav .nav,
  .bottom-nav .nav.register{
    transform:none;
    width:100%;
    min-height:44px;
    display:grid;
    grid-template-columns:27px minmax(0,1fr);
    align-items:center;
    justify-items:start;
    gap:10px;
    padding:0 11px;
    border:1px solid transparent;
    border-radius:8px;
    background:transparent;
    color:#8d9588;
    font:750 10.5px/1 var(--mono);
    letter-spacing:.035em;
    text-align:left;
  }
  .bottom-nav .nav:hover{border-color:#293027;background:#151a14;color:#f2f3ec}
  .bottom-nav .nav.active{border-color:#33402b;background:#192018;color:var(--lime)}
  .bottom-nav .nav svg{width:18px;height:18px}
  .bottom-nav .nav[data-nav="home"]{order:1}
  .bottom-nav .nav[data-nav="library"]{order:2}
  .bottom-nav .nav[data-nav="search"]{order:3}
  .bottom-nav .nav[data-nav="diary"]{order:4}
  .bottom-nav .nav[data-nav="upcoming"]{order:5}
  .bottom-nav .nav[data-nav="tonight"]{order:6}
  .bottom-nav .nav[data-nav="collections"]{order:7}
  .bottom-nav .nav.register{
    order:7;
    margin:12px 0 0;
    border-color:#34402c;
    background:#151b14;
    color:var(--lime);
  }
  .bottom-nav .nav.register:hover{border-color:var(--lime);background:#1b2518}
  .bottom-nav .register-icon{width:25px;height:25px;border:0;border-radius:7px;background:var(--lime);color:#071004;box-shadow:none}
  .bottom-nav .nav.register span:last-child{margin:0;color:inherit}
  .bottom-nav .nav[data-nav="menu"]{order:99;margin-top:auto}
  .nav-label-mobile{display:none}
  .nav-label-desktop{display:inline}

  /* Command bar and page headings */
  .desktop-commandbar{
    height:var(--desktop-command);
    display:grid;
    grid-template-columns:minmax(180px,1fr) minmax(280px,410px) 42px;
    gap:14px;
    padding:0 var(--desktop-page-pad);
    border-bottom:1px solid var(--line);
    background:color-mix(in srgb,var(--bg) 94%,transparent);
    backdrop-filter:blur(18px);
  }
  .desktop-breadcrumb{font-size:9px}
  .desktop-quick-search{height:42px;border-radius:9px;background:color-mix(in srgb,var(--surface) 92%,transparent)}
  .desktop-command-menu{width:42px;height:42px;border-radius:9px}
  .screen{top:var(--desktop-command);background:transparent}
  .screen>.topbar{
    min-height:128px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:18px;
    padding:28px var(--desktop-page-pad) 24px;
    border-bottom:0;
    background:transparent;
  }
  .screen>.topbar .topbar-copy{text-align:left}
  .screen>.topbar .topbar-copy h1{font-size:clamp(31px,3vw,43px);line-height:1.02;letter-spacing:-.055em;font-weight:780}
  .screen>.topbar .context{margin-bottom:8px;color:var(--lime);font-size:9px;letter-spacing:.15em}
  .screen>.topbar>.topbar-spacer,
  .screen>.topbar>[data-back],
  .screen[data-screen="library"]>.topbar>[data-open-menu],
  .screen[data-screen="home"]>.topbar>.icon{display:none}
  .screen[data-screen="home"]>.topbar{display:block;padding-bottom:20px}
  .screen[data-screen="home"]>.topbar .brand-lockup{display:none}
  .desktop-page-heading{display:block}
  .desktop-page-heading h1{margin:0;font-size:clamp(31px,3vw,43px);line-height:1.03;letter-spacing:-.055em}
  .desktop-page-heading p{margin:10px 0 0;max-width:670px;color:var(--muted);font:550 12px/1.55 var(--mono)}
  .screen[data-screen="search"] #searchFilterButton,
  .screen[data-screen="diary"] #diaryFilterButton,
  .screen[data-screen="collections"] #newCollectionButton,
  .screen[data-screen="tonight"] #tonightHeaderAction{
    width:auto;
    min-width:112px;
    padding:0 15px;
    display:flex;
    gap:9px;
    border-radius:9px;
    font:750 10px/1 var(--mono);
  }
  .screen[data-screen="search"] #searchFilterButton::after,
  .screen[data-screen="diary"] #diaryFilterButton::after{content:"Filtri"}
  .screen[data-screen="collections"] #newCollectionButton::after{content:"Nuova lista"}
  .screen[data-screen="tonight"] #tonightHeaderAction::after{content:"Come funziona"}
  .screen[data-screen="tonight"].result-mode #tonightHeaderAction::after{content:"Un altro"}
  .content{
    width:100%;
    max-width:var(--desktop-max);
    margin:0 auto;
    padding:0 var(--desktop-page-pad) 64px;
    scrollbar-width:thin;
    scrollbar-color:var(--line2) transparent;
  }

  /* Home */
  .home-content{
    max-width:var(--desktop-max);
    display:grid;
    grid-template-columns:repeat(12,minmax(0,1fr));
    gap:0 24px;
    align-content:start;
  }
  .home-content>.notice,
  .home-content>.home-kicker,
  .home-content>#homeResumeSection,
  .home-content>#homeLatestSection{grid-column:1/-1}
  .home-content>#homeWatchlistSection{grid-column:1/8;margin-right:4px}
  .home-content>#homeExpandedBlocks{grid-column:8/-1;grid-row:auto;border-left:1px solid var(--line);padding-left:24px}
  .home-content>.home-layout-toggle{display:none}
  .home-kicker{padding:0 0 14px;border-bottom:1px solid var(--line);margin-bottom:22px}
  .home-section{margin-bottom:30px}
  .home-section .section-head{margin-bottom:13px}
  .home-section .section-head h2{font-size:11px;letter-spacing:.1em;text-transform:uppercase}
  #homeResumeSection .home-resume-v081{padding:14px;border-radius:var(--desktop-card-radius);background:color-mix(in srgb,var(--surface) 88%,transparent)}
  #homeResumeSection .home-resume-v081 .home-resume-toggle{grid-template-columns:116px minmax(0,1fr) 44px;gap:20px}
  #homeResumeSection .home-resume-v081 .home-resume-toggle>.poster{width:116px;height:174px;border-radius:8px}
  #homeResumeSection .home-resume-v081 .home-resume-copy strong{font-size:clamp(22px,2vw,30px);white-space:normal}
  #homeResumeSection .home-resume-v081 .home-resume-copy>span:not(.home-resume-progress):not(.home-resume-meta){font-size:12px}
  #homeResumeSection .home-resume-v081 .home-resume-expanded{display:block;margin-left:136px;padding-top:14px}
  #homeResumeSection .home-resume-v081 .home-resume-expanded p{max-width:780px;font-size:12px}
  #homeResumeSection .home-resume-v081 .home-resume-arrow{display:none}
  .home-empty{min-height:180px;display:grid;place-items:center;align-content:center;border-radius:var(--desktop-card-radius);background:color-mix(in srgb,var(--surface) 72%,transparent)}
  .home-strip{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-flow:row;gap:18px;overflow:visible;padding:0}
  #homeWatchlistSection .home-strip{grid-template-columns:repeat(4,minmax(0,1fr))}
  .home-poster-card>.poster{width:100%;height:auto;aspect-ratio:2/3;border-radius:8px;transition:transform .16s ease,box-shadow .16s ease}
  .home-poster-card:hover>.poster{transform:translateY(-3px);box-shadow:0 12px 25px rgba(0,0,0,.18)}
  .home-poster-card strong{font-size:12px;margin-top:9px}
  .home-poster-card>span{font-size:9px}
  .home-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .home-metric{min-height:112px;border-radius:11px;padding:15px}
  .home-metric strong{font-size:31px}
  .home-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .home-stat{min-height:108px;border-radius:11px}

  /* Search */
  .search-page-content{max-width:var(--desktop-max)}
  .search-page-content>.search-main{
    min-height:72px;
    margin:0;
    padding:10px;
    border:1px solid #30372e;
    border-radius:13px 13px 0 0;
    background:#0d110d;
  }
  .search-page-content>.search-main .field{height:50px;padding-left:46px;border-color:#394235;background:#151b14;color:#f1f4ed;font-size:15px}
  .search-page-content>.search-main svg{left:27px;color:var(--lime)}
  .search-page-content>.search-tabs{
    width:45%;
    margin:0;
    border-color:#30372e;
    border-top:0;
    background:#0d110d;
  }
  .search-page-content>.search-tabs button{min-height:48px;color:#aab2a6;border-color:#30372e}
  .search-page-content>.search-tabs button.active{background:#20291c;color:var(--lime)}
  .search-source-switch{
    width:55%;
    margin:-49px 0 24px 45%;
    min-height:49px;
    border:1px solid #30372e;
    border-top:0;
    border-left:0;
    border-radius:0 0 13px 0;
    background:#0d110d;
  }
  .search-source-switch button{min-height:48px;color:#aab2a6}
  .search-source-switch button.active{background:#20291c;color:var(--lime)}
  .search-archive-quick,.search-active-filters,.search-smart-save,.search-summary{margin-bottom:18px}
  .search-feed-grid{grid-template-columns:repeat(4,max-content);justify-content:start;gap:8px;margin-bottom:18px}
  .search-feed{min-width:118px;min-height:42px;grid-template-columns:18px auto;padding:0 13px;border-radius:8px}
  .search-feed strong{font-size:9px}
  .search-feed-status{margin:10px 0 16px}
  .search-screen .search-results{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:24px 16px;
  }
  .search-screen .search-result-card{display:block;min-width:0;text-align:left}
  .search-screen .search-result-poster{width:100%;height:auto;aspect-ratio:2/3;border-radius:9px}
  .search-screen .search-grid-copy{padding:9px 1px 0}
  .search-screen .search-grid-copy strong{font-size:12px}
  .search-screen .search-grid-copy span{font-size:9px}
  .search-screen .search-result-card:hover .search-result-poster{transform:translateY(-3px);box-shadow:0 12px 28px rgba(0,0,0,.2)}
  .search-load-more{width:min(360px,100%);margin:28px auto 0}

  /* Library */
  .library-page-content{max-width:var(--desktop-max)}
  .library-hero{display:none}
  .desktop-library-workspace{display:block}
  .library-page-content>.library-metric-grid,
  .library-page-content>.library-resume-section{display:none}
  .desktop-library-toolbar{
    display:grid;
    grid-template-columns:minmax(420px,1fr) minmax(230px,.55fr) 190px;
    gap:12px;
    align-items:end;
    padding:13px;
    border:1px solid var(--line);
    border-radius:12px;
    background:color-mix(in srgb,var(--surface) 88%,transparent);
  }
  .desktop-library-filters{display:flex;align-items:center;gap:5px;min-height:44px}
  .desktop-library-filters button{min-height:38px;padding:0 13px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--muted);font:750 9px/1 var(--mono)}
  .desktop-library-filters button:hover{border-color:var(--line)}
  .desktop-library-filters button.active{border-color:color-mix(in srgb,var(--lime) 40%,var(--line));background:color-mix(in srgb,var(--lime) 9%,var(--surface));color:var(--lime)}
  .desktop-library-search,.desktop-library-sort{display:grid;gap:5px}
  .desktop-library-search>span,.desktop-library-sort>span{color:var(--muted);font:750 7px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase}
  .desktop-library-search input,.desktop-library-sort select{height:42px;width:100%;border:1px solid var(--line);border-radius:7px;background:var(--surface);padding:0 11px;outline:0;font:650 10px/1 var(--mono)}
  .desktop-library-search input:focus,.desktop-library-sort select:focus{border-color:var(--lime);box-shadow:0 0 0 2px color-mix(in srgb,var(--lime) 12%,transparent)}
  .desktop-library-result-head{display:flex;justify-content:space-between;align-items:end;padding:25px 1px 13px;border-bottom:1px solid var(--line);margin-bottom:18px}
  .desktop-library-result-head strong{font-size:17px}
  .desktop-library-result-head span{color:var(--muted);font:650 9px/1 var(--mono)}
  .desktop-library-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:26px 16px}
  .desktop-library-card{display:block;min-width:0;padding:0;border:0;background:transparent;text-align:left;color:var(--ink)}
  .desktop-library-poster{position:relative;display:block;width:100%;aspect-ratio:2/3;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:var(--surface3);background-position:center;background-size:cover;transition:transform .16s ease,box-shadow .16s ease}
  .desktop-library-card:hover .desktop-library-poster{transform:translateY(-3px);box-shadow:0 12px 26px rgba(0,0,0,.18)}
  .desktop-library-kind,.desktop-library-state{position:absolute;top:8px;padding:5px 7px;border-radius:5px;background:rgba(8,10,8,.86);color:#eef2e9;font:800 7px/1 var(--mono);letter-spacing:.08em}
  .desktop-library-kind{left:8px}.desktop-library-state{right:8px;color:var(--lime)}
  .desktop-library-progress{position:absolute;inset:auto 8px 8px;height:4px;background:rgba(255,255,255,.22)}
  .desktop-library-progress b{display:block;height:100%;background:var(--lime)}
  .desktop-library-copy{display:block;padding:9px 1px 0;min-width:0}
  .desktop-library-copy strong,.desktop-library-copy span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .desktop-library-copy strong{font-size:12px;line-height:1.3}
  .desktop-library-copy span{margin-top:4px;color:var(--muted);font:600 9px/1.35 var(--mono)}
  .desktop-library-empty{grid-column:1/-1;min-height:310px;display:grid;place-items:center;align-content:center;border:1px dashed var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 56%,transparent);text-align:center}
  .desktop-library-empty strong{font-size:20px}.desktop-library-empty p{max-width:410px;margin:8px 0 0;color:var(--muted);font:550 11px/1.55 var(--mono)}

  /* Unified Diary */
  .diary-content{max-width:var(--desktop-max)}
  .desktop-diary-summary{
    display:grid;
    grid-template-columns:minmax(250px,1fr) auto auto;
    gap:28px;
    align-items:center;
    padding:18px 20px;
    margin-bottom:24px;
    border:1px solid var(--line);
    border-radius:12px;
    background:color-mix(in srgb,var(--surface) 88%,transparent);
  }
  .desktop-diary-summary>div:first-child>strong,.desktop-diary-summary>div:first-child>small{display:block}
  .desktop-diary-summary>div:first-child>strong{font-size:21px}.desktop-diary-summary>div:first-child>small{margin-top:5px;color:var(--muted);font:600 9px/1.3 var(--mono)}
  .desktop-diary-metrics{display:flex;align-items:stretch;border-left:1px solid var(--line)}
  .desktop-diary-metrics>span{min-width:92px;padding:4px 18px;border-right:1px solid var(--line)}
  .desktop-diary-metrics b,.desktop-diary-metrics small{display:block}
  .desktop-diary-metrics b{font-size:18px}.desktop-diary-metrics small{margin-top:4px;color:var(--muted);font:650 8px/1 var(--mono);text-transform:uppercase}
  .desktop-primary-action{min-height:46px;padding:0 17px;border:1px solid var(--lime);border-radius:8px;background:var(--lime);color:#071004;font:800 10px/1 var(--mono)}
  .desktop-diary-timeline{display:none}
  .diary-content>.diary-content-tabs{display:grid!important;width:min(420px,100%);margin:0 0 22px}
  .diary-content[data-desktop-layout="diary"]>.desktop-diary-timeline:not([hidden]){display:block}
  .diary-content[data-desktop-layout="diary"]>#diaryMovieView,
  .diary-content[data-desktop-layout="diary"]>#diarySeriesView{display:none!important}
  .diary-content[data-desktop-layout="grid"]>.desktop-diary-timeline{display:none!important}
  .diary-content[data-desktop-layout="grid"]>#diaryMovieView:not([hidden]),
  .diary-content[data-desktop-layout="grid"]>#diarySeriesView:not([hidden]){display:block!important}
  .desktop-diary-day{display:grid;grid-template-columns:126px minmax(0,1fr);gap:24px;border-top:1px solid var(--line);padding:22px 0}
  .desktop-diary-day:first-child{border-top:0;padding-top:0}
  .desktop-diary-date{position:sticky;top:0;align-self:start;padding:4px 0}
  .desktop-diary-date strong,.desktop-diary-date span{display:block}
  .desktop-diary-date strong{font:850 28px/.9 var(--mono);color:var(--ink)}
  .desktop-diary-date span{margin-top:7px;color:var(--muted);font:750 8px/1.35 var(--mono);letter-spacing:.1em;text-transform:uppercase}
  .desktop-diary-events{display:grid;gap:9px}
  .desktop-diary-event{
    width:100%;
    min-height:86px;
    display:grid;
    grid-template-columns:48px 76px minmax(0,1fr) auto 28px;
    gap:14px;
    align-items:center;
    padding:9px 12px 9px 9px;
    border:1px solid var(--line);
    border-radius:10px;
    background:color-mix(in srgb,var(--surface) 89%,transparent);
    color:var(--ink);
    text-align:left;
  }
  .desktop-diary-event:hover{border-color:color-mix(in srgb,var(--lime) 50%,var(--line));background:var(--surface)}
  .desktop-diary-event time{color:var(--muted);font:700 9px/1 var(--mono);text-align:center}
  .desktop-diary-event .poster{width:52px;height:72px;border-radius:5px}
  .desktop-diary-event-copy{min-width:0}
  .desktop-diary-event-copy small,.desktop-diary-event-copy strong,.desktop-diary-event-copy span{display:block}
  .desktop-diary-event-copy small{color:var(--lime);font:800 7px/1 var(--mono);letter-spacing:.11em}
  .desktop-diary-event-copy strong{margin-top:6px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .desktop-diary-event-copy span{margin-top:4px;color:var(--muted);font:600 9px/1.35 var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .desktop-diary-event-state{text-align:right}
  .desktop-diary-event-state b,.desktop-diary-event-state small{display:block}
  .desktop-diary-event-state b{color:var(--purple);font:800 11px/1 var(--mono)}
  .desktop-diary-event-state small{margin-top:5px;color:var(--muted);font:650 8px/1 var(--mono)}
  .desktop-diary-chevron{color:var(--muted);font-size:20px;text-align:center}
  .desktop-diary-empty{min-height:330px;display:grid;place-items:center;align-content:center;border:1px dashed var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 58%,transparent);text-align:center}
  .desktop-diary-empty strong{font-size:21px}.desktop-diary-empty p{margin:8px 0 17px;color:var(--muted);font:550 11px/1.5 var(--mono)}

  /* Tonight: stable controls/results split */
  .tonight-content{max-width:var(--desktop-max);display:grid;grid-template-columns:minmax(480px,.88fr) minmax(430px,1.12fr);gap:28px;align-items:start}
  #tonightSetupView{grid-column:1;display:grid;grid-template-columns:1fr;gap:12px}
  #tonightSetupView>.tonight-subtitle,#tonightSetupView>.tonight-status,#tonightSetupView>.tonight-find{grid-column:auto}
  #tonightSetupView .tonight-block{padding:16px 17px;border-radius:11px}
  #tonightSetupView .tonight-block:nth-of-type(3){grid-row:auto}
  #tonightSetupView .tonight-grid.mood{grid-template-columns:repeat(4,minmax(0,1fr))}
  #tonightSetupView .tonight-option{min-height:48px}
  #tonightSetupView .tonight-find{width:100%;min-height:52px}
  .tonight-desktop-preview{
    grid-column:2;
    grid-row:1;
    min-height:610px;
    display:grid;
    place-items:center;
    align-content:center;
    padding:40px;
    border:1px solid var(--line);
    border-radius:15px;
    background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--lime) 7%,transparent),transparent 30%),color-mix(in srgb,var(--surface) 82%,transparent);
    text-align:center;
    position:relative;
  }
  .tonight-desktop-preview[hidden]{display:none!important}
  .tonight-preview-index{position:absolute;align-self:start;justify-self:start;color:var(--muted);font:750 8px/1 var(--mono);letter-spacing:.13em}
  .tonight-preview-orbit{width:146px;height:146px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--lime) 35%,var(--line));border-radius:50%;position:relative;margin-bottom:26px}
  .tonight-preview-orbit::before,.tonight-preview-orbit::after{content:"";position:absolute;border:1px solid color-mix(in srgb,var(--purple) 28%,transparent);border-radius:50%}
  .tonight-preview-orbit::before{inset:19px}.tonight-preview-orbit::after{inset:43px}
  .tonight-preview-orbit span{width:10px;height:10px;border-radius:50%;background:var(--lime);box-shadow:0 0 22px color-mix(in srgb,var(--lime) 55%,transparent)}
  .tonight-desktop-preview strong{font-size:24px}.tonight-desktop-preview p{max-width:430px;margin:10px 0 20px;color:var(--muted);font:550 11px/1.6 var(--mono)}.tonight-desktop-preview small{color:var(--lime);font:750 8px/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase}
  #tonightResultView,#tonightEmptyView{grid-column:2;grid-row:1;margin:0;max-width:none;min-height:610px}
  #tonightResultView:not([hidden])~.tonight-desktop-preview,#tonightEmptyView:not([hidden])~.tonight-desktop-preview{display:none}
  .tonight-content:has(#tonightResultView:not([hidden])) .tonight-desktop-preview,
  .tonight-content:has(#tonightEmptyView:not([hidden])) .tonight-desktop-preview{display:none}

  /* Collections and settings */
  .collections-content{max-width:var(--desktop-max)}
  .collections-intro{padding:18px 22px;margin-bottom:20px;border-radius:12px}
  .collections-intro h2{font-size:25px}
  .collections-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
  .collections-empty{grid-column:1/-1;min-height:330px;display:grid;place-items:center;align-content:center;border-style:dashed;background:color-mix(in srgb,var(--surface) 58%,transparent)}
  .screen[data-screen="menu"]>.topbar .topbar-brand{font-size:0;text-align:left}
  .screen[data-screen="menu"]>.topbar .topbar-brand::before{content:"Impostazioni";font:780 clamp(31px,3vw,43px)/1.02 var(--sans);letter-spacing:-.055em}
  .screen[data-screen="menu"]>.topbar [data-go="search"]{display:none}
  .screen[data-screen="menu"]>.topbar #themeToggle{justify-self:end}
  [data-screen="menu"] .data-content{max-width:1180px;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
  [data-screen="menu"] .menu-profile{grid-column:1/-1;margin:0;border-radius:12px}
  [data-screen="menu"] .menu-section{padding:18px;border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 78%,transparent)}
  [data-screen="menu"] .tool-list{border-radius:9px}

  /* Desktop title inspector and full dossier */
  .app.desktop-detail-open::after{content:"";position:absolute;inset:var(--desktop-command) 0 0;z-index:24;background:rgba(5,7,5,.48);backdrop-filter:blur(2px);pointer-events:none}
  .app.desktop-detail-open>.screen.active:not(.desktop-detail-inspector){pointer-events:none}
  .screen.desktop-detail-inspector{
    inset:0 0 0 auto;
    top:0;
    width:min(610px,48vw);
    height:100%;
    z-index:32;
    border-left:1px solid var(--line2);
    background:var(--bg);
    box-shadow:-28px 0 70px rgba(0,0,0,.3);
    transform:none;
  }
  .screen.desktop-detail-inspector>.topbar,
  .screen.desktop-detail-full>.topbar{
    position:relative;
    inset:auto;
    z-index:3;
    flex:0 0 auto;
    display:grid;
    grid-template-columns:40px minmax(0,1fr) 40px;
    align-items:center;
  }
  .screen.desktop-detail-inspector>.topbar{min-height:76px;padding:12px 18px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--bg) 94%,transparent)}
  .screen.desktop-detail-inspector>.topbar>[data-back]{display:grid}
  .screen.desktop-detail-inspector>.topbar .topbar-copy h1{font-size:18px;letter-spacing:-.025em}
  .screen.desktop-detail-inspector>.topbar .context{margin-bottom:4px;font-size:7px}
  .screen.desktop-detail-inspector>.topbar>.icon:last-child{display:grid}
  .screen.desktop-detail-inspector>.topbar .topbar-copy h1,
  .screen.desktop-detail-full>.topbar .topbar-copy h1{opacity:1;transform:none}
  .screen.desktop-detail-inspector>.detail-rich-content{display:block;max-width:none;padding:14px 16px 30px}
  .desktop-detail-modebar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
  .desktop-detail-modebar span{color:var(--muted);font:750 7px/1 var(--mono);letter-spacing:.12em}
  .desktop-detail-modebar button{min-height:32px;padding:0 10px;border:1px solid color-mix(in srgb,var(--lime) 48%,var(--line));border-radius:6px;background:color-mix(in srgb,var(--lime) 8%,var(--surface));color:var(--lime);font:750 8px/1 var(--mono)}
  .screen.desktop-detail-inspector .detail-cinematic-hero{position:relative;top:auto;min-height:300px;margin:0 0 12px;border-radius:11px}
  .screen.desktop-detail-inspector .detail-hybrid-identity{padding:22px}
  .screen.desktop-detail-inspector .detail-hybrid-identity h2{font-size:30px}
  .screen.desktop-detail-inspector .detail-poster-compat{width:104px;height:156px}
  .screen.desktop-detail-inspector .detail-dossier-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .screen.desktop-detail-inspector .detail-dossier-item{min-height:88px;padding:10px 6px}
  .screen.desktop-detail-inspector .hybrid-detail-actions{grid-template-columns:1.25fr 1fr;margin-bottom:12px}
  .screen.desktop-detail-inspector .detail-journey-section,
  .screen.desktop-detail-inspector .detail-meta-panel,
  .screen.desktop-detail-inspector .detail-history,
  .screen.desktop-detail-inspector .detail-seasons{display:none}
  .screen.desktop-detail-inspector .detail-editorial-card{margin:0 0 12px;max-height:170px;overflow:hidden}
  .screen.desktop-detail-inspector .hybrid-next-episode{margin-bottom:12px}

  .screen.desktop-detail-full{z-index:26;background:transparent}
  .screen.desktop-detail-full>.topbar{min-height:88px;padding-block:16px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--bg) 94%,transparent)}
  .screen.desktop-detail-full>.topbar>[data-back]{display:grid}
  .screen.desktop-detail-full>.detail-rich-content{
    max-width:var(--desktop-max);
    display:grid;
    grid-template-columns:repeat(12,minmax(0,1fr));
    gap:18px 22px;
    align-content:start;
    padding-bottom:70px;
  }
  .screen.desktop-detail-full .desktop-detail-modebar{grid-column:1/-1;margin:0}
  .screen.desktop-detail-full .desktop-detail-modebar span{font-size:8px}
  .screen.desktop-detail-full .desktop-detail-modebar span::after{content:" · MODALITÀ COMPLETA"}
  .screen.desktop-detail-full .detail-cinematic-hero{
    grid-column:1/8;
    grid-row:2/6;
    position:relative;
    top:auto;
    min-height:520px;
    margin:0;
    border-radius:15px;
    overflow:hidden;
  }
  .screen.desktop-detail-full .detail-backdrop{background-position:center}
  .screen.desktop-detail-full .detail-hybrid-identity{padding:34px}
  .screen.desktop-detail-full .detail-hybrid-identity h2{font-size:clamp(38px,4vw,58px);line-height:.98;max-width:90%}
  .screen.desktop-detail-full .detail-hybrid-meta{font-size:10px}
  .screen.desktop-detail-full .detail-poster-compat{width:148px;height:222px;border-radius:8px}
  .screen.desktop-detail-full .hybrid-personal-panel{grid-column:8/-1;grid-row:2;margin:0;border-radius:13px}
  .screen.desktop-detail-full .detail-dossier-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .screen.desktop-detail-full .detail-dossier-item{min-height:118px;padding:18px 8px}
  .screen.desktop-detail-full .detail-dossier-item strong{font-size:18px}
  .screen.desktop-detail-full .hybrid-detail-actions{grid-column:8/-1;grid-row:3;margin:0;grid-template-columns:1.2fr 1fr}
  .screen.desktop-detail-full .hybrid-detail-actions .button{min-height:54px}
  .screen.desktop-detail-full .detail-journey-section{grid-column:8/-1;grid-row:4;margin:0;padding:18px;border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 82%,transparent)}
  .screen.desktop-detail-full .detail-journey-track{padding-top:18px}
  .screen.desktop-detail-full .detail-editorial-card{grid-column:1/9;margin:0;padding:24px 26px;border-radius:13px}
  .screen.desktop-detail-full .detail-editorial-card p{font-size:13px;line-height:1.75}
  .screen.desktop-detail-full .hybrid-meta-panel{grid-column:9/-1;margin:0;border-radius:13px}
  .screen.desktop-detail-full .detail-meta-item{min-height:92px;padding:16px}
  .screen.desktop-detail-full .detail-meta-item span{font-size:8px}.screen.desktop-detail-full .detail-meta-item strong{font-size:12px}
  .screen.desktop-detail-full .detail-history{grid-column:1/-1;margin:8px 0 0}
  .screen.desktop-detail-full .detail-history .list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px}
  .screen[data-screen="series"].desktop-detail-full .hybrid-next-episode{grid-column:8/-1;grid-row:5;margin:0;border-radius:13px}
  .screen[data-screen="series"].desktop-detail-full .detail-journey-section{grid-row:4}
  .screen[data-screen="series"].desktop-detail-full .detail-seasons{grid-column:1/-1;margin:8px 0 0;padding:22px;border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 72%,transparent)}
  .screen[data-screen="series"].desktop-detail-full .detail-season-preview{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
  .screen[data-screen="series"].desktop-detail-full .detail-editorial-card{grid-column:1/9}
  .screen[data-screen="series"].desktop-detail-full .hybrid-meta-panel{grid-column:9/-1}

  /* Supporting archive pages: desktop density */
  .watchlist-content,.favorites-content,.library-classic-content,.season-index-content{max-width:var(--desktop-max)}
  #watchlistDynamic,#favoritesDynamic,.library-classic-content .list{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 18px}
  .watchlist-card,.favorite-card,.library-row-card{min-height:132px;border-radius:11px}
  .season-index-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
}

@media (min-width:1024px) and (max-width:1240px), (orientation:landscape) and (min-width:821px) and (max-width:1240px){
  :root{--desktop-rail:214px;--desktop-page-pad:28px}
  .bottom-nav{padding-inline:12px!important}
  .desktop-library-toolbar{grid-template-columns:1fr 220px}
  .desktop-library-sort{grid-column:2}.desktop-library-filters{grid-row:1/3}
  .desktop-library-grid,.search-screen .search-results{grid-template-columns:repeat(4,minmax(0,1fr))}
  .home-strip{grid-template-columns:repeat(5,minmax(0,1fr))}
  #homeWatchlistSection .home-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
  .tonight-content{grid-template-columns:minmax(410px,.95fr) minmax(370px,1.05fr)}
  .desktop-diary-summary{grid-template-columns:1fr auto}.desktop-diary-metrics{display:none}
  .screen.desktop-detail-full .detail-cinematic-hero{grid-column:1/7}
  .screen.desktop-detail-full .hybrid-personal-panel,.screen.desktop-detail-full .hybrid-detail-actions,.screen.desktop-detail-full .detail-journey-section,.screen[data-screen="series"].desktop-detail-full .hybrid-next-episode{grid-column:7/-1}
}

@media (min-width:1600px){
  :root{--desktop-rail:252px;--desktop-page-pad:clamp(42px,4vw,76px)}
  .desktop-library-grid,.search-screen .search-results{grid-template-columns:repeat(7,minmax(0,1fr))}
  .home-strip{grid-template-columns:repeat(7,minmax(0,1fr))}
  #homeWatchlistSection .home-strip{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media (prefers-reduced-motion:reduce){
  .desktop-library-poster,.home-poster-card>.poster,.search-result-poster{transition:none!important}
}

@media (min-width:1024px), (orientation:landscape) and (min-width:821px){
  html[data-language="en"] .bottom-nav::after{content:"PERSONAL ARCHIVE · 0.9.75"}
  html[data-language="en"] .screen[data-screen="search"] #searchFilterButton::after,
  html[data-language="en"] .screen[data-screen="diary"] #diaryFilterButton::after{content:"Filters"}
  html[data-language="en"] .screen[data-screen="collections"] #newCollectionButton::after{content:"New list"}
  html[data-language="en"] .screen[data-screen="tonight"] #tonightHeaderAction::after{content:"How it works"}
  html[data-language="en"] .screen[data-screen="tonight"].result-mode #tonightHeaderAction::after{content:"Another"}
  html[data-language="en"] .screen[data-screen="menu"]>.topbar .topbar-brand::before{content:"Settings"}
  html[data-language="en"] .screen.desktop-detail-full .desktop-detail-modebar span::after{content:" · FULL VIEW"}
}


/* 0.7.98 — Desktop adaptations for the poster + backdrop detail hero. */
@media (min-width:1024px), (orientation:landscape) and (min-width:821px){
  .screen.desktop-detail-inspector .detail-poster-compat{
    display:block!important;
    right:22px;
    bottom:22px;
    width:132px!important;
    height:auto!important;
    aspect-ratio:2/3;
    border-radius:12px;
    box-shadow:0 18px 38px rgba(0,0,0,.42);
  }
  .screen.desktop-detail-inspector .detail-hybrid-identity{
    left:22px;
    right:178px;
    bottom:22px;
    padding:0;
  }
  .screen.desktop-detail-full .detail-poster-compat{
    display:block!important;
    right:34px;
    bottom:34px;
    width:176px!important;
    height:auto!important;
    aspect-ratio:2/3;
    border-radius:14px;
    box-shadow:0 24px 52px rgba(0,0,0,.42);
  }
  .screen.desktop-detail-full .detail-hybrid-identity{
    left:34px;
    right:246px;
    bottom:34px;
    padding:0;
  }
}


/* 0.7.98 — watch-provider dossier placement on desktop. */
@media (min-width:1024px), (orientation:landscape) and (min-width:821px){
  .screen.desktop-detail-inspector .detail-watch-panel{margin-bottom:12px}
  .screen.desktop-detail-inspector .detail-watch-row{grid-template-columns:82px minmax(0,1fr)}
  .screen.desktop-detail-full .detail-watch-panel{grid-column:1/9;margin:0;padding:18px 20px;border-radius:13px}
  .screen.desktop-detail-full .detail-watch-row{grid-template-columns:112px minmax(0,1fr);padding:13px 0}
  .screen.desktop-detail-full .detail-watch-provider{min-height:36px;padding-right:10px}
  .screen.desktop-detail-full .detail-watch-logo{width:28px;height:28px;flex-basis:28px}
  .screen.desktop-detail-full .detail-watch-provider strong{font-size:8.5px;max-width:160px}
}

/* 0.7.98 — Stasera redesign desktop parity */
@media(min-width:1024px),(orientation:landscape) and (min-width:821px){
  .tonight-redesign .tonight-content{max-width:1180px;display:block;padding-top:28px}
  .tonight-redesign #tonightSetupView{display:block;max-width:820px;margin:0 auto}
  .tonight-redesign .tonight-entry{display:grid;grid-template-columns:minmax(0,.82fr) minmax(420px,1.18fr);gap:30px;align-items:start}
  .tonight-redesign .tonight-entry-intro{grid-column:1;padding-top:28px}.tonight-redesign .tonight-entry-intro h2{font-size:34px}.tonight-redesign .tonight-entry-actions{grid-column:2;grid-row:1/3;margin-top:0}.tonight-redesign .tonight-how{grid-column:1}
  .tonight-redesign .tonight-guided,.tonight-redesign .tonight-manual{max-width:720px;margin:0 auto}
  .tonight-redesign .tonight-guide-chooser{grid-template-columns:repeat(4,minmax(0,1fr))}.tonight-redesign .tonight-guide-chooser button{min-height:142px}
  .tonight-redesign .tonight-guide-options{grid-template-columns:repeat(3,minmax(0,1fr))}
  .tonight-redesign #tonightResultView{max-width:760px;margin:0 auto;padding:18px 24px 24px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--surface) 78%,transparent)}
  .tonight-redesign .tonight-result-card{grid-template-columns:170px minmax(0,1fr);gap:24px}.tonight-redesign .tonight-result-card .tonight-result-poster{width:170px;height:255px}.tonight-redesign .tonight-result-card .tonight-result-copy h2{font-size:28px}
}


/* 0.7.98 — Wide interface parity and landscape-tablet refinement. */
@media (min-width:1024px), (orientation:landscape) and (min-width:821px){
  /* Keep contextual navigation on secondary dossiers instead of trapping them in the rail. */
  .screen[data-screen="stats"]>.topbar>[data-back],
  .screen[data-screen="monthly"]>.topbar>[data-back],
  .screen[data-screen="vault"]>.topbar>[data-back],
  .screen[data-screen="dataTools"]>.topbar>[data-back],
  .screen[data-screen="watchlist"]>.topbar>[data-back],
  .screen[data-screen="favorites"]>.topbar>[data-back],
  .screen[data-screen="libraryMovies"]>.topbar>[data-back],
  .screen[data-screen="librarySeries"]>.topbar>[data-back],
  .screen[data-screen="collection"]>.topbar>[data-back],
  .screen[data-screen="collectionEdit"]>.topbar>[data-back],
  .screen[data-screen="seasons"]>.topbar>[data-back],
  .screen[data-screen="season"]>.topbar>[data-back]{display:grid}

  /* Registration stays compact and readable instead of stretching a phone form across the workspace. */
  .register-page-content{width:100%;max-width:980px;margin:0 auto;padding-top:10px}
  #registerSelector,#registerMovieForm,#registerSeriesForm{width:100%;max-width:820px;margin-inline:auto}
  .register-search-results{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
  .register-result-section{align-content:start}
  #registerMovieForm>.section,.series-register-flow>.section{padding:18px}

  /* Secondary archive routes use the same wide rhythm as the main workspace. */
  .statistics-content,.monthly-content,.settings-hub-content,.data-hub-content,
  .watchlist-content,.favorites-content,.library-classic-content,.season-index-content,
  .collections-content,.collection-editor-content{width:100%}
  .monthly-hero,.statistics-hero{border-radius:14px}
  .monthly-nav{max-width:720px}
  .statistics-period{max-width:560px}

  /* Desktop overlays are real panels/dialogs, never phone-width bottom sheets stretched across the workspace. */
  .sheet-bg.open,.dialog-bg.open{box-sizing:border-box}
  .discover-kept-sheet{width:min(760px,100%)}
  .search-filter-sheet,.tonight-filter-sheet,.monthly-pdf-sheet{width:min(720px,100%)}
  .quick-actions-sheet{width:min(760px,100%)}
}

@media (orientation:landscape) and (min-width:821px) and (max-width:1023px){
  :root{
    --desktop-rail:176px;
    --desktop-command:60px;
    --desktop-head:60px;
    --desktop-page-pad:18px;
    --desktop-card-radius:11px;
  }

  body{overflow:hidden}
  .app{margin-left:var(--desktop-rail);width:calc(100% - var(--desktop-rail));height:100dvh}

  .bottom-nav,.bottom-nav.hidden{width:var(--desktop-rail)!important;padding:82px 9px 12px!important;gap:2px!important}
  .bottom-nav::before{top:20px;left:14px;font-size:14px;letter-spacing:.035em}
  .bottom-nav::after{top:45px;left:14px;font-size:6.4px;letter-spacing:.09em}
  .desktop-archive-card{margin:0 0 8px;padding:9px 9px;gap:8px;border-radius:8px}
  .desktop-archive-card em{display:none}
  .desktop-archive-card small{font-size:6px}.desktop-archive-card strong{font-size:10px;margin-top:4px}
  .bottom-nav .nav,.bottom-nav .nav.register{min-height:38px;grid-template-columns:22px minmax(0,1fr);gap:7px;padding:0 8px;border-radius:7px;font-size:8.5px}
  .bottom-nav .nav svg{width:16px;height:16px}
  .bottom-nav .nav.register{margin:7px 0 3px}
  .bottom-nav .register-icon{width:21px;height:21px}

  .desktop-commandbar{height:var(--desktop-command);grid-template-columns:minmax(110px,1fr) minmax(210px,300px) 36px;gap:9px;padding:0 var(--desktop-page-pad)}
  .desktop-breadcrumb{font-size:7px;gap:5px;white-space:nowrap;overflow:hidden}
  .desktop-breadcrumb strong{overflow:hidden;text-overflow:ellipsis}
  .desktop-quick-search{height:36px;border-radius:8px;padding-inline:9px}
  .desktop-quick-search input{font-size:9px}.desktop-quick-search kbd{display:none}
  .desktop-command-menu{width:36px;height:36px;border-radius:8px}

  .screen{top:var(--desktop-command)}
  .screen>.topbar{min-height:88px;padding:18px var(--desktop-page-pad) 15px;gap:12px}
  .screen>.topbar .topbar-copy h1,.desktop-page-heading h1{font-size:clamp(25px,4vw,34px)}
  .desktop-page-heading p{font-size:10px;margin-top:7px}
  .content{max-width:none;padding:0 var(--desktop-page-pad) 40px}

  /* Home keeps a useful two-column dossier without compressing cards into desktop density. */
  .home-content{gap:0 16px}
  .home-content>#homeWatchlistSection{grid-column:1/8}
  .home-content>#homeExpandedBlocks{grid-column:8/-1;padding-left:15px}
  .home-strip{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
  #homeWatchlistSection .home-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  #homeResumeSection .home-resume-v081 .home-resume-toggle{grid-template-columns:86px minmax(0,1fr) 34px;gap:13px}
  #homeResumeSection .home-resume-v081 .home-resume-toggle>.poster{width:86px;height:129px}
  #homeResumeSection .home-resume-v081 .home-resume-expanded{margin-left:99px}
  .home-metric-grid,.home-stats-grid{grid-template-columns:1fr}
  .home-metric,.home-stat{min-height:82px}

  /* Search / Library */
  .search-screen .search-results,.desktop-library-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 13px}
  .search-page-content>.search-main{min-height:64px}
  .search-feed-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .search-feed{min-width:0;padding-inline:8px}
  .desktop-library-toolbar{grid-template-columns:minmax(0,1fr) 150px;gap:9px;padding:10px}
  .desktop-library-filters{grid-column:1/-1;grid-row:1;flex-wrap:wrap;min-height:0}
  .desktop-library-search{grid-column:1;grid-row:2}.desktop-library-sort{grid-column:2;grid-row:2}
  .desktop-library-filters button{min-height:34px;padding-inline:9px;font-size:7.5px}
  .desktop-library-result-head{padding-top:18px}

  /* Diary keeps chronological readability at the shorter landscape height. */
  .desktop-diary-summary{grid-template-columns:1fr auto;gap:14px;padding:14px 15px;margin-bottom:17px}
  .desktop-diary-metrics{display:none}
  .desktop-diary-day{grid-template-columns:92px minmax(0,1fr);gap:14px;padding:16px 0}
  .desktop-diary-event{grid-template-columns:38px 58px minmax(0,1fr) 24px;gap:10px;min-height:74px}
  .desktop-diary-event .poster{width:44px;height:64px}
  .desktop-diary-event-state{display:none}
  .diary-series-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 11px}
  .diary-series-list{grid-template-columns:1fr}

  /* Registration and supporting pages. */
  .register-page-content{max-width:760px}
  #registerSelector,#registerMovieForm,#registerSeriesForm{max-width:700px}
  .register-search-results{grid-template-columns:1fr}
  .upcoming-list{grid-template-columns:1fr}
  .collections-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .collection-editor-content{display:block!important;max-width:760px;margin-inline:auto}
  .collection-editor-content>*{grid-column:auto!important;grid-row:auto!important}
  .collection-picker-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .collection-editor-actions{position:static;width:100%;margin-top:16px}
  .statistics-archive-grid,.statistics-view-grid,.statistics-insight-grid,.monthly-summary,.monthly-personal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .statistics-archive-grid>div.wide,.statistics-insight-grid article:first-child{grid-column:auto}
  .monthly-files,.monthly-series{grid-template-columns:1fr}
  .settings-hub-content,.data-hub-content,.vault-center-content{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
  .privacy-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .data-hub-hero{grid-template-columns:1fr!important}
  .data-hub-summary{grid-column:1!important;grid-row:auto!important;border-left:0!important;border-top:1px solid var(--line)!important}
  .season-index-grid{grid-template-columns:repeat(4,minmax(0,1fr))}

  /* Scopri needs a true landscape composition rather than the phone stack or an overflowing desktop grid. */
  .discover-content{max-width:none;padding:15px 18px 30px;grid-template-columns:minmax(205px,.72fr) minmax(330px,1.28fr);gap:0 22px}
  .discover-mode-switch{max-width:100%;margin-bottom:18px}
  .discover-session-head{margin-top:8px;grid-template-columns:1fr 72px}
  .discover-session-head h2{font-size:29px}.discover-session-head p{font-size:10px}
  .discover-deck{height:calc(100dvh - 150px);min-height:430px;max-height:620px}
  .discover-card-title{font-size:28px}.discover-card-overview{font-size:10.5px}
  .discover-card-poster{width:96px}.discover-card-hero.is-poster-mode .discover-card-poster{width:142px}

  /* Full dossier remains two-column, but with tablet-scaled hero/poster. */
  .screen.desktop-detail-full>.detail-rich-content{gap:14px 15px}
  .screen.desktop-detail-full .detail-cinematic-hero{grid-column:1/7;min-height:410px}
  .screen.desktop-detail-full .hybrid-personal-panel,
  .screen.desktop-detail-full .hybrid-detail-actions,
  .screen.desktop-detail-full .detail-journey-section,
  .screen[data-screen="series"].desktop-detail-full .hybrid-next-episode{grid-column:7/-1}
  .screen.desktop-detail-full .detail-poster-compat{width:112px!important;right:20px;bottom:20px}
  .screen.desktop-detail-full .detail-hybrid-identity{left:20px;right:150px;bottom:22px}
  .screen.desktop-detail-full .detail-hybrid-identity h2{font-size:30px}
  .screen.desktop-detail-full .detail-dossier-item{min-height:94px;padding:12px 6px}
  .screen.desktop-detail-full .detail-dossier-item strong{font-size:14px}
  .screen.desktop-detail-full .detail-editorial-card{grid-column:1/8;padding:18px}
  .screen.desktop-detail-full .hybrid-meta-panel{grid-column:8/-1}

  /* Wide overlays stay inside the available app workspace. */
  .sheet-bg.open,.dialog-bg.open{padding:18px 18px 18px calc(var(--desktop-rail) + 18px)}
  .sheet,.dialog{width:min(620px,calc(100vw - var(--desktop-rail) - 36px));max-height:calc(100dvh - 36px)}
  .toast{left:calc(var(--desktop-rail) + 18px);bottom:18px;width:min(420px,calc(100vw - var(--desktop-rail) - 36px))}
}

/* 0.7.98 — final wide-shell ordering/alignment pass. */
@media (min-width:1024px), (orientation:landscape) and (min-width:821px){
  .desktop-home-heading{text-align:left;white-space:normal}
  .bottom-nav .nav[data-nav="discover"]{order:6}
  .bottom-nav .nav[data-nav="collections"]{order:7}
  .bottom-nav .nav.register{order:8}
}

/* ========================================================================== */
/* 0.7.98 — authoritative wide-profile normalization                          */
/* Profiles are assigned before CSS by boot.js: touch / tablet / desktop.    */
/* ========================================================================== */

html[data-wide-profile="tablet"],html[data-wide-profile="desktop"]{
  --wide-page-max:1480px;
}
html[data-wide-profile="tablet"]{
  --desktop-rail:190px;
  --desktop-command:62px;
  --desktop-page-pad:22px;
  --desktop-card-radius:11px;
}
html[data-wide-profile="desktop"]{
  --desktop-rail:236px;
  --desktop-command:72px;
  --desktop-page-pad:clamp(30px,3.4vw,58px);
  --desktop-card-radius:14px;
}

html[data-wide-profile="tablet"] body,
html[data-wide-profile="desktop"] body{display:block;overflow:hidden;background:var(--bg)}
html[data-wide-profile="tablet"] .kd-runtime,
html[data-wide-profile="desktop"] .kd-runtime{width:100%;height:100dvh;min-height:100dvh;border:0;border-radius:0;box-shadow:none}
html[data-wide-profile="tablet"] .app,
html[data-wide-profile="desktop"] .app{margin-left:var(--desktop-rail);width:calc(100% - var(--desktop-rail));height:100dvh;border-left:1px solid #252a24;background-color:var(--bg);background-image:linear-gradient(color-mix(in srgb,var(--ink) 3%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--ink) 3%,transparent) 1px,transparent 1px);background-size:28px 28px}

/* one rail state for every wide route */
html[data-wide-profile="tablet"] .bottom-nav,
html[data-wide-profile="tablet"] .bottom-nav.hidden,
html[data-wide-profile="desktop"] .bottom-nav,
html[data-wide-profile="desktop"] .bottom-nav.hidden{position:fixed!important;inset:0 auto 0 0!important;transform:none!important;width:var(--desktop-rail)!important;min-height:100dvh!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;border:0!important;background:#0b0e0b!important;color:#eef0e8!important;z-index:60!important}
html[data-wide-profile="tablet"] .bottom-nav,
html[data-wide-profile="tablet"] .bottom-nav.hidden{gap:2px!important;padding:90px 10px 14px!important}
html[data-wide-profile="desktop"] .bottom-nav,
html[data-wide-profile="desktop"] .bottom-nav.hidden{gap:4px!important;padding:102px 14px 18px!important}
html[data-wide-profile="tablet"] .bottom-nav::before{top:22px;left:15px;font-size:15px;letter-spacing:.03em}
html[data-wide-profile="tablet"] .bottom-nav::after{content:"ARCHIVIO PERSONALE · 0.9.75";top:49px;left:15px;font-size:6.5px;letter-spacing:.08em}
html[data-wide-profile="desktop"] .bottom-nav::after{content:"ARCHIVIO PERSONALE · 0.9.75"}
html[data-wide-profile="tablet"] .desktop-archive-card{margin:0 0 9px;padding:10px 9px;gap:8px;border-radius:8px}
html[data-wide-profile="tablet"] .desktop-archive-card em{display:none}
html[data-wide-profile="tablet"] .desktop-archive-card small{font-size:6.2px}
html[data-wide-profile="tablet"] .desktop-archive-card strong{font-size:10px;margin-top:4px}
html[data-wide-profile="tablet"] .bottom-nav .nav,
html[data-wide-profile="tablet"] .bottom-nav .nav.register{min-height:40px;grid-template-columns:23px minmax(0,1fr);gap:7px;padding:0 8px;border-radius:7px;font-size:8.8px}
html[data-wide-profile="tablet"] .bottom-nav .nav svg{width:16px;height:16px}
html[data-wide-profile="tablet"] .bottom-nav .nav.register{margin:8px 0 3px}
html[data-wide-profile="tablet"] .bottom-nav .register-icon{width:22px;height:22px}
html[data-wide-profile="tablet"] .bottom-nav .nav.register.active,
html[data-wide-profile="desktop"] .bottom-nav .nav.register.active{border-color:var(--lime)!important;background:var(--lime)!important;color:#071004!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--lime) 18%,transparent)}
html[data-wide-profile="tablet"] .bottom-nav .nav[data-nav="home"],html[data-wide-profile="desktop"] .bottom-nav .nav[data-nav="home"]{order:1}
html[data-wide-profile="tablet"] .bottom-nav .nav[data-nav="library"],html[data-wide-profile="desktop"] .bottom-nav .nav[data-nav="library"]{order:2}
html[data-wide-profile="tablet"] .bottom-nav .nav[data-nav="search"],html[data-wide-profile="desktop"] .bottom-nav .nav[data-nav="search"]{order:3}
html[data-wide-profile="tablet"] .bottom-nav .nav[data-nav="diary"],html[data-wide-profile="desktop"] .bottom-nav .nav[data-nav="diary"]{order:4}
html[data-wide-profile="tablet"] .bottom-nav .nav[data-nav="upcoming"],html[data-wide-profile="desktop"] .bottom-nav .nav[data-nav="upcoming"]{order:5}
html[data-wide-profile="tablet"] .bottom-nav .nav[data-nav="discover"],html[data-wide-profile="desktop"] .bottom-nav .nav[data-nav="discover"]{order:6}
html[data-wide-profile="tablet"] .bottom-nav .nav[data-nav="collections"],html[data-wide-profile="desktop"] .bottom-nav .nav[data-nav="collections"]{order:7}
html[data-wide-profile="tablet"] .bottom-nav .nav.register,html[data-wide-profile="desktop"] .bottom-nav .nav.register{order:8}
html[data-wide-profile="tablet"] .bottom-nav .nav[data-nav="menu"],html[data-wide-profile="desktop"] .bottom-nav .nav[data-nav="menu"]{order:99;margin-top:auto}

/* command bar / screen geometry */
html[data-wide-profile="tablet"] .desktop-commandbar,
html[data-wide-profile="desktop"] .desktop-commandbar{height:var(--desktop-command);display:grid;position:absolute;inset:0 0 auto 0;z-index:18;align-items:center;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(18px)}
html[data-wide-profile="tablet"] .desktop-commandbar{grid-template-columns:minmax(120px,1fr) minmax(220px,320px) 38px;gap:9px;padding:0 var(--desktop-page-pad)}
html[data-wide-profile="desktop"] .desktop-commandbar{grid-template-columns:minmax(180px,1fr) minmax(280px,410px) 42px;gap:14px;padding:0 var(--desktop-page-pad)}
html[data-wide-profile="tablet"] .desktop-command-menu{width:38px;height:38px}
html[data-wide-profile="tablet"] .desktop-quick-search{height:38px}
html[data-wide-profile="tablet"] .desktop-quick-search input{font-size:9.5px}
html[data-wide-profile="tablet"] .desktop-quick-search kbd{display:none}
html[data-wide-profile="tablet"] .desktop-breadcrumb{font-size:7.5px}
html[data-wide-profile="tablet"] .screen,
html[data-wide-profile="desktop"] .screen{top:var(--desktop-command);background:transparent}
html[data-wide-profile="tablet"] .screen>.topbar{min-height:94px;padding:18px var(--desktop-page-pad) 15px}
html[data-wide-profile="desktop"] .screen>.topbar{min-height:118px;padding:25px var(--desktop-page-pad) 21px}
html[data-wide-profile="tablet"] .screen>.topbar .topbar-copy h1,
html[data-wide-profile="tablet"] .desktop-page-heading h1{font-size:clamp(27px,4vw,35px)}
html[data-wide-profile="tablet"] .desktop-page-heading p{font-size:10px;margin-top:7px}
html[data-wide-profile="tablet"] .content,
html[data-wide-profile="desktop"] .content{width:100%;max-width:var(--wide-page-max);margin:0 auto;padding-left:var(--desktop-page-pad);padding-right:var(--desktop-page-pad)}
html[data-wide-profile="tablet"] .content{padding-bottom:42px}
html[data-wide-profile="desktop"] .content{padding-bottom:64px}
html[data-wide-profile="tablet"][data-route="search"] .desktop-quick-search,
html[data-wide-profile="tablet"][data-route="library"] .desktop-quick-search,
html[data-wide-profile="tablet"][data-route="register"] .desktop-quick-search,
html[data-wide-profile="desktop"][data-route="search"] .desktop-quick-search,
html[data-wide-profile="desktop"][data-route="library"] .desktop-quick-search,
html[data-wide-profile="desktop"][data-route="register"] .desktop-quick-search{visibility:hidden;pointer-events:none}

/* HOME — stable 12-column editorial grid, no one-column collapse */
html[data-wide-profile="tablet"] .home-content,
html[data-wide-profile="desktop"] .home-content{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;align-content:start!important;column-gap:18px!important;row-gap:0!important;max-width:var(--wide-page-max)!important}
html[data-wide-profile="desktop"] .home-content{column-gap:24px!important}
html[data-wide-profile="tablet"] .home-content>.notice,
html[data-wide-profile="tablet"] .home-content>.home-kicker,
html[data-wide-profile="tablet"] .home-content>#homeResumeSection,
html[data-wide-profile="desktop"] .home-content>.notice,
html[data-wide-profile="desktop"] .home-content>.home-kicker,
html[data-wide-profile="desktop"] .home-content>#homeResumeSection{grid-column:1/-1!important}
html[data-wide-profile="tablet"] .home-content>#homeContextSection,
html[data-wide-profile="desktop"] .home-content>#homeContextSection{grid-column:1/5!important;margin:0 0 24px!important;min-width:0}
html[data-wide-profile="tablet"] .home-content>#homeDossierSection,
html[data-wide-profile="desktop"] .home-content>#homeDossierSection{grid-column:5/9!important;margin:0 0 24px!important;min-width:0}
html[data-wide-profile="tablet"] .home-content>#homeUpcomingSection,
html[data-wide-profile="desktop"] .home-content>#homeUpcomingSection{grid-column:9/-1!important;margin:0 0 24px!important;min-width:0}
html[data-wide-profile="tablet"] .home-content>#homeLatestSection,
html[data-wide-profile="desktop"] .home-content>#homeLatestSection{grid-column:1/9!important;min-width:0}
html[data-wide-profile="tablet"] .home-content>#homeWatchlistSection,
html[data-wide-profile="desktop"] .home-content>#homeWatchlistSection{grid-column:1/9!important;margin-right:0!important;min-width:0}
html[data-wide-profile="tablet"] .home-content>#homeExpandedBlocks,
html[data-wide-profile="desktop"] .home-content>#homeExpandedBlocks{grid-column:9/-1!important;grid-row:4 / span 4!important;min-width:0;border-left:1px solid var(--line)!important;padding-left:18px!important}
html[data-wide-profile="desktop"] .home-content>#homeExpandedBlocks{padding-left:24px!important}
html[data-wide-profile="tablet"] #homeResumeSection .home-resume-v081 .home-resume-toggle{grid-template-columns:90px minmax(0,1fr) 34px!important;gap:14px!important}
html[data-wide-profile="tablet"] #homeResumeSection .home-resume-v081 .home-resume-toggle>.poster{width:90px!important;height:135px!important}
html[data-wide-profile="tablet"] #homeResumeSection .home-resume-v081 .home-resume-expanded{margin-left:104px!important}
html[data-wide-profile="tablet"] .home-context-grid,
html[data-wide-profile="desktop"] .home-context-grid{grid-template-columns:1fr!important;height:100%;min-width:0}
html[data-wide-profile="tablet"] .home-context-card,
html[data-wide-profile="desktop"] .home-context-card{min-width:0!important;padding:12px!important}
html[data-wide-profile="tablet"] .home-context-body,
html[data-wide-profile="desktop"] .home-context-body{grid-template-columns:48px minmax(0,1fr) 30px!important;gap:10px!important}
html[data-wide-profile="tablet"] .home-context-poster,
html[data-wide-profile="desktop"] .home-context-poster{width:48px!important;height:72px!important}
html[data-wide-profile="tablet"] .home-context-copy strong,
html[data-wide-profile="tablet"] .home-context-meta,
html[data-wide-profile="tablet"] .home-context-sub,
html[data-wide-profile="desktop"] .home-context-copy strong,
html[data-wide-profile="desktop"] .home-context-meta,
html[data-wide-profile="desktop"] .home-context-sub{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-wide-profile="tablet"] .home-dossier-prompt,
html[data-wide-profile="desktop"] .home-dossier-prompt{height:100%;min-height:112px;grid-template-columns:36px minmax(0,1fr) 30px!important;gap:10px!important;padding:12px!important;border-radius:12px!important;align-content:center}
html[data-wide-profile="tablet"] .home-dossier-cta,
html[data-wide-profile="desktop"] .home-dossier-cta{font-size:0!important;gap:0!important}
html[data-wide-profile="tablet"] .home-dossier-copy strong,
html[data-wide-profile="desktop"] .home-dossier-copy strong{white-space:normal!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical}
html[data-wide-profile="tablet"] .home-upcoming-list,
html[data-wide-profile="desktop"] .home-upcoming-list{gap:8px!important}
html[data-wide-profile="tablet"] .home-upcoming-row,
html[data-wide-profile="desktop"] .home-upcoming-row{grid-template-columns:48px minmax(0,1fr) 24px 30px!important;gap:8px!important;padding:9px 10px!important;border-radius:12px!important;min-width:0}
html[data-wide-profile="tablet"] .home-upcoming-copy,
html[data-wide-profile="desktop"] .home-upcoming-copy{min-width:0}
html[data-wide-profile="tablet"] .home-upcoming-copy strong,
html[data-wide-profile="tablet"] .home-upcoming-copy span,
html[data-wide-profile="desktop"] .home-upcoming-copy strong,
html[data-wide-profile="desktop"] .home-upcoming-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-wide-profile="tablet"] .home-strip{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important}
html[data-wide-profile="tablet"] #homeWatchlistSection .home-strip{grid-template-columns:repeat(3,minmax(0,1fr))!important}
html[data-wide-profile="desktop"] .home-strip{grid-template-columns:repeat(5,minmax(0,1fr))!important}
html[data-wide-profile="desktop"] #homeWatchlistSection .home-strip{grid-template-columns:repeat(4,minmax(0,1fr))!important}
html[data-wide-profile="tablet"] .home-metric-grid,
html[data-wide-profile="tablet"] .home-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-wide-profile="tablet"] .home-metric,
html[data-wide-profile="tablet"] .home-stat{min-height:92px!important}

/* SEARCH — one real search field on its route, neutral dossier surface */
html[data-wide-profile="tablet"] .search-page-content,
html[data-wide-profile="desktop"] .search-page-content{max-width:var(--wide-page-max)!important}
html[data-wide-profile="tablet"] .search-page-content>.search-main,
html[data-wide-profile="desktop"] .search-page-content>.search-main{min-height:64px!important;margin:0!important;padding:8px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:color-mix(in srgb,var(--surface) 88%,transparent)!important}
html[data-wide-profile="tablet"] .search-page-content>.search-main .field,
html[data-wide-profile="desktop"] .search-page-content>.search-main .field{height:48px!important;border-color:var(--line)!important;background:var(--surface)!important;color:var(--ink)!important;font-size:13px!important}
html[data-wide-profile="tablet"] .search-page-content>.search-main svg,
html[data-wide-profile="desktop"] .search-page-content>.search-main svg{color:var(--lime)!important}
html[data-wide-profile="tablet"] .search-page-content>.search-tabs,
html[data-wide-profile="desktop"] .search-page-content>.search-tabs{width:50%!important;margin:10px 0 18px!important;border:1px solid var(--line)!important;border-radius:9px 0 0 9px!important;background:var(--surface)!important;overflow:hidden}
html[data-wide-profile="tablet"] .search-source-switch,
html[data-wide-profile="desktop"] .search-source-switch{width:50%!important;margin:-67px 0 18px 50%!important;min-height:49px!important;border:1px solid var(--line)!important;border-left:0!important;border-radius:0 9px 9px 0!important;background:var(--surface)!important;overflow:hidden}
html[data-wide-profile="tablet"] .search-page-content>.search-tabs button,
html[data-wide-profile="desktop"] .search-page-content>.search-tabs button,
html[data-wide-profile="tablet"] .search-source-switch button,
html[data-wide-profile="desktop"] .search-source-switch button{min-height:48px!important;color:var(--muted)!important;border-color:var(--line)!important;background:transparent!important}
html[data-wide-profile="tablet"] .search-page-content>.search-tabs button.active,
html[data-wide-profile="desktop"] .search-page-content>.search-tabs button.active,
html[data-wide-profile="tablet"] .search-source-switch button.active,
html[data-wide-profile="desktop"] .search-source-switch button.active{background:color-mix(in srgb,var(--lime) 8%,var(--surface))!important;color:var(--lime)!important}
html[data-wide-profile="tablet"] .search-feed-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}
html[data-wide-profile="tablet"] .search-feed{min-width:0!important;padding-inline:9px!important}
html[data-wide-profile="tablet"] .search-screen .search-results{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:20px 14px!important}
html[data-wide-profile="desktop"] .search-screen .search-results{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:24px 16px!important}
@media(min-width:1600px){html[data-wide-profile="desktop"] .search-screen .search-results{grid-template-columns:repeat(6,minmax(0,1fr))!important}}

/* LIBRARY — compact controls + touch-safe density */
html[data-wide-profile="tablet"] .library-page-content,
html[data-wide-profile="desktop"] .library-page-content{max-width:var(--wide-page-max)!important}
html[data-wide-profile="tablet"] .desktop-library-toolbar{grid-template-columns:minmax(0,1fr) 180px!important;gap:10px!important;padding:11px!important;align-items:end!important}
html[data-wide-profile="tablet"] .desktop-library-filters{grid-column:1/-1!important;grid-row:1!important;flex-wrap:wrap!important;min-height:0!important}
html[data-wide-profile="tablet"] .desktop-library-search{grid-column:1!important;grid-row:2!important}
html[data-wide-profile="tablet"] .desktop-library-sort{grid-column:2!important;grid-row:2!important}
html[data-wide-profile="tablet"] .desktop-library-filters button{min-height:38px!important;padding-inline:11px!important;font-size:8.2px!important}
html[data-wide-profile="tablet"] .desktop-library-search input,
html[data-wide-profile="tablet"] .desktop-library-sort select{height:42px!important;font-size:9.5px!important}
html[data-wide-profile="tablet"] .desktop-library-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:22px 14px!important}
html[data-wide-profile="desktop"] .desktop-library-toolbar{grid-template-columns:minmax(360px,1fr) minmax(230px,.58fr) 190px!important}
html[data-wide-profile="desktop"] .desktop-library-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:26px 16px!important}
@media(min-width:1600px){html[data-wide-profile="desktop"] .desktop-library-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important}}

/* REGISTER — wide full page on tablet; no inspector state, no forced keyboard */
html[data-wide-profile="tablet"] .register-page-content{width:100%!important;max-width:780px!important;margin:0 auto!important;padding-top:8px!important}
html[data-wide-profile="desktop"] .register-page-content{width:100%!important;max-width:980px!important;margin:0 auto!important;padding-top:10px!important}
html[data-wide-profile="tablet"] #registerSelector,
html[data-wide-profile="tablet"] #registerMovieForm,
html[data-wide-profile="tablet"] #registerSeriesForm{width:100%!important;max-width:720px!important;margin-inline:auto!important}
html[data-wide-profile="desktop"] #registerSelector,
html[data-wide-profile="desktop"] #registerMovieForm,
html[data-wide-profile="desktop"] #registerSeriesForm{width:100%!important;max-width:820px!important;margin-inline:auto!important}
html[data-wide-profile="tablet"] .register-search-results{grid-template-columns:1fr!important}
html[data-wide-profile="desktop"] .register-search-results{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px 16px!important}
html[data-wide-profile="tablet"] .register-selector-head{margin-bottom:14px}
html[data-wide-profile="tablet"] .register-search-shell{min-height:54px}
html[data-wide-profile="tablet"] .register-result-card{min-height:96px}

/* DIARY tablet keeps cards readable, desktop can stay denser */
html[data-wide-profile="tablet"] .desktop-diary-summary{grid-template-columns:minmax(0,1fr) auto!important;gap:14px!important;padding:14px 15px!important;margin-bottom:18px!important}
html[data-wide-profile="tablet"] .desktop-diary-metrics{display:none!important}
html[data-wide-profile="tablet"] .desktop-diary-day{grid-template-columns:96px minmax(0,1fr)!important;gap:14px!important}
html[data-wide-profile="tablet"] .diary-series-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px 11px!important}

/* secondary routes use the available workspace rather than phone widths */
html[data-wide-profile="tablet"] .statistics-content,
html[data-wide-profile="tablet"] .monthly-content,
html[data-wide-profile="tablet"] .settings-hub-content,
html[data-wide-profile="tablet"] .data-hub-content,
html[data-wide-profile="tablet"] .watchlist-content,
html[data-wide-profile="tablet"] .favorites-content,
html[data-wide-profile="tablet"] .library-classic-content,
html[data-wide-profile="tablet"] .season-index-content,
html[data-wide-profile="tablet"] .collections-content{max-width:none!important}
html[data-wide-profile="tablet"] .collections-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-wide-profile="tablet"] .collection-editor-content{display:block!important;max-width:780px!important;margin-inline:auto!important}
html[data-wide-profile="tablet"] .collection-editor-content>*{grid-column:auto!important;grid-row:auto!important}
html[data-wide-profile="tablet"] .collection-picker-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-wide-profile="tablet"] .settings-hub-content,
html[data-wide-profile="tablet"] .data-hub-content,
html[data-wide-profile="tablet"] .vault-center-content{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px 14px!important}

/* Scopri landscape touch */
html[data-wide-profile="tablet"] .discover-content{max-width:none!important;padding:15px 18px 30px!important;grid-template-columns:minmax(230px,.76fr) minmax(350px,1.24fr)!important;gap:0 22px!important}
html[data-wide-profile="tablet"] .discover-deck{height:calc(100dvh - 150px)!important;min-height:430px!important;max-height:620px!important}
html[data-wide-profile="tablet"] .discover-card-title{font-size:28px!important}
html[data-wide-profile="tablet"] .discover-card-overview{font-size:10.5px!important}
html[data-wide-profile="tablet"] .discover-card-poster{width:96px!important}
html[data-wide-profile="tablet"] .discover-card-hero.is-poster-mode .discover-card-poster{width:142px!important}

/* Tablet detail pages are full pages, never the desktop inspector overlay. */
html[data-wide-profile="tablet"] .app.desktop-detail-open::after{display:none!important}
html[data-wide-profile="tablet"] .app.desktop-detail-open>.screen.active{pointer-events:auto!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"].desktop-detail-full>.detail-rich-content,
html[data-wide-profile="tablet"] .screen[data-screen="series"].desktop-detail-full>.detail-rich-content,
html[data-wide-profile="tablet"] .screen[data-screen="movie"]>.detail-rich-content,
html[data-wide-profile="tablet"] .screen[data-screen="series"]>.detail-rich-content{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:14px 15px!important;max-width:none!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-cinematic-hero,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-cinematic-hero{grid-column:1/7!important;min-height:410px!important;position:relative!important;top:auto!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .hybrid-personal-panel,
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .hybrid-detail-actions,
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-journey-section,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .hybrid-personal-panel,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .hybrid-detail-actions,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-journey-section,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .hybrid-next-episode{grid-column:7/-1!important}
html[data-wide-profile="tablet"] .desktop-detail-modebar{display:none!important}

/* Wide overlays stay centered and never cover/disable the rail unexpectedly. */
html[data-wide-profile="tablet"] .sheet-bg.open,
html[data-wide-profile="tablet"] .dialog-bg.open{padding:18px 18px 18px calc(var(--desktop-rail) + 18px)!important}
html[data-wide-profile="tablet"] .sheet,
html[data-wide-profile="tablet"] .dialog{width:min(620px,calc(100vw - var(--desktop-rail) - 36px))!important;max-height:calc(100dvh - 36px)!important}
html[data-wide-profile="tablet"] .toast{left:calc(var(--desktop-rail) + 18px)!important;right:auto!important;bottom:18px!important;width:min(420px,calc(100vw - var(--desktop-rail) - 36px))!important}

/* coarse pointer: no hover-only movement; targets remain comfortably tappable */
html[data-wide-profile="tablet"] .home-poster-card:hover>.poster,
html[data-wide-profile="tablet"] .desktop-library-card:hover .desktop-library-poster,
html[data-wide-profile="tablet"] .search-screen .search-result-card:hover .search-result-poster{transform:none!important;box-shadow:none!important}
html[data-wide-profile="tablet"] button,
html[data-wide-profile="tablet"] [role="button"]{touch-action:manipulation}

/* 0.7.98 search workspace: grid placement instead of negative-margin coupling. */
html[data-wide-profile="tablet"] .search-page-content,
html[data-wide-profile="desktop"] .search-page-content{display:grid!important;grid-template-columns:1fr 1fr!important;column-gap:0!important;align-content:start}
html[data-wide-profile="tablet"] .search-page-content>:not(.search-tabs):not(.search-source-switch),
html[data-wide-profile="desktop"] .search-page-content>:not(.search-tabs):not(.search-source-switch){grid-column:1/-1}
html[data-wide-profile="tablet"] .search-page-content>.search-tabs,
html[data-wide-profile="desktop"] .search-page-content>.search-tabs{grid-column:1!important;width:100%!important;margin:10px 0 18px!important}
html[data-wide-profile="tablet"] .search-page-content>.search-source-switch,
html[data-wide-profile="desktop"] .search-page-content>.search-source-switch{grid-column:2!important;width:100%!important;margin:10px 0 18px!important;min-height:49px!important}

/* 0.9.5 — Home operational blocks in wide profiles */
html[data-wide-profile="tablet"] .home-content>#homeNewEpisodesSection,
html[data-wide-profile="desktop"] .home-content>#homeNewEpisodesSection{grid-column:1/9!important;min-width:0}
html[data-wide-profile="tablet"] .home-content>#homeExploreSection,
html[data-wide-profile="desktop"] .home-content>#homeExploreSection{grid-column:9/-1!important;min-width:0;margin:0 0 24px!important}
html[data-wide-profile="tablet"] .home-new-episode-list,
html[data-wide-profile="desktop"] .home-new-episode-list{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-wide-profile="tablet"] .home-explore-rail,
html[data-wide-profile="desktop"] .home-explore-rail{grid-template-columns:1fr}


/* 0.9.5 — connection state stays inside the wide workspace. */
@media(min-width:821px){.network-status{left:calc(var(--desktop-rail) + 28px);transform:none;bottom:28px;max-width:min(420px,calc(100vw - var(--desktop-rail) - 56px))}.app.is-offline .toast{bottom:82px}}
html[data-wide-profile="tablet"] .network-status{left:calc(var(--desktop-rail) + 18px);bottom:18px;max-width:min(420px,calc(100vw - var(--desktop-rail) - 36px))}

/* ========================================================================== */
/* Wide clarity pass — desktop/tablet only. Mobile/touch profile is untouched. */
/* ========================================================================== */

html[data-wide-profile="desktop"]{
  --desktop-rail:216px;
  --desktop-command:64px;
  --desktop-page-pad:clamp(24px,2.8vw,48px);
  --wide-page-max:1500px;
  --desktop-card-radius:12px;
}
html[data-wide-profile="tablet"]{
  --desktop-rail:168px;
  --desktop-command:56px;
  --desktop-page-pad:18px;
  --wide-page-max:1180px;
  --desktop-card-radius:10px;
}

html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .app{
  background-size:32px 32px;
  background-image:
    linear-gradient(color-mix(in srgb,var(--ink) 2.3%,transparent) 1px,transparent 1px),
    linear-gradient(90deg,color-mix(in srgb,var(--ink) 2.3%,transparent) 1px,transparent 1px);
}

/* A smaller, calmer rail with one obvious active route and one primary action. */
html[data-wide-profile="desktop"] .bottom-nav,
html[data-wide-profile="desktop"] .bottom-nav.hidden{padding:90px 12px 14px!important;gap:3px!important}
html[data-wide-profile="tablet"] .bottom-nav,
html[data-wide-profile="tablet"] .bottom-nav.hidden{padding:76px 8px 11px!important;gap:2px!important}
html[data-wide-profile="desktop"] .bottom-nav::before{top:24px;left:18px;font-size:16px}
html[data-wide-profile="desktop"] .bottom-nav::after{top:51px;left:18px;font-size:6.8px;letter-spacing:.1em}
html[data-wide-profile="tablet"] .bottom-nav::before{top:18px;left:12px;font-size:13px}
html[data-wide-profile="tablet"] .bottom-nav::after{top:40px;left:12px;font-size:5.8px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-archive-card{
  grid-template-columns:7px minmax(0,1fr);
  gap:9px;
  margin:0 1px 10px;
  padding:10px;
  border-radius:8px;
  background:color-mix(in srgb,var(--lime) 3%,#101410);
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-archive-dot{width:7px;height:7px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-archive-card small{font-size:6.3px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-archive-card strong{margin-top:4px;font-size:10.5px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-archive-card em{margin-top:3px;font-size:7.3px}
html[data-wide-profile="desktop"] .bottom-nav .nav,
html[data-wide-profile="desktop"] .bottom-nav .nav.register{
  min-height:41px;
  grid-template-columns:24px minmax(0,1fr);
  gap:8px;
  padding:0 9px;
  border-radius:7px;
  font-size:10px;
}
html[data-wide-profile="tablet"] .bottom-nav .nav,
html[data-wide-profile="tablet"] .bottom-nav .nav.register{
  min-height:37px;
  grid-template-columns:20px minmax(0,1fr);
  gap:6px;
  padding:0 7px;
  border-radius:6px;
  font-size:8.2px;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .bottom-nav .nav.active{
  border-color:color-mix(in srgb,var(--lime) 30%,#2b3229);
  background:color-mix(in srgb,var(--lime) 8%,#111511);
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .bottom-nav .nav.register{
  margin:8px 0 2px;
  border-color:color-mix(in srgb,var(--lime) 30%,#2b3229);
  background:#141914;
}
html[data-wide-profile="desktop"] .bottom-nav .register-icon{width:23px;height:23px}
html[data-wide-profile="tablet"] .bottom-nav .register-icon{width:20px;height:20px}

/* Command bar and headings behave as orientation, not a second navigation. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-commandbar{
  border-color:color-mix(in srgb,var(--line) 85%,transparent);
  background:color-mix(in srgb,var(--bg) 97%,transparent);
  backdrop-filter:blur(20px);
}
html[data-wide-profile="desktop"] .desktop-commandbar{
  grid-template-columns:minmax(150px,1fr) minmax(270px,360px) 38px;
  gap:11px;
}
html[data-wide-profile="tablet"] .desktop-commandbar{
  grid-template-columns:minmax(100px,1fr) minmax(190px,270px) 34px;
  gap:8px;
}
html[data-wide-profile="desktop"] .desktop-quick-search{height:38px;border-radius:8px}
html[data-wide-profile="tablet"] .desktop-quick-search{height:34px;border-radius:7px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-quick-search{
  border-color:color-mix(in srgb,var(--line) 88%,transparent);
  background:color-mix(in srgb,var(--surface) 72%,transparent);
}
html[data-wide-profile="desktop"] .desktop-command-menu{width:38px;height:38px;border-radius:8px}
html[data-wide-profile="tablet"] .desktop-command-menu{width:34px;height:34px;border-radius:7px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-breadcrumb{letter-spacing:.08em}
html[data-wide-profile="desktop"] .screen>.topbar{min-height:94px;padding:20px var(--desktop-page-pad) 16px}
html[data-wide-profile="tablet"] .screen>.topbar{min-height:80px;padding:15px var(--desktop-page-pad) 12px}
html[data-wide-profile="desktop"] .screen>.topbar .topbar-copy h1,
html[data-wide-profile="desktop"] .desktop-page-heading h1{font-size:clamp(31px,2.5vw,38px);letter-spacing:-.045em}
html[data-wide-profile="tablet"] .screen>.topbar .topbar-copy h1,
html[data-wide-profile="tablet"] .desktop-page-heading h1{font-size:clamp(25px,3.5vw,31px);letter-spacing:-.04em}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen>.topbar .context{margin-bottom:6px;font-size:8px}
html[data-wide-profile="desktop"] .desktop-page-heading p{margin-top:7px;font-size:11px;line-height:1.45}
html[data-wide-profile="tablet"] .desktop-page-heading p{font-size:9.4px;line-height:1.45}

/* HOME: clear sequence, no orphaned middle card or permanent utility sidebar. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content{
  grid-auto-flow:row dense!important;
  row-gap:0!important;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>*{min-width:0}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>.home-kicker{order:0;grid-column:1/-1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeResumeSection{order:1;grid-column:1/-1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeNewEpisodesSection{order:2;grid-column:1/-1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeContextSection{order:3;grid-column:1/5!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeDossierSection{order:4;grid-column:5/9!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeExploreSection{order:5;grid-column:9/-1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeUpcomingSection{order:6;grid-column:1/-1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeLatestSection{order:7;grid-column:1/-1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeWatchlistSection{order:8;grid-column:1/-1!important;margin-right:0!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeExpandedBlocks{
  order:9;
  grid-column:1/-1!important;
  grid-row:auto!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  border-left:0!important;
  padding-left:0!important;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content>#homeExpandedBlocks[hidden]{display:none!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content:not(:has(#homeContextSection:not([hidden])))>#homeDossierSection{grid-column:1/7!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content:not(:has(#homeContextSection:not([hidden])))>#homeExploreSection{grid-column:7/-1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content:not(:has(#homeDossierSection:not([hidden])))>#homeContextSection{grid-column:1/7!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content:not(:has(#homeDossierSection:not([hidden])))>#homeExploreSection{grid-column:7/-1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-content:not(:has(#homeContextSection:not([hidden]))):not(:has(#homeDossierSection:not([hidden])))>#homeExploreSection{grid-column:1/-1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-kicker{
  min-height:30px;
  padding:0 0 10px;
  margin-bottom:17px;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-section{margin-bottom:22px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-section .section-head{margin-bottom:10px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-section .section-head h2{font-size:10px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-empty-operational{
  min-height:124px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto;
  align-content:center;
  align-items:center;
  gap:7px 24px;
  padding:22px 24px;
  text-align:left;
  border:1px solid var(--line);
  border-radius:12px;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-empty-operational>strong{grid-column:1;font-size:17px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-empty-operational>p{grid-column:1;margin:0;font-size:10.5px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-empty-operational>.home-empty-actions{grid-column:2;grid-row:1/3;margin:0}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-empty-operational .button{min-height:40px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-dossier-prompt{min-height:126px;height:100%;padding:16px;border-radius:11px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-explore-rail{height:100%;gap:8px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-explore-action{min-height:59px;padding:10px 12px;border-radius:11px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-upcoming-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
html[data-wide-profile="tablet"] .home-upcoming-list{grid-template-columns:1fr!important}
html[data-wide-profile="desktop"] .home-strip{grid-template-columns:repeat(6,minmax(0,1fr))!important}
html[data-wide-profile="desktop"] #homeWatchlistSection .home-strip{grid-template-columns:repeat(6,minmax(0,1fr))!important}
html[data-wide-profile="tablet"] .home-strip,
html[data-wide-profile="tablet"] #homeWatchlistSection .home-strip{grid-template-columns:repeat(4,minmax(0,1fr))!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) #homeExpandedBlocks>.home-section{
  margin:0;
  padding:16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:color-mix(in srgb,var(--surface) 62%,transparent);
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .home-layout-toggle{display:none!important}

/* LIBRARY: controls read in two rows; posters get the remaining attention. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-toolbar{
  grid-template-columns:minmax(0,1fr) 210px!important;
  gap:10px!important;
  padding:11px!important;
  border-radius:11px;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-filters{
  grid-column:1/-1!important;
  grid-row:1!important;
  flex-wrap:wrap!important;
  min-height:0!important;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-search{grid-column:1!important;grid-row:2!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-sort{grid-column:2!important;grid-row:2!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-filters button{min-height:35px!important;padding-inline:11px!important;font-size:8px!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-search input,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-sort select{height:40px!important;font-size:9.5px!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-result-head{padding-top:20px;margin-bottom:15px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-empty{min-height:240px;border-radius:11px}

/* SEARCH and DIARY: preserve power without six equally loud controls. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-main{min-height:60px!important;padding:7px!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-main .field{height:46px!important;font-size:12px!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-tabs,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-source-switch{margin-top:9px!important;margin-bottom:17px!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-tabs{width:42%!important;grid-column:1!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-source-switch{width:58%!important;grid-column:2!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-tabs button,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-source-switch button{min-height:44px!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .diary-content-tabs button.active{
  border-color:color-mix(in srgb,var(--lime) 48%,var(--line))!important;
  background:color-mix(in srgb,var(--lime) 9%,var(--surface))!important;
  color:var(--lime)!important;
  box-shadow:inset 0 -2px 0 var(--lime);
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-diary-summary{margin-bottom:18px;border-radius:11px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-diary-empty{min-height:240px}

/* Secondary routes use shorter introductions and quieter empty surfaces. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .upcoming-content{width:100%;max-width:var(--wide-page-max);padding:0 var(--desktop-page-pad) 46px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .upcoming-hero{padding:17px 19px;margin-bottom:13px;border-radius:11px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .upcoming-hero h2{font-size:26px}
html[data-wide-profile="tablet"] .upcoming-hero h2{font-size:22px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .upcoming-hero p{margin-top:6px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .upcoming-tabs button.active{
  border-color:color-mix(in srgb,var(--lime) 48%,var(--line))!important;
  background:color-mix(in srgb,var(--lime) 9%,var(--surface))!important;
  color:var(--lime)!important;
  box-shadow:inset 0 -2px 0 var(--lime);
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .upcoming-empty{min-height:190px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .collections-intro{padding:17px 20px;border-radius:11px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .collections-empty{min-height:240px;display:grid;place-items:center;align-content:center;border-style:dashed}

/* SETTINGS: desktop is a readable control centre; tablet stays one clear column. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) [data-screen="menu"] .data-content{max-width:1240px!important;gap:16px!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) [data-screen="menu"] .menu-archive-summary{grid-column:1/-1!important;margin:0!important;min-height:66px!important;border-radius:11px!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) [data-screen="menu"] .menu-section{
  grid-column:span 1;
  margin:0!important;
  padding:15px!important;
  border-radius:11px!important;
  background:color-mix(in srgb,var(--surface) 66%,transparent)!important;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) [data-screen="menu"] .tool-list{border-color:color-mix(in srgb,var(--line) 88%,transparent)!important;border-radius:8px!important}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) [data-screen="menu"] .tool-row{min-height:62px;padding:9px 12px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) [data-screen="menu"] .tool-row strong{font-size:12px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) [data-screen="menu"] .tool-row small{font-size:9.5px}
html[data-wide-profile="tablet"] [data-screen="menu"] .data-content{grid-template-columns:1fr!important;max-width:760px!important}
html[data-wide-profile="tablet"] [data-screen="menu"] .menu-section{grid-column:1!important}
html[data-wide-profile="tablet"] .settings-hub-content,
html[data-wide-profile="tablet"] .data-hub-content,
html[data-wide-profile="tablet"] .vault-center-content{grid-template-columns:1fr!important;max-width:760px!important}
html[data-wide-profile="tablet"] .settings-hub-content>*,
html[data-wide-profile="tablet"] .data-hub-content>*,
html[data-wide-profile="tablet"] .vault-center-content>*{grid-column:1!important}

/* Scopri tutorial becomes a compact desktop explanation instead of a phone modal. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial{padding:24px calc(var(--desktop-page-pad) + 10px)}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-panel{
  width:min(720px,100%);
  display:grid;
  grid-template-columns:minmax(0,1fr) 260px;
  grid-template-rows:auto auto auto auto auto 1fr;
  column-gap:28px;
  padding:24px;
  border-radius:12px;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-panel>.context,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-panel>h2,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-panel>p,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-panel>.discover-tutorial-tap,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-panel>.discover-tutorial-start,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-panel>.discover-tutorial-replay{grid-column:1}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-panel>h2{font-size:28px;margin:8px 0 16px}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-demo{
  grid-column:2;
  grid-row:1/7;
  height:100%;
  min-height:280px;
  margin:0;
  border:1px solid var(--line);
  border-radius:9px;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .discover-tutorial-start{margin-top:18px}
html[data-wide-profile="tablet"] .discover-tutorial-panel{grid-template-columns:minmax(0,1fr) 220px;column-gap:20px;padding:20px}


/* 0.9.5 — Tablet touch-target restoration + Search selector geometry fix.
   Wide-only patch: mobile and application logic intentionally untouched. */
html[data-wide-profile="tablet"] .bottom-nav .nav,
html[data-wide-profile="tablet"] .bottom-nav .nav.register{
  min-height:44px!important;
}
html[data-wide-profile="tablet"] .desktop-commandbar{
  grid-template-columns:minmax(100px,1fr) minmax(190px,270px) 44px;
}
html[data-wide-profile="tablet"] .desktop-command-menu{
  width:44px!important;
  height:44px!important;
}
html[data-wide-profile="tablet"] .desktop-quick-search{
  height:44px!important;
}
html[data-wide-profile="tablet"] .desktop-library-filters button{
  min-height:44px!important;
}
html[data-wide-profile="tablet"] .desktop-library-search input,
html[data-wide-profile="tablet"] .desktop-library-sort select{
  height:44px!important;
}
html[data-wide-profile="tablet"] .home-empty-operational .button{
  min-height:44px!important;
}

/* The selector groups already occupy separate grid cells.
   Set the intended relationship on the grid itself instead of shrinking
   each group inside a pre-existing 50/50 column. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content{
  grid-template-columns:minmax(0,42fr) minmax(0,58fr)!important;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-tabs,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-source-switch{
  width:100%!important;
}

/* ========================================================================== */
/* 0.9.9 — Wide scale/theme parity + Film/Series dossier geometry             */
/* Wide-only: mobile/touch portrait remains untouched.                        */
/* ========================================================================== */

html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]){
  --wide-panel-bg:color-mix(in srgb,var(--surface) 92%,transparent);
  --wide-panel-soft:color-mix(in srgb,var(--surface2) 88%,transparent);
  --wide-panel-border:color-mix(in srgb,var(--line) 92%,transparent);
  --wide-panel-shadow:none;
}
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]){
  --wide-panel-bg:var(--surface);
  --wide-panel-soft:var(--surface2);
  --wide-panel-border:color-mix(in srgb,var(--line2) 56%,var(--line));
  --wide-panel-shadow:0 8px 24px rgba(35,39,31,.055);
}
html[data-theme="dark"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]){
  --wide-panel-bg:color-mix(in srgb,var(--surface) 94%,#080a08 6%);
  --wide-panel-soft:color-mix(in srgb,var(--surface2) 88%,#080a08 12%);
  --wide-panel-border:color-mix(in srgb,var(--line2) 42%,var(--line));
}

/* Wide surfaces keep the same visual weight in paper-light and dark dossier modes. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-library-toolbar,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-main,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) [data-screen="menu"] .menu-section,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) #homeExpandedBlocks>.home-section,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .upcoming-hero,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .collections-intro{
  border-color:var(--wide-panel-border)!important;
  background:var(--wide-panel-bg)!important;
  box-shadow:var(--wide-panel-shadow);
}
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .desktop-quick-search,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-tabs,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-source-switch{
  background:var(--surface)!important;
  border-color:var(--wide-panel-border)!important;
}

/* ---------- FILM / SERIES: shared wide dossier scale ---------- */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"]>.detail-rich-content,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"]>.detail-rich-content{
  align-content:start!important;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .detail-cinematic-hero,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-cinematic-hero{
  border:1px solid color-mix(in srgb,var(--line2) 68%,transparent);
  box-shadow:0 18px 46px rgba(0,0,0,.13);
}
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .detail-cinematic-hero,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-cinematic-hero{
  border-color:#b7bbb2;
  box-shadow:0 16px 34px rgba(38,43,35,.11);
}

html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .hybrid-personal-panel,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .hybrid-personal-panel,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .series-status-card,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .series-follow-card,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .detail-editorial-card,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-editorial-card,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .hybrid-meta-panel,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .hybrid-meta-panel,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .detail-watch-panel,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-watch-panel,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-seasons,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .hybrid-next-episode{
  border-color:var(--wide-panel-border)!important;
  box-shadow:var(--wide-panel-shadow);
}
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .hybrid-personal-panel,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .hybrid-personal-panel,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .detail-editorial-card,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-editorial-card,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .hybrid-meta-panel,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .hybrid-meta-panel,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .detail-watch-panel,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-watch-panel,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-seasons,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .hybrid-next-episode{
  background:var(--wide-panel-bg)!important;
}

/* ---------- TABLET: full-page dossier, compact but genuinely touch-sized ---------- */
html[data-wide-profile="tablet"] .screen[data-screen="movie"]>.detail-rich-content,
html[data-wide-profile="tablet"] .screen[data-screen="series"]>.detail-rich-content{
  max-width:1120px!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:13px 15px!important;
  padding-top:14px!important;
}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-cinematic-hero,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-cinematic-hero{
  grid-column:1/7!important;
  margin:0!important;
  min-height:352px!important;
  border-radius:13px!important;
}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-cinematic-hero{grid-row:1/4!important}
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-cinematic-hero{grid-row:1/7!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-poster-compat,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-poster-compat{
  display:block!important;
  width:116px!important;
  right:18px!important;
  bottom:18px!important;
  border-radius:11px!important;
}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-hybrid-identity,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-hybrid-identity{
  left:20px!important;
  right:154px!important;
  bottom:21px!important;
}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-hybrid-identity h2,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-hybrid-identity h2{
  font-size:clamp(27px,3.2vw,34px)!important;
  line-height:1!important;
  letter-spacing:-.045em!important;
}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-hybrid-meta,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-hybrid-meta{font-size:9px!important;max-width:30ch!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-hybrid-byline,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-hybrid-byline{font-size:9px!important;max-width:28ch!important}

html[data-wide-profile="tablet"] .screen[data-screen="movie"] .hybrid-personal-panel,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .hybrid-personal-panel{grid-column:7/-1!important;grid-row:1!important;margin:0!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .hybrid-detail-actions,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .hybrid-detail-actions{grid-column:7/-1!important;grid-row:2!important;margin:0!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-journey-section{grid-column:7/-1!important;grid-row:3!important;margin:0!important}
html[data-wide-profile="tablet"] .screen[data-screen="series"] .series-status-card{grid-column:7/-1!important;grid-row:3!important;margin:0!important;min-height:68px;padding:11px 12px!important}
html[data-wide-profile="tablet"] .screen[data-screen="series"] .series-follow-card{grid-column:7/-1!important;grid-row:4!important;margin:0!important;min-height:68px;padding:11px 12px!important}
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-journey-section{grid-column:7/-1!important;grid-row:5!important;margin:0!important}
html[data-wide-profile="tablet"] .screen[data-screen="series"] .hybrid-next-episode{grid-column:7/-1!important;grid-row:6!important;margin:0!important}

html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-dossier-item,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-dossier-item{min-height:76px!important;padding:9px 6px!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-dossier-item strong,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-dossier-item strong{font-size:12px!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .hybrid-detail-actions .button,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .hybrid-detail-actions .button{min-height:46px!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-journey-section,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-journey-section{padding:12px 13px!important;border:1px solid var(--wide-panel-border)!important;border-radius:11px!important;background:var(--wide-panel-soft)!important}

/* Old two-column rules used grid-column:2. Reset every lower dossier section explicitly. */
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-editorial-card,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-editorial-card{grid-column:1/8!important;margin:2px 0 0!important;padding:17px 18px!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .hybrid-meta-panel,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .hybrid-meta-panel{grid-column:8/-1!important;margin:2px 0 0!important}
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-seasons{grid-column:1/-1!important;margin:3px 0 0!important;padding:17px!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-watch-panel,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-watch-panel{grid-column:1/-1!important;margin:3px 0 0!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-history,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-history{grid-column:1/-1!important;margin:4px 0 0!important}
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-season-preview{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important}
html[data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-meta-item,
html[data-wide-profile="tablet"] .screen[data-screen="series"] .detail-meta-item{min-height:72px!important;padding:12px!important}

/* ---------- DESKTOP: preview inspector ---------- */
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector{width:min(570px,44vw)!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector>.detail-rich-content{padding:13px 15px 28px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .detail-cinematic-hero{min-height:286px!important;border-radius:12px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .detail-poster-compat{width:118px!important;right:18px!important;bottom:18px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .detail-hybrid-identity{left:18px!important;right:154px!important;bottom:19px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .detail-hybrid-identity h2{font-size:clamp(25px,2.4vw,32px)!important;line-height:1!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .detail-dossier-item{min-height:72px!important;padding:8px 5px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .detail-dossier-item strong{font-size:11.5px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .hybrid-detail-actions .button{min-height:44px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .series-status-card,
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .series-follow-card{min-height:64px;margin:0 0 10px!important;padding:10px 11px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-inspector .hybrid-next-episode{margin-bottom:10px!important}

/* ---------- DESKTOP: complete dossier ---------- */
html[data-wide-profile="desktop"] .screen.desktop-detail-full>.detail-rich-content{
  max-width:1280px!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:14px 18px!important;
  padding-top:18px!important;
  padding-bottom:60px!important;
}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .desktop-detail-modebar{grid-column:1/-1!important;grid-row:1!important}
html[data-wide-profile="desktop"] .screen[data-screen="movie"].desktop-detail-full .detail-cinematic-hero,
html[data-wide-profile="desktop"] .screen[data-screen="series"].desktop-detail-full .detail-cinematic-hero{
  grid-column:1/8!important;
  margin:0!important;
  min-height:458px!important;
  border-radius:14px!important;
}
html[data-wide-profile="desktop"] .screen[data-screen="movie"].desktop-detail-full .detail-cinematic-hero{grid-row:2/5!important}
html[data-wide-profile="desktop"] .screen[data-screen="series"].desktop-detail-full .detail-cinematic-hero{grid-row:2/8!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-poster-compat{width:150px!important;right:26px!important;bottom:26px!important;border-radius:12px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-hybrid-identity{left:27px!important;right:205px!important;bottom:27px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-hybrid-identity h2{font-size:clamp(32px,3vw,46px)!important;line-height:.99!important;letter-spacing:-.05em!important;max-width:none!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-hybrid-meta{font-size:9.5px!important;max-width:34ch!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-hybrid-byline{font-size:9.5px!important;max-width:32ch!important}

html[data-wide-profile="desktop"] .screen.desktop-detail-full .hybrid-personal-panel{grid-column:8/-1!important;grid-row:2!important;margin:0!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .hybrid-detail-actions{grid-column:8/-1!important;grid-row:3!important;margin:0!important}
html[data-wide-profile="desktop"] .screen[data-screen="movie"].desktop-detail-full .detail-journey-section{grid-column:8/-1!important;grid-row:4!important;margin:0!important}
html[data-wide-profile="desktop"] .screen[data-screen="series"].desktop-detail-full .series-status-card{grid-column:8/-1!important;grid-row:4!important;margin:0!important;min-height:70px;padding:11px 13px!important}
html[data-wide-profile="desktop"] .screen[data-screen="series"].desktop-detail-full .series-follow-card{grid-column:8/-1!important;grid-row:5!important;margin:0!important;min-height:70px;padding:11px 13px!important}
html[data-wide-profile="desktop"] .screen[data-screen="series"].desktop-detail-full .detail-journey-section{grid-column:8/-1!important;grid-row:6!important;margin:0!important}
html[data-wide-profile="desktop"] .screen[data-screen="series"].desktop-detail-full .hybrid-next-episode{grid-column:8/-1!important;grid-row:7!important;margin:0!important}

html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-dossier-item{min-height:88px!important;padding:11px 6px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-dossier-item strong{font-size:13px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .hybrid-detail-actions .button{min-height:48px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-journey-section{padding:14px 15px!important;border-radius:12px!important;background:var(--wide-panel-soft)!important}

html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-editorial-card{grid-column:1/9!important;margin:3px 0 0!important;padding:20px 22px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-editorial-card p{font-size:12px!important;line-height:1.68!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .hybrid-meta-panel{grid-column:9/-1!important;margin:3px 0 0!important}
html[data-wide-profile="desktop"] .screen[data-screen="series"].desktop-detail-full .detail-seasons{grid-column:1/-1!important;margin:4px 0 0!important;padding:19px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-watch-panel{grid-column:1/9!important;margin:4px 0 0!important;padding:16px 18px!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-history{grid-column:1/-1!important;margin:5px 0 0!important}
html[data-wide-profile="desktop"] .screen.desktop-detail-full .detail-meta-item{min-height:76px!important;padding:13px!important}
html[data-wide-profile="desktop"] .screen[data-screen="series"].desktop-detail-full .detail-season-preview{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:13px!important}

/* Paper mode needs crisp edges; dark mode can stay more atmospheric. */
html[data-theme="light"][data-wide-profile="tablet"] .screen[data-screen="movie"] .detail-journey-section,
html[data-theme="light"][data-wide-profile="tablet"] .screen[data-screen="series"] .detail-journey-section,
html[data-theme="light"][data-wide-profile="desktop"] .screen.desktop-detail-full .detail-journey-section{
  background:var(--surface)!important;
  border-color:var(--wide-panel-border)!important;
}
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .series-status-card-copy span,
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .series-follow-card-copy span{color:var(--ink2)!important}
html[data-theme="light"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .series-follow-card:not(.is-followed){background:var(--surface)!important;border-color:var(--line2)!important}
html[data-theme="dark"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .detail-meta-item,
html[data-theme="dark"]:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-meta-item{border-color:rgba(239,241,233,.12)!important}

/* Long metadata should wrap rather than force the right dossier column wider. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="movie"] .detail-meta-item strong,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .screen[data-screen="series"] .detail-meta-item strong,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .series-status-card-copy,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .series-follow-card-copy,
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .next-episode-copy{min-width:0;overflow-wrap:anywhere}

/* 0.9.75 — Unified search: without the old source switch, keep the three content filters
   as a single deliberate control instead of leaving an empty second grid column. */
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content{
  grid-template-columns:1fr!important;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>.search-tabs{
  grid-column:1/-1!important;
  width:min(560px,100%)!important;
  margin:10px 0 18px!important;
}
html:is([data-wide-profile="tablet"],[data-wide-profile="desktop"]) .search-page-content>:not(.search-tabs){
  grid-column:1/-1!important;
}
