:root {
    --gd-accent: var(--blood, #c6272d);
    --gd-accent-dark: var(--blood-dark, #9b1e22);
    --gd-accent-subtle: var(--blood-subtle, #f9e5e6);
    --gd-accent-border: var(--blood-border, #f2b8ba);
    --gd-ink: #1c1f26;
    --gd-glow: rgba(198, 39, 45, .3);
    --gd-dim: rgba(16, 18, 24, .5);
    --gd-shadow: 0 6px 24px rgba(23, 25, 28, .07);
    --gd-phone-radius: 1.3rem;
}

.gd-help {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1;
    transition: background-color .15s ease;
}

.gd-help:hover,
.gd-help:focus-visible {
    background: rgba(255, 255, 255, .35);
    color: #fff;
}

.gd-card {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--gd-shadow);
}

.gd-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--bs-gray-200);
}

.gd-card-heading {
    flex: 1;
    min-width: 0;
}

.gd-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .75rem;
    background: var(--gd-accent-subtle);
}

.gd-icon i {
    font-size: 1.5rem;
    color: var(--gd-accent);
}

.gd-chapter {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bs-gray-900);
}

.gd-summary {
    margin: .2rem 0 0;
    color: var(--bs-gray-600);
}

.gd-all i {
    font-size: 1.1rem;
}

.gd {
    display: flex;
    flex-direction: column;
}

.gd-side {
    display: contents;
}

.gd-progress {
    order: 1;
    display: flex;
    gap: 4px;
    padding: 0 1.25rem;
}

.gd-progress button {
    flex: 1;
    height: 16px;
    padding: 6px 0;
    border: 0;
    background: none;
}

.gd-progress button::before {
    content: "";
    display: block;
    height: 4px;
    border-radius: 2px;
    background: var(--bs-gray-200);
    transition: background-color .2s ease;
}

.gd-progress button.is-done::before {
    background: var(--gd-accent);
}

.gd-progress button:hover::before {
    background: var(--gd-accent-border);
}

.gd-progress button.is-done:hover::before {
    background: var(--gd-accent-dark);
}

.gd-head {
    order: 2;
    padding: 1rem 1.25rem .25rem;
}

.gd-stage {
    order: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 1.25rem 1rem;
    background: linear-gradient(180deg, #f5f6f8 0%, #eceef2 100%);
    touch-action: pan-y;
}

.gd-legend {
    order: 4;
    padding: 1rem 1.25rem .5rem;
}

.gd-nav {
    order: 5;
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    background: var(--bs-body-bg, #fff);
    border-top: 1px solid var(--bs-gray-200);
}

.gd-v-desktop {
    display: none;
}

.gd-figure {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.gd-frame {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 6px;
    border-radius: calc(var(--gd-phone-radius) + 6px);
    background: #16181d;
    box-shadow: 0 18px 40px rgba(16, 18, 24, .24);
}

.gd-browser {
    display: none;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 12px;
    border-bottom: 1px solid #e5e7eb;
    border-radius: .75rem .75rem 0 0;
    background: #f3f4f6;
}

.gd-browser span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d3d6dc;
}

.gd-shot {
    position: relative;
}

.gd-shot img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(68vh, 640px);
    border-radius: var(--gd-phone-radius);
    user-select: none;
    -webkit-user-drag: none;
}

.gd-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.gd-dim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: var(--gd-dim);
    clip-path: inset(0 round var(--gd-phone-radius));
}

.gd-mark {
    position: absolute;
    border: 2px solid var(--gd-accent);
    border-radius: 7px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 0 7px var(--gd-glow);
    transition: opacity .2s ease, box-shadow .2s ease;
}

.gd-mark b {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gd-accent);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, .3);
}

.gd-mark.has-bubble b {
    display: none;
}

.gd--panel .gd-bubble,
.gd--compact .gd-bubble {
    display: none;
}

.gd--panel .gd-mark.has-bubble b,
.gd--compact .gd-mark.has-bubble b {
    display: flex;
}

