/* One touch layout for phones in either orientation and portrait tablets.
   Desktop sheet geometry, mouse tracking and image motion stay in their files. */
.portrait-nav, .portrait-filter-toolbar, .portrait-basic-comparison, .portrait-detail-performance { display:none; }
@media (max-width:700px), (orientation:portrait) and (max-width:1100px) {
  :is(body, body:has(#theme-toggle-input:checked)) { --portrait-nav-height:64px; --portrait-header-height:calc(60px + env(safe-area-inset-top, 0px)); }
  :is(body, body:has(#theme-toggle-input:checked)) .site-nav, :is(body, body:has(#theme-toggle-input:checked)) .edge-entry { display:none; }
  :is(body, body:has(#theme-toggle-input:checked))[data-view=garage] .home-scene, :is(body, body:has(#theme-toggle-input:checked))[data-view=ranking] .home-scene,
  :is(body, body:has(#theme-toggle-input:checked))[data-view=garage-ranking] .home-scene { transform:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .garage-sheet, :is(body, body:has(#theme-toggle-input:checked)) .detail-sheet, :is(body, body:has(#theme-toggle-input:checked)) .ranking-sheet {
    top:0; bottom:0; left:0; right:0; width:100%; min-width:0; max-width:none; border-inline:0;
  }
  :is(body, body:has(#theme-toggle-input:checked)) .garage-sheet.edge-sheet { transform:translate3d(103%,0,0); }
  :is(body, body:has(#theme-toggle-input:checked)) .ranking-sheet.edge-sheet { transform:translate3d(-105%,0,0); }
  /* is-resting is assigned only after the full sheet slide has completed.
     A 300ms visibility transition used to hide the final 550ms of that slide. */
  :is(body, body:has(#theme-toggle-input:checked)) .edge-sheet:not(.is-resting) {
    visibility:visible; opacity:1; transition:transform 850ms var(--ease);
  }
  :is(body, body:has(#theme-toggle-input:checked)) .edge-sheet.is-resting:not(.is-open) {
    visibility:hidden; opacity:0; transition:none;
  }
  :is(body, body:has(#theme-toggle-input:checked)) .garage-sheet::before, :is(body, body:has(#theme-toggle-input:checked)) .ranking-sheet::before,
  :is(body, body:has(#theme-toggle-input:checked)) .detail-sheet::before, :is(body, body:has(#theme-toggle-input:checked)) .compare-sheet::before {
    content:attr(data-portrait-title); position:absolute; inset:0 0 auto; z-index:30;
    height:var(--portrait-header-height); display:flex; justify-content:center; align-items:center;
    padding:env(safe-area-inset-top, 0px) 112px 0;
    background:var(--paper); color:var(--ink); border-bottom:1px solid var(--line);
    font-size:13px; font-weight:600; line-height:1.3; letter-spacing:0; pointer-events:none;
  }
  :is(body, body:has(#theme-toggle-input:checked)) .theme-toggle {
    top:calc(env(safe-area-inset-top, 0px) + 8px); right:max(12px, env(safe-area-inset-right, 0px));
    z-index:72; min-height:44px; min-width:86px; padding:0 10px;
    gap:8px; justify-content:center; color:var(--ink); background:var(--paper);
    border:1px solid var(--line); border-radius:6px; mix-blend-mode:normal;
  }
  :is(body, body:has(#theme-toggle-input:checked)) .theme-toggle span { font-size:0; }
  :is(body, body:has(#theme-toggle-input:checked)) .theme-toggle b { display:inline; font-size:13px; margin:0; }
  :is(body, body:has(#theme-toggle-input:checked)) .theme-toggle input { flex:none; width:17px; height:17px; }
  :is(body, body:has(#theme-toggle-input:checked)) .vertical-close, :is(body, body:has(#theme-toggle-input:checked)) #detail-back, :is(body, body:has(#theme-toggle-input:checked)) #compare-close {
    left:max(12px, env(safe-area-inset-left, 0px)); right:auto;
    top:calc(env(safe-area-inset-top, 0px) + 8px); bottom:auto;
    transform:none!important; translate:none; animation:none!important; writing-mode:horizontal-tb;
    width:auto; min-width:72px; max-width:112px; height:44px; min-height:44px;
    padding:0 10px; display:inline-flex; align-items:center; justify-content:center; gap:6px;
    background:var(--paper); color:var(--ink); border:1px solid var(--line); border-radius:6px;
    mix-blend-mode:normal; font-size:0; line-height:1.25; will-change:auto;
  }
  :is(body, body:has(#theme-toggle-input:checked)) .vertical-close::before, :is(body, body:has(#theme-toggle-input:checked)) #compare-close::before { content:'←'; font-size:18px; }
  :is(body, body:has(#theme-toggle-input:checked)) .vertical-close span, :is(body, body:has(#theme-toggle-input:checked)) #compare-close span { display:inline; font-size:13px; margin:0; }
  :is(body, body:has(#theme-toggle-input:checked)) #compare-close { z-index:72; display:none; }
  :is(body, body:has(#theme-toggle-input:checked))[data-view=compare] #compare-close { display:inline-flex; }
  :is(body, body:has(#theme-toggle-input:checked)) .vertical-close:hover, :is(body, body:has(#theme-toggle-input:checked)) #compare-close:hover { opacity:1; background:var(--paper); color:var(--ink); }
  .portrait-nav {
    position:fixed; z-index:65; left:0; right:0; bottom:0; display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr)); height:calc(var(--portrait-nav-height) + env(safe-area-inset-bottom, 0px));
    padding:4px max(8px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    background:var(--paper); color:var(--ink); border-top:1px solid var(--line); gap:4px;
  }
  .portrait-nav-link {
    position:relative; min-height:48px; min-width:44px; display:flex; flex-direction:column;
    align-items:center; justify-content:center; gap:3px; border-radius:6px; border:1px solid transparent;
    font-size:14px; line-height:1.2; letter-spacing:0;
  }
  .portrait-nav-link[aria-current=page] { border-color:var(--ink); font-weight:600; }
  .portrait-nav-english { color:var(--muted); font-size:9px; letter-spacing:.03em; }
  .portrait-nav-count { position:absolute; right:8px; top:7px; font-size:11px; line-height:16px; min-width:16px; text-align:center; }
  .portrait-nav-link:focus-visible, :is(body, body:has(#theme-toggle-input:checked)) .theme-toggle:focus-within,
  :is(body, body:has(#theme-toggle-input:checked)) .vertical-close:focus-visible, :is(body, body:has(#theme-toggle-input:checked)) #compare-close:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
  :is(body, body:has(#theme-toggle-input:checked)) .sheet-scroll { scroll-padding-top:calc(var(--portrait-header-height) + 100px); }
  :is(body, body:has(#theme-toggle-input:checked)) .garage-sheet>.sheet-scroll, :is(body, body:has(#theme-toggle-input:checked)) .ranking-sheet>.sheet-scroll {
    position:absolute; inset:var(--portrait-header-height) 0 0; height:auto;
    padding:0 16px calc(var(--portrait-nav-height) + env(safe-area-inset-bottom, 0px) + 28px);
  }
  :is(body, body:has(#theme-toggle-input:checked)) .page-heading { font-size:clamp(38px, 8.8vw, 68px); margin:18px 0; line-height:1; }
  :is(body, body:has(#theme-toggle-input:checked)) .heading-cn { font-size:13px; margin-left:12px; padding-top:5px; }
  :is(body, body:has(#theme-toggle-input:checked)) .collections-layout { display:block; }
  .portrait-filter-toolbar {
    display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 10px;
    position:sticky; top:0; z-index:15;
    margin:0 -16px 16px; padding:8px 16px; background:var(--paper); border-bottom:1px solid var(--line);
  }
  .portrait-filter-toolbar .search-label { margin:0; }
  .portrait-filter-toolbar .search-label>span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .portrait-filter-toolbar input {
    min-height:44px; font-size:16px; padding:10px 12px; border:1px solid var(--line); border-radius:6px;
  }
  .portrait-filter-toggle {
    min-height:44px; min-width:96px; padding:8px 10px; border:1px solid var(--ink); border-radius:6px;
    color:var(--ink); background:var(--paper); font-size:13px; line-height:1.3; letter-spacing:0;
  }
  .portrait-filter-toggle[aria-expanded=true] { background:var(--ink); color:var(--paper); }
  .portrait-filter-summary { grid-column:1/-1; font-size:12px; line-height:1.4; letter-spacing:0; color:var(--muted); }
  :is(body, body:has(#theme-toggle-input:checked)) .portrait-filter-toolbar .collection-filters {
    position:static; grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    align-content:start; gap:4px 8px; height:auto; margin:0 -16px -8px; padding:8px 16px;
    max-height:min(300px, calc((100dvh - var(--portrait-header-height) - var(--portrait-nav-height) - env(safe-area-inset-bottom, 0px) - 88px) * .5));
    overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:var(--control-line) transparent;
    border-top:1px solid var(--line); border-bottom:0;
  }
  :is(body, body:has(#theme-toggle-input:checked)) .portrait-filter-toolbar :is(.filter-status,.tier-filters,.filter-field-grid,.filter-more) { grid-column:1/-1; }
  :is(body, body:has(#theme-toggle-input:checked)) .portrait-filter-toolbar .filter-status { margin:0; padding:0; border:0; background:transparent; }
  :is(body, body:has(#theme-toggle-input:checked)) .portrait-filter-toolbar :is(.filter-status-head,.filter-progress,.filter-status:has(.filter-all)) { display:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .active-filters { max-height:none; overflow:visible; gap:4px; margin:0 0 4px; }
  :is(body, body:has(#theme-toggle-input:checked)) .active-filters button { min-height:44px; padding:6px 8px; font-size:12px; line-height:1.4; }
  :is(body, body:has(#theme-toggle-input:checked)) .tier-filters { display:flex; flex-flow:row nowrap; overflow-x:auto; gap:2px; margin-bottom:4px; padding-bottom:4px; scrollbar-width:thin; }
  :is(body, body:has(#theme-toggle-input:checked)) .tier-button { flex:none; min-width:44px; min-height:44px; padding:6px 4px; font-size:17px; line-height:1.3; white-space:nowrap; }
  :is(body, body:has(#theme-toggle-input:checked)) .tier-button sup { font-size:10px; }
  :is(body, body:has(#theme-toggle-input:checked)) .tier-button:hover { transform:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .filter-field-grid, :is(body, body:has(#theme-toggle-input:checked)) .filter-more-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 10px; }
  :is(body, body:has(#theme-toggle-input:checked)) .select-label { display:grid; grid-template-columns:26px minmax(0,1fr); align-items:center; min-width:0; margin:0; font-size:12px; gap:4px; }
  :is(body, body:has(#theme-toggle-input:checked)) .select-label select, :is(body, body:has(#theme-toggle-input:checked)) .ranking-controls select, :is(body, body:has(#theme-toggle-input:checked)) .number-filter input { min-height:44px; font-size:16px; line-height:1.4; padding:8px; }
  :is(body, body:has(#theme-toggle-input:checked)) .filter-more { margin:4px 0 0; }
  :is(body, body:has(#theme-toggle-input:checked)) .filter-more>summary { min-height:44px; font-size:13px; padding:8px 0; }
  :is(body, body:has(#theme-toggle-input:checked)) .filter-more-grid { padding-bottom:8px; }
  :is(body, body:has(#theme-toggle-input:checked)) .stars-filter { grid-column:1/-1; margin:0; }
  :is(body, body:has(#theme-toggle-input:checked)) .filter-more-grid .number-filter { grid-column:auto; margin:0; }
  :is(body, body:has(#theme-toggle-input:checked)) .stars-filter legend, :is(body, body:has(#theme-toggle-input:checked)) .number-filter, :is(body, body:has(#theme-toggle-input:checked)) .number-filter output { font-size:13px; }
  :is(body, body:has(#theme-toggle-input:checked)) .stars-options { gap:8px; }
  :is(body, body:has(#theme-toggle-input:checked)) .stars-options label { min-height:44px; min-width:54px; justify-content:center; font-size:14px; }
  :is(body, body:has(#theme-toggle-input:checked)) .editorial-toggle { grid-column:auto; min-height:44px; font-size:12px; margin:0; gap:6px; }
  :is(body, body:has(#theme-toggle-input:checked)) .editorial-toggle input { width:18px; height:18px; }
  :is(body, body:has(#theme-toggle-input:checked)) .filter-note { grid-column:auto; margin:0; font-size:12px; display:flex; align-items:center; justify-content:flex-end; }
  :is(body, body:has(#theme-toggle-input:checked)) .filter-note p { display:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .filter-note>a { display:inline-flex; align-items:center; min-height:44px; padding:8px 0; line-height:1.4; }
  :is(body, body:has(#theme-toggle-input:checked)) .vehicle-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 12px; }
  :is(body, body:has(#theme-toggle-input:checked)) .cell-meta { display:block; font-size:13px; line-height:1.4; }
  :is(body, body:has(#theme-toggle-input:checked)) .cell-meta>div>a { display:block; min-height:44px; }
  :is(body, body:has(#theme-toggle-input:checked)) .cell-meta p { font-size:12px; line-height:1.45; }
  :is(body, body:has(#theme-toggle-input:checked)) .add-compare { min-height:44px; min-width:80px; padding:8px 10px; margin-top:6px; border:1px solid var(--line); border-radius:5px; font-size:13px; }
  :is(body, body:has(#theme-toggle-input:checked)) .load-more, :is(body, body:has(#theme-toggle-input:checked)) .grid-empty button, :is(body, body:has(#theme-toggle-input:checked)) .collection-footer>button, :is(body, body:has(#theme-toggle-input:checked)) .ranking-footer>button { min-height:44px; padding:10px 12px; font-size:14px; }
  :is(body, body:has(#theme-toggle-input:checked)) .collection-footer { align-items:center; gap:14px; margin-top:38px; line-height:1.5; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-layout {
    display:grid; grid-template-columns:minmax(0,1fr); gap:24px; max-width:820px; margin:0 auto;
    padding:calc(var(--portrait-header-height) + 20px) 16px calc(var(--portrait-nav-height) + env(safe-area-inset-bottom, 0px) + 30px);
  }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-visual { position:static; min-width:0; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-mini-panel { display:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-thumbs { margin-top:16px; padding:3px 0; gap:10px; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-thumbs button { min-width:70px; min-height:44px; flex:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-image-caption { font-size:12px; line-height:1.55; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-title { font-size:clamp(30px, 7vw, 48px); line-height:1.05; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-kicker { font-size:12px; line-height:1.45; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-subtitle { font-size:15px; line-height:1.55; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-scoreline { font-size:14px; gap:16px; line-height:1.45; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-compare-button { min-height:48px; width:100%; font-size:18px; padding:12px; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-data-columns { grid-template-columns:minmax(0,1fr); }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-data-primary[data-portrait-metrics=true] :is(.detail-basic,.detail-position) { display:none; }
  .portrait-detail-performance { display:table; border-collapse:collapse; table-layout:fixed; width:100%; margin:30px 0 0; color:var(--ink); }
  .portrait-detail-performance caption { font-size:14px; line-height:1.45; font-weight:600; text-align:left; padding-bottom:10px; letter-spacing:0; }
  .portrait-detail-performance th, .portrait-detail-performance td { border-top:1px solid var(--line); padding:10px 6px; text-align:right; vertical-align:baseline; line-height:1.4; overflow-wrap:anywhere; width:32%; letter-spacing:0; }
  .portrait-detail-performance th { font-size:12px; font-weight:400; color:var(--muted); }
  .portrait-detail-performance th:first-child { width:36%; text-align:left; padding-left:0; }
  .portrait-detail-performance td:last-child { padding-right:0; }
  .portrait-detail-performance td strong { font:600 clamp(18px, 4.8vw, 23px)/1.25 var(--font-data, sans-serif); font-variant-numeric:tabular-nums; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-data-columns .detail-basic-list>div, :is(body, body:has(#theme-toggle-input:checked)) .detail-data-columns .advanced-item { grid-template-columns:minmax(0,1fr) minmax(88px,.65fr); }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-data-columns .detail-basic-list>div>strong, :is(body, body:has(#theme-toggle-input:checked)) .detail-data-columns .advanced-item>dd { font-size:22px; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-end { flex-wrap:wrap; gap:8px 20px; }
  :is(body, body:has(#theme-toggle-input:checked)) .detail-end>a { display:flex; align-items:center; min-height:44px; font-size:13px; }
  :is(body, body:has(#theme-toggle-input:checked)) .story-body { font-size:16px; line-height:1.8; overflow-wrap:anywhere; }
  :is(body, body:has(#theme-toggle-input:checked)) .story-body figure { margin:24px 0; }
  :is(body, body:has(#theme-toggle-input:checked)) .story-body figcaption { font-size:12px; line-height:1.6; }
  :is(body, body:has(#theme-toggle-input:checked)) .story-sources { font-size:13px; line-height:1.65; }
  :is(body, body:has(#theme-toggle-input:checked)) .story-sources a { display:inline-flex; align-items:center; min-height:44px; padding:8px 0; }
  :is(body, body:has(#theme-toggle-input:checked)) .ranking-heading { font-size:clamp(38px, 8.5vw, 68px); line-height:.98; margin-top:18px; }
  :is(body, body:has(#theme-toggle-input:checked)) .ranking-heading>span { font-size:14px; margin:16px 0; }
  :is(body, body:has(#theme-toggle-input:checked)) .ranking-intro { font-size:14px; line-height:1.55; margin:20px 0; }
  :is(body, body:has(#theme-toggle-input:checked)) .ranking-controls { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; }
  :is(body, body:has(#theme-toggle-input:checked)) .ranking-controls>label { font-size:13px; gap:6px; }
  :is(body, body:has(#theme-toggle-input:checked)) .rank-summary { font-size:13px; line-height:1.5; }
  :is(body, body:has(#theme-toggle-input:checked)) .rank-row { min-height:64px; grid-template-columns:25px minmax(0,1fr) auto; padding:14px 0; gap:8px; }
  :is(body, body:has(#theme-toggle-input:checked)) .rank-car { display:flex; flex-direction:column; justify-content:center; min-height:44px; font-size:15px; line-height:1.45; overflow-wrap:anywhere; }
  :is(body, body:has(#theme-toggle-input:checked)) .rank-car small { font-size:12px; line-height:1.45; }
  :is(body, body:has(#theme-toggle-input:checked)) .rank-number { font-size:24px; }
  :is(body, body:has(#theme-toggle-input:checked)) .ranking-footer { font-size:12px; line-height:1.6; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-sheet {
    top:0; bottom:calc(var(--portrait-nav-height) + env(safe-area-inset-bottom, 0px));
    height:auto!important; --compare-base-height:100dvh; --compare-rail-height:56px; --compare-control-height:44px;
  }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-scroll { padding-top:var(--portrait-header-height); scroll-padding-top:18px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-top { padding:18px 16px; gap:12px; align-items:center; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-top h1 { font-size:34px; line-height:1; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-top h1>span { font-size:12px; line-height:1.45; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-top>button { min-height:44px; padding:8px; font-size:13px; flex:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicles { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:20px 16px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicle { display:block; min-width:0; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicle-title { max-width:none; font-size:clamp(19px, 4.9vw, 30px); line-height:1.15; margin:12px 0; overflow-wrap:anywhere; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicle-title>a { display:block; min-height:44px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicle .panel-top { flex-wrap:wrap; gap:4px; padding:9px 0; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicle .panel-micro { font-size:10px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicle .panel-tier, :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicle .panel-score { font-size:15px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicle .panel-inner { padding-bottom:4px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-vehicle .panel-starline { flex-wrap:wrap; gap:5px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-sheet[data-portrait-basic-table=true] .compare-metrics { display:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-metric { display:block; min-height:80px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-metric>span { display:block; margin-bottom:6px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-metric strong { font-size:23px; overflow-wrap:anywhere; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-remove { margin:0; min-height:44px; padding:8px 0; font-size:12px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-slot { min-height:160px; font-size:16px; line-height:1.5; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-slot>a { min-height:44px; display:flex; align-items:center; padding:8px; }
  .portrait-basic-comparison { display:table; border-collapse:collapse; table-layout:fixed; width:calc(100% - 32px); margin:0 16px 30px; font-size:13px; }
  .portrait-basic-comparison caption { text-align:left; font-size:14px; font-weight:600; padding:0 0 12px; }
  .portrait-basic-comparison th, .portrait-basic-comparison td { width:35%; text-align:left; vertical-align:top; padding:12px 8px; border-top:1px solid var(--line); overflow-wrap:anywhere; line-height:1.45; }
  .portrait-basic-comparison th { font-weight:400; color:var(--muted); font-size:12px; }
  .portrait-basic-comparison th:first-child { width:30%; padding-left:0; }
  .portrait-basic-comparison td strong { font:600 22px/1.2 var(--font-data, sans-serif); font-variant-numeric:tabular-nums; }
  .portrait-basic-comparison .compare-delta { text-align:left; font-size:11px; line-height:1.5; margin-top:5px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-lower-layout { display:block; margin:0 16px 26px; }
  :is(body, body:has(#theme-toggle-input:checked)) .comparison-table { width:100%; margin:0; font-size:13px; }
  :is(body, body:has(#theme-toggle-input:checked)) .comparison-table col.comparison-label-col { width:30%; }
  :is(body, body:has(#theme-toggle-input:checked)) .comparison-table th, :is(body, body:has(#theme-toggle-input:checked)) .comparison-table td { padding:12px 6px; line-height:1.55; overflow-wrap:anywhere; }
  :is(body, body:has(#theme-toggle-input:checked)) .comparison-table th:not(:first-child), :is(body, body:has(#theme-toggle-input:checked)) .comparison-table td:not(:first-child) { padding-left:8px; }
  :is(body, body:has(#theme-toggle-input:checked)) .comparison-table td:not(:first-child) { font-size:15px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-radar { margin-top:24px; padding-top:20px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-radar svg { width:min(100%, 300px); }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-note { padding:0 16px 20px; font-size:12px; line-height:1.65; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-subtotal { padding:10px 16px; gap:12px; font-size:12px; flex:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-subtotal small { font-size:11px; line-height:1.45; margin-top:3px; }
  :is(body, body:has(#theme-toggle-input:checked)) #compare-selected-count { flex:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-actionbar { padding:0 16px; min-height:56px; height:56px; font-size:17px; background:var(--ink); color:var(--paper); }
  :is(body, body:has(#theme-toggle-input:checked)) #compare-action-label { opacity:1!important; transform:none!important; font-size:15px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-actionbar>a { min-height:44px; font-size:16px; }
  :is(body, body:has(#theme-toggle-input:checked)) .arrow-hex { width:30px; height:30px; border-color:currentColor; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-empty { min-height:280px; padding:40px 24px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-empty p { font-size:14px; line-height:1.6; }
  :is(body, body:has(#theme-toggle-input:checked)) .home-identity { left:16px; right:16px; bottom:calc(var(--portrait-nav-height) + env(safe-area-inset-bottom, 0px) + 20px); transform:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .home-identity .wordmark { font-size:clamp(28px, 7.3vw, 62px); white-space:normal; }
  :is(body, body:has(#theme-toggle-input:checked)) .ranking-link { display:none; }
  :is(body, body:has(#theme-toggle-input:checked)) .home-footnote { top:calc(env(safe-area-inset-top, 0px) + 60px); bottom:auto; right:16px; width:auto; max-width:calc(100% - 32px); display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
  :is(body, body:has(#theme-toggle-input:checked)) .home-footnote>a, :is(body, body:has(#theme-toggle-input:checked)) .home-footnote>button { min-height:44px; display:flex; align-items:center; padding:6px; margin:0; font-size:13px; }
  :is(body, body:has(#theme-toggle-input:checked)) .toast { bottom:calc(var(--portrait-nav-height) + env(safe-area-inset-bottom, 0px) + 12px); }
  :is(body, body:has(#theme-toggle-input:checked)) .image-dialog { width:100%; height:100dvh; margin:0; padding:calc(env(safe-area-inset-top, 0px) + 64px) 12px calc(env(safe-area-inset-bottom, 0px) + 100px); }
  :is(body, body:has(#theme-toggle-input:checked)) .image-dialog>#lightbox-close { left:auto; right:12px; top:calc(env(safe-area-inset-top, 0px) + 8px); transform:none!important; min-height:44px; min-width:80px; font-size:14px; }
  :is(body, body:has(#theme-toggle-input:checked)) .lightbox-controls { bottom:calc(env(safe-area-inset-bottom, 0px) + 14px); gap:20px; }
  :is(body, body:has(#theme-toggle-input:checked)) .lightbox-controls button { min-width:44px; min-height:44px; }
  :is(body, body:has(#theme-toggle-input:checked)) .image-dialog>p { font-size:12px; line-height:1.45; }
}
@media (prefers-reduced-motion:reduce) {
  :is(body, body:has(#theme-toggle-input:checked)) .edge-sheet:not(.is-resting) { transition:none; }
}
@media (max-width:360px) {
  .portrait-filter-toolbar { gap:6px; }
  .portrait-filter-toggle { min-width:86px; font-size:12px; padding:8px 6px; }
  :is(body, body:has(#theme-toggle-input:checked)) .vehicle-grid { grid-template-columns:minmax(0,1fr); }
  :is(body, body:has(#theme-toggle-input:checked)) .portrait-basic-comparison td strong { font-size:20px; }
  :is(body, body:has(#theme-toggle-input:checked)) .compare-top h1 { font-size:30px; }
}
