.site-header nav .chat-entry { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 2px; color: var(--accent-ink); font-size: 12px; white-space: nowrap; }
.chat-entry:hover { color: var(--accent); }
.chat-dialog { position: fixed; inset: 16px 16px 16px auto; margin: 0; width: min(510px, calc(100vw - 32px)); height: calc(100dvh - 32px); max-width: none; max-height: none; padding: 0; overflow: hidden; border: 1px solid #cfe3e4; border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 20px 85px #17383e29; }
.chat-dialog::backdrop { background: #17383e30; backdrop-filter: blur(5px); }
.chat-dialog[open] { animation: chat-appear .22s ease-out; }
.chat-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; position: relative; }
.chat-header { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px 12px; padding: 25px 24px 15px; border-bottom: 1px solid var(--line); background: linear-gradient(140deg, #f1fbfa, #fff 75%); }
.chat-eyebrow { color: var(--dim); font-size: 10px; letter-spacing: .035em; margin-bottom: 5px; }
.chat-heading h2 { color: var(--ink); font: 500 24px/1.45 var(--sans); letter-spacing: -.035em; overflow-wrap: anywhere; }
.chat-close { align-self: center; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #d1e5e5; border-radius: 50%; background: #ffffffc9; color: var(--ink); font-size: 24px; line-height: 1; }
.chat-close:hover { background: var(--cyan-wash); }
.chat-disclosure { grid-column: 1 / -1; color: var(--dim); font-size: 10px; line-height: 1.8; }
.chat-session-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; color: var(--dim); font-size: 10px; line-height: 1.7; }
.chat-session-row > p { flex: 1; min-width: 0; }
.chat-reset { flex: none; min-height: 36px; padding: 6px 0 6px 12px; color: var(--accent-ink); font-size: 11px; }
.chat-dialog button:disabled { opacity: .5; cursor: default; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 24px; overscroll-behavior: contain; scrollbar-width: thin; scroll-padding-block: 18px; }
.chat-scroll:focus-visible { outline-offset: -3px; }
.chat-empty { padding: clamp(18px, 5vh, 55px) 0 28px; }
.chat-empty-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 24px; border: 1px solid #c8e5e5; border-radius: 16px; background: var(--cyan-wash); color: var(--accent); font: 500 22px var(--sans); }
.chat-empty h3 { margin: 0 0 8px; font: 500 21px/1.6 var(--sans); letter-spacing: -.03em; }
.chat-empty > p { font-size: 12px; color: var(--dim); line-height: 1.9; }
.chat-suggestions { display: grid; gap: 9px; margin-top: 25px; }
.chat-suggestions button { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--accent-ink); background: #fbfdfd; font-size: 12px; line-height: 1.8; text-align: left; }
.chat-suggestions button:hover:not(:disabled) { border-color: #a7d4d5; background: var(--cyan-wash); }
.chat-messages { display: flex; flex-direction: column; gap: 22px; }
.chat-message { display: flex; flex-direction: column; gap: 7px; max-width: 94%; min-width: 0; }
.chat-message[data-role="user"] { align-self: flex-end; }
.chat-message-author { color: var(--dim); font-size: 10px; line-height: 1.7; }
.chat-message[data-role="user"] .chat-message-author { text-align: right; }
.chat-message-content { padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px 15px 15px 4px; background: #f8fbfb; color: var(--ink); font-size: 13px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message[data-role="user"] .chat-message-content { border-color: #cbe5e4; border-radius: 15px 15px 4px 15px; background: #e9f7f5; }
.chat-message[data-streaming="true"] .chat-message-content:empty::after { content: '正在想…'; color: var(--dim); }
.chat-message-photo { color: var(--accent-ink); font-size: 10px; line-height: 1.7; }
.chat-message-incomplete { color: var(--dim); font-size: 10px; line-height: 1.7; }
.chat-latest { position: absolute; right: 24px; bottom: 228px; z-index: 1; padding: 9px 15px; border: 1px solid #c8e5e5; border-radius: 999px; color: var(--accent-ink); background: #fff; box-shadow: 0 4px 18px #17383e18; font-size: 11px; }
.chat-status-row { flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px; }
.chat-status { flex: 1; min-width: 0; color: var(--accent-ink); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.chat-status:empty { display: none; }
.chat-status:not(:empty) { padding-block: 10px; }
.chat-retry { flex: none; min-height: 38px; padding: 7px 0; color: var(--accent-ink); font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.chat-form { flex: none; padding: 14px 24px 20px; border-top: 1px solid var(--line); background: #fff; }
.chat-input-label { display: block; color: var(--dim); font-size: 10px; margin-bottom: 7px; }
.chat-form textarea { display: block; width: 100%; min-width: 0; min-height: 82px; max-height: 160px; resize: none; padding: 11px 13px; border: 1px solid #d1e5e5; border-radius: 12px; background: #fbfdfd; color: var(--ink); font: 14px/1.7 var(--sans); }
.chat-form textarea:focus { border-color: #7abdbf; box-shadow: 0 0 0 3px #087f860d; outline: none; }
.chat-form textarea:disabled { color: var(--dim); }
.chat-form textarea::placeholder { color: #85989b; font-size: 12px; }
.chat-compose-footer { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
.chat-compose-footer > p { flex: 1; color: var(--dim); font-size: 9px; line-height: 1.6; }
.chat-compose-footer > span { margin-left: auto; flex: none; color: var(--dim); font-size: 9px; }
.chat-send, .chat-stop { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 9px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; }
.chat-send:hover:not(:disabled) { background: #076f76; }
.chat-send span { font-size: 17px; line-height: 1; }
.chat-stop { padding-inline: 13px; border: 1px solid #c8e5e5; background: var(--cyan-wash); color: var(--accent-ink); }
.chat-photo-topic { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; padding: 2px 5px 2px 11px; margin-bottom: 10px; border: 1px solid #c8e5e5; border-radius: 9px; background: var(--cyan-wash); color: var(--accent-ink); font-size: 11px; }
.chat-photo-topic > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-photo-topic button { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; font-size: 19px; }
.chat-photo-entry { display: inline-flex; align-items: center; gap: 18px; min-height: 44px; margin-top: 17px; padding: 9px 16px; border: 1px solid #c8e5e5; border-radius: 999px; background: var(--cyan-wash); color: var(--accent-ink); font-size: 12px; }
.chat-photo-entry:hover { background: #ddf1f0; border-color: #a7d4d5; }
@keyframes chat-appear { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 760px) { .site-header nav { gap: 10px; } .site-header nav .chat-entry { font-size: 11px; } .chat-dialog { inset: 0; width: 100vw; height: 100dvh; border: 0; border-radius: 0; } .chat-header { padding: calc(17px + env(safe-area-inset-top, 0px)) 20px 12px; } .chat-heading h2 { font-size: 22px; } .chat-scroll { padding: 21px 20px; } .chat-status-row { padding-inline: 20px; } .chat-form { padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); } .chat-latest { right: 20px; } .chat-empty { padding-top: 20px; } .chat-empty-mark { margin-bottom: 19px; } }
@media (max-width: 420px) { .site-header { padding-inline: 16px; } .site-header nav { gap: 9px; } .wordmark { gap: 7px; } .wordmark b { font-size: 20px; } .brand-symbol { width: 8px; height: 8px; } .site-header nav .account-entry { padding-inline: 9px; } .site-header .menu-lines, .site-header nav a > span { display: none; } .chat-compose-footer > p { max-width: 112px; } }
@media (max-height: 540px) and (max-width: 760px) { .chat-header { gap: 3px 10px; padding-top: 10px; padding-bottom: 8px; } .chat-eyebrow, .chat-session-row, .chat-input-label { display: none; } .chat-form textarea { min-height: 55px; max-height: 90px; } .chat-form { padding-block: 8px; } }
.chat-compact .chat-header { gap: 3px 10px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 8px; }
@media (max-width: 760px) { html:has(.chat-dialog[open]) { scrollbar-gutter: auto; } }
.chat-compact .chat-eyebrow, .chat-compact .chat-session-row, .chat-compact .chat-input-label { display: none; }
.chat-compact .chat-form textarea { min-height: 55px; max-height: 90px; }
.chat-compact .chat-form { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: reduce) { .chat-dialog[open] { animation: none; } .chat-dialog * { scroll-behavior: auto !important; transition: none !important; } }
