/* === 书游小筑 Design Tokens === */

@font-face {
  font-family: "RA Source Han Serif SC";
  src: url("../assets/fonts/SourceHanSerifSC-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RA Source Han Sans SC";
  src: url("../assets/fonts/SourceHanSansSC-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RA LXGW WenKai";
  src: url("../assets/fonts/LXGWWenKai-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Light mode palette */
  --bg-primary:         #f8f5f0;
  --bg-secondary:       #ffffff;
  --bg-tertiary:        #eeebe7;
  --bg-elevated:        #ffffff;
  --text-primary:       #2c2c2c;
  --text-secondary:     #6b6b6b;
  --text-muted:         #a0a0a0;
  --accent:             #8b5e3c;
  --accent-hover:       #7a4f30;
  --accent-subtle:      #f0e6de;
  --border:             #e2ddd6;
  --shadow-sm:          0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:          0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:          0 8px 30px rgba(0,0,0,0.12);
  --overlay:            rgba(0,0,0,0.35);
  --success:            #4a7c59;
  --danger:             #b34a4a;
  --warning:            #b88a3c;
  --game-bg:            #bbada0;
  --game-cell:          #cdc1b4;
  --game-text:          #776e65;

  /* Typography */
  --font-ui:            -apple-system, BlinkMacSystemFont, "Segoe UI",
                        "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-reading:       "RA Source Han Serif SC", "Georgia", "Noto Serif SC",
                        "Source Han Serif SC", "SimSun", serif;

  /* Reading settings (adjusted by JS) */
  --reading-font-size:  18px;
  --reading-line-height: 1.85;

  /* Sizing */
  --nav-height:         56px;
  --content-max-w:      960px;
  --reader-max-w:       740px;
  --card-radius:        12px;
  --btn-radius:         8px;

  /* Spacing scale */
  --space-xs:           4px;
  --space-sm:           8px;
  --space-md:           16px;
  --space-lg:           24px;
  --space-xl:           32px;
  --space-2xl:          48px;

  /* Transitions */
  --transition-theme:   250ms ease;
  --transition-hover:   150ms ease;
}

/* Dark mode */
[data-theme="dark"] {
  --bg-primary:         #18181b;
  --bg-secondary:       #212125;
  --bg-tertiary:        #2a2a30;
  --bg-elevated:        #27272b;
  --text-primary:       #e8e8ea;
  --text-secondary:     #a8a8b3;
  --text-muted:         #6b6b78;
  --accent:             #c4966e;
  --accent-hover:       #d4a67e;
  --accent-subtle:      #2d2823;
  --border:             #38383f;
  --shadow-sm:          0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:          0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:          0 8px 30px rgba(0,0,0,0.5);
  --overlay:            rgba(0,0,0,0.65);
  --game-bg:            #5c5348;
  --game-cell:          #6b635b;
  --game-text:          #e8e8ea;
}
