﻿/* =========================================================
   短发超红 · 全场同拍
   移动优先：深墨底 + 暖金线，拍品卡片 + 底部出价面板
   ========================================================= */

:root {
  --bg: #0a0c11;
  --panel: rgba(255, 255, 255, 0.04);
  --line: rgba(217, 178, 106, 0.18);
  --line-soft: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(217, 178, 106, 0.42);
  --gold: #d9b26a;
  --gold-bright: #f1d6a6;
  --gold-deep: #a8823f;
  --ink: #ece6da;
  --muted: #938b7b;
  --muted-2: #6d6759;
  --cinnabar: #c8503c;
  --jade: #7fbf9a;
  --radius: 16px;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", "Times New Roman", serif;
  --sans: "Inter", "PingFang SC", "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --num: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(720px 480px at 84% -10%, rgba(217, 178, 106, 0.15), transparent 62%),
    radial-gradient(620px 520px at 0% 4%, rgba(64, 96, 148, 0.14), transparent 66%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(360px 360px at 70% 12%, rgba(217, 178, 106, 0.07), transparent 70%);
  filter: blur(16px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

::selection {
  background: rgba(217, 178, 106, 0.3);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ================= 顶栏 ================= */

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  padding-top: calc(8px + env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(10, 12, 17, 0.96), rgba(10, 12, 17, 0.78));
  border-bottom: 1px solid rgba(217, 178, 106, 0.12);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(217, 178, 106, 0.55);
  border-radius: 9px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  background: linear-gradient(150deg, rgba(217, 178, 106, 0.16), rgba(217, 178, 106, 0.02));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.brand-text em {
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  white-space: nowrap;
}

.appbar-side {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(200, 80, 60, 0.32);
  border-radius: 999px;
  background: rgba(200, 80, 60, 0.09);
  color: #e9b7ab;
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.live-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 0 0 rgba(200, 80, 60, 0.5);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(200, 80, 60, 0.45);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(200, 80, 60, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(200, 80, 60, 0);
  }
}

.online {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 10px;
  color: var(--muted-2);
}

.online b {
  font-family: var(--num);
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  max-width: 132px;
  padding: 2px 9px 2px 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(217, 178, 106, 0.07);
  transition: border-color 0.16s, background 0.16s;
}

.user-chip:hover {
  border-color: var(--line-strong);
}

.user-chip.unnamed {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
}

.user-chip.unnamed .user-name {
  color: var(--muted);
}

.user-chip.unnamed .avatar {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.live-pill[data-state="ok"] i {
  background: var(--jade);
}

.live-pill[data-state="connecting"] i {
  background: var(--gold);
}

.live-pill[data-state="offline"] {
  border-color: rgba(200, 80, 60, 0.5);
  color: #eaa294;
}

.live-pill[data-state="offline"] i {
  background: var(--cinnabar);
  animation: none;
}

.avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #e4c083, #a8823f);
  color: #221806;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
}

.user-name {
  font-size: 11px;
  color: var(--gold-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================= 页面 ================= */

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 14px calc(30px + env(safe-area-inset-bottom));
}

.kicker {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
}

.intro h1 {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
  color: #f4ecdd;
}

.intro h1 span {
  color: var(--gold);
  font-variant-numeric: lining-nums;
}

.intro-sub {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

.intro-sub b {
  color: var(--gold);
  font-weight: 600;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line-soft);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 9px 4px 8px;
  background: #0e1117;
}

.stat b {
  font-family: var(--num);
  font-size: 19px;
  font-weight: 500;
  color: #eadfc8;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat span {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.filter {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

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

.chip {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 13px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}

.chip[aria-pressed="true"] {
  color: var(--gold-bright);
  border-color: var(--line-strong);
  background: rgba(217, 178, 106, 0.13);
}

.link-btn {
  flex: 0 0 auto;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--gold);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.link-btn:hover {
  border-bottom-color: rgba(217, 178, 106, 0.5);
}

/* ================= 拍品分组 ================= */

.groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

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

.group-head h2 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #ddd4c1;
}

.group-head .g-count {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.group-head .g-live {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.group-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 178, 106, 0.18), transparent);
  transform: translateY(-3px);
}

.lot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.lot {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015) 60%, rgba(0, 0, 0, 0.12));
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.1s;
  min-width: 0;
}

.lot:hover {
  border-color: var(--line);
}

.lot:active {
  transform: scale(0.996);
}

.lot[data-status="sold"],
.lot[data-status="passed"] {
  opacity: 0.72;
}

/* 品质配色 */

.lot[data-rarity="传说"] {
  border-color: rgba(240, 168, 78, 0.3);
}

.lot[data-rarity="史诗"] {
  border-color: rgba(166, 128, 216, 0.28);
}

.lot[data-rarity="珍品"] {
  border-color: rgba(111, 168, 220, 0.24);
}

.lot[data-gold="true"] {
  border: 2px solid rgba(245, 210, 142, 0.95);
  background: linear-gradient(160deg, rgba(217, 178, 106, 0.17), rgba(217, 178, 106, 0.04) 58%, rgba(0, 0, 0, 0.12));
  box-shadow:
    0 0 0 2px rgba(217, 178, 106, 0.35),
    0 0 30px -4px rgba(240, 196, 120, 0.7),
    inset 0 0 26px rgba(240, 196, 120, 0.12);
}

.lot[data-gold="true"] .lot-art {
  box-shadow: inset 0 0 26px rgba(240, 201, 128, 0.3);
}

.lot[data-rarity="传说"] .lot-art {
  box-shadow: inset 0 0 26px rgba(240, 168, 78, 0.22);
}

.lot[data-rarity="史诗"] .lot-art {
  box-shadow: inset 0 0 26px rgba(166, 128, 216, 0.2);
}

.lot-cat[data-rarity="传说"],
.sheet-cat[data-rarity="传说"] {
  color: #f0b25e;
}

.lot-cat[data-rarity="史诗"],
.sheet-cat[data-rarity="史诗"] {
  color: #b79ae4;
}

.lot-cat[data-rarity="珍品"],
.sheet-cat[data-rarity="珍品"] {
  color: #86b6e2;
}

.lot-cat[data-rarity="精良"],
.sheet-cat[data-rarity="精良"] {
  color: #8fcfa9;
}

.lot-art {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.06), transparent 62%),
    rgba(0, 0, 0, 0.25);
}

