/* Product-owned components. Their former rules are removed from styles.css,
   not hidden beneath another correction layer. See docs/design-system.md. */

/* Shell and navigation */
#app { --control-min: var(--control-compact); --radius-control: 8px; --radius-card: 10px; --radius-panel: 14px; }
/* Density is a main-site concern, not a global scale/zoom or phone-remote change. */
#app .emby-card, #player-view { --control-min: 48px; }
body.large-controls #app { --control-min: 52px; }
html { scroll-padding-top: calc(var(--measured-header-height,var(--app-header-height)) + var(--space-4)); }
.app-header {
  position: sticky;
  top: 0;
  z-index: var(--layer-header);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--app-header-height);
  padding-inline: var(--page-gutter);
  border-bottom: 1px solid rgba(255,255,255,.065);
  background: rgba(11,12,15,.96);
}
.brand-button { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; min-height: var(--control-min); padding: 0; background: none; text-align: left; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--radius-control); background: var(--color-brand); color: var(--color-on-brand); font-size: var(--brand-mark-type); font-weight: var(--weight-display); letter-spacing: -.08em; }
.brand-mark svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; stroke-linecap: square; }
.brand-wordmark { display: grid; gap: 1px; }
.brand-wordmark strong { font-size: 1.125rem; line-height: 1; letter-spacing: -.04em; }
.brand-wordmark small { color: var(--color-text-muted); font-size: .625rem; font-weight: var(--weight-semibold); letter-spacing: .24em; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); min-width: 0; }
.nav-button { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control-min); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: transparent; color: var(--color-text-muted); font-size: .8125rem; font-weight: var(--weight-medium); white-space: nowrap; }
.nav-button.active { color: var(--color-text); background: var(--color-surface-soft); box-shadow: inset 0 -2px var(--color-brand); }
.nav-button svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header-actions { position: relative; display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.header-icon-button, .header-settings { display: inline-flex; justify-content: center; align-items: center; gap: var(--space-2); min-width: var(--control-min); height: var(--control-min); padding: var(--space-2); border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--color-text); }
.header-icon-button svg, .header-settings svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header-settings span { display: none; }
.header-icon-button[aria-expanded=true] { background: var(--color-surface-elevated); border-color: var(--color-border); }
.connection-status:not([data-state="bad"]) { display: none; }
.connection-status { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text-muted); font-size: var(--text-xs); white-space: nowrap; }
#media-browser { width: min(100%,calc(var(--content-max) + 2 * var(--page-gutter))); margin-inline: auto; padding-inline: max(var(--page-gutter),env(safe-area-inset-left)); }
.app-view { width: 100%; margin: 0; padding-block: var(--space-6) var(--space-10); }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-5); }
.view-heading > div:first-child { min-width: 0; }
.view-heading h1 { margin-bottom: var(--space-2); font-size: var(--text-page-title); font-weight: var(--weight-semibold); line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
.view-heading .muted { max-width: 66ch; margin: 0; font-size: var(--text-sm); }
.source-page-heading { align-items: center; padding-bottom: 0; border: 0; }
.source-page-heading .source-label { display: none; }
.source-page-heading .source-settings-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); flex-shrink: 0; }
.source-heading-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.source-heading-actions > button { gap: var(--space-2); }
.ui-icon { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: fixed; z-index: var(--layer-toast); top: var(--space-3); left: var(--space-3); padding: var(--space-4); border-radius: var(--radius-control); background: var(--color-text); color: var(--color-background); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

/* Consistent source tabs: current state is shape + contrast, not colour alone. */
.emby-page-header { min-width: 0; }
.emby-page-tabs, .youtube-page-tabs, .live-page-tabs, .games-tabs {
  display: flex; align-items: center; gap: var(--space-5); width: 100%; max-width: 100%;
  margin: 0 0 var(--space-4); padding: 0; border: 0; border-bottom: 1px solid var(--color-border);
  border-radius: 0; background: transparent; overflow-x: auto; scrollbar-width: thin;
}
.emby-page-tabs button, .youtube-page-tabs button, .live-page-tabs button, .games-tabs button { flex-shrink: 0; min-width: 0; min-height: var(--control-min); padding: var(--space-2) var(--space-1); border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--color-text-muted); font-size: .8125rem; font-weight: var(--weight-medium); white-space: nowrap; }
.emby-page-tabs button.active, .youtube-page-tabs button.active, .live-page-tabs button.active, .games-tabs button.active { background: transparent; color: var(--color-text); border-bottom-color: var(--color-brand); }

