/* GP Modern TOC v1.6.0 — 6 UI/UX Themes, LiteSpeed Extreme Safe, SEO-Clean Anchors & GeneratePress Safe Styles */
:root {
    --gp-mtoc-accent: var(--accent, #0284c7);
    --gp-mtoc-accent-rgb: 2, 132, 199;
    --gp-mtoc-accent-soft-sm: rgba(var(--gp-mtoc-accent-rgb), 0.08);
    --gp-mtoc-accent-soft: rgba(var(--gp-mtoc-accent-rgb), 0.10);
    --gp-mtoc-accent-soft-hover: rgba(var(--gp-mtoc-accent-rgb), 0.15);
    --gp-mtoc-scroll-offset: 80px;
    --gp-mtoc-bg: #ffffff;
    --gp-mtoc-surface: #f8fafc;
    --gp-mtoc-border: #e2e8f0;
    --gp-mtoc-text: #0f172a;
    --gp-mtoc-muted: #475569;
    --gp-mtoc-radius: 14px;
    --gp-mtoc-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

@supports (color: color-mix(in srgb, red 10%, transparent)) {
    :root {
        --gp-mtoc-accent-soft-sm: color-mix(in srgb, var(--gp-mtoc-accent) 9%, transparent);
        --gp-mtoc-accent-soft: color-mix(in srgb, var(--gp-mtoc-accent) 11%, transparent);
        --gp-mtoc-accent-soft-hover: color-mix(in srgb, var(--gp-mtoc-accent) 16%, transparent);
    }
}

.gp-mtoc-heading {
    scroll-margin-top: var(--gp-mtoc-scroll-offset);
}

/* =========================================================
   BASE & STYLE 1: DEFAULT (Accent Bar)
   ========================================================= */
.gp-mtoc-card {
    background: var(--gp-mtoc-bg);
    border: 1px solid var(--gp-mtoc-border);
    border-left: 4px solid var(--gp-mtoc-accent);
    border-radius: var(--gp-mtoc-radius);
    box-shadow: var(--gp-mtoc-shadow);
    margin: 1.5rem 0;
    overflow: hidden;
    font-family: inherit;
    box-sizing: border-box;
}

.gp-mtoc-card *,
.gp-mtoc-sheet * {
    box-sizing: border-box;
}

button.gp-mtoc-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px !important;
    margin: 0 !important;
    background: var(--gp-mtoc-surface) !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--gp-mtoc-text) !important;
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    text-align: left;
    box-shadow: none !important;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

button.gp-mtoc-header:hover,
button.gp-mtoc-header:focus-visible {
    background: #f1f5f9 !important;
    color: var(--gp-mtoc-text) !important;
    outline: none;
}

.gp-mtoc-header-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.gp-mtoc-title-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.gp-mtoc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gp-mtoc-accent);
    flex-shrink: 0;
}

.gp-mtoc-icon svg,
.gp-mtoc-chevron svg,
.gp-mtoc-sub-toggle svg,
.gp-mtoc-jump-arrow svg,
.gp-mtoc-header-badge svg,
.gp-mtoc-fab svg,
.gp-mtoc-sheet-close svg {
    display: block;
    flex-shrink: 0;
    stroke: currentColor;
}

.gp-mtoc-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gp-mtoc-text);
}

.gp-mtoc-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gp-mtoc-muted);
    transition: transform 0.22s ease;
    flex-shrink: 0;
}

button.gp-mtoc-header[aria-expanded="true"] .gp-mtoc-chevron {
    transform: rotate(180deg);
}

.gp-mtoc-body {
    padding: 8px 12px 12px;
    border-top: 1px solid var(--gp-mtoc-border);
}

.gp-mtoc-body[hidden] {
    display: none;
}