.lot-art svg {
  width: 100%;
  height: 100%;
}

.lot-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.05), transparent 65%);
}

.lot-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  padding-right: 34px;
}

.lot-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.lot-no {
  font-family: var(--num);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  white-space: nowrap;
}

.lot-cat {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lot-state {
  display: inline-block;
  margin-left: auto;
  padding: 1px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  white-space: nowrap;
}

.lot-state[data-status="live"] {
  color: var(--gold-bright);
  border-color: rgba(217, 178, 106, 0.4);
  background: rgba(217, 178, 106, 0.1);
}

.lot-state[data-status="sold"] {
  color: #e7b9a1;
  border-color: rgba(200, 80, 60, 0.32);
}

.lot-title {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #e3dac8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lot-stats {
  font-size: 10px;
  letter-spacing: 0.01em;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lot-price-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  min-width: 0;
}

.lot-price {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-family: var(--num);
  font-variant-numeric: lining-nums tabular-nums;
  color: #f4e8d1;
  white-space: nowrap;
}

.lot-price b {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.lot-price .u {
  font-size: 11px;
  color: var(--gold);
}

.lot-leader {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lot-leader.mine {
  color: var(--gold-bright);
  font-weight: 700;
}

.lead-name {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.lot-leader .lead-name {
  font-size: 16px;
}

.sheet-leader .lead-name {
  font-size: 16px;
}

.lot-bid {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  border-radius: 9px;
  background: linear-gradient(150deg, #f0d3a0, #d9b26a 55%, #b98f45);
  color: #241a08;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 18px -12px rgba(217, 178, 106, 0.9);
}

.lot-bid:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-2);
  box-shadow: none;
  cursor: default;
}

.fav-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted-2);
  background: transparent;
  transition: color 0.16s, background 0.16s;
}

.fav-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.fav-btn:hover {
  color: var(--gold-bright);
  background: rgba(217, 178, 106, 0.1);
}

.fav-btn[aria-pressed="true"] {
  color: var(--gold);
}

.fav-btn[aria-pressed="true"] svg {
  fill: rgba(217, 178, 106, 0.8);
  stroke: var(--gold-bright);
}

.group-fav .group-head h2 {
  color: var(--gold-bright);
}

.group-fav .group-head h2::before {
  content: "★";
  margin-right: 6px;
  font-size: 12px;
  color: var(--gold);
}

.group-fav .group-head::after {
  background: linear-gradient(90deg, rgba(217, 178, 106, 0.35), transparent);
}

.foot-note {
  margin-top: 22px;
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

/* ================= 底部面板 ================= */

.sheet {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid rgba(217, 178, 106, 0.22);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #151922, #0e1116);
  color: var(--ink);
  box-shadow: 0 -30px 70px -24px rgba(0, 0, 0, 0.95);
  overscroll-behavior: contain;
}

.sheet::backdrop {
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(4px);
}

.sheet-grab {
  width: 36px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-no {
  font-family: var(--num);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.sheet-x {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.sheet-x svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.sheet-lot {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 8px;
}

.sheet-art {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.06), transparent 62%), rgba(0, 0, 0, 0.25);
}

.sheet-art svg {
  width: 100%;
  height: 100%;
}

.sheet-meta {
  min-width: 0;
  padding-top: 2px;
}

.sheet-cat {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-h2 {
  margin: 3px 0 6px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
  color: #f2e9d8;
}

.sheet-desc {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--muted);
}

.sheet-stats {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sheet-stats li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(217, 178, 106, 0.06);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #e2d6bd;
  font-variant-numeric: tabular-nums;
}

.sheet-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.sheet-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.sheet-price strong {
  font-family: var(--num);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  color: #f6eedd;
  font-variant-numeric: lining-nums tabular-nums;
}

.sheet-leader {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  margin-left: auto;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-leader.mine {
  color: var(--gold-bright);
  font-weight: 700;
}

.sheet-estimate {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

.sheet-bid {
  margin-top: 14px;
}

.quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.quick button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-height: 54px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(217, 178, 106, 0.06);
  transition: background 0.16s, border-color 0.16s, transform 0.1s;
}

.quick button:active {
  transform: scale(0.98);
}

.quick button.selected {
  border-color: rgba(217, 178, 106, 0.8);
  background: rgba(217, 178, 106, 0.18);
  box-shadow: inset 0 0 0 1px rgba(217, 178, 106, 0.4);
}

.quick button.selected .q-tag {
  color: var(--gold-bright);
}

.quick button:disabled {
  opacity: 0.35;
}

.quick .q-amount {
  font-family: var(--num);
  font-size: 16px;
  color: #f0e2c6;
  font-variant-numeric: lining-nums tabular-nums;
}

.quick .q-tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}

.sheet-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.unit-field {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.32);
  transition: border-color 0.16s;
}

.unit-field:focus-within {
  border-color: var(--line-strong);
}

.unit-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  color: #f3ebdb;
  font-family: var(--num);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.unit-field input::placeholder {
  color: #4f4a40;
}

.unit-field span {
  font-family: var(--num);
  font-size: 12px;
  color: var(--gold);
}

.bid-preview {
  margin-top: 6px;
  font-family: var(--num);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
}

.amount-input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.32);
  color: #f3ebdb;
  font-family: var(--num);
  font-size: 16px;
  letter-spacing: 0.02em;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.amount-input::placeholder {
  font-family: var(--sans);
  font-size: 11.5px;
  color: #5f594c;
}

.amount-input:focus {
  border-color: var(--line-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: filter 0.18s, transform 0.1s;
  white-space: nowrap;
}

.btn.primary {
  height: 48px;
  color: #241a08;
  background: linear-gradient(150deg, #f0d3a0, #d9b26a 45%, #b98f45);
  box-shadow: 0 10px 24px -14px rgba(217, 178, 106, 0.9);
}

.btn.primary:hover {
  filter: brightness(1.05);
}

.btn.primary:active {
  transform: translateY(1px);
}

.btn.primary:disabled {
  filter: saturate(0.4);
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.hint {
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.error {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(200, 80, 60, 0.35);
  border-radius: 9px;
  background: rgba(200, 80, 60, 0.1);
  color: #eda192;
  font-size: 11.5px;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: none;
  }
  30% {
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(3px);
  }
}

.sheet-done {
  margin-top: 14px;
  padding: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
}

/* 入场取名 */

.gate {
  inset: 0;
  margin: auto;
  max-width: 360px;
  max-height: none;
  padding: 22px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
}

.gate .kicker {
  margin-bottom: 4px;
}

.gate-sub {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

.name-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 14px;
  max-height: 42vh;
  overflow-y: auto;
  padding: 1px;
}

.name-chip {
  height: 38px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}

.name-chip:hover:not(:disabled) {
  color: var(--gold-bright);
  border-color: var(--line);
}

.name-chip[aria-pressed="true"] {
  color: #241a08;
  border-color: transparent;
  background: linear-gradient(150deg, #f0d3a0, #d9b26a 55%, #b98f45);
  font-weight: 600;
}

.name-chip:disabled {
  opacity: 0.35;
  text-decoration: line-through;
  cursor: not-allowed;
}

.name-chip.taken {
  border-style: dashed;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.015);
}

.name-chip.taken em {
  margin-left: 4px;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: #b9a06a;
}

.name-chip.taken[aria-pressed="true"] {
  color: #241a08;
}

.name-chip.taken[aria-pressed="true"] em {
  color: #5d4415;
}

.name-empty {
  padding: 12px 2px;
  font-size: 11.5px;
  color: var(--muted-2);
  grid-column: 1 / -1;
}

.gate-error {
  margin-top: 10px;
  font-size: 11.5px;
  color: #eda192;
}

.gate-btn {
  width: 100%;
  margin-top: 14px;
}

.gate-skip {
  display: block;
  margin: 12px auto 0;
  color: var(--muted-2);
}

/* 成交记录 */

.results-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-row .r-no {
  font-family: var(--num);
  font-size: 10px;
  color: var(--muted-2);
}

.result-row .r-title {
  font-size: 12px;
  color: #d9d0be;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-row .r-title small {
  display: block;
  font-size: 10px;
  color: var(--muted-2);
}

.result-row .r-amt {
  font-family: var(--num);
  font-size: 13px;
  color: var(--gold);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.result-row .r-amt.passed {
  font-family: var(--sans);
  font-size: 10.5px;
  color: var(--muted-2);
}

.empty {
  padding: 16px 2px;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* 提示 */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  width: min(90vw, 380px);
  pointer-events: none;
}

.toast {
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(20, 23, 30, 0.95);
  color: #e8dcc4;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.9);
  animation: toastIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.toast.warn {
  border-color: rgba(200, 80, 60, 0.45);
  color: #f0b3a6;
}

.fav-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  pointer-events: none;
}

.fav-layer[hidden] {
  display: none;
}

.toast.fav-alert {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: min(88vw, 460px);
  padding: 24px 28px;
  border-radius: 16px;
  border: 1px solid rgba(240, 201, 128, 0.75);
  background: rgba(22, 24, 30, 0.98);
  text-align: center;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(240, 201, 128, 0.2),
    0 0 44px -12px rgba(240, 201, 128, 0.4);
  cursor: pointer;
}

.toast.fav-alert b {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}

.toast.fav-alert span {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: #f2e9d8;
}

.toast.fav-alert small {
  font-size: 13.5px;
  color: var(--muted);
}

.toast.leaving {
  animation: toastOut 0.22s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(5px);
  }
}

/* ================= 宽屏 ================= */

@media (min-width: 560px) {
  .intro h1 {
    font-size: 27px;
  }
}

@media (min-width: 900px) {
  .page {
    padding: 22px 24px 40px;
  }

  .appbar {
    padding-inline: 24px;
  }

  .groups {
    gap: 26px;
    margin-top: 22px;
  }

  .sheet {
    inset: 0;
    margin: auto;
    max-width: 460px;
    max-height: 86vh;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    padding: 18px 20px 20px;
  }

  .sheet-grab {
    display: none;
  }

  .gate {
    max-width: 380px;
  }
}

@media (max-width: 560px) {
  .brand-text em {
    display: none;
  }
}

@media (max-width: 380px) {
  .live-pill {
    display: none;
  }

  .lot-art {
    width: 72px;
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 关闭本场 */

.closed-state {
  margin-top: 34px;
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.closed-kicker {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted-2);
}

.closed-state h2 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #e8dfcd;
}

.closed-state p:last-child {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted-2);
}

/* 大图 */

.lightbox {
  position: relative;
  width: min(92vw, 560px);
  max-height: 92vh;
  margin: auto;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #0f131a;
  color: var(--ink);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.95);
}

.lightbox::backdrop {
  background: rgba(4, 5, 8, 0.86);
  backdrop-filter: blur(6px);
}

.lightbox-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(10, 12, 17, 0.7);
}

.lightbox-x svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.lightbox-art {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  max-height: 72vh;
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.06), transparent 65%), rgba(0, 0, 0, 0.25);
}

