.xiaop-guide { --guide-ink: #342f26; --guide-blue: #31586f; --guide-line: #d8cbb6; color: var(--guide-ink); font-family: inherit; }
.xiaop-guide *, .xiaop-guide *::before, .xiaop-guide *::after { box-sizing: border-box; }
.xiaop-guide [hidden] { display: none !important; }
.xiaop-guide button, .xiaop-guide textarea { font: inherit; }
.xiaop-guide button, .xiaop-guide a { touch-action: manipulation; }
.xiaop-guide button { cursor: pointer; }
.xiaop-guide button:disabled { cursor: wait; opacity: .6; }
.xiaop-guide :focus-visible { outline: 3px solid #3262c0; outline-offset: 3px; }
.guide-launcher { position: fixed; z-index: 160; right: max(22px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; width: 116px; padding: 0; border: 0; background: transparent; color: #3b3528; text-align: center; }
.guide-portrait { display: block; flex-shrink: 0; pointer-events: none; }
.guide-portrait img { display: block; width: 100%; height: 100%; object-fit: contain; }
.guide-launcher .guide-portrait { width: 104px; height: 145px; margin-bottom: 0; }
.guide-panel { position: fixed; z-index: 161; right: max(22px, env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom) + var(--guide-keyboard-inset, 0px)); width: min(420px, calc(100vw - 32px)); height: min(700px, calc(var(--guide-viewport-height, 100dvh) - 40px - env(safe-area-inset-bottom))); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #c4b497; border-radius: 18px; background: #fffaf0; box-shadow: 0 16px 70px #342a1840; isolation: isolate; }
.guide-panel:focus { outline: none; }
.guide-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 13px 14px 11px; background: #f1e4c6; border-bottom: 1px solid var(--guide-line); flex-shrink: 0; }
.guide-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.guide-identity .guide-portrait { width: 44px; height: 53px; }
.guide-identity h2 { font-size: 16px; line-height: 1.5; letter-spacing: -.02em; margin: 0; }
.guide-identity p { font-size: 11px; line-height: 1.6; margin: 3px 0 0; color: #796746; }
.guide-header-actions { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.guide-clear, .guide-close { min-height: 40px; min-width: 38px; border: none; background: transparent; color: #6f5b39; padding: 5px; }
.guide-clear { font-size: 11px !important; }
.guide-close { font-size: 25px !important; line-height: 1; }
.guide-privacy { margin: 0; padding: 10px 17px; font-size: 11px; line-height: 1.7; color: #7b705c; border-bottom: 1px solid #e8decb; background: #faf5e9; flex-shrink: 0; }
.guide-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 19px 17px; scrollbar-width: thin; scroll-padding: 15px; }
.guide-welcome { padding: 1px 0 8px; }
.guide-availability { margin: 0 0 18px; padding: 13px; border: 1px solid #d7bba1; border-radius: 10px; background: #f5e9dc; }
.guide-availability > p { margin: 0; font-size: 13px; line-height: 1.8; }
.guide-welcome h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.55; letter-spacing: -.025em; }
.guide-welcome > p { margin: 0; color: #7a6d58; font-size: 12px; line-height: 1.9; }
.guide-quick { display: grid; gap: 10px; margin-top: 20px; }
.guide-quick-question { min-height: 43px; border: 1px solid #c8d3cf; border-radius: 9px; padding: 10px 13px; background: #eaf0ed; color: #365b60; text-align: left; font-size: 12px !important; line-height: 1.75; }
.guide-quick-question:hover { background: #dfeae5; }
.guide-site-help { margin: 13px 0 19px; padding: 11px 12px; border: 1px solid #d5c8ad; border-radius: 10px; background: #f7f1e4; }
.guide-site-help > summary { min-height: 30px; cursor: pointer; color: #5f654c; font-size: 13px; font-weight: 700; line-height: 1.8; }
.guide-help-note { margin: 7px 0 11px; color: #7a6d58; font-size: 11px; line-height: 1.75; }
.guide-help-questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.guide-help-question { min-width: 0; min-height: 42px; padding: 7px 8px; border: 1px solid #cfc5b0; border-radius: 7px; color: #5d604e; background: #fffaf0; font-size: 11px !important; line-height: 1.65; overflow-wrap: anywhere; }
.guide-help-question[aria-pressed="true"] { border-color: #677d62; color: #36503f; background: #e6eddf; }
.guide-help-answer { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d7cbb3; }
.guide-help-source { color: #67765d; font-size: 10px; line-height: 1.7; }
.guide-help-answer h4 { margin: 5px 0 7px; color: #454b39; font-size: 14px; line-height: 1.7; }
.guide-help-answer > p { margin: 0; color: #625a47; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-message { margin: 0 0 18px; min-width: 0; }
.guide-message-user { padding-left: 29px; }
.guide-message-assistant { padding-right: 8px; }
.guide-speaker { display: block; margin-bottom: 6px; color: #8a785a; font-size: 10px; line-height: 1.6; }
.guide-message-user .guide-speaker { text-align: right; }
.guide-message-text { margin: 0; padding: 12px 14px; border: 1px solid #ddd2bd; border-radius: 10px; background: #fffdf6; font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.guide-message-user .guide-message-text { background: #e6edef; border-color: #c9d4d6; color: #385262; }
.guide-request-note { margin: 1px 0 20px; padding: 12px 14px; border-radius: 10px; background: #f0e9da; }
.guide-request-note > p { margin: 0; font-size: 12px; line-height: 1.85; color: #76654b; }
.guide-request-error { border: 1px solid #d7bba1; background: #f5e9dc; }
.guide-request-stopped { background: #ecebe3; }
.guide-links { display: flex; flex-wrap: wrap; gap: 7px 13px; padding-top: 10px; }
.guide-links a { display: inline-flex; align-items: center; min-height: 35px; font-size: 12px; line-height: 1.7; color: #31596f; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.guide-retry { min-height: 37px; margin-top: 9px; padding: 7px 11px; border: 1px solid #b9ad96; border-radius: 7px; background: #fffaf0; color: #4d604f; font-size: 12px !important; line-height: 1.7; }
.guide-feedback { flex-shrink: 0; padding: 8px 17px; margin: 0; color: #596f68; background: #eaf0e9; font-size: 11px; line-height: 1.7; }
.guide-feedback:empty { display: none; }
.guide-composer { flex-shrink: 0; margin: 0; padding: 11px 15px 10px; border-top: 1px solid var(--guide-line); background: #fffaf1; }
.guide-input-label { display: block; font-size: 11px; color: #77664b; font-weight: 700; margin-bottom: 7px; }
.guide-context { margin: 0 0 7px; color: #796f5c; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.guide-input { display: block; width: 100%; min-height: 65px; max-height: 110px; resize: vertical; margin: 0; padding: 9px 11px; border: 1px solid #b7aa92; border-radius: 8px; background: #fffef9; color: #39372d; font-size: 16px !important; line-height: 1.65; }
.guide-input::placeholder { color: #988b76; }
.guide-input:disabled { background: #f3efe5; color: #8a7f6d; }
.guide-input[aria-invalid] { border-color: #a84d3a; }
.guide-input-error { margin: 6px 0 0; color: #9e3f30; font-size: 12px; line-height: 1.7; }
.guide-composer-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 9px; }
.guide-input-hint { font-size: 10px; line-height: 1.7; color: #8a7a61; }
.guide-send, .guide-stop { min-height: 40px; min-width: 64px; padding: 9px 16px; border: 1px solid #31586f; border-radius: 8px; background: #31586f; color: #fffaf0; font-size: 12px !important; line-height: 1.6; white-space: nowrap; }
.guide-stop { background: #fffaf1; color: #31586f; }
.guide-memory-note { margin: 7px 0 0; color: #908169; font-size: 10px; line-height: 1.6; }
.xiaop-guide[data-compact="true"] .guide-header { padding-top: 7px; padding-bottom: 7px; }
.xiaop-guide[data-compact="true"] .guide-identity .guide-portrait { width: 33px; height: 39px; }
.xiaop-guide[data-compact="true"] .guide-identity p, .xiaop-guide[data-compact="true"] .guide-input-label, .xiaop-guide[data-compact="true"] .guide-privacy, .xiaop-guide[data-compact="true"] .guide-memory-note { display: none; }
.xiaop-guide[data-compact="true"] .guide-input { min-height: 47px; max-height: 70px; }
.xiaop-guide[data-compact="true"] .guide-context { margin-bottom: 4px; font-size: 9px; line-height: 1.45; }
.xiaop-guide[data-compact="true"] .guide-composer { padding-top: 7px; padding-bottom: 6px; }
.xiaop-guide[data-compact="true"] .guide-feedback { padding-top: 5px; padding-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media(max-width: 600px) {
  .guide-launcher { right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); width: 92px; }
  .guide-launcher .guide-portrait { width: 78px; height: 108px; margin-bottom: 0; }
  .guide-panel { right: max(10px, env(safe-area-inset-right)); left: max(10px, env(safe-area-inset-left)); bottom: calc(10px + env(safe-area-inset-bottom) + var(--guide-keyboard-inset, 0px)); width: auto; height: min(730px, calc(var(--guide-viewport-height, 100dvh) - 20px - env(safe-area-inset-bottom))); border-radius: 15px; }
  .guide-header { padding: 10px 11px; }
  .guide-identity { gap: 7px; }
  .guide-identity h2 { font-size: 15px; }
  .guide-identity p { font-size: 10px; }
  .guide-body { padding: 16px 14px; }
  .guide-privacy { padding: 8px 14px; font-size: 10px; }
  .guide-composer { padding: 9px 12px 8px; }
  .guide-input-hint { font-size: 9px; }
}
@media(max-height: 520px) {
  .guide-header { padding-top: 7px; padding-bottom: 7px; }
  .guide-identity .guide-portrait { width: 33px; height: 39px; }
  .guide-identity p, .guide-input-label { display: none; }
  .guide-privacy { padding-top: 5px; padding-bottom: 5px; }
  .guide-input { min-height: 47px; max-height: 70px; }
  .guide-composer { padding-top: 7px; padding-bottom: 6px; }
  .guide-feedback { padding-top: 5px; padding-bottom: 5px; }
}
@media(prefers-reduced-motion: reduce) { .xiaop-guide * { animation: none !important; scroll-behavior: auto !important; transition: none !important; } }
