:root {
  color-scheme: light;
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --text: #151722;
  --muted: #6d7385;
  --line: #e3e6ef;
  --accent: #554cf3;
  --accent-2: #7b6cff;
  --accent-soft: #eeecff;
  --success: #1eae78;
  --danger: #ea5165;
  --shadow: 0 18px 50px rgba(31, 35, 63, .10);
  --radius: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { border: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(85, 76, 243, .25); outline-offset: 2px; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-defs { position: fixed; width: 0; height: 0; pointer-events: none; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 27px 18px 22px; background: rgba(255,255,255,.84); border-right: 1px solid var(--line); backdrop-filter: blur(24px); display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; padding: 5px 10px 30px; font-weight: 760; font-size: 19px; letter-spacing: -.4px; }
.brand small { display: block; color: var(--accent); font-size: 9px; letter-spacing: 1.25px; margin-top: 3px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: white; border-radius: 14px; background: linear-gradient(145deg, var(--accent-2), var(--accent)); box-shadow: 0 10px 22px rgba(85,76,243,.25); }
.brand-mark svg { width: 23px; height: 23px; }
.side-nav { display: grid; gap: 7px; }
.nav-item { height: 49px; padding: 0 14px; border-radius: 14px; background: transparent; color: #454a5b; display: flex; align-items: center; gap: 13px; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item svg { font-size: 18px; }
.nav-item span { flex: 1; font-weight: 590; }
.nav-item b { min-width: 24px; padding: 3px 7px; background: #eef0f6; color: #7c8190; border-radius: 99px; text-align: center; font-size: 11px; }
.nav-item:hover { background: #f2f3f8; transform: translateX(2px); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active b { background: rgba(85,76,243,.12); color: var(--accent); }
.side-footer { margin-top: auto; display: grid; gap: 14px; }
.privacy-note { padding: 13px; border-radius: 15px; background: #f5f7fb; color: var(--muted); display: flex; align-items: flex-start; gap: 9px; font-size: 11px; line-height: 1.45; }
.privacy-note svg { color: var(--success); flex: 0 0 auto; margin-top: 1px; }

.main-content { min-width: 0; }
.topbar { height: 82px; padding: 15px 28px; position: sticky; top: 0; z-index: 8; background: rgba(243,245,250,.78); backdrop-filter: blur(22px); display: flex; align-items: center; gap: 16px; border-bottom: 1px solid rgba(227,230,239,.75); }
.search-box { width: min(630px, 65%); height: 47px; background: rgba(255,255,255,.93); border: 1px solid var(--line); border-radius: 15px; display: flex; align-items: center; padding: 0 15px; gap: 11px; color: #858b9c; transition: .18s ease; }
.search-box:focus-within { border-color: rgba(85,76,243,.42); box-shadow: 0 0 0 4px rgba(85,76,243,.08); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.search-box input::placeholder { color: #8f94a5; }
.search-box kbd { padding: 3px 7px; border: 1px solid #e2e4eb; background: #f7f8fb; border-radius: 7px; font-size: 10px; color: #898e9d; }
.top-actions { margin-left: auto; display: flex; gap: 10px; }
.icon-button, .plain-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; cursor: pointer; color: #555b6c; background: var(--surface); border: 1px solid var(--line); transition: transform .17s ease, background .17s ease; }
.icon-button:hover { transform: translateY(-2px); background: #f9f9fd; }
.plain-icon { width: 36px; height: 36px; background: transparent; border: 0; }
.primary-button, .secondary-button, .file-button { min-height: 44px; padding: 0 17px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 680; text-decoration: none; transition: transform .17s ease, box-shadow .17s ease, opacity .17s ease; }
.primary-button { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 9px 22px rgba(85,76,243,.20); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 13px 27px rgba(85,76,243,.26); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.secondary-button, .file-button { color: #4c5263; background: #f4f5f9; border: 1px solid var(--line); }
.secondary-button:hover, .file-button:hover { background: #eceef5; }
.secondary-button.full { width: 100%; }

.content { width: min(1280px, 100%); margin: 0 auto; padding: 31px 30px 70px; }
.hero { min-height: 135px; border-radius: 26px; padding: 27px 30px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; background: radial-gradient(circle at 86% 15%, rgba(123,108,255,.20), transparent 31%), linear-gradient(135deg, #fff 15%, #f4f2ff 100%); border: 1px solid #e6e3fa; box-shadow: 0 15px 45px rgba(52,47,106,.07); }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; border: 38px solid rgba(85,76,243,.045); border-radius: 50%; right: -35px; top: -90px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 10px; letter-spacing: 1.35px; font-weight: 800; }
.hero h1 { margin: 8px 0 6px; font-size: clamp(30px, 4vw, 45px); letter-spacing: -1.55px; line-height: 1; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; }
.hero-stats { position: relative; z-index: 1; display: flex; gap: 12px; }
.hero-stats span { min-width: 90px; padding: 15px; border-radius: 17px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); color: var(--muted); font-size: 11px; text-align: center; backdrop-filter: blur(8px); }
.hero-stats strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 22px; }
.install-card { margin-top: 18px; padding: 14px 15px; border: 1px solid #dedcf9; border-radius: 18px; background: #f4f2ff; display: flex; align-items: center; gap: 13px; }
.install-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: white; }
.install-card div { flex: 1; min-width: 0; }
.install-card strong { font-size: 13px; }
.install-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.library-toolbar { min-height: 75px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.filter-button { min-height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.86); color: #555b6c; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 11px; font-weight: 680; transition: border-color .17s ease, box-shadow .17s ease, transform .17s ease; }
.filter-button:hover { transform: translateY(-1px); border-color: rgba(85,76,243,.34); box-shadow: 0 8px 22px rgba(39,43,66,.07); }
.filter-button svg { width: 17px; height: 17px; color: var(--accent); }
.filter-button b { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; background: var(--accent); color: white; font-size: 9px; }
.sort-control { display: flex; align-items: center; gap: 9px; color: #7c8292; font-size: 11px; white-space: nowrap; }
.sort-control select { height: 39px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: #4f5566; outline: none; }
.status-line { min-height: 23px; color: var(--muted); font-size: 12px; }

.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.app-card { min-width: 0; padding: 17px; border-radius: 21px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(39,43,66,.045); cursor: pointer; position: relative; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; animation: cardIn .38s both; }
.app-card:hover { transform: translateY(-4px); border-color: rgba(85,76,243,.32); box-shadow: 0 18px 40px rgba(39,43,66,.10); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card-top { display: grid; grid-template-columns: 64px minmax(0,1fr) 34px; align-items: start; gap: 13px; }
.app-icon { width: 64px; height: 64px; border-radius: 17px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, #f0efff, #e7e9f5); color: var(--accent); font-size: 25px; font-weight: 770; }
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.source-label { display: block; margin: 1px 0 5px; color: var(--accent); font-size: 9px; letter-spacing: .55px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 760; }
.app-card h2 { margin: 0; font-size: 17px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.25px; }
.developer { margin: 4px 0 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.favorite-button { width: 34px; height: 34px; display: grid; place-items: center; background: transparent; color: #9ca1b0; border-radius: 11px; cursor: pointer; }
.favorite-button:hover { background: #fff5e6; color: #ef9d27; }
.favorite-button.active { color: #ef9d27; }
.favorite-button.active svg { fill: currentColor; }
.card-badges { margin-top: 14px; padding: 8px 10px; display: flex; justify-content: space-between; gap: 9px; align-items: center; border-radius: 10px; background: #f7f7fb; }
.release-label { color: #8a8f9e; font-size: 9px; font-weight: 680; }
.release { color: #656b7c; font-size: 10px; font-weight: 680; }
.app-description { height: 48px; margin: 13px 0; color: #555c6d; font-size: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { border-top: 1px solid #eceef3; padding-top: 13px; display: flex; align-items: center; gap: 10px; }
.version-summary { flex: 1; min-width: 0; }
.version-summary strong, .version-summary span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.version-summary strong { font-size: 10px; color: #4f5668; }
.version-summary span { margin-top: 3px; font-size: 9px; color: #9297a5; }
.open-button { width: 40px; height: 40px; border-radius: 13px; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.open-button svg { width: 17px; }
.empty-state { padding: 60px 20px; text-align: center; border: 1px dashed #d8dbe6; border-radius: var(--radius); background: rgba(255,255,255,.5); }
.empty-state > span { width: 64px; height: 64px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 20px; background: var(--accent-soft); color: var(--accent); }
.empty-state h2 { margin: 0; }
.empty-state p { color: var(--muted); }
.load-more { padding: 24px 0 4px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.load-more span { color: var(--muted); font-size: 11px; }

.bottom-nav { display: none; }
.modal-backdrop { position: fixed; inset: 0; padding: 22px; background: rgba(20,22,32,.42); backdrop-filter: blur(9px); z-index: 100; display: grid; place-items: center; animation: fadeIn .18s both; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { width: min(720px, 100%); max-height: min(840px, calc(100vh - 44px)); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 28px; box-shadow: 0 30px 80px rgba(14,16,28,.28); animation: sheetIn .26s cubic-bezier(.2,.8,.2,1) both; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.sheet-header { padding: 23px 24px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.sheet-header h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.5px; }
.sheet-kicker { color: var(--accent); font-size: 9px; letter-spacing: 1.2px; font-weight: 800; }
.source-form { padding: 19px 24px; border-bottom: 1px solid var(--line); }
.source-form > label:first-child { display: block; margin-bottom: 8px; font-weight: 680; font-size: 12px; }
.source-input-row { display: flex; gap: 9px; }
.source-input-row input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; outline: none; }
.source-input-row input:focus { border-color: var(--accent); }
.source-type-hints { margin-top: 8px; display: flex; gap: 6px; }
.source-type-hints span { padding: 5px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 8px; font-weight: 760; letter-spacing: .35px; text-transform: uppercase; }
.field-help { color: var(--muted); font-size: 11px; line-height: 1.45; }
.github-option { margin: 13px 0; padding: 11px 12px; border: 1px solid #e4e5f2; border-radius: 13px; background: #f8f7ff; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.github-option input { position: absolute; opacity: 0; pointer-events: none; }
.github-option .check-box { width: 23px; height: 23px; flex: 0 0 auto; border: 1px solid #d5d7e3; border-radius: 8px; background: white; color: transparent; display: grid; place-items: center; transition: .16s ease; }
.github-option .check-box svg { width: 15px; height: 15px; }
.github-option input:checked + .check-box { border-color: var(--accent); background: var(--accent); color: white; }
.github-option input:focus-visible + .check-box { outline: 3px solid rgba(85,76,243,.16); outline-offset: 2px; }
.github-option strong, .github-option small { display: block; }
.github-option strong { color: #4e5465; font-size: 11px; }
.github-option small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.file-button { width: fit-content; min-height: 40px; font-size: 11px; }
.file-button input { display: none; }
.source-manager-head { padding: 16px 24px 7px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.source-manager-head strong, .source-manager-head small { display: block; }
.source-manager-head strong { font-size: 13px; }
.source-manager-head small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.source-manager-head > div:last-child { display: flex; gap: 5px; }
.source-manager-head button { padding: 7px 9px; border-radius: 9px; background: #f1f2f7; color: #656b7a; cursor: pointer; font-size: 9px; font-weight: 700; }
.source-manager-head button:hover { background: var(--accent-soft); color: var(--accent); }
.source-list, .recommendations { padding: 0 24px 18px; }
.source-row, .recommendation-row { padding: 13px 2px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #edf0f4; }
.source-row { transition: opacity .18s ease; }
.source-row.is-inactive { opacity: .63; }
.source-state { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(30,174,120,.10); flex: 0 0 auto; }
.source-state.error { background: var(--danger); box-shadow: 0 0 0 4px rgba(234,81,101,.10); }
.source-state.paused { background: #a9aeba; box-shadow: 0 0 0 4px rgba(119,125,140,.10); }
.source-state.github { background: #24292f; box-shadow: 0 0 0 4px rgba(36,41,47,.09); }
.source-copy { flex: 1; min-width: 0; }
.source-copy strong, .source-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-copy strong { font-size: 13px; }
.source-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.source-toggle { width: 42px; height: 24px; padding: 3px; flex: 0 0 auto; border-radius: 99px; background: #dfe2e9; cursor: pointer; transition: background .18s ease; }
.source-toggle span { width: 18px; height: 18px; display: block; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(42,46,60,.18); transition: transform .18s ease; }
.source-toggle.active { background: var(--accent); }
.source-toggle.active span { transform: translateX(18px); }
.source-toggle:focus-visible { outline: 3px solid rgba(85,76,243,.18); outline-offset: 2px; }
.source-pre-toggle { width: 34px; height: 28px; flex: 0 0 auto; border-radius: 9px; background: #eff0f4; color: #8b909e; cursor: pointer; font-size: 8px; font-weight: 800; letter-spacing: .4px; }
.source-pre-toggle.active { background: #fff0d7; color: #b06a00; }
.source-pre-toggle:focus-visible { outline: 3px solid rgba(85,76,243,.18); outline-offset: 2px; }
.source-delete { width: 36px; height: 36px; border-radius: 11px; background: #fff2f4; color: var(--danger); cursor: pointer; display: grid; place-items: center; }
.recommendations h3 { margin: 9px 0 5px; font-size: 13px; }
.recommendation-row .secondary-button { min-height: 36px; padding: 0 11px; font-size: 10px; }
.github-recommendations { margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(245,244,255,.55), transparent 110px); }
.github-recommendations > .field-help { margin: 0 0 4px; }

.detail-sheet { width: min(820px, 100%); position: relative; overflow: hidden auto; }
.detail-close { position: absolute; top: 17px; right: 17px; z-index: 2; }
.detail-hero { padding: 31px; display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 20px; background: radial-gradient(circle at 75% 10%, rgba(123,108,255,.23), transparent 34%), linear-gradient(135deg,#fff,#f4f2ff); }
.detail-icon { width: 100px; height: 100px; border-radius: 25px; overflow: hidden; display: grid; place-items: center; background: white; color: var(--accent); font-size: 38px; font-weight: 760; box-shadow: 0 10px 30px rgba(48,45,90,.10); }
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { padding-right: 42px; align-self: center; }
.detail-title h2 { margin: 4px 0; font-size: 29px; letter-spacing: -.75px; }
.detail-title p { margin: 0; color: var(--muted); font-size: 12px; }
.detail-body { padding: 24px 28px 29px; display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 22px; }
.about-box h3, .download-box h3 { margin: 0 0 12px; font-size: 15px; }
.about-box p { margin: 0; color: #5a6172; font-size: 13px; line-height: 1.65; }
.download-box { padding: 17px; border-radius: 19px; background: #f7f8fc; border: 1px solid var(--line); }
.version-select { width: 100%; height: 45px; border: 1px solid #dfe2eb; border-radius: 12px; padding: 0 10px; background: white; outline: none; color: var(--text); }
.version-details { margin: 12px 0 14px; display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.version-details span { display: flex; justify-content: space-between; gap: 10px; }
.version-details b { color: #454b5c; text-align: right; overflow-wrap: anywhere; }
.download-actions { display: grid; gap: 8px; }
.download-actions .primary-button, .download-actions .secondary-button { width: 100%; }
.download-actions a { text-decoration: none; }
.safe-note { margin: 13px 0 0; display: flex; gap: 7px; align-items: flex-start; color: #7d8291; font-size: 10px; line-height: 1.45; }
.safe-note svg { color: var(--success); flex: 0 0 auto; }
.mini-sheet { width: min(460px, 100%); }
.date-filter-body { padding: 20px 23px 23px; }
.date-filter-body > .field-help { margin: 0 0 15px; }
.date-presets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.date-presets button { min-height: 41px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: #f7f8fb; color: #596071; cursor: pointer; font-size: 10px; font-weight: 690; }
.date-presets button:first-child { grid-column: 1 / -1; }
.date-presets button:hover, .date-presets button.active { border-color: rgba(85,76,243,.30); background: var(--accent-soft); color: var(--accent); }
.date-fields { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.date-fields label { display: grid; gap: 7px; color: #6f7585; font-size: 10px; font-weight: 700; }
.date-fields input { width: 100%; height: 44px; padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--text); outline: none; font: inherit; }
.date-fields input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(85,76,243,.08); }
.date-filter-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.install-steps { list-style: none; margin: 0; padding: 23px; display: grid; gap: 18px; }
.install-steps li { display: flex; gap: 13px; align-items: center; color: #555c6c; font-size: 13px; }
.install-steps b:first-child { width: 33px; height: 33px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.mini-sheet > .safe-note { margin: 0 23px 25px; padding: 12px; border-radius: 13px; background: #effaf6; color: #377d66; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 150; width: min(370px, calc(100vw - 32px)); padding: 14px; border-radius: 17px; background: rgba(27,29,39,.94); color: white; box-shadow: 0 18px 50px rgba(0,0,0,.24); backdrop-filter: blur(18px); display: flex; align-items: center; gap: 11px; transform: translateY(120%); opacity: 0; pointer-events: none; transition: .26s ease; }
.toast.visible { transform: none; opacity: 1; }
.toast-icon { width: 36px; height: 36px; border-radius: 12px; background: rgba(255,255,255,.12); color: #7ff0c7; display: grid; place-items: center; }
.toast div { min-width: 0; }
.toast strong { font-size: 12px; }
.toast p { margin: 3px 0 0; color: #bfc3cf; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1050px) { .app-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-content { min-height: 100vh; }
  .topbar { height: 68px; padding: 10px 14px; }
  .search-box { width: auto; flex: 1; height: 44px; border-radius: 14px; }
  .search-box kbd, .top-actions .primary-button span { display: none; }
  .top-actions { gap: 7px; }
  .top-actions .primary-button { width: 44px; padding: 0; border-radius: 14px; }
  .icon-button { width: 42px; height: 42px; }
  .content { padding: 15px 14px calc(98px + var(--safe-bottom)); }
  .hero { min-height: 154px; padding: 23px 20px; align-items: flex-start; border-radius: 23px; }
  .hero h1 { font-size: 34px; margin-top: 10px; }
  .hero p { max-width: 230px; font-size: 12px; line-height: 1.5; }
  .hero-stats { position: absolute; right: 14px; bottom: 13px; gap: 7px; }
  .hero-stats span { min-width: 64px; padding: 9px; border-radius: 13px; font-size: 9px; }
  .hero-stats strong { font-size: 17px; }
  .install-card { padding: 12px; }
  .install-card .secondary-button { display: none; }
  .install-card p { font-size: 10px; }
  .library-toolbar { min-height: 68px; padding: 12px 0 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .filter-button { width: 100%; min-width: 0; justify-content: flex-start; }
  .filter-button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .filter-button b { margin-left: auto; }
  .sort-control { min-width: 0; }
  .sort-control > select { width: 100%; min-width: 0; padding-right: 25px; }
  .status-line { padding: 8px 1px 5px; }
  .app-grid { grid-template-columns: 1fr; gap: 12px; }
  .load-more { flex-direction: column; padding-top: 18px; }
  .app-card { border-radius: 19px; animation-duration: .26s; }
  .app-card:hover { transform: none; }
  .app-description { height: auto; min-height: 38px; }
  .bottom-nav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(69px + var(--safe-bottom)); padding: 5px 8px var(--safe-bottom); display: grid; grid-template-columns: repeat(5,1fr); align-items: start; background: rgba(255,255,255,.92); border-top: 1px solid var(--line); backdrop-filter: blur(22px); }
  .mobile-nav { min-width: 0; height: 59px; padding: 6px 1px 3px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: transparent; color: #848998; font-size: 8px; cursor: pointer; }
  .mobile-nav > svg { width: 21px; height: 21px; }
  .mobile-nav.active { color: var(--accent); }
  .floating-add { width: 43px; height: 43px; margin-top: -17px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg,var(--accent-2),var(--accent)); color: white; box-shadow: 0 9px 22px rgba(85,76,243,.28); }
  .mobile-nav:has(.floating-add) { padding-top: 0; gap: 2px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .sheet { width: 100%; max-height: 91vh; border-radius: 27px 27px 0 0; padding-bottom: var(--safe-bottom); }
  .sheet::before { content: ""; display: block; width: 39px; height: 5px; margin: 8px auto -2px; border-radius: 99px; background: #d9dce5; }
  .sheet-header { padding: 17px 18px 14px; }
  .sheet-header h2 { font-size: 21px; }
  .source-form { padding: 16px 18px; }
  .source-input-row { display: grid; }
  .source-manager-head { padding: 14px 18px 6px; align-items: flex-end; }
  .source-manager-head small { max-width: 170px; white-space: normal; }
  .source-list, .recommendations { padding-left: 18px; padding-right: 18px; }
  .source-row { gap: 9px; }
  .source-pre-toggle { width: 31px; }
  .source-delete { width: 34px; height: 34px; }
  .date-filter-body { padding: 18px 18px calc(22px + var(--safe-bottom)); }
  .detail-sheet { overflow-y: auto; }
  .detail-hero { padding: 22px 19px 20px; grid-template-columns: 79px minmax(0,1fr); gap: 15px; }
  .detail-icon { width: 79px; height: 79px; border-radius: 20px; font-size: 30px; }
  .detail-title { padding-right: 28px; }
  .detail-title h2 { font-size: 23px; }
  .detail-body { padding: 20px 18px 26px; grid-template-columns: 1fr; }
  .download-box { order: -1; }
  .toast { right: 16px; bottom: calc(82px + var(--safe-bottom)); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; } }
