:root {
  color-scheme: light;
  --bg: #f6f7fb; --surface: #fff; --surface-2: #f0f2f7; --text: #1d2333;
  --muted: #747d90; --line: #e8ebf2; --accent: #6254e8; --accent-soft: #eeecff;
  --success: #1b9e79; --danger: #d84662;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px); --safe-right: env(safe-area-inset-right, 0px);
}
/* SwiftUI already places the native web view inside the iPhone's safe areas. */
:root.native-ios { --safe-top: 0px; --safe-bottom: 0px; --safe-left: 0px; --safe-right: 0px; }
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.4; }
button, input, select { font: inherit; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #b8b0ff; outline-offset: 3px; }
button, a { transition: background .18s ease, color .18s ease, transform .18s ease; }
button:active, .primary-button:active { transform: scale(.96); }
input, select { min-width: 0; font-size: 16px; }
svg { display: block; width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); padding: 28px 16px 24px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 34px; font-size: 19px; font-weight: 750; letter-spacing: -.5px; }
.brand small { display: block; margin-top: 4px; font-size: 8px; letter-spacing: 1px; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 12px; background: var(--accent); color: white; }
.brand-mark svg { width: 21px; height: 21px; }
.side-nav { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 12px; border-radius: 13px; color: var(--muted); background: transparent; text-align: left; }
.nav-item span { flex: 1; font-size: 14px; font-weight: 650; }
.nav-item b { padding: 3px 7px; border-radius: 8px; background: var(--surface-2); font-size: 11px; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.side-footer { margin-top: auto; }
.privacy-note { padding: 14px 8px; display: flex; gap: 8px; color: var(--muted); font-size: 11px; }
.privacy-note svg { width: 16px; height: 16px; color: var(--success); }
.main-content { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: calc(14px + var(--safe-top)) 28px 14px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.mobile-brand { display: none; }
.search-box { order: -1; flex: 1; min-width: 0; max-width: 650px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border: 1px solid transparent; border-radius: 14px; background: var(--surface-2); color: #8b94a7; }
.search-box:focus-within { border-color: #b6aefa; background: #f6f5ff; }
.search-box input { flex: 1; width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-box input::placeholder { color: #818a9e; }
.search-box svg { width: 20px; height: 20px; }
.search-box kbd { border-radius: 5px; font: inherit; font-size: 11px; white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.loading svg { animation: refreshSpin 1s linear infinite; }
@keyframes refreshSpin { to { transform: rotate(360deg); } }
.icon-button, .plain-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; padding: 0; border-radius: 14px; background: var(--surface-2); color: #5b6579; }
.primary-button, .secondary-button, .file-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; min-width: 0; padding: 10px 16px; border-radius: 14px; font-size: 14px; font-weight: 650; text-decoration: none; text-align: center; cursor: pointer; }
.primary-button { background: var(--accent); color: white; }
.secondary-button, .file-button { background: var(--surface-2); color: #505970; }
.primary-button svg, .secondary-button svg, .file-button svg { width: 19px; height: 19px; }
.content { width: min(1180px,100%); margin: 0 auto; padding: 32px 28px 56px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 22px; }
.hero > div { min-width: 0; }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: 1.7px; font-weight: 750; }
.hero h1 { margin: 4px 0 5px; font-size: 38px; line-height: 1.15; letter-spacing: -1.4px; font-weight: 750; }
.hero p { margin: 0; font-size: 14px; color: var(--muted); }
.hero-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.hero-stats > span, .hero-stats button { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hero-stats strong { font-weight: 650; color: #535d74; }
.hero-stats button { min-height: 36px; padding: 0; color: inherit; background: transparent; font-size: inherit; }
.hero-stats button svg { width: 12px; height: 12px; }
.hero-stats .stat-divider { width: 1px; height: 12px; background: #d8dce6; }
.live-dot { width: 6px; height: 6px; margin-right: 2px; border-radius: 50%; background: var(--success); flex: 0 0 auto; }
.library-toolbar { display: flex; gap: 10px; padding: 0 0 17px; }
.filter-button { min-height: 44px; min-width: 0; padding: 9px 13px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: #566077; font-weight: 600; font-size: 13px; }
.filter-button > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.filter-button svg { width: 18px; height: 18px; color: var(--accent); }
.filter-button b { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; background: var(--accent); color: white; border-radius: 6px; font-size: 10px; }
.sort-control { position: relative; display: block; min-width: 0; }
.sort-control select { width: 100%; height: 44px; padding: 0 32px 0 12px; -webkit-appearance: none; appearance: none; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: #566077; font-size: 16px; }
.sort-control > svg { position: absolute; right: 10px; top: 15px; width: 14px; height: 14px; transform: rotate(90deg); pointer-events: none; color: var(--muted); }
.status-line { min-height: 28px; color: var(--muted); font-size: 12px; padding: 0 1px 9px; }
.app-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.app-card { min-width: 0; border: 1px solid var(--line); background: var(--surface); padding: 16px; border-radius: 20px; box-shadow: 0 3px 12px rgba(29,35,51,.025); cursor: pointer; }
.card-top { display: grid; grid-template-columns: 60px minmax(0,1fr) 44px; align-items: center; gap: 12px; }
.app-icon { display: grid; place-items: center; width: 60px; height: 60px; flex: 0 0 auto; border-radius: 15px; overflow: hidden; background: var(--accent-soft); color: var(--accent); font-size: 25px; font-weight: 700; }
.app-icon img, .detail-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card-copy { min-width: 0; }
.app-card h2 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; letter-spacing: -.35px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.developer { margin: 3px 0 0; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.source-label { display: block; margin-top: 5px; color: #7265ab; font-size: 10px; line-height: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.source-label svg { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.favorite-button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: transparent; color: #a2a9b9; justify-self: end; align-self: start; }
.favorite-button svg { width: 22px; height: 22px; }
.favorite-button.active { color: var(--accent); }
.favorite-button.active svg { fill: currentColor; stroke-width: 1.4; }
.card-badges { display: flex; align-items: center; gap: 9px; margin: 13px 0 11px; font-size: 11px; }
.version-chip { max-width: 55%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: #f1efff; color: #7163ce; padding: 3px 7px; border-radius: 6px; font-weight: 600; }
.release { color: var(--muted); margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-footer { border-top: 1px solid #eff1f6; padding-top: 7px; display: flex; align-items: center; gap: 10px; }
.version-summary { min-width: 0; flex: 1; }
.version-summary strong, .version-summary span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.version-summary strong { font-size: 11px; font-weight: 600; color: #647087; }
.version-summary span { margin-top: 2px; color: #8b94a5; font-size: 10px; }
.open-button { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: 12px; background: #f1efff; color: var(--accent); font-size: 12px; font-weight: 700; }
.open-button svg { width: 13px; height: 13px; }
.empty-state { padding: 44px 24px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.empty-state > span { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 18px; color: var(--accent); background: var(--accent-soft); }
.empty-state h2 { margin: 0; font-size: 20px; }
.empty-state p { color: var(--muted); font-size: 14px; }
.load-more { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 24px; }
.load-more span { font-size: 12px; color: var(--muted); }
.bottom-nav { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(27,30,46,.36); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.sheet { width: min(660px,100%); min-width: 0; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 26px; box-shadow: 0 20px 70px #19213c30; animation: sheetIn .24s cubic-bezier(.2,.8,.2,1); }
@keyframes sheetIn { from { transform: translateY(24px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.sheet-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 18px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.sheet-header > div { min-width: 0; }
.sheet-header h2 { margin: 4px 0 0; font-size: 22px; line-height: 1.25; letter-spacing: -.6px; }
.sheet-kicker { display: block; color: var(--accent); font-size: 10px; font-weight: 650; letter-spacing: .7px; overflow-wrap: anywhere; }
.source-form { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.source-form > label:first-child { display: block; margin-bottom: 9px; font-weight: 650; font-size: 14px; }
.source-input-row { display: flex; gap: 8px; }
.source-input-row input { flex: 1; width: 100%; min-width: 0; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); color: var(--text); }
.source-type-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.source-type-hints span { background: var(--accent-soft); color: #7a6bbf; padding: 4px 8px; border-radius: 6px; font-size: 10px; }
.field-help { margin: 10px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.github-option { position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px; margin: 12px 0; border-radius: 13px; background: var(--bg); cursor: pointer; }
.github-option input { position: absolute; opacity: 0; }
.check-box { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; background: white; border: 1px solid #d8dbe6; border-radius: 7px; color: transparent; }
.check-box svg { width: 16px; height: 16px; }
.github-option input:checked + .check-box { background: var(--accent); border-color: var(--accent); color: white; }
.github-option input:focus-visible + .check-box { outline: 3px solid #b8b0ff; outline-offset: 2px; }
.github-option strong, .github-option small { display: block; }
.github-option strong { font-size: 12px; font-weight: 600; }
.github-option small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.file-button { width: 100%; border: 1px dashed #d8dce8; background: white; font-size: 12px; }
.file-button input { display: none; }
.source-manager-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 22px 24px 4px; }
.source-manager-head strong, .source-manager-head small { display: block; }
.source-manager-head strong { font-size: 14px; }
.source-manager-head small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.source-manager-head > div:last-child { display: flex; flex: 0 0 auto; gap: 5px; }
.source-manager-head button { min-height: 44px; padding: 8px 10px; font-size: 11px; border-radius: 11px; color: #666c84; background: var(--bg); }
.source-list, .recommendations { padding: 0 24px 20px; }
.source-row { display: grid; grid-template-columns: 10px minmax(0,1fr) 44px 50px 44px; gap: 8px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.source-copy { min-width: 0; flex: 1; }
.source-copy strong, .source-copy small { display: block; }
.source-copy strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.source-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.source-row .source-state { grid-column: 1; grid-row: 1; }
.source-row .source-copy { grid-column: 2 / -1; grid-row: 1; }
.source-row .source-pre-toggle { grid-column: 3; grid-row: 2; }
.source-row .source-toggle { grid-column: 4; grid-row: 2; }
.source-row .source-delete { grid-column: 5; grid-row: 2; }
.source-row.is-inactive .source-copy { opacity: .6; }
.source-state { width: 7px; height: 7px; flex: 0 0 auto; background: var(--success); border-radius: 50%; }
.source-state.error { background: var(--danger); }
.source-state.paused { background: #a4abba; }
.source-state.github { background: #54596d; }
.source-toggle { position: relative; width: 50px; height: 44px; padding: 0; background: transparent; }
.source-toggle::before { content: ""; position: absolute; top: 8px; left: 3px; width: 44px; height: 28px; border-radius: 20px; background: #dce0e9; transition: background .2s; }
.source-toggle span { position: absolute; top: 11px; left: 6px; display: block; width: 22px; height: 22px; border-radius: 50%; background: white; box-shadow: 0 1px 4px #17244420; transition: transform .2s; }
.source-toggle.active::before { background: var(--accent); }
.source-toggle.active span { transform: translateX(16px); }
.source-pre-toggle { min-width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: #818799; font-size: 10px; font-weight: 700; }
.source-pre-toggle.active { background: #fff2db; color: #a4670b; }
.source-delete { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--danger); background: #fff1f4; }
.source-delete svg { width: 18px; height: 18px; }
.recommendations h3 { font-size: 14px; margin: 14px 0 8px; }
.recommendation-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.recommendation-row .secondary-button { min-height: 44px; padding: 8px 12px; font-size: 11px; flex: 0 0 auto; }
.detail-sheet { width: min(760px,100%); position: relative; }
.detail-close { position: absolute; right: 16px; top: 16px; z-index: 3; }
.detail-hero { padding: 32px 24px 22px; display: grid; grid-template-columns: 80px minmax(0,1fr); align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.detail-icon { width: 80px; height: 80px; border-radius: 21px; overflow: hidden; display: grid; place-items: center; font-size: 32px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.detail-title { min-width: 0; padding-right: 40px; }
.detail-title .sheet-kicker { font-size: 9px; line-height: 1.5; letter-spacing: 0; }
.detail-title h2 { margin: 5px 0; font-size: 24px; letter-spacing: -.65px; line-height: 1.2; overflow-wrap: anywhere; }
.detail-title p { margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.detail-body { padding: 24px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 22px; }
.about-box, .download-box { min-width: 0; }
.about-box h3, .download-box h3 { margin: 0 0 13px; font-size: 15px; }
.about-box p { margin: 0; font-size: 13px; line-height: 1.7; color: #727c90; overflow-wrap: anywhere; }
.download-box { padding: 17px; background: var(--bg); border-radius: 18px; }
.version-select { display: block; width: 100%; min-width: 0; max-width: 100%; height: 48px; border: 1px solid #e0e3ed; border-radius: 12px; padding: 0 8px; background: white; color: var(--text); }
.version-details { display: grid; gap: 12px; margin: 18px 0; font-size: 12px; }
.version-details > span { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 12px; color: var(--muted); }
.version-details b { color: #515d74; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.download-actions { display: grid; gap: 8px; }
.download-actions > * { width: 100%; }
.safe-note { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.5; color: var(--muted); margin: 14px 0 0; }
.safe-note svg { width: 15px; height: 15px; color: var(--accent); margin-top: 1px; }
.mini-sheet { width: min(460px,100%); }
.date-filter-body { padding: 20px 24px 24px; }
.date-filter-body > .field-help { margin-top: 0; }
.date-presets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.date-presets button { min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: #626b80; font-size: 12px; }
.date-presets button:first-child { grid-column: 1 / -1; }
.date-presets button.active { color: var(--accent); background: var(--accent-soft); border-color: #cbc4ff; }
.date-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 20px; }
.date-fields label { display: grid; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; }
.date-fields input { display: block; -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; height: 48px; padding: 0 8px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--text); }
.date-filter-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 20px; }
.date-filter-actions button { font-size: 12px; padding: 10px 8px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 150; display: flex; align-items: center; gap: 10px; width: min(380px,calc(100% - 32px)); padding: 14px; background: #272d41; color: white; border-radius: 17px; box-shadow: 0 10px 35px #202a4424; opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; color: #b6adff; }
.toast > div { min-width: 0; }
.toast strong { font-size: 12px; }
.toast p { font-size: 11px; line-height: 1.45; color: #c3c9da; margin: 3px 0 0; overflow-wrap: anywhere; }
@media (min-width: 1450px) { .app-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 1100px) { .hero { display: block; } .hero-stats { margin-top: 10px; } }
@media (max-width: 760px) {
  .app-shell { display: block; } .sidebar { display: none; }
  .topbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: calc(7px + var(--safe-top)) calc(20px + var(--safe-right)) 14px calc(20px + var(--safe-left)); }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 750; letter-spacing: -.6px; min-width: 0; }
  .mobile-brand .brand-mark { width: 30px; height: 30px; border-radius: 10px; } .mobile-brand svg { width: 18px; height: 18px; }
  .top-actions { gap: 7px; }
  .top-actions .primary-button { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 14px; }
  .top-actions .primary-button svg { width: 23px; height: 23px; } .top-actions .primary-button span { display: none; }
  .search-box { grid-column: 1 / -1; order: 0; width: 100%; height: 46px; border-radius: 13px; max-width: none; } .search-box kbd { display: none; }
  .content { padding: 23px calc(20px + var(--safe-right)) calc(92px + var(--safe-bottom)) calc(20px + var(--safe-left)); }
  .hero { display: block; padding-bottom: 14px; } .hero h1 { font-size: 34px; letter-spacing: -1.1px; margin: 0; } .hero p { font-size: 13px; line-height: 1.55; }
  .hero-stats { margin-top: 4px; font-size: 12px; } .hero-stats button { min-height: 44px; }
  .library-toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; padding-bottom: 18px; }
  .filter-button { width: 100%; padding-left: 11px; padding-right: 9px; font-size: 14px; gap: 6px; } .filter-button b { margin-left: auto; }
  .sort-control select { font-size: 16px; padding-left: 10px; }
  .app-grid { grid-template-columns: minmax(0,1fr); gap: 12px; } .app-card { padding: 15px; border-radius: 19px; } .load-more { flex-direction: column; }
  .bottom-nav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(68px + var(--safe-bottom)); padding: 3px calc(12px + var(--safe-right)) var(--safe-bottom) calc(12px + var(--safe-left)); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: center; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .mobile-nav { min-width: 0; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 6px 0; color: #929aad; background: transparent; font-size: 10px; font-weight: 600; }
  .mobile-nav svg { width: 23px; height: 23px; stroke-width: 1.8; } .mobile-nav.active { color: var(--accent); } .mobile-nav.active svg { stroke-width: 2.2; }
  .modal-backdrop { padding: calc(12px + var(--safe-top)) 0 0; align-items: end; }
  .sheet { width: 100%; max-height: calc(100vh - 12px - var(--safe-top)); max-height: calc(100dvh - 12px - var(--safe-top)); padding-bottom: var(--safe-bottom); border-radius: 24px 24px 0 0; }
  .sheet-header { padding: 20px 20px 16px; border-radius: 24px 24px 0 0; } .sheet-header h2 { font-size: 21px; }
  .source-form { padding: 18px 20px; } .source-input-row { display: grid; grid-template-columns: minmax(0,1fr); }
  .source-manager-head { padding: 20px 20px 4px; flex-wrap: wrap; } .source-list, .recommendations { padding-left: 20px; padding-right: 20px; }
  .detail-hero { padding: 27px 20px 22px; grid-template-columns: 68px minmax(0,1fr); gap: 12px; }
  .detail-icon { width: 68px; height: 68px; border-radius: 18px; font-size: 29px; } .detail-title { padding-right: 35px; } .detail-title h2 { font-size: 22px; }
  .detail-body { padding: 20px; grid-template-columns: minmax(0,1fr); } .download-box { order: -1; } .date-filter-body { padding: 18px 20px 24px; }
  .toast { right: 16px; bottom: calc(80px + var(--safe-bottom)); }
}
@media (max-width: 374px) {
  .topbar { padding-left: 14px; padding-right: 14px; } .content { padding-left: 14px; padding-right: 14px; }
  .card-top { grid-template-columns: 52px minmax(0,1fr) 44px; gap: 9px; } .app-icon { width: 52px; height: 52px; border-radius: 14px; }
  .app-card { padding: 13px; } .app-card h2 { font-size: 15px; }
  .sort-control select { padding-left: 8px; padding-right: 24px; font-size: 16px; } .filter-button { padding-left: 8px; gap: 4px; font-size: 13px; }
  .source-manager-head { flex-direction: column; align-items: stretch; }
}
@media (hover: hover) {
  .app-card:hover { border-color: #ccc6fa; } .icon-button:hover, .secondary-button:hover { background: #e8eaf3; }
  .primary-button:hover { background: #5143d7; } .favorite-button:hover { color: var(--accent); background: var(--accent-soft); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