/* Home: one editorial feature, then the user's own activity and collections. */
#view-home { display: flex; flex-direction: column; gap: var(--space-6); }
.home-dashboard-header { order: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.home-dashboard-header .eyebrow { display: none; }
.home-dashboard-header h1 { min-height: 0; margin: 0; font-size: clamp(1.125rem,1.5vw,1.375rem); font-weight: var(--weight-medium); letter-spacing: -.025em; line-height: 1.3; overflow-wrap: anywhere; }
.home-dashboard-header p:last-child { display: none; }
.home-feature { --feature-height: 320px; order: 1; display: grid; min-height: var(--feature-height); border: 0; border-radius: var(--radius-card); background: var(--color-surface-subtle); overflow: hidden; }
.home-feature > * { grid-area: 1 / 1; min-width: 0; }
.home-hero { position: relative; display: flex; align-items: flex-end; min-height: var(--feature-height); margin: 0; background-size: cover; background-position: center 30%; overflow: hidden; }
.home-hero .hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg,rgba(11,12,15,.96),rgba(11,12,15,.78) 40%,rgba(11,12,15,.08) 80%),linear-gradient(0deg,rgba(11,12,15,.8),transparent 60%); }
.hero-copy { position: relative; z-index: 1; width: min(100%,600px); padding: clamp(24px,3vw,40px); }
.hero-copy .eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text); font-size: var(--text-xs); letter-spacing: .12em; }
.hero-copy .eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--color-brand); }
.hero-copy h2 { margin-bottom: var(--space-3); font-size: clamp(1.75rem,3vw,3rem); font-weight: var(--weight-semibold); line-height: 1.08; letter-spacing: -.04em; overflow-wrap: anywhere; }
.hero-copy > p:not(.eyebrow) { max-width: 48ch; margin-bottom: var(--space-4); color: var(--color-text-muted); font-size: .8125rem; line-height: 1.6; }
.hero-copy #hero-overview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-copy .primary { min-width: 148px; }
.home-feature-loading { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-5); padding: var(--space-8); }
.home-feature-loading .ui-skeleton { max-width: 30rem; height: var(--space-8); }
.home-feature-loading .ui-state { border: 0; background: transparent; padding: 0; }
#home-activity { order: 2; min-height: 0; margin: 0; }
#home-activity .activity-heading { min-height: 3rem; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
#home-activity-status { display: block; min-height: 1.5em; max-width: 65ch; margin-top: var(--space-1); font-size: var(--text-xs); }
#home-activity #activity-empty { margin-block: var(--space-3); }
#home-recently-added { order: 3; }
#home-favorites { order: 4; }
#home-games-continue { order: 5; }
.home-services { order: 6; }
.playback-restore { order: 2; }
#home-quick-actions { display: none; }
.home-companion-card { order: 7; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface-subtle); }
.home-companion-card h2 { margin-bottom: var(--space-2); font-size: var(--text-lg); }
.home-companion-card p { max-width: 65ch; margin-bottom: 0; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.6; }
.home-companion-card .eyebrow { margin-bottom: var(--space-3); }
.home-companion-card > div:last-child { display: flex; flex-wrap: wrap; gap: var(--space-2); flex-shrink: 0; }
.home-discovery-rail { display: grid; grid-auto-flow: column; grid-auto-columns: var(--poster-width); gap: var(--space-3); overflow-x: auto; padding: var(--space-1) var(--space-1) var(--space-3); scroll-snap-type: x proximity; }
.home-discovery-rail > * { min-width: 0; scroll-snap-align: start; }
.activity-filters { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.activity-filters button { min-height: var(--control-min); padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--color-text-muted); font-size: .6875rem; font-weight: var(--weight-medium); }
.activity-filters button.active { color: var(--color-text); background: var(--color-surface-elevated); border-color: var(--color-border); }
.activity-cards { --activity-width: var(--landscape-width); display: grid; grid-auto-flow: column; grid-auto-columns: var(--activity-width); gap: var(--space-3); overflow-x: auto; padding: var(--space-1) var(--space-1) var(--space-3); scroll-snap-type: x proximity; }
#home-activity .activity-cards { min-height: calc(var(--activity-width) * .5625 + 7rem); }
#home-activity .activity-cards[data-empty=true] { grid-auto-columns: minmax(0,1fr); }
#home-activity .activity-cards > .ui-state { justify-content: center; }
.activity-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-control); background: transparent; text-align: left; scroll-snap-align: start; }
.activity-card > img, .activity-card > .artwork-fallback { display: block; width: 100%; height: auto; aspect-ratio: 16/9; border-radius: var(--radius-control); object-fit: cover; }
.activity-card-games > img { object-fit: contain; }
.activity-card-progress { position: relative; z-index: 1; display: block; height: 4px; margin: -12px var(--space-3) 8px; overflow: hidden; border-radius: var(--radius-pill); background: rgba(255,255,255,.28); }
.activity-card-progress > i { display: block; height: 100%; border-radius: inherit; background: var(--color-brand); }
.activity-card-copy { display: grid; gap: var(--space-1); min-width: 0; padding: var(--space-3) var(--space-1); }
.activity-card-copy > span { color: var(--color-text-muted); font-size: .625rem; font-weight: var(--weight-semibold); letter-spacing: .1em; text-transform: uppercase; }
.activity-card-copy strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; color: var(--color-text); font-size: var(--text-sm); line-height: 1.4; }
.activity-card-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-muted); font-size: var(--text-xs); }
.source-launcher { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--space-3); }
.source-launch-card { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: var(--space-1) var(--space-3); align-items: center; min-width: 0; min-height: 84px; padding: var(--space-4); text-align: left; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface-subtle); }
.source-launch-card > span { grid-row: 1/3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-control); background: var(--color-surface-elevated); color: var(--color-text); }
.source-launch-card strong { align-self: end; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.source-launch-card small { align-self: start; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.5; }
.source-launch-card i { display: none; }

/* Artwork-led library cards. Metadata sits outside the art, no nested panels. */
.media-card { min-width: 0; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; text-align: left; scroll-snap-align: start; }
.media-card .poster, .media-card .poster-placeholder { position: relative; display: block; width: 100%; aspect-ratio: 2/3; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-surface-raised); }
.media-card .poster-placeholder { display: grid; place-items: center; padding: var(--space-4); color: var(--color-text-muted); text-align: center; }
.media-card .poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-card strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; margin-top: var(--space-3); font-size: var(--text-sm); font-weight: var(--weight-semibold); line-height: 1.4; }
.media-card small { display: block; margin-top: var(--space-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-xs); color: var(--color-text-muted); }
.media-cards { display: grid; grid-auto-flow: column; grid-auto-columns: var(--poster-width); gap: var(--space-3); overflow-x: auto; padding: var(--space-1) var(--space-1) var(--space-3); scroll-snap-type: x proximity; }
.media-cards.landscape-cards { grid-auto-columns: var(--landscape-width); }
.landscape-card strong, .landscape-card small { text-align: left; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(136px,1fr)); gap: var(--space-5) var(--space-3); }
.shelf { margin: 0 0 var(--space-6); }
.shelf-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }
.shelf-heading h2, .shelf-link { margin: 0; font-size: 1.125rem; font-weight: var(--weight-semibold); letter-spacing: -.02em; }
.shelf-heading > .muted { font-size: var(--text-xs); }

