:root {
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-2: #f0f5f3;
  --text: #17211e;
  --muted: #6c7a75;
  --line: #dde6e2;
  --brand: #0d8f73;
  --brand-dark: #086b57;
  --brand-soft: #e4f5f0;
  --navy: #17354b;
  --shadow: 0 18px 60px rgba(17, 55, 43, .1);
  --radius: 22px;
}

[data-theme="dark"] {
  --bg: #101815;
  --surface: #17211e;
  --surface-2: #202d29;
  --text: #edf6f3;
  --muted: #9badA7;
  --line: #2d3d38;
  --brand: #42c6a5;
  --brand-dark: #72ddc1;
  --brand-soft: #1b3c33;
  --navy: #d8eaf4;
  --shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: "PingFang SC", "Microsoft YaHei", Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, textarea, input { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin-top: 0; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .08em; }
.brand-mark { display: inline-grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: white; background: linear-gradient(145deg, #14aa88, #08715d); border-radius: 12px 12px 12px 4px; box-shadow: 0 7px 18px rgba(13, 143, 115, .24); font-weight: 800; }
.brand-mark.small { width: 30px; height: 30px; border-radius: 9px 9px 9px 3px; font-size: 13px; }
.brand-mark.large { width: 64px; height: 64px; border-radius: 20px 20px 20px 7px; font-size: 25px; }
.icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); font-size: 18px; }
.icon-button:hover { color: var(--brand); border-color: var(--brand); }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }

/* Homepage */
.home-page { overflow-x: hidden; background: radial-gradient(circle at 75% 8%, rgba(47, 191, 158, .11), transparent 26%), var(--bg); }
.home-nav { display: flex; align-items: center; justify-content: space-between; height: 86px; }
.hero { display: grid; grid-template-columns: 1.04fr .96fr; gap: 72px; align-items: center; min-height: 650px; padding-block: 55px 80px; }
.hero-copy h1 { margin: 20px 0 24px; font-size: clamp(48px, 5.2vw, 76px); line-height: 1.08; letter-spacing: -.045em; }
.hero-copy h1 span { color: var(--brand); }
.hero-copy > p { max-width: 590px; color: var(--muted); font-size: 18px; line-height: 1.85; }
.hero-actions { display: flex; gap: 24px; align-items: center; margin-top: 34px; }
.primary-button { display: inline-flex; align-items: center; gap: 35px; padding: 16px 22px; color: white; background: var(--brand); border-radius: 14px; font-weight: 700; box-shadow: 0 12px 28px rgba(13, 143, 115, .25); }
.primary-button:hover { background: var(--brand-dark); transform: translateY(-2px); }
.text-button { padding: 14px 0; border-bottom: 1px solid var(--text); font-weight: 650; }
.trust-row { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 42px; color: var(--muted); font-size: 12px; }
.trust-row b { display: block; margin-bottom: 3px; color: var(--text); font-size: 14px; }
.hero-visual { position: relative; min-height: 515px; display: grid; place-items: center; }
.glow { position: absolute; border-radius: 50%; filter: blur(5px); }
.glow-one { width: 410px; height: 410px; background: rgba(16, 157, 126, .13); }
.glow-two { width: 250px; height: 250px; top: 25px; right: -45px; background: rgba(239, 183, 86, .13); }
.demo-window { position: relative; width: min(88%, 400px); padding: 18px; border: 1px solid rgba(255,255,255,.75); border-radius: 26px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.demo-head, .mini-brand { display: flex; align-items: center; justify-content: space-between; }
.mini-brand { justify-content: flex-start; gap: 9px; }
.mini-brand > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.mini-brand small { color: var(--muted); font-size: 8px; font-weight: 500; }
.demo-tools { display: flex; align-items: center; gap: 10px; }
.sound-toggle { display: flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font-size: 9px; }
.sound-toggle:hover, .sound-toggle.active { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.sound-toggle span { font-size: 13px; }
.sound-toggle.active span { animation: soundPulse .65s infinite alternate; }
@keyframes soundPulse { to { transform: scale(1.18); } }
.online-dot { color: var(--brand); font-size: 11px; }
.online-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--brand); }
.story-canvas { position: relative; height: 350px; margin: 14px -2px 0; overflow: hidden; border-radius: 19px; background:
  radial-gradient(circle at 95% 5%, rgba(13,143,115,.12), transparent 33%),
  linear-gradient(145deg, var(--bg), var(--surface)); }