/* Lists & Rows (Number & Arrow outside <a> for clean SEO anchor text) */
.gp-mtoc-list,
.gp-mtoc-sublist {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gp-mtoc-item {
    border-bottom: 1px solid #f1f5f9;
}

.gp-mtoc-item:last-child {
    border-bottom: 0;
}

.gp-mtoc-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.gp-mtoc-row:hover {
    background: var(--gp-mtoc-surface);
}

.gp-mtoc-row.is-active-row {
    background: var(--gp-mtoc-accent-soft-sm);
}

.gp-mtoc-num {
    color: var(--gp-mtoc-accent);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    padding: 10px 0 10px 8px;
    min-width: 28px;
    flex-shrink: 0;
    user-select: none;
}

.gp-mtoc-link {
    display: block;
    flex: 1;
    border-radius: 8px;
    text-decoration: none !important;
    color: var(--gp-mtoc-text);
    line-height: 1.45;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.gp-mtoc-parent-link {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 8px 10px 4px;
}

.gp-mtoc-link:hover,
.gp-mtoc-link:focus-visible {
    color: var(--gp-mtoc-accent);
    outline: none;
}

.gp-mtoc-link.is-active {
    color: var(--gp-mtoc-accent);
    font-weight: 600;
}

.gp-mtoc-jump-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-height: 40px;
    color: var(--gp-mtoc-muted);
    flex-shrink: 0;
    pointer-events: none;
}

button.gp-mtoc-sub-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px !important;
    min-height: 40px;
    padding: 0 !important;
    margin: 2px 2px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 8px;
    color: var(--gp-mtoc-muted) !important;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

button.gp-mtoc-sub-toggle:hover,
button.gp-mtoc-sub-toggle:focus-visible {
    background: rgba(15, 23, 42, 0.05) !important;
    color: var(--gp-mtoc-accent) !important;
    outline: none;
}

button.gp-mtoc-sub-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

button.gp-mtoc-sub-toggle svg {
    transition: transform 0.2s ease;
}

.gp-mtoc-sublist {
    margin: 0 0 8px 14px !important;
    padding-left: 10px !important;
    border-left: 2px solid var(--gp-mtoc-border);
}

.gp-mtoc-sublist[hidden] {
    display: none;
}

.gp-mtoc-subitem {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.gp-mtoc-subitem:hover {
    background: var(--gp-mtoc-surface);
}

.gp-mtoc-subitem.is-active-row {
    background: var(--gp-mtoc-accent-soft-sm);
}

.gp-mtoc-subnum {
    color: var(--gp-mtoc-accent);
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.55;
    padding: 8px 0 8px 10px;
    min-width: 34px;
    flex-shrink: 0;
    opacity: 0.85;
    user-select: none;
}

.gp-mtoc-child-link {
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--gp-mtoc-muted);
    padding: 8px 8px 8px 4px;
}

.gp-mtoc-lvl-4 .gp-mtoc-subnum {
    padding-left: 20px;
}

.gp-mtoc-lvl-4 .gp-mtoc-child-link {
    font-size: 0.84rem;
}

/* =========================================================
   STYLE 2: MODERN PILL & TIMELINE (.gp-mtoc-style-modern_timeline)
   ========================================================= */
.gp-mtoc-card.gp-mtoc-style-modern_timeline {
    border: 1px solid #e5e9f0;
    border-left: 1px solid #e5e9f0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    padding: 6px 4px 10px;
}

.gp-mtoc-style-modern_timeline button.gp-mtoc-header {
    background: transparent !important;
    padding: 14px 16px 12px !important;
}

.gp-mtoc-style-modern_timeline button.gp-mtoc-header:hover,
.gp-mtoc-style-modern_timeline button.gp-mtoc-header:focus-visible {
    background: transparent !important;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-title-bar {
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 7px;
    border-radius: 999px;
    background: var(--gp-mtoc-accent);
}

.gp-mtoc-style-modern_timeline .gp-mtoc-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gp-mtoc-accent-soft);
    color: #1e293b;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.gp-mtoc-style-modern_timeline button.gp-mtoc-header:hover .gp-mtoc-header-badge {
    background: var(--gp-mtoc-accent-soft-hover);
}