.gd-bubble {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: max-content;
    max-width: 15rem;
    padding: .4rem .7rem .4rem .4rem;
    border-radius: .65rem;
    background: var(--gd-ink);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .32);
    transition: opacity .2s ease;
}

.gd-bubble::before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: inherit;
    transform: rotate(45deg);
}

.gd-bubble b {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--gd-accent);
    font-size: .72rem;
}

.gd-bubble strong {
    color: #fff;
}

.gd-bubble--right {
    transform: translateY(-50%);
}

.gd-bubble--right::before {
    top: calc(50% - 5px);
    left: -4px;
}

.gd-bubble--left {
    transform: translate(-100%, -50%);
}

.gd-bubble--left::before {
    top: calc(50% - 5px);
    right: -4px;
}

.gd-bubble--below {
    transform: translateX(-50%);
}

.gd-bubble--below::before {
    top: -4px;
    left: calc(50% - 5px);
}

.gd-bubble--above {
    transform: translate(-50%, -100%);
}

.gd-bubble--above::before {
    bottom: -4px;
    left: calc(50% - 5px);
}

.gd-layer.has-focus .gd-mark:not(.is-focus),
.gd-layer.has-focus .gd-bubble:not(.is-focus) {
    opacity: .3;
}

.gd-mark.is-focus {
    box-shadow: 0 0 0 2px #fff, 0 0 0 10px rgba(198, 39, 45, .45);
}

.gd-zoom {
    position: absolute;
    top: -.85rem;
    right: -.85rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--gd-ink);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    transition: background-color .15s ease;
}

.gd-zoom span {
    display: none;
}

.gd-zoom:hover,
.gd-zoom:focus-visible {
    background: var(--gd-accent);
}

.gd-zoom i {
    font-size: 1rem;
    color: inherit;
}

.gd-count {
    margin-bottom: .35rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gd-accent);
}

.gd-title {
    margin-bottom: .6rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-gray-900);
}

.gd-where {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
    margin-bottom: .75rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bs-gray-700);
}

.gd-where > i:first-child {
    margin-right: .1rem;
    font-size: 1.05rem;
    color: var(--gd-accent);
}

