* {
    box-sizing: border-box;
}

body,
body[data-page="home"] {
    min-height: 100vh;
    margin: 0;
    font: 14px/1.7 Tahoma, Arial, "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, rgba(226, 241, 255, 0.42), rgba(211, 229, 249, 0.6)), url("../images/login/login-bg.png") center center / cover fixed no-repeat;
    background-color: #b9d9f5;
    color: #222;
}

a {
    color: #0b57a2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.forum-shell {
    width: min(1400px, calc(100% - 40px));
    margin: 8px auto 24px;
}

.top-strip {
    display: flex;
    gap: 18px;
    padding: 7px 12px;
    border: 1px solid #91a9c4;
    border-bottom: 0;
    background: linear-gradient(180deg, #eff5fb 0%, #dce6f2 100%);
    color: #526882;
    font-size: 12px;
}

.site-header {
    display: flex;
    min-height: 220px;
    padding: 30px 34px;
    align-items: center;
    border: 1px solid #c8dcf4;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(90deg, rgba(247, 251, 255, 0.98) 0%, rgba(228, 240, 255, 0.91) 45%, rgba(177, 211, 251, 0.46) 100%), url("../images/home-banners/version.jpg") center right / cover no-repeat;
    box-shadow: 0 8px 28px rgba(60, 96, 145, 0.13);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-emblem {
    display: grid;
    width: 118px;
    height: 118px;
    flex: 0 0 118px;
    place-items: center;
    border: 1px solid rgba(163, 193, 229, 0.65);
    border-radius: 14px;
    background: rgba(249, 252, 255, 0.78);
    box-shadow: 0 7px 18px rgba(63, 103, 155, 0.13);
}

.site-emblem img {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(26, 63, 111, 0.2);
}

.site-header-portal {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
    align-items: stretch;
    background: linear-gradient(135deg, rgba(255, 247, 213, 0.95) 0%, rgba(251, 253, 255, 0.88) 45%, rgba(214, 229, 246, 0.95) 100%);
}

.site-brand {
    min-width: 0;
}

.site-badge {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #d5bb7a;
    background: linear-gradient(180deg, #fff6d4 0%, #f1d585 100%);
    color: #7d560d;
    font-size: 12px;
    font-weight: 700;
}

.site-title {
    color: #173f78;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 1px;
}

.site-subtitle {
    margin-top: 8px;
    color: #254d80;
    font-size: 18px;
    font-weight: 700;
}

.site-credit-row {
    display: flex;
    gap: 18px;
    margin-top: 18px;
    color: #657997;
    font-size: 14px;
    flex-wrap: wrap;
}

.site-credit-row a {
    color: #0b57a2;
    font-weight: 700;
}

.friend-links {
    padding-left: 18px;
    border-left: 1px solid #a9bfd7;
}

.header-summary {
    display: grid;
    gap: 10px;
}

.summary-card {
    padding: 12px 14px;
    border: 1px solid #b8cbe0;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.summary-card strong,
.portal-link-card strong {
    display: block;
    color: #244f80;
}

.summary-card span,
.portal-link-card span {
    display: block;
    margin-top: 4px;
    color: #5c6f84;
}

.main-nav {
    display: flex;
    gap: 4px;
    margin-top: 0;
    padding: 10px 14px;
    border: 1px solid #c8dcf4;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(60, 96, 145, 0.12);
    flex-wrap: wrap;
}

.nav-link {
    display: flex;
    min-height: 44px;
    padding: 8px 13px;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #213f73;
    font-size: 14px;
    font-weight: 700;
}

.nav-link img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.video-hero {
    display: flex;
    gap: 18px;
    padding: 22px;
    align-items: center;
    border: 1px solid #bfd7f1;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(236, 247, 255, .98), rgba(255, 255, 255, .96));
}

.video-hero-icon {
    display: grid;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #2588ff, #235ac8);
    box-shadow: 0 10px 24px rgba(36, 105, 205, .24);
}

.video-hero-icon img { width: 34px; height: 34px; filter: brightness(0) invert(1); }
.video-hero h1 { margin: 0; color: #173f78; font-size: 26px; }
.video-hero p { margin: 5px 0 0; color: #60758d; }
.video-profile-link { margin-left: auto; white-space: nowrap; }
.video-series-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.video-series {
    overflow: hidden;
    border: 1px solid #c6d9ee;
    border-radius: 11px;
    background: rgba(255, 255, 255, .96);
}

.video-series h2 {
    margin: 0;
    padding: 11px 14px;
    background: linear-gradient(135deg, #e9f4ff, #f6faff);
    color: #1c4f83;
    font-size: 17px;
}
.video-series-featured { border-color: #7db5ee; box-shadow: 0 7px 20px rgba(41, 107, 181, .1); }
.video-series-featured h2 { background: linear-gradient(135deg, #dceeff, #f2f8ff); }

.video-list { display: grid; margin: 0; padding: 0; list-style: none; }
.video-list li { border-top: 1px solid #e2ebf5; }
.video-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 13px 14px;
    align-items: center;
    color: #203f67;
}
.video-list a:hover { background: #f1f7ff; text-decoration: none; }
.video-list strong { display: block; font-size: 15px; }
.video-list small { display: block; margin-top: 2px; color: #70849a; }
.video-watch {
    padding: 5px 10px;
    border-radius: 15px;
    background: #e6f1ff;
    color: #1766bb;
    font-size: 12px;
    font-weight: 700;
}
@media (max-width: 760px) {
    .video-hero { align-items: flex-start; flex-wrap: wrap; }
    .video-profile-link { width: 100%; margin-left: 86px; }
    .video-series-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .video-hero { gap: 12px; padding: 16px; }
    .video-hero-icon { width: 52px; height: 52px; flex-basis: 52px; border-radius: 14px; }
    .video-hero-icon img { width: 27px; height: 27px; }
    .video-hero h1 { font-size: 21px; }
    .video-profile-link { margin-left: 64px; }
    .video-list a { padding: 12px; }
}

.nav-link:hover {
    background: #eef5ff;
    text-decoration: none;
}

.nav-link[aria-current="page"] {
    background: linear-gradient(135deg, #2588ff 0%, #3476ed 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(44, 124, 240, 0.25);
}

.nav-link[aria-current="page"] img {
    filter: brightness(0) invert(1);
}

.xiaonan-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.xiaonan-stats div {
    padding: 16px;
    border: 1px solid #c7d9ee;
    border-radius: 9px;
    background: linear-gradient(145deg, #f4f9ff, #fff);
    text-align: center;
}

.xiaonan-stats strong,
.xiaonan-stats span {
    display: block;
}

.xiaonan-stats strong {
    color: #1f67b5;
    font-size: 22px;
}

.xiaonan-stats span {
    color: #647994;
}

.xiaonan-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.xiaonan-login {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    padding: 11px 14px;
    align-items: center;
    border: 1px solid #d7bd75;
    border-radius: 8px;
    background: #fff8df;
    color: #684b14;
    flex-wrap: wrap;
}

.xiaonan-login strong {
    margin-right: auto;
    color: #704b0d;
}

.xiaonan-login code {
    padding: 2px 7px;
    border: 1px solid #dfc985;
    border-radius: 4px;
    background: #fff;
    color: #8a3e13;
    font-size: 14px;
    font-weight: 700;
}

.xiaonan-guild-rule {
    margin-bottom: 14px;
    padding: 11px 14px;
    border-left: 4px solid #d85b46;
    background: #fff1ed;
    color: #70382e;
}

.xiaonan-guild-rule strong {
    display: block;
    margin-bottom: 4px;
    color: #a13d2d;
}

.xiaonan-guild-rule span {
    display: block;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    min-height: 42px;
    padding: 8px 16px;
    align-items: center;
    border-radius: 7px;
    font-weight: 700;
}

.primary-action {
    background: #287eea;
    color: #fff;
}

.secondary-action {
    border: 1px solid #9fbee2;
    background: #f5f9ff;
}

.xiaonan-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: xiaonan-step;
}

.xiaonan-steps li {
    display: grid;
    grid-template-columns: 42px 140px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    align-items: center;
    border-bottom: 1px solid #dce8f5;
    counter-increment: xiaonan-step;
}

.xiaonan-steps li::before {
    content: counter(xiaonan-step);
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #2c80ed;
    color: #fff;
    font-weight: 800;
}

.xiaonan-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.xiaonan-feature-grid section {
    padding: 14px;
    border: 1px solid #c5d8ec;
    border-radius: 9px;
    background: linear-gradient(145deg, #fff, #f5f9ff);
}

.xiaonan-feature-grid h3,
.xiaonan-feature-grid p {
    margin: 0;
}

.xiaonan-feature-grid h3 {
    color: #234f82;
    font-size: 17px;
}

.xiaonan-feature-grid p {
    margin-top: 6px;
}

.xiaonan-feature-grid span {
    display: inline-block;
    margin-top: 9px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #e8f2ff;
    color: #326a9e;
    font-size: 12px;
}

.warning-list li::marker {
    color: #d47d18;
}

.script-search-note {
    margin-top: 0;
    color: #5a6f88;
}

.script-library-tabs {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 4px;
    gap: 4px;
    border: 1px solid #c8daee;
    border-radius: 10px;
    background: #edf4fb;
}

.script-library-tab {
    min-width: 110px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4f6885;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.script-library-tab.is-active {
    background: #fff;
    color: #1f5e9e;
    box-shadow: 0 4px 12px rgba(42, 95, 153, .12);
}

.script-library-tab:focus-visible {
    outline: 2px solid #5a9df0;
    outline-offset: 2px;
}

.custom-script-guide {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.custom-script-guide[hidden] {
    display: none !important;
}

.custom-script-guide-block {
    padding: 11px 13px;
    border: 1px solid #c8daee;
    border-left: 4px solid #2f7ccc;
    border-radius: 8px;
    background: #f7fbff;
    color: #43627f;
}

.custom-script-guide-block strong {
    display: block;
    margin-bottom: 5px;
    color: #1f5f9f;
}

.custom-script-guide-block span {
    display: block;
}

.custom-script-guide-block span+span {
    margin-top: 4px;
}

.script-search-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) minmax(160px, .8fr) auto;
    gap: 10px;
    align-items: end;
}

.script-search-bar label>span {
    display: block;
    margin-bottom: 4px;
    color: #315d8d;
    font-weight: 700;
}

.script-search-bar input[type="search"],
.script-search-bar select {
    width: 100%;
    height: 42px;
    padding: 7px 10px;
    border: 1px solid #a9c2df;
    border-radius: 7px;
    background: #fff;
    color: #222;
    font: inherit;
}

.script-search-bar input[type="search"]:focus,
.script-search-bar select:focus {
    outline: 2px solid #5a9df0;
    outline-offset: 1px;
}

.script-backup-toggle {
    display: flex;
    min-height: 42px;
    padding: 0 11px;
    align-items: center;
    gap: 7px;
    border: 1px solid #b8cde5;
    border-radius: 7px;
    background: #f4f8fd;
    cursor: pointer;
}

.script-backup-toggle.is-disabled {
    opacity: .58;
    cursor: not-allowed;
}

.script-backup-toggle>span {
    margin: 0 !important;
    white-space: nowrap;
}

.script-result-header {
    display: flex;
    margin-top: 14px;
    padding: 9px 11px;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #c5d8ec;
    background: #edf5ff;
    color: #315d8d;
}

.script-results {
    border: 1px solid #c5d8ec;
    border-top: 0;
}

.script-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 10px 12px;
    align-items: center;
    border-bottom: 1px solid #e0eaf4;
    background: #fff;
}

.script-result:last-child {
    border-bottom: 0;
}

.script-result:nth-child(even) {
    background: #f8fbff;
}

.script-result-main {
    min-width: 0;
}

.script-result-main strong,
.script-result-main span {
    display: block;
}

.script-result-main strong {
    color: #1e4777;
}

.script-result-main span {
    overflow: hidden;
    color: #708198;
    font-family: Consolas, monospace;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.script-result-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.script-result-meta span,
.script-result-meta em {
    padding: 2px 7px;
    border-radius: 10px;
    background: #eaf3ff;
    color: #3a6c9d;
    font-size: 12px;
    font-style: normal;
}

.script-result-meta em {
    background: #e8f7ed;
    color: #287446;
}

.script-result-meta em.is-backup {
    background: #fff1df;
    color: #a26418;
}

.script-result-meta em.is-resource {
    background: #edf1f5;
    color: #5d6d7f;
}

.script-empty {
    padding: 30px 12px;
    color: #71839a;
    text-align: center;
}

.script-pagination {
    display: flex;
    margin-top: 12px;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.script-pagination button {
    min-width: 86px;
    padding: 7px 12px;
    border: 1px solid #9dbbe0;
    border-radius: 6px;
    background: #f5f9ff;
    color: #24578e;
    cursor: pointer;
}

.script-pagination button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.instance-rules {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #e1c47d;
    border-left: 4px solid #d78a1e;
    background: #fffaf0;
}

.instance-rules h3 {
    margin: 0 0 8px;
    color: #8a5812;
}

.instance-rules ol {
    margin: 0;
    padding-left: 22px;
}

.instance-rules li+li {
    margin-top: 6px;
}

.instance-rules-standalone {
    margin-top: 0;
}

.instance-account-table .mono-inline {
    color: #1d64ae;
    font-size: 16px;
    font-weight: 700;
}

.vgroup-main {
    max-width: 760px;
    margin: 18px auto 0;
}

.vgroup-body {
    text-align: center;
}

.vgroup-body .quick-guide-intro {
    text-align: left;
}

.vgroup-code {
    width: min(100%, 560px);
    margin: 18px auto 0;
    padding: 14px;
    border: 1px solid #c3d6eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(52, 86, 126, .1);
}

.vgroup-code img {
    display: block;
    width: 100%;
    height: auto;
}

.vgroup-code figcaption {
    margin-top: 10px;
    color: #244f80;
    font-size: 17px;
    font-weight: 700;
}

.vgroup-update-note {
    margin: 12px 0 0;
    color: #6b7f97;
    font-size: 12px;
}

@media (max-width: 620px) {
    .xiaonan-stats,
    .xiaonan-feature-grid {
        grid-template-columns: 1fr;
    }
    .xiaonan-stats {
        gap: 7px;
    }
    .xiaonan-stats div {
        padding: 10px;
    }
    .xiaonan-steps li {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
    }
    .xiaonan-steps li span {
        grid-column: 2;
    }
    .xiaonan-actions a {
        width: 100%;
        justify-content: center;
    }
    .xiaonan-login {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
    .xiaonan-login strong {
        margin-right: 0;
    }
    .script-library-tabs {
        display: flex;
        width: 100%;
    }
    .script-library-tab {
        min-width: 0;
        flex: 1;
    }
    .script-search-bar {
        grid-template-columns: 1fr;
    }
    .script-result-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }
    .script-result {
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .script-result-main span {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .script-result-meta {
        flex-wrap: wrap;
    }
}

.crumbs {
    display: flex;
    margin-top: 32px;
    padding: 15px 24px;
    align-items: center;
    gap: 8px;
    border: 1px solid #ccdef3;
    border-radius: 10px;
    background: rgba(244, 249, 255, 0.88);
    color: #637897;
    font-size: 15px;
}

.crumb-icon {
    width: 20px;
    height: 20px;
}

.home-intro {
    margin: 28px 6px 24px;
    color: #5d7190;
}

.home-intro h1 {
    margin: 0 0 10px;
    padding-left: 12px;
    border-left: 4px solid #2b82f3;
    color: #244b80;
    font-size: 24px;
    line-height: 1.25;
}

.home-intro p {
    max-width: 920px;
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
}

.drop-line-panel {
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid #bdd3ec;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(237, 246, 255, .96));
    box-shadow: 0 8px 22px rgba(54, 92, 137, .1);
}

.drop-line-head,
.drop-line-summary,
.drop-line-notes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.drop-line-head h2 {
    margin: 1px 0 0;
    color: #244f80;
    font-size: 21px;
}

.drop-line-kicker {
    color: #5f7997;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.drop-line-summary {
    margin-top: 12px;
    padding: 10px 12px;
    border-left: 4px solid #279565;
    background: #effaf5;
}

.drop-line-summary strong {
    color: #167049;
    font-size: 17px;
}

.drop-line-summary span {
    color: #567064;
}

.drop-line-grid {
    display: grid;
    grid-template-columns: repeat(15, minmax(52px, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.drop-line-grid>span {
    display: grid;
    min-height: 54px;
    place-items: center;
    align-content: center;
    border: 1px solid;
    border-radius: 7px;
    font-weight: 800;
}

.drop-line-grid small {
    display: block;
    margin-top: 1px;
    font-size: 10px;
    font-weight: 400;
}

.drop-line-grid .is-on {
    border-color: #6cc39a;
    background: #e9f8f0;
    color: #167049;
}

.drop-line-grid .is-off {
    border-color: #ced8e3;
    background: #f3f6f9;
    color: #798796;
}

.drop-line-notes {
    margin-top: 12px;
    justify-content: flex-start;
}

.drop-line-notes span {
    padding: 4px 9px;
    border-radius: 12px;
    background: #e8f2ff;
    color: #426b96;
    font-size: 12px;
}

.drop-line-warning {
    margin: 10px 0 0;
    color: #815b24;
    font-size: 12px;
}

@media (max-width: 880px) {
    .drop-line-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .drop-line-panel {
        padding: 12px;
    }
    .drop-line-head h2 {
        font-size: 19px;
    }
    .drop-line-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
    .drop-line-summary strong {
        font-size: 15px;
    }
    .drop-line-grid {
        gap: 5px;
    }
    .drop-line-grid>span {
        min-height: 48px;
        font-size: 13px;
    }
}

.site-footer {
    margin-top: 30px;
    padding: 18px 10px 28px;
    border-top: 1px solid #d4e2f2;
    color: #627897;
    text-align: center;
    font-size: 13px;
}

.forum-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 12px;
    margin-top: 12px;
}

.forum-shell-home {
    width: min(1400px, calc(100% - 40px));
}

.home-feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin-top: 12px;
    align-items: start;
}

.home-carousel {
    position: relative;
    min-height: 222px;
    overflow: hidden;
    border-radius: 12px;
    background: #22243c;
    box-shadow: 0 8px 20px rgba(45, 42, 90, 0.18);
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 400ms ease;
}

.carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 26px 16px 12px;
    background: linear-gradient(transparent, rgba(15, 15, 28, 0.82));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.carousel-dots {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 15px;
    display: flex;
    gap: 7px;
}

.carousel-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.carousel-dots button.is-active {
    background: #fff;
}

.basic-module {
    margin-bottom: 0;
}

.home-forum-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 12px;
    align-items: start;
}

.home-forum-main,
.home-forum-side {
    min-width: 0;
}

.home-panel {
    overflow: hidden;
}

.ref-module {
    overflow: hidden;
    margin-bottom: 14px;
    border-radius: 11px;
    border: 0;
    box-shadow: 0 7px 18px rgba(91, 107, 160, 0.12);
}

.ref-module-title {
    min-height: 42px;
    padding: 8px 14px;
    background: #5118c6;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.ref-module-body {
    padding: 13px 14px 12px;
    background: rgba(255, 252, 252, 0.96);
}

.ref-subsection+.ref-subsection {
    margin-top: 14px;
}

.ref-subsection.no-top-space {
    margin-top: 8px;
}

.ref-subsection h2 {
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #50596a;
    color: #111;
    font-size: 17px;
}

.ref-menu-grid {
    display: grid;
    gap: 7px 12px;
}

.ref-menu-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ref-menu-grid.large-task-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 52px;
    margin-bottom: 0;
    align-items: center;
}

.large-task-grid .ref-item {
    min-height: 52px;
}

.large-task-grid+.ref-subsection.no-top-space {
    width: 100%;
    margin-top: 16px;
}

.large-task-module .ref-module-body {
    display: flex;
    min-height: 190px;
    padding-bottom: 20px;
    flex-direction: column;
}

.large-task-module .ref-subsection h2 {
    min-height: 34px;
    line-height: 28px;
}

.ref-item {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    color: #20263b;
    font-size: 15px;
    line-height: 1.25;
}

.ref-item:hover {
    color: #4f23b0;
    text-decoration: none;
}

.ref-item img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
    image-rendering: auto;
    transition: filter 160ms ease, transform 160ms ease;
}

.ref-item:hover img {
    filter: brightness(1.12) saturate(1.08);
    transform: translateY(-1px);
}

.calendar-panel {
    overflow: hidden;
    border-radius: 12px;
    border: 0;
    box-shadow: 0 12px 24px rgba(91, 107, 160, 0.14);
    background: rgba(233, 244, 255, 0.72);
}

.calendar-panel-feature {
    margin-bottom: 0;
}

.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px 10px 0 0;
    background: #5692c5;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.calendar-refresh {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.calendar-refresh img {
    width: 28px;
    height: 28px;
}

.calendar-list {
    padding: 2px 0 0;
}

.calendar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 2px;
    padding: 12px 14px;
    border: 1px solid #6ca0d1;
    border-top: 0;
    background: rgba(255, 255, 255, 0.84);
    color: #111;
}

.calendar-row strong,
.season-card strong {
    color: #4d8dc4;
    font-size: 18px;
}

.calendar-row span {
    color: #333;
    font-weight: 700;
}

.season-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.season-card {
    padding: 10px 14px 12px;
    border: 1px solid #6ca0d1;
    border-radius: 10px;
    background: rgba(208, 229, 250, 0.7);
}

.season-card strong,
.season-card span {
    display: block;
}

.season-card span {
    margin-top: 2px;
    color: #111;
    font-size: 15px;
}

.portal-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 12px;
    margin-top: 12px;
}

.portal-main,
.portal-side {
    min-width: 0;
}

.sidebar,
.content {
    min-width: 0;
}

.side-box,
.forum-panel {
    margin-bottom: 12px;
    border: 1px solid #97b0cc;
    background: #fff;
}

.side-box h2,
.panel-head {
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #b9cde5;
    background: linear-gradient(180deg, #edf5ff 0%, #d8e8fb 100%);
}

.side-box h2 {
    font-size: 15px;
    color: #294d77;
}

.side-box p,
.panel-body {
    padding: 12px;
}

.side-box a {
    display: block;
    padding: 8px 12px;
    border-top: 1px solid #eef4fb;
}

.panel-head h1,
.panel-head h2 {
    margin: 0;
    font-size: 18px;
    color: #294d77;
}

.panel-body p {
    margin: 0 0 10px;
}

.welcome-panel .panel-body>p:last-of-type {
    margin-bottom: 14px;
}

.portal-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.portal-link-card {
    display: block;
    padding: 14px;
    border: 1px solid #c8d8ea;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8fe 100%);
}

.portal-link-card:hover {
    border-color: #9ab7d7;
    text-decoration: none;
    background: linear-gradient(180deg, #fffdf3 0%, #f4ead0 100%);
}

.portal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 12px;
    align-items: start;
}

.forum-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.forum-table th,
.forum-table td {
    padding: 9px 10px;
    border: 1px solid #c7d8ea;
    vertical-align: top;
    word-break: break-word;
}

.forum-table thead th {
    background: #edf5ff;
    color: #23466d;
}

.forum-table tbody tr:nth-child(even) {
    background: #fafcff;
}

.sum-row td {
    background: #fff6d8;
    font-weight: 700;
    color: #714900;
}

.plain-list {
    margin: 0;
    padding-left: 18px;
}

.plain-list li+li {
    margin-top: 6px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
}

.legend-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.muted-note {
    margin-top: 12px;
    color: #5d6f81;
}

.mono-inline {
    font-family: Consolas, "Courier New", monospace;
}

.small-note {
    color: #5f7285;
    font-size: 12px;
}

.inline-shot {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #c7d8ea;
    background: #f7fbff;
}

.inline-shot img {
    display: block;
    max-width: 100%;
    height: auto;
}

.source-cards {
    display: grid;
    gap: 14px;
}

.source-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 14px;
    padding: 12px;
    border: 1px solid #c7d8ea;
    background: #f9fbff;
}

.source-card.no-image {
    grid-template-columns: 1fr;
}

.source-card img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #d5e2f0;
    background: #fff;
}

.source-card h3 {
    margin: 0 0 8px;
    color: #244d7b;
    font-size: 16px;
}

.source-line {
    margin-top: 10px;
    color: #586a7f;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-card {
    padding: 12px;
    border: 1px solid #c7d8ea;
    background: #f9fbff;
}

.detail-card h3 {
    margin: 0 0 10px;
    color: #244d7b;
    font-size: 16px;
}

.detail-card img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    border: 1px solid #d5e2f0;
    background: #fff;
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.mini-table th,
.mini-table td {
    padding: 8px 9px;
    border: 1px solid #d2dfec;
    vertical-align: top;
    word-break: break-word;
}

.mini-table th {
    width: 110px;
    background: #edf5ff;
    color: #23466d;
    text-align: left;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.gallery-item {
    margin: 0;
    padding: 12px;
    border: 1px solid #c7d8ea;
    background: #f9fbff;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #d5e2f0;
    background: #fff;
}

.gallery-item figcaption {
    margin-top: 8px;
    color: #5b6f84;
}

@media (max-width: 880px) {
    .forum-layout {
        grid-template-columns: 1fr;
    }
    .portal-home,
    .portal-grid,
    .site-header-portal,
    .portal-links,
    .home-feature-grid,
    .home-forum-layout {
        grid-template-columns: 1fr;
    }
    .forum-shell {
        width: min(100% - 12px, 1200px);
    }
    .forum-shell-home {
        width: min(100% - 12px, 1200px);
    }
    .site-header {
        min-height: 190px;
        padding: 24px;
    }
    .site-emblem {
        width: 94px;
        height: 94px;
        flex-basis: 94px;
    }
    .site-title {
        font-size: 36px;
    }
    .main-nav {
        padding: 12px 16px;
    }
    .legend-grid {
        grid-template-columns: 1fr;
    }
    .ref-menu-grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ref-menu-grid.large-task-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .source-card {
        grid-template-columns: 1fr;
    }
    .detail-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .site-header {
        min-height: 170px;
        padding: 18px 16px;
        background-position: 62% center;
    }
    .site-header-inner {
        gap: 14px;
    }
    .site-emblem {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }
    .site-emblem img {
        width: 60px;
        height: 60px;
    }
    .site-title {
        font-size: 29px;
    }
    .site-subtitle {
        margin-top: 4px;
        font-size: 14px;
    }
    .site-credit-row {
        gap: 3px;
        margin-top: 10px;
        font-size: 11px;
        flex-direction: column;
    }
    .friend-links {
        padding-left: 0;
        border-left: 0;
    }
    .main-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 10px;
    }
    .nav-link {
        min-height: 44px;
        padding: 8px 11px;
        font-size: 14px;
    }
    .crumbs {
        margin-top: 16px;
        padding: 12px 14px;
        font-size: 13px;
    }
    .home-intro {
        margin: 20px 4px;
    }
    .home-intro h1 {
        font-size: 20px;
    }
    .site-footer {
        padding-bottom: 20px;
        font-size: 12px;
    }
    .ref-menu-grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px 8px;
    }
    .ref-menu-grid.large-task-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ref-item {
        font-size: 14px;
    }
    .ref-item img {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }
    .calendar-row {
        align-items: flex-start;
        gap: 8px;
        flex-direction: column;
    }
    .home-carousel {
        min-height: 170px;
    }
    .panel-body {
        padding: 9px;
    }
    .forum-table,
    .forum-table tbody,
    .forum-table tr,
    .forum-table td {
        display: block;
        width: 100%;
    }
    .forum-table {
        border-collapse: separate;
        table-layout: auto;
    }
    .forum-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .forum-table tbody tr {
        margin-bottom: 10px;
        overflow: hidden;
        border: 1px solid #b9cfe8;
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 3px 10px rgba(53, 89, 133, 0.08);
    }
    .forum-table tbody tr:last-child {
        margin-bottom: 0;
    }
    .forum-table td {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 10px;
        min-height: 42px;
        padding: 9px 10px;
        border: 0;
        border-bottom: 1px solid #e1ebf6;
        word-break: normal;
        overflow-wrap: anywhere;
    }
    .forum-table td:last-child {
        border-bottom: 0;
    }
    .forum-table td::before {
        content: attr(data-label);
        color: #315d8d;
        font-weight: 700;
    }
    .forum-table td[colspan] {
        display: block;
    }
    .forum-table td[colspan]::before {
        content: none;
    }
    .quick-guide-grid {
        grid-template-columns: 1fr;
    }
}

.quick-guide-intro {
    padding: 14px 16px;
    border-left: 4px solid #2f82ed;
    background: #f4f9ff;
    color: #526b87;
}

.quick-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quick-guide-card {
    padding: 14px;
    scroll-margin-top: 12px;
    border: 1px solid #c5d7eb;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
}

.quick-guide-card h2 {
    margin: 0 0 8px;
    color: #244f80;
    font-size: 18px;
}

.quick-guide-card ul {
    margin: 0;
    padding-left: 20px;
}

.quick-guide-card li+li {
    margin-top: 5px;
}

.quick-guide-source {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
}

@media (max-width: 760px) {
    .quick-guide-grid {
        grid-template-columns: 1fr;
    }
}

.route-hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.route-hero-card {
    padding: 15px;
    border: 1px solid #b8cee7;
    border-radius: 9px;
    background: linear-gradient(145deg, #f4f9ff 0%, #fff 100%);
}

.route-hero-card strong {
    display: block;
    margin-bottom: 7px;
    color: #174f8d;
    font-size: 18px;
}

.route-line {
    color: #213b5c;
    font-weight: 700;
}

.route-stack {
    display: grid;
    gap: 10px;
}

.route-step {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #c7d9ec;
    border-radius: 8px;
    background: #fff;
}

.route-step-label {
    display: grid;
    min-height: 76px;
    padding: 10px;
    place-items: center;
    background: #eaf4ff;
    color: #225789;
    font-weight: 700;
    text-align: center;
}

.route-step-body {
    padding: 11px 13px;
}

.route-step-body strong {
    color: #234f7d;
}

.route-step-body p {
    margin: 4px 0 0;
}

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

.fact-card {
    padding: 12px;
    border: 1px solid #c8d9ec;
    border-radius: 8px;
    background: #f9fcff;
}

.fact-card strong {
    display: block;
    margin-bottom: 4px;
    color: #235589;
}

.warning-box {
    padding: 12px 14px;
    border: 1px solid #e3c27b;
    border-left: 4px solid #cf8d16;
    background: #fff9e9;
    color: #674c1a;
}

.source-note {
    color: #61758c;
    font-size: 13px;
}

@media (max-width: 760px) {
    .route-hero,
    .fact-grid {
        grid-template-columns: 1fr;
    }
    .route-step {
        grid-template-columns: 68px minmax(0, 1fr);
    }
    .route-step-label {
        min-height: 88px;
        padding: 8px 6px;
    }
}
