/* TunePort — the same visual language, from the first visit to the last track. */
:root {
  --bg: #0c0e0d;
  --surface: #141714;
  --surface-2: #1e221d;
  --text: #f1f2e9;
  --muted: #a0a79d;
  --accent: #dbfb60;
  --accent-text: #161b0b;
  --line: rgba(225, 237, 212, .12);
  --nav-height: 74px;
  --rail-width: 88px;
}
html { scroll-behavior: smooth; scrollbar-color: #40463c var(--bg); }
body { min-width: 280px; background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
::selection { color: var(--accent-text); background: var(--accent); }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 5px; }
button, a { touch-action: manipulation; }
button { transition: background .18s, border-color .18s, color .18s, transform .18s; }
button:disabled { cursor: default; }
.ui-icon { display: inline-block; width: 24px; height: 24px; flex: 0 0 auto; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* A connection failure is a state with a way forward, not an empty application. */
.boot-state { position: fixed; z-index: 50; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); box-sizing: border-box; width: min(380px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow: auto; display: block; padding: 16px 18px; text-align: left; border: 1px solid #46523b; border-radius: 18px; background: #181e17; color: var(--text); box-shadow: 0 12px 48px #0008; }
.boot-brand, .boot-state > .eyebrow { display: none; }
.boot-state h1, .boot-state h2 { margin: 0; font-size: 16px; line-height: 1.35; letter-spacing: -.02em; }
.boot-state p { margin: 6px 0 0; max-width: none; color: #c0c9b9; font-size: 13px; line-height: 1.45; }
.boot-state button, #boot-retry { min-height: 44px; margin-top: 12px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 13px; font-weight: 700; }
.boot-state a { color: var(--text); text-underline-offset: 5px; }
.boot-help { display: none; }
.connection-status { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; margin-bottom: 20px; background: #24271b; border: 1px solid #545b35; border-radius: 12px; color: #e1e8c8; font-size: 13px; }
.connection-status button { flex-shrink: 0; padding: 8px 12px; border: 1px solid #6b7350; border-radius: 8px; background: transparent; font-weight: 650; }

.app-shell { max-width: 1340px; padding: calc(28px + var(--tg-content-safe-area-inset-top, 0px)) 36px calc(40px + var(--tg-content-safe-area-inset-bottom, 0px)); }
body.has-active-player .app-shell { padding-bottom: calc(145px + var(--tg-content-safe-area-inset-bottom, 0px)); }
.topbar { padding-bottom: 23px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 44px; height: 44px; box-shadow: none; }
.brand-mark .ui-icon { width: 28px; height: 28px; }
.eyebrow, .section-kicker { font-size: 10px; font-weight: 650; letter-spacing: .15em; }
.topbar .eyebrow { color: var(--muted); font-size: 9px; letter-spacing: .2em; margin-bottom: 3px; }
.topbar h1 { font-size: 21px; font-weight: 650; letter-spacing: -.04em; }
.topbar-search, .avatar { width: 44px; height: 44px; }
.topbar-search { display: grid; place-items: center; background: transparent; }
.avatar { background: #e1e6d4; font-weight: 700; }
.topbar-actions { gap: 10px; }
.brand-lockup, .brand-lockup > div { min-width: 0; }
.topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { flex-shrink: 0; }
.search { border-radius: 14px; min-height: 60px; background: #171a16; backdrop-filter: none; padding: 8px 9px 8px 20px; }
.search:focus-within { border-color: #7b8b49; box-shadow: 0 0 0 3px #dbfb6009; }
.search input { font-size: 15px; padding: 5px 0; }
.search input::placeholder { color: #939b8e; }
.search button { min-height: 42px; border-radius: 9px; padding-inline: 24px; font-weight: 700; }
.search > span { display: grid; place-items: center; }
.hero { min-height: 316px; margin: 24px 0 32px; padding: 36px 38px; grid-template-columns: minmax(0, 1.1fr) minmax(210px, .8fr); border: 1px solid #3a4234; border-radius: 20px; background: #141b13; color: #f1f2e9; box-shadow: inset 0 1px 0 #edf9da0a, 0 15px 40px #0002; }
.hero::before { background: linear-gradient(90deg, #141b13 15%, #141b13c9 48%, #141b1375), url('/art/nocturne.webp') center right / 65% auto no-repeat; opacity: .72; }
.hero-copy::before { display: none; }
.hero-kicker { color: #bfcead; font-size: 9px; font-weight: 650; letter-spacing: .19em; margin-bottom: 17px; }
.hero h2 { max-width: 540px; margin-bottom: 16px; font-size: clamp(32px, 3.4vw, 48px); font-weight: 600; line-height: 1.06; letter-spacing: -.055em; }
.hero h2 em { color: #dbfb60; -webkit-text-stroke: 0; font-style: normal; }
.hero-copy > p:not(.hero-kicker) { max-width: 370px; color: #bdc8b3; font-size: 14px; text-shadow: none; margin-bottom: 21px; }
.hero-action { display: inline-flex; align-items: center; gap: 18px; margin-top: 0; min-height: 44px; padding: 10px 19px; border-radius: 9px; background: #dbfb60; color: #161b0b; box-shadow: 0 4px 20px #dbfb6010; font-size: 13px; font-weight: 650; }
.hero-action:hover { background: #eaff9a; transform: translateY(-2px); }
.hero-action span { margin-left: 0; }
.hero-visual { position: relative; min-height: 235px; width: 100%; height: 100%; filter: none; perspective: 800px; }
.hero-visual .glow { display: none; }
.hero-visual::before { content: ''; position: absolute; z-index: 2; width: 228px; height: 228px; left: 44%; top: 47%; transform: translate(-50%, -50%) rotate(-9deg); border: 1px solid #ffffff26; border-radius: 13px; background: url('/art/nocturne.webp') center / cover, #252d23; box-shadow: 0 22px 40px #0008, inset 0 1px 0 #fff3; }
.hero-visual::after { content: ''; position: absolute; z-index: 1; width: 177px; height: 177px; left: 80%; top: 59%; transform: translate(-50%, -50%) rotate(13deg); border: 1px solid #ffffff30; border-radius: 12px; background: url('/art/daylight.webp') center / cover, #747b5b; box-shadow: 0 16px 35px #0006; }
.app-disc { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; left: 72%; top: 78%; z-index: 3; transform: translate(-50%,-50%) rotate(9deg); border-radius: 50%; background: #dbfb60; color: #1c240d; box-shadow: 0 8px 20px #0005; }
.app-disc .ui-icon { width: 23px; height: 23px; }
.app-orbit { position: absolute; left: 53%; top: 50%; width: 330px; height: 170px; transform: translate(-50%,-50%) rotate(-25deg); border: 1px solid #a5b49136; border-radius: 50%; }
.hero-wave { display: none; }
.hero-note { top: 50%; left: 50%; right: auto; z-index: 3; margin: 0; color: #263716; font-size: 18px; transform: translate(-50%, -50%); }
.section-title { align-items: center; gap: 16px; margin: 30px 0 16px; }
.section-title h2 { font-size: 24px; font-weight: 600; letter-spacing: -.04em; }
.section-title .section-kicker { color: var(--muted); margin-bottom: 6px; font-size: 9px; }
.section-title button { min-height: 40px; padding: 6px 0 6px 10px; font-weight: 550; font-size: 12px; white-space: nowrap; }
.quick-grid { gap: 12px; }
.quick-card { min-height: 90px; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 13px; padding: 18px; border-radius: 14px; background: #141714; }
.quick-card::after { display: none; }
.quick-icon { width: 44px; height: 44px; border-radius: 12px; background: #27301a; color: var(--accent); }
.quick-card.download .quick-icon { background: #202c2b; color: #b5d6ce; }
.quick-card.cinema .quick-icon { background: #2d2935; color: #d5c8e4; }
.quick-card strong { font-size: 14px; font-weight: 600; }
.quick-card small { margin-top: 3px; font-size: 11px; line-height: 1.4; }
.quick-card b { color: #87907d; font-weight: 400; }
.quick-arrow { width: 17px; height: 17px; color: #87907d; }
.quick-card:hover { border-color: #64724a; background: #1b2017; transform: translateY(-2px); }
.mood-title { margin-top: 32px; }
.mood-row { gap: 14px; grid-auto-columns: minmax(150px, 1fr); padding-bottom: 6px; }
.mood-card { justify-content: flex-end; min-height: 228px; padding: 21px; border: 1px solid #edf4de20; border-radius: 14px; isolation: isolate; color: #fffdf3; background-color: #263027; background-size: cover; background-position: center; transition: transform .25s, border-color .25s; }
.mood-card:hover { transform: translateY(-3px); border-color: #cedcad66; }
.mood-cyan { background-image: url('/art/nocturne.webp'); }
.mood-blue { background-image: url('/art/velocity.webp'); background-position: 60% center; }
.mood-orange { background-image: url('/art/daylight.webp'); background-position: 35% center; }
.mood-violet { background-image: url('/art/nocturne.webp'); background-position: 75% center; }
.mood-card strong { position: relative; z-index: 1; margin-top: auto; font-size: 17px; font-weight: 600; letter-spacing: -.035em; text-shadow: 0 2px 16px #0007; }
.mood-card small { position: relative; z-index: 1; margin-top: 5px; color: #f0f2e7; opacity: .78; font-size: 11px; }
.mood-shape { position: absolute; z-index: 1; display: grid; place-items: center; top: 15px; right: 15px; width: 33px; height: 33px; margin: 0; border: 1px solid #fff3; border-radius: 50%; background: #101a1755; color: #f2f7e6; opacity: 1; text-shadow: none; transform: none; backdrop-filter: blur(7px); }
.mood-shape .ui-icon { width: 18px; height: 18px; stroke-width: 1.4; }
.mood-card::after { content: ''; position: absolute; inset: 0; width: auto; height: auto; border: 0; border-radius: inherit; opacity: 1; box-shadow: none; background: linear-gradient(180deg, #070f0615 15%, #070f062b 38%, #070f06e0); z-index: 0; }
.track-list { gap: 0; }
.track { background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 12px 8px; border-radius: 8px; grid-template-columns: 48px minmax(0, 1fr) 44px; gap: 14px; }
.track:hover { transform: none; background: #171c14; }
.track-art { width: 48px; height: 48px; border-radius: 8px; background: #272e20; font-size: 20px; }
.track-info strong { font-weight: 550; font-size: 14px; }
.track-info small { margin-top: 4px; font-size: 12px; }
.searchable-track, .assignable-track { grid-template-columns: 48px minmax(0, 1fr) 44px 44px; }
.track-play { width: 40px; height: 40px; background: #d8e3c7; }
.track-save, .track-playlist { width: 40px; height: 40px; border-color: transparent; background: #1a2017; }
.track-save:hover, .track-playlist:hover { color: var(--accent); background: #2b361c; }
.empty-state { padding: 44px 24px; border: 1px dashed #394232; border-radius: 16px; margin-top: 16px; }
.empty-state > span { width: 50px; height: 50px; margin-bottom: 14px; border-radius: 14px; background: #202818; color: var(--accent); font-size: 23px; }
.empty-state h3 { font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.empty-state p { max-width: 430px; margin: 8px auto 0; font-size: 13px; }
.empty-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.empty-actions button { min-height: 44px; padding: 11px 17px; border: 1px solid #435135; border-radius: 10px; background: #202b17; color: #dce8cf; font-size: 13px; font-weight: 600; }
.empty-actions button:hover { border-color: #8ea65e; background: #2a391d; }
.empty-actions .empty-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.empty-actions .empty-primary:hover { background: #e9ff92; }
.editorial-grid > .empty-state { grid-column: 1 / -1; }
.search-results[aria-busy='true'] { min-height: 180px; }
.page-heading { margin: 32px 0; }
.page-heading h2 { margin: 12px 0; font-size: clamp(32px, 4vw, 48px); font-weight: 600; letter-spacing: -.055em; }
.page-heading p:last-child { font-size: 14px; }
.editorial-hero { padding: 34px; border-radius: 18px; border: 1px solid #435134; background: linear-gradient(90deg, #1b2417 12%, #1b2417ef 46%, #1b24175c), url('/art/daylight.webp') 95% 45% / 52% auto no-repeat, #1b2417; }
.editorial-hero h2 { font-size: clamp(34px, 5vw, 58px); font-weight: 600; line-height: 1; margin-top: 16px; }
.editorial-hero p:last-child { font-size: 14px; }
.editorial-hero::after { color: #f5ffd515; bottom: -15px; font-weight: 500; }
.editorial-grid { gap: 18px; }
.editorial-card { width: 100%; min-width: 0; aspect-ratio: 1.06; min-height: 238px; border: 1px solid #dcebc229; border-radius: 15px; padding: 24px; color: #fffdf4; background: #182018; isolation: isolate; }
.editorial-card[class*='tone-'] { background: #182018; }
.editorial-card::after { content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; background: linear-gradient(180deg, #090e1529, #090e1508 26%, #090e15ad 69%, #090e15ed); }
.editorial-cover { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.editorial-card:hover { filter: none; transform: translateY(-4px); border-color: #d7e4bd66; }
.editorial-card:hover .editorial-cover { transform: scale(1.045); }
.editorial-card strong { z-index: 1; max-width: 93%; font-size: 25px; font-weight: 600; line-height: 1.08; letter-spacing: -.045em; text-shadow: 0 2px 20px #0004; }
.editorial-card small { z-index: 1; font-size: 11px; font-weight: 500; opacity: .76; letter-spacing: .015em; }
.editorial-number { z-index: 1; top: 20px; left: 23px; color: #fffced; font-size: 10px; font-weight: 500; opacity: .9; }
.editorial-open { position: absolute; z-index: 1; top: 17px; right: 18px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #ffffff44; border-radius: 50%; background: #14191c33; color: #fcfff3; backdrop-filter: blur(8px); }
.editorial-open .ui-icon { width: 18px; height: 18px; }
.editorial-card.tone-3 .editorial-cover { object-position: 75% center; }
.editorial-card.tone-4 .editorial-cover { object-position: 30% center; }
.editorial-card.tone-5 .editorial-cover { object-position: 70% center; }
.chip { min-height: 42px; font-size: 13px; border-radius: 9px; padding: 9px 16px; }
.chip.active { background: #29351b; border-color: #586b32; }
.playlist-toolbar { background: #191f15; border-color: #3e4a31; border-radius: 14px; }
.playlist-toolbar h3 { font-weight: 600; }
.recognition-inline { border-radius: 16px; background: #151a13; padding: 24px; }
.recognition-copy h3 { font-size: 22px; font-weight: 600; }
.recognition-copy > p:last-child { font-size: 13px; }
.recognition-action { border-radius: 12px; background: #10150e; min-height: 128px; }
.recognition-action strong { font-size: 15px; font-weight: 600; }
.recognition-action small { font-size: 11px; }
.record-action { border-color: #596d32; background: #1e2913; }
.file-action > span { background: #c4cbd9; }
.platform-list span { background: #192017; border-color: #313a29; color: #bec7b3; }
.media-form { padding: 8px; border-radius: 14px; }
.media-form input { border-radius: 9px; }
.media-form button { border-radius: 9px; font-weight: 650; }
.legal-note { color: #a5ad9c; font-size: 12px; }
.movie-hero { min-height: 220px; padding: 32px; border-radius: 18px; background: #242730; }
.movie-hero h2 { font-size: clamp(34px, 5vw, 56px); font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.movie-hero p:last-child { color: #c1c3cb; font-size: 14px; max-width: 510px; }
.movie-hero > span { width: 74px; height: 74px; background: #c3c8de; color: #252b41; box-shadow: none; }
.movie-search { border-radius: 14px; }
.movie-search input, .movie-search select, .movie-query, .movie-search button { border-radius: 9px; }
.movie-card, .movie-featured, .movie-continue { border-radius: 13px; }
.movie-card-body h3 { font-weight: 600; }
.movie-open { min-height: 42px; border-radius: 8px; font-weight: 550; }
.torrent-lab { border-radius: 12px; opacity: .8; }
dialog { border-radius: 20px; background: #151912; box-shadow: 0 35px 100px #0009; }
dialog h2 { font-weight: 600; letter-spacing: -.045em; }
dialog button { min-height: 44px; }
.profile-admin { text-decoration: none; }
.chip, .track-play, .track-save, .track-playlist, .movie-open, .section-title button, .connection-status button { min-height: 44px; }
.track-play, .track-save, .track-playlist { width: 44px; height: 44px; }

/* Persistent navigation stays separate from playback. */
.bottom-nav { z-index: 12; background: #10140ff2; backdrop-filter: blur(18px); border-color: var(--line); }
.bottom-nav button { color: #a2ac97; gap: 7px; min-height: 48px; }
.bottom-nav button small { font-size: 11px; font-weight: 500; }
.bottom-nav button.active { color: var(--accent); background: #dbfb600d; }
.bottom-nav button span { display: grid; place-items: center; }
.bottom-nav .ui-icon { width: 23px; height: 23px; }
.nav-brand { color: var(--accent); }
.player { z-index: 11; display: grid; grid-template-columns: 48px minmax(80px, 1fr) minmax(100px, 1.1fr) auto; grid-template-rows: auto; gap: 18px; width: min(1000px, calc(100% - var(--rail-width) - 48px)); min-height: 88px; padding: 16px 22px; border: 1px solid #475538; border-radius: 15px; background: #1b2316f5; backdrop-filter: blur(24px); box-shadow: 0 16px 50px #0008; }
.player-art { grid-column: 1; grid-row: 1; border-radius: 9px; background: #c8d7a7; width: 48px; height: 48px; }
.player-info { grid-column: 2; grid-row: 1; }
.player-info strong { font-size: 13px; font-weight: 600; }
.player-info small { margin-top: 3px; font-size: 11px; }
.player-seek { grid-column: 3; grid-row: 1; }
.player-time { margin-top: 2px; }
.player-controls { grid-column: 4; grid-row: 1; grid-template-columns: repeat(5, 36px); gap: 2px; padding: 0; }
.player-controls button { width: 36px; height: 40px; font-size: 20px; color: #adb79f; }
.player-controls .player-button { width: 40px; height: 40px; font-size: 14px; }
.player-controls .player-button:hover:not(:disabled) { background: #ecff9b; color: var(--accent-text); }
.player-controls .player-mode.active { color: var(--accent); background: #dbfb6014; }
.player.cinema-compact { width: min(500px, calc(100% - var(--rail-width) - 48px)); }
.toast { background: #e5edda; color: #20251c; border: 1px solid #b5c89d; border-radius: 12px; font-size: 13px; font-weight: 550; box-shadow: 0 8px 30px #0005; bottom: 30px; }
body.has-active-player .toast { bottom: 125px; }

@media (min-width: 900px) {
  .bottom-nav { width: var(--rail-width); padding: 28px 10px; grid-template-columns: minmax(0,1fr); grid-template-rows: 74px repeat(6, 64px); align-content: start; gap: 5px; }
  .bottom-nav button { border-radius: 10px; }
  .nav-brand { font-size: 32px; }
  .nav-brand .ui-icon { width: 36px; height: 36px; }
  .nav-brand > span { display: none; }
  .player, .toast { margin-left: calc(var(--rail-width) / 2); }
  .player { bottom: 22px; }
}
@media (min-width: 1180px) {
  :root { --rail-width: 218px; }
  body { padding-left: var(--rail-width); }
  .bottom-nav { padding-inline: 17px; }
  .bottom-nav button { flex-direction: row; justify-content: flex-start; padding: 0 20px; gap: 15px; }
  .bottom-nav button small { font-size: 13px; }
  .nav-brand { display: flex; align-items: center; gap: 10px; padding-left: 15px; margin-bottom: 23px; }
  .nav-brand > span { display: block; color: var(--text); font-size: 23px; font-weight: 650; letter-spacing: -.06em; }
  .bottom-nav::after { content: 'ТВОЙ РИТМ. ТВОЁ ПРОСТРАНСТВО.'; position: absolute; left: 35px; right: 25px; bottom: 35px; font-size: 9px; color: #7e8d72; letter-spacing: .18em; line-height: 1.8; }
}
@media (max-width: 1100px) and (min-width: 900px) {
  .app-shell { padding-inline: 28px; }
  .quick-card { padding: 14px; grid-template-columns: 38px minmax(0,1fr); gap: 10px; }
  .quick-icon { width: 38px; height: 38px; }
  .quick-card b, .quick-arrow { display: none; }
}
@media (max-width: 899px) {
  :root { --rail-width: 0px; }
  body { padding-left: 0; }
  .app-shell { padding: calc(24px + var(--tg-content-safe-area-inset-top, 0px)) 24px calc(100px + env(safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)); }
  body.has-active-player .app-shell { padding-bottom: calc(218px + env(safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)); }
  .bottom-nav { height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)); padding: 6px 5px calc(6px + env(safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)); grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bottom-nav button { border-radius: 10px; gap: 4px; }
  .nav-brand { display: none; }
  .player { bottom: calc(82px + env(safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)); width: calc(100% - 24px); min-height: 108px; padding: 12px 15px 7px; grid-template-columns: 42px minmax(60px, 1fr) auto; grid-template-rows: 42px 28px; gap: 7px 12px; border-radius: 13px; margin-left: 0; }
  .player-art { width: 42px; height: 42px; }
  .player-seek { grid-column: 1 / -1; grid-row: 2; }
  .player-seek input { height: 12px; }
  .player-time { margin-top: -3px; font-size: 9px; }
  .player-controls { grid-column: 3; grid-row: 1; grid-template-columns: repeat(5, 32px); }
  .player-controls button { width: 32px; }
  .player-controls .player-button { width: 36px; height: 36px; }
  .player.cinema-compact { width: calc(100% - 24px); min-height: 0; grid-template-rows: auto; }
  .toast { margin-left: 0; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  body.has-active-player .toast { bottom: calc(207px + env(safe-area-inset-bottom, 0px)); }
  .hero { padding: 28px; grid-template-columns: minmax(0,1fr) 195px; min-height: 286px; }
  .hero h2 { font-size: 38px; }
  .hero-visual::before { width: 190px; height: 190px; }
  .hero-visual::after { width: 146px; height: 146px; }
  .quick-card { padding: 16px; }
}
@media (max-width: 720px) {
  .app-shell { padding-inline: 20px; }
  .topbar { padding-bottom: 17px; margin-bottom: 20px; }
  .topbar-search { display: none; }
  .hero { display: grid; min-height: 266px; padding: 26px; margin: 20px 0 25px; grid-template-columns: 1fr; }
  .hero h2 { font-size: 35px; max-width: 390px; }
  .hero-copy { max-width: 80%; }
  .hero-copy > p:not(.hero-kicker) { max-width: 290px; font-size: 13px; }
  .hero-visual { position: absolute; width: 235px; height: 230px; min-height: 0; inset: auto -35px -30px auto; z-index: 1; opacity: .65; mask-image: linear-gradient(90deg, transparent, #000 45%); }
  .hero-visual::before { width: 180px; height: 180px; }
  .hero-visual::after { width: 140px; height: 140px; border-width: 1px; }
  .hero-visual .app-disc { width: 36px; height: 36px; }
  .quick-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .quick-card { grid-template-columns: 1fr; align-content: start; align-items: start; gap: 13px; padding: 16px 13px; min-height: 155px; }
  .quick-card b, .quick-arrow { display: none; }
  .quick-card strong { font-size: 13px; }
  .quick-card small { font-size: 10px; }
  .quick-icon { width: 38px; height: 38px; border-radius: 10px; }
  .section-title h2 { font-size: 22px; }
  .section-title { margin-top: 25px; }
  .mood-row { grid-auto-columns: 150px; gap: 10px; }
  .mood-card { min-height: 178px; padding: 16px; }
  .editorial-hero, .movie-hero { padding: 26px; }
  .movie-hero { min-height: 210px; }
  .movie-hero > span { width: 52px; height: 52px; margin-left: 16px; }
  .recognition-inline { grid-template-columns: 1fr; padding: 20px; }
  .recognition-actions { grid-template-columns: 1fr 1fr; }
  .recognition-action { min-height: 122px; padding: 10px; text-align: center; }
  .editorial-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .editorial-card { min-height: 180px; padding: 18px; }
  .editorial-card strong { font-size: 20px; }
  .editorial-number { font-size: 9px; }
  .connection-status { align-items: flex-start; gap: 10px; padding: 13px; font-size: 12px; }
}
@media (max-width: 460px) {
  .app-shell { padding-inline: 16px; padding-top: calc(19px + var(--tg-content-safe-area-inset-top, 0px)); }
  .brand-lockup { gap: 10px; }
  .brand-mark { width: 38px; height: 38px; }
  .topbar h1 { font-size: 19px; }
  .avatar { width: 44px; height: 44px; }
  .search { min-height: 54px; padding-left: 14px; gap: 8px; border-radius: 12px; }
  .search input { font-size: 16px; }
  .search button { padding-inline: 14px; font-size: 13px; min-height: 44px; }
  .hero { min-height: 250px; padding: 24px 23px; border-radius: 14px; }
  .hero h2 { font-size: 31px; line-height: 1.06; }
  .hero-copy { max-width: 95%; }
  .hero-copy > p:not(.hero-kicker) { max-width: 225px; font-size: 12px; }
  .hero-kicker { font-size: 8px; }
  .hero-visual { inset: auto -65px -48px auto; opacity: .48; }
  .hero-action { min-height: 44px; padding: 10px 16px; font-size: 12px; }
  .quick-grid { gap: 8px; }
  .quick-card { padding: 14px 11px; border-radius: 12px; min-height: 150px; gap: 12px; }
  .quick-card strong { font-size: 13px; }
  .quick-card small { font-size: 11px; }
  .section-title h2 { font-size: 21px; }
  .section-title button { font-size: 11px; }
  .bottom-nav button small { font-size: 9px; }
  .bottom-nav .ui-icon { width: 21px; height: 21px; }
  .player { grid-template-columns: 36px minmax(45px, 1fr) auto; gap: 7px 8px; padding-inline: 11px; }
  .player-art { width: 36px; height: 36px; }
  .player-info strong { font-size: 11px; }
  .player-info small { font-size: 10px; }
  .player-controls { grid-template-columns: repeat(5, 27px); gap: 0; }
  .player-controls button { width: 27px; font-size: 18px; }
  .player-controls .player-button { width: 30px; height: 34px; font-size: 12px; }
  .player-seek input { height: 14px; }
  .editorial-card { min-height: 175px; padding: 15px; }
  .editorial-card strong { font-size: 18px; }
  .editorial-hero h2, .movie-hero h2 { font-size: 36px; }
  .movie-hero > span { display: none; }
  .track { gap: 10px; padding-inline: 0; grid-template-columns: 42px minmax(0,1fr) 44px; }
  .track-art { width: 42px; height: 42px; }
  .searchable-track, .assignable-track { grid-template-columns: 42px minmax(0,1fr) 44px 44px; gap: 8px; }
  .track-save, .track-playlist { width: 44px; }
  .track-info strong { font-size: 13px; }
  .track-info small { font-size: 11px; }
  .recognition-action strong { font-size: 13px; }
  .recognition-action small { font-size: 11px; }
  .empty-state { padding: 30px 18px; }
  .empty-state h3 { font-size: 19px; }
  .empty-actions { margin-top: 18px; gap: 9px; }
  .empty-actions button { font-size: 12px; padding-inline: 15px; }
  .section-title { align-items: flex-start; }
  .section-title h2 { overflow-wrap: anywhere; }
  .page-heading { margin-block: 25px; }
  .media-form input, .movie-search input, .movie-search select, dialog input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
