:root {
    --gm-bg: #08111c;
    --gm-panel: #0f1b2a;
    --gm-panel-2: #142338;
    --gm-line: #263a53;
    --gm-text: #eaf3ff;
    --gm-muted: #98adc6;
    --gm-blue: #58aef5;
    --gm-green: #35d39a;
    --gm-yellow: #f6c84b;
}

html { scroll-behavior: smooth; }

.gm-manual-page {
    width: calc(100vw - 24px);
    margin-left: calc(50% - 50vw + 12px);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    background: var(--gm-bg);
    color: var(--gm-text);
    border: 1px solid #18283b;
}

.gm-manual-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 28px 18px;
    background: #09131f;
    border-right: 1px solid var(--gm-line);
}

.gm-manual-brand {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .06em;
}

.gm-manual-version {
    margin-top: 4px;
    color: var(--gm-yellow);
    font-weight: 700;
    font-size: 13px;
}

.gm-manual-nav {
    margin-top: 28px;
    display: grid;
    gap: 4px;
}

.gm-manual-nav a {
    padding: 10px 12px;
    border-radius: 7px;
    color: var(--gm-muted);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.35;
    border: 1px solid transparent;
}

.gm-manual-nav a:hover,
.gm-manual-nav a.active {
    color: #fff;
    background: var(--gm-panel-2);
    border-color: var(--gm-line);
}

.gm-manual-main {
    min-width: 0;
    padding: 34px clamp(18px, 4vw, 64px) 54px;
    max-width: 1500px;
}

.gm-manual-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    padding: 28px;
    background: linear-gradient(135deg, #12243b, #0d1928);
    border: 1px solid var(--gm-line);
    border-radius: 14px;
}

.gm-manual-kicker {
    color: var(--gm-yellow);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}

.gm-manual-hero h1 {
    margin: 8px 0 8px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
}

.gm-manual-hero p {
    margin: 0;
    color: var(--gm-muted);
    font-size: 15px;
}

.gm-manual-actions {
    display: grid;
    gap: 12px;
    justify-items: end;
    min-width: 220px;
}

.gm-manual-language {
    display: flex;
    background: #08111c;
    border: 1px solid var(--gm-line);
    border-radius: 8px;
    overflow: hidden;
}

.gm-manual-language a {
    padding: 9px 12px;
    color: var(--gm-muted);
    text-decoration: none;
    font-size: 13px;
}

.gm-manual-language a.active {
    color: #fff;
    background: #21466e;
}

.gm-manual-download {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 7px;
    background: #1f6da8;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.gm-manual-disclaimer,
.gm-manual-callout,
.gm-manual-endnote {
    margin: 22px 0;
    padding: 14px 16px;
    border-left: 3px solid var(--gm-yellow);
    background: #101b28;
    color: #c9d7e6;
    border-radius: 6px;
}

.gm-manual-principles,
.gm-manual-section {
    margin-top: 30px;
    padding: 26px;
    background: var(--gm-panel);
    border: 1px solid var(--gm-line);
    border-radius: 12px;
    scroll-margin-top: 18px;
}

.gm-manual-principles h2,
.gm-manual-section h2 {
    margin: 0 0 18px;
    color: var(--gm-blue);
    font-size: 25px;
}

.gm-manual-section h3 {
    margin-top: 26px;
    color: #bfe1ff;
    font-size: 18px;
}

.gm-manual-section p,
.gm-manual-principles p {
    color: #d2dfec;
    line-height: 1.75;
}

.gm-manual-list {
    margin: 12px 0 18px 22px;
    color: #d9e5f1;
    line-height: 1.75;
}

.gm-manual-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 18px 0 24px;
    border: 1px solid var(--gm-line);
    border-radius: 8px;
}

.gm-manual-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    background: #0b1624;
}

.gm-manual-table th,
.gm-manual-table td {
    padding: 11px 13px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #22364e;
    border-right: 1px solid #22364e;
    line-height: 1.55;
}

.gm-manual-table th {
    position: sticky;
    top: 0;
    background: #19324f;
    color: #fff;
    font-weight: 800;
}

.gm-manual-table td:first-child {
    width: 28%;
    color: #8fc9ff;
    font-weight: 700;
}

.gm-manual-figure {
    margin: 22px 0;
}

.gm-manual-shot {
    display: block;
    width: 100%;
    height: auto;
    max-height: 820px;
    object-fit: contain;
    background: #050a10;
    border: 1px solid #334a65;
    border-radius: 8px;
    cursor: zoom-in;
}

.gm-manual-figure figcaption,
.gm-manual-caption {
    margin-top: 8px;
    color: var(--gm-muted);
    font-size: 12px;
    text-align: center;
}

.gm-manual-figure-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.gm-manual-footer {
    margin-top: 34px;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    color: #7188a2;
    border-top: 1px solid var(--gm-line);
    font-size: 12px;
}

.gm-manual-toc-toggle {
    display: none;
}

.gm-manual-lightbox[hidden] {
    display: none;
}

.gm-manual-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 34px;
    background: rgba(0, 0, 0, .92);
}

