/*! ReadCine shared UI · rc-tokens.css · v20261129 (mobile type floor + tablet type + family presets)
 * Design tokens for every ReadCine site. Dependency-free.
 * Usage: <html data-rc-site="portal|i|ai|organize|movie" [data-default-theme="dark"]>
 *        <link rel="stylesheet" href="https://readcine.com/shared/rc-tokens.css?v=20261113">
 * Theme: rc-theme.js sets <html data-theme="light|dark">. Without JS we follow the OS.
 * Brand: each site only changes the accent (--rc-accent-l / --rc-accent-d presets below,
 *        or override --rc-accent / --rc-accent-soft / --rc-accent-ink directly).
 */
:root {
  /* typography */
  --rc-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --rc-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --rc-fs-xs: 13px; --rc-fs-sm: 14px; --rc-fs-base: 16px; --rc-fs-md: 17px;
  --rc-fs-lg: 20px; --rc-fs-xl: 24px; --rc-fs-2xl: 28px;
  --rc-lh: 1.65; --rc-lh-tight: 1.3;
  --rc-fw-medium: 500; --rc-fw-semibold: 600; --rc-fw-bold: 700;
  --rc-tracking-tight: -.02em;

  /* shape */
  --rc-radius: 14px; --rc-radius-sm: 10px; --rc-radius-lg: 18px; --rc-radius-xs: 6px;
  --rc-pill-radius: 999px;
  --rc-icon-size: 36px; --rc-icon-radius: 9px;
  --rc-touch: 44px;

  /* spacing (4px grid) */
  --rc-space-1: 4px; --rc-space-2: 8px; --rc-space-3: 12px; --rc-space-4: 16px;
  --rc-space-5: 20px; --rc-space-6: 24px; --rc-space-8: 32px; --rc-space-10: 40px; --rc-space-12: 48px;

  /* layout */
  --rc-maxw: 980px; --rc-maxw-narrow: 680px; --rc-topbar-h: 56px;

  /* motion */
  --rc-ease: cubic-bezier(.2, .8, .2, 1); --rc-dur-fast: .12s; --rc-dur: .18s; --rc-dur-slow: .28s;

  /* z-index */
  --rc-z-topbar: 50; --rc-z-toast: 2147483100;

  /* brand defaults (sites override via presets below) */
  --rc-accent-l: #0a66c2; --rc-accent-d: #64a8ff;
  --rc-accent-ink-l: #ffffff; --rc-accent-ink-d: #111111;

  /* status colours */
  --rc-success: #1f9d55; --rc-danger: #d70015; --rc-warning: #b25000; --rc-info: #0a66c2;
}

/* ---- light (default) ---- */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --rc-bg: #f5f5f7;
  --rc-bg-elev: #fbfbfd;
  --rc-surface: #ffffff;
  --rc-surface-2: #f2f2f4;
  --rc-surface-hover: #fafafa;
  --rc-glass: rgba(255, 255, 255, .72);
  --rc-text: #1d1d1f;
  --rc-text-2: #424245;
  --rc-muted: #6e6e73;
  --rc-faint: #86868b;
  --rc-border: #d2d2d7;
  --rc-border-soft: rgba(0, 0, 0, .08);
  --rc-divider: rgba(0, 0, 0, .06);
  --rc-shadow-sm: 0 1px 2px rgba(20, 23, 28, .06);
  --rc-shadow: 0 1px 2px rgba(20, 23, 28, .06), 0 8px 24px rgba(20, 23, 28, .06);
  --rc-shadow-lg: 0 2px 4px rgba(20, 23, 28, .06), 0 14px 36px rgba(20, 23, 28, .10);
  --rc-overlay: rgba(0, 0, 0, .32);
  --rc-accent: var(--rc-accent-l);
  --rc-accent-ink: var(--rc-accent-ink-l);
  --rc-accent-soft: color-mix(in srgb, var(--rc-accent) 12%, transparent);
  --rc-focus: color-mix(in srgb, var(--rc-accent) 55%, #0a84ff);
  --rc-theme-color: #f5f5f7;
}

