@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
    --bg: #f3f6fb;
    --bg-alt: #edf2f9;
    --panel: #ffffff;
    --panel-soft: #f7f9fc;
    --line: #dbe5f0;
    --line-strong: #c7d6e7;
    --text: #1d2a3b;
    --muted: #708198;
    --blue: #2f6fec;
    --blue-deep: #1f5bd6;
    --blue-soft: #eaf2ff;
    --shadow: 0 18px 50px rgba(27, 51, 84, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, rgba(247, 249, 252, var(--page-bg-mask-opacity, 0.25)) 0%, rgba(239, 244, 250, var(--page-bg-mask-opacity, 0.25)) 100%),
        var(--page-bg-image, linear-gradient(180deg, #f7f9fc 0%, #eff4fa 100%));
    background-size: cover, cover;
    background-position: center, center;
    background-attachment: fixed, fixed;
    color: var(--text);
}

.page-shell {
    width: min(1360px, calc(100vw - 28px));
    margin: 0 auto;
    padding: 10px 0 48px;
}

.page-header,
.category-filter-panel,
.recent-panel,
.section-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    margin-bottom: 18px;
}

.page-header h1 {
    margin: 0;
    font-size: 28px;
    font-family: 'Noto Sans SC', sans-serif;
}

.site-title-with-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.site-title-with-logo img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(22, 39, 67, 0.18);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: 14px;
    padding: 0 13px;
    border-radius: 999px;
    color: var(--apple-blue);
    background: rgba(0, 113, 227, 0.09);
    font-size: 14px;
    font-weight: 800;
}

.page-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
    background: #fff;
    border: 1px solid #cfe0ff;
    transition: all 0.2s ease;
}

.ghost-link:hover {
    transform: translateY(-1px);
}

.admin-icon-link {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfe0ff;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--blue);
    text-decoration: none;
    transition: all 0.2s ease;
}

.admin-icon-link:hover {
    background: #fff;
    transform: translateY(-1px);
}

.admin-icon-link svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.recent-panel,
.section-panel {
    padding: 18px 20px;
    margin-bottom: 18px;
}

.category-filter-panel {
    padding: 14px 18px;
    margin-bottom: 18px;
}

.home-search-form {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 14px;
}

.list-filter-form {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 12px;
}

.home-search-form select,
.home-search-form input,
.list-filter-form select,
.list-filter-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--text);
}

.home-search-form button,
.list-filter-form button {
    border: 0;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.category-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: #496078;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.filter-chip.active {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
}

.lock-mark {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff4df;
    color: #aa6b00;
    font-size: 12px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    font-size: 22px;
    font-family: 'Noto Sans SC', sans-serif;
}

.section-tip {
    color: var(--blue);
    font-size: 14px;
}

.section-more-link {
    color: var(--blue);
    font-size: 14px;
    text-decoration: none;
    font-weight: 700;
}

.with-line {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--blue-soft);
    position: relative;
}