.gd-where > span {
    padding: .18rem .55rem;
    border-radius: 1rem;
    background: var(--bs-gray-100, #f5f8fa);
}

.gd-where-sep {
    font-size: .7rem;
    color: var(--bs-gray-400);
}

.gd-lead {
    margin-bottom: .5rem;
    font-size: .95rem;
    line-height: 1.55;
    color: var(--bs-gray-700);
}

.gd-ui {
    display: inline-block;
    padding: 0 .4rem;
    border: 1px solid var(--bs-gray-300);
    border-bottom-width: 2px;
    border-radius: .35rem;
    background: #fff;
    color: var(--bs-gray-800);
    font-size: .9em;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.gd-list {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.gd-item {
    display: grid;
    grid-template-columns: 1.65rem 1fr;
    gap: .65rem;
    align-items: start;
    padding: .6rem .7rem;
    border-radius: .75rem;
    background: var(--bs-gray-100, #f5f8fa);
    outline: 0;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.gd-item + .gd-item {
    margin-top: .5rem;
}

.gd-item:hover,
.gd-item.is-focus {
    background: #fff;
    box-shadow: 0 0 0 1px var(--gd-accent-border), 0 4px 14px rgba(198, 39, 45, .1);
}

.gd-item-n {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--gd-accent);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    box-shadow: 0 0 0 3px var(--gd-accent-subtle);
}

.gd-item-label {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    color: var(--bs-gray-900);
}

.gd-item-text {
    display: block;
    margin-top: .1rem;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--bs-gray-600);
}

.gd-note {
    display: flex;
    gap: .6rem;
    margin-bottom: .75rem;
    padding: .7rem .85rem;
    border-radius: .75rem;
    font-size: .88rem;
    line-height: 1.45;
}

.gd-note p {
    margin: 0;
}

.gd-note i {
    flex: none;
    margin-top: .05rem;
    font-size: 1.2rem;
}

.gd-note--tip {
    background: #eef6ff;
    color: #1c4f86;
}

.gd-note--tip i {
    color: #3e97ff;
}

.gd-note--warn {
    background: #fff5e6;
    color: #7a4d00;
}

.gd-note--warn i {
    color: #f29d0b;
}

.gd-goto {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .5rem;
    padding: .5rem .9rem;
    border: 1px solid var(--gd-accent-border);
    border-radius: .6rem;
    background: #fff;
    color: var(--gd-accent);
    font-weight: 600;
    transition: background-color .15s ease;
}

.gd-goto:hover {
    background: var(--gd-accent-subtle);
    color: var(--gd-accent-dark);
}

.gd-goto i,
.gd-nav .btn i {
    font-size: 1rem;
    color: inherit;
}

.gd-nav .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.gd-nav .gd-next {
    border: 0;
    background: var(--gd-accent);
    color: #fff;
}

.gd-nav .gd-next:hover,
.gd-nav .gd-next:focus-visible {
    background: var(--gd-accent-dark);
    color: #fff;
}

.gd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(12, 13, 17, .88);
    cursor: zoom-out;
}

.gd-lightbox .gd-layer {
    display: block;
}

.gd-lightbox .gd-shot img {
    max-width: calc(100vw - 4rem);
    max-height: calc(100vh - 6rem);
}

@media (min-width: 768px) {
    .has-desktop .gd-v-desktop {
        display: block;
    }

    .has-desktop .gd-v-mobile {
        display: none;
    }

    .has-desktop .gd-frame,
    .gd-lightbox .gd-frame.is-desktop {
        padding: 0;
        border-radius: .75rem;
        background: #fff;
        box-shadow: 0 18px 44px rgba(16, 18, 24, .16), 0 0 0 1px rgba(16, 18, 24, .08);
    }

    .has-desktop .gd-browser,
    .gd-lightbox .is-desktop .gd-browser {
        display: flex;
    }

    .has-desktop .gd-shot img,
    .gd-lightbox .is-desktop .gd-shot img {
        border-radius: 0 0 .75rem .75rem;
    }

    .has-desktop .gd-zoom {
        top: 3px;
        right: 8px;
        width: auto;
        height: 20px;
        padding: 0 .55rem;
        gap: .25rem;
        border: 0;
        border-radius: 1rem;
        box-shadow: none;
        font-size: .7rem;
        font-weight: 600;
    }

    .has-desktop .gd-zoom span {
        display: inline;
    }

    .gd--page .has-desktop .gd-shot img {
        max-height: calc(100vh - 15rem);
    }

    .has-desktop .gd-dim,
    .gd-lightbox .is-desktop .gd-dim {
        clip-path: inset(0 round 0 0 .75rem .75rem);
    }

    .gd--page .gd-stage {
        padding: 1.5rem;
    }
}

@media (min-width: 992px) {
    .gd--page {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 21rem;
        grid-template-areas: "progress progress" "head head" "stage legend" "nav nav";
    }

    .gd--page .gd-progress {
        grid-area: progress;
        padding: 1.1rem 1.75rem 0;
    }

    .gd--page .gd-head {
        grid-area: head;
        padding: .6rem 1.75rem 1.1rem;
        border-bottom: 1px solid var(--bs-gray-200);
    }

    .gd--page .gd-head-top {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .35rem 1rem;
        margin-bottom: .35rem;
    }

    .gd--page .gd-head-top .gd-title,
    .gd--page .gd-head-top .gd-where {
        margin-bottom: 0;
    }

    .gd--page .gd-lead {
        max-width: 60rem;
        margin-bottom: 0;
    }

    .gd--page .gd-stage {
        grid-area: stage;
        padding: 1.5rem;
    }

    .gd--page .gd-legend:not([hidden]) {
        grid-area: legend;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 1.5rem 1.75rem 1.25rem 1.5rem;
        border-left: 1px solid var(--bs-gray-200);
    }

    .gd--page .gd-legend > * {
        align-self: stretch;
    }

    .gd--page .gd-legend > .gd-goto {
        align-self: flex-start;
    }

    .gd--page .gd-nav {
        grid-area: nav;
        position: static;
        padding: 1rem 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .gd-card-head {
        padding: 1.25rem;
    }

    .gd-all span {
        display: none;
    }
}

.gd-panel {
    --bs-offcanvas-width: 520px;
}

.gd-panel .offcanvas-header {
    gap: .75rem;
    border-bottom: 1px solid var(--bs-gray-200);
}

.gd-panel-heading {
    flex: 1;
    min-width: 0;
}

.gd-eyebrow {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--bs-gray-500);
}

.gd-panel-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bs-gray-900);
}