.story-scene-icon { position: absolute; top: 10px; right: 13px; opacity: .11; font-size: 58px; transform: rotate(7deg); }
.demo-chat { position: relative; z-index: 1; display: flex; height: 100%; flex-direction: column; gap: 8px; padding: 18px 12px 14px; }
.story-item { opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .35s ease, transform .35s ease; }
.story-item.visible { opacity: 1; transform: translateY(0) scale(1); }
.demo-bubble { max-width: 83%; padding: 9px 12px; border-radius: 14px; font-size: 10px; line-height: 1.55; box-shadow: 0 5px 16px rgba(20, 59, 47, .06); }
.demo-bubble.user { align-self: flex-end; color: white; background: var(--brand); border-bottom-right-radius: 4px; }
.demo-ai { display: flex; max-width: 92%; gap: 8px; align-items: flex-start; font-size: 10px; }
.demo-ai .avatar { display: grid; place-items: center; flex: 0 0 auto; width: 25px; height: 25px; border-radius: 8px 8px 8px 3px; color: white; background: var(--navy); font-size: 9px; }
.demo-ai b { display: block; margin-bottom: 3px; font-size: 9px; }
.demo-ai p { margin: 0; color: var(--muted); line-height: 1.55; }
.mini-service-card { display: flex; align-items: center; gap: 9px; margin: 2px 0 0 33px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 7px 22px rgba(20, 59, 47, .08); }
.service-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; color: white; font-weight: 800; }
.service-avatar.orange { background: linear-gradient(145deg, #ffbb6e, #e67d35); }
.story-result-icon { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; color: white; background: linear-gradient(145deg, #16a985, #08715d); font-size: 17px; }
.service-info { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.service-info b { font-size: 12px; }
.service-info span { color: #e89134; font-size: 10px; }
.service-info small { color: var(--muted); font-size: 9px; }
.story-demo .service-info b { font-size: 10px; }
.story-demo .service-info span { font-size: 8px; }
.story-demo .service-info small { font-size: 8px; }
.mini-service-card > strong { color: #e46f36; font-size: 13px; white-space: nowrap; }
.mini-service-card > strong small { font-size: 9px; }
.story-result-action { flex: 0 0 auto; min-height: 30px; padding: 0 9px; border: 0; border-radius: 8px; color: white; background: var(--brand); font-size: 8px; font-weight: 700; }
.story-footer { padding: 13px 2px 0; }
.story-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.story-tab { min-height: 31px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 8px; text-align: left; }
.story-tab i { position: relative; display: block; height: 3px; margin-bottom: 5px; overflow: hidden; border-radius: 99px; background: var(--line); }
.story-tab i::after { content: ""; position: absolute; inset: 0; background: var(--brand); transform: scaleX(0); transform-origin: left; }
.story-tab.active { color: var(--brand); font-weight: 700; }
.story-tab.active i::after { animation: storyProgress var(--story-duration, 12s) linear forwards; }
@keyframes storyProgress { to { transform: scaleX(1); } }
.story-link { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; padding: 9px 10px; border-radius: 10px; color: var(--muted); background: var(--surface-2); font-size: 9px; }
.story-link:hover { color: var(--brand); }
.story-transition .story-chat { animation: sceneFade .35s ease; }
@keyframes sceneFade { from { opacity: .1; transform: translateX(8px); } }
.entrance-section { padding-block: 80px 95px; border-top: 1px solid var(--line); }
.section-heading { max-width: 650px; margin-bottom: 40px; }
.section-heading h2 { margin: 14px 0 12px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.03em; }
.section-heading p { color: var(--muted); }
.entrance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.entrance-card { position: relative; min-height: 305px; padding: 30px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .25s ease; }
.entrance-card:hover { transform: translateY(-6px); border-color: var(--brand); box-shadow: var(--shadow); }
.entrance-card.featured { color: white; border-color: transparent; background: linear-gradient(145deg, #0f9276, #096553); }
.card-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 35px; border-radius: 14px; color: var(--brand); background: var(--brand-soft); font-weight: 800; }
.featured .card-icon { color: white; background: rgba(255,255,255,.14); }
.card-arrow { position: absolute; top: 28px; right: 28px; font-size: 22px; }
.entrance-card > small { opacity: .68; font-size: 10px; letter-spacing: .13em; }
.entrance-card h3 { margin: 10px 0; font-size: 25px; }
.entrance-card p { min-height: 48px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.featured p { color: rgba(255,255,255,.72); }
.card-link { position: absolute; bottom: 30px; left: 30px; font-size: 13px; font-weight: 700; }
.card-link b { margin-left: 8px; }
.capabilities { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; padding-block: 10px 85px; }
.capability { display: flex; gap: 12px; align-items: flex-start; }
.capability > span { font-size: 23px; }
.capability div { display: flex; flex-direction: column; gap: 5px; }
.capability small { color: var(--muted); line-height: 1.5; }
.home-footer { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; padding-block: 35px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.home-footer p { margin: 0; text-align: center; }
.home-footer > span { text-align: right; }

/* Shared chat app */
.app-page { height: var(--app-height, 100vh); height: var(--app-height, 100dvh); overflow: hidden; }
.pc-page { display: grid; grid-template-columns: 260px minmax(480px, 1fr) 300px; background: var(--surface); }
.sidebar { display: flex; z-index: 3; min-width: 0; flex-direction: column; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--bg); transition: width .25s; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 20px; }
.sidebar-toggle { width: 34px; height: 34px; font-size: 24px; background: transparent; }
.new-chat-button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--brand); background: var(--surface); text-align: left; }
.new-chat-button:hover { border-color: var(--brand); }
.new-chat-button span { font-size: 21px; }
.history-list { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 5px; margin-top: 19px; overflow-y: auto; }
.history-label { margin: 10px 12px 3px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.history-item { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 7px 11px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; text-align: left; }
.history-item:hover, .history-item.active { color: var(--text); background: var(--surface-2); }
.history-item > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.history-item b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.history-item small { color: var(--muted); font-size: 9px; }
.sidebar-foot { padding-top: 12px; border-top: 1px solid var(--line); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 7px 2px; }
.user-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--navy); font-size: 11px; }
.user-row > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 3px; font-size: 11px; }
.user-row small { color: var(--muted); font-size: 9px; }
body.sidebar-collapsed { grid-template-columns: 76px minmax(480px, 1fr) 300px; }
body.sidebar-collapsed .sidebar-label, body.sidebar-collapsed .sidebar .brand-text { display: none; }
body.sidebar-collapsed .sidebar-head { flex-direction: column; gap: 14px; }
body.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }
body.sidebar-collapsed .new-chat-button, body.sidebar-collapsed .history-item { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .user-row { justify-content: center; }
.chat-workspace { display: grid; min-width: 0; height: 100vh; height: 100dvh; grid-template-rows: 72px 1fr auto; background: var(--surface); }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); }
.chat-header h1 { display: inline; margin: 0 10px 0 0; font-size: 14px; }
.status { color: var(--muted); font-size: 10px; }
.status i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--brand); }
.header-actions { display: flex; gap: 8px; }
.messages { min-height: 0; padding: 35px clamp(28px, 6vw, 80px); overflow-y: auto; scroll-behavior: smooth; }
.welcome { padding: 16px 0 44px; text-align: center; }
.welcome h2 { margin: 17px 0 8px; font-size: 25px; }
.welcome p { color: var(--muted); font-size: 13px; }
.welcome-note { display: block; max-width: 520px; margin: 12px auto 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.prompt-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.prompt-chips button { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 11px; }
.prompt-chips button:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.message { display: flex; gap: 12px; max-width: 790px; margin: 0 auto 25px; align-items: flex-start; }
.message-avatar { margin-top: 2px; }
.message-content { max-width: calc(100% - 45px); font-size: 13px; line-height: 1.75; }
.message-content > b { display: block; margin-bottom: 5px; font-size: 11px; }
.message-content p { margin: 0; }
.user-message { justify-content: flex-end; }
.user-message .message-content { padding: 11px 15px; border-radius: 16px 16px 4px 16px; background: var(--surface-2); }
.ai-message .message-content { padding-top: 2px; }
.typing-dots { display: flex; gap: 4px; padding: 8px 0; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: bounce 1s infinite alternate; }
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { to { transform: translateY(-5px); opacity: .45; } }
.composer { position: relative; z-index: 5; padding: 12px clamp(28px, 6vw, 80px) 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--surface) 18%); }
.composer-inner { display: flex; align-items: flex-end; gap: 8px; max-width: 790px; margin: auto; padding: 8px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 30px rgba(26, 64, 52, .08); }
.composer textarea { min-width: 0; min-height: 37px; max-height: 120px; flex: 1; padding: 9px 4px; resize: none; border: 0; outline: 0; background: transparent; font-size: 13px; line-height: 1.45; }
.attach-button, .send-button { display: grid; place-items: center; flex: 0 0 auto; width: 37px; height: 37px; border: 0; border-radius: 11px; font-size: 20px; }
.attach-button { color: var(--muted); background: transparent; }
.send-button { color: white; background: var(--brand); }
.composer > p { margin: 7px 0 0; color: var(--muted); font-size: 9px; text-align: center; }
.result-panel { display: flex; height: 100vh; height: 100dvh; flex-direction: column; padding: 26px 20px; border-left: 1px solid var(--line); background: var(--bg); overflow-y: auto; }
.result-head { display: flex; align-items: flex-end; justify-content: space-between; }
.result-head h2 { margin: 6px 0 0; font-size: 21px; }
.result-count { padding: 5px 8px; border-radius: 7px; color: var(--brand); background: var(--brand-soft); font-size: 9px; }
.service-results { flex: 1; }
.location-route { margin-top: 24px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.location-route > div { display: flex; gap: 10px; align-items: center; }
.location-route span { display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.location-route small { color: var(--muted); font-size: 8px; }
.location-route i { width: 9px; height: 9px; border-radius: 50%; }
.start-dot { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.end-dot { background: #f0884e; box-shadow: 0 0 0 4px rgba(240,136,78,.14); }
.location-route em { display: block; height: 22px; margin-left: 4px; border-left: 1px dashed var(--line); }
.empty-result { display: grid; place-items: center; margin-top: 75px; color: var(--muted); text-align: center; }
.empty-result > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; color: var(--brand); background: var(--brand-soft); font-size: 25px; }
.empty-result h3 { margin: 15px 0 7px; color: var(--text); font-size: 13px; }
.empty-result p { max-width: 210px; font-size: 10px; line-height: 1.7; }
.safety-tip { display: flex; gap: 10px; padding: 13px; border-radius: 13px; color: var(--muted); background: var(--brand-soft); font-size: 9px; line-height: 1.6; }
.safety-tip > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: white; background: var(--brand); }
.safety-tip p { margin: 0; }
.safety-tip b { color: var(--brand-dark); }
.result-card { margin-top: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.result-card-head { display: flex; gap: 10px; align-items: center; }
.result-card-head div { flex: 1; }
.result-card-head b, .result-card-head small { display: block; }
.result-card-head b { font-size: 11px; }
.result-card-head small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.result-card-head strong { color: #e98237; font-size: 12px; }
.result-card-meta { display: flex; justify-content: space-between; margin: 13px 0; padding-block: 10px; border-block: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.result-card button { width: 100%; min-height: 35px; border: 0; border-radius: 9px; color: white; background: var(--brand); font-size: 10px; font-weight: 700; }
.simulation-banner { display: flex; margin-top: 22px; padding: 11px 12px; flex-direction: column; gap: 3px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--brand-soft); font-size: 8px; }
.simulation-banner b { color: var(--brand-dark); font-size: 10px; }
.simulation-label { margin-bottom: 10px; color: var(--brand); font-size: 8px; font-weight: 800; letter-spacing: .06em; }

/* Mobile chat */
.mobile-page { position: fixed; top: var(--app-top, 0px); right: 0; left: 0; display: grid; width: 100%; height: var(--app-height, 100vh); height: var(--app-height, 100dvh); max-width: 100vw; grid-template-rows: 62px minmax(0, 1fr) auto; background: var(--surface); overscroll-behavior: none; }
.mobile-header { position: relative; display: flex; z-index: 4; width: 100%; min-width: 0; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line); }
.mobile-header .icon-button { width: 44px; height: 44px; border: 0; background: transparent; }
.mobile-header-start { display: flex; align-items: center; gap: 0; }
.mobile-back { display: none !important; font-size: 31px !important; line-height: 1; }
body.has-return-target .mobile-back { display: inline-grid !important; }
.mobile-brand { position: absolute; left: 50%; display: flex; gap: 8px; align-items: center; transform: translateX(-50%); }
.mobile-more-menu { position: fixed; z-index: 7; top: 56px; right: 12px; display: flex; visibility: hidden; width: 190px; padding: 7px; flex-direction: column; gap: 2px; opacity: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); transform: translateY(-7px); transition: .2s; }
.mobile-more-menu.open { visibility: visible; opacity: 1; transform: translateY(0); }
.mobile-more-menu button, .mobile-more-menu a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 11px; border: 0; border-radius: 9px; color: var(--text); background: transparent; font-size: 11px; text-align: left; }
.mobile-more-menu button:hover, .mobile-more-menu a:hover { color: var(--brand); background: var(--brand-soft); }
.mobile-chat { width: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.mobile-page .messages { height: 100%; padding: 25px 16px 20px; }
.mobile-welcome { padding: 12px 0 34px; text-align: center; }
.mobile-welcome h1 { margin: 14px 0 5px; font-size: 21px; }
.mobile-welcome p { color: var(--muted); font-size: 12px; }
.mobile-welcome .welcome-note { max-width: 280px; }
.mobile-page .message { margin-bottom: 21px; }
.mobile-page .message-content { font-size: 13px; }
.mobile-composer { position: relative; z-index: 5; width: 100%; min-width: 0; padding: 10px 12px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.mobile-composer .composer-inner { border-radius: 22px; box-shadow: none; }
.mobile-composer textarea { font-size: 16px; }
.mobile-page.keyboard-open .mobile-composer { padding-bottom: 8px; }
.mobile-page.keyboard-fallback .mobile-composer { box-shadow: 0 -12px 30px rgba(20, 55, 44, 0.08); }
.mobile-page.keyboard-open .app-install-fab { display: none; }
.drawer-overlay { position: fixed; z-index: 8; inset: 0; visibility: hidden; opacity: 0; background: rgba(5, 20, 15, .45); transition: .25s; }
.mobile-drawer { position: fixed; z-index: 9; top: 0; bottom: 0; left: 0; display: flex; width: min(82vw, 330px); padding: 18px 14px; flex-direction: column; background: var(--bg); box-shadow: 20px 0 50px rgba(0,0,0,.16); transform: translateX(-105%); transition: transform .28s ease; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.drawer-head .icon-button { border: 0; background: transparent; font-size: 25px; }
body.drawer-active .drawer-overlay { visibility: visible; opacity: 1; }
body.drawer-active .mobile-drawer { transform: translateX(0); }
.inline-service-card { max-width: calc(100% - 44px); margin: -5px 0 25px 42px; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 30px rgba(20,55,44,.08); }
.inline-card-top { display: flex; gap: 9px; align-items: center; }
.inline-card-top > div { min-width: 0; flex: 1; }
.inline-card-top b, .inline-card-top span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-card-top b { font-size: 12px; }
.inline-card-top span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.inline-card-top strong { color: #e98237; font-size: 11px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 13px 0; }
.service-tags span { padding: 5px 8px; border-radius: 7px; color: var(--muted); background: var(--surface-2); font-size: 9px; }
.inline-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.inline-card-foot div { display: flex; flex-direction: column; }
.inline-card-foot small { color: var(--muted); font-size: 8px; }
.inline-card-foot b { color: #e87039; font-size: 14px; }
.inline-card-foot button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; color: white; background: var(--brand); font-size: 11px; font-weight: 700; }

/* API docs */
.docs-page { display: grid; min-height: 100vh; min-height: 100dvh; grid-template-columns: 245px 1fr; background: var(--surface); }
.docs-sidebar { position: sticky; top: 0; display: flex; height: 100vh; height: 100dvh; padding: 24px 20px; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); }
.docs-sidebar nav { display: flex; flex-direction: column; gap: 5px; margin-top: 45px; }
.docs-sidebar nav a { padding: 11px 13px; border-radius: 9px; color: var(--muted); font-size: 12px; }
.docs-sidebar nav a:hover, .docs-sidebar nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.docs-back { margin-top: auto; color: var(--muted); font-size: 11px; }
.docs-back-button { padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.docs-topbar { position: sticky; z-index: 3; top: 0; display: flex; align-items: center; justify-content: flex-end; height: 65px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); }
.docs-topbar > span, .docs-menu { display: none; }
.docs-content { max-width: 850px; padding: 75px 60px 120px; }
.docs-content section { margin-bottom: 70px; scroll-margin-top: 90px; }
.docs-content h1 { margin: 13px 0 17px; font-size: clamp(38px, 5vw, 58px); letter-spacing: -.04em; }
.docs-content h2 { margin-bottom: 12px; font-size: 26px; }
.docs-content h3 { margin: 28px 0 10px; font-size: 13px; }
.docs-content > section > p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.docs-lead { max-width: 680px; font-size: 16px !important; }
.base-url { display: flex; align-items: center; gap: 14px; margin-top: 30px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); font-size: 11px; }
.base-url > span { color: var(--muted); }
.base-url code { flex: 1; color: var(--brand); }
.copy-button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 10px; }
.info-callout { display: flex; gap: 12px; margin-top: 18px; padding: 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); font-size: 11px; line-height: 1.7; }
.info-callout > span { display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; color: white; background: var(--brand); }
.info-callout p { margin: 0; }
pre { overflow-x: auto; padding: 20px; border: 1px solid #263932; border-radius: 13px; color: #cfe7df; background: #14221d; font: 12px/1.8 Consolas, Monaco, monospace; }
.endpoint-section { padding-top: 5px; }
.endpoint-title { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.endpoint-title code { font-size: 18px; font-weight: 800; }
.endpoint-title > span:last-child { color: var(--muted); font-size: 12px; }
.method { padding: 5px 8px; border-radius: 6px; color: white; font: 800 9px monospace; }
.method.post { background: var(--brand); }
.method.get { background: #347ec6; }
.param-table { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; font-size: 11px; }
.param-table > div { display: grid; grid-template-columns: 1fr 1fr 2fr; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.param-table > div:first-child { background: var(--bg); }
.param-table > div:last-child { border-bottom: 0; }
.param-table span { color: var(--muted); }
.api-debugger { padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); }
.api-debugger h2 { margin: 10px 0; }
.api-debugger > p { color: var(--muted); font-size: 12px; }
.api-debugger label { display: block; margin: 22px 0 8px; font-size: 11px; font-weight: 700; }
.debug-input { display: flex; gap: 8px; }
.debug-input input { min-width: 0; min-height: 44px; flex: 1; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface); font-size: 12px; }
.debug-input input:focus { border-color: var(--brand); }
.debug-input button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; color: white; background: var(--brand); font-size: 11px; font-weight: 700; }
.response-head { display: flex; justify-content: space-between; margin: 24px 2px 8px; color: var(--muted); font-size: 9px; }
.response-head span { color: var(--brand); font-weight: 700; }
.response-head i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.response-code { min-height: 135px; margin-bottom: 0; }

/* 保存到手机桌面：所有产品二级页共用 */
.app-install-fab {
  position: fixed;
  z-index: 92;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  display: grid;
  width: 72px;
  height: 72px;
  padding: 0;
  place-content: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ff8a1f, #ef5b0c);
  box-shadow: 0 16px 36px rgba(239, 91, 12, 0.34);
  font-size: 11px;
  line-height: 1.15;
}
.app-install-fab span,
.app-install-fab strong { display: block; }
.app-install-fab[hidden] { display: none !important; }
.app-install-fab strong { margin-top: 3px; font-size: 14px; }
.app-install-fab:hover { transform: translateY(-2px); }
.mobile-page .app-install-fab { bottom: max(96px, calc(env(safe-area-inset-bottom) + 86px)); }
.app-install-backdrop {
  position: fixed;
  z-index: 96;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(7px);
}
.app-install-dialog {
  position: fixed;
  z-index: 97;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(calc(100% - 28px), 390px);
  padding: 28px;
  border-radius: 27px;
  color: #171a19;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .24);
  text-align: center;
  transform: translateX(-50%);
}
.app-install-dialog .brand-mark { margin: 0 auto; }
.app-install-dialog h2 { margin: 16px 0 8px; font-size: 25px; letter-spacing: -.04em; }
.app-install-dialog p { margin: 0; color: #6e6e73; font-size: 14px; line-height: 1.65; }
.app-install-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #6e6e73;
  background: #f2f2f7;
  font-size: 22px;
}
.app-install-confirm {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, #ff8a1f, #ef5b0c);
  font-weight: 700;
}
.app-install-confirm:disabled { opacity: .56; cursor: wait; }

@media (display-mode: standalone) {
  .app-install-fab { display: none !important; }
}

@media (max-width: 1050px) {
  .pc-page { grid-template-columns: 220px minmax(450px, 1fr); }
  .result-panel { display: none; }
  body.sidebar-collapsed { grid-template-columns: 76px minmax(450px, 1fr); }
  .hero { gap: 35px; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 32px, 590px); }
  .home-nav { height: 72px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 55px 70px; text-align: center; }
  .hero-copy h1 { font-size: clamp(42px, 12vw, 60px); }
  .hero-copy > p { font-size: 15px; }
  .hero-actions, .trust-row { justify-content: center; }
  .hero-visual { min-height: 430px; }
  .demo-window { width: min(94%, 450px); text-align: left; }
  .entrance-grid { grid-template-columns: 1fr; }
  .entrance-card { min-height: 270px; }
  .capabilities { grid-template-columns: 1fr 1fr; }
  .home-footer { grid-template-columns: 1fr; gap: 16px; justify-items: center; }
  .home-footer > span { text-align: center; }
  .docs-page { display: block; }
  .docs-sidebar { position: fixed; z-index: 8; width: min(82vw, 300px); transform: translateX(-105%); transition: .25s; box-shadow: 15px 0 50px rgba(0,0,0,.2); }
  .docs-page.docs-nav-active .docs-sidebar { transform: translateX(0); }
  .docs-topbar { justify-content: space-between; padding: 0 15px; }
  .docs-topbar > span, .docs-menu { display: inline-grid; }
  .docs-content { padding: 50px 20px 90px; }
  .base-url { align-items: flex-start; flex-wrap: wrap; }
  .base-url code { flex-basis: 75%; overflow-wrap: anywhere; }
  .debug-input { flex-direction: column; }
  .debug-input button { width: 100%; }
}

@media (max-width: 430px) {
  .hero-copy h1 { font-size: 37px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .primary-button { width: 100%; justify-content: space-between; }
  .trust-row { gap: 15px; }
  .hero-visual { min-height: 390px; }
  .demo-window { padding: 15px; }
  .story-demo .online-dot { display: none; }
  .sound-toggle b { display: none; }
  .sound-toggle { width: 34px; padding: 0; justify-content: center; }
  .mini-service-card { margin-left: 0; }
  .capabilities { grid-template-columns: 1fr; }
  .param-table > div { grid-template-columns: .8fr .7fr 1.5fr; padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