.gm-manual-lightbox img {
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
}

.gm-manual-lightbox-close {
    position: fixed;
    top: 16px;
    right: 22px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #6c7f95;
    background: #111b28;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .gm-manual-page {
        display: block;
        width: 100vw;
        margin-left: calc(50% - 50vw);
    }

    .gm-manual-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 9998;
        width: min(84vw, 320px);
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 12px 0 36px rgba(0,0,0,.45);
    }

    .gm-manual-sidebar.open {
        transform: translateX(0);
    }

    .gm-manual-toc-toggle {
        display: block;
        position: fixed;
        z-index: 9999;
        left: 12px;
        bottom: 16px;
        width: 46px;
        height: 46px;
        border-radius: 50%;
        border: 1px solid var(--gm-line);
        background: #1d4d78;
        color: #fff;
        font-size: 21px;
        box-shadow: 0 6px 20px rgba(0,0,0,.35);
    }

    .gm-manual-main {
        padding: 18px 12px 40px;
    }

    .gm-manual-hero {
        display: grid;
        padding: 22px 18px;
    }

    .gm-manual-actions {
        justify-items: start;
        min-width: 0;
    }

    .gm-manual-principles,
    .gm-manual-section {
        padding: 18px 14px;
    }

    .gm-manual-figure-grid {
        grid-template-columns: 1fr;
    }
}

/* Quick Troubleshooting Checklist */
.gm-troubleshooting {
    scroll-margin-top: 24px;
}

.gm-trouble-quick,
.gm-trouble-support {
    margin: 20px 0;
    padding: 18px;
    border: 1px solid var(--gm-line);
    border-radius: 10px;
    background: #0d1927;
}

.gm-trouble-quick h3,
.gm-trouble-support h3 {
    margin: 0 0 14px;
    color: #d9ecff;
}

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

.gm-trouble-grid > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #29425e;
    border-radius: 8px;
    background: #101f30;
}

.gm-trouble-grid strong {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1f5f91;
    color: #fff;
    font-size: 12px;
}

.gm-trouble-toolbar {
    position: sticky;
    top: 8px;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    margin: 20px 0 12px;
    padding: 10px;
    border: 1px solid #2d4764;
    border-radius: 10px;
    background: rgba(11, 24, 38, .96);
    backdrop-filter: blur(8px);
}

.gm-trouble-toolbar label {
    color: #9ec6ec;
    font-size: 12px;
    font-weight: 700;
}

.gm-trouble-search {
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid #355270;
    border-radius: 7px;
    outline: none;
    background: #09131f;
    color: #fff;
}

.gm-trouble-search:focus {
    border-color: #69b8ff;
}

.gm-trouble-toolbar button {
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid #355270;
    border-radius: 7px;
    background: #17314b;
    color: #d8ebff;
    cursor: pointer;
    white-space: nowrap;
}

.gm-trouble-toolbar button:hover {
    background: #214463;
}

.gm-trouble-list {
    display: grid;
    gap: 9px;
}

.gm-trouble-item {
    border: 1px solid #293f59;
    border-radius: 9px;
    overflow: hidden;
    background: #0b1724;
}

.gm-trouble-item[hidden] {
    display: none;
}

.gm-trouble-item summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    cursor: pointer;
    color: #eaf5ff;
    font-weight: 750;
    list-style: none;
    user-select: none;
}

.gm-trouble-item summary::-webkit-details-marker {
    display: none;
}

.gm-trouble-item summary::after {
    content: "+";
    margin-left: auto;
    color: #78bfff;
    font-size: 20px;
    line-height: 1;
}

.gm-trouble-item[open] summary {
    background: #11263a;
    border-bottom: 1px solid #293f59;
}

.gm-trouble-item[open] summary::after {
    content: "−";
}

.gm-trouble-number {
    display: inline-grid;
    place-items: center;
    flex: 0 0 34px;
    min-width: 34px;
    height: 26px;
    border: 1px solid #35638b;
    border-radius: 6px;
    background: #123352;
    color: #9fd3ff;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.gm-trouble-body {
    padding: 14px 16px 16px;
    color: #c4d5e5;
}

.gm-trouble-body > :first-child {
    margin-top: 0;
}

.gm-trouble-body > :last-child {
    margin-bottom: 0;
}

.gm-trouble-body code {
    padding: 2px 5px;
    border: 1px solid #2d4864;
    border-radius: 4px;
    background: #07111c;
    color: #a8d7ff;
}

@media (max-width: 900px) {
    .gm-trouble-grid {
        grid-template-columns: 1fr;
    }

    .gm-trouble-toolbar {
        position: static;
        grid-template-columns: 1fr 1fr;
    }

    .gm-trouble-toolbar label,
    .gm-trouble-search {
        grid-column: 1 / -1;
    }
}

/* GM_TEMP_HIDE_MASTER_FOLLOWER_BEGIN */
.gm-manual-nav a[href="#section-7"],
.gm-manual-nav a[href="#section-8"],
#section-7,
#section-8,
.gm-manual-download { display: none !important; }
/* GM_TEMP_HIDE_MASTER_FOLLOWER_END */
