/* vote-site · 前台样式（复刻竞品 Loft Photography Competition 门面：白卡 16px 圆角软影、
   蓝紫渐变公告头、绿渐变当前页码、#e6475e 投票钮、k/w/亿票数格式）2026-10-02 zcode */
* { box-sizing: border-box; }
:root {
  --accent: #e6475e;
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #f5f7fb;
  --card-radius: 16px;
  --card-shadow: 0 6px 24px rgba(0, 0, 0, .06);
}
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- 顶部横幅（渐变头） ---- */
.hero { background: linear-gradient(135deg, #1d4ed8, #6d28d9); color: #fff; }
.hero-inner { max-width: 980px; margin: 0 auto; padding: 26px 16px 20px; text-align: center; }
.hero .title { font-size: 24px; font-weight: 800; letter-spacing: .3px; }
.hero .subtitle { margin-top: 4px; font-size: 13px; opacity: .85; }
.hero-meta { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: #f5f7fb; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); white-space: nowrap;
  min-width: 0; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink); }
.pill.light { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.num { font-weight: 800; }

/* ---- 公告 ---- */
.notice { max-width: 980px; margin: 14px auto 0; width: calc(100% - 24px); border-radius: var(--card-radius);
  overflow: hidden; background: #fff; box-shadow: var(--card-shadow); }
.notice-header { padding: 20px 24px 12px; background: linear-gradient(135deg, #1d4ed8, #6d28d9); color: #fff; }
.notice-header .title { font-weight: 800; font-size: 17px; }
.notice-header .subtitle { font-size: 12px; opacity: .85; margin-top: 2px; }
.notice-body { padding: 14px 24px 18px; font-size: 13px; line-height: 1.9; color: #374151; white-space: pre-line; }

/* ---- 主体 ---- */
.wrap { max-width: 980px; width: 100%; margin: 0 auto; padding: 14px 12px 40px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ghost-btn { border: 1px solid rgba(0, 0, 0, .12); background: #fff; color: #4b5563; font-size: 12px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer; box-shadow: var(--card-shadow); }
.ghost-btn:hover { color: var(--accent); border-color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.card { background: #fff; border-radius: var(--card-radius); overflow: hidden; box-shadow: var(--card-shadow);
  position: relative; cursor: pointer; transition: transform .15s ease; }
.card:active { transform: scale(.985); }
.card .rank { position: absolute; z-index: 2; top: 10px; left: 10px; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.cover-wrap { position: relative; aspect-ratio: 3 / 4; background: #e5e7eb; }
.cover { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.card .body { padding: 10px 12px 12px; }
.card .title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .origin { margin-top: 1px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .sub { margin-top: 2px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-votes { font-weight: 600; }
.metrics { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.vote-btn { border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px;
  padding: 8px 18px; border-radius: 999px; cursor: pointer; box-shadow: 0 6px 18px rgba(230, 71, 94, .35); }
.vote-btn:active { transform: scale(.96); }
.vote-btn:disabled { opacity: .55; }
.vote-btn.big { padding: 10px 28px; font-size: 15px; }

/* ---- 分页 ---- */
.pagebar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pagebar.bottom { justify-content: center; margin-top: 18px; }
.page { min-width: 34px; height: 34px; border: 0; border-radius: 10px; background: #fff; color: #4b5563;
  font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: var(--card-shadow);
  font-variant-numeric: tabular-nums; }
.page.page--current { background: linear-gradient(180deg, #22c55e, #16a34a); color: #fff;
  box-shadow: 0 10px 30px rgba(34, 197, 94, .35); }
.page.page--ellipsis { border: 0; background: none; box-shadow: none; cursor: default; color: #9ca3af; }

/* ---- 详情弹层 ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
/* 2026-10-02 修复：display:flex 会顶掉 hidden 属性的 UA display:none —— 弹层曾因此常显（owner 报障）*/
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.modal-card { position: relative; z-index: 1; background: #fff; width: min(560px, 100%); max-height: 88vh;
  overflow: auto; border-radius: var(--card-radius) var(--card-radius) 0 0; padding: 16px 16px 20px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
.modal-close { position: absolute; top: 8px; right: 10px; border: 0; background: #f3f4f6; color: #374151;
  width: 32px; height: 32px; border-radius: 999px; font-size: 18px; cursor: pointer; }
.detail-head { padding: 4px 6px 10px; }
.detail-no { font-size: 12px; font-weight: 800; color: var(--accent); }
.detail-title { font-size: 18px; font-weight: 800; margin-top: 2px; }
.detail-origin { font-size: 12px; color: var(--muted); margin-top: 2px; }
.detail-bio { margin-top: 8px; font-size: 13px; line-height: 1.7; color: #374151;
  background: #f5f7fb; border-radius: 10px; padding: 10px 12px; }
.detail-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.photo-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: #e5e7eb; display: block; }
.detail-foot { margin-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill.dwell { background: rgba(230, 71, 94, .08); color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(230, 71, 94, .25); }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 12%; transform: translateX(-50%); z-index: 99;
  background: rgba(17, 17, 17, .9); color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