.gp-mtoc-style-modern_timeline .gp-mtoc-body {
    border-top: 0;
    padding: 4px 14px 10px;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-item {
    border-bottom: 1px solid #e8edf4;
    padding: 4px 0;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-item.has-children {
    border-bottom: 1px solid #e8edf4;
    padding: 6px 0 10px;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-item:last-child {
    border-bottom: 0;
    padding-bottom: 2px;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-row-has-children {
    background: var(--gp-mtoc-accent-soft);
    border-radius: 12px;
    padding: 2px 4px;
    align-items: center;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-row-has-children:hover {
    background: var(--gp-mtoc-accent-soft-hover);
}

.gp-mtoc-style-modern_timeline .gp-mtoc-row-leaf {
    align-items: center;
    padding: 2px 4px;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-num {
    font-size: 1rem;
    font-weight: 800;
    padding: 10px 4px 10px 10px;
    min-width: 32px;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-parent-link {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    padding: 10px 8px 10px 4px;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-jump-arrow {
    display: inline-flex;
    color: #334155;
}

.gp-mtoc-style-modern_timeline button.gp-mtoc-sub-toggle {
    color: #1e293b !important;
    margin: 0 !important;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-sublist {
    position: relative;
    border-left: 0;
    margin: 10px 0 4px 16px !important;
    padding-left: 0 !important;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-sublist::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 12px;
    bottom: 12px;
    width: 1.5px;
    background: #dbe3ee;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-subitem {
    position: relative;
    padding-left: 22px;
    align-items: flex-start;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-subitem::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 13px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gp-mtoc-accent);
    z-index: 1;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-subnum {
    font-size: 0.88rem;
    font-weight: 700;
    opacity: 1;
    padding: 6px 2px 6px 0;
    min-width: 30px;
    line-height: 1.5;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-child-link {
    font-size: 0.92rem;
    color: #1e293b;
    padding: 6px 8px 6px 4px;
}

.gp-mtoc-style-modern_timeline .gp-mtoc-lvl-4 .gp-mtoc-subnum {
    padding-left: 8px;
}

/* =========================================================
   STYLE 3: CLEAN ACCORDION BOX (.gp-mtoc-style-clean_box)
   ========================================================= */
.gp-mtoc-card.gp-mtoc-style-clean_box {
    border: 1px solid #d5dde7;
    border-left: 1px solid #d5dde7;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.gp-mtoc-style-clean_box button.gp-mtoc-header {
    background: #f3f6fa !important;
    padding: 13px 16px !important;
}

.gp-mtoc-style-clean_box button.gp-mtoc-header:hover,
.gp-mtoc-style-clean_box button.gp-mtoc-header:focus-visible {
    background: #ebeff5 !important;
}

.gp-mtoc-style-clean_box .gp-mtoc-icon {
    color: #1e293b;
}

.gp-mtoc-style-clean_box .gp-mtoc-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #0f172a;
}

.gp-mtoc-style-clean_box .gp-mtoc-body {
    border-top: 1px solid #e2e8f0;
    padding: 12px 14px 12px;
}

.gp-mtoc-style-clean_box .gp-mtoc-item {
    border-bottom: 1px solid #e6ebf2;
    padding: 2px 0;
}

.gp-mtoc-style-clean_box .gp-mtoc-item.has-children {
    border-bottom: 1px solid #e6ebf2;
    padding: 4px 0 8px;
}

.gp-mtoc-style-clean_box .gp-mtoc-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.gp-mtoc-style-clean_box .gp-mtoc-row-has-children {
    background: var(--gp-mtoc-accent-soft-sm);
    border-radius: 8px;
    align-items: center;
    padding: 0 4px;
}

.gp-mtoc-style-clean_box .gp-mtoc-row-has-children:hover {
    background: var(--gp-mtoc-accent-soft-hover);
}

.gp-mtoc-style-clean_box .gp-mtoc-row-leaf {
    align-items: center;
    padding: 2px 4px;
}

.gp-mtoc-style-clean_box .gp-mtoc-num {
    font-size: 0.96rem;
    font-weight: 700;
    padding: 9px 2px 9px 8px;
    min-width: 28px;
}

.gp-mtoc-style-clean_box .gp-mtoc-parent-link {
    font-size: 0.96rem;
    font-weight: 700;
    color: #1e293b;
    padding: 9px 8px 9px 4px;
}

.gp-mtoc-style-clean_box .gp-mtoc-item.is-open .gp-mtoc-row-has-children .gp-mtoc-parent-link {
    color: var(--gp-mtoc-accent);
}

.gp-mtoc-style-clean_box .gp-mtoc-jump-arrow {
    display: inline-flex;
    color: #334155;
}

.gp-mtoc-style-clean_box button.gp-mtoc-sub-toggle {
    color: #1e293b !important;
    margin: 0 !important;
}

.gp-mtoc-style-clean_box .gp-mtoc-sublist {
    margin: 8px 0 4px 16px !important;
    padding-left: 12px !important;
    border-left: 1.5px solid #cbd5e1;
}

.gp-mtoc-style-clean_box .gp-mtoc-subnum {
    font-size: 0.88rem;
    font-weight: 700;
    opacity: 1;
    padding: 6px 2px 6px 4px;
    min-width: 32px;
    line-height: 1.5;
}

.gp-mtoc-style-clean_box .gp-mtoc-child-link {
    font-size: 0.91rem;
    color: #1e293b;
    padding: 6px 8px 6px 4px;
}

/* =========================================================
   Floating Trigger Button (High z-index & GP Button Reset)
   ========================================================= */
button.gp-mtoc-fab {
    position: fixed;
    z-index: 99990;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px !important;
    margin: 0 !important;
    background: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.24) !important;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, background-color 0.18s ease, padding 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

button.gp-mtoc-fab:hover,
button.gp-mtoc-fab:focus-visible {
    background: var(--gp-mtoc-accent) !important;
    color: #ffffff !important;
    outline: none;
}

button.gp-mtoc-fab.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gp-mtoc-fab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

button.gp-mtoc-pos-right-middle {
    top: 50%;
    right: 0;
    transform: translate(100%, -50%);
    border-radius: 12px 0 0 12px;
    border-right: 0 !important;
}

button.gp-mtoc-pos-right-middle.is-visible {
    transform: translate(0, -50%);
}

button.gp-mtoc-pos-left-middle {
    top: 50%;
    left: 0;
    transform: translate(-100%, -50%);
    border-radius: 0 12px 12px 0;
    border-left: 0 !important;
}

button.gp-mtoc-pos-left-middle.is-visible {
    transform: translate(0, -50%);
}

button.gp-mtoc-edge-icon_expand {
    width: auto;
    min-width: 44px !important;
    height: 46px;
    padding: 0 12px !important;
    gap: 0;
}

button.gp-mtoc-edge-icon_expand .gp-mtoc-fab-text {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width 0.24s ease, opacity 0.2s ease, margin 0.24s ease;
}

@media (hover: hover) and (pointer: fine) {
    button.gp-mtoc-edge-icon_expand:hover .gp-mtoc-fab-text,
    button.gp-mtoc-edge-icon_expand:focus-visible .gp-mtoc-fab-text {
        max-width: 140px;
        opacity: 1;
        margin-left: 8px;
    }

    button.gp-mtoc-pos-left-middle.gp-mtoc-edge-icon_expand {
        flex-direction: row-reverse;
    }

    button.gp-mtoc-pos-left-middle.gp-mtoc-edge-icon_expand:hover .gp-mtoc-fab-text,
    button.gp-mtoc-pos-left-middle.gp-mtoc-edge-icon_expand:focus-visible .gp-mtoc-fab-text {
        margin-left: 0;
        margin-right: 8px;
    }
}

button.gp-mtoc-edge-text_only {
    padding: 14px 9px !important;
    gap: 0;
}

button.gp-mtoc-edge-text_only .gp-mtoc-fab-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
}

button.gp-mtoc-pos-right-middle.gp-mtoc-edge-text_only .gp-mtoc-fab-text {
    transform: rotate(180deg);
}

button.gp-mtoc-pos-top-right {
    top: calc(var(--gp-mtoc-scroll-offset) + 10px);
    right: 16px;
    transform: translateY(-12px);
}

button.gp-mtoc-pos-top-right.is-visible {
    transform: translateY(0);
}

button.gp-mtoc-pos-top-left {
    top: calc(var(--gp-mtoc-scroll-offset) + 10px);
    left: 16px;
    transform: translateY(-12px);
}

button.gp-mtoc-pos-top-left.is-visible {
    transform: translateY(0);
}

button.gp-mtoc-pos-bottom-right {
    bottom: 20px;
    right: 16px;
    transform: translateY(16px);
}

button.gp-mtoc-pos-bottom-right.is-visible {
    transform: translateY(0);
}

button.gp-mtoc-pos-bottom-left {
    bottom: 20px;
    left: 16px;
    transform: translateY(16px);
}

button.gp-mtoc-pos-bottom-left.is-visible {
    transform: translateY(0);
}

/* =========================================================
   Backdrop & Bottom Sheet / Desktop Side Drawer
   ========================================================= */
.gp-mtoc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.gp-mtoc-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.gp-mtoc-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: var(--gp-mtoc-bg);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 35px rgba(15, 23, 42, 0.22);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s ease;
    font-family: inherit;
    overflow: hidden;
}

.gp-mtoc-sheet.is-open {
    transform: translateY(0);
    visibility: visible;
}

.gp-mtoc-sheet.is-dragging {
    transition: none !important;
}

.gp-mtoc-progress-track {
    width: 100%;
    height: 3px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.gp-mtoc-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gp-mtoc-accent);
    transition: width 0.15s ease-out;
}

.gp-mtoc-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
    cursor: grab;
    touch-action: none;
}

.gp-mtoc-sheet-handle span {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
}

.gp-mtoc-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 18px 12px;
    border-bottom: 1px solid var(--gp-mtoc-border);
    flex-shrink: 0;
}

.gp-mtoc-sheet-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gp-mtoc-text);
}

button.gp-mtoc-sheet-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--gp-mtoc-border) !important;
    border-radius: 999px !important;
    background: var(--gp-mtoc-surface) !important;
    color: var(--gp-mtoc-text) !important;
    line-height: 1 !important;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

button.gp-mtoc-sheet-close svg {
    width: 18px !important;
    height: 18px !important;
    stroke: var(--gp-mtoc-text) !important;
}

button.gp-mtoc-sheet-close:hover,
button.gp-mtoc-sheet-close:focus-visible {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    outline: none;
}

.gp-mtoc-sheet-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 10px 14px calc(20px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
    .gp-mtoc-sheet {
        top: 0;
        left: auto;
        right: 0;
        bottom: 0;
        width: 380px;
        max-width: 90vw;
        max-height: 100vh;
        border-radius: 16px 0 0 16px;
        transform: translateX(100%);
    }

    .gp-mtoc-sheet.is-open {
        transform: translateX(0);
    }

    .gp-mtoc-sheet-handle {
        display: none;
    }

    .gp-mtoc-sheet-header {
        padding: 16px 20px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gp-mtoc-chevron,
    .gp-mtoc-sub-toggle svg,
    .gp-mtoc-fab,
    .gp-mtoc-fab-text,
    .gp-mtoc-backdrop,
    .gp-mtoc-sheet,
    .gp-mtoc-progress-bar {
        transition: none !important;
    }
}

/* =========================================================
   COMMON v1.6.0: Count Pill, Sheet Quick Search & [hidden] Guard
   ========================================================= */
.gp-mtoc-card [hidden],
.gp-mtoc-sheet [hidden] {
    display: none !important;
}

.gp-mtoc-count-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--gp-mtoc-accent-soft);
    color: var(--gp-mtoc-accent);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.gp-mtoc-sheet-search-wrap {
    padding: 8px 16px 10px;
    border-bottom: 1px solid var(--gp-mtoc-border);
    background: var(--gp-mtoc-bg);
}

input.gp-mtoc-sheet-search {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px !important;
    margin: 0 !important;
    border: 1px solid var(--gp-mtoc-border) !important;
    border-radius: 10px !important;
    background: var(--gp-mtoc-surface) !important;
    color: var(--gp-mtoc-text) !important;
    font-size: 0.9rem !important;
    line-height: 1.3;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input.gp-mtoc-sheet-search:focus {
    border-color: var(--gp-mtoc-accent) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px var(--gp-mtoc-accent-soft) !important;
}

/* =========================================================
   STYLE 4: GLASSMORPHISM MODERN CARD (Mobile-First)
   ========================================================= */
.gp-mtoc-card.gp-mtoc-style-glass_capsule {
    border: 1px solid rgba(var(--gp-mtoc-accent-rgb), 0.22);
    border-left: 1px solid rgba(var(--gp-mtoc-accent-rgb), 0.22);
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(var(--gp-mtoc-accent-rgb), 0.08);
}

.gp-mtoc-style-glass_capsule button.gp-mtoc-header {
    background: linear-gradient(90deg, var(--gp-mtoc-accent-soft) 0%, rgba(255, 255, 255, 0.7) 100%) !important;
    padding: 15px 18px !important;
    border-bottom: 1px solid rgba(var(--gp-mtoc-accent-rgb), 0.12) !important;
}

.gp-mtoc-style-glass_capsule .gp-mtoc-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--gp-mtoc-accent);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(var(--gp-mtoc-accent-rgb), 0.28);
}