/* Settings overview becomes a useful destination, detail views retain an aside. */
.settings-layout { display: block; }
.settings-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-3); max-width: 1000px; }
.settings-tabs button { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--space-1); min-height: 80px; padding: var(--space-4) var(--space-8) var(--space-4) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface-subtle); text-align: left; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.settings-tabs button::after { content: '›'; position: absolute; right: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--color-text-muted); font-size: var(--text-lg); }
.settings-tabs button small { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--weight-regular); line-height: 1.5; }
.settings-tabs button.active { background: var(--color-surface-elevated); border-color: var(--color-text-muted); box-shadow: inset 3px 0 var(--color-brand); }
.settings-detail .settings-layout { display: grid; grid-template-columns: 210px minmax(0,1fr); align-items: start; gap: var(--space-6); }
.settings-detail .settings-tabs { position: sticky; top: calc(var(--measured-header-height,var(--app-header-height)) + var(--space-6)); grid-template-columns: minmax(0,1fr); gap: var(--space-1); }
.settings-detail .settings-tabs button { min-height: 64px; padding: var(--space-3) var(--space-4); border-color: transparent; border-radius: var(--radius-control); background: transparent; }
.settings-detail .settings-tabs button::after { display: none; }
.settings-detail .settings-tabs button.active { background: var(--color-surface-elevated); }
.settings-detail .settings-tabs button small { font-size: var(--text-xs); }
.settings-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--space-5); min-width: 0; }
.settings-card { min-width: 0; max-width: 100%; padding: clamp(16px,2vw,24px); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface-subtle); }
.settings-card > h2 { margin-bottom: var(--space-3); font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.settings-overview-back { display: inline-flex; align-items: center; min-height: var(--control-min); margin-bottom: var(--space-5); padding: var(--space-2) var(--space-4); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text-muted); }