.section-icon::before {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 4px;
    background: var(--blue);
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.recent-card {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 0;
    padding: 16px;
    min-height: 162px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recent-card-main {
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.recent-copy {
    min-width: 0;
    flex: 1;
}

.recent-copy h3 {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.5;
    word-break: break-word;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f5f7fa;
    color: #5d6f84;
    font-size: 13px;
    margin-bottom: 12px;
}

.recent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #7e8da0;
    font-size: 14px;
    margin-bottom: 10px;
}

.recent-copy p {
    margin: 0;
    color: #7e8da0;
    font-size: 14px;
}

.recent-thumb {
    width: 62px;
    min-width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-thumb img,
.software-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.fallback-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 26px;
    font-weight: 800;
}

.fallback-icon.small {
    width: 48px;
    height: 48px;
    font-size: 18px;
    border-radius: 10px;
}

.view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    min-width: 62px;
    height: 32px;
    padding: 0 14px;
    background: var(--blue);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.section-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.software-list-card {
    background: var(--panel-soft);
    border-radius: 12px;
    padding: 14px;
}

.software-list-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px 14px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px dashed #d9e1ec;
}

.software-list-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.software-list-item:first-child {
    padding-top: 0;
}

.software-list-thumb {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.software-list-copy {
    min-width: 0;
}

.software-list-copy h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.5;
    word-break: break-word;
}

.software-list-copy p {
    margin: 0;
    color: #7b8ba0;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.software-list-item .view-button {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
}

.image-preview-trigger {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    cursor: zoom-in;
}

.image-preview-trigger img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-preview-trigger:hover img {
    transform: scale(1.04);
    box-shadow: 0 12px 28px rgba(24, 45, 75, 0.16);
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 16, 28, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.image-preview-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.image-preview-dialog {
    position: relative;
    width: min(920px, 94vw);
    max-height: 88vh;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.image-preview-dialog img {
    display: block;
    width: 100%;
    max-height: calc(88vh - 88px);
    object-fit: contain;
    border-radius: 18px;
    background: #f5f7fb;
}

.image-preview-title {
    margin-top: 12px;
    color: #2d3a4d;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.image-preview-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #1d2a3b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.empty-state {
    grid-column: 1 / -1;
    min-height: 120px;
    border-radius: 12px;
}

.empty-state strong {
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.locked-panel {
    padding: 18px 0 4px;
}

.locked-panel strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.locked-panel p {
    margin: 0 0 14px;
    color: var(--muted);
}

.unlock-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.unlock-form input {
    min-width: 280px;
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
}

.unlock-form button {
    border: 0;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.unlock-error {
    margin-bottom: 12px;
    color: #b4233c;
}

.site-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 6px 0 0;
    color: #6f7f94;
    font-size: 13px;
}

.site-footer a {
    color: #4d6fa8;
    text-decoration: none;
}

.music-player {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 20;
    width: min(420px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(191, 205, 224, 0.8);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(28, 49, 80, 0.14);
    backdrop-filter: blur(10px);
}

.music-toggle {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.music-player.is-playing .music-toggle {
    background: #1d2a3b;
}

.music-copy {
    min-width: 0;
}

.music-copy strong,
.music-copy span {
    display: block;
}

.music-copy strong {
    font-size: 13px;
}

.music-copy span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-player audio {
    grid-column: 1 / -1;
    width: 100%;
    height: 34px;
}

@media (max-width: 1080px) {
    .recent-grid,
    .section-columns,
    .list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 840px) {
    .recent-grid,
    .section-columns,
    .list-grid,
    .page-header {
        grid-template-columns: 1fr;
    }

    .page-header {
        display: grid;
    }

    .list-filter-form {
        grid-template-columns: 1fr;
    }

    .home-search-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100vw - 20px, 100%);
        padding-top: 16px;
    }

    .page-header,
    .recent-panel,
    .section-panel {
        border-radius: 12px;
        padding: 18px;
    }

    .section-head,
    .recent-card-main {
        display: block;
    }

    .recent-thumb {
        margin-top: 12px;
    }

    .software-list-item .view-button {
        grid-column: 2;
        justify-self: start;
        margin-top: 8px;
    }

    .music-player {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
    }
}

/* Apple-style visual refresh */
:root {
    --apple-bg: #f5f5f7;
    --apple-panel: rgba(255, 255, 255, 0.78);
    --apple-panel-strong: rgba(255, 255, 255, 0.92);
    --apple-text: #1d1d1f;
    --apple-muted: #6e6e73;
    --apple-blue: #0071e3;
    --apple-blue-strong: #0066cc;
    --apple-line: rgba(0, 0, 0, 0.08);
    --apple-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
    --apple-radius: 28px;
}

body.theme-clean {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Noto Sans SC', sans-serif;
    color: var(--apple-text);
    background-color: var(--apple-bg);
    background-image:
        linear-gradient(180deg, rgba(245, 245, 247, var(--page-bg-mask-opacity, 0.34)), rgba(245, 245, 247, var(--page-bg-mask-opacity, 0.34))),
        radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.92), transparent 28%),
        radial-gradient(circle at 82% 0%, rgba(185, 214, 255, 0.38), transparent 24%),
        var(--page-bg-image, linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 100%));
}

.page-shell {
    width: min(1180px, calc(100vw - 32px));
    padding: 22px 0 54px;
}

.page-header,
.category-filter-panel,
.recent-panel,
.section-panel {
    border: 1px solid var(--apple-line);
    border-radius: var(--apple-radius);
    background: var(--apple-panel);
    box-shadow: var(--apple-shadow);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.page-header {
    min-height: 220px;
    align-items: flex-end;
    margin-bottom: 16px;
    padding: 34px;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 18%, rgba(0, 113, 227, 0.14), transparent 26%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.68));
}

