@import url("https://cdn.jsdelivr.net/gh/eterfinal/ReiFonts/HuiwenMinchoGBK/result.css");
@import url("https://cdn.jsdmirror.com/gh/eterfinal/ReiFonts/HuiwenMinchoGBK/result.css");

/* ==========================================================
   FMRG Theme: SSDA — Seloi Sanctum of Divine Adjudication
   瑟鲁瓦审判圣庭
   "Judgment Beyond Flesh."

   Usage: add class="theme-ssda" to .page
   ========================================================== */

.theme-ssda{
  --font:         "Huiwen-MinchoGBK","HuiwenMinchoGBK","Huiwen Mincho GBK","HuiwenMincho","Noto Serif SC","Source Han Serif SC",serif;
  --sans:         "Huiwen-MinchoGBK","HuiwenMinchoGBK","Huiwen Mincho GBK","HuiwenMincho","PingFang SC","Microsoft YaHei",sans-serif;

  /* — Color System (solemn, muted crimson/burgundy) — */
  --ink:          #100e0c;
  --muted:        #706458;
  --line:         #30261e;
  --thin:         rgba(48,38,30,.20);
  --bg:           #fdfcfa;
  --accent:       #6e3230;          /* deep burgundy, very low saturation */
  --accent-light: rgba(110,50,48,.07);
  --accent-mid:   rgba(110,50,48,.20);

  /* — Borders — */
  --b1: 1px solid var(--line);
  --b0: 1px solid var(--thin);

  /* — Letterhead — */
  --lh-h:       128px;
  --lh-logo-h:  74px;
  --lh-pad-x:   22px;
  --lh-gap:     12px;

  /* — Paper Texture — */
  --paper-warm:    rgba(180,150,100,.028);   /* warm parchment tint */
  --paper-speckle: .022;                     /* speckle intensity */
  --halo-opacity:  .025;                     /* radial halo intensity */

  /* — Watermark — */
  --wm-opacity:      .040;
  --wm-color:        var(--ink);
  --wm-rotate:       0deg;          /* centered, solemn — no tilt */
  --wm-letterspace:  .40em;

  /* — Stamp — */
  --stamp-size:      128px;
  --stamp-ink:       var(--accent);
  --stamp-opacity:   .11;
  --stamp-rotate:    -8deg;
  --stamp-x:         0px;
  --stamp-y:         0px;

  /* — Footer Banner — */
  --fb-bg:       rgba(110,50,48,.04);
  --fb-border:   rgba(110,50,48,.16);
}


/* ==========================================================
   LETTERHEAD — override for divine radial glow
   ========================================================== */
.page.theme-ssda .letterhead{
  background:
    radial-gradient(ellipse at 30% 50%, rgba(180,150,100,.04), transparent 70%),
    linear-gradient(to bottom, rgba(0,0,0,.025), transparent 80%);
  border-bottom: 2.5px solid var(--line);
}


/* ==========================================================
   PAPER TEXTURE — Parchment + Radial Halo + Speckle
   ========================================================== */
.page.theme-ssda::before{
  content:"";
  position:absolute; inset:0;
  z-index:0;
  pointer-events:none;
  background:
    /* L1 — warm parchment base wash */
    radial-gradient(
      ellipse at 50% 40%,
      var(--paper-warm),
      transparent 75%
    ),
    /* L2 — parchment speckle (subtle mottling) */
    radial-gradient(
      rgba(120,90,50,var(--paper-speckle)) .9px,
      transparent .9px
    ),
    radial-gradient(
      rgba(80,60,30,var(--paper-speckle)) .6px,
      transparent .6px
    ),
    /* L3 — radial halo (divine light, centered) */
    radial-gradient(
      ellipse at 50% 45%,
      rgba(180,150,100,var(--halo-opacity)),
      rgba(180,150,100,0) 55%
    );
  background-size:
    100% 100%,       /* parchment wash */
    5px 5px,          /* speckle large */
    3px 3px,          /* speckle fine */
    100% 100%;        /* halo */
}


/* ==========================================================
   DECORATIVE BORDER & CORNER MARKS (codex / scripture feel)
   Double-line inner border + corner ornaments
   ========================================================== */
.page.theme-ssda::after{
  content:"";
  position:absolute;
  inset: 6px;
  z-index:0;
  pointer-events:none;
  border: 1.5px solid rgba(110,50,48,.08);
  outline: 1px solid rgba(110,50,48,.04);
  outline-offset: 4px;
  /* corner marks via gradients */
  background:
    /* top-left L */
    linear-gradient(rgba(110,50,48,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,50,48,.10) 1px, transparent 1px),
    /* top-right L */
    linear-gradient(rgba(110,50,48,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,50,48,.10) 1px, transparent 1px),
    /* bottom-left L */
    linear-gradient(rgba(110,50,48,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,50,48,.10) 1px, transparent 1px),
    /* bottom-right L */
    linear-gradient(rgba(110,50,48,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,50,48,.10) 1px, transparent 1px);
  background-size:
    24px 1px, 1px 24px,
    24px 1px, 1px 24px,
    24px 1px, 1px 24px,
    24px 1px, 1px 24px;
  background-position:
    0 0, 0 0,
    100% 0, 100% 0,
    0 100%, 0 100%,
    100% 100%, 100% 100%;
  background-repeat: no-repeat;
}


/* ==========================================================
   WATERMARK — centered, solemn, no tilt by default
   ========================================================== */
.page.theme-ssda .watermark .wm-text{
  transform: rotate(var(--wm-rotate));
  letter-spacing: var(--wm-letterspace);
  font-size: 64px;
}


/* ==========================================================
   STAMP — adjudication seal style
   ========================================================== */
.page.theme-ssda .stamp{
  transform: rotate(var(--stamp-rotate));
  border-color: rgba(110,50,48,.35);
}


/* ==========================================================
   CHIP — burgundy accent
   ========================================================== */
.page.theme-ssda .chip{
  border-color: var(--accent-mid);
  color: var(--accent);
  background: var(--accent-light);
}


/* ==========================================================
   PRINT OVERRIDES (SSDA-specific)
   ========================================================== */
@media print{
  .page.theme-ssda::before{
    opacity: .30;
  }
  .page.theme-ssda::after{
    opacity: .20;
  }
}
