/* ============================================================
   KAMI游戏仓库 · 主样式
   主色 #f87297 (粉) + 白 + 暖灰点缀
   响应式：≥1024 PC / <1024 平板 / <768 手机
   移动端：固定底栏 + 大触控区，尽量接近 APP 观感
   ============================================================ */

:root {
  --pink:      #f87297;
  --pink-deep: #e0557f;
  --pink-soft: #fdeaf0;
  --pink-line: #f8c9d8;
  --ink:       #33323a;
  --ink-2:     #6f6d78;
  --ink-3:     #a4a2ac;
  --bg:        #f7f6fa;
  --card:      #ffffff;
  --line:      #efedf3;
  --r:         14px;
  --r-s:       9px;
  --shadow:    0 2px 10px rgba(248,114,151,.07), 0 1px 3px rgba(0,0,0,.04);
  --shadow-h:  0 8px 24px rgba(248,114,151,.16);
  --red:       #ff5b6a;
  --orange:    #ff9f43;
  --green:     #2bb673;
  --grad:      linear-gradient(135deg,#f87297 0%,#ff9fae 100%);
  --safe-b:    env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
/* hidden 属性必须优先生效（避免 display 规则误覆盖造成"关不掉/莫名遮挡"） */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-weight: 600; }
p { margin: 0 0 8px; }
.muted { color: var(--ink-3); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 16px 60px; }

/* ---------------- 顶栏 ---------------- */
.site-head {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-in {
  max-width: 1180px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 18px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-ic {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  position: relative; box-shadow: 0 4px 10px rgba(248,114,151,.35);
}
.logo-ic::after {
  content: ""; position: absolute; inset: 8px; border-radius: 6px;
  background: rgba(255,255,255,.9);
  clip-path: polygon(30% 18%, 74% 18%, 74% 30%, 44% 30%, 44% 45%, 66% 45%, 66% 57%, 44% 57%, 44% 74%, 70% 74%, 70% 86%, 30% 86%);
}
.logo-txt { font-size: 20px; font-weight: 700; letter-spacing: .5px; color: var(--ink); }
.logo-txt em { font-style: normal; color: var(--pink); font-weight: 700; }

.search-form { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.search-box {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 3px 4px 3px 18px;
  transition: border-color .25s, box-shadow .25s;
}
.search-box:focus-within {
  border-color: var(--pink); box-shadow: 0 0 0 3px rgba(248,114,151,.14);
}
.search-box input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 14px; color: var(--ink); min-width: 0;
}
.search-btn {
  border: 0; background: var(--grad); color: #fff; font-size: 13px;
  padding: 7px 20px; border-radius: 999px; flex-shrink: 0;
  transition: transform .15s, filter .2s;
}
.search-btn:active { transform: scale(.95); }
.hot-words { position: absolute; top: calc(100% + 8px); left: 8px; right: 8px; z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 10px 12px; box-shadow: var(--shadow); font-size: 12px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 6px;
}
.hot-words a { color: var(--ink-2); padding: 2px 8px; border-radius: 999px; }
.hot-words a:active { background: var(--pink-soft); color: var(--pink-deep); }

.icon-btn {
  border: 0; background: transparent; width: 40px; height: 40px;
  display: none; align-items: center; justify-content: center;
  color: var(--ink-2); border-radius: 50%;
}
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn:active { background: var(--pink-soft); color: var(--pink-deep); }

/* ---------------- 通用卡片/区块 ---------------- */
.card {
  background: var(--card); border-radius: var(--r);
  box-shadow: var(--shadow); margin: 14px 0; padding: 18px;
}
.sec-t { display: flex; align-items: baseline; gap: 8px; font-size: 17px; margin-bottom: 4px; }
.sec-sub { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.sec-t::before { content: ""; width: 4px; height: 16px; border-radius: 4px;
  background: var(--grad); align-self: center; transform: translateY(2px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 10px 22px;
  font-size: 14px; transition: transform .15s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(248,114,151,.3); }
.btn-ghost  { background: transparent; color: var(--pink-deep); border: 1px solid var(--pink-line); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.disabled { opacity: .45; pointer-events: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn:disabled { opacity: .5; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 13px; margin: 2px; border-radius: 999px;
  background: var(--bg); color: var(--ink-2); font-size: 12.5px;
  border: 1px solid transparent; transition: all .2s; white-space: nowrap;
}
.chip i { font-style: normal; color: var(--ink-3); font-size: 11px; }
.chip.on { background: var(--grad); color: #fff; }
.chip.on i { color: rgba(255,255,255,.85); }
.chip.sm { padding: 3px 11px; font-size: 12px; }
.chip.sm.primary { background: var(--grad); color: #fff; }
.chip:hover { border-color: var(--pink-line); }

/* ---------------- 首页列表 ---------------- */
.filter-bar { margin: 16px 0 6px; }
.genre-scroll { display: flex; gap: 4px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.genre-scroll::-webkit-scrollbar { display: none; }
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.order-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.order-tabs a {
  padding: 6px 16px; border-radius: 999px; font-size: 13.5px;
  background: var(--card); color: var(--ink-2); box-shadow: var(--shadow);
  transition: all .2s; border: 1px solid transparent;
}
.order-tabs a.on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(248,114,151,.28); }
.order-tabs a:active { transform: scale(.96); }
.size-box { display: flex; gap: 2px; font-size: 12px; color: var(--ink-3); align-items: center; }
.size-box a { padding: 4px 8px; border-radius: 8px; }
.size-box a.on { background: var(--pink-soft); color: var(--pink-deep); font-weight: 600; }

.crumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.crumb span { background: var(--pink-soft); padding: 3px 10px; border-radius: 999px; }
.crumb b { color: var(--pink-deep); }
.crumb .x { color: var(--pink); margin-left: 4px; font-size: 14px; }

.game-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 1180px) { .game-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1024px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px)  { .game-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 520px)  { .game-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.game-card {
  position: relative;
  background: var(--card);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s, border-color .28s;
  display: flex; flex-direction: column;
}
.game-card::after { /* 底部淡出过渡 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0 rgba(248,114,151,0);
  transition: box-shadow .28s;
}
.game-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-h); border-color: var(--pink-line); }
.game-card:hover::after { box-shadow: inset 0 0 0 1.5px rgba(248,114,151,.5); }
.g-cover {
  position: relative; aspect-ratio: 16/10; background:
    linear-gradient(135deg, #fbeef3, #f6e6ee) var(--pink-soft);
  overflow: hidden;
}
.g-cover::before { /* 封面底部渐隐，让计数徽章更清晰 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: linear-gradient(to top, rgba(0,0,0,.34), transparent);
  opacity: 0; transition: opacity .3s; z-index: 1; pointer-events: none;
}
.game-card:hover .g-cover::before { opacity: 1; }
.g-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.game-card:hover .g-cover img { transform: scale(1.07); }
.g-cover.noimg::after { content: "🎮"; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; font-size: 38px; }
.g-cover.img-err::after { content: ""; }
img.img-err { opacity: .25; }
.g-num {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(0,0,0,.5); color: #fff; font-size: 10.5px;
  padding: 2px 9px; border-radius: 999px; backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.18);
  display: inline-flex; align-items: center; gap: 3px;
}
.g-num::before { content: "▤"; font-size: 9px; opacity: .8; }
.g-info { padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 7px; flex: 1; min-height: 0; }
.g-title {
  font-size: 13.5px; line-height: 1.4; font-weight: 600; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.8em; transition: color .2s;
}
.game-card:hover .g-title { color: var(--pink-deep); }
.g-meta {
  display: flex; flex-wrap: nowrap; gap: 4px; overflow: hidden; min-height: 20px;
}
.g-meta .chip {
  font-size: 10.5px; padding: 1px 8px; margin: 0; max-width: 52%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g-bottom { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; }
.g-bottom .rate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; }
.g-date { font-size: 11px; color: var(--ink-3); flex-shrink: 0; }

.rate { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.rate.hot  { color: var(--red); }
.rate.good { color: var(--orange); }

.empty { text-align: center; padding: 60px 16px; color: var(--ink-3); }
.empty.small { padding: 30px 12px; }
.empty-ico { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--pink-soft); position: relative; }
.empty-ico::after { content: "?"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 26px; color: var(--pink); font-weight: 700; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 22px 0 4px; }
.page-info { font-size: 12px; color: var(--ink-3); width: 100%; text-align: center; margin-bottom: 2px; }
.pg {
  min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--card); border-radius: 10px; font-size: 13px;
  color: var(--ink-2); box-shadow: var(--shadow); transition: all .18s;
}
.pg:hover { color: var(--pink-deep); }
.pg.cur { background: var(--grad); color: #fff; font-weight: 600; }
.pg.off { opacity: .4; pointer-events: none; background: transparent; box-shadow: none; }
.pg.dots { box-shadow: none; background: transparent; }

/* 加载动画 */
.loading-mask { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 46px 0; color: var(--ink-3); font-size: 13px; }
.loading-mask[hidden] { display: none; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--pink-soft); border-top-color: var(--pink);
  animation: spin .8s linear infinite;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; display: inline-block; vertical-align: -2px; }

/* 顶部全局加载进度条（任意位置可见，ajax 搜索/翻页时有明确反馈） */
.loadbar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 400;
  background: var(--grad); border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(248,114,151,.55);
  opacity: 0; transition: opacity .25s, width .2s ease;
  pointer-events: none;
}
.loadbar.on { opacity: 1; }

/* 搜索按钮忙碌态 */
.btn.loading { opacity: .7; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 广告 ---------------- */
.ad { margin: 14px 0; border-radius: var(--r-s); overflow: hidden; }
.ad img { width: 100%; }
.ad-code a { display: block; }
.ad-empty { border: 1px dashed var(--pink-line); color: var(--ink-3);
  text-align: center; padding: 18px; font-size: 12px; background: #fff; }

.banner-warn {
  background: #fff4e5; color: #b26a00; border: 1px solid #ffe0b0;
  border-radius: var(--r-s); padding: 10px 16px; margin: 14px 0; font-size: 13.5px;
}

/* ---------------- 详情页 ---------------- */
.hero { display: flex; gap: 22px; padding: 20px; }
.hero-cover {
  width: 300px; flex-shrink: 0; border-radius: var(--r-s); overflow: hidden;
  background: var(--pink-soft); align-self: flex-start;
}
.hero-cover img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.cover-fallback { width: 100%; aspect-ratio: 16/10; display: flex; align-items: center;
  justify-content: center; font-size: 44px; }
.hero-info { flex: 1; min-width: 0; }
.hero-title { font-size: 24px; line-height: 1.3; }
.hero-en { color: var(--ink-3); font-size: 13.5px; margin: 6px 0 10px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.hero-meta { list-style: none; margin: 0 0 12px; padding: 12px 0; border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 6px 16px; }
.hero-meta li { font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.hero-meta span { color: var(--ink-3); flex-shrink: 0; }
.hero-meta b { font-weight: 600; }
.hero-intro { color: var(--ink-2); font-size: 14px; }

/* 截图 */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.shot { margin: 0; cursor: zoom-in; border-radius: var(--r-s); overflow: hidden; background: var(--pink-soft); }
.shot img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .35s; }
.shot:hover img { transform: scale(1.05); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }
.shots .shot { animation: fadeIn .4s ease both; }

/* Tabs */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button {
  border: 0; background: none; padding: 8px 4px; margin-right: 16px;
  font-size: 15px; color: var(--ink-2); position: relative;
}
.tabs button.on { color: var(--pink-deep); font-weight: 600; }
.tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 3px; border-radius: 3px; background: var(--grad); }
.tabpane { display: none; }
.tabpane.on { display: block; animation: fadeIn .3s ease; }
.tabpane p { color: var(--ink-2); }
.spec p { font-size: 13.5px; margin-bottom: 6px; }

/* 下载区 */
.res-list { display: flex; flex-direction: column; gap: 10px; }
.res-cat-head {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-weight: 700; font-size: 15px;
}
.res-cat-head::before { content: ""; width: 5px; height: 16px; border-radius: 4px; background: var(--grad); }
.res-cat-head span { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.res-card { border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; overflow: hidden; }
.res-main { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; }
.res-sno {
  width: 26px; height: 26px; border-radius: 8px; background: var(--pink-soft);
  color: var(--pink-deep); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.res-body { flex: 1; min-width: 0; }
.res-body h4 { font-size: 14.5px; line-height: 1.45; word-break: break-word; }
.res-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.res-meta i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.res-note { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.res-note summary { cursor: pointer; color: var(--pink-deep); font-size: 12.5px; width: fit-content; }
.res-note div { margin-top: 6px; padding: 10px; background: var(--bg); border-radius: var(--r-s);
  font-size: 13px; color: var(--ink-2); max-height: 220px; overflow: auto; }
.res-act { flex-shrink: 0; align-self: center; }

/* 解锁面板 */
.dl-panel { border-top: 1px dashed var(--line); background: #fffafc; padding: 14px; }
.dl-stage { display: flex; flex-direction: column; gap: 10px; }
.ad-inlock { margin: 0; }
.dl-timer-wrap { text-align: center; padding: 6px 0 2px; }
.dl-timer { display: inline-flex; align-items: center; gap: 12px; }
.timer-ring { position: relative; width: 46px; height: 46px; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring .ring-bg { stroke: var(--pink-soft); }
.timer-ring .ring-fg { stroke: var(--pink); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--pink-deep); }
.dl-timer-txt { color: var(--ink-2); font-size: 14px; }
.dl-go { align-self: center; margin-top: 4px; animation: pop .35s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.link-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  animation: fadeIn .3s ease both;
}
.lt {
  font-size: 12px; color: #fff; padding: 3px 10px; border-radius: 999px; flex-shrink: 0;
  background: var(--ink-2);
}
.lt-磁力链接 { background: var(--green); }
.lt-百度网盘 { background: #2186e8; }
.lt-迅雷网盘 { background: #1f9b4a; }
.lt-夸克网盘 { background: #5e67f0; }
.lt-直链下载 { background: var(--pink); }
.lt-移动云盘, .lt-uc网盘 { background: #9a7ff2; }
.lt-其他 { background: var(--ink-3); }
.lk { color: var(--pink-deep); font-size: 14px; font-weight: 600; }
.lk:active { opacity: .7; }
.pwd { font-size: 12.5px; color: var(--ink-3); }
.pwd b { color: var(--ink); }
.cp {
  border: 1px solid var(--pink-line); background: #fff; color: var(--pink-deep);
  border-radius: 999px; padding: 3px 12px; font-size: 12px; margin-left: auto;
}
.cp.copied { background: var(--green); border-color: var(--green); color: #fff; }
.dl-safe-tip { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 12px; }

/* 评论 */
.comment-toggle { cursor: pointer; user-select: none; }
.comment-toggle .arrow { margin-left: auto; font-size: 13px; color: var(--pink-deep);
  background: var(--pink-soft); padding: 2px 12px; border-radius: 999px; font-weight: 400; }
.comment-tool { display: flex; gap: 6px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.c-item {
  padding: 12px 2px; border-bottom: 1px solid var(--line);
  animation: fadeIn .3s ease both;
}
.c-item:last-child { border-bottom: 0; }
.c-item.has-link { background: #fffdf6; border-radius: var(--r-s); padding: 12px; margin-bottom: 6px; }
.c-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.c-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.c-who { display: flex; flex-direction: column; line-height: 1.3; }
.c-who b { font-size: 13.5px; }
.c-tag { align-self: flex-start; font-size: 10.5px; background: var(--pink-soft); color: var(--pink-deep);
  border-radius: 999px; padding: 0 7px; margin-left: 6px; }
.c-time { font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }
.c-body { font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.c-more { font-size: 12px; }
.c-more summary { color: var(--ink-3); cursor: pointer; }
.c-more div { background: var(--bg); border-radius: var(--r-s); padding: 10px; margin-top: 6px; font-size: 13px; }
.c-end { display: block; text-align: center; color: var(--ink-3); font-size: 12px; padding: 10px; }
.cpform textarea { width: 100%; min-height: 90px; border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 10px; font: inherit; font-size: 14px; resize: vertical; outline: none; }
.cpform textarea:focus { border-color: var(--pink); }

/* 灯箱 */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
  animation: fadeIn .25s ease; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 10px 60px rgba(0,0,0,.5); }
.lb-close { position: absolute; top: 14px; right: 18px; z-index: 3; border: 0; background: rgba(255,255,255,.15);
  color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px);
  background: rgba(30,28,34,.9); color: #fff; padding: 10px 22px; border-radius: 999px;
  font-size: 13.5px; z-index: 300; opacity: 0; pointer-events: none; transition: all .3s;
  max-width: 86vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* 页脚 & 移动底栏 */
.site-foot { border-top: 1px solid var(--line); background: #fff; padding: 26px 16px calc(26px + var(--safe-b));
  text-align: center; color: var(--ink-3); font-size: 12.5px; margin-top: 20px; }
.site-foot p { margin: 4px 0; }
.m-tabbar { display: none; }

/* 抽屉 */
.drawer { position: fixed; inset: 0; z-index: 150; }
.drawer-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fadeIn .2s; }
.drawer-panel {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
  border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--safe-b));
  animation: slideUp .3s cubic-bezier(.2,1,.3,1);
}
@keyframes slideUp { from { transform: translateY(60%); } to { transform: none; } }
.drawer-head { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.drawer-x { border: 0; background: var(--bg); width: 30px; height: 30px; border-radius: 50%; font-size: 18px; }
.drawer .search-box.big { padding: 6px 6px 6px 20px; }
.drawer-hots { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px; }

/* 提示页 */
.tip-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.tip-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow-h); padding: 40px 34px;
  text-align: center; max-width: 400px; width: 90%; }
.tip-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--pink-soft); color: var(--pink-deep);
  font-size: 34px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.tip-card h1 { font-size: 20px; margin-bottom: 8px; }
.tip-card p { color: var(--ink-2); margin-bottom: 20px; }

/* ============ 移动端适配 ============ */
@media (max-width: 767px) {
  .container { padding: 0 12px 80px; }
  .head-in { padding: 8px 12px; gap: 10px; }
  .site-head { top: 0; }
  .logo-txt { font-size: 18px; }
  .logo-txt em { display: none; }

  /* 桌面搜索收进抽屉 */
  .search-form.desktop { display: none; }
  .search-form { display: none; }
  .icon-btn { display: inline-flex; margin-left: auto; }

  /* APP 底栏 */
  .m-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: var(--safe-b);
  }
  .m-tab {
    flex: 1; border: 0; background: none; padding: 8px 0 6px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--ink-3); font-size: 10.5px;
  }
  .m-tab svg { width: 22px; height: 22px; fill: currentColor; }
  .m-tab.on, .m-tab:active { color: var(--pink-deep); }
  .site-foot { margin-bottom: 54px; }

  .hero { flex-direction: column; padding: 14px; }
  .hero-cover { width: 100%; align-self: auto; }
  .hero-title { font-size: 20px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .size-box { justify-content: flex-end; }

  .res-main { flex-wrap: wrap; }
  .res-act { width: 100%; }
  .res-act .btn { width: 100%; }
  .card { padding: 14px; }
  .shots { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .tabs { overflow-x: auto; }
  .tabs button { margin-right: 12px; white-space: nowrap; }
}
@media (min-width: 768px) {
  .search-form { display: flex !important; }
  .icon-btn { display: none; }
}
@media (max-width: 374px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
}

/* 无障碍：尊重减弱动效 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
