/* 全局微调样式，Tailwind 工具类覆盖不到的部分放这里 */
html {
    overflow-x: clip;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow-x: clip;
}

img,
video,
canvas,
svg,
iframe {
    max-width: 100%;
}

input,
select,
textarea,
button {
    font-size: 16px;
    max-width: 100%;
}

#tour-stage:fullscreen,
#tour-stage:-webkit-full-screen {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    background: #0a0a0a;
}

#tour-stage:fullscreen #tour-root,
#tour-stage:-webkit-full-screen #tour-root {
    width: 100%;
    height: 100%;
}

#tour-stage canvas {
    display: block;
}

.note-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e5e5;
}

.note-toolbar button {
    border: 1px solid #d4d4d4;
    background: #fff;
    border-radius: 0.375rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.note-record.is-recording,
.vditor-toolbar .note-record.is-recording {
    background: #b91c1c !important;
    color: #fff !important;
    animation: note-record-pulse 1.2s ease-in-out infinite;
}

.note-record-time {
    align-self: center;
    margin: 0 0.35rem 0 0.15rem;
    color: #b91c1c;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.note-record-time.hidden {
    display: none;
}

@keyframes note-record-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

.note-editor {
    flex: 1;
    min-height: 420px;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d4d4d4;
    border-radius: 0.5rem;
    background: #fff;
    overflow: auto;
    font-size: 1rem;
    line-height: 1.75;
}

.note-editor:focus {
    outline: 2px solid #171717;
    outline-offset: 1px;
}

.note-editor:empty::before {
    content: attr(data-placeholder);
    color: #a3a3a3;
}

.note-editor img,
.note-editor video {
    max-width: 100%;
    height: auto;
}

.note-editor audio {
    width: 100%;
}

.note-editor table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.75rem 0;
}

.note-editor th,
.note-editor td {
    border: 1px solid #d4d4d4;
    padding: 0.4rem 0.6rem;
}

.note-editor iframe {
    max-width: 100%;
    width: 560px;
    height: 315px;
    border: 0;
}

.note-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}

.note-modal.hidden {
    display: none;
}

.note-modal-card {
    width: min(28rem, 100%);
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.vditor .vditor-reset ul {
    list-style: disc;
    padding-left: 1.5em;
}

.vditor .vditor-reset ol {
    list-style: decimal;
    padding-left: 1.5em;
}

.vditor .vditor-reset pre {
    overflow: auto;
}

.vditor audio,
.vditor video {
    max-width: 100%;
}

.vditor {
    max-width: 100%;
}

.article-body img,
.article-body video,
.article-body iframe,
.article-body table {
    max-width: 100%;
    height: auto;
}

.article-body pre,
.article-body table {
    overflow-x: auto;
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    padding-top: env(safe-area-inset-top);
}

.header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 64rem;
    margin: 0 auto;
    padding: 0.75rem max(1rem, env(safe-area-inset-right)) 0.75rem max(1rem, env(safe-area-inset-left));
}

.logo-full {
    display: none;
}

.logo-short {
    display: inline;
}

.nav-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #d4d4d4;
    border-radius: 0.5rem;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 1.1rem;
    height: 2px;
    background: #171717;
    position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-bars::before {
    top: -6px;
}

.nav-toggle-bars::after {
    top: 6px;
}

.site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.25rem 0 0.5rem;
    border-top: 1px solid #e5e5e5;
}

.site-header.is-open .site-nav {
    display: flex;
}

.site-nav > a,
.nav-drop-title,
.nav-account a,
.nav-account button {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
}

.nav-account {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding-top: 0.35rem;
    margin-top: 0.35rem;
    border-top: 1px solid #f0f0f0;
}

.nav-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    padding: 0.35rem 0;
}

.nav-drop {
    position: relative;
}

.nav-drop-panel {
    display: block;
    position: static;
    padding: 0 0 0.25rem 0.85rem;
}

.nav-drop-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.nav-drop-card a {
    display: flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.35rem 0;
    border-radius: 0.375rem;
    white-space: normal;
}