.gp-mtoc-style-glass_capsule .gp-mtoc-body {
    padding: 12px 14px 14px;
}

.gp-mtoc-style-glass_capsule .gp-mtoc-item {
    margin-bottom: 6px;
}

.gp-mtoc-style-glass_capsule .gp-mtoc-row {
    min-height: 44px;
    padding: 7px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.85);
    transition: transform 0.15s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.gp-mtoc-style-glass_capsule .gp-mtoc-row:hover,
.gp-mtoc-style-glass_capsule .gp-mtoc-row.is-active-row {
    border-color: rgba(var(--gp-mtoc-accent-rgb), 0.45);
    background: var(--gp-mtoc-accent-soft-sm);
    transform: translateX(2px);
}

.gp-mtoc-style-glass_capsule .gp-mtoc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gp-mtoc-accent);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
}

.gp-mtoc-style-glass_capsule .gp-mtoc-sublist {
    margin: 6px 0 4px 18px !important;
    padding-left: 12px !important;
    border-left: 2px dashed rgba(var(--gp-mtoc-accent-rgb), 0.28);
}

.gp-mtoc-style-glass_capsule .gp-mtoc-subitem {
    min-height: 36px;
    border-radius: 8px;
}

/* =========================================================
   STYLE 5: MOBILE QUICK-JUMP CHIPS (2-Col Desktop, Compact Mobile)
   ========================================================= */