/* Auth uses the same editorial language without adding a blocking first-run step. */
.auth-stage { display: grid; grid-template-columns: minmax(0,1fr); align-items: center; justify-items: center; gap: var(--space-12); min-height: 100dvh; padding: var(--space-8) var(--page-gutter); }
.auth-intro { display: none; max-width: 540px; }
.auth-intro .auth-statement { margin-block: var(--space-6); font-size: clamp(3rem,5vw,5rem); font-weight: var(--weight-semibold); line-height: 1.05; letter-spacing: -.055em; }
.auth-intro > p:last-child { max-width: 40ch; color: var(--color-text-muted); line-height: 1.7; }
.wryhn-login-card { width: min(400px,100%); max-height: none; overflow: visible; padding: clamp(24px,3vw,32px); border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface-subtle); box-shadow: var(--shadow-card); }
.wryhn-login-card h1 { margin-bottom: var(--space-3); font-size: 1.75rem; font-weight: var(--weight-semibold); line-height: var(--leading-heading); letter-spacing: -.04em; }
.wryhn-login-card .muted { font-size: var(--text-sm); }
.wryhn-login-card > label { margin-top: var(--space-5); }
.wryhn-login-card .primary { width: 100%; margin-top: var(--space-4); }
.wryhn-login-card .check-row { min-height: var(--control-min); }
.wryhn-login-card .login-privacy { color: var(--color-text-muted); font-size: var(--text-xs); }
.login-companion-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-5); margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.login-companion-links a { display: inline-flex; align-items: center; min-height: var(--control-min); color: var(--color-text-muted); font-size: var(--text-xs); text-decoration: underline; text-underline-offset: .25em; }

