/* ============================================================
   校园失物招领 · 样式
   蓝灰配色（主色 #2563EB），手机小程序风格，桌面居中显示
   ============================================================ */

:root {
  --blue: #2563eb; --blue-50: #eff6ff;
  --green: #16a34a; --green-50: #f0fdf4;
  --amber: #d97706; --amber-50: #fffbeb;
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0;
  --slate-300: #cbd5e1; --slate-400: #94a3b8; --slate-500: #64748b;
  --slate-600: #475569; --slate-700: #334155; --slate-900: #0f172a;
  --white: #fff;
}

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

body {
  background: linear-gradient(135deg, #e8eef7, #dfe7f0);
  font-family: ui-sans-serif, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  display: flex; justify-content: center; align-items: center; min-height: 100vh;
  padding: 20px 8px; color: var(--slate-900);
}

.phone { width: 393px; height: 850px; background: #000; border-radius: 44px; padding: 8px; box-shadow: 0 30px 80px rgba(30, 60, 120, .28); }
.screen { width: 100%; height: 100%; background: var(--slate-200); border-radius: 38px; overflow: hidden; display: flex; flex-direction: column; position: relative; }

/* 页面切换 */
.page { display: none; flex-direction: column; flex: 1; min-height: 0; }
.page.active { display: flex; }
.scroll { flex: 1; overflow-y: auto; padding: 0 0 12px; }
.scroll::-webkit-scrollbar { width: 0; }

/* 顶部栏 */
.topbar { background: var(--white); padding: 14px 16px; border-bottom: 1px solid var(--slate-100); flex: none; }
.topbar .row { display: flex; align-items: center; gap: 10px; }
.topbar h1 { font-size: 18px; font-weight: 700; color: var(--slate-900); }
.topbar .sub { font-size: 12px; color: var(--slate-500); margin-top: 2px; }
.topbar .spacer { flex: 1; }
.icon-btn { width: 32px; height: 32px; border: none; border-radius: 9999px; background: var(--slate-100); cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; color: var(--slate-600); }
.back-btn { width: 32px; height: 32px; border: none; background: none; cursor: pointer; font-size: 22px; color: var(--slate-700); line-height: 1; }
.back-btn.cancel { width: auto; font-size: 14px; color: var(--slate-500); }

/* 搜索条 */
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--slate-200); border-radius: 12px; padding: 10px 12px; margin: 12px 16px; cursor: pointer; color: var(--slate-400); font-size: 14px; }
.searchbar input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--slate-900); }
.searchbar .ico { flex: none; }
.searchbar .ph { flex: 1; }

/* 分类 tabs */
.cats { display: flex; gap: 8px; margin: 0 16px 12px; }
.cat { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; background: var(--white); font-size: 13px; color: var(--slate-500); cursor: pointer; border: 1px solid var(--slate-200); }
.cat.on { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }

