.gt-save-root {
    --gt-bg: #1b202b;
    --gt-bg-soft: #232936;
    --gt-line: rgba(255, 255, 255, 0.09);
    --gt-text: #f2f5fa;
    --gt-sub: #98a3b8;
    --gt-accent: #ffcf5c;
    --gt-accent-ink: #2a2105;
    --gt-danger: #ff8080;
    --gt-ok: #63d6a3;
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
        "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--gt-text);
}

.gt-save-root *,
.gt-save-root *::before,
.gt-save-root *::after {
    box-sizing: border-box;
}
.gt-save-fab {
    position: fixed;
    right: 14px;
    bottom: 96px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(24, 28, 38, 0.82);
    color: #ffe6a8;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
    pointer-events: auto;
    touch-action: none;
    opacity: 0.72;
    transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.gt-save-fab:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}

.gt-save-fab:active {
    transform: scale(0.95);
}

.gt-music-fab {
    position: fixed;
    right: 14px;
    bottom: 150px;
    width: 46px;
    height: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 2.5px solid #4a3222;
    background: linear-gradient(180deg, #66c8f5 0%, #3aa6e0 100%);
    color: #ffffff;
    box-shadow: 0 4px 0 #4a3222, 0 7px 14px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
}

.gt-music-fab svg {
    filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.25));
}

.gt-music-fab:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.gt-music-fab:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #4a3222, 0 3px 8px rgba(0, 0, 0, 0.22);
}

.gt-music-fab:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

.gt-music-fab.is-muted {
    background: linear-gradient(180deg, #aab6c2 0%, #8b98a5 100%);
}

.gt-save-mask {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(8, 11, 16, 0.52);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    pointer-events: auto;
}

.gt-save-mask[hidden] {
    display: none;
}

.gt-save-panel {
    width: 344px;
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 18px 18px 16px;
    border-radius: 18px;
    border: 1px solid var(--gt-line);
    background: var(--gt-bg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.17s ease, transform 0.17s ease;
}

.gt-save-panel.is-open {
    opacity: 1;
    transform: none;
}

.gt-save-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.gt-save-head-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gt-save-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--gt-text);
}

.gt-save-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--gt-ok);
    background: rgba(99, 214, 163, 0.12);
    border: 1px solid rgba(99, 214, 163, 0.3);
    white-space: nowrap;
}

.gt-save-x {
    flex: none;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--gt-sub);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.gt-save-x:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.gt-save-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 12px;
    background: var(--gt-bg-soft);
    border: 1px solid var(--gt-line);
}

.gt-save-switch-text {
    min-width: 0;
}

.gt-save-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gt-text);
}

.gt-save-hint {
    margin-top: 3px;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--gt-sub);
}

.gt-save-switch {
    position: relative;
    flex: none;
    width: 46px;
    height: 27px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.gt-save-switch.is-on {
    background: rgba(255, 207, 92, 0.92);
    border-color: rgba(255, 207, 92, 0.95);
}

.gt-save-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s cubic-bezier(0.3, 0.7, 0.4, 1);
}

.gt-save-switch.is-on .gt-save-knob {
    transform: translateX(19px);
}

.gt-save-stats {
    margin: 12px 0 4px;
    border-radius: 12px;
    border: 1px solid var(--gt-line);
    overflow: hidden;
}

.gt-save-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 13px;
    font-size: 12.5px;
}

.gt-save-stat + .gt-save-stat {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gt-save-stat-label {
    color: var(--gt-sub);
    white-space: nowrap;
}

.gt-save-stat-value {
    font-weight: 600;
    color: var(--gt-text);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.gt-save-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.gt-save-btn {
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--gt-line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--gt-text);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.gt-save-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.gt-save-btn:active {
    transform: scale(0.98);
}

.gt-save-btn.primary {
    background: var(--gt-accent);
    border-color: var(--gt-accent);
    color: var(--gt-accent-ink);
    font-weight: 600;
}

.gt-save-btn.primary:hover {
    background: #ffdb85;
}

.gt-save-btn.danger {
    color: var(--gt-danger);
    border-color: rgba(255, 128, 128, 0.25);
    background: rgba(255, 128, 128, 0.07);
}

.gt-save-btn.danger:hover {
    background: rgba(255, 128, 128, 0.14);
}


.gt-save-note {
    margin: 12px 2px 0;
    font-size: 11px;
    line-height: 1.65;
    color: var(--gt-sub);
}


.gt-save-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -8px);
    max-width: min(86vw, 380px);
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(20, 24, 33, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f4f7fb;
    font-size: 12.5px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.gt-save-toast[hidden] {
    display: none;
}

.gt-save-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}


@media (max-width: 420px) {
    .gt-save-panel {
        width: 100%;
        padding: 16px 15px 14px;
        border-radius: 16px;
    }

    .gt-save-title {
        font-size: 16px;
    }

    .gt-save-fab {
        width: 40px;
        height: 40px;
        right: 10px;
        bottom: 84px;
    }

    .gt-music-fab {
        width: 42px;
        height: 42px;
        right: 11px;
        bottom: 134px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gt-save-panel,
    .gt-save-fab,
    .gt-save-knob,
    .gt-save-toast {
        transition: none;
    }
}
