/* ==========================================================================
   书屿 BookIsle — design tokens & base
   ========================================================================== */
:root {
  --paper: #f6f0e4;
  --paper-deep: #efe5d2;
  --card: #fdfaf3;
  --ink: #181512;
  --ink-soft: #3b352d;
  --muted: #7c7263;
  --faint: #a19687;
  --line: #e4dac8;
  --line-strong: #d0c1a8;
  --accent: #bd4a2e;
  --accent-deep: #99371f;
  --accent-soft: #f3e2da;
  --gold: #a2763a;
  --gold-soft: #ecdfc4;
  --green: #2f4a3b;
  --green-soft: #e4eadf;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "KaiTi", serif;
  --font-sans: "Avenir Next", "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-num: Georgia, "Times New Roman", var(--font-display);

  --shadow-sm: 0 1px 2px rgba(24, 21, 18, .05), 0 5px 12px -8px rgba(24, 21, 18, .18);
  --shadow-md: 0 2px 4px rgba(24, 21, 18, .05), 0 18px 32px -20px rgba(24, 21, 18, .35);
  --shadow-lg: 0 4px 8px rgba(24, 21, 18, .06), 0 32px 60px -28px rgba(24, 21, 18, .4);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;

  --header-h: 74px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, .1, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 600px at 88% -10%, rgba(189, 74, 46, .07), transparent 62%),
    radial-gradient(900px 520px at -10% 18%, rgba(162, 118, 58, .08), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.028'/%3E%3C/svg%3E");
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--paper); }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
input, textarea, select { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--faint); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.site-main { min-height: 62vh; }

.serif { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.muted { color: var(--muted); }
.accent { color: var(--accent); }
.nowrap { white-space: nowrap; }

.section { padding: 66px 0; }
.section--tight { padding: 44px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.1vw, 38px);
  letter-spacing: .01em;
  line-height: 1.2;
  margin-top: 12px;
}
.section-head p { color: var(--muted); font-size: 14.5px; margin-top: 8px; max-width: 520px; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: .08em;
  white-space: nowrap;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  transition: color .2s, border-color .2s;
}
.section-link:hover { color: var(--accent); border-color: var(--accent); }
.section-link svg { width: 15px; height: 15px; }