.gp-mtoc-card.gp-mtoc-style-chip_pills {
    border: 1px solid var(--gp-mtoc-border);
    border-left: 1px solid var(--gp-mtoc-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.gp-mtoc-style-chip_pills button.gp-mtoc-header {
    background: #ffffff !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--gp-mtoc-border) !important;
}

.gp-mtoc-style-chip_pills .gp-mtoc-body {
    padding: 12px;
    background: var(--gp-mtoc-surface);
}

.gp-mtoc-style-chip_pills .gp-mtoc-list {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 640px) {
    .gp-mtoc-card.gp-mtoc-style-chip_pills .gp-mtoc-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gp-mtoc-style-chip_pills .gp-mtoc-item {
    margin: 0 !important;
    background: #ffffff;
    border: 1px solid var(--gp-mtoc-border);
    border-radius: 12px;
    padding: 4px 6px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.gp-mtoc-style-chip_pills .gp-mtoc-item:hover {
    border-color: rgba(var(--gp-mtoc-accent-rgb), 0.45);
    box-shadow: 0 3px 10px rgba(var(--gp-mtoc-accent-rgb), 0.08);
}

.gp-mtoc-style-chip_pills .gp-mtoc-row {
    min-height: 40px;
    padding: 4px 6px;
    border-radius: 8px;
}

.gp-mtoc-style-chip_pills .gp-mtoc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--gp-mtoc-accent-soft);
    color: var(--gp-mtoc-accent);
    font-size: 0.75rem;
    font-weight: 700;
}

.gp-mtoc-style-chip_pills .gp-mtoc-parent-link {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.35;
}

.gp-mtoc-style-chip_pills .gp-mtoc-sublist {
    margin: 4px 4px 6px 8px !important;
    padding: 6px 0 0 10px !important;
    border-top: 1px solid #f1f5f9;
    border-left: 2px solid var(--gp-mtoc-accent-soft);
}

.gp-mtoc-style-chip_pills .gp-mtoc-subitem {
    padding: 3px 6px;
    font-size: 0.84rem;
}

/* =========================================================
   STYLE 6: MINIMALIST EDITORIAL (01 / 02 / 03 Clean Typography)
   ========================================================= */
.gp-mtoc-card.gp-mtoc-style-minimal_editorial {
    border: 0;
    border-top: 3px solid var(--gp-mtoc-accent);
    border-bottom: 1px solid var(--gp-mtoc-border);
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
}

.gp-mtoc-style-minimal_editorial button.gp-mtoc-header {
    background: transparent !important;
    padding: 14px 4px 12px !important;
    border-bottom: 1px solid var(--gp-mtoc-border) !important;
}

.gp-mtoc-style-minimal_editorial button.gp-mtoc-header:hover {
    background: transparent !important;
}

.gp-mtoc-style-minimal_editorial .gp-mtoc-title {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gp-mtoc-style-minimal_editorial .gp-mtoc-body {
    padding: 10px 2px 12px;
}

.gp-mtoc-style-minimal_editorial .gp-mtoc-item {
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    padding: 4px 0;
    margin: 0 !important;
}

.gp-mtoc-style-minimal_editorial .gp-mtoc-item:last-child {
    border-bottom: 0;
}

.gp-mtoc-style-minimal_editorial .gp-mtoc-row {
    min-height: 40px;
    padding: 5px 4px;
    border-radius: 6px;
}

.gp-mtoc-style-minimal_editorial .gp-mtoc-num {
    font-size: 0;
    min-width: 26px;
}

.gp-mtoc-style-minimal_editorial .gp-mtoc-num::before {
    content: attr(data-pad);
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--gp-mtoc-accent);
    opacity: 0.85;
}

.gp-mtoc-style-minimal_editorial .gp-mtoc-parent-link {
    font-weight: 600;
    font-size: 0.94rem;
}

.gp-mtoc-style-minimal_editorial .gp-mtoc-sublist {
    margin: 2px 0 6px 26px !important;
    padding-left: 12px !important;
    border-left: 1px solid var(--gp-mtoc-border);
}
