/* 智能导航页：上部通知区 + 底部 AI 搜索框 */
body.assistant-page { padding-bottom: calc(240px + env(safe-area-inset-bottom, 0px)); }

.assistant-hero { padding: 34px 4px 6px; }
.assistant-eyebrow { margin: 0 0 10px; font-size: 12px; letter-spacing: 2px; color: #6b7f75; font-weight: 600; }
.assistant-hero h1 { margin: 0 0 14px; font-size: clamp(28px, 6vw, 40px); line-height: 1.25; color: #1e332c; font-weight: 800; }
.assistant-hero .title-dot { color: var(--green, #17695c); }
.assistant-hero p { margin: 0; font-size: 15px; line-height: 1.9; color: #52645c; }

/* 通知与推荐区域 */
.assistant-board { margin-top: 18px; }
.assistant-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.assistant-board-head h2 { margin: 0; font-size: 21px; color: #1e332c; }
#assistant-board-sub { margin: 4px 0 0; font-size: 13px; color: #71837a; }
.assistant-back { min-height: 38px; padding: 7px 14px; border: 1px solid #cbdace; border-radius: 9px; background: #fff; color: #174f45; font-weight: 600; font-size: 13px; cursor: pointer; }
.assistant-back:hover { background: #f0f4ed; }

.assistant-board-body { display: grid; gap: 12px; }

/* 通知卡片 */
.notice-card { display: grid; grid-template-columns: 4px 1fr; gap: 0; background: #fffef9; border: 1px solid #e2e8e0; border-radius: 14px; overflow: hidden; }
.notice-card .bar { background: linear-gradient(180deg, #497865, #6f9a85); }
.notice-card-inner { padding: 14px 16px; display: grid; gap: 6px; }
.notice-card-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.notice-tag { padding: 2px 9px; border-radius: 99px; background: #e8f1eb; color: #174f45; font-weight: 700; }
.notice-date { color: #93a49b; }
.notice-card h3 { margin: 0; font-size: 16px; color: #24352e; }
.notice-card p { margin: 0; font-size: 13.5px; line-height: 1.8; color: #5a6b62; }

/* 搜索中 / 结果状态 */
.assistant-loading { display: flex; align-items: center; gap: 12px; padding: 26px 18px; background: #fffef9; border: 1px dashed #c3d5ca; border-radius: 14px; color: #4d6156; font-size: 14.5px; }
.assistant-spin { width: 18px; height: 18px; border: 3px solid #dbe7e0; border-top-color: #17695c; border-radius: 50%; animation: assistant-spin 0.9s linear infinite; flex-shrink: 0; }
@keyframes assistant-spin { to { transform: rotate(360deg); } }

.ai-answer { background: #f4f8f4; border: 1px solid #d8e5db; border-radius: 14px; padding: 16px 18px; }
.ai-answer-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-badge { padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #17695c; color: #fff; }
.ai-badge.local { background: #8b9a91; }
.ai-question { font-size: 12.5px; color: #6b7f75; }
.ai-answer p { margin: 0; font-size: 15px; line-height: 1.9; color: #2c3f36; }
.ai-source { margin-top: 10px !important; font-size: 12px !important; color: #8b9a91 !important; }

.assistant-section-title { display: flex; align-items: center; gap: 8px; margin: 20px 0 10px; font-size: 15px; font-weight: 700; color: #24352e; }
.assistant-section-title em { font-style: normal; font-size: 12px; font-weight: 600; color: #71837a; }
.assistant-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.assistant-cards .activity-card { margin: 0; }

.assistant-empty { padding: 26px 18px; text-align: center; background: #fffef9; border: 1px dashed #c3d5ca; border-radius: 14px; color: #5a6b62; font-size: 14px; line-height: 1.9; }

/* 底部 AI 搜索框（固定，位于底部导航之上） */
.assistant-ask { position: fixed; z-index: 25; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: calc(100% - 24px); max-width: 568px; display: grid; gap: 8px; }
.assistant-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
body.has-results .assistant-chips { display: none; }
.assistant-chips::-webkit-scrollbar { display: none; }
.assistant-chips button { flex-shrink: 0; min-height: 34px; padding: 5px 14px; border: 1px solid #cfdcd4; border-radius: 99px; background: #ffffffd9; color: #3d5247; font-size: 13px; font-weight: 600; cursor: pointer; backdrop-filter: blur(4px); }
.assistant-chips button:hover { border-color: #17695c; color: #17695c; }
.assistant-form { position: relative; display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid #b9cec2; border-radius: 16px; padding: 9px 9px 9px 15px; box-shadow: 0 8px 30px #223d361f; }
.assistant-form:focus-within { border-color: #17695c; box-shadow: 0 8px 30px #17695c2e; }
.assistant-form svg { color: #17695c; flex-shrink: 0; }
.assistant-form input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 15.5px; color: #24352e; background: transparent; font-family: inherit; }
.assistant-form input::placeholder { color: #a3b2a9; }
.assistant-clear { border: 0; background: #eef3ef; color: #5a6b62; width: 28px; height: 28px; border-radius: 99px; font-size: 16px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.assistant-submit { flex-shrink: 0; border: 0; background: #17695c; color: #fff; border-radius: 11px; min-height: 44px; padding: 8px 20px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.assistant-submit:hover { background: #124f44; }
.assistant-submit:disabled { opacity: 0.6; cursor: default; }
.assistant-mode { justify-self: end; border: 0; background: transparent; color: #71837a; font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px; text-decoration: underline dotted; text-underline-offset: 3px; }
.assistant-mode:hover { color: #17695c; }

/* AI 设置弹窗 */
#ai-config-dialog { border: 0; border-radius: 18px; padding: 0; width: min(480px, calc(100vw - 32px)); background: #fffefa; }
#ai-config-dialog::backdrop { background: #223d3659; }
.ai-config-body { position: relative; padding: 24px 22px; display: grid; gap: 14px; }
.ai-config-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 99px; background: #eef3ef; color: #4d6156; font-size: 18px; cursor: pointer; }
.ai-config-body h2 { margin: 0; font-size: 20px; color: #1e332c; }
.ai-config-note { margin: 0; font-size: 13px; line-height: 1.8; color: #5a6b62; background: #f4f8f4; border: 1px solid #d8e5db; border-radius: 10px; padding: 10px 13px; }
.ai-config-field { display: grid; gap: 5px; }
.ai-config-field label { font-size: 13px; font-weight: 700; color: #3d5247; }
.ai-config-field input { border: 1px solid #cbdace; border-radius: 9px; min-height: 44px; padding: 8px 12px; font-size: 14px; font-family: inherit; color: #24352e; background: #fff; }
.ai-config-field input:focus { outline: 2px solid #17695c; outline-offset: 1px; border-color: #17695c; }
.ai-config-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.ai-config-actions .primary-button { flex: 0 1 auto; }
.ai-config-status { margin: 0; font-size: 13px; color: #52645c; min-height: 18px; }

@media (max-width: 560px) {
  .assistant-cards { grid-template-columns: 1fr; }
  .assistant-hero { padding-top: 24px; }
  .assistant-submit { padding: 8px 15px; font-size: 14px; }
}
