/* 站点 UI 补丁：手机顶部导航 + 制作页场景竖图切换
   首页 index.html 被 src/seo.js 的 TPL_CACHE 缓存（连同内联 CSS），
   因此这些样式放在外部文件、由 index.js 自举注入，重启前后都生效。 */

/* ===== 1. 手机端顶部导航：logo / 语言切换 / 用户区 一行排下 ===== */
.lg-short { display: none; }

@media (max-width: 560px) {
  .nav-inner { height: 56px; gap: 6px; }
  /* 完整显示「遇見·寫真館」：关键是 nowrap + flex:none，之前是被压缩后折行 */
  .nav .logo { gap: 5px; font-size: 13px; flex: none; min-width: 0; white-space: nowrap; }
  .nav .logo-mark { width: 24px; height: 24px; flex: none; }
  .nav .logo em { display: inline; }
  .nav .nav-right { gap: 6px; flex: none; }
  .nav .nav-links { display: none; }
  .nav .lang span { padding: 5px 8px; font-size: 11px; line-height: 1.25; }
  /* auth.js 会把 .lang 替换成 .lang-switch.dropdown-wrap > .u-btn（繁/简/EN 下拉） */
  .nav .lang-switch .u-btn { padding: 7px 9px; font-size: 12px; gap: 3px; }
  .nav .lang-switch .caret { font-size: 9px; }
  .nav .lang-switch .dropdown { min-width: 132px; }
  .nav .u-login { padding: 7px 10px; font-size: 12px; }
  .nav .u-btn { padding: 7px 10px; font-size: 12px; gap: 5px; max-width: 104px; }
  .nav .u-name { display: inline-block; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
  .nav .u-credits { display: none; }              /* 手機收起額度徽章，避免擠爆一行 */
  .nav .dropdown { right: 0; min-width: 168px; }
  .lg-full { display: none; }
  .lg-short { display: inline; }
  .mini-head { padding-left: 12px; padding-right: 12px; }   /* 大标题不贴屏幕边缘 */
  .mini-head h1 { font-size: 23px; }
  /* 页脚新增姐妹站链接后，三项挤在一行会把文字折成两半：改为换行排列、单项不折字 */
  footer .foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  footer .foot .links { flex-wrap: wrap; gap: 8px 14px; }
  footer .foot .links a { white-space: nowrap; }
}
@media (max-width: 360px) {
  .nav .logo { font-size: 12px; gap: 4px; }       /* 極窄屏縮字號，但仍保留完整館名 */
  .nav .logo-mark { width: 22px; height: 22px; }
  .nav .lang-switch .u-btn { padding: 6px 7px; }
  .nav .u-login, .nav .u-btn { padding: 6px 8px; }
  .nav .lang span { padding: 5px 6px; }
}

/* ===== 1b. 首页场景卡：封面按样图真实比例（横 4:3 / 方 1:1 / 竖 2:3）=====
   比例由 index.js 写成 .cover 的内联 aspect-ratio（首页 HTML 内联 CSS 写死 2/3）。
   卡片高度因此不同，别让 grid 把矮的横图卡拉长、在卡片内留一大块白底。 */
#grid { align-items: start; }                   /* 用 id 限定，不影响其他页面的 .grid */
#grid .cover { transition: aspect-ratio .2s ease; }  /* 切换样图时比例变化更顺，不硬跳 */

/* ===== 1c. 手机左右滑动换图（首页卡片 / 制作页场景竖图）=====
   横向手势交给 JS，纵向滚动照常；顺手禁掉图片原生拖拽，避免滑动变成拖图。 */
#grid .cover, .eff-swatch, .eff-swatch .sw-cover { touch-action: pan-y; }
#grid .cover-img, .eff-swatch .sw-img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

/* ===== 2. 制作页场景展示：竖图单张 + 点图放大 / 圆点换图 ===== */
.eff-swatch {
  width: 160px; height: 240px;                    /* 2:3 竖图，比原 220×160 高 */
  display: block; position: relative; overflow: hidden;
  border-radius: 12px; flex: none;
  background: var(--bg-soft, #f4f1ec); color: #fff; font-weight: 800; font-size: 26px;
}
.eff-swatch .sw-cover { position: absolute; inset: 0; }
.eff-swatch .sw-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
/* 左右切换图标不再显示（也不再渲染），保留兜底避免旧缓存把箭头带出来 */
.eff-swatch .sw-arrow { display: none !important; }
.eff-swatch .sw-dots { position: absolute; left: 0; right: 0; bottom: 9px; z-index: 3; display: flex; justify-content: center; gap: 2px; }
.eff-swatch .sw-dots i { width: 16px; height: 16px; display: grid; place-items: center; cursor: pointer; }
.eff-swatch .sw-dots i::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.eff-swatch .sw-dots i.on::before { background: #fff; }
.eff-swatch .sw-zoom {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  width: 28px; height: 28px; padding: 0; border: none; border-radius: 50%;
  background: rgba(255,255,255,.9); color: #2b2230; font-size: 14px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
}
.eff-swatch .sw-zoom:hover { background: #fff; }
.eff-swatch .sw-count { position: absolute; left: 8px; bottom: 11px; z-index: 3; font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.eff-swatch .sw-empty { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(140deg,#ffc7dc,#ff9bbd); }

@media (max-width: 560px) {
  .eff-bar { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px 12px; align-items: start; padding: 12px; }
  .eff-swatch { width: 120px; height: 180px; grid-row: 1 / 3; }
  .eff-info { grid-column: 2; min-width: 0; }
  .eff-switch { grid-column: 2; justify-self: end; }
}
