/* ================= 湖南师范大学教务处 · 移动端高保真原型 ================= */
:root {
  --primary: #0057A8;
  --primary-deep: #00417D;
  --primary-grad: linear-gradient(135deg, #004E96 0%, #0A6BC5 100%);
  --bg: #F4F7FB;
  --card: #FFFFFF;
  --text: #1A2233;
  --text-2: #5A6478;
  --text-3: #8A94A6;
  --line: #EAEFF5;
  --orange: #E8830C;
  --green: #1F9D55;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(16, 42, 82, 0.07);
  --tabbar-h: 58px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; background: #E7EDF5; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
}

/* ============ 手机外框（桌面预览） ============ */
.phone-frame {
  width: 390px; height: 844px;
  background: #0B1220;
  border-radius: 54px;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(10, 25, 50, 0.45), inset 0 0 3px rgba(255,255,255,.25);
  position: relative;
}
.phone-frame::after {
  content: ""; position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.28);
}
.phone-screen {
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 42px;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}

@media (max-width: 500px) {
  body { background: var(--bg); }
  .phone-frame { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; padding: 0; box-shadow: none; }
  .phone-frame::after { display: none; }
  .phone-screen { border-radius: 0; }
}

/* ============ 状态栏 ============ */
/* 原生壳内作为真机状态栏的模拟垫高块（高度≈常规状态栏，挖孔区由系统处理） */
.status-bar {
  height: 32px; flex-shrink: 0;
  background: var(--primary-deep);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 26px 6px; z-index: 5;
  position: relative;
}
.sb-time { color: #fff; font-size: 14px; font-weight: 600; width: 54px; }
.sb-notch {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  width: 118px; height: 26px; background: #0B1220; border-radius: 14px;
}
.sb-icons { display: flex; gap: 6px; align-items: center; }

/* ============ 页面容器 ============ */
#pages { flex: 1; position: relative; overflow: hidden; }
.page {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  display: none;
  background: var(--bg);
  /* 底部预留：标签栏高 + 手势导航条安全区 */
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 16px);
}
.page.active { display: block; }
/* 切页平移过渡：新旧两页同时位移，两页恰好拼合无重叠，整屏推移 */
.page.leaving { display: block; }
.page.enter-from-right { animation: pan-enter-right .3s cubic-bezier(.3, .7, .3, 1); }
.page.enter-from-left  { animation: pan-enter-left  .3s cubic-bezier(.3, .7, .3, 1); }
.page.leave-to-left    { animation: pan-leave-left  .3s cubic-bezier(.3, .7, .3, 1); }
.page.leave-to-right   { animation: pan-leave-right .3s cubic-bezier(.3, .7, .3, 1); }
@keyframes pan-enter-right { from { transform: translateX(100%); }  to { transform: none; } }
@keyframes pan-enter-left  { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes pan-leave-left  { from { transform: none; } to { transform: translateX(-100%); } }
@keyframes pan-leave-right { from { transform: none; } to { transform: translateX(100%); } }
.page { overscroll-behavior-y: contain; } /* 下拉刷新时禁用浏览器原生橡皮筋 */
.page::-webkit-scrollbar, .detail-scroll::-webkit-scrollbar { width: 0; }

/* ============ 下拉刷新（浮动胶囊指示器，避免被吸顶页头遮挡） ============ */
.ptr {
  position: absolute; top: 6px; left: 50%; width: 130px; margin-left: -65px; height: 36px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  color: var(--text-3); font-size: 12px;
  transform: translateY(calc(var(--ptr-y, 0) * 1px - 60px));
  z-index: 30; pointer-events: none;
}
.ptr-spin {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #D5DEE9; border-top-color: var(--primary);
  transition: transform .15s;
}
.ptr.ready .ptr-spin { transform: rotate(180deg); }
.page.refreshing .ptr-spin { animation: ptr-rotate .7s linear infinite; }
@keyframes ptr-rotate { to { transform: rotate(360deg); } }

/* ============ 通用页头 ============ */
.page-header {
  background: var(--primary-grad);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 16px; /* 顶部预留状态栏/挖孔区 */
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 61, 122, 0.25);
}
.page-header h1 { color: #fff; font-size: 19px; font-weight: 700; letter-spacing: 1px; }

/* ============ 首页 ============ */
.home-header { position: relative; background: var(--primary-deep); overflow: hidden; }
.home-header-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0, 65, 125, 0.82), rgba(0, 65, 125, 0.92)),
    url("https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=Modern%20flat%20vector%20illustration%20of%20Chinese%20university%20campus%2C%20academic%20buildings%20with%20trees%20and%20students%20walking%2C%20landmark%20clock%20tower%2C%20deep%20blue%20sky%2C%20education%20theme%2C%20minimal%20clean%20banner%20design%2C%20blue%20color%20palette&image_size=landscape_16_9");
  background-size: cover; background-position: center;
  opacity: .9;
}
.home-header-inner { position: relative; padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 8px; }
.home-brand { display: flex; align-items: center; gap: 12px; }
.home-logo {
  width: 46px; height: 46px; border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(4px);
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.home-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-logo.big { width: 64px; height: 64px; font-size: 20px; border-radius: 16px; }
.home-title h1 { color: #fff; font-size: 19px; font-weight: 700; letter-spacing: 2px; }
.home-title p { color: rgba(255,255,255,.72); font-size: 11px; margin-top: 3px; letter-spacing: .5px; }

.home-search {
  margin-top: 16px; background: #fff; border-radius: 22px;
  height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  box-shadow: 0 4px 14px rgba(0, 40, 90, 0.25);
  cursor: pointer;
}
.home-search span { color: var(--text-3); font-size: 13px; }

.quick-grid {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); margin: 14px 14px 0;
  border-radius: var(--radius); padding: 16px 6px 12px;
  box-shadow: var(--shadow);
}
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; }
.quick-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.q-blue { background: #E8F1FB; color: var(--primary); }
.q-cyan { background: #E3F6F4; color: #0E9488; }
.q-orange { background: #FDF0DE; color: var(--orange); }
.q-green { background: #E5F5EC; color: var(--green); }
.quick-item span { font-size: 12px; color: var(--text-2); }

.home-body { padding: 14px 14px 0; }
.card-section {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px 6px;
}
.card-head h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; }
.card-head h2 .bar { display: inline-block; width: 4px; height: 15px; border-radius: 2px; background: var(--primary); margin-right: 8px; }
.card-head a { color: var(--text-3); font-size: 12px; display: flex; align-items: center; cursor: pointer; }

.home-list { padding: 6px 6px 8px; }
.home-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; border-radius: 10px; cursor: pointer;
}
.home-item:active { background: #F3F7FC; }
.home-item .h-title {
  flex: 1; font-size: 14px; color: var(--text); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-item .h-date { font-size: 11px; color: var(--text-3); flex-shrink: 0; }

.tag {
  flex-shrink: 0; font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 6px; line-height: 1.5;
}
.tag-student { background: #E8F1FB; color: var(--primary); }
.tag-teacher { background: #FDF0DE; color: var(--orange); }
.tag-news { background: #E5F5EC; color: var(--green); }

.home-footer { text-align: center; padding: 6px 0 18px; }
.home-footer p { font-size: 11px; color: var(--text-3); line-height: 1.8; }

/* ============ Tab 切换 ============ */
.seg-tabs {
  position: sticky; top: 62px; z-index: 9;
  display: flex; background: #fff;
  margin: 10px 14px 0; border-radius: 12px;
  padding: 4px; box-shadow: var(--shadow);
}
.seg-tab {
  flex: 1; border: none; background: transparent;
  font-size: 14px; color: var(--text-2);
  height: 34px; border-radius: 9px; cursor: pointer;
  transition: all .2s; font-family: inherit;
}
.seg-tab.active { background: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 87, 168, .35); }

/* ============ 列表页 ============ */
.list-wrap { padding: 12px 14px 0; }
.list-item {
  background: var(--card); border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 13px 14px; margin-bottom: 10px;
  cursor: pointer; transition: transform .12s;
}
.list-item:active { transform: scale(.98); }
.li-top { display: flex; align-items: flex-start; gap: 8px; }
.li-title {
  flex: 1; font-size: 14.5px; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.li-meta { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.li-date { font-size: 11px; color: var(--text-3); }
.li-dots { display: flex; gap: 4px; margin-left: auto; }
.li-dots i { width: 4px; height: 4px; border-radius: 50%; background: #D4DCE8; }

/* 头条样式（新闻第一条） */
.list-item.feature { background: var(--primary-grad); }

/* ============ 未读红点：打开详情后消除 ============ */
.list-item.unread .li-title::before,
.home-item.unread .h-title::before,
.sr-item.unread .li-title::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: #F5333F;
  margin-right: 6px; vertical-align: 2px;
}
.list-item.feature.unread .li-title::before { background: #FF97A0; } /* 头条蓝底上提亮红点 */
.list-item.feature .li-title { color: #fff; font-size: 16px; font-weight: 600; -webkit-line-clamp: 3; }
.list-item.feature .li-date { color: rgba(255,255,255,.75); }
.list-item.feature .li-dots i { background: rgba(255,255,255,.4); }
.feature-badge {
  display: inline-block; font-size: 10px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4);
  padding: 2px 8px; border-radius: 6px; margin-bottom: 8px; letter-spacing: 2px;
}

/* ============ 列表底部 / 状态 ============ */
.load-more-area { padding: 6px 14px; }
.no-more { text-align: center; color: var(--text-3); font-size: 12px; padding: 14px 0 6px; }

.state-block { padding: 30px 20px; text-align: center; display: none; }
.state-block.show { display: block; }
.state-icon { font-size: 40px; margin-bottom: 10px; }
.state-block p { color: var(--text-3); font-size: 13px; margin-bottom: 14px; line-height: 1.7; }
.retry-btn {
  border: none; background: var(--primary); color: #fff;
  height: 36px; padding: 0 26px; border-radius: 18px;
  font-size: 13px; cursor: pointer; font-family: inherit;
}

/* 骨架屏 */
.skeleton-list { padding: 12px 14px; }
.sk-item { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.sk-line { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #EDF1F7 25%, #F7FAFD 50%, #EDF1F7 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; margin-bottom: 10px; }
.sk-line.short { width: 45%; }
.sk-line.mid { width: 70%; margin-bottom: 0; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============ 详情页 ============ */
.detail-overlay {
  position: absolute; inset: 0; z-index: 50;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.32, .72, .34, 1);
  display: flex; flex-direction: column;
}
.detail-overlay.show { transform: translateX(0); }
.detail-header {
  height: calc(52px + env(safe-area-inset-top, 0px)); flex-shrink: 0;
  background: var(--primary-grad);
  display: flex; align-items: center; padding: 0 12px; padding-top: env(safe-area-inset-top, 0px); gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 61, 122, .3);
}
.detail-header h1 {
  flex: 1; color: #fff; font-size: 16px; font-weight: 600;
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.back-btn {
  width: 36px; height: 36px; border: none; background: rgba(255,255,255,.15);
  border-radius: 50%; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dh-placeholder { width: 36px; flex-shrink: 0; }
.detail-scroll { flex: 1; overflow-y: auto; }
.detail-body { padding: 16px 16px 28px; }
.detail-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px; }
.detail-title { font-size: 19px; font-weight: 700; line-height: 1.55; margin-bottom: 14px; }
.detail-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.detail-meta span { font-size: 12px; color: var(--text-3); }
.detail-meta .dm-cat { color: var(--primary); font-weight: 600; }

.detail-content { font-size: 15px; line-height: 1.9; color: #2A3345; word-break: break-word; }
.detail-content p { margin-bottom: 12px; text-indent: 2em; }
.detail-content p:only-child, .detail-content p:first-child { text-indent: 0; }
.detail-content img { max-width: 100%; border-radius: 8px; margin: 6px 0; }
.detail-content table {
  width: 100% !important; border-collapse: collapse; margin: 12px 0;
  font-size: 12.5px; display: block; overflow-x: auto; white-space: nowrap;
}
.detail-content th, .detail-content td {
  border: 1px solid #D9E2EE; padding: 6px 8px; text-align: left; line-height: 1.5;
}
.detail-content th { background: #F0F5FB; font-weight: 600; }
.detail-content a { color: var(--primary); text-decoration: none; border-bottom: 1px dashed var(--primary); word-break: break-all; }
.detail-content strong { font-weight: 700; }

.detail-attach { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.detail-attach h4 { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.attach-item {
  display: flex; align-items: center; gap: 8px;
  background: #F4F8FC; border: 1px solid #E1EAF5; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; color: var(--primary);
  font-size: 13px; text-decoration: none; word-break: break-all;
}
.attach-item svg { flex-shrink: 0; }

.detail-src-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 14px; width: 100%; height: 42px;
  border: 1px solid #CBD9EA; background: #fff; border-radius: 12px;
  color: var(--text-2); font-size: 13px; cursor: pointer; font-family: inherit;
  text-decoration: none;
}
.detail-src-btn:active { background: #F4F8FC; }

/* 详情骨架 */
.detail-sk-title { height: 22px; border-radius: 6px; margin-bottom: 10px; }
.detail-sk-line { height: 14px; border-radius: 6px; margin-bottom: 10px; }

/* ============ 关于页 ============ */
.about-body { padding: 16px 14px; }
.about-hero {
  background: var(--primary-grad); border-radius: var(--radius);
  padding: 26px 16px; text-align: center; margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 70, 140, .3);
}
.about-hero h2 { color: #fff; font-size: 18px; margin-top: 12px; letter-spacing: 1px; }
.about-hero p { color: rgba(255,255,255,.75); font-size: 12px; margin-top: 5px; letter-spacing: 3px; }
.about-hero .home-logo { margin: 0 auto; }
.about-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 16px; margin-bottom: 14px;
}
.about-desc { font-size: 14px; line-height: 2; color: var(--text-2); text-align: justify; }
.about-card.contact h3 { font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; }
.about-card.contact h3::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--primary); margin-right: 8px; }
.contact-row {
  display: flex; padding: 10px 0; border-bottom: 1px solid #F1F5FA;
  font-size: 13.5px; color: var(--text-2); gap: 14px;
}
.contact-row:last-child { border-bottom: none; }
.c-label { color: var(--text-3); flex-shrink: 0; width: 34px; }
.contact-row a { color: var(--primary); text-decoration: none; }
.about-ver { text-align: center; font-size: 11px; color: var(--text-3); padding: 4px 0 10px; }

/* ============ 底部导航 ============ */
.tab-bar {
  /* 高度含手势导航条安全区；padding 把安全区留在导航条背景内，图标不被遮挡 */
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); flex-shrink: 0;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; z-index: 40;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab-item {
  flex: 1; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); cursor: pointer; font-family: inherit;
  transition: color .15s;
}
.tab-item span { font-size: 10.5px; }
.tab-item.active { color: var(--primary); }
.tab-item.active svg { filter: drop-shadow(0 0 6px rgba(0, 87, 168, .4)); }

/* ============ OTA 更新弹窗 ============ */
#ota-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(16, 30, 46, .5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.ota-card {
  width: 74%; max-width: 300px; background: #fff; border-radius: 18px;
  padding: 26px 22px 18px; text-align: center;
  box-shadow: 0 16px 48px rgba(0, 40, 90, .3);
}
.ota-icon { font-size: 34px; }
.ota-card h3 { font-size: 17px; color: var(--text); margin: 10px 0 8px; font-weight: 700; }
.ota-note { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 18px; }
.ota-btn {
  display: block; width: 100%; border: none; border-radius: 22px;
  padding: 12px 0; font-size: 15px; font-family: inherit; cursor: pointer;
  background: #F0F4F9; color: var(--text-2);
}
.ota-btn.primary {
  background: var(--primary-grad); color: #fff; font-weight: 600;
  margin-bottom: 10px;
}
.ota-btn.primary:disabled { opacity: .7; }

/* ============ Toast ============ */
.toast {
  position: absolute; left: 50%; bottom: calc(var(--tabbar-h) + 30px);
  transform: translateX(-50%) translateY(16px);
  background: rgba(20, 30, 50, .88); color: #fff;
  font-size: 13px; padding: 9px 20px; border-radius: 20px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 99;
  white-space: nowrap; max-width: 85%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 下拉刷新提示条 */
.pull-hint {
  position: absolute; top: 0; left: 0; right: 0; z-index: 8;
  text-align: center; font-size: 12px; color: var(--text-3);
  padding: 8px 0; background: linear-gradient(#fff, transparent);
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.pull-hint.show { opacity: 1; }

/* ============ 搜索页 ============ */
.search-overlay {
  position: absolute; inset: 0; z-index: 60;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform .26s cubic-bezier(.32, .72, .34, 1);
  display: flex; flex-direction: column;
}
.search-overlay.show { transform: translateY(0); }

.search-bar-row {
  flex-shrink: 0;
  background: var(--primary-grad);
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  box-shadow: 0 2px 8px rgba(0, 61, 122, .3);
}
.search-input-wrap {
  flex: 1; height: 36px; background: #fff; border-radius: 18px;
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  position: relative;
}
.search-input-wrap svg { flex-shrink: 0; }
#search-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text); font-family: inherit;
  min-width: 0;
}
#search-input::placeholder { color: var(--text-3); }
.search-clear {
  position: absolute; right: 8px;
  width: 20px; height: 20px; border: none; border-radius: 50%;
  background: #C6CFDD; color: #fff; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  padding: 0;
}
.search-clear.show { display: flex; }
.search-cancel {
  border: none; background: transparent; color: #fff;
  font-size: 14px; cursor: pointer; font-family: inherit;
  flex-shrink: 0; padding: 4px 2px;
}

.search-body { flex: 1; overflow-y: auto; padding: 14px; }
.search-body::-webkit-scrollbar { width: 0; }
/* 原生 App 壳 / PWA 全屏模式下已有系统状态栏，隐藏仿真状态栏 */
.native .status-bar { display: none; }
@media (display-mode: standalone) { .status-bar { display: none; } }
.sh-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.search-his h3 { font-size: 13px; color: var(--text-2); font-weight: 600; }
.sh-clear { border: none; background: none; font-size: 12px; color: var(--text-3); cursor: pointer; font-family: inherit; padding: 2px 4px; }
.sh-clear:active { color: var(--text-2); }
.his-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.his-empty { font-size: 12px; color: var(--text-3); }
.his-tag {
  border: none; background: #fff; border-radius: 16px;
  font-size: 13px; color: var(--text-2); padding: 7px 16px;
  box-shadow: var(--shadow); cursor: pointer; font-family: inherit;
}
.his-tag:active { background: #EDF3FA; }

.search-results { display: none; }
.search-results.show { display: block; }
.sr-count { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.sr-item {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 10px; cursor: pointer;
}
.sr-item:active { transform: scale(.98); }
.sr-item .li-title { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-item .li-title b { color: var(--primary); font-weight: 700; }
.sr-item .li-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.sr-empty {
  text-align: center; color: var(--text-3); font-size: 13px;
  padding: 40px 0;
}
.sr-empty .state-icon { font-size: 38px; margin-bottom: 8px; }
