/* ==========================================================================
   118图库 · 共用样式 v3（克制度：白面 + 单强调色 + 细描边）
   规则：
   1. 全站只有一个强调色（--blue），只用于「选中态 / 主按钮 / 当前项」
   2. 颜色只给有语义的数据（号码球的波色），其余一律灰阶
   3. 层次用「面 + 细线」表达，不用阴影、不用渐变
   ========================================================================== */

:root {
  /* 强调色 */
  --blue: #2E5BFF;
  --blue-soft: #EDF1FF;
  --blue-press: #2449D6;

  /* 语义色（只给号码/提示） */
  --red: #E11D48;
  --green: #16A34A;
  --ball-blue: #2563EB;

  /* 中性色 */
  --ink: #111827;
  --ink-2: #4B5563;
  --ink-3: #98A2B3;
  --ink-4: #C3C9D4;

  --line: #E8EBF1;
  --line-2: #F3F5F9;
  --bg: #F6F7F9;
  --card: #FFFFFF;

  /* 形状 */
  --r-card: 12px;
  --r-ctrl: 10px;
  --r-pill: 999px;

  /* 尺寸 */
  --app-w: 560px;
  --bar-h: 50px;
  --tab-h: 54px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #E9EBEF;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
img { display: block; max-width: 100%; border: 0; }
button, input, textarea { font: inherit; color: inherit; background: none; border: 0; outline: none; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* 输入框由容器表达状态，不再叠外框 */
.searchbar input:focus-visible,
.inputbar input:focus-visible,
.comment-form textarea:focus-visible { outline: none; }

/* ---------------------------------------------------------------- 页面骨架 */
.app {
  position: relative;
  width: 100%;
  max-width: var(--app-w);
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--bar-h) 0 calc(var(--tab-h) + var(--safe-b));
  background: var(--bg);
  overflow-x: hidden;
}

.app--detail {
  padding-bottom: calc(var(--tab-h) + 54px + var(--safe-b));
}

@media (min-width: 600px) {
  .app { box-shadow: 0 0 0 1px rgba(16, 24, 40, .04); }
}

/* ------------------------------------------------------------------ 顶栏 */
.appbar {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 60;
  width: 100%;
  max-width: var(--app-w);
  height: var(--bar-h);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.appbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.appbar .brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #fff;
  background: var(--blue);
}

.appbar .title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appbar .acts {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex: none;
}

.appbar .act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0;
  font-size: 9px;
  line-height: 1.2;
  color: var(--ink-2);
}

.appbar .act svg { width: 19px; height: 19px; }
.appbar .act:active { opacity: .6; }

.appbar .back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 30px;
  margin-left: -2px;
  flex: none;
  color: var(--ink);
}

.appbar .back svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------------ 公告 */
.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.notice-label {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--red);
}

.notice-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

.notice-view {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 20px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
}

.notice-track {
  display: inline-flex;
  height: 20px;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: notice-scroll 30s linear infinite;
}

.notice-track span { padding-right: 60px; }
.notice:hover .notice-track { animation-play-state: paused; }

@keyframes notice-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* -------------------------------------------------------------- 图片轮播 */
.banner {
  position: relative;
  margin: 12px 12px 0;
  overflow: hidden;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: #EDEFF3;
  aspect-ratio: 2048 / 754;
}

.banner > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .45s ease;
}

.banner > img.on { opacity: 1; }

.banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.banner-dots i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: var(--r-pill);
  background: rgba(17, 24, 39, .28);
  transition: width .2s ease, background .2s ease;
}

.banner-dots i.on {
  width: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, .12);
}

/* -------------------------------------------------------------- 彩种切换 */
.lottery-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 12px 0;
}

.lottery-switch .item {
  position: relative;
  padding: 10px 4px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: background .18s ease, border-color .18s ease;
}

.lottery-switch .item b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.lottery-switch .item i {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
}

.lottery-switch .item.active {
  background: var(--blue);
  border-color: var(--blue);
}

.lottery-switch .item.active b { color: #fff; }
.lottery-switch .item.active i { color: rgba(255, 255, 255, .78); }

.lottery-switch .item.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--blue);
  border-bottom: 0;
}

/* -------------------------------------------------------------- 开奖容器 */
.result-card {
  margin: 12px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}

.lottery-frame {
  display: block;
  width: 100%;
  height: 160px;
  border: 0;
  background: #fff;
}

/* -------------------------------------------------------------- 链接模块 */
.quick-blocks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-blocks a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--ink);
  background: var(--line-2);
  border-radius: var(--r-ctrl);
  transition: background .18s ease;
}

.quick-blocks a:active { background: #E9EDF4; }

/* -------------------------------------------------------------- 入口图标 */
.icon-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 0;
  padding: 14px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.icon-nav .entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-size: 11.5px;
  color: var(--ink-2);
}

.icon-nav .dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  transition: transform .18s ease;
}

.icon-nav .dot svg { width: 21px; height: 21px; }
.icon-nav .entry:active .dot { transform: scale(.94); }