/* chips（分类 / 热门 / 历史） */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 9999px; background: var(--white); border: 1px solid var(--slate-200); font-size: 13px; color: var(--slate-600); cursor: pointer; }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.chip-scroll { margin: 0 16px 12px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.chip-scroll::-webkit-scrollbar { height: 0; }
.chip-scroll .chip { flex: none; }

/* 卡片 */
.card { background: var(--white); border-radius: 14px; padding: 14px; margin: 0 16px 10px; display: flex; gap: 12px; align-items: center; cursor: pointer; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.card .emoji { width: 46px; height: 46px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--slate-100); }
.card .info { flex: 1; min-width: 0; }
.card .title { font-size: 15px; font-weight: 600; margin-bottom: 3px; color: var(--slate-900); }
.card .meta { font-size: 12px; color: var(--slate-500); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.mine-actions { margin-top: 8px; display: flex; gap: 8px; }

/* 标签 */
.badge { font-size: 11px; padding: 2px 8px; border-radius: 9999px; font-weight: 500; white-space: nowrap; }
.tag-type { font-size: 12px; padding: 2px 12px; border-radius: 9999px; background: var(--slate-100); color: var(--slate-500); font-weight: 500; }
.st-waiting { background: var(--amber-50); color: var(--amber); }
.st-searching { background: var(--blue-50); color: var(--blue); }
.st-done { background: var(--slate-100); color: var(--slate-500); }

/* 横幅 */
.hero { background: linear-gradient(135deg, #2563eb, #3b82f6); border-radius: 16px; margin: 4px 16px 16px; padding: 18px; color: #fff; display: flex; align-items: center; justify-content: space-between; }
.hero .ht { font-size: 16px; font-weight: 700; }
.hero .hs { font-size: 12px; opacity: .9; margin-top: 3px; }
.hero .go { background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .5); color: #fff; padding: 8px 14px; border-radius: 9999px; font-size: 13px; cursor: pointer; }

/* 区块标题 */
.sect { display: flex; align-items: baseline; gap: 8px; margin: 6px 16px 10px; }
.sect h2 { font-size: 16px; font-weight: 700; color: var(--slate-900); }
.sect .cnt { font-size: 12px; color: var(--slate-400); }
.foot { text-align: center; font-size: 11px; color: var(--slate-400); padding: 14px 0; }

/* 空状态 */
.empty { text-align: center; padding: 40px 16px; color: var(--slate-400); font-size: 14px; }
.empty .empty-ico { font-size: 40px; margin-bottom: 10px; }

/* 按钮 */
.btn { display: block; width: calc(100% - 32px); margin: 0 16px; padding: 13px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; color: #fff; background: var(--blue); text-align: center; }
.btn.ghost { background: var(--white); color: var(--blue); border: 1.5px solid var(--blue); }
.btn.small { padding: 6px 12px; font-size: 12px; border-radius: 10px; width: auto; margin: 0; }
.btn.green { background: var(--green); }
.btn.slate { background: var(--slate-100); color: var(--slate-600); }
.btn-row { display: flex; gap: 10px; margin: 0 16px 14px; }
.btn-row .btn { flex: 1; margin: 0; }
.detail-actions { flex: none; padding: 12px 0; background: var(--white); border-top: 1px solid var(--slate-100); }
.ghost-inline { background: transparent; color: var(--slate-500); border: none; }

/* 表单 */
.form { padding: 0 16px; }
.field { margin-bottom: 16px; }
.field .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--slate-700); margin-bottom: 7px; }
.field .req { color: var(--amber); }
.field input, .field textarea { width: 100%; border: 1px solid var(--slate-200); border-radius: 12px; padding: 11px 12px; font-size: 14px; outline: none; background: var(--white); font-family: inherit; color: var(--slate-900); }
.field input:focus, .field textarea:focus { border-color: var(--blue); }
.field textarea { height: 82px; resize: none; }
.field .hint { font-size: 11px; color: var(--slate-400); margin-top: 5px; }
.type-switch { display: flex; gap: 10px; margin-bottom: 14px; }
.type-switch .opt { flex: 1; text-align: center; padding: 11px 0; border-radius: 12px; background: var(--white); font-size: 15px; cursor: pointer; border: 1.5px solid var(--slate-200); color: var(--slate-500); }
.type-switch .opt.on-lost { border-color: var(--blue); color: var(--blue); background: var(--blue-50); font-weight: 600; }
.type-switch .opt.on-found { border-color: var(--green); color: var(--green); background: var(--green-50); font-weight: 600; }
.type-hint { font-size: 12px; color: var(--slate-500); background: var(--slate-50); border: 1px solid var(--slate-100); border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; }
.upload { border: 1.5px dashed var(--slate-300); border-radius: 12px; padding: 20px; text-align: center; color: var(--slate-500); font-size: 13px; cursor: pointer; background: var(--white); }
.upload .ico { font-size: 26px; display: block; margin-bottom: 5px; }

/* 详情 */
.photo { height: 220px; background: linear-gradient(135deg, #dbeafe, #e0e7ff); display: flex; align-items: center; justify-content: center; font-size: 80px; position: relative; flex: none; }
.detail-head { padding: 14px 16px; background: var(--white); }
.detail-head .tags { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.detail-head h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.detail-head .code { font-size: 12px; color: var(--slate-400); }
.dblock { background: var(--white); margin: 12px 16px; border-radius: 14px; padding: 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.dblock h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--slate-900); }
.drow { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.drow .k { color: var(--slate-500); }
.drow .v { font-weight: 600; color: var(--slate-900); }
.dblock .desc { font-size: 14px; color: var(--slate-600); line-height: 1.7; }
.publisher { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 9999px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; flex: none; }
.publisher .pn { font-weight: 600; font-size: 14px; }
.publisher .pc { font-size: 12px; color: var(--slate-500); }
.publisher .contact { margin-left: auto; font-size: 13px; color: var(--blue); font-weight: 600; }
.tip { font-size: 12px; color: var(--slate-500); background: var(--slate-50); border: 1px solid var(--slate-100); border-radius: 10px; padding: 10px 12px; margin: 0 16px; line-height: 1.6; }

/* 统计 */
.stats { display: flex; margin: 0 16px 12px; background: var(--white); border-radius: 14px; padding: 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.stats .st { flex: 1; text-align: center; border-right: 1px solid var(--slate-100); }
.stats .st:last-child { border-right: none; }
.stats .num { font-size: 20px; font-weight: 800; color: var(--slate-900); }
.stats .lbl { font-size: 11px; color: var(--slate-500); margin-top: 2px; }

/* 底部导航 */
.tabbar { flex: none; height: 58px; background: var(--white); border-top: 1px solid var(--slate-100); display: flex; }
.tabbar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--slate-500); cursor: pointer; }
.tabbar .tab .ico { font-size: 20px; line-height: 1; }
.tabbar .tab.on { color: var(--blue); }

/* 弹窗 & toast */
.mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); display: none; align-items: center; justify-content: center; z-index: 30; border-radius: 38px; }
.mask.show { display: flex; }
.modal { background: #fff; border-radius: 18px; padding: 22px; width: 80%; text-align: center; }
.modal h3 { margin: 8px 0 4px; font-size: 16px; }
.modal .modal-ico { font-size: 40px; }
.modal .phone-num { font-size: 20px; font-weight: 800; color: var(--blue); margin: 10px 0 16px; word-break: break-all; }
.toast { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); background: rgba(15, 23, 42, .9); color: #fff; padding: 16px 24px; border-radius: 14px; font-size: 15px; display: none; z-index: 40; text-align: center; max-width: 80%; }
.toast.show { display: block; }
.toast .big { font-size: 40px; display: block; margin-bottom: 8px; }