.lightbox-art svg,
.lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 10px;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.admin-link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}

.admin-link:hover {
  color: var(--gold-bright);
  border-color: var(--line);
  background: rgba(217, 178, 106, 0.08);
}

@media (max-width: 520px) {
  .admin-link {
    padding: 0 8px;
    font-size: 10px;
  }
}
.close-countdown {
  position: fixed;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100vw - 24px);
  padding: 8px 14px;
  border: 1px solid rgba(200, 80, 60, 0.55);
  border-radius: 999px;
  background: rgba(22, 12, 10, 0.94);
  box-shadow:
    0 12px 40px -16px rgba(0, 0, 0, 0.9),
    0 0 24px -12px rgba(200, 80, 60, 0.7);
  color: #ece4d4;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.close-countdown b {
  font-family: var(--num);
  font-size: 12px;
  color: #f1d6a6;
}

.close-countdown strong {
  font-family: var(--num);
  font-size: 20px;
  line-height: 1;
  color: #f1d6a6;
}

.close-countdown em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted-2);
}

.cc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8503c;
  animation: closePulse 1s infinite;
}

@keyframes closePulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(200, 80, 60, 0.5);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 0 5px rgba(200, 80, 60, 0);
  }
}

@media (max-width: 560px) {
  .close-countdown {
    top: 64px;
    gap: 5px;
    padding: 7px 11px;
    font-size: 10.5px;
  }

  .close-countdown em {
    display: none;
  }

  .close-countdown strong {
    font-size: 18px;
  }
}
/* 倒计时居中偏上、放大 */
.close-countdown {
  top: 24vh;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 15px;
}