.play-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.play-tabs a {
    border: 1px solid #d4d4d4;
    background: #fff;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
}

.play-tabs a.is-active {
    background: #171717;
    border-color: #171717;
    color: #fff;
}

.sim-stage {
    width: 100%;
    height: min(560px, 70dvh);
}

.sim-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
}

.sim-controls > div {
    min-width: 0;
}

.tour-touch {
    display: none;
}

.hint-mobile {
    display: none;
}

.hint-desktop {
    display: inline;
}

@media (min-width: 768px) {
    .header-bar {
        flex-wrap: nowrap;
        padding: 1rem 1.5rem;
    }

    .logo-full {
        display: inline;
    }

    .logo-short {
        display: none;
    }

    .nav-toggle {
        display: none;
    }

    .site-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        width: auto;
        gap: 1rem;
        padding: 0;
        border-top: 0;
    }

    .site-header.is-open .site-nav {
        display: flex;
    }

    .site-nav > a,
    .nav-drop-title,
    .nav-account a,
    .nav-account button {
        min-height: 0;
        display: inline;
    }

    .nav-account {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 0;
        margin: 0;
        border: 0;
    }

    .nav-drop-panel {
        display: none;
        position: absolute;
        top: calc(100% - 0.15rem);
        left: 0;
        min-width: 11.5rem;
        padding-top: 0.55rem;
        z-index: 50;
    }

    .nav-drop:hover .nav-drop-panel,
    .nav-drop:focus-within .nav-drop-panel {
        display: block;
    }

    .nav-drop-card {
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 0.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        padding: 0.35rem;
    }

    .nav-drop-card a {
        display: block;
        min-height: 0;
        padding: 0.45rem 0.7rem;
        white-space: nowrap;
    }

    .nav-drop-card a:hover {
        background: #f5f5f5;
        color: #171717;
    }
}

@media (max-width: 767px) {
    .sim-stage {
        height: min(420px, 55dvh);
    }

    .sim-controls > div {
        flex: 1 1 100%;
    }

    .sim-controls select,
    .sim-controls input[type="range"] {
        width: 100%;
    }

    #tour-minimap {
        width: 84px;
        height: 84px;
        top: 0.5rem;
        right: 0.5rem;
    }

    .tour-touch {
        display: grid;
        grid-template-columns: repeat(3, 2.6rem);
        grid-template-rows: repeat(3, 2.6rem);
        gap: 0.35rem;
        position: absolute;
        left: 0.6rem;
        bottom: 0.6rem;
        z-index: 12;
        pointer-events: auto;
    }

    .tour-touch button {
        border: 0;
        border-radius: 0.55rem;
        background: rgba(0, 0, 0, 0.55);
        color: #fff;
        font-size: 0.75rem;
    }

    .tour-touch button[data-tour-key="jump"] {
        grid-column: 1 / -1;
    }

    .hint-desktop {
        display: none;
    }

    .hint-mobile {
        display: inline;
    }

    .vditor-toolbar {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .note-list-pane {
        max-height: 11rem;
    }
}

#tour-root canvas,
#g3d-root canvas,
#gravity-canvas {
    touch-action: none;
}

#tour-stage:fullscreen .tour-touch,
#tour-stage:-webkit-full-screen .tour-touch {
    display: none;
}

@media (max-width: 767px) {
    #tour-stage:fullscreen .tour-touch,
    #tour-stage:-webkit-full-screen .tour-touch {
        display: grid;
    }
}

