/* Card Presale H5 — high-density art-collection index
   白/极浅灰底 · 蓝紫唯一强调 · 细线 · 紧凑网格 · 大号排名数字 · 产品图为视觉主体
   无大面积渐变、厚阴影、胶囊堆砌、emoji。 */
:root {
  --bg: #f8f8fb;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --line: #ececf2;
  --line-strong: #dcdce7;
  --ink: #18181f;
  --muted: #6f6f7e;
  --faint: #a2a2b0;
  --brand: #6552df;
  --brand-2: #9075ea;
  --brand-soft: #f1efff;
  --brand-line: #d7d0fa;
  --danger: #d9484f;
  --ok: #1f9d6b;
  --radius: 8px;
  --radius-sm: 6px;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
.app { min-height: 100vh; max-width: 720px; margin: auto; padding-bottom: 82px; background: var(--bg); }

/* 顶部品牌区 */
.topbar { min-height: 80px; margin: 0 18px; padding: 15px 0 13px; border-bottom: 1px solid var(--line-strong); display: flex; justify-content: space-between; align-items: center; gap: 10px; background: transparent; }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo { height: 38px; width: 38px; flex: 0 0 38px; background: var(--brand); -webkit-mask-image: url('/assets/hikat-logo.png'); -webkit-mask-repeat: no-repeat; -webkit-mask-position: left center; -webkit-mask-size: auto 100%; mask-image: url('/assets/hikat-logo.png'); mask-repeat: no-repeat; mask-position: left center; mask-size: auto 100%; }
.brand-text { min-width: 0; }
.brand-eyebrow { color: var(--brand); font-family: Georgia, "Times New Roman", serif; font-size: 8px; font-weight: 700; letter-spacing: .15em; margin: 0 0 3px; white-space: nowrap; }
.brand-title { margin: 0; color: var(--ink); font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 21px; font-weight: 700; line-height: 1.08; letter-spacing: .03em; }
.topbar .title-number { display: flex; align-items: baseline; gap: 5px; flex: 0 0 auto; font-family: Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.03em; }
.topbar .title-number span { color: #747487; font-size: 15px; }
.topbar .title-number strong { color: var(--brand); font-size: 27px; font-weight: 500; }

/* 底部导航：细线 + 内联 SVG 图标 */
.bottom-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(720px, 100%); height: 66px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -8px 24px rgba(48,44,78,.04); z-index: 10; }
.bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: #777889; font-size: 11px; font-weight: 600; }
.bottom-nav a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav a.active { color: var(--brand); font-weight: 800; }
.bottom-nav a.active::before { content: ''; position: absolute; top: 0; width: 36px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }

/* 工具栏 / 按钮：细线、小圆角、无渐变 */
.toolbar { padding: 10px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; overflow: auto; background: var(--surface); }
.button, .toolbar button { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); min-height: 44px; padding: 0 12px; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--ink); }
.toolbar button:hover, .button:hover { border-color: var(--brand); color: var(--brand); }
.button.primary, .toolbar button.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 800; }
.month-label { font-weight: 700; min-width: 96px; text-align: center; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.segmented { display: flex; gap: 0; margin-left: auto; }
.segmented button + button { border-left: 0; }

/* 搜索与分类 */
.search { margin: 12px 18px 8px; width: calc(100% - 36px); height: 44px; border: 1px solid var(--line-strong); padding: 0 14px; border-radius: var(--radius-sm); color: var(--ink); background: var(--surface); outline: none; }
.search:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.search::placeholder { color: var(--faint); }
.chips { display: flex; overflow: auto; gap: 6px; padding: 0 18px 10px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-sm); white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.chip.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 800; }

