/* Style Learning 系列 · 五便签学习指引 */
body.sl-guide-open {
    overflow: hidden;
}

body.sl-guide-open .qaw-fab,
body.sl-guide-open .qaw-panel {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.sl-guide-nav-item {
    display: flex;
    align-items: center;
    list-style: none;
}

.sl-guide-trigger {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid rgba(83, 66, 26, .24);
    border-radius: 7px 7px 11px 7px;
    background: #fff0aa;
    color: #2a2418;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    font: 800 12px/1.2 "Noto Sans SC", "Microsoft YaHei", sans-serif;
    white-space: nowrap;
    cursor: pointer;
    transform: rotate(-.55deg);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.sl-guide-trigger:hover {
    background: #fff5c6;
    box-shadow: 0 7px 16px rgba(0, 0, 0, .22);
    transform: translateY(-1px) rotate(0);
}

.sl-guide-trigger:focus-visible,
.sl-guide-close:focus-visible,
.sl-guide-tab:focus-visible,
.sl-guide-pane:focus-visible {
    outline: 3px solid var(--sl-guide-accent, #e3a72f);
    outline-offset: 3px;
}

.sl-guide-root {
    --sl-guide-accent: #e3a72f;
    position: fixed;
    inset: 0;
    z-index: 100100;
    visibility: hidden;
    pointer-events: none;
}

.sl-guide-root.show {
    visibility: visible;
    pointer-events: auto;
}

.sl-guide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, .72);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity .24s ease;
}

.sl-guide-root.show .sl-guide-overlay {
    opacity: 1;
}

.sl-guide-dialog {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(660px, calc(100vw - 24px));
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
    border-left: 1px solid #3a3a3c;
    background: #101012;
    color: #ecebea;
    box-shadow: -20px 0 64px rgba(0, 0, 0, .5);
    transform: translateX(104%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

.sl-guide-root.show .sl-guide-dialog {
    transform: translateX(0);
}

.sl-guide-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 14px;
    align-items: start;
    padding: 20px 20px 17px 24px;
    border-bottom: 1px solid #3c3527;
    background: linear-gradient(135deg, #292414 0%, #181719 58%, #111c20 100%);
}

.sl-guide-kicker {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 6px;
    color: #c4b88d;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .12em;
}

.sl-guide-kicker span {
    display: inline-grid;
    min-height: 23px;
    place-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--sl-guide-accent);
    color: #151515;
    letter-spacing: .04em;
}

.sl-guide-head h2 {
    margin: 0;
    color: #fff;
    font-size: 1.42rem;
    line-height: 1.22;
}

.sl-guide-head p:last-child {
    max-width: 530px;
    margin: 7px 0 0;
    color: #a9a8a6;
    font-size: .78rem;
    line-height: 1.65;
}

.sl-guide-close {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid #414143;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    color: #aaa;
    font-size: 1.18rem;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.sl-guide-close:hover {
    background: #29292b;
    color: #fff;
    transform: rotate(4deg);
}

.sl-guide-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    padding: 12px 14px 14px;
    border-bottom: 1px solid #303033;
    background: #151517;
}

.sl-guide-tab {
    --sl-note: #fff0aa;
    min-width: 0;
    min-height: 64px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 7px 3px;
    border: 2px solid transparent;
    border-radius: 5px 5px 10px 5px;
    background: var(--sl-note);
    color: #211e16;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .32);
    transform: rotate(-.7deg);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.sl-guide-tab:nth-child(2) { --sl-note: #d9f1e8; transform: rotate(.7deg); }
.sl-guide-tab:nth-child(3) { --sl-note: #e7e1fa; transform: rotate(-.45deg); }
.sl-guide-tab:nth-child(4) { --sl-note: #dcecf7; transform: rotate(.6deg); }
.sl-guide-tab:nth-child(5) { --sl-note: #f8dfe6; transform: rotate(-.55deg); }

.sl-guide-tab > span {
    font: 900 .62rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    opacity: .58;
}

.sl-guide-tab > b {
    font-size: .72rem;
    line-height: 1.25;
}

.sl-guide-tab-short { display: none; }

.sl-guide-tab:hover {
    transform: translateY(-2px) rotate(0);
    box-shadow: 0 7px 14px rgba(0, 0, 0, .38);
}

.sl-guide-tab.is-active {
    border-color: var(--sl-guide-accent);
    transform: translateY(2px) rotate(0);
    box-shadow: 0 3px 0 rgba(255, 255, 255, .15), 0 8px 16px rgba(0, 0, 0, .38);
}

.sl-guide-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 22px max(30px, env(safe-area-inset-bottom));
    background:
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(255, 255, 255, .018) 27px 28px),
        #0c0c0e;
    scrollbar-width: thin;
    scrollbar-color: #505054 transparent;
}

.sl-guide-body::-webkit-scrollbar { width: 6px; }
.sl-guide-body::-webkit-scrollbar-thumb { border-radius: 9px; background: #505054; }
.sl-guide-pane[hidden] { display: none !important; }
.sl-guide-pane { animation: slGuidePaneIn .18s ease-out; }

@keyframes slGuidePaneIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: none; }
}

.sl-guide-pane-head { margin-bottom: 14px; }
.sl-guide-pane-head > p {
    margin: 0 0 5px;
    color: var(--sl-guide-accent);
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .12em;
}
.sl-guide-pane-head h3 { margin: 0; color: #fff; font-size: 1.12rem; line-height: 1.35; }
.sl-guide-pane-head > span { display: block; margin-top: 6px; color: #999; font-size: .76rem; line-height: 1.7; }

.sl-guide-formula {
    margin: 0 0 12px;
    padding: 11px 12px;
    border: 1px dashed #5c5240;
    border-radius: 10px;
    background: #19160f;
    color: #f1d986;
    font-size: .75rem;
    font-weight: 850;
    line-height: 1.65;
    text-align: center;
}
.sl-guide-formula i { padding: 0 4px; color: var(--sl-guide-accent); font-style: normal; }

.sl-guide-card-grid,
.sl-guide-concept-grid,
.sl-guide-proof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.sl-guide-card,
.sl-guide-concept-grid article,
.sl-guide-step,
.sl-guide-relation,
.sl-guide-prompt-layer,
.sl-guide-proof-grid article {
    min-width: 0;
    border: 1px solid #313135;
    border-radius: 11px;
    background: #151517;
    box-shadow: 0 4px 13px rgba(0, 0, 0, .16);
}

.sl-guide-card,
.sl-guide-concept-grid article,
.sl-guide-proof-grid article { padding: 12px; }
.sl-guide-card:nth-child(1) { border-top: 3px solid #d99b25; }
.sl-guide-card:nth-child(2) { border-top: 3px solid #2ba57d; }
.sl-guide-card:nth-child(3) { border-top: 3px solid #8365d4; }
.sl-guide-card:nth-child(4) { border-top: 3px solid #4d8ec3; }

.sl-guide-card b,
.sl-guide-concept-grid b,
.sl-guide-relation b,
.sl-guide-prompt-layer b,
.sl-guide-proof-grid b { display: block; margin-bottom: 5px; color: #f1f1f2; font-size: .78rem; }
.sl-guide-card p,
.sl-guide-concept-grid p,
.sl-guide-relation p,
.sl-guide-prompt-layer p,
.sl-guide-proof-grid p { margin: 0; color: #a7a7aa; font-size: .72rem; line-height: 1.68; }

.sl-guide-concept-grid article:nth-child(1) { border-left: 3px solid #d99b25; }
.sl-guide-concept-grid article:nth-child(2) { border-left: 3px solid #2ba57d; }
.sl-guide-concept-grid article:nth-child(3) { border-left: 3px solid #8365d4; }
.sl-guide-concept-grid article:nth-child(4) { border-left: 3px solid #4d8ec3; }
.sl-guide-concept-grid article:nth-child(5) { border-left: 3px solid #a85f78; }
.sl-guide-concept-grid article:nth-child(6) { border-left: 3px solid #a9863a; }

.sl-guide-callout {
    margin-top: 12px;
    padding: 11px 13px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    border: 1px solid #3e3e42;
    border-left: 4px solid var(--sl-guide-accent);
    border-radius: 10px;
    background: #171719;
    font-size: .72rem;
    line-height: 1.7;
}
.sl-guide-callout b { color: #f1f1f2; white-space: nowrap; }
.sl-guide-callout span { color: #aaa; }
.sl-guide-callout.is-amber { border-color: #6f592b; background: #211b0e; }
.sl-guide-callout.is-green { border-color: #295d4b; background: #102019; }
.sl-guide-callout.is-violet { border-color: #4c3c74; background: #171328; }
.sl-guide-callout.is-blue { border-color: #31566f; background: #101c24; }

.sl-guide-step-list,
.sl-guide-relation-list,
.sl-guide-prompt-stack { display: grid; gap: 9px; }
.sl-guide-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 11px; padding: 12px; }
.sl-guide-step > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #d58f20;
    color: #fff;
    font: 900 .68rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.sl-guide-step:nth-child(2) > span { background: #169873; }
.sl-guide-step:nth-child(3) > span { background: #7251d2; }
.sl-guide-step:nth-child(4) > span { background: #317eb7; }
.sl-guide-step:nth-child(5) > span { background: #a65370; }
.sl-guide-step h4 { margin: 0 0 4px; color: #f3f3f4; font-size: .8rem; }
.sl-guide-step p { margin: 0; color: #aaa; font-size: .72rem; line-height: 1.68; }

.sl-guide-relation {
    display: grid;
    grid-template-columns: minmax(90px, .8fr) minmax(130px, 1.35fr) minmax(120px, 1.15fr);
    gap: 0;
    overflow: hidden;
}
.sl-guide-relation > div { padding: 11px 12px; border-left: 1px solid #303034; }
.sl-guide-relation > div:first-child { border-left: 4px solid #d99b25; background: #1d190f; }
.sl-guide-relation > div:nth-child(2) { border-left-color: #2c5a4b; background: #101b17; }
.sl-guide-relation > div:nth-child(3) { border-left-color: #3b4f65; background: #111922; }
.sl-guide-relation small { display: block; margin-bottom: 4px; color: #777; font-size: .58rem; font-weight: 900; letter-spacing: .08em; }

.sl-guide-prompt-layer { padding: 11px 12px; border-left: 5px solid #4e4e52; }
.sl-guide-prompt-layer.is-task { border-left-color: #d99b25; background: #1d190f; }
.sl-guide-prompt-layer.is-source { border-left-color: #2ba57d; background: #101c17; }
.sl-guide-prompt-layer.is-landing { border-left-color: #8365d4; background: #171326; }
.sl-guide-prompt-layer.is-boundary { border-left-color: #4d8ec3; background: #101921; }
.sl-guide-prompt-layer.is-output { border-left-color: #a85f78; background: #21151a; }
.sl-guide-prompt-layer > span { display: block; margin-bottom: 4px; color: #85858a; font-size: .62rem; font-weight: 900; letter-spacing: .08em; }

.sl-guide-example {
    margin-top: 11px;
    padding: 12px 13px;
    border: 1px solid #3d5d52;
    border-radius: 10px;
    background: #101b17;
}
.sl-guide-example b { display: block; margin-bottom: 6px; color: #71c6a9; font-size: .72rem; }
.sl-guide-example p { margin: 0; color: #c2cbc7; font-size: .72rem; line-height: 1.75; }

.sl-guide-rules { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.sl-guide-rules li {
    position: relative;
    padding: 8px 9px 8px 26px;
    border-bottom: 1px dashed #333337;
    color: #aaa;
    font-size: .71rem;
    line-height: 1.65;
}
.sl-guide-rules li::before { content: '✓'; position: absolute; left: 6px; top: 8px; color: var(--sl-guide-accent); font-weight: 900; }
.sl-guide-rules b { color: #eee; }

@media (max-width: 760px) {
    [data-puxin-page-id="style-garden"] .nav-r > .sl-guide-trigger {
        position: fixed;
        top: 60px;
        right: 12px;
        z-index: 9900;
        width: 44px;
        padding: 8px;
    }
    [data-puxin-page-id="style-garden"] .nav-r > .sl-guide-trigger .sl-guide-trigger-label { display: none; }
}

@media (max-width: 560px) {
    .sl-guide-dialog { width: 100%; }
    .sl-guide-head {
        padding: max(14px, env(safe-area-inset-top)) max(13px, env(safe-area-inset-right)) 13px max(16px, env(safe-area-inset-left));
        gap: 10px;
    }
    .sl-guide-head h2 { font-size: 1.22rem; }
    .sl-guide-head p:last-child { font-size: .72rem; line-height: 1.55; }
    .sl-guide-tabs { gap: 4px; padding: 8px 8px 10px; }
    .sl-guide-tab { min-height: 56px; padding: 5px 2px; }
    .sl-guide-tab > b { font-size: .67rem; }
    .sl-guide-body { padding: 16px max(13px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left)); }
    .sl-guide-pane-head h3 { font-size: 1.04rem; }
    .sl-guide-callout { grid-template-columns: 1fr; gap: 2px; }
    .sl-guide-callout b { white-space: normal; }
    .sl-guide-relation { grid-template-columns: 1fr; }
    .sl-guide-relation > div { border-left: 4px solid #303034; border-top: 1px solid #303034; }
    .sl-guide-relation > div:first-child { border-top: 0; }
}

@media (max-width: 440px) {
    .sl-guide-tab-full { display: none; }
    .sl-guide-tab-short { display: block; }
    .sl-guide-tab > span { font-size: .55rem; }
    .sl-guide-tab > b { font-size: .64rem; }
    .sl-guide-card-grid,
    .sl-guide-concept-grid,
    .sl-guide-proof-grid { grid-template-columns: 1fr; }
    .sl-guide-step { grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 11px; }
    .sl-guide-step > span { width: 32px; height: 32px; }
}

@media (max-width: 350px) {
    .sl-guide-tabs { gap: 3px; padding-left: 5px; padding-right: 5px; }
    .sl-guide-tab { min-height: 52px; }
    .sl-guide-tab > b { font-size: .59rem; }
    .sl-guide-body { padding-left: 10px; padding-right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .sl-guide-overlay,
    .sl-guide-dialog,
    .sl-guide-tab,
    .sl-guide-trigger,
    .sl-guide-close { transition: none !important; }
    .sl-guide-pane { animation: none; }
}
