:root { --primary: #2864c6; --primary-soft: #f1f5fc; --muted: #747b87; --line: #e4e7ec; }
.app-shell { background: #fff; padding-bottom: calc(170px + env(safe-area-inset-bottom)); box-shadow: none; }
.app-header { background: #fff; }
.app-header h1 { font-size: 26px; font-weight: 600; line-height: 1.35; }
.brand-kicker { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: #414750; font-size: 15px; font-weight: 500; }
.brand-kicker .ui-icon { width: 19px; height: 19px; color: var(--primary); }
.ui-icon { display: block; width: 23px; height: 23px; flex-shrink: 0; background: currentColor; mask: var(--icon) center / contain no-repeat; -webkit-mask: var(--icon) center / contain no-repeat; }
.icon-home { --icon: url('/preview/icons/home.svg'); }
.icon-chart { --icon: url('/preview/icons/chart.svg'); }
.icon-compare { --icon: url('/preview/icons/compare.svg'); }
.icon-profile { --icon: url('/preview/icons/profile.svg'); }
.icon-back { --icon: url('/preview/icons/back.svg'); }
.icon-share { --icon: url('/preview/icons/share.svg'); }
.share-ranking { width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 6px; color: #414750; }
.back-button { width: 28px; margin-right: 8px; }
body[data-view="ladder"] .app-header { position: relative; min-height: 119px; align-items: flex-end; padding-top: 22px; padding-bottom: 20px; }
body[data-view="ladder"] .back-button { margin-bottom: 0; }
body[data-view="ladder"] .app-header > div { flex: 1; }
body[data-view="ladder"] .brand-kicker { margin-left: -36px; margin-bottom: 16px; }
body[data-view="ladder"] .share-ranking { align-self: flex-start; }
:is(#homeView,#ladderView) .ranking-tabs { display: flex; gap: 0; overflow-x: auto; margin: 0 -22px; padding: 0 14px; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
:is(#homeView,#ladderView) .ranking-tab { position: relative; width: auto; min-height: 48px; flex: 1 0 auto; padding: 12px 8px; border-radius: 0; background: transparent; color: #666e78; font-size: 16px; font-weight: 500; line-height: 24px; white-space: nowrap; }
:is(#homeView,#ladderView) .ranking-tab.active { color: var(--primary); font-weight: 600; box-shadow: none; }
:is(#homeView,#ladderView) .ranking-tab.active::before { display: none; }
:is(#homeView,#ladderView) .ranking-tab.active::after { position: absolute; right: 8px; bottom: 0; left: 8px; height: 3px; border-radius: 2px; background: var(--primary); content: ''; }
.ranking-controls { display: flex; min-height: 58px; align-items: center; gap: 12px; }
.ranking-options { display: flex; flex: 1; min-width: 0; overflow-x: auto; padding: 2px; border-radius: 6px; background: #f1f3f6; scrollbar-width: thin; }
.ranking-option { flex: 1 0 auto; min-height: 38px; padding: 7px 12px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #69727d; font-size: 13px; line-height: 22px; white-space: nowrap; }
.ranking-option.active { border-color: #dce3ee; background: #fff; color: var(--primary); font-weight: 600; }
#ladderView .platform-tabs { flex: 1; min-width: 0; margin: 0; padding: 2px; border: 0; border-radius: 6px; background: #f1f3f6; }
#ladderView .platform-tabs button { height: 40px; color: #69727d; }
#ladderView .platform-tabs button.active { background: #fff; color: var(--primary); border: 1px solid #dce3ee; }
#vendorFilter { width: 126px; max-width: 42%; height: 42px; margin-left: auto; padding: 0 26px 0 10px; border: 1px solid #dce1e7; border-radius: 6px; appearance: none; background: #fff url('/preview/icons/chevron-down.svg') right 7px center / 15px no-repeat; color: #454c56; font-size: 13px; text-overflow: ellipsis; }
:is(#homeView,#ladderView) .ranking-source { display: flex; min-height: 50px; align-items: center; gap: 12px; margin: 0; padding: 0 0 10px; border: 0; background: #fff; }
:is(#homeView,#ladderView) .ranking-source > div { flex: 1; min-width: 0; color: #454c56; font-size: 12px; line-height: 1.5; }
:is(#homeView,#ladderView) .ranking-source strong { display: inline; font-size: 12px; font-weight: 400; }
:is(#homeView,#ladderView) .ranking-source small { margin-top: 5px; font-size: 11px; line-height: 1.5; }
#ladderView #ladderCount { flex-shrink: 0; color: #626b77; font-size: 12px; font-weight: 400; white-space: nowrap; }
.ladder-columns { display: grid; grid-template-columns: 48px minmax(0,1fr) 86px 36px; min-height: 36px; align-items: center; margin: 0 -22px; padding: 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f8fa; color: var(--muted); font-size: 12px; }
.column-score { padding-right: 6px; text-align: right; }
#ladderView .ladder-list { overflow: visible; border: 0; border-radius: 0; background: #fff; }
:is(#homeView,#ladderView) .ladder-row { grid-template-columns: 48px minmax(0,1fr) 36px; min-height: 80px; padding: 10px 0; border-bottom: 1px solid #e7e9ee; background: #fff; }
:is(#homeView,#ladderView) .performance-fill,:is(#homeView,#ladderView) .row-score-wrap small,:is(#homeView,#ladderView) .ladder-row.is-selected::after { display: none; }
:is(#homeView,#ladderView) .rank { color: #7b838e; font-size: 22px; text-align: left; }
:is(#homeView,#ladderView) .rank.top { color: var(--primary); font-size: 26px; font-weight: 600; }
:is(#homeView,#ladderView) .row-main { padding: 0 6px 0 0; }
:is(#homeView,#ladderView) .row-heading { align-items: center; gap: 8px; }
:is(#homeView,#ladderView) .row-name { font-size: 15px; font-weight: 500; line-height: 1.4; }
:is(#homeView,#ladderView) .row-meta { margin-top: 5px; font-size: 12px; line-height: 1.4; }
:is(#homeView,#ladderView) .row-score { color: #20242c; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
:is(#homeView,#ladderView) .row-score-wrap { max-width: 45%; }
:is(#homeView,#ladderView) .add-compare { position: relative; width: 36px; height: 44px; border: 0; border-radius: 0; background: transparent; }
:is(#homeView,#ladderView) .add-compare::before { position: absolute; width: 29px; height: 29px; border: 1px solid #aeb6c1; border-radius: 50%; background: #fff; content: ''; }
:is(#homeView,#ladderView) .add-compare.selected { background: transparent !important; }
:is(#homeView,#ladderView) .add-compare.selected::before { border-color: var(--primary); background: var(--primary); }
:is(#homeView,#ladderView) .comparison-icon { position: relative; z-index: 1; }
#ladderView .score-group-heading { margin: 0 -22px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: #f7f8fa; color: #606a79; font-size: 12px; font-weight: 500; line-height: 1.5; }
.compare-dock { right: max(0px,calc(50% - 240px)); bottom: calc(62px + env(safe-area-inset-bottom)); left: max(0px,calc(50% - 240px)); display: grid; grid-template-columns: minmax(0,1fr) 182px; min-height: 68px; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); border-radius: 0; background: #fff; color: #20242c; box-shadow: none; }
.compare-dock > div { min-width: 0; }
.compare-dock > div:last-child { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 8px; }
.compare-dock strong { font-size: 14px; font-weight: 500; white-space: nowrap; }
#compareCount { color: var(--primary); font-size: 18px; font-weight: 600; }
.dock-clear,.dock-open { min-width: 0; height: 44px; padding: 0 6px; font-size: 14px; font-weight: 500; }
.dock-clear { color: var(--muted); }
.dock-open { background: var(--primary); color: #fff; font-weight: 600; }
.bottom-nav { height: calc(62px + env(safe-area-inset-bottom)); background: #fff; }
.nav-item.active { color: var(--primary); }
.nav-item small { font-size: 11px; }
button:focus-visible,select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
#ladderView .load-more { color: var(--primary); }
.share-feedback { position: fixed; z-index: 100; bottom: 155px; left: 50%; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 12px 18px; border-radius: 6px; background: #20242c; color: #fff; font-size: 14px; }
@media (max-width: 900px) { .compare-dock { right: 0; left: 0; } }
@media (max-width: 360px) {
  :is(#homeView,#ladderView) .row-score { font-size: 17px; }
  :is(#homeView,#ladderView) .row-name { font-size: 14px; }
  .compare-dock { padding-right: 16px; padding-left: 16px; grid-template-columns: minmax(0,1fr) 166px; }
  .compare-dock strong { font-size: 13px; }
  #vendorFilter { width: 112px; }
}
