/* ============================================================
   奇石评奖系统 · 基础样式
   纸本 / 墨色 / 金石
   ============================================================ */
:root {
  --paper: #f4f0e6;
  --paper-2: #fbf8f0;
  --card: #fffdf7;
  --ink: #1a1c19;
  --ink-2: #3d433c;
  --muted: #8a8878;
  --line: rgba(26, 28, 25, .12);
  --line-strong: rgba(26, 28, 25, .22);
  --gold: #a9813c;
  --gold-l: #d9c092;
  --jade: #2a5a4d;
  --jade-deep: #173a31;
  --seal: #a5382b;
  --serif: "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans CJK SC", "PingFang SC", -apple-system, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 18px 40px -32px rgba(26, 28, 25, .6);
  --r: 4px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% 2%, rgba(169, 129, 60, .10), transparent 38%),
    radial-gradient(circle at 92% 18%, rgba(42, 90, 77, .08), transparent 34%),
    radial-gradient(circle at 50% 110%, rgba(169, 129, 60, .09), transparent 45%),
    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'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  background-attachment: fixed;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, .serif { font-family: var(--serif); font-weight: 700; letter-spacing: .02em; margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(169, 129, 60, .28); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 26px; }
.wrap.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stack { display: flex; flex-direction: column; }