.grad-2 { background: linear-gradient(135deg, #4FC3F7, #1E88E5); box-shadow: 0 6px 14px rgba(30, 136, 229, .32); }
.grad-3 { background: linear-gradient(135deg, #52D9A2, #08B26D); box-shadow: 0 6px 14px rgba(8, 178, 109, .30); }
.grad-4 { background: linear-gradient(135deg, #C08CF6, #8A3FFC); box-shadow: 0 6px 14px rgba(138, 63, 252, .30); }
.grad-5 { background: linear-gradient(135deg, #FF8A8A, #E53935); box-shadow: 0 6px 14px rgba(229, 57, 53, .28); }

/* ------------------------------------------------------------ 小节 / 筛选 */
.filter-bar {
  padding: 16px 14px 4px;
  background: transparent;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--ink);
}

.section-head span {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ink-3);
}

.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.chip.on {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  font-weight: 600;
}

.chip:active { opacity: .82; }

.chip--ghost { background: #fff; color: var(--ink-2); }

/* 排序：文字标签 + 下划线，与年份胶囊区分层级 */
.sorttabs {
  display: flex;
  gap: 18px;
  margin-top: 12px;
  padding: 0 2px 2px;
}

.sorttabs .st {
  position: relative;
  padding: 0 0 6px;
  font-size: 13px;
  color: var(--ink-3);
  background: none;
  border: 0;
}

.sorttabs .st.on {
  color: var(--ink);
  font-weight: 700;
}

.sorttabs .st.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

.sorttabs--solo { margin-top: 0; }

.sorttabs .st--reset {
  margin-left: auto;
  color: var(--blue);
  font-weight: 600;
}

/* ---------------------------------------------------------------- 瀑布流 */
.waterfall {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px 0;
}

.waterfall .col {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.card {
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color .18s ease;
}

.card:active { border-color: #D7DCE6; }

.card .thumb {
  position: relative;
  min-height: 150px;
  background: #EDEFF3;
  overflow: hidden;
}

.card .thumb.is-ready { min-height: 0; }

.card .thumb img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity .25s ease;
}

.card .thumb img.is-loaded { opacity: 1; }

.card .thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, #EDEFF3 30%, #E3E7EE 50%, #EDEFF3 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.card .thumb.is-ready::before { content: none; }

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -20% 0; }
}

.card .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 1px 7px;
  font-size: 10.5px;
  line-height: 1.5;
  color: #fff;
  background: rgba(17, 24, 39, .62);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.card .caption {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
  padding: 11px 8px;
  font-size: 14.5px;
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
  border-top: 1px solid var(--line-2);
}

.load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin: 10px 12px 14px;
  font-size: 12.5px;
  color: var(--ink-3);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
}

/* ------------------------------------------------------------------ 状态 */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 56px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.7;
}

.state svg { width: 52px; height: 52px; opacity: .45; }
.state .state-title { font-size: 14px; color: var(--ink-2); }

.skeleton-wrap {
  display: flex;
  gap: 9px;
  padding: 10px 12px 0;
}

.skeleton-col { display: flex; flex: 1; flex-direction: column; gap: 9px; }

.skeleton {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}

.skeleton .sk-img {
  background: linear-gradient(100deg, #EDEFF3 30%, #E3E7EE 50%, #EDEFF3 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton .sk-line {
  height: 40px;
  border-top: 1px solid var(--line-2);
}

/* ------------------------------------------------------------------ 底栏 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 60;
  width: 100%;
  max-width: var(--app-w);
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  transform: translateX(-50%);
  display: flex;
  background: #fff;
  border-top: 1px solid var(--line);
}

.tabbar .tab {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  font-size: 10px;
  color: var(--ink-3);
}

.tabbar .tab svg { width: 21px; height: 21px; }
.tabbar .tab.on { color: var(--blue); font-weight: 600; }
.tabbar .tab:active { opacity: .65; }

/* ------------------------------------------------------------------ 搜索 */
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.searchbar .field {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  background: var(--line-2);
  border-radius: var(--r-ctrl);
}

.searchbar .field svg { flex: none; width: 15px; height: 15px; color: var(--ink-3); }

.searchbar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font-size: 13.5px;
  color: var(--ink);
}

.searchbar input::placeholder { color: var(--ink-3); }

.searchbar input::-webkit-search-cancel-button,
.searchbar input::-webkit-search-decoration { display: none; }

.searchbar .btn-search {
  flex: none;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}

.searchbar .clear {
  display: none;
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--ink-3);
}

.searchbar.has-value .clear { display: block; }

.hot-block {
  padding: 14px;
  background: #fff;
  border-bottom: 8px solid var(--bg);
}

.hot-block .hot-label {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--ink-3);
}

.hot-block .hot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-block .hot-list button {
  padding: 6px 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.hot-block .hot-list button:active { background: var(--line-2); }

/* ------------------------------------------------------------------ 详情 */
.year-tabs {
  display: flex;
  gap: 22px;
  padding: 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.year-tabs::-webkit-scrollbar { display: none; }

.year-tabs button {
  position: relative;
  flex: none;
  padding: 0 0 7px;
  font-size: 14.5px;
  color: var(--ink-3);
}

.year-tabs button.on {
  color: var(--ink);
  font-weight: 700;
}

.year-tabs button.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px;
  background: var(--blue);
}

.issue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.issue-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.issue-chips::-webkit-scrollbar { display: none; }
.issue-chips .chip { height: 30px; }

.issue-row .more {
  display: flex;
  flex: none;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding-left: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  background: #fff;
  white-space: nowrap;
}

.issue-row .more svg { width: 12px; height: 12px; }

.detail-image {
  position: relative;
  min-height: 220px;
  background: #fff;
}

.detail-image img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-image .image-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 280px;
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-3);
}

.detail-image .image-state.is-error { color: var(--red); }

.image-skeleton {
  height: 380px;
  background: linear-gradient(100deg, #F5F6F9 30%, #EDEFF3 50%, #F5F6F9 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.image-skeleton[hidden] { display: none !important; }

.detail-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}

.detail-info .name { color: var(--ink); font-weight: 600; font-size: 13.5px; }
.detail-info .dot-sep { color: var(--ink-4); }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  margin: 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border-radius: var(--r-card);
}

.cta:active { background: var(--blue-press); }
.cta svg { width: 16px; height: 16px; }

.panel {
  margin: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  scroll-margin-top: calc(var(--bar-h) + 10px);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.panel-head .panel-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
}

.panel-body {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
}

.slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-ctrl);
  background: var(--line-2);
  aspect-ratio: 2048 / 754;
}

.slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .45s ease;
}

.slider img.active { opacity: 1; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.slider-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border-radius: var(--r-pill);
  background: var(--ink-4);
  transition: width .2s ease, background .2s ease;
}

.slider-dots button.on { width: 16px; background: var(--blue); }

.comment-list { display: flex; flex-direction: column; gap: 18px; }

.comment { display: flex; gap: 10px; }

.comment .avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: var(--blue);
  background: var(--blue-soft);
}

.comment .body { flex: 1; min-width: 0; }

.comment .who {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.comment .lv {
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 500;
  color: #B54708;
  background: #FEF0C7;
  border-radius: 4px;
}

.comment .floor { margin: 4px 0 6px; font-size: 11px; color: var(--ink-3); }
.comment .text { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); word-break: break-word; white-space: pre-wrap; }

.comment .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.comment .reply {
  padding: 3px 11px;
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--line-2);
  border-radius: var(--r-pill);
}

/* -------------------------------------------------- 详情页底部：输入条+操作 */
.inputbar {
  position: fixed;
  bottom: calc(var(--tab-h) + var(--safe-b));
  left: 50%;
  z-index: 55;
  width: 100%;
  max-width: var(--app-w);
  height: 54px;
  padding: 9px 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.inputbar .field {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  height: 36px;
  padding: 0 13px;
  background: var(--line-2);
  border-radius: var(--r-ctrl);
}

.inputbar input {
  width: 100%;
  height: 100%;
  font-size: 13px;
  color: var(--ink);
}

.inputbar input::placeholder { color: var(--ink-3); }

.inputbar .send {
  flex: none;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}

.inputbar .send:disabled { color: var(--ink-4); }

/* ------------------------------------------------------------------ 弹层 */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(17, 24, 39, .45);
  opacity: 0;
  transition: opacity .2s ease;
}

.sheet-mask.show { opacity: 1; }

.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 81;
  width: 100%;
  max-width: var(--app-w);
  max-height: 72vh;
  padding-bottom: var(--safe-b);
  transform: translate(-50%, 100%);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  transition: transform .24s ease;
}

.sheet.show { transform: translate(-50%, 0); }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h3 { font-size: 15px; font-weight: 700; }

.sheet-head .close {
  width: 26px;
  height: 26px;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-3);
}

.sheet-body {
  padding: 6px 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet-group { padding-top: 14px; }

.sheet-group h4 {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sheet-grid button {
  height: 34px;
  font-size: 13px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
}

.sheet-grid button.on {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  font-weight: 600;
}

/* ------------------------------------------------------------------ 提示 */
.toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  z-index: 90;
  max-width: 80%;
  padding: 9px 16px;
  transform: translate(-50%, 8px);
  font-size: 13px;
  color: #fff;
  background: rgba(17, 24, 39, .86);
  border-radius: var(--r-ctrl);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------- 小屏适配 */
@media (max-width: 360px) {
  .appbar .title { font-size: 16px; }
  .lottery-switch .item b { font-size: 14px; }
  .lottery-switch .item i { font-size: 10px; }
  .icon-nav .dot { width: 40px; height: 40px; }
  .icon-nav .entry { font-size: 11px; }
  .searchbar .btn-search { font-size: 13.5px; }
}

/* ------------------------------------------------------------- 动效降级 */
@media (prefers-reduced-motion: reduce) {
  .notice-track,
  .skeleton .sk-img,
  .card .thumb::before,
  .image-skeleton {
    animation: none;
  }

  .banner > img,
  .slider img,
  .sheet,
  .toast { transition: none; }
}