/* ==========================================================================
   Buttons / forms / badges
   ========================================================================== */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-border: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .03em;
  cursor: pointer;
  transition: transform .22s var(--ease-out), background .2s, color .2s, border-color .2s, box-shadow .22s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--primary { --btn-bg: var(--accent); --btn-border: var(--accent); --btn-fg: #fff8f2; }
.btn--primary:hover { --btn-bg: var(--accent-deep); --btn-border: var(--accent-deep); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-border: var(--line-strong); }
.btn--ghost:hover { --btn-bg: rgba(24, 21, 18, .045); }
.btn--light { --btn-bg: var(--card); --btn-fg: var(--ink); --btn-border: var(--line); }
.btn--ink-line { --btn-bg: transparent; --btn-fg: var(--paper); --btn-border: rgba(247, 241, 230, .38); }
.btn--ink-line:hover { --btn-bg: rgba(247, 241, 230, .1); }
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn--lg { padding: 15px 30px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--danger { --btn-bg: #a33a26; --btn-border: #a33a26; --btn-fg: #fff; }
.btn.is-loading { pointer-events: none; opacity: .72; }
.btn.is-loading::after {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.field-hint { font-size: 12px; color: var(--faint); line-height: 1.5; }
.field-error { font-size: 12.5px; color: var(--accent-deep); }

.input, .textarea, .select {
  width: 100%;
  padding: 12px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 14.5px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ink-soft);
  box-shadow: 0 0 0 3px rgba(189, 74, 46, .1);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%237c7263' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.input-group { position: relative; }
.input-group svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); }
.input-group .input { padding-left: 42px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink-soft); background: rgba(24, 21, 18, .04); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip--sm { padding: 5px 12px; font-size: 12px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .04em;
  background: var(--paper-deep);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.detail-cat .badge svg { width: 12px; height: 12px; }
.badge--accent { background: var(--accent-soft); border-color: #e7c8bb; color: var(--accent-deep); }
.badge--gold { background: var(--gold-soft); border-color: #dfcba6; color: #7d5a26; }
.badge--green { background: var(--green-soft); border-color: #cfdbc8; color: var(--green); }
.badge--muted { background: transparent; color: var(--muted); }
.badge--dark { background: rgba(24, 21, 18, .82); color: var(--paper); border-color: transparent; }

.surface {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ==========================================================================
   Header / footer
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 240, 228, .84);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}
.brand-seal {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff8f2;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 21px;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 242, .25), var(--shadow-sm);
  transition: transform .3s var(--ease-out);
}
.brand:hover .brand-seal { transform: rotate(-4deg) scale(1.04); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-family: var(--font-display); font-size: 22px; letter-spacing: .12em; font-weight: 600; }
.brand-text small { font-size: 8.5px; letter-spacing: .32em; color: var(--faint); margin-top: 6px; font-family: var(--font-mono); }

.nav { display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.nav-link {
  position: relative;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav-link:hover { background: rgba(24, 21, 18, .05); }
.nav-link.is-active { color: var(--accent-deep); font-weight: 500; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 178px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(253, 250, 243, .7);
  transition: width .25s var(--ease-out), border-color .2s, background .2s;
}
.header-search:focus-within { width: 224px; border-color: var(--line-strong); background: var(--card); }
.header-search svg { width: 15px; height: 15px; color: var(--faint); flex: none; }
.header-search input { width: 100%; border: 0; background: transparent; outline: none; font-size: 13px; }
.header-search button { border: 0; background: none; padding: 0; display: flex; cursor: pointer; }

.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid #dfcba4;
  color: #6f4f1f;
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 600;
  transition: transform .2s, background .2s;
}
.points-pill:hover { transform: translateY(-1px); background: #e8d8b7; }
.points-pill svg { width: 15px; height: 15px; }

.user-menu { position: relative; }
.avatar {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  transition: transform .2s;
}
.avatar:hover { transform: scale(1.05); }
.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 218px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .2s var(--ease-out);
  z-index: 20;
}
.user-menu.is-open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-dropdown-head strong { display: block; font-family: var(--font-display); font-size: 16px; }
.user-dropdown-head span { font-size: 11.5px; color: var(--faint); }
.user-dropdown a, .user-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--paper-deep); color: var(--ink); }
.user-dropdown svg { width: 16px; height: 16px; color: var(--muted); }
.user-dropdown .danger { color: var(--accent-deep); }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

.mobile-drawer {
  position: fixed;
  inset: var(--header-h) 0 auto;
  z-index: 55;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 18px 24px 28px;
  transform: translateY(calc(-100% - var(--header-h)));
  visibility: hidden;
  transition: transform .35s var(--ease-out), visibility .35s;
  box-shadow: var(--shadow-lg);
}
.mobile-drawer.is-open { transform: translateY(0); visibility: visible; }
.mobile-drawer nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.mobile-drawer nav a {
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 18px;
}
.mobile-drawer .drawer-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.site-footer {
  margin-top: 40px;
  background: var(--ink);
  color: #efe7d8;
  padding: 64px 0 34px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(600px 300px at 85% 10%, rgba(189, 74, 46, .18), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M120 0H0v120' fill='none' stroke='%23ffffff' stroke-opacity='.035'/%3E%3C/svg%3E");
  pointer-events: none;
}
.footer-top {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(239, 231, 216, .16);
}
.footer-brand .brand-seal { background: var(--paper); color: var(--ink); }
.footer-brand .brand-text strong { color: var(--paper); }
.footer-brand .brand-text small { color: rgba(239, 231, 216, .5); }
.footer-tagline {
  margin-top: 20px;
  max-width: 330px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.9;
  color: rgba(239, 231, 216, .78);
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(239, 231, 216, .45);
  margin-bottom: 16px;
  font-weight: 400;
}
.footer-col a, .footer-col span {
  display: block;
  padding: 5px 0;
  font-size: 13.5px;
  color: rgba(239, 231, 216, .72);
  transition: color .2s;
}
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-top: 24px;
  font-size: 11.5px;
  color: rgba(239, 231, 216, .42);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.footer-site {
  color: rgba(239, 231, 216, .62);
  text-decoration: none;
  border-bottom: 1px solid rgba(239, 231, 216, .22);
  padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}
.footer-site:hover { color: var(--paper); border-color: var(--gold); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  border: 1px solid rgba(162, 118, 58, .18);
  box-shadow: 0 0 0 60px rgba(162, 118, 58, .035), 0 0 0 150px rgba(162, 118, 58, .025);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 48px;
  align-items: center;
  padding: 74px 0 66px;
}
.hero-copy { max-width: 620px; }
.hero h1 {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: clamp(44px, 5.9vw, 82px);
  line-height: 1.08;
  letter-spacing: .015em;
  font-weight: 600;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 0;
  bottom: 4px;
  height: 7px;
  background: var(--accent);
  opacity: .14;
  border-radius: 999px;
}
.hero-lead {
  margin-top: 24px;
  max-width: 472px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--muted);
}
.hero-site {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(160, 74, 52, .32);
  padding-bottom: 2px;
  transition: border-color .2s ease, color .2s ease;
}
.hero-site:hover { color: var(--accent); border-color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-meta {
  display: flex;
  gap: 42px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-meta-item strong {
  display: block;
  font-family: var(--font-num);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.1;
}
.hero-meta-item span { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; }

.book-stage { position: relative; height: 470px; perspective: 1200px; }
.stage-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 390px;
  height: 390px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(162, 118, 58, .28);
  border-radius: 50%;
}
.stage-ring::after {
  content: "";
  position: absolute;
  inset: 46px;
  border: 1px solid rgba(162, 118, 58, .16);
  border-radius: 50%;
}
.stage-cover {
  position: absolute;
  width: 214px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(24, 21, 18, .14);
  box-shadow: var(--shadow-lg);
  background: var(--ink);
  transition: transform .5s var(--ease-out);
}
.stage-cover img { width: 100%; height: 100%; object-fit: cover; }
.stage-cover:nth-child(2) { left: 2%; top: 20%; transform: rotate(-8deg); z-index: 1; }
.stage-cover:nth-child(3) { left: 30%; top: 8%; transform: rotate(-1deg); z-index: 3; width: 232px; }
.stage-cover:nth-child(4) { right: 2%; top: 24%; transform: rotate(7deg); z-index: 2; }
.book-stage:hover .stage-cover:nth-child(2) { transform: rotate(-10deg) translateX(-6px); }
.book-stage:hover .stage-cover:nth-child(3) { transform: rotate(-1deg) translateY(-8px); }
.book-stage:hover .stage-cover:nth-child(4) { transform: rotate(9deg) translateX(6px); }
.floating-chip {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
}
.floating-chip strong { font-family: var(--font-num); font-size: 17px; font-weight: 600; }
.floating-chip span { color: var(--muted); }
.floating-chip .fc-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: #7d5a26;
}
.floating-chip .fc-icon svg { width: 15px; height: 15px; }
.chip-checkin { left: -6%; bottom: 12%; animation: float 6s ease-in-out infinite; }
.chip-bounty { right: -4%; bottom: 25%; animation: float 7s ease-in-out infinite 1s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.notice-strip {
  border-bottom: 1px solid var(--line);
  background: rgba(253, 250, 243, .55);
}
.notice-strip .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
  overflow: hidden;
}
.notice-label {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--accent-deep);
  font-family: var(--font-mono);
}
.notice-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.notice-text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notice-text a:hover { color: var(--accent); }
.notice-strip .section-link { flex: none; font-size: 11.5px; padding-bottom: 0; border: 0; color: var(--muted); }
.notice-strip .section-link:hover { color: var(--accent); }

/* ==========================================================================
   Book cards & grids
   ========================================================================== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  gap: 34px 24px;
}
.book-grid--wide { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.book-card { display: block; min-width: 0; }
.book-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 5px;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid rgba(24, 21, 18, .12);
  box-shadow: 0 1px 2px rgba(24, 21, 18, .1), 0 16px 30px -20px rgba(24, 21, 18, .45);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.book-cover::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 9px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .32), rgba(255, 255, 255, .06) 60%, transparent);
  pointer-events: none;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.book-card:hover .book-cover { transform: translateY(-7px); box-shadow: 0 4px 8px rgba(24, 21, 18, .08), 0 28px 48px -22px rgba(24, 21, 18, .5); }
.book-card:hover .book-cover img { transform: scale(1.035); }
.book-price {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(253, 250, 243, .93);
  color: #6f4f1f;
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  backdrop-filter: blur(4px);
}
.book-price.is-free { color: var(--green); }
.book-card-body { padding: 13px 2px 0; }
.book-card-body h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  line-height: 1.4;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.book-card:hover .book-card-body h3 { color: var(--accent-deep); }
.book-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.book-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.book-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(228, 218, 200, .7);
  font-size: 10.5px;
  color: var(--faint);
  font-family: var(--font-mono);
  letter-spacing: .02em;
}

.cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  padding: 16px;
  background: linear-gradient(150deg, var(--c1, #2c3342), var(--c2, #141821));
  color: #f6efe2;
}
.cover-fallback .cf-cat {
  font-size: 10px;
  letter-spacing: .18em;
  opacity: .6;
  font-family: var(--font-mono);
}
.cover-fallback strong {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}
.cover-fallback .cf-author { font-size: 11px; opacity: .65; }

.book-card--featured .book-cover { aspect-ratio: 3 / 4; }
.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.feature-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 20px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card .book-cover { aspect-ratio: 3 / 4; }
.feature-card-body { display: flex; flex-direction: column; padding: 4px 0; min-width: 0; }
.feature-card-body h3 {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.4;
  margin-top: 6px;
  transition: color .2s;
}
.feature-card:hover h3 { color: var(--accent-deep); }
.feature-card-body p {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feature-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--faint);
}
.feature-card-foot strong { color: var(--gold); font-family: var(--font-num); font-size: 14px; }

/* ==========================================================================
   Home: categories, bounties, CTA
   ========================================================================== */
.category-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(253, 250, 243, .45);
}
.category-band .wrap {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 18px;
  padding-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-band .wrap::-webkit-scrollbar { display: none; }
.category-band-label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--faint);
}

.bounty-list { border-top: 1px solid var(--line); }
.bounty-row {
  display: grid;
  grid-template-columns: 128px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 22px 8px;
  border-bottom: 1px solid var(--line);
  transition: background .2s, padding .2s;
}
.bounty-row:hover { background: rgba(253, 250, 243, .7); padding-left: 18px; padding-right: 18px; }
.bounty-reward {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bounty-reward strong {
  font-family: var(--font-num);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 500;
  color: var(--gold);
}
.bounty-reward span { font-size: 10.5px; letter-spacing: .14em; color: var(--faint); font-family: var(--font-mono); }
.bounty-body { min-width: 0; }
.bounty-body h3 {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.4;
  transition: color .2s;
}
.bounty-row:hover .bounty-body h3 { color: var(--accent-deep); }
.bounty-body p {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bounty-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--faint);
  font-family: var(--font-mono);
}
.bounty-arrow {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  transition: all .2s;
}
.bounty-row:hover .bounty-arrow { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.bounty-arrow svg { width: 16px; height: 16px; }

.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--paper);
  padding: 58px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(500px 300px at 82% 20%, rgba(189, 74, 46, .35), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cpath d='M100 0H0v100' fill='none' stroke='%23ffffff' stroke-opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.cta-panel h2 {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.3;
  font-weight: 500;
}
.cta-panel p {
  position: relative;
  margin-top: 14px;
  color: rgba(247, 241, 230, .66);
  font-size: 14px;
  max-width: 460px;
}
.cta-actions { position: relative; display: flex; gap: 12px; flex-wrap: wrap; flex: none; }
.cta-seal {
  position: absolute;
  right: 40px;
  bottom: -30px;
  width: 190px;
  height: 190px;
  border: 2px solid rgba(247, 241, 230, .1);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 64px;
  color: rgba(247, 241, 230, .06);
  transform: rotate(-12deg);
}

/* ==========================================================================
   Library / filters / paging
   ========================================================================== */
.page-head {
  position: relative;
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.15;
  margin-top: 14px;
  font-weight: 600;
}
.page-head p { margin-top: 12px; color: var(--muted); font-size: 15px; max-width: 600px; }
.page-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.filter-search { flex: 1; min-width: 220px; max-width: 340px; }
.filter-bar .select { width: auto; min-width: 132px; }
.filter-count { margin-left: auto; font-size: 12px; color: var(--faint); font-family: var(--font-mono); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0; }

.result-grid { padding: 34px 0 10px; }
.load-more { display: flex; justify-content: center; padding: 40px 0 10px; }
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(253, 250, 243, .5);
}
.empty-state .empty-art {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--faint);
  margin-bottom: 18px;
}
.empty-state .empty-art svg { width: 36px; height: 36px; }
.empty-state h3 { font-family: var(--font-display); font-size: 21px; }
.empty-state p { margin-top: 8px; color: var(--muted); font-size: 13.5px; max-width: 360px; }
.empty-state .btn { margin-top: 20px; }