/* ---------------- 顶栏 ---------------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 240, 230, .86);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.site-head .inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.seal-mark {
  width: 36px; height: 36px; flex: none; border-radius: 3px;
  background: linear-gradient(155deg, #b8432f, #8f2b21);
  color: #fff7ea; display: grid; place-items: center;
  font-family: var(--serif); font-size: 21px; line-height: 1;
  box-shadow: 0 2px 10px -3px rgba(143, 43, 33, .7), 0 0 0 1px rgba(255, 255, 255, .18) inset;
  letter-spacing: 0;
}
.brand-name { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: .08em; line-height: 1.25; }
.brand-sub { font-size: 10px; color: var(--muted); letter-spacing: .28em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  font-size: 13px; padding: 7px 12px; border-radius: 3px; color: var(--ink-2);
  letter-spacing: .06em; transition: .18s;
}
.nav a:hover { background: rgba(26, 28, 25, .055); }
.nav a.active { color: var(--jade); background: rgba(42, 90, 77, .08); font-weight: 600; }
.nav .btn { margin-left: 8px; }

/* ---------------- 按钮 ---------------- */
.btn {
  --bg: transparent; --fg: var(--ink); --bd: var(--line-strong);
  appearance: none; border: 1px solid var(--bd); background: var(--bg); color: var(--fg);
  font-size: 13.5px; padding: 9px 18px; border-radius: 3px; cursor: pointer;
  letter-spacing: .05em; transition: transform .12s, box-shadow .18s, background .18s, opacity .18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
}
.btn:hover { background: rgba(26, 28, 25, .04); }
.btn:active { transform: translateY(1px); }
.btn.solid { --bg: var(--jade); --fg: #f7f4ea; --bd: var(--jade); box-shadow: 0 6px 18px -10px rgba(23, 58, 49, .9); }
.btn.solid:hover { background: #326a5b; }
.btn.gold { --bg: linear-gradient(160deg, #b8914b, #9a7434); --fg: #fffaf0; --bd: #9a7434; }
.btn.gold:hover { background: linear-gradient(160deg, #c39c55, #a67e3a); }
.btn.seal { --bg: var(--seal); --fg: #fff8f2; --bd: var(--seal); }
.btn.seal:hover { background: #8f2b21; }
.btn.ghost { --bd: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: rgba(26, 28, 25, .05); }
.btn.danger { --fg: var(--seal); --bd: rgba(165, 56, 43, .35); }
.btn.danger:hover { background: rgba(165, 56, 43, .07); }
.btn.sm { padding: 5px 11px; font-size: 12px; }
.btn.lg { padding: 14px 30px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }

/* ---------------- 卡片 / 分节 ---------------- */
.card {
  background: linear-gradient(180deg, var(--card), #fbf7ed);
  border: 1px solid rgba(169, 129, 60, .22);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card.pad { padding: 26px 28px; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.section-title h2 { font-size: 19px; letter-spacing: .1em; }
.section-title .en { font-size: 10px; letter-spacing: .3em; color: var(--gold); text-transform: uppercase; }
.eyebrow { font-size: 10.5px; letter-spacing: .34em; color: var(--gold); text-transform: uppercase; font-weight: 600; }
.hairline { height: 1px; background: var(--line); border: 0; margin: 22px 0; }

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > label { font-size: 12.5px; letter-spacing: .08em; color: var(--ink-2); font-weight: 500; }
.field > label .req { color: var(--seal); margin-left: 3px; }
.input, .select, textarea.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong);
  background: #fffdf8; border-radius: 3px; font-size: 14.5px; color: var(--ink);
  font-family: var(--sans); transition: border-color .18s, box-shadow .18s; outline: none;
}
.input:focus, textarea.input:focus, .select:focus {
  border-color: var(--jade); box-shadow: 0 0 0 3px rgba(42, 90, 77, .1);
}
.input::placeholder { color: #b3b0a2; }
textarea.input { resize: vertical; min-height: 74px; }
.hint { font-size: 11.5px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  padding: 2px 9px; border-radius: 999px; letter-spacing: .06em;
  border: 1px solid var(--line-strong); color: var(--ink-2); background: rgba(255, 255, 255, .5);
}
.tag.jade { color: var(--jade); border-color: rgba(42, 90, 77, .3); background: rgba(42, 90, 77, .07); }
.tag.gold { color: #8a6524; border-color: rgba(169, 129, 60, .38); background: rgba(169, 129, 60, .1); }
.tag.seal { color: var(--seal); border-color: rgba(165, 56, 43, .3); background: rgba(165, 56, 43, .07); }
.tag.grey { color: var(--muted); }

/* ---------------- 奖项徽标 ---------------- */
.tier-badge { font-size: 10px; padding: 2px 8px; border-radius: 2px; letter-spacing: .12em; font-weight: 600;
  border: 1px solid; display: inline-block; line-height: 1.5; white-space: nowrap; }
.tier-special { color: #8a5b12; border-color: rgba(169, 129, 60, .55); background: linear-gradient(160deg, #f7e6c2, #efd7a6); }
.tier-first { color: #7c4a2c; border-color: rgba(185, 138, 99, .5); background: rgba(185, 138, 99, .12); }
.tier-second { color: #3f5a6b; border-color: rgba(63, 90, 107, .35); background: rgba(63, 90, 107, .08); }
.tier-collection { color: var(--muted); border-color: var(--line-strong); background: rgba(26, 28, 25, .03); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow: auto; border-radius: 3px; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.table th {
  text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .1em;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 253, 247, .8); position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
table.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.table tr:hover td { background: rgba(169, 129, 60, .04); }

/* ---------------- 提示 / 弹窗 ---------------- */
#toasts { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 140; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(24, 28, 24, .94); color: #f6f2e6; padding: 10px 18px; border-radius: 3px;
  font-size: 13.5px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); animation: toastIn .24s ease;
  max-width: 84vw; letter-spacing: .02em;
}
.toast.err { background: #8d2c22; }
.toast.ok { background: #23503f; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 24, 20, .52); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 150; padding: 20px; animation: fade .18s;
}
.modal {
  background: var(--card); border-radius: 5px; max-width: 460px; width: 100%; padding: 28px;
  border: 1px solid rgba(169, 129, 60, .3); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
  animation: popIn .22s cubic-bezier(.2, .8, .3, 1);
}
.modal h3 { font-size: 18px; margin-bottom: 10px; letter-spacing: .06em; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.97) translateY(6px); } }

/* ---------------- 页脚 ---------------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 26px 0 40px; font-size: 12px; color: var(--muted); }
.site-foot .inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------------- 通用动效 ---------------- */
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #46a37e; position: relative; display: inline-block; }
.live-dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid rgba(70, 163, 126, .5);
  animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes flashGold { 0% { background: rgba(169, 129, 60, .22); } 100% { background: transparent; } }
.flash { animation: flashGold 1.1s ease-out; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } }
.rise { animation: riseIn .45s both; }

/* ---------------- 响应式顶栏 ---------------- */
@media (max-width: 760px) {
  .site-head .inner { flex-wrap: wrap; height: auto; padding-top: 9px; gap: 4px; align-items: center; }
  .brand { padding-bottom: 7px; gap: 9px; }
  .seal-mark { width: 30px; height: 30px; font-size: 17px; }
  .brand-name { font-size: 15px; white-space: nowrap; }
  .brand-sub { display: none; }
  .nav { width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 8px; gap: 1px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; font-size: 12.5px; padding: 5px 9px; white-space: nowrap; }
  .nav a.btn { margin-left: auto; padding: 4px 12px; }
}

/* ---------------- 打印 ---------------- */
@media print {
  body { background: #fff !important; background-image: none !important; }
  @page { margin: 10mm; }
  .no-print { display: none !important; }
  .site-head, .site-foot { display: none; }
}
