  * { margin: 0; padding: 0; box-sizing: border-box; }

  :root {
    --silk-light: #f3e5c9;
    --silk-dark: #dac29c;
    --cinnabar: #c43d2b;
    --vermilion: #b53b2a;
    --pillar-dark: #7a2216;
    --pillar-light: #d64a38;
    --jade-green: #4a9c82;
    --mountain-far: #6f7e6b;
    --mountain-mid: #4e5b4a;
    --mountain-near: #3a4237;
    --roof-dark: #2c2416;
    --earth: #3a2e24;
    --gold: #d4a017;
    --gold-light: #e8c44a;
    --cloud: rgba(245, 235, 210, 0.7);

    --bg: #2b1b0e;
    --surface: rgba(42, 28, 18, 0.88);
    --surface-solid: #2a1c12;
    --surface-2: rgba(58, 38, 24, 0.85);
    --border: rgba(180, 120, 80, 0.35);
    --border-strong: rgba(212, 160, 23, 0.5);
    --text: #f0e6d8;
    --text-dim: #b8a8a0;
    --accent: #c53030;
    --paper: #f5f0e6;
    --navbar-h: 60px;
  }

  body {
    font-family: 'Noto Serif SC', 'LXGW WenKai', 'Ma Shan Zheng', sans-serif;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* 中国山水画背景 */
    background: url('/static/bg-desktop.png') center center / cover no-repeat fixed;
  }

  /* 手机竖屏用移动端背景 */
  @media (max-width: 768px) {
    body {
      background-image: url('/static/bg-mobile.png');
      background-attachment: scroll;
    }
  }

  /* Canvas 已被 PNG 背景替代，隐藏 */
  #chineseBgCanvas {
    display: none;
  }

  body > .page-content {
    position: relative;
    z-index: 1;
  }

  .signature {
    position: fixed; bottom: 18px; right: 24px;
    color: rgba(180, 120, 80, 0.55);
    font-family: 'LXGW WenKai', 'Noto Serif SC', serif;
    font-size: 16px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    border-left: 2px solid rgba(160, 90, 60, 0.4);
    padding-left: 6px;
  }
  .signature span { display: inline-block; margin: 4px 0; }

  a { color: var(--gold); text-decoration: none; }
  a:hover { text-decoration: underline; }

  .navbar {
    background: linear-gradient(180deg, rgba(42,28,18,0.97) 0%, rgba(42,28,18,0.92) 100%);
    border-bottom: 2px solid var(--gold);
    padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky; top: 0; z-index: 999;
  }
  .navbar-brand {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.6rem; color: var(--cinnabar);
    text-shadow: 1px 1px 0 var(--gold);
  }
  .navbar-nav { display: flex; gap: 20px; align-items: center; }
  .navbar-nav a, .navbar-nav span { color: var(--text-dim); font-size: 0.9rem; }
  .navbar-nav .user-badge {
    background: rgba(212,160,23,0.12); border: 1px solid var(--gold);
    padding: 4px 12px; border-radius: 20px; color: var(--gold);
    font-size: 0.85rem;
  }
  .navbar-nav .admin-link { color: var(--jade-green); }

  .flash {
    padding: 12px 20px; border-radius: 8px;
    margin: 16px auto; max-width: 600px; text-align: center;
    backdrop-filter: blur(8px);
  }
  .flash.error {
    background: rgba(197,48,48,0.15); border: 1px solid rgba(197,48,48,0.3); color: #ff6b6b;
  }
  .flash.success {
    background: rgba(74,156,130,0.15); border: 1px solid rgba(74,156,130,0.3); color: #69db7c;
  }

  .auth-container {
    display: flex; justify-content: center; align-items: center;
    min-height: 85vh; padding: 20px;
  }
  .auth-card {
    background: linear-gradient(145deg, rgba(58,38,24,0.92), rgba(42,28,18,0.95));
    border: 4px double var(--gold); border-radius: 12px;
    padding: 48px 40px; width: 100%; max-width: 420px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .auth-card h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.4rem; color: var(--cinnabar);
    text-align: center; margin-bottom: 32px;
    text-shadow: 2px 2px 0 var(--gold), 4px 4px 8px rgba(0,0,0,0.3);
  }
  .auth-brand {
    text-align: center; margin-bottom: 8px;
  }
  .auth-brand-char {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 4.5rem; color: var(--cinnabar);
    line-height: 1;
    text-shadow: 3px 3px 0 var(--gold), 6px 6px 16px rgba(0,0,0,0.4);
    margin-bottom: 8px;
    animation: brandCharReveal 0.8s ease-out;
  }
  @keyframes brandCharReveal {
    0%   { opacity: 0; transform: scale(0.5) translateY(10px); filter: blur(8px); }
    60%  { opacity: 1; transform: scale(1.05) translateY(-2px); filter: blur(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
  }
  .auth-brand-name {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.6rem; color: var(--gold);
    margin: 0 0 4px; letter-spacing: 0.08em;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
  }
  .auth-brand-tagline {
    font-size: 0.82rem; color: var(--text-dim);
    letter-spacing: 0.2em; opacity: 0.7;
  }
  .auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0 24px;
  }
  .auth-divider-line {
    flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,160,23,0.3), transparent);
  }
  .auth-divider-dot {
    color: var(--gold); font-size: 1.2rem; line-height: 1;
  }
  .auth-heading {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.4rem; color: var(--paper);
    text-align: center; margin-bottom: 24px;
    font-weight: 400;
  }
  .auth-card label {
    display: block; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 6px;
  }
  .auth-card input {
    width: 100%; padding: 12px 16px; margin-bottom: 16px;
    background: rgba(26,15,15,0.6); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-size: 1rem;
    font-family: inherit; transition: border-color 0.3s;
  }
  .auth-card input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,160,23,0.15); }
  .auth-card button {
    width: 100%; padding: 14px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, var(--cinnabar), var(--pillar-dark));
    color: var(--paper); font-size: 1.1rem; font-family: inherit;
    cursor: pointer; font-weight: 600; transition: all 0.3s;
    letter-spacing: 0.1em;
    box-shadow: 0 8px 24px rgba(181,59,42,0.3);
  }
  .auth-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(181,59,42,0.45);
  }
  .auth-card button:disabled {
    opacity: 0.7; cursor: not-allowed; transform: none;
    box-shadow: none;
  }
  .auth-card button.loading {
    background: linear-gradient(135deg, #666, #444);
    box-shadow: none;
  }
  .pw-field {
    position: relative; margin-bottom: 16px;
  }
  .pw-field input {
    width: 100%;
    margin-bottom: 0;
  }
  .auth-error {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px; margin-bottom: 20px;
    background: rgba(196,61,43,0.12); border: 1px solid rgba(196,61,43,0.35);
    border-radius: 10px; color: #ff8a80;
    font-size: 0.88rem; line-height: 1.5;
    animation: authErrorIn 0.3s ease-out;
  }
  @keyframes authErrorIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .auth-error-icon { flex-shrink: 0; font-size: 1.1rem; }
  .auth-error-text { flex: 1; }
  .auth-error-close {
    flex-shrink: 0; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; border-radius: 50%;
    color: #ff8a80; font-size: 0.85rem; cursor: pointer;
    opacity: 0.6; transition: opacity 0.15s;
  }
  .auth-error-close:hover { opacity: 1; }
  .auth-footer {
    text-align: center; margin-top: 20px; color: var(--text-dim); font-size: 0.9rem;
  }
  .auth-privacy {
    margin-top: 20px; border-top: 1px solid rgba(180,120,80,0.15); padding-top: 16px;
  }
  .auth-privacy summary {
    cursor: pointer; font-size: 0.8rem; color: var(--text-dim); text-align: center;
    transition: color 0.2s;
  }
  .auth-privacy summary:hover { color: var(--gold); }
  .privacy-content {
    margin-top: 12px; font-size: 0.75rem; color: var(--text-dim); line-height: 1.6;
  }
  .privacy-content p { margin-bottom: 8px; }
  .privacy-content ul { margin: 4px 0 8px 16px; padding: 0; }
  .privacy-content li { margin-bottom: 2px; }
  .privacy-consent {
    display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px;
  }
  .privacy-consent input[type="checkbox"] {
    width: auto; margin: 3px 0 0 0; flex-shrink: 0; accent-color: var(--cinnabar);
  }
  .privacy-consent label {
    font-size: 0.75rem; color: var(--text-dim); line-height: 1.5; cursor: pointer;
  }
  .pw-hint {
    font-size: 0.75rem; color: var(--text-dim); margin-top: -12px; margin-bottom: 16px;
    line-height: 1.5;
  }
  /* 语言切换下拉菜单 */
  .lang-dropdown { position: relative; }
  .lang-dropdown-btn {
    background: none; border: none; color: inherit; cursor: pointer;
    font-size: 0.85rem; opacity: 0.8; padding: 2px 6px;
    transition: opacity 0.2s; font-family: inherit;
  }
  .lang-dropdown-btn:hover { opacity: 1; }
  .lang-dropdown-menu {
    display: none; position: absolute; top: 100%; right: 0;
    min-width: 120px; margin-top: 4px; padding: 4px 0;
    background: rgba(42,28,18,0.95); backdrop-filter: blur(12px);
    border: 1px solid rgba(180,120,80,0.3); border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4); z-index: 1000;
  }
  .lang-dropdown-menu.open { display: block; }
  .lang-dropdown-item {
    display: block; padding: 8px 14px; text-decoration: none;
    color: var(--text, #e8d5c0); font-size: 0.85rem; white-space: nowrap;
    transition: background 0.15s;
  }
  .lang-dropdown-item:hover { background: rgba(180,120,80,0.2); }
  .lang-dropdown-item.active {
    color: var(--gold, #d4a855); font-weight: 600;
  }

  /* ---- 联系管理员浮动按钮 ---- */
  .contact-fab {
    position: fixed; top: 12px; right: 16px; z-index: 9000;
  }
  .contact-fab-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(42,28,18,0.85); backdrop-filter: blur(8px);
    border: 1px solid rgba(180,120,80,0.3); border-radius: 50%;
    font-size: 1rem; cursor: pointer; transition: all 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  }
  .contact-fab-btn:hover {
    border-color: var(--gold); transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  }
  .contact-fab-popup {
    display: none; position: absolute; top: 44px; right: 0;
    min-width: 220px; padding: 14px 18px;
    background: rgba(42,28,18,0.95); backdrop-filter: blur(12px);
    border: 1px solid rgba(180,120,80,0.35); border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    text-align: right;
  }
  .contact-fab-title {
    font-size: 0.85rem; color: var(--text-dim); margin-bottom: 8px;
  }
  .contact-fab-item {
    display: flex; align-items: baseline; gap: 8px;
    justify-content: flex-end; margin-bottom: 6px;
  }
  .contact-fab-item:last-child { margin-bottom: 0; }
  .contact-fab-label {
    font-size: 0.8rem; color: var(--text-dim); white-space: nowrap;
  }
  .contact-fab-value {
    font-size: 0.9rem; font-weight: 600;
    color: var(--gold); word-break: break-all;
    text-decoration: none; transition: opacity 0.15s;
  }
  .contact-fab-value:hover { opacity: 0.8; }
  a.contact-fab-value { text-decoration: underline; text-underline-offset: 2px; }