/* ==========================================================================
   Book detail
   ========================================================================== */
.book-detail { padding: 44px 0 70px; }
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--faint);
  margin-bottom: 30px;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.breadcrumbs a:hover { color: var(--accent); }
.book-detail-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 60px;
  align-items: start;
}
.book-detail-cover { position: sticky; top: calc(var(--header-h) + 28px); }
.book-detail-cover .book-cover { border-radius: 6px; }
.cover-note {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--faint);
  font-family: var(--font-mono);
  letter-spacing: .05em;
}
.detail-cat { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.detail-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .01em;
}
.detail-author {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}
.detail-author strong { color: var(--ink); font-weight: 500; }
.detail-intro {
  margin-top: 24px;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-soft);
  white-space: pre-line;
}
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.detail-stat { padding: 16px 0 16px 20px; border-left: 1px solid var(--line); }
.detail-stat:first-child { border-left: 0; padding-left: 0; }
.detail-stat strong {
  display: block;
  font-family: var(--font-num);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.2;
}
.detail-stat span { font-size: 10.5px; color: var(--faint); letter-spacing: .1em; font-family: var(--font-mono); }

.unlock-panel {
  margin-top: 30px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.unlock-price { flex: none; padding-right: 24px; border-right: 1px solid var(--line); }
.unlock-price strong { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-num); font-size: 36px; font-weight: 500; color: var(--gold); line-height: 1; }
.unlock-price strong small { font-size: 13px; font-family: var(--font-sans); color: var(--faint); font-weight: 400; }
.unlock-price span { font-size: 11px; color: var(--faint); letter-spacing: .08em; }
.unlock-info { flex: 1; min-width: 0; }
.unlock-info p { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.unlock-info p strong { color: var(--ink); font-weight: 500; }
.unlock-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.unlock-actions .btn { padding: 11px 18px; }

.preview-block {
  position: relative;
  margin-top: 34px;
  padding: 28px 30px;
  background: rgba(253, 250, 243, .6);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.preview-block h3 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--faint);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.preview-text {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 2;
  color: var(--ink-soft);
  white-space: pre-line;
  max-height: 280px;
  overflow: hidden;
  position: relative;
}
.preview-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(transparent, #fbf7ee);
}
.preview-cta { margin-top: 16px; display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); }
.preview-cta button { border: 0; background: none; color: var(--accent-deep); cursor: pointer; padding: 0; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }

.uploader-card {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(253, 250, 243, .55);
}
.uploader-card .avatar { width: 42px; height: 42px; }
.uploader-card strong { font-family: var(--font-display); font-size: 16px; display: block; }
.uploader-card span { font-size: 11.5px; color: var(--faint); }
.uploader-card .btn { margin-left: auto; }

/* ==========================================================================
   Reader
   ========================================================================== */