.page-header h1 {
    max-width: 760px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.page-header p {
    max-width: 720px;
    margin-top: 14px;
    color: var(--apple-muted);
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.55;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.hero-points span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    color: #424245;
    background: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 750;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.hero-points.compact {
    margin-top: 16px;
}

.admin-icon-link,
.ghost-link {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--apple-blue);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.admin-icon-link:hover,
.ghost-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.category-filter-panel {
    position: sticky;
    top: 12px;
    z-index: 10;
    padding: 12px;
    margin-bottom: 16px;
}

.home-search-form,
.list-filter-form {
    grid-template-columns: 190px minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 12px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.home-search-form select,
.home-search-form input,
.list-filter-form select,
.list-filter-form input {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 15px;
    outline: 0;
}

.home-search-form input,
.list-filter-form input {
    background: rgba(245, 245, 247, 0.9);
}

.home-search-form button,
.list-filter-form button,
.unlock-form button,
.view-button,
.music-toggle {
    border-radius: 999px;
    background: var(--apple-blue);
    box-shadow: 0 12px 26px rgba(0, 113, 227, 0.22);
}

.home-search-form button:hover,
.list-filter-form button:hover,
.unlock-form button:hover,
.view-button:hover,
.music-toggle:hover {
    background: var(--apple-blue-strong);
    transform: translateY(-1px);
}

.category-filter-row {
    gap: 8px;
    padding: 2px 4px;
}

.filter-chip {
    min-height: 36px;
    border: 0;
    background: rgba(255, 255, 255, 0.62);
    color: var(--apple-muted);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-chip:hover {
    color: var(--apple-text);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.filter-chip.active {
    color: #fff;
    background: #1d1d1f;
}

.recent-panel,
.section-panel {
    padding: 26px;
    margin-bottom: 16px;
}

.section-head h2 {
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.section-more-link {
    color: var(--apple-blue);
    font-weight: 800;
}

.with-line {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.recent-grid,
.list-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.recent-card {
    min-height: 210px;
    padding: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    background: var(--apple-panel-strong);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.recent-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 113, 227, 0.18);
    box-shadow: 0 26px 58px rgba(0, 0, 0, 0.1);
}

.recent-copy h3 {
    color: var(--apple-text);
    font-size: 19px;
    letter-spacing: -0.015em;
}

.tag {
    border-radius: 999px;
    background: rgba(0, 113, 227, 0.09);
    color: var(--apple-blue);
    font-weight: 800;
}

.recent-meta,
.recent-copy p,
.software-list-copy p,
.empty-state p,
.locked-panel p,
.site-footer {
    color: var(--apple-muted);
}

.recent-thumb,
.fallback-icon {
    border-radius: 20px;
}

.recent-thumb img,
.software-list-thumb img {
    border-radius: 18px;
}

.fallback-icon {
    background: linear-gradient(145deg, #f5f5f7, #e8eef7);
    color: var(--apple-blue);
}

.view-button {
    height: 36px;
    min-width: 78px;
    border-radius: 999px;
}

.section-columns {
    gap: 16px;
}

.software-list-card {
    padding: 8px 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.68);
}

.software-list-item {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.locked-panel,
.empty-state {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
}

.unlock-form input {
    border-color: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
}

.music-player {
    border-color: rgba(0, 0, 0, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
}

@media (max-width: 1080px) {
    .recent-grid,
    .list-grid,
    .section-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100vw - 20px, 100%);
        padding-top: 12px;
    }

    .page-header {
        min-height: 188px;
        padding: 24px;
        border-radius: 24px;
    }

    .category-filter-panel {
        position: static;
        border-radius: 22px;
    }

    .home-search-form,
    .list-filter-form {
        grid-template-columns: 1fr;
        border-radius: 22px;
        padding: 10px;
    }

    .recent-grid,
    .list-grid,
    .section-columns {
        grid-template-columns: 1fr;
    }

    .recent-panel,
    .section-panel {
        padding: 18px;
        border-radius: 24px;
    }
}

/* Compact homepage recent updates */
.recent-panel {
    padding: 18px 22px;
}

.recent-panel .section-head {
    margin-bottom: 12px;
}

.recent-panel .section-head h2 {
    font-size: clamp(22px, 2.2vw, 30px);
    letter-spacing: -0.025em;
}

.recent-panel .section-more-link {
    font-size: 13px;
}

.recent-panel .recent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.recent-panel .recent-card {
    min-height: 138px;
    padding: 14px 16px;
    border-radius: 22px;
}

.recent-panel .recent-card-main {
    gap: 10px;
}

.recent-panel .recent-copy h3 {
    margin-bottom: 7px;
    font-size: 17px;
    line-height: 1.35;
}

.recent-panel .tag {
    margin-bottom: 8px;
    padding: 3px 9px;
    font-size: 12px;
}

.recent-panel .recent-meta {
    gap: 6px;
    margin-bottom: 7px;
    font-size: 13px;
}

.recent-panel .recent-copy p {
    font-size: 13px;
}

.recent-panel .recent-thumb {
    width: 48px;
    min-width: 48px;
    height: 48px;
}

.recent-panel .fallback-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 20px;
}

.recent-panel .view-button {
    height: 32px;
    min-width: 68px;
    margin-top: 8px;
    font-size: 13px;
}

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

@media (max-width: 760px) {
    .recent-panel {
        padding: 16px;
    }

    .recent-panel .recent-grid {
        grid-template-columns: 1fr;
    }

    .recent-panel .recent-card-main {
        display: flex;
    }
}

/* Compact resource-list homepage */
.home-page-shell {
    width: min(1120px, calc(100vw - 32px));
}

.home-page-shell .recent-panel,
.home-page-shell .section-panel {
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.07);
}

.home-page-shell .recent-panel {
    padding: 16px 18px;
}

.home-page-shell .section-panel {
    padding: 20px 22px;
}

.home-page-shell .section-head {
    margin-bottom: 14px;
}

.home-page-shell .section-head h2 {
    font-size: clamp(24px, 2.4vw, 32px);
}

.home-page-shell .recent-panel .section-head h2 {
    font-size: clamp(20px, 2vw, 26px);
}

.home-page-shell .recent-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.home-page-shell .recent-card {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    box-shadow: none;
}

.home-page-shell .recent-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.home-page-shell .recent-card-main {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.home-page-shell .recent-thumb {
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    min-width: 44px;
    height: 44px;
}

.home-page-shell .recent-copy {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, auto) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.home-page-shell .recent-copy h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-page-shell .recent-panel .tag {
    margin: 0;
    padding: 3px 8px;
    font-size: 12px;
}

.home-page-shell .recent-meta {
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-page-shell .recent-copy p {
    display: none;
}

.home-page-shell .recent-card .view-button {
    align-self: center;
    margin: 0;
    height: 30px;
    min-width: 62px;
    padding: 0 12px;
}

.home-page-shell .section-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-page-shell .software-list-card {
    display: contents;
}

.home-page-shell .software-list-item {
    min-height: 92px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.045);
}

.home-page-shell .software-list-thumb {
    width: 42px;
    height: 42px;
    margin: 0;
}

.home-page-shell .software-list-copy h3 {
    margin-bottom: 4px;
    font-size: 15px;
    line-height: 1.35;
}

.home-page-shell .software-list-copy p {
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
}

.home-page-shell .software-list-item .view-button {
    grid-column: auto;
    justify-self: end;
    margin-top: 0;
    height: 30px;
    min-width: 62px;
    padding: 0 12px;
    font-size: 13px;
}

.home-page-shell .locked-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
}

.home-page-shell .locked-panel strong {
    margin: 0;
    font-size: 16px;
}

.home-page-shell .locked-panel p {
    margin: 0;
    font-size: 13px;
}

.home-page-shell .unlock-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.home-page-shell .unlock-form input,
.home-page-shell .unlock-form button {
    min-height: 42px;
}

@media (max-width: 900px) {
    .home-page-shell .section-columns {
        grid-template-columns: 1fr;
    }

    .home-page-shell .recent-copy {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .home-page-shell .recent-meta {
        white-space: normal;
    }
}

@media (max-width: 640px) {
    .home-page-shell {
        width: min(100vw - 20px, 100%);
    }

    .home-page-shell .recent-card,
    .home-page-shell .software-list-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-page-shell .recent-card-main {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .home-page-shell .recent-card .view-button,
    .home-page-shell .software-list-item .view-button {
        justify-self: start;
    }

    .home-page-shell .unlock-form {
        grid-template-columns: 1fr;
    }
}