.close-countdown b {
  font-size: 15px;
}

.close-countdown strong {
  font-size: 38px;
}

.close-countdown em {
  font-size: 12px;
}

@media (max-width: 560px) {
  .close-countdown {
    top: 20vh;
    gap: 7px;
    padding: 10px 14px;
    font-size: 12px;
  }

  .close-countdown b {
    font-size: 13px;
  }

  .close-countdown strong {
    font-size: 30px;
  }

  .close-countdown em {
    display: none;
  }
}
@media (max-width: 560px) {
  .close-countdown em {
    display: inline;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 9px;
  }
}


/* ======================= 浏览优化 ======================= */
.browse-bar {
  position: sticky;
  top: calc(48px + env(safe-area-inset-top));
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px -14px 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(10, 12, 17, 0.97), rgba(10, 12, 17, 0.88));
  border-bottom: 1px solid rgba(217, 178, 106, 0.14);
  backdrop-filter: blur(14px) saturate(120%);
}

.browse-bar .filter {
  padding-bottom: 0;
}

.browse-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(217, 178, 106, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.search:focus-within {
  border-color: rgba(217, 178, 106, 0.5);
  background: rgba(217, 178, 106, 0.06);
}

.search svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: rgba(232, 213, 174, 0.55);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  outline: none;
}