/* ---- dark ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --rc-bg: #000000; --rc-bg-elev: #0d0d0f; --rc-surface: #1c1c1e; --rc-surface-2: #2c2c2e;
    --rc-surface-hover: #232325; --rc-glass: rgba(28, 28, 30, .72);
    --rc-text: #f5f5f7; --rc-text-2: #d1d1d6; --rc-muted: #98989d; --rc-faint: #8e8e93;
    --rc-border: #38383a; --rc-border-soft: rgba(255, 255, 255, .10); --rc-divider: rgba(255, 255, 255, .08);
    --rc-shadow-sm: none; --rc-shadow: none; --rc-shadow-lg: 0 10px 30px rgba(0, 0, 0, .45);
    --rc-overlay: rgba(0, 0, 0, .55);
    --rc-accent: var(--rc-accent-d); --rc-accent-ink: var(--rc-accent-ink-d);
    --rc-accent-soft: color-mix(in srgb, var(--rc-accent) 18%, transparent);
    --rc-success: #30d158; --rc-danger: #ff453a; --rc-warning: #ff9f0a; --rc-info: #64a8ff;
    --rc-theme-color: #000000;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --rc-bg: #000000; --rc-bg-elev: #0d0d0f; --rc-surface: #1c1c1e; --rc-surface-2: #2c2c2e;
  --rc-surface-hover: #232325; --rc-glass: rgba(28, 28, 30, .72);
  --rc-text: #f5f5f7; --rc-text-2: #d1d1d6; --rc-muted: #98989d; --rc-faint: #8e8e93;
  --rc-border: #38383a; --rc-border-soft: rgba(255, 255, 255, .10); --rc-divider: rgba(255, 255, 255, .08);
  --rc-shadow-sm: none; --rc-shadow: none; --rc-shadow-lg: 0 10px 30px rgba(0, 0, 0, .45);
  --rc-overlay: rgba(0, 0, 0, .55);
  --rc-accent: var(--rc-accent-d); --rc-accent-ink: var(--rc-accent-ink-d);
  --rc-accent-soft: color-mix(in srgb, var(--rc-accent) 18%, transparent);
  --rc-success: #30d158; --rc-danger: #ff453a; --rc-warning: #ff9f0a; --rc-info: #64a8ff;
  --rc-theme-color: #000000;
}

/* ---- per-site brand presets (accent only; surfaces stay neutral) ---- */
:root[data-rc-site="portal"]   { --rc-accent-l: #854d0e; --rc-accent-d: #eab308; --rc-accent-ink-l: #ffffff; --rc-accent-ink-d: #1d1d1f; }
:root[data-rc-site="i"]        { --rc-accent-l: #c8722c; --rc-accent-d: #fb923c; --rc-accent-ink-l: #ffffff; --rc-accent-ink-d: #1d1d1f; }
:root[data-rc-site="ai"]       { --rc-accent-l: #262626; --rc-accent-d: #e5e5e5; --rc-accent-ink-l: #ffffff; --rc-accent-ink-d: #0a0a0a; }
:root[data-rc-site="organize"] { --rc-accent-l: #475569; --rc-accent-d: #94a3b8; --rc-accent-ink-l: #ffffff; --rc-accent-ink-d: #0f172a; }
:root[data-rc-site="blog"]     { --rc-accent-l: #0071e3; --rc-accent-d: #0a84ff; --rc-accent-ink-l: #ffffff; --rc-accent-ink-d: #ffffff; }
:root[data-rc-site="news"]     { --rc-accent-l: #9f1239; --rc-accent-d: #fb7185; --rc-accent-ink-l: #ffffff; --rc-accent-ink-d: #1a0509; }
:root[data-rc-site="movie"]    { --rc-accent-l: #a31d3a; --rc-accent-d: #fb7185; --rc-accent-ink-l: #ffffff; --rc-accent-ink-d: #1a0509; }
/* movie keeps a warm burgundy-tinted dark surface so its identity survives the neutral base */
:root[data-rc-site="movie"][data-theme="dark"] { --rc-bg: #0d0a0b; --rc-bg-elev: #141012; --rc-surface: #1a1416; --rc-surface-2: #251c1f; --rc-surface-hover: #211a1c; --rc-border: #3a2c30; --rc-theme-color: #0d0a0b; }

/* ---- base (opt-in, low specificity so site CSS always wins) ---- */
:where(html) { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
:where(body.rc-base) {
  margin: 0; background: var(--rc-bg); color: var(--rc-text);
  font-family: var(--rc-font); font-size: var(--rc-fs-base); line-height: var(--rc-lh);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
:where(.rc-base) *, :where(.rc-base) *::before, :where(.rc-base) *::after { box-sizing: border-box; }
:where(.rc-base) :focus-visible { outline: 2px solid var(--rc-focus); outline-offset: 2px; }

/* ---- iPad / tablet typography (2026-11-27, 第二档；数值保持不降) ----
 * 700–1200px，或 min-width 700px 且 pointer:coarse：正文 18px、说明 16px、meta 14px。
 * 手机默认在 :root（2026-11-29）：正文 16px、说明 14px、meta 13px。 */
@media (min-width: 700px) and (max-width: 1200px), (min-width: 700px) and (pointer: coarse) {
  :root {
    --rc-fs-xs: 14px; --rc-fs-sm: 16px; --rc-fs-base: 18px; --rc-fs-md: 19px;
    --rc-fs-lg: 22px; --rc-fs-xl: 26px;
    --rc-lh: 1.65;
  }
}