.reader-page { background: #f9f4e9; min-height: calc(100vh - var(--header-h)); }
.reader-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(249, 244, 233, .93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.reader-bar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 58px;
}
.reader-bar .back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px 6px 4px;
  border-radius: 8px;
}
.reader-bar .back:hover { color: var(--ink); background: rgba(24, 21, 18, .04); }
.reader-bar .back svg { width: 16px; height: 16px; }
.reader-title { font-family: var(--font-display); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tool-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.tool-btn:hover { border-color: var(--line-strong); color: var(--ink); background: var(--card); }
.tool-btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tool-btn svg { width: 16px; height: 16px; }
.reader-progress { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--accent); width: 0; transition: width .1s linear; }
.reader-sheet {
  max-width: 780px;
  margin: 0 auto;
  padding: 62px 32px 100px;
}
.reader-head { margin-bottom: 44px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.reader-head .eyebrow { margin-bottom: 14px; }
.reader-head h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.3;
  font-weight: 600;
}
.reader-head .reader-byline { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.reader-content {
  font-family: var(--font-display);
  font-size: var(--reader-size, 19px);
  line-height: 2.05;
  color: #2c2822;
  letter-spacing: .015em;
}
.reader-content p { margin: 0 0 1.1em; text-indent: 2em; }
.reader-content p.scene-break { text-indent: 0; text-align: center; color: var(--faint); letter-spacing: .6em; }
.reader-chapter {
  margin: 2.1em 0 .9em;
  font-family: var(--font-display);
  font-size: 1.22em;
  line-height: 1.5;
  letter-spacing: .08em;
  text-align: center;
  font-weight: 600;
  color: inherit;
}
.reader-chapter:first-child { margin-top: 0; }
.reader-locked { position: relative; }
.reader-locked .reader-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 260px;
  background: linear-gradient(transparent, #f9f4e9 78%);
}
.reader-lock-card {
  position: relative;
  z-index: 2;
  margin-top: -40px;
  padding: 34px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.reader-lock-card h3 { font-family: var(--font-display); font-size: 23px; }
.reader-lock-card p { margin: 10px auto 22px; font-size: 13px; color: var(--muted); max-width: 380px; }
.reader-end {
  margin-top: 60px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: .16em;
  font-family: var(--font-mono);
}

/* reader themes */
.reader-page[data-theme="sepia"] { background: #efe4ce; }
.reader-page[data-theme="sepia"] .reader-bar { background: rgba(239, 228, 206, .94); }
.reader-page[data-theme="sepia"] .reader-content { color: #3b3024; }
.reader-page[data-theme="sepia"] .reader-fade { background: linear-gradient(transparent, #efe4ce 78%); }
.reader-page[data-theme="night"] { background: #171a19; color: #d8d4c8; }
.reader-page[data-theme="night"] .reader-bar { background: rgba(23, 26, 25, .95); border-color: #2d322f; }
.reader-page[data-theme="night"] .reader-bar .back,
.reader-page[data-theme="night"] .tool-btn { color: #9aa39c; }
.reader-page[data-theme="night"] .reader-tools .tool-btn:hover { background: #242926; border-color: #353b37; color: #e6e2d7; }
.reader-page[data-theme="night"] .reader-tools .tool-btn.is-active { background: #e6e2d7; color: #171a19; }
.reader-page[data-theme="night"] .reader-content { color: #ccc7ba; }
.reader-page[data-theme="night"] .reader-head h1,
.reader-page[data-theme="night"] .reader-title { color: #ece7da; }
.reader-page[data-theme="night"] .reader-head { border-color: #2d322f; }
.reader-page[data-theme="night"] .reader-head .reader-byline { color: #8d958e; }
.reader-page[data-theme="night"] .reader-fade { background: linear-gradient(transparent, #171a19 78%); }
.reader-page[data-theme="night"] .reader-lock-card { background: #202422; border-color: #333935; }
.reader-page[data-theme="night"] .reader-lock-card h3 { color: #ece7da; }
.reader-page[data-theme="night"] .reader-end { border-color: #2d322f; color: #7d857e; }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 540px;
  min-height: calc(100vh - var(--header-h));
}
.auth-art {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(560px 420px at 70% 30%, rgba(189, 74, 46, .35), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cpath d='M90 0H0v90' fill='none' stroke='%23ffffff' stroke-opacity='.05'/%3E%3C/svg%3E");
  pointer-events: none;
}
.auth-art > * { position: relative; }
.auth-quote {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.55;
  max-width: 520px;
  font-weight: 500;
}
.auth-quote em { font-style: normal; color: #e7b9a4; }
.auth-cite {
  margin-top: 22px;
  font-size: 11.5px;
  letter-spacing: .16em;
  color: rgba(247, 241, 230, .5);
  font-family: var(--font-mono);
}
.auth-art-books {
  position: absolute;
  right: 48px;
  bottom: 150px;
  display: flex;
  gap: 14px;
  opacity: .5;
}
.auth-art-books span {
  width: 46px;
  height: 190px;
  border-radius: 3px;
  border: 1px solid rgba(247, 241, 230, .25);
  background: linear-gradient(180deg, rgba(247, 241, 230, .1), rgba(247, 241, 230, .02));
}
.auth-art-books span:nth-child(2) { height: 160px; margin-top: 30px; }
.auth-art-books span:nth-child(3) { height: 210px; margin-top: 10px; background: rgba(189, 74, 46, .35); }

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 40px;
}
.auth-card { width: 100%; max-width: 396px; }
.auth-card-head { margin-bottom: 30px; }
.auth-card-head h1 { font-family: var(--font-display); font-size: 34px; margin-top: 14px; }
.auth-card-head p { margin-top: 8px; color: var(--muted); font-size: 13.5px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form .btn { margin-top: 6px; }
.auth-alt { margin-top: 24px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-alt a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.auth-note {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  font-size: 12px;
  color: #6f4f1f;
  line-height: 1.65;
}
.auth-note strong { font-weight: 600; }
.password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 5px; cursor: pointer; color: var(--faint); }
.password-toggle svg { width: 17px; height: 17px; }
.password-toggle:hover { color: var(--ink); }
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row .input-group { flex: 1; min-width: 0; }
.code-send {
  flex: none;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  white-space: nowrap;
}
.code-send:disabled { opacity: .6; cursor: not-allowed; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 2px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.auth-tab {
  border: 0;
  background: none;
  padding: 9px 6px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background .18s var(--ease-soft), color .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}
.auth-tab:hover { color: var(--ink-soft); }
.auth-tab.is-active {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.auth-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   Upload
   ========================================================================== */
.upload-page { padding: 50px 0 80px; }
.upload-layout {
  display: grid;
  grid-template-columns: 1fr 324px;
  gap: 48px;
  align-items: start;
  margin-top: 34px;
}
.upload-form { display: flex; flex-direction: column; gap: 30px; }
.form-card {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.form-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.form-card-head .step {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
}
.form-card-head h2 { font-family: var(--font-display); font-size: 19px; }
.form-card-head p { margin-left: auto; font-size: 11px; color: var(--faint); font-family: var(--font-mono); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .span-2 { grid-column: span 2; }

.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 168px;
  padding: 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(246, 240, 228, .5);
  text-align: center;
  cursor: pointer;
  transition: all .22s;
}
.drop-zone:hover, .drop-zone.is-drag { border-color: var(--accent); background: rgba(189, 74, 46, .04); }
.drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-zone .dz-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--muted);
}
.drop-zone .dz-icon svg { width: 21px; height: 21px; }
.drop-zone strong { font-size: 14px; font-weight: 500; }
.drop-zone span { font-size: 11.5px; color: var(--faint); }
.drop-zone.is-selected { border-style: solid; border-color: var(--line); background: var(--paper); }
.drop-zone .dz-file { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 12.5px; }
.drop-zone .dz-file svg { width: 18px; height: 18px; color: var(--accent); }

.cover-picker { display: flex; gap: 20px; align-items: flex-start; }
.cover-preview {
  width: 150px;
  aspect-ratio: 3 / 4;
  flex: none;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--paper-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview span { font-size: 11px; color: var(--faint); text-align: center; padding: 12px; line-height: 1.6; }
.cover-picker-info { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.cover-picker-info p { font-size: 11.5px; color: var(--faint); line-height: 1.6; }

.price-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.price-input-wrap { position: relative; }
.price-input-wrap .input { padding-right: 48px; font-family: var(--font-num); font-size: 16px; }
.price-input-wrap span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: var(--faint); }

.upload-aside { position: sticky; top: calc(var(--header-h) + 28px); display: flex; flex-direction: column; gap: 18px; }
.tips-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.tips-card::after {
  content: "稿";
  position: absolute;
  right: -10px;
  bottom: -40px;
  font-family: var(--font-display);
  font-size: 140px;
  color: rgba(247, 241, 230, .05);
}
.tips-card h3 { font-family: var(--font-display); font-size: 18px; position: relative; }
.tips-card ul { position: relative; margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.tips-card li { position: relative; padding-left: 18px; font-size: 12px; line-height: 1.65; color: rgba(247, 241, 230, .68); }
.tips-card li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.tips-card li strong { color: var(--paper); font-weight: 500; }
.tips-card .tip-foot { position: relative; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(247, 241, 230, .14); font-size: 10.5px; color: rgba(247, 241, 230, .45); font-family: var(--font-mono); letter-spacing: .04em; }
.mini-rule { padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.mini-rule h4 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; color: var(--faint); margin-bottom: 12px; font-weight: 400; }
.mini-rule dl { display: flex; flex-direction: column; gap: 9px; }
.mini-rule dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; }
.mini-rule dt { color: var(--muted); }
.mini-rule dd { margin: 0; font-family: var(--font-num); color: var(--ink); }

/* ==========================================================================
   Bounties
   ========================================================================== */
.bounty-page { padding: 50px 0 80px; }
.bounty-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.bounty-toolbar .chip-row { flex: 1; }
.bounty-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding-top: 28px; }
.bounty-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s;
}
.bounty-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.bounty-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bounty-card-title { font-family: var(--font-display); font-size: 21px; line-height: 1.35; }
.bounty-card-title small { display: block; font-family: var(--font-sans); font-size: 11.5px; color: var(--faint); margin-top: 4px; letter-spacing: .02em; }
.bounty-reward-badge {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: #6f4f1f;
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 600;
}
.bounty-reward-badge small { font-size: 9.5px; font-family: var(--font-mono); letter-spacing: .06em; opacity: .7; }
.bounty-card p {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bounty-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--faint);
  font-family: var(--font-mono);
}
.bounty-card-foot .who { display: flex; align-items: center; gap: 6px; }
.bounty-card-foot .who .avatar { width: 22px; height: 22px; font-size: 10px; border-width: 1px; }

.bounty-detail { padding: 46px 0 80px; }
.bounty-detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start; }
.bounty-main {
  padding: 34px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.bounty-main h1 { font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 42px); line-height: 1.3; margin-top: 14px; }
.bounty-main .bounty-desc { margin-top: 22px; font-size: 14.5px; line-height: 1.9; color: var(--ink-soft); white-space: pre-line; }
.bounty-main-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); }
.bounty-main-meta strong { color: var(--ink); font-weight: 500; }
.bounty-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--header-h) + 28px); }
.reward-panel {
  padding: 28px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.reward-panel::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -70px;
  border-radius: 50%;
  border: 1px solid rgba(247, 241, 230, .15);
  box-shadow: 0 0 0 30px rgba(247, 241, 230, .03);
}
.reward-panel .label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; color: rgba(247, 241, 230, .5); }
.reward-panel strong { display: block; font-family: var(--font-num); font-size: 54px; font-weight: 500; line-height: 1.1; margin: 8px 0 2px; color: #e2c188; }
.reward-panel span { font-size: 11px; color: rgba(247, 241, 230, .55); }
.reward-panel .btn { margin-top: 20px; }
.submissions { margin-top: 22px; }
.submission-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.submission-item:last-child { border-bottom: 0; }
.submission-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.submission-head .avatar { width: 30px; height: 30px; font-size: 12px; }
.submission-head strong { font-size: 13px; font-weight: 500; }
.submission-head span { font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); margin-left: auto; }
.submission-head .submission-order {
  margin-left: 0;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-num);
  font-size: 11px;
  line-height: 1;
}
.submission-item.is-accepted .submission-order { background: var(--green, #2f4a3b); }
.submission-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.submission-book {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.submission-book .mini-cover { width: 46px; aspect-ratio: 3/4; border-radius: 3px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.submission-book h4 { font-family: var(--font-display); font-size: 14px; }
.submission-book span { font-size: 10.5px; color: var(--faint); }
.submission-book .btn { margin-left: auto; }
.submission-item.is-accepted { background: rgba(47, 74, 59, .05); border-radius: var(--radius-sm); padding: 20px; border-bottom-color: transparent; margin-bottom: 10px; }

/* ==========================================================================
   Announcements
   ========================================================================== */
.announce-list { max-width: 900px; margin: 0 auto; padding: 40px 0 80px; display: flex; flex-direction: column; gap: 18px; }
.announce-card {
  padding: 30px 34px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.announce-card.is-pinned { border-left: 3px solid var(--accent); }
.announce-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.announce-head time { margin-left: auto; font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); }
.announce-card h2 { font-family: var(--font-display); font-size: 24px; line-height: 1.4; }
.announce-content {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-soft);
  white-space: pre-line;
}
.announce-foot {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--faint);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Profile / dashboard
   ========================================================================== */
.profile-page { padding: 46px 0 84px; }
.profile-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 36px 40px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--paper);
}
.profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(420px 260px at 88% 10%, rgba(189, 74, 46, .3), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cpath d='M100 0H0v100' fill='none' stroke='%23ffffff' stroke-opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.profile-hero > * { position: relative; }
.profile-avatar {
  width: 82px;
  height: 82px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 34px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid rgba(247, 241, 230, .35);
}
.profile-id { flex: 1; min-width: 0; }
.profile-id h1 { font-family: var(--font-display); font-size: 32px; line-height: 1.2; }
.profile-id p { margin-top: 6px; font-size: 12px; color: rgba(247, 241, 230, .55); }
.profile-id .profile-bio { margin-top: 10px; font-size: 11.5px; color: rgba(247, 241, 230, .5); }
.profile-points { text-align: right; flex: none; }
.profile-points span { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em; color: rgba(247, 241, 230, .45); }
.profile-points strong { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-num); font-size: 46px; line-height: 1.1; font-weight: 500; color: #e2c188; }
.profile-points strong small { font-family: var(--font-sans); font-size: 11px; color: rgba(247, 241, 230, .45); }

.profile-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 30px;
}
.profile-aside { display: flex; flex-direction: column; gap: 18px; }
.checkin-card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.checkin-card h3 { font-family: var(--font-display); font-size: 19px; }
.checkin-card .checkin-sub { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.streak-row { display: flex; align-items: center; gap: 10px; margin: 22px 0 18px; }
.streak-dots { display: flex; gap: 6px; }
.streak-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 9px;
  color: var(--faint);
  font-family: var(--font-mono);
}
.streak-dot.is-done { background: var(--accent); border-color: var(--accent); color: #fff8f2; }
.streak-dot.is-today { border-color: var(--accent); color: var(--accent-deep); }
.streak-num { margin-left: auto; font-family: var(--font-num); font-size: 24px; color: var(--gold); }
.streak-num small { font-size: 10px; color: var(--faint); font-family: var(--font-sans); margin-left: 3px; }
.checkin-card .btn--block { margin-top: 4px; }
.checkin-reward { text-align: center; margin-top: 12px; font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); }
.profile-mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.profile-mini-stats div { background: var(--card); padding: 18px 14px; text-align: center; }
.profile-mini-stats strong { display: block; font-family: var(--font-num); font-size: 22px; font-weight: 500; }
.profile-mini-stats span { font-size: 10px; color: var(--faint); letter-spacing: .06em; }

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  padding: 12px 16px;
  border: 0;
  background: none;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); font-weight: 500; }
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.tab .tab-count { font-size: 9.5px; font-family: var(--font-mono); color: var(--faint); margin-left: 4px; }
.tab-panel { animation: fadeIn .3s var(--ease-soft); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row .mini-cover { width: 44px; aspect-ratio: 3/4; border-radius: 3px; overflow: hidden; flex: none; border: 1px solid var(--line); background: var(--paper-deep); }
.list-row-main { flex: 1; min-width: 0; }
.list-row-main strong { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-main span { font-size: 10.5px; color: var(--faint); display: block; margin-top: 3px; }
.list-row-side { flex: none; text-align: right; font-size: 11px; color: var(--muted); }
.list-row-side strong { display: block; font-family: var(--font-num); font-size: 16px; color: var(--gold); }
.list-row .btn { flex: none; }

.ledger-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-icon {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-deep);
  color: var(--muted);
}
.ledger-icon svg { width: 15px; height: 15px; }
.ledger-icon.is-plus { background: var(--green-soft); color: var(--green); }
.ledger-icon.is-minus { background: var(--accent-soft); color: var(--accent-deep); }
.ledger-main { flex: 1; min-width: 0; }
.ledger-main strong { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-main span { font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); }
.ledger-amount { font-family: var(--font-num); font-size: 17px; font-weight: 600; flex: none; }
.ledger-amount.is-plus { color: var(--green); }
.ledger-amount.is-minus { color: var(--accent-deep); }
.ledger-balance { font-size: 9.5px; color: var(--faint); font-family: var(--font-mono); margin-top: 2px; }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-page { background: var(--paper); }
.admin-shell {
  display: grid;
  grid-template-columns: 246px 1fr;
  min-height: calc(100vh - var(--header-h));
}
.admin-side {
  background: var(--ink);
  color: var(--paper);
  padding: 30px 18px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.admin-side-head { padding: 0 12px; }
.admin-side-head .eyebrow { color: rgba(247, 241, 230, .45); font-size: 9.5px; }
.admin-side-head h1 { font-family: var(--font-display); font-size: 22px; margin-top: 8px; }
.admin-side-head p { font-size: 10.5px; color: rgba(247, 241, 230, .4); margin-top: 4px; }
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-nav a, .admin-nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 9px;
  border: 0;
  background: none;
  color: rgba(247, 241, 230, .62);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all .2s;
}
.admin-nav a:hover, .admin-nav button:hover { background: rgba(247, 241, 230, .07); color: var(--paper); }
.admin-nav .is-active { background: rgba(189, 74, 46, .18); color: #f0c9b8; }
.admin-nav svg { width: 16px; height: 16px; opacity: .8; }
.admin-side-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgba(247, 241, 230, .12); font-size: 10px; color: rgba(247, 241, 230, .35); font-family: var(--font-mono); line-height: 1.7; }
.admin-main { padding: 34px 40px 70px; min-width: 0; }
.admin-main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.admin-main-head h1 { font-family: var(--font-display); font-size: 30px; }
.admin-main-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat-card {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat-card span { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--faint); letter-spacing: .08em; font-family: var(--font-mono); }
.stat-card span svg { width: 13px; height: 13px; }
.stat-card strong { display: block; font-family: var(--font-num); font-size: 32px; font-weight: 500; line-height: 1.2; margin-top: 8px; }
.stat-card small { font-size: 10.5px; color: var(--green); }

.admin-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 26px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-family: var(--font-display); font-size: 17px; }
.panel-head span { font-size: 10px; color: var(--faint); font-family: var(--font-mono); }
.panel-body { padding: 22px; }
.panel-body--flush { padding: 0; }

.chart { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding: 10px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; }
.chart-bars { width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.chart-bar { width: 8px; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--ink); opacity: .85; transition: height .5s var(--ease-out); }
.chart-bar.is-accent { background: var(--accent); }
.chart-col span { font-size: 9px; color: var(--faint); font-family: var(--font-mono); white-space: nowrap; }
.chart-legend { display: flex; gap: 16px; margin-top: 14px; font-size: 10px; color: var(--muted); font-family: var(--font-mono); }
.chart-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; background: var(--ink); }
.chart-legend i.accent { background: var(--accent); }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-table th {
  padding: 11px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  color: var(--faint);
  font-weight: 500;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: rgba(246, 240, 228, .55); }
.admin-table .cell-title { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.admin-table .cell-sub { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.admin-table .cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-table .mini-cover { width: 34px; aspect-ratio: 3/4; border-radius: 2px; overflow: hidden; border: 1px solid var(--line); }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.admin-toolbar .input { max-width: 260px; }
.admin-toolbar .select { max-width: 150px; }
.admin-paging { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--line); }
.admin-empty { padding: 50px 20px; text-align: center; color: var(--muted); font-size: 13px; }

.activity-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex: none; }
.activity-dot.plus { background: var(--green); }
.activity-dot.minus { background: var(--accent); }
.activity-row p { flex: 1; min-width: 0; font-size: 11.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row time { font-size: 9.5px; color: var(--faint); font-family: var(--font-mono); flex: none; }

/* ==========================================================================
   Modal / toast / skeleton / misc
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 15, 12, .46);
  backdrop-filter: blur(5px);
  animation: fadeIn .2s;
}
.modal {
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: modalIn .3s var(--ease-out);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 0;
}
.modal-head h2 { font-family: var(--font-display); font-size: 23px; line-height: 1.35; }
.modal-head p { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.modal-close {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.modal-close:hover { background: var(--paper-deep); color: var(--ink); }
.modal-close svg { width: 15px; height: 15px; }
.modal-body { padding: 22px 28px 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 20px 28px 26px; }
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.modal-note {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.65;
}

.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  padding: 13px 17px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  line-height: 1.5;
  animation: toastIn .35s var(--ease-out);
  pointer-events: auto;
}
.toast svg { width: 17px; height: 17px; flex: none; }
.toast.is-error { background: #8e3220; }
.toast.is-success .toast-icon { color: #b9d6ad; }
.toast.is-out { animation: toastOut .25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: 6px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-card { aspect-ratio: 3/4; }
.skeleton-line { height: 12px; margin-top: 10px; width: 70%; }

.boot-screen {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: .1em;
}
.boot-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--paper);
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 23px;
  animation: bootPulse 1.6s ease-in-out infinite;
}
@keyframes bootPulse { 0%,100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }

.page-loading { padding: 80px 0; display: flex; flex-direction: column; gap: 18px; }
.page-loading .skeleton-line { height: 18px; width: 38%; }
.page-loading .skeleton-line:nth-child(2) { width: 55%; }
.page-loading .skeleton-line:nth-child(3) { width: 30%; }

.form-message { padding: 11px 14px; border-radius: 8px; font-size: 12.5px; line-height: 1.6; }
.form-message.is-error { background: var(--accent-soft); color: var(--accent-deep); }
.form-message.is-success { background: var(--green-soft); color: var(--green); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .65s var(--ease-out), transform .65s var(--ease-out); transition-delay: var(--delay, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

.reduced-motion-safe { transition: none !important; }

/* ==========================================================================
   Admin standalone login
   ========================================================================== */
body.is-admin { background-image: none; background: var(--paper); }
body.is-admin .site-header,
body.is-admin .site-footer,
body.is-admin .mobile-drawer { display: none; }
body.is-admin .admin-shell { min-height: 100vh; grid-template-columns: 246px 1fr; }
body.is-admin .admin-side { top: 0; height: 100vh; }
body.is-admin .admin-side .admin-nav { overflow-y: auto; scrollbar-width: thin; }

.admin-logout {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(247, 241, 230, .18);
  border-radius: 7px;
  background: none;
  color: rgba(247, 241, 230, .68);
  font-size: 11px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all .2s;
}
.admin-logout:hover { background: rgba(247, 241, 230, .1); color: var(--paper); border-color: rgba(247, 241, 230, .36); }
.admin-logout svg { width: 13px; height: 13px; }

.admin-login { display: grid; grid-template-columns: minmax(0, 1fr) 496px; min-height: 100vh; }
.admin-login-art {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 42px 54px 38px;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.admin-login-art::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -220px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(189, 74, 46, .34), transparent 68%);
  pointer-events: none;
}
.admin-login-art::after {
  content: "";
  position: absolute;
  left: -120px;
  bottom: -160px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(162, 118, 58, .26), transparent 70%);
  pointer-events: none;
}
.admin-login-art .brand { position: relative; z-index: 1; align-self: flex-start; }
.admin-login-art-body { position: relative; z-index: 1; margin-top: auto; max-width: 540px; }
.admin-login-art-body .eyebrow { color: rgba(247, 241, 230, .45); }
.admin-login-art-body h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.9vw, 62px);
  line-height: 1.16;
  margin-top: 16px;
  letter-spacing: -.02em;
}
.admin-login-art-body p { margin-top: 18px; max-width: 420px; font-size: 13.5px; line-height: 1.8; color: rgba(247, 241, 230, .56); }
.admin-login-list { margin-top: 34px; display: grid; gap: 2px; }
.admin-login-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(247, 241, 230, .1);
  font-size: 12.5px;
  color: rgba(247, 241, 230, .7);
}
.admin-login-list li:last-child { border-bottom: 0; }
.admin-login-list svg { width: 15px; height: 15px; color: #d8a877; }
.admin-login-back { position: relative; z-index: 1; margin-top: 32px; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 11.5px; color: rgba(247, 241, 230, .5); transition: color .2s; }
.admin-login-back:hover { color: var(--paper); }
.admin-login-back svg { width: 14px; height: 14px; }

.admin-login-panel { display: grid; place-items: center; padding: 56px 48px; background: var(--card); border-left: 1px solid var(--line); }
.admin-login-form { width: 100%; max-width: 372px; display: flex; flex-direction: column; gap: 18px; }
.admin-login-form h2 { font-family: var(--font-display); font-size: 30px; margin-top: 4px; }
.admin-login-form > p { font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.admin-login-note { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.6; color: var(--faint); }
.admin-login-note svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.admin-login-form .input-group { position: relative; }
.admin-login-form .input-group > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.admin-login-form .input-group .input { padding-left: 38px; }
.admin-login-form .password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 5px; color: var(--faint); cursor: pointer; }
.admin-login-form .password-toggle:hover { color: var(--ink); }
.admin-login-form .password-toggle svg { width: 15px; height: 15px; }

/* ==========================================================================
   Titles
   ========================================================================== */
.title-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--title-color, var(--gold));
  background: var(--gold-soft);
  background: color-mix(in srgb, var(--title-color, var(--gold)) 11%, transparent);
  border: 1px solid var(--gold-soft);
  border-color: color-mix(in srgb, var(--title-color, var(--gold)) 32%, transparent);
}
.title-badge--lg { font-size: 12.5px; padding: 3px 11px; margin-left: 12px; letter-spacing: .03em; }
.admin-table .title-badge, .user-dropdown-head .title-badge { margin-left: 0; }
.admin-color-input { height: 42px; padding: 4px 5px; cursor: pointer; }

.title-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
}
.title-current .eyebrow { color: rgba(247, 241, 230, .42); }
.title-current h3 { font-family: var(--font-display); font-size: 23px; margin-top: 9px; display: flex; align-items: center; flex-wrap: wrap; }
.title-current h3 .title-badge { margin-left: 0; font-size: 13px; padding: 3px 12px; }
.title-current p { font-size: 11.5px; color: rgba(247, 241, 230, .48); margin-top: 7px; }
.title-current .btn { flex: none; color: var(--paper); border-color: rgba(247, 241, 230, .26); }
.title-current .btn:hover { border-color: rgba(247, 241, 230, .6); color: var(--paper); }

.title-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.title-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.title-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--title-color, var(--gold)); opacity: .8; }
.title-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.title-card-head .title-badge { margin-left: 0; font-size: 12px; padding: 3px 10px; }
.title-holders { font-size: 9.5px; color: var(--faint); font-family: var(--font-mono); letter-spacing: .04em; white-space: nowrap; }
.title-card p { flex: 1; font-size: 12px; line-height: 1.68; color: var(--muted); }
.title-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.title-price { font-family: var(--font-num); font-size: 15px; color: var(--gold); }
.title-empty { padding: 36px 20px; text-align: center; font-size: 12.5px; color: var(--muted); }

.profile-points-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.profile-id h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* ==========================================================================
   Point shop
   ========================================================================== */
.shop-page { padding: 62px 0 84px; }
.shop-hero { display: grid; grid-template-columns: minmax(0, 1fr) 302px; gap: 48px; align-items: end; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.shop-hero-copy h1 { font-family: var(--font-display); font-size: clamp(36px, 5vw, 60px); line-height: 1.16; letter-spacing: -.02em; margin-top: 14px; }
.shop-hero-copy p { max-width: 560px; margin-top: 18px; font-size: 13.5px; line-height: 1.8; color: var(--muted); }
.shop-balance { padding: 24px 26px; border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.shop-balance > span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; color: rgba(247, 241, 230, .42); }
.shop-balance strong { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 16px; font-family: var(--font-num); font-size: 42px; font-weight: 500; line-height: 1; }
.shop-balance strong small { font-family: var(--font-sans); font-size: 11px; color: rgba(247, 241, 230, .5); }
.shop-balance-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.shop-notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 26px; padding: 14px 18px; border: 1px solid #dfcba6; border-radius: 12px; background: var(--gold-soft); font-size: 12.5px; line-height: 1.65; color: #6f4f1f; }
.shop-notice svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

.shop-section { margin-top: 46px; }
.shop-section-note { font-size: 12px; color: var(--faint); }
.pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 26px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s;
}
.pack-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.pack-index { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--faint); }
.pack-card h3 { font-family: var(--font-display); font-size: 22px; }
.pack-tagline { min-height: 38px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.pack-price { font-family: var(--font-num); font-size: 34px; line-height: 1.1; color: var(--ink); }
.pack-points { display: flex; align-items: center; gap: 6px; padding: 13px 0; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--faint); }
.pack-points svg { width: 14px; height: 14px; color: var(--gold); }
.pack-points strong { font-family: var(--font-num); font-size: 18px; color: var(--gold); font-weight: 600; }
.pack-points em { margin-left: auto; font-style: normal; font-size: 9.5px; font-family: var(--font-mono); color: #7d5a26; background: var(--gold-soft); padding: 2px 6px; border-radius: 999px; }
.pack-card .btn { margin-top: 4px; }

.order-list { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.order-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: 0; }
.order-main { flex: 1; min-width: 0; }
.order-no { font-family: var(--font-mono); font-size: 12px; letter-spacing: .03em; }
.order-meta { font-size: 10.5px; color: var(--faint); margin-top: 3px; line-height: 1.6; }
.shop-login-hint { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(253, 250, 243, .6); }
.shop-login-hint > svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.shop-login-hint strong { display: block; font-size: 13px; }
.shop-login-hint p { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.shop-login-hint .btn { margin-left: auto; flex: none; }

.pay-channels { display: grid; gap: 10px; }
.pay-channel { display: flex; flex-direction: column; gap: 4px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.pay-channel:hover { border-color: var(--ink-soft); background: var(--paper-deep); }
.pay-channel strong { font-size: 13.5px; }
.pay-channel span { font-size: 11px; color: var(--faint); }
.manual-order { display: grid; gap: 10px; }
.manual-order > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-bottom: 9px; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.manual-order span { color: var(--muted); }
.manual-order strong { font-family: var(--font-display); font-size: 15px; }

/* ==========================================================================
   Admin payment settings
   ========================================================================== */
.payment-switch { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.payment-switch strong { display: block; font-size: 13px; }
.payment-switch p { margin-top: 3px; font-size: 11px; color: var(--muted); }
.switch { position: relative; flex: none; width: 44px; height: 24px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .22s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(24, 21, 18, .25); transition: transform .22s var(--ease-out); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.payment-actions { display: flex; align-items: center; gap: 16px; padding-top: 4px; }
.payment-key-state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.payment-key-state svg { width: 13px; height: 13px; }
.admin-tips { display: flex; flex-direction: column; gap: 12px; font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.admin-tips li { position: relative; padding-left: 16px; }
.admin-tips li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.payment-callback { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; margin-top: 22px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--paper); }
.payment-callback code { font-family: var(--font-mono); font-size: 11px; line-height: 1.6; color: var(--ink-soft); word-break: break-all; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .header-search { width: 150px; }
  .feature-row { grid-template-columns: 1fr 1fr; }
  .feature-card:last-child { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-login { grid-template-columns: minmax(0, 1fr) 430px; }
  .admin-login-art { padding: 38px 40px 34px; }
}

@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: 1fr; gap: 18px; padding: 56px 0 42px; }
  .hero-copy { max-width: 640px; }
  .book-stage { height: 380px; max-width: 520px; margin: 6px auto 0; width: 100%; }
  .stage-cover { width: 170px; }
  .stage-cover:nth-child(3) { width: 190px; }
  .stage-ring { width: 300px; height: 300px; }
  .chip-checkin { left: 0; bottom: 6%; }
  .chip-bounty { right: 0; bottom: 20%; }
  .book-detail-grid { grid-template-columns: 260px 1fr; gap: 40px; }
  .upload-layout { grid-template-columns: 1fr; }
  .upload-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .upload-aside > * { flex: 1; min-width: 260px; }
  .bounty-detail-grid { grid-template-columns: 1fr; }
  .bounty-side { position: static; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-aside { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .profile-aside > * { flex: 1; min-width: 250px; }
  .auth-page { grid-template-columns: 1fr 460px; }
  .auth-art { padding: 52px 40px; }
  .shop-hero { grid-template-columns: 1fr; gap: 26px; align-items: start; }
  .shop-balance { max-width: 380px; }
  .admin-login { grid-template-columns: 1fr 400px; }
}

@media (max-width: 900px) {
  .wrap { padding: 0 22px; }
  .nav, .header-search, .header-actions > .btn { display: none; }
  .menu-toggle { display: grid; margin-left: 4px; }
  .header-actions { gap: 8px; }
  .header-inner { gap: 14px; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-card:last-child { display: grid; }
  .feature-card { grid-template-columns: 132px 1fr; }
  .bounty-grid { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-form-wrap { min-height: calc(100vh - var(--header-h)); padding: 40px 24px; }
  .admin-login { grid-template-columns: 1fr; }
  .admin-login-art { display: none; }
  .admin-login-panel { min-height: 100vh; padding: 48px 32px; border-left: 0; }
  .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: span 2; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: static;
    height: auto;
    padding: 18px;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
  }
  body.is-admin .admin-shell { grid-template-columns: 1fr; }
  body.is-admin .admin-side { height: auto; }
  .admin-side-head { display: none; }
  .admin-nav { flex-direction: row; gap: 4px; }
  .admin-nav a span { display: none; }
  .admin-nav a { padding: 10px; }
  .admin-side-foot { display: block; margin: 0 0 0 auto; padding: 0; border: 0; font-size: 0; line-height: 0; }
  .admin-side-foot .admin-logout { width: auto; margin: 0; font-size: 11px; white-space: nowrap; }
  .admin-main { padding: 26px 22px 60px; }
  .reader-bar { top: 0; }
  .reader-sheet { padding: 44px 24px 80px; }
  .cta-panel { flex-direction: column; align-items: flex-start; padding: 40px 32px; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .section { padding: 46px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero h1 { font-size: clamp(38px, 9.4vw, 58px); }
  .hero-meta { gap: 26px; flex-wrap: wrap; }
  .hero-meta-item strong { font-size: 23px; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 16px; }
  .book-card-body h3 { font-size: 15px; }
  .book-stage { height: 330px; }
  .stage-cover { width: 140px; }
  .stage-cover:nth-child(3) { width: 158px; }
  .stage-ring { width: 250px; height: 250px; }
  .floating-chip { padding: 8px 12px; font-size: 11px; }
  .floating-chip strong { font-size: 14px; }
  .floating-chip .fc-icon { width: 26px; height: 26px; }
  .book-detail { padding: 30px 0 50px; }
  .book-detail-grid { grid-template-columns: 1fr; gap: 30px; }
  .book-detail-cover { position: static; max-width: 220px; }
  .detail-title { font-size: 34px; }
  .detail-stats { grid-template-columns: repeat(2, 1fr); }
  .detail-stat { padding: 12px 0 12px 16px; }
  .detail-stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .unlock-panel { flex-direction: column; align-items: flex-start; gap: 16px; }
  .unlock-price { border-right: 0; padding-right: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); width: 100%; }
  .book-detail-cover .book-cover { aspect-ratio: 3/4; }
  .bounty-row { grid-template-columns: 92px 1fr; gap: 16px; }
  .bounty-reward strong { font-size: 24px; }
  .bounty-arrow { display: none; }
  .bounty-body p { white-space: normal; }
  .profile-hero { flex-direction: column; align-items: flex-start; gap: 18px; padding: 28px; }
  .profile-points { text-align: left; }
  .profile-points strong { font-size: 38px; }
  .profile-avatar { width: 64px; height: 64px; font-size: 26px; }
  .profile-aside { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .cover-picker { flex-direction: column; }
  .cover-preview { width: 120px; }
  .filter-count { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .admin-main-head { flex-direction: column; align-items: flex-start; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card strong { font-size: 26px; }
  .title-grid { grid-template-columns: 1fr; }
  .title-current { flex-direction: column; align-items: flex-start; }
  .shop-page { padding: 42px 0 62px; }
  .pack-grid { grid-template-columns: 1fr; }
  .shop-hero-copy h1 { font-size: clamp(32px, 8.6vw, 44px); }
  .order-row { flex-wrap: wrap; gap: 10px 14px; }
  .shop-login-hint { flex-direction: column; align-items: flex-start; gap: 12px; }
  .shop-login-hint .btn { margin-left: 0; }
  .admin-login-panel { padding: 36px 22px; }
  .modal { border-radius: 18px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 20px; padding-right: 20px; }
  .toast-root { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
  .section-link { display: none; }
  .notice-strip .section-link { display: none; }
  .announce-card { padding: 24px; }
  .announce-content { font-size: 13.5px; }
  .cta-panel { padding: 34px 24px; }
  .cta-seal { display: none; }
  .reader-bar-inner { gap: 10px; }
  .reader-title { font-size: 14px; }
  .reader-bar .back span { display: none; }
  .reader-content { font-size: calc(var(--reader-size, 19px) - 1px); }
}

@media (max-width: 460px) {
  .wrap { padding: 0 16px; }
  .brand-text small { display: none; }
  .brand-seal { width: 34px; height: 34px; font-size: 19px; }
  .brand-text strong { font-size: 20px; }
  .hero-actions .btn { flex: 1; }
  .hero-meta { gap: 18px; }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .book-cover { border-radius: 4px; }
  .book-foot span:last-child { display: none; }
  .stage-cover { width: 118px; }
  .stage-cover:nth-child(3) { width: 132px; }
  .stage-ring { width: 210px; height: 210px; }
  .chip-checkin { left: 0; }
  .chip-bounty { right: 0; }
  .bounty-card { padding: 18px; }
  .admin-table th, .admin-table td { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   User chip — 头像 + 昵称 + 头衔（全站统一）
   ========================================================================== */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-sans);
  vertical-align: middle;
}
.user-chip .avatar { width: 26px; height: 26px; font-size: 11px; flex: none; }
.user-chip-name {
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.user-chip .title-badge { margin-left: 0; flex: none; }
a.user-chip:hover .user-chip-name { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.user-chip--inline { gap: 5px; }
.user-chip--inline .avatar { width: 20px; height: 20px; font-size: 9px; }
.user-chip--inline .user-chip-name { font-size: inherit; color: inherit; font-weight: 600; max-width: 150px; }
.user-chip--card .avatar { width: 22px; height: 22px; font-size: 10px; border-width: 1px; }
.user-chip--card .user-chip-name { font-size: 11px; color: var(--faint); max-width: 130px; }

/* 详情页 / 悬赏页中的行内用户名 */
.detail-author .user-chip { margin: 0 2px; }
.detail-author .user-chip-name { color: var(--ink); }

/* 上传者卡片 */
.uploader-card { flex-wrap: wrap; }
.uploader-card .uploader-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; flex: 1; }
.uploader-card .user-chip { gap: 12px; }
.uploader-card .user-chip .avatar { width: 42px; height: 42px; font-size: 16px; }
.uploader-card .user-chip-name { font-family: var(--font-display); font-size: 16px; color: var(--ink); max-width: 220px; }
.uploader-card .uploader-note { font-size: 11.5px; color: var(--faint); }

/* 应征记录：chip 内部的 span 不应继承「时间靠右」规则 */
.submission-head .user-chip { margin-right: auto; gap: 9px; }
.submission-head .user-chip span { margin-left: 0; }
.submission-head .user-chip .avatar { width: 30px; height: 30px; font-size: 12px; }
.submission-head .user-chip-name { font-size: 13px; font-weight: 500; color: var(--ink); }

/* ==========================================================================
   用户主页
   ========================================================================== */
.user-page { padding: 46px 0 80px; }
.user-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px 26px;
  padding: 30px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.user-identity { display: flex; align-items: flex-start; gap: 20px; min-width: 0; }
.user-avatar {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--paper);
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.user-identity-main { min-width: 0; }
.user-identity-main h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
}
.user-bio { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.8; max-width: 620px; }
.user-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 11px; color: var(--faint); }
.user-meta span { display: inline-flex; align-items: center; gap: 5px; }
.user-meta svg { width: 13px; height: 13px; }
.user-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.user-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.user-stats div { display: flex; flex-direction: column; gap: 2px; }
.user-stats strong { font-family: var(--font-num); font-size: 22px; font-weight: 600; color: var(--ink); }
.user-stats span { font-size: 10.5px; letter-spacing: .06em; color: var(--faint); }

/* ==========================================================================
   书籍评论区
   ========================================================================== */
.comment-section {
  margin-top: 44px;
  padding: 30px 32px 34px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.comment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.comment-head h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 26px;
}
.comment-head p { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.comment-total {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 9px;
}
.comment-head-mark { color: var(--faint); flex: none; }
.comment-head-mark svg { width: 24px; height: 24px; }
.comment-form { display: flex; gap: 12px; margin-top: 22px; }
.comment-form-avatar { width: 36px; height: 36px; font-size: 13px; flex: none; }
.comment-form-main { flex: 1; min-width: 0; }
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.comment-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--muted);
}
.comment-login span { display: inline-flex; align-items: center; gap: 8px; }
.comment-login svg { width: 16px; height: 16px; }
.comment-list { margin-top: 8px; }
.comment-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: 0; padding-bottom: 0; }
.comment-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-top .user-chip-name { font-size: 13px; color: var(--ink); font-weight: 500; max-width: 200px; }
.comment-time { font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); }
.comment-author-badge { font-size: 9px; }
.comment-delete {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--faint);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .2s;
}
.comment-delete:hover { color: var(--accent-deep); background: var(--accent-soft); border-color: rgba(189, 74, 46, .2); }
.comment-delete svg { width: 14px; height: 14px; }
.comment-text { margin-top: 10px; font-size: 13.5px; line-height: 1.9; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }
.comment-empty { padding: 40px 0 16px; text-align: center; color: var(--faint); font-size: 12.5px; }
.comment-empty svg { width: 26px; height: 26px; margin-bottom: 8px; color: var(--line-strong); }

/* ==========================================================================
   自定义头衔
   ========================================================================== */
.custom-title-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
  padding: 22px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(162, 118, 58, .09), transparent 62%);
}
.custom-title-card h3 { margin-top: 6px; font-family: var(--font-display); font-size: 20px; }
.custom-title-card p { margin-top: 6px; font-size: 12px; color: var(--muted); max-width: 540px; line-height: 1.7; }

/* 后台：单行配置表单 */
.admin-inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .user-page { padding: 30px 0 54px; }
  .user-hero { grid-template-columns: 1fr; padding: 24px; gap: 16px; }
  .user-identity { gap: 14px; }
  .user-avatar { width: 60px; height: 60px; border-radius: 18px; font-size: 24px; }
  .user-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .user-actions { width: 100%; }
  .comment-section { margin-top: 30px; padding: 24px 20px 26px; }
  .comment-head h2 { font-size: 22px; }
  .comment-form { flex-direction: column; }
  .comment-form-avatar { display: none; }
  .comment-form-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .comment-form-foot .btn { width: 100%; }
  .uploader-card { gap: 10px; }
  .uploader-card .btn { margin-left: 0; width: 100%; }
}