.gd-panel .offcanvas-body {
    padding: 0;
}

.gd-panel .gd {
    min-height: 100%;
}

.gd--panel .gd-shot img {
    max-height: 58vh;
}

.gd--compact .gd-shot img {
    max-height: 50vh;
}

@media (max-width: 575.98px) {
    .gd-panel {
        --bs-offcanvas-width: 100%;
    }
}

.gd-index-head {
    margin-bottom: 1.75rem;
}

.gd-index-head .gd-chapter {
    font-size: 1.75rem;
}

.gd-index-head .gd-summary {
    margin-top: .35rem;
    font-size: 1.1rem;
}

.gd-chapters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.gd-chapter-card {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.5rem;
    border: 1px solid transparent;
    border-radius: 1.25rem;
    background: var(--bs-body-bg);
    box-shadow: var(--gd-shadow);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.gd-chapter-card:hover {
    border-color: var(--gd-accent);
    box-shadow: 0 12px 32px rgba(23, 25, 28, .1);
    transform: translateY(-3px);
}

.gd-chapter-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.gd-chapter-card .gd-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
}

.gd-chapter-card .gd-icon i {
    font-size: 1.85rem;
}

@media (min-width: 768px) {
    .gd-chapters {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .gd-chapter-card {
        padding: 2rem;
    }

    .gd-chapter-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1200px) {
    .gd-chapters {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }

    .gd-chapter-card {
        padding: 2.25rem;
    }

    .gd-chapter-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .gd-chapter-card .gd-icon {
        width: 3.85rem;
        height: 3.85rem;
    }

    .gd-chapter-card .gd-icon i {
        font-size: 2.05rem;
    }
}

.gd-status {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .85rem;
    border-radius: 1rem;
    font-size: .9rem;
    font-weight: 600;
}

.gd-status.is-new {
    background: var(--gd-accent-subtle);
    color: var(--gd-accent);
}

.gd-status.is-seen {
    background: var(--bs-gray-100);
    color: var(--bs-gray-600);
}

.gd-status.is-done {
    background: var(--bs-success-light, #e8fff3);
    color: var(--bs-success, #50cd89);
}

.gd-status i {
    font-size: 1rem;
    color: inherit;
}

.gd-resume {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding: 1.25rem 1.75rem;
    border: 1px solid var(--gd-accent-border);
    border-radius: 1.25rem;
    background: var(--bs-body-bg);
    box-shadow: var(--gd-shadow);
    transition: border-color .15s ease;
}

.gd-resume:hover {
    border-color: var(--gd-accent);
}

.gd-resume .gd-chapter-name {
    font-size: 1.2rem;
}

.gd-resume .gd-icon {
    width: 3.25rem;
    height: 3.25rem;
}

.gd-resume .gd-icon i {
    font-size: 1.7rem;
}

.gd-resume-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gd-resume-arrow,
.gd-chapter-meta i {
    font-size: 1.4rem;
    color: var(--gd-accent);
    transition: transform .15s ease;
}

.gd-resume:hover .gd-resume-arrow,
.gd-chapter-card:hover .gd-chapter-meta i {
    transform: translateX(4px);
}

.gd-chapter-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-gray-900);
}

.gd-chapter-card .gd-chapter-name {
    font-size: 1.45rem;
    line-height: 1.3;
}

.gd-chapter-summary {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--bs-gray-600);
}

.gd-chapter-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-gray-200);
    font-size: .95rem;
    font-weight: 600;
    color: var(--bs-gray-500);
}