.search input::placeholder {
  color: rgba(232, 213, 174, 0.35);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(45deg, transparent 43%, rgba(232, 213, 174, 0.55) 43%, rgba(232, 213, 174, 0.55) 57%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, rgba(232, 213, 174, 0.55) 43%, rgba(232, 213, 174, 0.55) 57%, transparent 57%);
  cursor: pointer;
}

.search-empty {
  margin: 30px 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
}

.lot {
  transition: transform 0.14s ease, border-color 0.18s ease, background 0.18s ease;
}

.lot:active {
  transform: scale(0.995);
}

.lot-img {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lot-img.loaded {
  opacity: 1;
}

.to-top {
  position: fixed;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 28;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(217, 178, 106, 0.28);
  border-radius: 50%;
  background: rgba(12, 14, 20, 0.9);
  color: var(--gold);
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lot:focus-visible,
.chip:focus-visible,
.user-chip:focus-visible,
.link-btn:focus-visible,
.to-top:focus-visible,
.sheet-x:focus-visible {
  outline: 2px solid rgba(217, 178, 106, 0.75);
  outline-offset: 2px;
}

@media (min-width: 700px) {
  .browse-bar {
    top: calc(48px + env(safe-area-inset-top));
    margin-inline: -24px;
    padding-inline: 24px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .browse-tools {
    flex: 0 0 auto;
    min-width: 320px;
  }
}
@media (max-width: 699px) {
  .search input {
    font-size: 16px;
  }

  .search input::placeholder {
    font-size: 13px;
  }
}