/* 月历：完整 7 列、紧凑、数量清楚 */
.calendar { margin: 9px 18px 0; padding: 12px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 7px 20px rgba(47,42,82,.055); }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 2px; }
.weekdays span { font-size: 11px; color: #76778a; text-align: center; padding: 2px 0 8px; font-weight: 700; }
.day { min-height: 58px; border: 0; border-radius: 8px; padding: 5px 2px 3px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; color: var(--ink); background: transparent; position: relative; overflow: hidden; }
.day.outside { color: #a7a7b3; background: transparent; }
.day.has-release { background: transparent; }
.day.selected { color: #fff; background: linear-gradient(160deg, var(--brand), var(--brand-2)); box-shadow: inset 0 -2px 0 rgba(0,0,0,.07); }
.day-num { display: grid; place-items: center; min-width: 28px; min-height: 28px; font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; font-weight: 520; font-variant-numeric: tabular-nums; }
.release-dot { display: block; width: 6px; height: 6px; margin-top: 2px; border-radius: 50%; background: var(--brand); }
.day-count { display: inline-flex; align-items: baseline; gap: 2px; margin-top: 3px; padding: 2px 7px; color: var(--brand); background: var(--brand-soft); border: 0; border-radius: 999px; font-size: 10px; line-height: 1.2; font-weight: 700; }
.day-count small { font-size: 8px; font-weight: 700; }
.day.selected .release-dot { background: rgba(255,255,255,.9); }
.day.selected .day-count { color: #fff; background: rgba(255,255,255,.22); }
.day-product-name { display: none; }

/* 首拆待定：月历卡内单行胶囊 + 点击展开产品 */
.pending-row { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.pending-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--brand-line); border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; }
.pending-pill.open { background: var(--brand); color: #fff; border-color: var(--brand); }
.pending-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.pending-detail { display: none; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 6px; }
.pending-detail.open { display: block; }
.pending-detail-list { display: grid; gap: 2px; }
.pending-product { width: 100%; min-width: 0; border: 0; background: transparent; display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-align: left; border-radius: 8px; }
.pending-product:hover { background: var(--surface); }
.pending-product .thumb { height: 40px; width: 40px; flex: 0 0 40px; object-fit: cover; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.pending-product .thumb.placeholder { display: grid; place-items: center; color: var(--faint); font-size: 9px; }
.pending-product-main { min-width: 0; flex: 1 1 0%; max-width: 100%; overflow: hidden; }
.pending-product-name { display: block; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pending-product-sub { display: flex; align-items: center; gap: 8px; margin-top: 2px; min-width: 0; }
.pending-product-publisher { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-product-release { flex: 0 0 auto; font-size: 11px; color: var(--brand); font-weight: 700; white-space: nowrap; }

/* 区块标题 */
.section-title { display: flex; align-items: baseline; justify-content: space-between; padding: 20px 20px 8px; }
.section-title h2 { font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif; font-size: 15px; margin: 0; font-weight: 620; letter-spacing: .02em; }
.section-title span { font-size: 13px; color: var(--brand); font-weight: 700; }
.section-heading { display: flex; align-items: center; gap: 6px; }
.heat-info-button { width: 20px; height: 20px; padding: 0; border: 1px solid var(--brand-line); border-radius: 50%; background: var(--brand-soft); color: var(--brand); font: 800 12px/18px system-ui, sans-serif; text-align: center; }
.heat-info-button[aria-expanded="true"] { color: #fff; background: var(--brand); border-color: var(--brand); }
.heat-info { margin: 0 14px 8px; padding: 8px 10px; border: 1px solid var(--brand-line); border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--muted); font-size: 11px; line-height: 1.5; }

/* 当天发售信息：参考视觉使用横向信息卡，区别于产品库列表 */
.release-section { padding-bottom: 2px; }
.release-empty { min-height: 116px; margin: 0 18px; padding: 17px 18px; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 10px 26px rgba(47,42,82,.06); }
.release-empty img { display: block; width: 62px; height: 62px; object-fit: contain; }
.release-empty strong { display: block; font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif; color: #252532; font-size: 16px; font-weight: 620; line-height: 1.45; }
.release-empty p { margin: 8px 0 0; color: #858598; font-size: 12px; line-height: 1.5; }
.release-products { display: grid; gap: 8px; padding: 0 18px; }
.release-products .day-product { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 22px rgba(47,42,82,.05); }

/* 产品热度：紧凑行 + 正式排名数字 */
.library-section { margin-top: 2px; }
.library-section > .product-list { margin: 0 14px 4px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.library-section > .product-list .product-row:last-child { border-bottom: 0; }
.hot-list { border-top: 1px solid var(--line); }
.product-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: 10px 14px; display: grid; grid-template-columns: 40px 56px minmax(0, 1fr) 58px; gap: 10px; text-align: left; align-items: center; }
.product-row.unranked { grid-template-columns: 56px minmax(0, 1fr) 72px; }
.product-row:last-child { border-bottom: 1px solid var(--line-strong); }
.product-row .rank { font-size: 22px; font-weight: 900; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1; }
.product-row .thumb { height: 56px; width: 56px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.product-row .thumb.placeholder { display: grid; place-items: center; color: var(--faint); font-size: 10px; }
.product-main { min-width: 0; }
.product-name { font-weight: 800; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-subline { display: flex; align-items: center; gap: 6px; margin-top: 3px; min-width: 0; }
.product-subline .publisher { margin: 0; min-width: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-label { flex: 0 0 auto; color: var(--brand); font-size: 9px; border: 1px solid var(--brand-line); background: var(--brand-soft); border-radius: 4px; padding: 1px 5px; font-weight: 700; }
.product-schedule { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-row .heat { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 16px; color: var(--brand); font-weight: 900; font-variant-numeric: tabular-nums; align-self: center; white-space: nowrap; }
.heat-score { display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; }
.heat-score strong { font: inherit; }
.heat-icon-wrap { width: 16px; height: 16px; display: inline-grid; place-items: center; color: var(--brand); }
.heat-icon { width: 16px; height: 16px; fill: var(--surface); stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.product-row .heat small { display: block; font-size: 8px; color: var(--faint); font-weight: 700; margin-top: 2px; letter-spacing: 0; }
.product-row .heat.estimated small { display: block; margin-top: 2px; font-size: 8px; line-height: 1.2; color: var(--faint); font-weight: 600; letter-spacing: .08em; }
.product-row .heat.collecting { color: var(--muted); font-size: 10px; text-align: right; white-space: normal; line-height: 1.3; }
.product-row .heat.collecting small { font-size: 9px; display: block; color: var(--brand); margin-top: 2px; }

/* 全部产品：一行两款卡片 */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px 14px 12px; }
.card-product { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 8px; text-align: left; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.card-product .thumb { height: auto; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.card-product .thumb.placeholder { aspect-ratio: 1 / 1; width: 100%; height: auto; min-height: 92px; display: grid; place-items: center; color: var(--faint); font-size: 10px; background: var(--surface-2); }
.card-product-name { font-weight: 800; font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-product-publisher { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-product-date { color: var(--brand); font-size: 10px; font-weight: 700; }

/* 周 / 按日期视图 */
.week-wrap { padding: 4px 14px; }
.week-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; padding: 10px 12px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }
.week-date { border: 0; background: transparent; color: var(--brand); font-weight: 900; font-variant-numeric: tabular-nums; text-align: left; font-size: 13px; }
.week-date small { font-size: 10px; color: var(--muted); font-weight: 700; }
.week-products { display: flex; align-items: center; gap: 5px; overflow: hidden; min-width: 0; }
.week-product { display: flex; align-items: center; gap: 5px; overflow: hidden; max-width: 170px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm); padding: 3px 6px; font-size: 10px; }
.week-product .thumb { height: 24px; width: 24px; min-width: 24px; object-fit: cover; border: 0; border-radius: 4px; }
.week-product .thumb.placeholder { display: none; }
.week-product-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.muted { color: var(--muted); font-size: 11px; }
.more { font-size: 12px; color: var(--brand); font-weight: 800; }
.list-date { padding: 10px 18px 4px; font-size: 13px; font-weight: 900; color: var(--brand); }

/* 详情 */
.back { appearance: none; border: 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; background: var(--surface); color: var(--brand); padding: 12px 18px; font-size: 13px; font-weight: 800; }
.detail { padding: 0 18px 10px; }
.detail .title { font-size: 22px; margin: 14px 0 3px; letter-spacing: -.03em; line-height: 1.2; word-break: break-word; }
.detail > .publisher { margin-top: 5px; font-size: 12px; color: var(--muted); }
.detail .status { display: inline-block; margin: 8px 0 0; border: 1px solid transparent; border-radius: 5px; padding: 2px 7px; font-size: 10px; font-weight: 800; }
.status.presale { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-line); }
.status.stock { color: var(--ok); background: #e5f5ee; border-color: #bfe6d3; }
.status.pending { color: var(--muted); background: var(--surface-2); border-color: var(--line-strong); }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; overflow: hidden; }
.detail-meta div { padding: 10px 12px; font-size: 13px; font-weight: 700; }
.detail-meta div + div { border-left: 1px solid var(--line); }
.meta-label { font-size: 10px; color: var(--faint); display: block; margin-bottom: 3px; font-weight: 600; }
.detail-section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-section h2 { font-size: 14px; color: var(--ink); margin: 0 0 8px; font-weight: 900; letter-spacing: -.02em; }
.detail-section .heat { display: block; text-align: left; font-size: 22px; color: var(--brand); font-weight: 900; font-variant-numeric: tabular-nums; }
.detail-section .heat small { display: block; font-size: 9px; color: var(--faint); font-weight: 700; margin-top: 2px; }
.gallery { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; }
.gallery img { display: block; width: 100%; height: auto; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.trend { height: 110px; border: 1px solid var(--line-strong); border-radius: var(--radius); display: flex; align-items: flex-end; gap: 4px; padding: 8px; background: var(--surface); }
.bar { background: var(--brand); min-width: 8px; flex: 1; border-radius: 3px 3px 0 0; }
.promotion-copy-card { white-space: pre-wrap; font-size: 13.5px; line-height: 1.75; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); padding: 12px 14px; }
.product-list .empty-brand { margin: 0 18px; }
.empty-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 112px; border: 1px solid var(--line); border-radius: 14px; color: var(--faint); font-size: 12px; background: var(--surface); box-shadow: 0 8px 22px rgba(47,42,82,.05); }
.empty-brand svg { width: 34px; height: 34px; stroke: var(--brand); fill: none; stroke-width: 1.4; }
.footer { padding: 22px 18px; color: #7c7c8e; font-size: 11px; line-height: 1.6; text-align: center; }

/* 状态 */
.empty, .error, .loading { margin: 16px 18px; padding: 20px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; font-size: 12px; background: var(--surface); }
.error { border-color: var(--danger); color: var(--ink); }
.retry { margin-top: 10px; }
.hidden { display: none; }

/* 360-430 适配：保持 7 列不挤压 */
@media (max-width: 380px) {
  .topbar { min-height: 72px; margin: 0 14px; padding: 11px 0 9px; }
  .brand-logo { width: 36px; height: 36px; flex-basis: 36px; }
  .brand-title { font-size: 19px; }
  .brand-eyebrow { font-size: 7px; }
  .topbar .title-number span { font-size: 14px; }
  .topbar .title-number strong { font-size: 25px; }
  .calendar { margin-left: 12px; margin-right: 12px; padding-left: 7px; padding-right: 7px; }
  .day { min-height: 54px; padding: 3px 1px; }
  .day-count { font-size: 9px; }
  .release-empty { margin-left: 12px; margin-right: 12px; padding: 14px; grid-template-columns: 56px minmax(0, 1fr); gap: 13px; }
  .release-empty img { width: 56px; height: 56px; }
  .release-products { padding-left: 12px; padding-right: 12px; }
  .product-row { grid-template-columns: 34px 50px minmax(0, 1fr) 58px; gap: 8px; padding: 9px 10px; }
  .product-row.unranked { grid-template-columns: 50px minmax(0, 1fr) 72px; }
  .product-row .thumb { height: 50px; width: 50px; }
  .product-row .rank { font-size: 19px; }
  .card-grid { padding: 4px 10px 10px; gap: 6px; }
  .library-section > .product-list { margin-left: 10px; margin-right: 10px; }
}
