/* =========================================================
   KAMUI / 神威 — crimson void archive
   A standalone editorial-anime interface: black glass,
   crimson rails, serif display type and floating ruins.
   ========================================================= */

html[data-theme="kamui"] {
  color-scheme: dark;
  --canvas: #040206;
  --canvas-deep: #0a0510;
  --paper: #0b0710;
  --paper-warm: #120a17;
  --paper-deep: #06030a;
  --ink: #f3edf0;
  --ink-soft: #d7c9d2;
  --muted: #a897a4;
  --faint: #746574;
  --line: rgba(211, 35, 53, .28);
  --line-strong: rgba(240, 78, 92, .52);
  --accent: #d32335;
  --accent-deep: #ff5968;
  --accent-soft: rgba(211, 35, 53, .1);
  --psi: #d9a7e7;
  --psi-soft: rgba(217, 167, 231, .08);
  --gold: #d32335;
  --danger: #e2636f;
  --shadow-sm: 0 0 0 1px rgba(211, 35, 53, .04), 0 12px 28px -20px #000;
  --shadow-md: 0 0 0 1px rgba(211, 35, 53, .06), 0 26px 58px -30px #000;
  --shadow-lg: 0 0 0 1px rgba(211, 35, 53, .08), 0 40px 90px -40px #000;
  --serif: "Songti SC", "STSong", "SimSun", "Cinzel", serif;
  --sans: "Outfit", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --radius: 0;
  background: #040206;
}