.chatbot-body {
    background: #07070a;
    color: #f5f5f5;
}
.chatbot-body .site-header {
    background: rgba(10, 10, 14, 0.92);
    border-bottom-color: #1f1f28;
}
.chatbot-body .site-logo,
.chatbot-body .site-nav a,
.chatbot-body .site-nav button,
.chatbot-body .nav-email {
    color: #d4d4d8;
}
.chatbot-main {
    max-width: none;
    margin: 0;
    padding: 0;
}
.chatbot-app {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 57px);
}
.chat-sidebar {
    background: #101018;
    border-right: 1px solid #232336;
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.chat-sidebar-head {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.chat-new {
    flex: 1;
    background: #f4f4f5;
    color: #111;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-size: 0.875rem;
}
.chat-list {
    margin-top: 0.9rem;
    overflow-y: auto;
    flex: 1;
}
.chat-list button {
    width: 100%;
    text-align: left;
    color: #d4d4d8;
    padding: 0.55rem 0.7rem;
    border-radius: 0.7rem;
    font-size: 0.875rem;
}
.chat-list button.is-active,
.chat-list button:hover {
    background: #1c1c28;
}
.chat-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(124, 92, 255, 0.18), transparent 55%),
        radial-gradient(900px 420px at 80% 110%, rgba(56, 189, 248, 0.12), transparent 50%),
        #07070a;
}
.chat-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0;
}
.chat-model {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: #a1a1aa;
}
.chat-model select {
    background: #18181f;
    color: #f4f4f5;
    border: 1px solid #2e2e3a;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    max-width: 16rem;
}
.chat-mode,
.chat-icon-btn {
    border: 1px solid #2e2e3a;
    background: #18181f;
    color: #e4e4e7;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
}
.chat-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
}
.voice-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem 1.5rem;
    min-height: 0;
}
.voice-status {
    color: #a1a1aa;
    font-size: 0.95rem;
    min-height: 1.4em;
}
.voice-orb {
    width: min(22rem, 78vw);
    height: min(22rem, 78vw);
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}
.voice-orb canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.voice-orb.is-listening canvas,
.voice-orb.is-speaking canvas {
    filter: saturate(1.25);
}
.voice-captions {
    min-height: 4.5rem;
    max-height: 8rem;
    overflow-y: auto;
    width: min(36rem, 92vw);
    text-align: center;
    color: #e4e4e7;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-top: 0.5rem;
}
.voice-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}
.voice-talk {
    min-width: 8.5rem;
    background: #fafafa;
    color: #111;
    border-radius: 999px;
    padding: 0.7rem 1.3rem;
    font-size: 0.95rem;
}
.voice-talk.is-hot {
    background: #ef4444;
    color: #fff;
}
.voice-hint,
.chat-status {
    color: #71717a;
    font-size: 0.75rem;
    text-align: center;
    margin-top: 0.75rem;
    max-width: 28rem;
}
.text-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0.5rem 1rem 1rem;
}
.text-thread {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0 1rem;
}
.text-bubble {
    max-width: min(40rem, 92%);
    padding: 0.75rem 1rem;
    border-radius: 1.1rem;
    line-height: 1.6;
    white-space: pre-wrap;
}
.text-bubble.user {
    align-self: flex-end;
    background: #27273a;
}
.text-bubble.assistant {
    align-self: flex-start;
    background: #15151f;
    border: 1px solid #2a2a38;
}
.text-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}
.text-form textarea {
    flex: 1;
    min-height: 2.8rem;
    max-height: 8rem;
    background: #15151f;
    color: #f4f4f5;
    border: 1px solid #2e2e3a;
    border-radius: 1rem;
    padding: 0.7rem 0.9rem;
    resize: none;
}
.text-form button {
    background: #fafafa;
    color: #111;
    border-radius: 999px;
    padding: 0.65rem 1.1rem;
}
#chat-sidebar-open,
#chat-sidebar-close {
    display: none;
}
.hidden {
    display: none !important;
}
@media (max-width: 767px) {
    .chatbot-app {
        grid-template-columns: 1fr;
    }
    .chat-sidebar {
        position: fixed;
        inset: 57px auto 0 0;
        width: min(84vw, 20rem);
        z-index: 30;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }
    .chatbot-app.sidebar-open .chat-sidebar {
        transform: none;
    }
    #chat-sidebar-open,
    #chat-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .chat-model {
        margin-left: 0;
        flex: 1;
    }
    .chat-model select {
        width: 100%;
    }
}
