/* Shared Home / Settings control scale, including embedded settings routes. */
:root {
  --uno-control-size: clamp(50px, 5.3vw, 100px);
  --uno-control-icon-size: clamp(19px, 2.014vw, 38px);
  --uno-label-size: clamp(16px, 1.55vw, 30px);
  --settings-shell-header-height: calc(var(--uno-control-size) + 28px);
}
html body :is(.app-settings-header, .settings-shell .detail-header) {
  height: var(--settings-shell-header-height);
  min-height: var(--settings-shell-header-height);
  padding-inline: 4.2vw;
}
html body :is(.app-settings-header, .settings-shell .detail-header) :is(.app-settings-back, .app-settings-profile, .back-pill, .header-avatar, .uno-header-control) {
  width: var(--uno-control-size) !important;
  height: var(--uno-control-size) !important;
  min-width: var(--uno-control-size);
  flex: 0 0 var(--uno-control-size);
}
html body :is(.app-settings-header, .settings-shell .detail-header) :is(.app-settings-back, .back-pill, .uno-header-control) > svg {
  width: var(--uno-control-icon-size);
  height: var(--uno-control-icon-size);
}
html body :is(.app-settings-header, .settings-shell .detail-header) .uno-profile-avatar { padding: 6px !important; }
html body :is(.app-settings-source, .settings-shell .source-status-pill) { min-height: 48px; font-size: var(--uno-label-size); padding-inline: 18px; }
html body :is(.app-settings-title, .settings-shell .detail-title) { font-size: clamp(25px,2.5vw,52px); }
html body :is(.app-settings-clock, .settings-shell .header-clock) { font-size: clamp(23px,2.1vw,40px); font-weight: 400; }
html body :is(.app-settings-weather, .settings-shell .weather-temp) { font-size: clamp(18px,1.7vw,32px); }
html body :is(.app-settings-weather, .settings-shell .header-weather) svg { width: clamp(28px,3.6vw,64px); height: clamp(28px,3.6vw,64px); }
@media(min-width:821px) {
  .uno-settings .detail-app { grid-template-columns: var(--uno-control-size) minmax(190px,.8fr) minmax(350px,2fr) minmax(210px,1fr); }
  .uno-settings-rail a { width: var(--uno-control-size); height: var(--uno-control-size); }
  .uno-settings-rail svg { width: var(--uno-control-icon-size); height: var(--uno-control-icon-size); }
  .uno-settings-menu a { font-size: var(--uno-label-size); min-height: clamp(62px,5.3vw,100px); gap: 14px; }
  .uno-settings-menu svg, .uno-settings .row-icon svg { width: var(--uno-control-icon-size); height: var(--uno-control-icon-size); }
  .uno-settings .row-icon { width: var(--uno-control-icon-size); height: var(--uno-control-icon-size); flex-basis: var(--uno-control-icon-size); }
  .uno-settings .row-title { font-size: var(--uno-label-size); }
  .uno-settings .row-value { font-size: clamp(14px,1.3vw,24px); }
  .uno-settings .row-subtitle { font-size: clamp(12px,1.1vw,20px); }
  .uno-settings .setting-row { min-height: clamp(84px,7vw,132px); }
  .uno-settings-heading h1 { font-size: clamp(25px,2.5vw,52px); }
}
@media(min-width:821px) and (max-width:1250px) {
  .uno-settings .detail-app { grid-template-columns: var(--uno-control-size) 210px minmax(0,1fr); gap: 18px; }
  .uno-settings-brand { display: none; }
}
@media(max-width:820px) {
  :root { --uno-control-size: 50px; --uno-control-icon-size: 21px; --settings-shell-header-height: calc(78px + env(safe-area-inset-top)); }
  html body :is(.app-settings-title, .settings-shell .detail-title) { font-size: 24px; }
  html body :is(.app-settings-source, .settings-shell .source-status-pill, .app-settings-weather, .settings-shell .header-weather) { display: none; }
  html body :is(.app-settings-clock, .settings-shell .header-clock) { display: none; }
}

/* One button and glyph size throughout Home, Settings and media navigation. */
html body :is(.app-shell-header,.library-header,.livetv-header,.rail-col,.uno-settings-rail) :is(.uno-header-control,.round-control,.home-control,.rail-btn),
html body .uno-settings-rail a {
  width: var(--uno-control-size) !important;
  height: var(--uno-control-size) !important;
  min-width: var(--uno-control-size);
  min-height: var(--uno-control-size);
  flex: 0 0 var(--uno-control-size);
}
html body :is(.app-shell-header,.library-header,.livetv-header,.rail-col,.uno-settings-rail) :is(.uno-header-control,.round-control,.home-control,.rail-btn) > svg,
html body .uno-settings-rail a > svg {
  width: var(--uno-control-icon-size) !important;
  height: var(--uno-control-icon-size) !important;
}
html body :is(.app-shell-header,.library-header,.livetv-header,.rail-col) .uno-profile-avatar { padding: 6px !important; }
html body .nav-capsule { height: calc(var(--uno-control-size) + 16px); }
@media(min-width:901px) {
  html body .nav-capsule { max-width: 900px; flex-basis: 900px; gap: 16px; }
  html body .nav-capsule .library-tabs { height: var(--uno-control-size); }
  html body .nav-capsule .library-tab { font-size: clamp(16px,1.4vw,24px); }
  html body .nav-capsule .uno-logo { width: clamp(90px,7vw,130px); height: calc(var(--uno-control-size) - 8px); max-height: none; }
  html body .livetv-body { --uno-list-top: calc(clamp(18px,3vh,32px) + var(--uno-control-size) + 32px); grid-template-columns: var(--uno-control-size) minmax(160px,.70fr) minmax(280px,1.4fr) minmax(220px,1.12fr); }
  html body .rail-col { width: var(--uno-control-size); }
  html.playbox-embedded .live-search-inline.playbox-shell-search-host { top: calc(clamp(18px,3vh,32px) + var(--uno-control-size) + 28px); }
}
@media(min-width:901px) and (max-width:1450px) {
  html body .today-label { display: none; }
}
@media(max-width:900px) {
  :root { --uno-control-size: 50px; --uno-control-icon-size: 21px; }
  html body .rail-col { min-height: var(--uno-control-size); flex-basis: var(--uno-control-size); }
  html body .nav-capsule { height: 66px; }
}
html body.home-reference .top-controls .uno-header-control > svg {
  width: var(--uno-control-icon-size) !important;
  height: var(--uno-control-icon-size) !important;
}

/* Source management remains available in Settings > IPTV Sources. */
html body :is(.app-settings-source, .source-status-pill) { display: none !important; }