html[data-theme="kamui"] body {
  color: var(--ink);
  background:
    radial-gradient(1100px 760px at 78% 0%, rgba(104, 30, 72, .24), transparent 64%),
    radial-gradient(760px 640px at 4% 60%, rgba(72, 20, 60, .12), transparent 64%),
    radial-gradient(900px 700px at 50% 112%, rgba(102, 12, 31, .15), transparent 68%),
    linear-gradient(155deg, #030104, #0b0511 48%, #030104);
}
html[data-theme="kamui"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .6;
  background:
    radial-gradient(circle, rgba(255, 184, 193, .6) .6px, transparent 1.1px) 0 0 / 250px 210px,
    radial-gradient(circle, rgba(203, 153, 219, .5) .5px, transparent 1px) 90px 70px / 360px 300px,
    linear-gradient(112deg, transparent 49.7%, rgba(186, 45, 75, .045) 50%, transparent 50.3%) 0 0 / 150px 150px;
}
html[data-theme="kamui"] body::after {
  content: "";
  position: fixed;
  top: -280px;
  right: -240px;
  z-index: 0;
  width: 820px;
  height: 820px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132, 22, 51, .18), rgba(57, 9, 34, .07) 46%, transparent 68%);
  box-shadow: 0 0 0 1px rgba(211, 35, 53, .1), inset 0 0 100px rgba(218, 35, 57, .06);
}
html[data-theme="kamui"] .app-shell { position: relative; z-index: 1; }
html[data-theme="kamui"] ::selection { color: #fff; background: #b3172e; }
html[data-theme="kamui"] :focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 4px; }
html[data-theme="kamui"] .skip-link { color: #fff; background: var(--accent); }

/* ---------- archive header ---------- */

html[data-theme="kamui"] .site-header {
  position: relative;
  min-height: 96px;
  border-bottom: 1px solid rgba(211, 35, 53, .25);
  background: linear-gradient(180deg, rgba(4, 2, 7, .94), rgba(8, 4, 12, .74));
}
html[data-theme="kamui"] .site-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d32335 25%, #ff4d5d 50%, #d32335 75%, transparent);
  opacity: .8;
}
html[data-theme="kamui"] .brand { gap: 12px; }
html[data-theme="kamui"] .brand-mark {
  width: 43px;
  height: 43px;
  color: #f7eef0;
  background:
    radial-gradient(circle at center, #08040a 0 30%, transparent 31%),
    conic-gradient(from 45deg, #d32335, #731021, #ff4355, #7b1022, #d32335);
  border: 1px solid rgba(255, 88, 102, .6);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(211, 35, 53, .08), 0 0 24px rgba(211, 35, 53, .24);
}
html[data-theme="kamui"] .brand:hover .brand-mark { transform: rotate(-8deg); }
html[data-theme="kamui"] .brand-name {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 500;
  color: #f6edf0;
  letter-spacing: .22em;
  text-transform: uppercase;
}
html[data-theme="kamui"] .brand-sub {
  font-family: var(--sans);
  font-size: 8px;
  color: #d32335;
  letter-spacing: .32em;
  text-transform: uppercase;
}
html[data-theme="kamui"] .main-nav { gap: 2px; padding: 4px 0; background: transparent; border: 0; border-radius: 0; }
html[data-theme="kamui"] .nav-link {
  position: relative;
  min-height: 40px;
  padding: 0 19px;
  color: #a897a4;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .11em;
}
html[data-theme="kamui"] .nav-link:hover { color: #f3edf0; background: rgba(211, 35, 53, .07); }
html[data-theme="kamui"] .nav-link.is-active,
html[data-theme="kamui"] .nav-link.is-active:hover {
  color: #fff;
  background: transparent;
  border: 0;
  box-shadow: none;
}
html[data-theme="kamui"] .nav-link.is-active::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 1px;
  left: 16px;
  height: 2px;
  background: #d32335;
  box-shadow: 0 0 12px rgba(211, 35, 53, .7);
}
html[data-theme="kamui"] .nav-link[href="#/me"] {
  margin-left: 5px;
  color: #fff;
  background: #b7182e;
  border: 1px solid #e04455;
}
html[data-theme="kamui"] .nav-link[href="#/me"]:hover { background: #d32335; }
html[data-theme="kamui"] .nav-link[href="#/me"]::after { display: none; }
html[data-theme="kamui"] .avatar-nav {
  color: #fff;
  background: rgba(4, 2, 7, .55);
  border-color: rgba(255, 255, 255, .35);
  border-radius: 50%;
  box-shadow: none;
}
html[data-theme="kamui"] .solar-hud,
html[data-theme="kamui"] .aiur-resources { display: none; }
html[data-theme="kamui"] .header-note {
  color: #746574;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .08em;
}
html[data-theme="kamui"] .header-note::before {
  border-radius: 50%;
  background: #d32335;
  box-shadow: 0 0 0 3px rgba(211, 35, 53, .1), 0 0 8px #d32335;
}

/* ---------- type / buttons ---------- */

html[data-theme="kamui"] .eyebrow {
  font-family: var(--sans);
  color: #d32335;
  font-size: 8px;
  letter-spacing: .24em;
  text-transform: uppercase;
}
html[data-theme="kamui"] .eyebrow::before { background: #d32335; box-shadow: 0 0 8px rgba(211, 35, 53, .4); }
html[data-theme="kamui"] .btn,
html[data-theme="kamui"] .btn-accent {
  min-height: 42px;
  padding: 0 23px;
  color: #fff;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .14em;
  background: #c51d32;
  border: 1px solid #e34c5b;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 0 20px rgba(211, 35, 53, .1);
  text-transform: uppercase;
}
html[data-theme="kamui"] .btn:hover,
html[data-theme="kamui"] .btn-accent:hover {
  color: #fff;
  background: #e02a3e;
  border-color: #ff7b86;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 0 26px rgba(211, 35, 53, .2);
}
html[data-theme="kamui"] .btn-quiet {
  color: #e6dce1;
  background: transparent;
  border: 1px solid #493440;
  border-radius: 0;
  box-shadow: none;
}
html[data-theme="kamui"] .btn-quiet:hover { color: #fff; background: rgba(211, 35, 53, .08); border-color: #a72a3d; }

/* ---------- home / kamui eye ---------- */

html[data-theme="kamui"] .home-hero {
  position: relative;
  border-bottom: 1px solid rgba(211, 35, 53, .18);
  background:
    radial-gradient(820px 520px at 82% 30%, rgba(113, 25, 70, .16), transparent 65%),
    linear-gradient(180deg, rgba(8, 4, 12, .2), transparent);
}
html[data-theme="kamui"] .home-hero::before {
  content: "神威";
  position: absolute;
  top: 4%;
  right: 29%;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(160px, 22vw, 310px);
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(211, 35, 53, .12);
  transform: rotate(90deg);
  pointer-events: none;
}
html[data-theme="kamui"] .home-hero::after {
  content: "";
  position: absolute;
  top: 12%;
  right: 33%;
  bottom: 14%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(211, 35, 53, .35), transparent);
}
html[data-theme="kamui"] .home-eyebrow {
  font-family: var(--sans);
  color: #d32335;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
html[data-theme="kamui"] .home-eyebrow::before { width: 28px; height: 1px; background: #d32335; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .hero-title {
  color: #f4eef1;
  font-family: var(--serif);
  font-size: clamp(46px, 5.1vw, 70px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .015em;
  text-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}
html[data-theme="kamui"] .hero-title em {
  color: #e22a3f;
  background: none;
  -webkit-text-fill-color: #e22a3f;
  text-shadow: 0 0 34px rgba(211, 35, 53, .2);
}
html[data-theme="kamui"] .hero-lede { color: #bfaeb9; }
html[data-theme="kamui"] .hero-tip { color: #746574; }
html[data-theme="kamui"] .hero-tip svg { color: #d32335; }
html[data-theme="kamui"] .hero-stat {
  background: rgba(13, 7, 17, .72);
  border: 1px solid rgba(211, 35, 53, .2);
  border-radius: 0;
  box-shadow: none;
}
html[data-theme="kamui"] .hero-stat strong { font-family: var(--serif); color: #f0e8ec; font-size: 27px; }
html[data-theme="kamui"] .hero-stat span { color: #746574; }
html[data-theme="kamui"] .hero-stat + .hero-stat { border-left: 1px solid rgba(211, 35, 53, .18); }

html[data-theme="kamui"] .kamui-hero-art {
  position: relative;
  width: 100%;
  max-width: 535px;
  height: 590px;
  margin-left: auto;
}
html[data-theme="kamui"] .kamui-visual {
  position: absolute;
  inset: 0 0 52px;
  overflow: hidden;
  background: #050208;
  border: 1px solid rgba(211, 35, 53, .55);
  box-shadow: 0 0 0 5px rgba(4, 2, 7, .95), 0 0 0 6px rgba(211, 35, 53, .18), 0 30px 70px -36px #000;
}
html[data-theme="kamui"] .kamui-visual::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 3;
  border: 1px solid rgba(255, 111, 124, .22);
  pointer-events: none;
}
html[data-theme="kamui"] .kamui-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% center;
  filter: saturate(1.12) contrast(1.05);
}
html[data-theme="kamui"] .kamui-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(3, 1, 5, .5), transparent 35%, rgba(3, 1, 5, .92)),
    linear-gradient(90deg, rgba(3, 1, 5, .55), transparent 52%);
}
html[data-theme="kamui"] .kamui-visual-head {
  position: absolute;
  top: 21px;
  right: 21px;
  left: 21px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: .22em;
  color: #ff6977;
  text-transform: uppercase;
}
html[data-theme="kamui"] .kamui-visual-title {
  position: absolute;
  bottom: 21px;
  left: 22px;
  z-index: 4;
  display: flex;
  flex-direction: column;
}
html[data-theme="kamui"] .kamui-visual-title small { font-family: var(--sans); font-size: 7px; letter-spacing: .2em; color: #ff6876; }
html[data-theme="kamui"] .kamui-visual-title strong {
  margin: 4px 0 2px;
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 30px rgba(211, 35, 53, .3);
}
html[data-theme="kamui"] .kamui-visual-title span { font-family: var(--sans); font-size: 7.5px; letter-spacing: .12em; color: #9e8a97; }
html[data-theme="kamui"] .kamui-readouts {
  position: absolute;
  right: 22px;
  bottom: 25px;
  z-index: 4;
  display: flex;
  gap: 14px;
  text-align: right;
}
html[data-theme="kamui"] .kamui-readouts span { display: flex; flex-direction: column; gap: 1px; }
html[data-theme="kamui"] .kamui-readouts small { font-family: var(--sans); font-size: 5.5px; letter-spacing: .14em; color: #9e8a97; }
html[data-theme="kamui"] .kamui-readouts b { font-family: var(--serif); font-size: 18px; color: #f4eef1; }
html[data-theme="kamui"] .kamui-focus {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  z-index: 5;
  display: flex;
  gap: 13px;
  align-items: center;
  min-height: 84px;
  padding: 12px 15px;
  color: #efe4e9;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(90deg, rgba(13, 7, 17, .98), rgba(7, 3, 10, .98));
  border: 1px solid rgba(211, 35, 53, .48);
  box-shadow: 0 0 0 4px rgba(4, 2, 7, .92), 0 16px 30px -18px #000;
}
html[data-theme="kamui"] .kamui-focus:hover { border-color: #f05465; background: linear-gradient(90deg, rgba(30, 9, 20, .98), rgba(10, 4, 13, .98)); }
html[data-theme="kamui"] .kamui-focus-mark {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffdce1;
  background: radial-gradient(circle, #360a18, #0a0410 68%);
  border: 1px solid #d32335;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(211, 35, 53, .22);
}
html[data-theme="kamui"] .kamui-focus-mark svg { width: 14px; height: 14px; }
html[data-theme="kamui"] .kamui-focus-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html[data-theme="kamui"] .kamui-focus-copy small { font-family: var(--sans); font-size: 6px; letter-spacing: .18em; color: #e22a3f; }
html[data-theme="kamui"] .kamui-focus-copy strong { overflow: hidden; font-family: var(--serif); font-size: 13px; font-weight: 500; color: #fbf5f7; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="kamui"] .kamui-focus-copy span { font-family: var(--sans); font-size: 7px; color: #746574; }
html[data-theme="kamui"] .kamui-focus-arrow { display: grid; width: 30px; height: 30px; margin-left: auto; place-items: center; color: #d32335; border: 1px solid rgba(211, 35, 53, .35); border-radius: 50%; }
html[data-theme="kamui"] .kamui-focus-arrow svg { width: 12px; height: 12px; }

/* ---------- archive cards ---------- */

html[data-theme="kamui"] .collections,
html[data-theme="kamui"] .public-library { border-top-color: rgba(211, 35, 53, .16); }
html[data-theme="kamui"] .section-title { font-family: var(--serif); color: #f3edf0; font-weight: 600; letter-spacing: .04em; }
html[data-theme="kamui"] .section-title .count { color: #e22a3f; background: transparent; border: 1px solid rgba(211, 35, 53, .35); border-radius: 0; }
html[data-theme="kamui"] .list-card {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .025), transparent 44%),
    linear-gradient(150deg, #100913, #07030b 72%);
  border: 1px solid #2e1f2c;
  border-top: 1px solid rgba(211, 35, 53, .55);
  border-radius: 0;
  box-shadow: none;
}
html[data-theme="kamui"] .list-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 62px;
  height: 1px;
  background: #e22a3f;
  box-shadow: 0 0 12px rgba(211, 35, 53, .4);
}
html[data-theme="kamui"] .list-card::after {
  background: radial-gradient(circle at 86% 100%, rgba(211, 35, 53, .08), transparent 42%);
  opacity: .7;
}
html[data-theme="kamui"] .list-card:hover,
html[data-theme="kamui"] .list-card:focus-within { border-color: #4b2638; border-top-color: #e22a3f; box-shadow: 0 0 24px rgba(211, 35, 53, .06); }
html[data-theme="kamui"] .card-number { font-family: var(--sans); color: #e22a3f; font-size: 8px; letter-spacing: .16em; }
html[data-theme="kamui"] .card-count { color: #d9c9d2; background: transparent; border: 1px solid #3c2736; border-radius: 0; }
html[data-theme="kamui"] .card-title { font-family: var(--serif); color: #f4eef1; font-weight: 500; }
html[data-theme="kamui"] .card-meta { color: #8f7d8a; }
html[data-theme="kamui"] .card-meta::before { background: #d32335; }
html[data-theme="kamui"] .card-open { color: #e22a3f; font-family: var(--sans); letter-spacing: .12em; }
html[data-theme="kamui"] .card-word-dots i { background: #8d1d30; }
html[data-theme="kamui"] .card-delete { color: #746574; background: #08040b; border-color: #352130; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .card-delete:hover { color: #ff7f89; background: #261019; }
html[data-theme="kamui"] .card-add { color: #a897a4; background: rgba(9, 4, 13, .4); border: 1px dashed #4b2739; border-radius: 0; }
html[data-theme="kamui"] .card-add:hover { color: #f3edf0; border-color: #d32335; background: rgba(211, 35, 53, .05); }
html[data-theme="kamui"] .card-add .add-ring { color: #e22a3f; background: #0b0610; border: 1px solid #4a2839; border-radius: 50%; box-shadow: none; }
html[data-theme="kamui"] .card-add:hover .add-ring { color: #fff; background: #b7182e; border-color: #d32335; }
html[data-theme="kamui"] .card-add strong { color: #d7c9d2; font-family: var(--serif); font-weight: 500; }
html[data-theme="kamui"] .card-add span:last-child { color: #746574; }
html[data-theme="kamui"] .empty-collections { background: rgba(9, 4, 13, .42); border: 1px dashed #3b2433; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .empty-glyph { color: #e22a3f; background: #0b0610; border: 1px solid #3b2433; border-radius: 50%; box-shadow: none; }
html[data-theme="kamui"] .empty-collections h3 { font-family: var(--serif); color: #f3edf0; font-weight: 500; }
html[data-theme="kamui"] .empty-collections p { color: #a897a4; }
html[data-theme="kamui"] .public-library-note { color: #746574; }
html[data-theme="kamui"] .public-library-note svg { color: #d32335; }
html[data-theme="kamui"] .public-card-desc { color: #a897a4; }
html[data-theme="kamui"] .public-card-source { color: #746574; }
html[data-theme="kamui"] .public-card-source svg { color: #d32335; }
html[data-theme="kamui"] .public-card-stamp { color: #746574; font-family: var(--sans); }
html[data-theme="kamui"] .public-empty { background: rgba(9, 4, 13, .42); border-color: #3b2433; border-radius: 0; }
html[data-theme="kamui"] .public-empty-mark { color: #e22a3f; background: rgba(211, 35, 53, .08); border-radius: 0; }
html[data-theme="kamui"] .public-empty strong { color: #d7c9d2; font-family: var(--serif); font-weight: 500; }
html[data-theme="kamui"] .public-empty span { color: #a897a4; }

/* ---------- archive cover ---------- */

html[data-theme="kamui"] .cover-frame {
  background: #040206;
  border: 1px solid #3b1b2a;
  border-radius: 0;
  box-shadow: 0 0 0 4px rgba(4, 2, 7, .96), 0 0 0 5px rgba(211, 35, 53, .16), 0 35px 80px -40px #000;
}
html[data-theme="kamui"] .cover-frame::before {
  content: "";
  position: absolute;
  inset: 13px;
  z-index: 3;
  border: 1px solid rgba(210, 48, 64, .22);
  pointer-events: none;
}
html[data-theme="kamui"] .cover-photo { object-position: 62% center; filter: saturate(1.1) contrast(1.05); }
html[data-theme="kamui"] .cover-shade {
  background:
    linear-gradient(90deg, rgba(3, 1, 5, .88), transparent 48%, rgba(3, 1, 5, .24)),
    linear-gradient(180deg, rgba(3, 1, 5, .12), transparent 48%, rgba(3, 1, 5, .9));
}
html[data-theme="kamui"] .cover-content {
  background: linear-gradient(135deg, rgba(14, 7, 17, .96), rgba(4, 2, 7, .95));
  border: 1px solid #3c1f2e;
  border-left: 2px solid #d32335;
  border-radius: 0;
  box-shadow: 0 30px 60px -28px #000;
  backdrop-filter: blur(22px);
}
html[data-theme="kamui"] .cover-id { color: #e22a3f; font-family: var(--sans); letter-spacing: .2em; }
html[data-theme="kamui"] .avatar-cover { color: #fff; background: radial-gradient(circle, #1f0914, #08030b 70%); border-color: #d32335; border-radius: 50%; box-shadow: 0 0 14px rgba(211, 35, 53, .2); }
html[data-theme="kamui"] .cover-name { font-family: var(--serif); font-weight: 700; color: #f7f0f3; letter-spacing: .02em; text-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
html[data-theme="kamui"] .cover-tagline { color: #bfaeb9; }
html[data-theme="kamui"] .cover-enter { color: #fff; background: #c51d32; border-color: #e34c5b; border-radius: 0; }
html[data-theme="kamui"] .cover-enter:hover { background: #e22a3f; border-color: #ff7b86; }
html[data-theme="kamui"] .cover-edit { color: #a897a4; border-bottom-color: #4a2839; }
html[data-theme="kamui"] .cover-edit:hover { color: #ff6e7b; border-bottom-color: #d32335; }
html[data-theme="kamui"] .cover-edition,
html[data-theme="kamui"] .cover-change {
  font-family: var(--sans);
  color: #e6d9df;
  background: rgba(4, 2, 7, .78);
  border-color: #4b2939;
  border-radius: 0;
  box-shadow: none;
}
html[data-theme="kamui"] .cover-change:hover { color: #fff; background: #1a0b15; }
html[data-theme="kamui"] .cover-bottom {
  color: #a897a4;
  background: rgba(4, 2, 7, .82);
  border: 1px solid #3b2433;
  border-radius: 0;
  box-shadow: none;
}
html[data-theme="kamui"] .cover-counts strong { color: #f0e6ea; font-family: var(--serif); }
html[data-theme="kamui"] .cover-counts i { background: #4b2939; }
html[data-theme="kamui"] .cover-page { color: #746574; font-family: var(--sans); }
html[data-theme="kamui"] .cover-vertical { color: rgba(211, 35, 53, .15); }

/* ---------- profile ---------- */

html[data-theme="kamui"] .profile-hero {
  background:
    radial-gradient(70% 140% at 100% 0%, rgba(211, 35, 53, .1), transparent 55%),
    linear-gradient(145deg, #120a18, #07030b);
  border: 1px solid #392230;
  border-left: 2px solid #b7182e;
  border-radius: 0;
  box-shadow: var(--shadow-lg);
}
html[data-theme="kamui"] .profile-hero::before { background: radial-gradient(circle at 32% 34%, rgba(211, 35, 53, .08), transparent 55%); }
html[data-theme="kamui"] .profile-hero::after { background: radial-gradient(circle at center, rgba(211, 35, 53, .05), transparent 65%); }
html[data-theme="kamui"] .avatar-profile { color: #fff; background: radial-gradient(circle at 42% 35%, #631126, #13060d 72%); border-color: #d32335; border-radius: 50%; box-shadow: 0 0 0 2px rgba(211, 35, 53, .12), 0 16px 30px -18px #000; }
html[data-theme="kamui"] .avatar-camera { color: #fff; background: #b7182e; border-color: #08030b; border-radius: 50%; }
html[data-theme="kamui"] .profile-identity h1 { font-family: var(--serif); font-weight: 700; color: #f7f0f3; letter-spacing: .03em; }
html[data-theme="kamui"] .profile-identity > p { color: #a897a4; }
html[data-theme="kamui"] .profile-local { color: #746574; }
html[data-theme="kamui"] .profile-local svg { color: #d32335; }
html[data-theme="kamui"] .profile-stat { background: rgba(9, 4, 13, .72); border: 1px solid #3a2432; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .profile-stat strong { font-family: var(--serif); color: #f1e8ec; }
html[data-theme="kamui"] .profile-stat span { color: #746574; }
html[data-theme="kamui"] .profile-card {
  background: linear-gradient(145deg, #100913, #07030b);
  border: 1px solid #34212e;
  border-top: 1px solid #642237;
  border-radius: 0;
  box-shadow: var(--shadow-md);
}
html[data-theme="kamui"] .profile-card-head { border-bottom-color: #31202d; }
html[data-theme="kamui"] .profile-card-no { font-family: var(--sans); color: #e22a3f; letter-spacing: .12em; }
html[data-theme="kamui"] .profile-card-head h2 { font-family: var(--serif); color: #f3edf0; font-weight: 500; }
html[data-theme="kamui"] .profile-card-head p { color: #746574; }
html[data-theme="kamui"] .text-input { color: #f3edf0; background: rgba(4, 2, 7, .78); border: 1px solid #352130; border-radius: 0; box-shadow: inset 0 0 16px rgba(0, 0, 0, .3); }
html[data-theme="kamui"] .text-input::placeholder { color: #746574; }
html[data-theme="kamui"] .text-input:focus { background: #0b0610; border-color: #a72a3d; box-shadow: 0 0 0 3px rgba(211, 35, 53, .07); }
html[data-theme="kamui"] .field-hint { color: #746574; }
html[data-theme="kamui"] .profile-save-row { border-top-color: #31202d; color: #746574; }
html[data-theme="kamui"] .profile-save-row svg { color: #d32335; }
html[data-theme="kamui"] .avatar-preview .avatar { color: #fff; background: radial-gradient(circle at 42% 35%, #631126, #13060d 72%); border-color: #d32335; border-radius: 50%; }
html[data-theme="kamui"] .media-copy h3 { font-family: var(--serif); color: #f3edf0; font-weight: 500; }
html[data-theme="kamui"] .media-copy p { color: #a897a4; }
html[data-theme="kamui"] .text-button { color: #746574; }
html[data-theme="kamui"] .text-button:hover { color: #ff6d7a; border-bottom-color: #642237; }
html[data-theme="kamui"] .media-divider { background: #31202d; }
html[data-theme="kamui"] .cover-thumb { border-color: #4b2939; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .profile-note { border-top-color: #31202d; color: #746574; }
html[data-theme="kamui"] .profile-note svg { color: #d32335; }
html[data-theme="kamui"] .theme-card {
  background: linear-gradient(145deg, #100913, #07030b);
  border-color: #34212e;
  border-top-color: #642237;
  border-radius: 0;
  box-shadow: var(--shadow-md);
}
html[data-theme="kamui"] .theme-mark { color: #e22a3f; background: rgba(211, 35, 53, .07); border-color: #3c2736; border-radius: 50%; }
html[data-theme="kamui"] .theme-setting-copy h2 { font-family: var(--serif); color: #f3edf0; font-weight: 500; }
html[data-theme="kamui"] .theme-setting-copy > p:last-child { color: #a897a4; }
html[data-theme="kamui"] .theme-setting-copy strong { color: #e22a3f; }

/* ---------- word archive ---------- */

html[data-theme="kamui"] .back-link { color: #a897a4; }
html[data-theme="kamui"] .back-link svg { color: #d32335; }
html[data-theme="kamui"] .topbar-note { color: #746574; }
html[data-theme="kamui"] .topbar-note svg { color: #d32335; }
html[data-theme="kamui"] .list-title { font-family: var(--serif); color: #f7f0f3; font-weight: 700; letter-spacing: .02em; }
html[data-theme="kamui"] .list-sub { color: #a897a4; }
html[data-theme="kamui"] .list-sub kbd { color: #f0e6ea; background: rgba(211, 35, 53, .08); border-color: #4a2839; border-radius: 0; }
html[data-theme="kamui"] .list-stat { background: rgba(9, 4, 13, .72); border: 1px solid #3a2432; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .list-stat strong { font-family: var(--serif); color: #f1e8ec; }
html[data-theme="kamui"] .list-stat span { color: #746574; }
html[data-theme="kamui"] .workspace-toolbar { background: linear-gradient(100deg, #110914, #07030b); border: 1px solid #3b2433; border-top: 1px solid #8f2035; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .toolbar-left .btn-quiet { background: rgba(9, 4, 13, .8); border: 1px solid #3b2433; border-radius: 0; }
html[data-theme="kamui"] .toolbar-hint { color: #746574; }
html[data-theme="kamui"] .paper-sheet { background: linear-gradient(150deg, #100913, #06030a); border: 1px solid #382230; border-top: 1px solid #76243a; border-radius: 0; box-shadow: var(--shadow-lg); }
html[data-theme="kamui"] .sheet-kicker { color: #e22a3f; font-family: var(--sans); }
html[data-theme="kamui"] .sheet-title { font-family: var(--serif); color: #f3edf0; font-weight: 600; }
html[data-theme="kamui"] .sheet-rule { background: #31202d; }
html[data-theme="kamui"] .sheet-rule i { background: #d32335; }
html[data-theme="kamui"] .sheet-sub { color: #746574; }
html[data-theme="kamui"] .table-scroll-hint { color: #e22a3f; }
html[data-theme="kamui"] .table-viewport { background: rgba(4, 2, 7, .8); border-color: #31202d; border-radius: 0; box-shadow: inset 0 1px 0 rgba(211, 35, 53, .03); }
html[data-theme="kamui"] .word-table th,
html[data-theme="kamui"] .word-table td { border-color: #2c1b28; }
html[data-theme="kamui"] .th-main { color: #d7c9d2; background: #130b18 !important; }
html[data-theme="kamui"] .th-main .th-en { color: #746574; }
html[data-theme="kamui"] .th-group { color: #746574 !important; background: #0d0712 !important; }
html[data-theme="kamui"] .th-sub { color: #b6a4b0; background: #110914 !important; }
html[data-theme="kamui"] .col-toggle { color: #e22a3f; background: #08040b; border-color: #3b2433; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .col-toggle:hover { color: #fff; background: #1b0c16; border-color: #7b2437; }
html[data-theme="kamui"] .col-toggle[aria-pressed="true"] { color: #fff; background: #b7182e; border-color: #e34c5b; box-shadow: 0 0 12px rgba(211, 35, 53, .2); }
html[data-theme="kamui"] .th.is-col-hidden { background: #1e1020 !important; }
html[data-theme="kamui"] .word-table tbody td { color: #d7c9d2; background: #08040b; }
html[data-theme="kamui"] .word-table tbody tr:nth-child(even) td { background: #0b0610; }
html[data-theme="kamui"] .word-table tbody tr:hover td { background: #1a0b16; }
html[data-theme="kamui"] .index-cell { color: #746574; font-family: var(--serif); }
html[data-theme="kamui"] .row-delete { color: #746574; background: #08040b; border-color: #352130; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .row-delete:hover { color: #ff7f89; background: #261019; }
html[data-theme="kamui"] .cell-word .cell-value { color: #f8f2f5; font-size: 14.5px; }
html[data-theme="kamui"] .cell-meaning .cell-value { color: #d7c9d2; }
html[data-theme="kamui"] .cell-record .cell-value { color: #a897a4; }
html[data-theme="kamui"] .cell-edit { color: #e22a3f; background: #08040b; border: 1px solid #352130; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .cell-edit:hover { color: #fff; background: #24101d; border-color: #7b2437; }
html[data-theme="kamui"] .cell.is-editing { background: #1a0b16 !important; box-shadow: inset 0 0 0 1px #d32335; }
html[data-theme="kamui"] .cell.is-editing .cell-value { color: #f3edf0; }
html[data-theme="kamui"] .cell.is-editing .cell-value:empty::before { color: #746574; }
html[data-theme="kamui"] .cell-mask {
  color: #ff9ba4;
  background-color: #160b14;
  background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(211, 35, 53, .035) 10px 11px);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .3);
}
html[data-theme="kamui"] .cell.is-col-hidden .cell-mask { background-color: #21101c; }
html[data-theme="kamui"] .cell-mask svg { color: #e22a3f; }
html[data-theme="kamui"] .sheet-foot { color: #746574; }
html[data-theme="kamui"] .sheet-foot .foot-left::before { background: #4a2839; }
html[data-theme="kamui"] .sheet-foot .foot-right svg { color: #d32335; }
html[data-theme="kamui"] .add-row-bar { background: rgba(9, 4, 13, .5); border: 1px solid #31202d; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .btn-add-row { color: #a897a4; background: #08040b; border: 1px solid #352130; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .btn-add-row:hover { color: #fff; background: #b7182e; border-color: #d32335; }
html[data-theme="kamui"] .btn-add-row.subtle { color: #746574; background: transparent; border-color: transparent; }
html[data-theme="kamui"] .btn-add-row.subtle:hover { color: #ff6d7a; background: rgba(211, 35, 53, .05); }
html[data-theme="kamui"] .add-row-note { color: #746574; }
html[data-theme="kamui"] .add-row-note svg { color: #d32335; }

/* ---------- public archive ---------- */

html[data-theme="kamui"] .public-reviewed { color: #ff8c97; background: rgba(211, 35, 53, .06); border-color: rgba(211, 35, 53, .25); border-radius: 0; }
html[data-theme="kamui"] .public-credit { color: #746574; }
html[data-theme="kamui"] .public-credit svg { color: #d32335; }
html[data-theme="kamui"] .public-table th { color: #746574; background: #130b18; }
html[data-theme="kamui"] .public-table .public-th-index { color: #a897a4; }
html[data-theme="kamui"] .public-table tbody td { color: #d7c9d2; background: #08040b; }
html[data-theme="kamui"] .public-table tbody tr:nth-child(even) td { background: #0b0610; }
html[data-theme="kamui"] .public-table tbody tr:hover td { background: #1a0b16; }
html[data-theme="kamui"] .public-index { color: #746574; }
html[data-theme="kamui"] .public-word { color: #f3edf0; font-family: var(--sans); font-size: 13px !important; }
html[data-theme="kamui"] .public-meaning-cell { color: #d7c9d2; }
html[data-theme="kamui"] .public-mask { color: #ff9ba4; background: #160b14; }
html[data-theme="kamui"] .public-mask svg { color: #e22a3f; }
html[data-theme="kamui"] .public-pager .btn-quiet { border-radius: 0; }
html[data-theme="kamui"] .public-page-label { color: #746574; }
html[data-theme="kamui"] .public-loading strong { color: #d7c9d2; }
html[data-theme="kamui"] .public-loading span:last-child { color: #746574; }
html[data-theme="kamui"] .public-loading-mark,
html[data-theme="kamui"] .public-error-mark { color: #e22a3f; background: rgba(211, 35, 53, .08); border-color: #3b2433; border-radius: 0; }
html[data-theme="kamui"] .public-error h1 { color: #f3edf0; font-family: var(--serif); font-weight: 500; }
html[data-theme="kamui"] .public-error p { color: #a897a4; }

/* ---------- modal / toast ---------- */

html[data-theme="kamui"] .modal::backdrop { background: rgba(1, 0, 3, .8); backdrop-filter: blur(12px); }
html[data-theme="kamui"] .modal-card {
  color: var(--ink);
  background: linear-gradient(145deg, #100913, #050208);
  border: 1px solid #462334;
  border-top: 2px solid #b7182e;
  border-radius: 0;
  box-shadow: 0 0 0 1px rgba(211, 35, 53, .08), 0 40px 100px -45px #000;
}
html[data-theme="kamui"] .modal-card::before { height: 1px; background: linear-gradient(90deg, #d32335, rgba(211, 35, 53, .1), transparent); }
html[data-theme="kamui"] .modal-close { color: #746574; }
html[data-theme="kamui"] .modal-kicker { color: #e22a3f; font-family: var(--sans); letter-spacing: .18em; }
html[data-theme="kamui"] .modal-title { color: #f7f0f3; font-family: var(--serif); font-weight: 600; }
html[data-theme="kamui"] .modal-desc { color: #a897a4; }
html[data-theme="kamui"] .modal-label { color: #a897a4; }
html[data-theme="kamui"] .modal-actions { border-top-color: #31202d; }
html[data-theme="kamui"] .theme-option { background: #0b0610; border: 1px solid #2f1d2a; border-radius: 0; box-shadow: none; }
html[data-theme="kamui"] .theme-option:hover { border-color: #4a2839; }
html[data-theme="kamui"] .theme-option.is-selected { border-color: #b7182e; box-shadow: 0 0 0 1px rgba(211, 35, 53, .2), 0 0 20px rgba(211, 35, 53, .08); }
html[data-theme="kamui"] .theme-option-copy strong { font-family: var(--serif); color: #f3edf0; font-weight: 500; }
html[data-theme="kamui"] .theme-option-copy small { color: #a897a4; }
html[data-theme="kamui"] .theme-check { color: #fff; background: #b7182e; border-color: #e34c5b; }
html[data-theme="kamui"] .theme-hint { color: #746574; }
html[data-theme="kamui"] .theme-hint svg { color: #d32335; }
html[data-theme="kamui"] .delete-summary { background: rgba(45, 10, 18, .5); border-color: rgba(226, 99, 111, .2); border-radius: 0; }
html[data-theme="kamui"] .toast { color: #d7c9d2; background: #0b0610; border: 1px solid #3b2433; border-radius: 0; box-shadow: 0 20px 46px -28px #000; }
html[data-theme="kamui"] .toast-message svg { color: #e22a3f; }
html[data-theme="kamui"] .toast-action { color: #ff6d7a; }
html[data-theme="kamui"] .toast-action:hover { color: #fff; }

/* upload */
html[data-theme="kamui"] .upload-file-box { background: rgba(4, 2, 7, .7); border-color: #3b2433; border-radius: 0; }
html[data-theme="kamui"] .upload-pick { color: #e22a3f; background: #0b0610; border-color: #3b2433; border-radius: 0; }
html[data-theme="kamui"] .upload-pick:hover { background: rgba(211, 35, 53, .07); }
html[data-theme="kamui"] .upload-file-name { color: #a897a4; }
html[data-theme="kamui"] .upload-file-hint { color: #746574; }
html[data-theme="kamui"] .upload-file-hint strong { color: #a897a4; }
html[data-theme="kamui"] .upload-preview { background: rgba(4, 2, 7, .7); border-color: #31202d; border-radius: 0; }
html[data-theme="kamui"] .upload-preview-head { color: #a897a4; }
html[data-theme="kamui"] .upload-preview-head strong { color: #e22a3f; }
html[data-theme="kamui"] .upload-preview-table th { color: #746574; border-bottom-color: #31202d; }
html[data-theme="kamui"] .upload-preview-table td { color: #d7c9d2; border-bottom-color: #2c1b28; }
html[data-theme="kamui"] .upload-preview-table td:first-child { color: #f3edf0; }
html[data-theme="kamui"] .upload-review-note { color: #746574; }
html[data-theme="kamui"] .upload-review-note svg { color: #d32335; }

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  html[data-theme="kamui"] .kamui-hero-art { max-width: 460px; height: 550px; }
  html[data-theme="kamui"] .kamui-visual-title strong { font-size: 40px; }
}
@media (max-width: 960px) {
  html[data-theme="kamui"] .kamui-hero-art { max-width: 400px; height: 510px; }
  html[data-theme="kamui"] .kamui-readouts { display: none; }
}
@media (max-width: 860px) {
  html[data-theme="kamui"] .site-header { min-height: 88px; }
  html[data-theme="kamui"] .kamui-hero-art { max-width: 380px; height: 475px; margin: 0 auto; }
}
@media (max-width: 640px) {
  html[data-theme="kamui"] .kamui-hero-art { display: none; }
  html[data-theme="kamui"] .home-hero::before { display: none; }
  html[data-theme="kamui"] body::after { width: 440px; height: 440px; top: -220px; right: -190px; }
  html[data-theme="kamui"] .hero-title { font-size: clamp(36px, 9.4vw, 48px); }
  html[data-theme="kamui"] .cover-photo { object-position: 70% center; }
  html[data-theme="kamui"] .btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="kamui"] *, html[data-theme="kamui"] *::before, html[data-theme="kamui"] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