@media (hover: hover) {
  .nav-button:hover, .header-settings:hover, .header-icon-button:hover { color: var(--color-text); background: var(--color-surface-elevated); }
  .media-card:hover .poster, .activity-card:hover, .source-launch-card:hover, .settings-tabs button:hover { border-color: var(--color-text-muted); }
  .media-card:hover strong { text-decoration: underline; text-underline-offset: .2em; }
}
@media (min-width: 1100px) { .auth-stage { grid-template-columns: minmax(0,540px) minmax(0,440px); justify-content: center; gap: clamp(60px,10vw,180px); } .auth-intro { display: block; } }
@media (min-width: 1200px) { .main-nav .nav-button svg { display: none; } }
@media (min-width: 701px) and (max-width: 1099px) {
  :root { --app-header-height: 108px; }
  .app-header { display: grid; grid-template-columns: 1fr auto; grid-template-rows: minmax(56px,auto) minmax(52px,auto); gap: 0; }
  .brand-button { grid-row: 1; grid-column: 1; }
  .header-actions { grid-row: 1; grid-column: 2; }
  .main-nav { grid-row: 2; grid-column: 1/-1; justify-content: center; border-top: 1px solid var(--color-border); }
  .nav-button { flex: 1; }
  .source-launcher { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-companion-card { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 700px) {
  :root { --app-header-height: 56px; --page-gutter: 16px; --poster-width: 116px; --landscape-width: 232px; }
  #app { --control-min: 48px; }
  .app-header { gap: var(--chrome-gap); min-height: var(--app-header-height); padding-inline: max(var(--chrome-inset),env(safe-area-inset-left)); }
  .brand-button { gap: var(--chrome-gap); }
  .brand-mark { width: 30px; height: 30px; }
  .brand-wordmark strong { font-size: var(--text-base); }
  .brand-wordmark small { font-size: .5rem; }
  .connection-status { display: none; }
  .header-actions { gap: 0; }
  .header-icon-button, .header-settings { padding: var(--chrome-gap); }
  .main-nav { position: fixed; z-index: var(--layer-header); inset: auto 0 0; display: flex; justify-content: space-evenly; gap: 0; min-height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)); padding: var(--chrome-gap) max(4px,env(safe-area-inset-right)) calc(var(--chrome-gap) + env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left)); border-top: 1px solid var(--color-border); background: var(--color-background); }
  .main-nav .nav-button { flex: 1; flex-direction: column; gap: var(--space-1); min-width: 0; min-height: 48px; padding: var(--space-1); font-size: .625rem; line-height: 1.2; white-space: normal; }
  .nav-button span { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
  #media-browser { padding-top: 0; padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)); }
  .app-view { padding-block: var(--space-5) var(--space-6); }
  .view-heading { gap: var(--space-2); margin-bottom: var(--space-4); }
  .view-heading h1 { font-size: 1.5rem; margin-bottom: 0; }
  .source-page-heading { flex-direction: row; align-items: center; padding-bottom: 0; }
  .source-page-heading > div:first-child { flex: 1; }
  .source-page-heading .muted { display: none; }
  .source-page-heading .source-settings-button { padding-inline: var(--space-3); font-size: var(--text-xs); }
  .source-heading-actions { width: auto; flex-wrap: nowrap; gap: var(--space-1); flex-shrink: 0; }
  .source-heading-actions .source-settings-button { width: 48px; font-size: 0; padding: 0; }
  .source-refresh-button { width: 48px; padding: 0; }
  .source-refresh-button span { display: none; }
  .source-heading-actions > .primary { padding-inline: var(--space-3); font-size: var(--text-xs); }
  #view-home { gap: var(--space-5); }
  .home-dashboard-header h1 { min-height: 1.3em; font-size: 1.125rem; }
  .home-dashboard-header .eyebrow { font-size: .625rem; }
  .home-feature { --feature-height: 300px; }
  .home-hero { background-position: 65% center; }
  .home-hero .hero-shade { background: linear-gradient(0deg,rgba(11,12,15,.98),rgba(11,12,15,.7) 55%,rgba(11,12,15,.18)); }
  .hero-copy { width: 100%; padding: var(--space-5); }
  .hero-copy h2 { font-size: clamp(1.625rem,7vw,2rem); }
  .hero-copy #hero-overview { -webkit-line-clamp: 2; }
  #home-activity .activity-heading { min-height: 0; align-items: flex-start; }
  .activity-filters { flex-wrap: nowrap; width: 100%; overflow-x: auto; }
  .activity-filters button { flex-shrink: 0; }
  .activity-cards { --activity-width: var(--landscape-width); }
  .source-launcher { grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-3); }
  .source-launch-card { grid-template-columns: 28px minmax(0,1fr); gap: var(--space-2); padding: var(--space-3); min-height: 72px; }
  .source-launch-card > span { grid-row: auto; width: 28px; height: 28px; }
  .source-launch-card strong { align-self: center; font-size: var(--text-xs); }
  .source-launch-card small { grid-column: 1/-1; display: block; font-size: .6875rem; }
  .home-companion-card { flex-direction: column; align-items: stretch; padding: var(--space-5); }
  .home-companion-card > div:last-child { display: grid; }
  .poster-grid { grid-template-columns: repeat(auto-fill,minmax(100px,1fr)); gap: var(--space-4) var(--space-3); }
  .media-cards { gap: var(--space-3); }
  .emby-page-tabs, .youtube-page-tabs, .live-page-tabs, .games-tabs { width: 100%; }
  .emby-page-tabs button, .youtube-page-tabs button, .live-page-tabs button, .games-tabs button { padding-inline: var(--space-1); min-width: 48px; }
  .settings-tabs { grid-template-columns: minmax(0,1fr); gap: var(--space-3); }
  .settings-tabs button { min-height: 76px; padding: var(--space-4) var(--space-8) var(--space-4) var(--space-4); }
  .settings-detail .settings-layout { display: block; }
  .settings-detail .settings-tabs { display: none; }
  .auth-stage { padding: var(--space-6) var(--space-4); min-height: 100dvh; }
  .wryhn-login-card { padding: var(--space-6); }
}
@media (pointer: coarse) { #app { --control-min: 48px; } }
@media (max-width: 359px) { .source-heading-actions { width: 100%; } }
@media (max-width: 359px) { .brand-wordmark { display: none; } .source-page-heading .source-settings-button { padding-inline: var(--space-2); } }
