/* ==========================================================================
   skin-construct.css — 皮肤 N「构成主义·1923 宣传海报」（specs/028，概念板 N 落地）
   --------------------------------------------------------------------------
   一句话：红黑白 + 45° 大对角 + 粗黑几何条压字。卡片不是圆角而是被斜刀切开，
   编号是歪的，标题像用浆糊刷上墙 —— 层次靠**实心色块**表达，不靠描边。

   本档三条自己的账：
     1. 与 f 像素档同为"全 0 圆角"（027 查重报出的唯一撞车）：本档靠 45° 削角 +
        红黑白蒙太奇 + 压缩大写体区分，不靠圆角，所以撞车是有意识的、可解释的。
     2. dock 必须是亮纸：首版把 --dock-bg 设成 #101010，而 dock 里的文字跟 --ink（也深）
        → 整块读不出来。暗色只留给 tabbar（tab 文字显式给浅色）。
     3. 动效是 steps() 硬切：宣传动画一帧一帧砸出来，周期 ≤14s；
        但 steps 大部分时间停在原位，像素差取证必须按元素量（027 守闸 M3b 的来由）。
   ========================================================================== */

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("../../assets/fonts/oswald-latin.woff2") format("woff2");
}

/* ---------- 1. 亮档 token：灰纸 × 宣传红 × 墨黑 × 海报黄 ---------- */
html[data-skin="construct"] {
  --paper: #E9E5DD;
  --paper-2: #F4F1EA;
  --paper-3: #DCD7CC;
  --ink: #101010;
  --ink-soft: #3C3A36;
  --ink-faint: #504D45;              /* paper-3 上实算 4.91（027 首版 4.20 不过线） */

  --vermillion: #B7121F;             /* 宣传红：#FFF 字 6.73 ✓ */
  --pine: #141414;                   /* 墨黑块：#F4F1EA 字 18.42 ✓ */
  --pine-deep: #000000;
  --gold: #D9A22B;                   /* 海报黄：只配深字 */

  --line: rgba(16, 16, 16, 0.55);
  --line-soft: rgba(16, 16, 16, 0.30);

  --dot: rgba(16, 16, 16, 0.05);
  --tape: rgba(183, 18, 31, 0.52);
  --scrim: rgba(16, 16, 16, 0.62);
  --on-accent: #FFFFFF;
  --on-tag: #F4E9DC;
  --vermillion-soft: rgba(183, 18, 31, 0.42);
  --flow-night: #2F2A24;
  --check-idle: #504D45;
  --thumb-paper: #F4F1EA;

  /* 宣传画贴墙感：单向硬黑影，不是柔光投影 */
  --shadow-paper: -7px 7px 0 rgba(16, 16, 16, 0.20);
  --shadow-lift: -9px 9px 0 rgba(16, 16, 16, 0.24);
  --shadow-tag: -5px 5px 0 rgba(16, 16, 16, 0.55);
  --shadow-thumb: -4px 4px 0 rgba(183, 18, 31, 0.6);

  --font-display: "Oswald", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  /* 形：全部直角，圆是不允许的；层次靠 45° 削角 */
  --r-sm: 0px;
  --r-md: 0px;
  --r-card: 0px;
  --r-btn: 0px;
}

/* ---------- 2. 背景：黑白混凝土实拍 + 灰纸 veil + 一道红斜带 ---------- */
html[data-skin="construct"] .flow-canvas { display: none; }
html[data-skin="construct"] body::after {
  background-image:
    linear-gradient(135deg, transparent 0 60%, rgba(183, 18, 31, 0.30) 60% 74%, transparent 74%),
    linear-gradient(rgba(233, 229, 221, 0.82), rgba(220, 215, 204, 0.90)),
    url("../../assets/skins/construct-bg.jpg");
  background-size: auto, auto, cover;
  background-repeat: no-repeat;
  background-position: center, center, center 30%;
}

/* ---------- 3. 组件：色块与黑条，不画框（容器无外框，026 红线） ---------- */
html[data-skin="construct"] .card {
  background: #F4F1EA;
  border: none;
  box-shadow: var(--shadow-paper);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
}
html[data-skin="construct"] .chip {
  background: #F4F1EA;
  color: var(--ink);
  border: none;
  box-shadow: inset 0 0 0 2px #101010;
  border-radius: 0;
}
html[data-skin="construct"] .chip[aria-pressed="true"] {
  background: #101010;
  color: #FFFFFF;
  box-shadow: -5px 5px 0 rgba(183, 18, 31, 0.80);
}
html[data-skin="construct"] .seg { background: transparent; border: none; }
html[data-skin="construct"] .seg-item { border: none; border-radius: 0; }
html[data-skin="construct"] .seg-item[aria-pressed="true"] { background: #B7121F; color: #FFFFFF; box-shadow: inset 0 -6px 0 #101010; }
html[data-skin="construct"] .seg-item[aria-selected="true"] { background: #B7121F; color: #FFFFFF; box-shadow: inset 0 -6px 0 #101010; }
html[data-skin="construct"] .seg-item[aria-pressed="true"] .k { color: #FFFFFF; }
html[data-skin="construct"] .seg-item[aria-selected="true"] .k { color: #FFFFFF; }

html[data-skin="construct"] .tile {
  background: #F4F1EA;
  border: none;
  box-shadow: inset 0 0 0 2px rgba(16, 16, 16, 0.55);
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
html[data-skin="construct"] .tile[aria-pressed="true"] {
  background: #D9A22B;
  color: #24190A;
  box-shadow: inset 0 0 0 2px #101010;
}
html[data-skin="construct"] .tile[aria-pressed="true"] .mark { color: #101010; }
html[data-skin="construct"] .tile[aria-pressed="true"] .label,
html[data-skin="construct"] .tile[aria-pressed="true"] .tiny,
html[data-skin="construct"] .tile[aria-pressed="true"] .faint { color: #24190A; opacity: 1; }

html[data-skin="construct"] .btn {
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 0;
}
html[data-skin="construct"] .btn-primary {
  background: var(--pine);
  color: #F4F1EA;
  box-shadow: -6px 6px 0 var(--vermillion);
  clip-path: polygon(0 0, 100% 0, 100% 74%, calc(100% - 14px) 100%, 0 100%);
}
html[data-skin="construct"] .btn-accent { background: var(--vermillion); color: var(--on-accent); box-shadow: -6px 6px 0 #101010; }
html[data-skin="construct"] .btn-ghost { background: #F4F1EA; color: var(--ink); box-shadow: inset 0 0 0 2px #101010; }
html[data-skin="construct"] .btn-quiet { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }

html[data-skin="construct"] .tier-cell { background: #F4F1EA; border: none; box-shadow: inset 0 0 0 2px rgba(16, 16, 16, 0.5); border-radius: 0; }
html[data-skin="construct"] .tier-cell[aria-pressed="true"] {
  background: #101010;
  color: #FFFFFF;
  box-shadow: -6px 6px 0 #B7121F;
}
html[data-skin="construct"] .tier-cell[aria-pressed="true"] .v { color: #FFFFFF; }
html[data-skin="construct"] .tier-cell[aria-pressed="true"] .k { color: #F0C9CE; }

/* 压缩大写体：标语不是正文 */
html[data-skin="construct"] .head h1,
html[data-skin="construct"] .q-title,
html[data-skin="construct"] .ticket-title,
html[data-skin="construct"] .persona-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
html[data-skin="construct"] .q-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  transform: skewX(-8deg);
}
html[data-skin="construct"] .eyebrow { letter-spacing: 0.16em; text-transform: uppercase; }

/* 票根 = 钉在墙上的一张标语：齿是菱形钢钉，章斜钉 12° */
html[data-skin="construct"] .ticket {
  border: none;
  border-radius: 0;
  background: #F4F1EA;
  box-shadow: var(--shadow-lift);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
}
html[data-skin="construct"] .ticket-stamp {
  border: none;
  border-radius: 0;
  color: #FFFFFF;
  background: var(--vermillion);
  font-weight: 700;
  transform: rotate(-12deg);
  box-shadow: -4px 4px 0 #101010;
}
html[data-skin="construct"] .ticket-blessing {
  background: #D6D9DC;
  border: none;
  border-left: 6px solid #101010;
  color: var(--ink);
  font-style: normal;
}
html[data-skin="construct"] .family-tag {
  background: #101010;
  color: #F4E9DC;
  box-shadow: none;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

html[data-skin="construct"] .progress { height: 12px; background: repeating-linear-gradient(90deg, #CBC5B8 0 12px, #DCD7CC 12px 24px); border-radius: 0; }
html[data-skin="construct"] .progress > i { background: var(--vermillion); box-shadow: -4px 0 0 #101010; }
html[data-skin="construct"] .lib-bar { background: repeating-linear-gradient(180deg, #101010 0 10px, var(--vermillion) 10px 20px); }
html[data-skin="construct"] .badge { border-radius: 0; background: #F4F1EA; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
html[data-skin="construct"] .badge.is-owned { background: var(--gold); color: #24190A; }
html[data-skin="construct"] .toast { background: #101010; color: #F4E9DC; border-radius: 0; letter-spacing: 0.06em; }
html[data-skin="construct"] .level-num { color: var(--vermillion); font-family: var(--font-display); }
html[data-skin="construct"] .radar__ring-stroke { stroke: rgba(16, 16, 16, 0.55); stroke-width: 1.4; }
html[data-skin="construct"] .radar__dot, html[data-skin="construct"] .radar__me-dot { stroke: #F4F1EA; stroke-width: 2; }

/* ---------- 4. tabbar = 墨黑车间；四枚图标换成几何符号 ---------- */
/* dock 必须亮纸：首版设成 #101010 后 dock 内跟随 --ink 的深色文字直接读不出来（027 抓到） */
html[data-skin="construct"] .dock { border-top: 0; background: #F4F1EA; }
html[data-skin="construct"] .tabbar { background: #101010; border-top: 0; }
html[data-skin="construct"] .tab { color: #9B968A; }
html[data-skin="construct"] .tab[aria-current="page"] { color: #FFFFFF; background: #B7121F; box-shadow: -4px 4px 0 rgba(0, 0, 0, 0.5); }
html[data-skin="construct"] .tab .i { font-size: 0; }
html[data-skin="construct"] .tab .i::before {
  font-family: "Segoe UI Symbol", ui-monospace, monospace;
  font-size: 1.1rem;
  line-height: 1;
}
html[data-skin="construct"] .tab[data-tab="home"] .i::before    { content: "\25A0"; }  /* ■ */
html[data-skin="construct"] .tab[data-tab="quest"] .i::before   { content: "\25B6"; }  /* ▶ */
html[data-skin="construct"] .tab[data-tab="library"] .i::before { content: "\25C9"; }  /* ◉ */
html[data-skin="construct"] .tab[data-tab="profile"] .i::before { content: "\2630"; }  /* ☰ */
/* 031：第五枚「广场」——正三角楔（▲ 构成语系，同档不重） */
html[data-skin="construct"] .tab[data-tab="plaza"] .i::before  { content: "\25B2"; }

/* ---------- 5. 暗色变体：夜班车间（逐条重写选中态） ---------- */
@media (prefers-color-scheme: dark) {
  html[data-skin="construct"] {
    --paper: #111111;
    --paper-2: #1A1A19;
    --paper-3: #242422;
    --ink: #F2EFE6;
    --ink-soft: #BDB8AC;
    --ink-faint: #948F84;

    --vermillion: #E23B4C;
    --pine: #F2EFE6;                 /* 暗档主按钮翻成浅色块，配深字 */
    --pine-deep: #FFFFFF;
    --gold: #D9A22B;

    --line: rgba(242, 239, 230, 0.55);
    --line-soft: rgba(242, 239, 230, 0.30);

    --dot: rgba(242, 239, 230, 0.05);
    --tape: rgba(226, 59, 76, 0.45);
    --scrim: rgba(0, 0, 0, 0.7);
    --on-accent: #0E0E0E;
    --on-tag: #0E0E0E;
    --vermillion-soft: rgba(226, 59, 76, 0.45);
    --flow-night: #2A2824;
    --check-idle: #948F84;
    --thumb-paper: #1A1A19;

    --shadow-paper: -7px 7px 0 rgba(0, 0, 0, 0.45);
    --shadow-lift: -9px 9px 0 rgba(0, 0, 0, 0.5);
    --shadow-tag: -5px 5px 0 rgba(0, 0, 0, 0.5);
    --shadow-thumb: -4px 4px 0 rgba(226, 59, 76, 0.7);
  }
  html[data-skin="construct"] body::after {
    background-image:
      linear-gradient(135deg, transparent 0 60%, rgba(226, 59, 76, 0.26) 60% 74%, transparent 74%),
      linear-gradient(rgba(17, 17, 17, 0.86), rgba(26, 26, 25, 0.92)),
      url("../../assets/skins/construct-bg.jpg");
    background-size: auto, auto, cover;
  }
  html[data-skin="construct"] .card,
  html[data-skin="construct"] .ticket,
  html[data-skin="construct"] .chip,
  html[data-skin="construct"] .tile,
  html[data-skin="construct"] .tier-cell { background: #1A1A19; }
  html[data-skin="construct"] .chip { box-shadow: inset 0 0 0 2px rgba(242, 239, 230, 0.6); color: #F2EFE6; }
  html[data-skin="construct"] .chip[aria-pressed="true"] { background: #F2EFE6; color: #0E0E0E; box-shadow: -5px 5px 0 rgba(226, 59, 76, 0.8); }
  html[data-skin="construct"] .seg { background: transparent; border: none; }
  html[data-skin="construct"] .seg-item { border: none; }
  html[data-skin="construct"] .seg-item[aria-pressed="true"] { background: #E23B4C; color: #0E0E0E; box-shadow: inset 0 -6px 0 #F2EFE6; }
  html[data-skin="construct"] .seg-item[aria-selected="true"] { background: #E23B4C; color: #0E0E0E; box-shadow: inset 0 -6px 0 #F2EFE6; }
  html[data-skin="construct"] .seg-item[aria-pressed="true"] .k { color: #0E0E0E; }
  html[data-skin="construct"] .seg-item[aria-selected="true"] .k { color: #0E0E0E; }
  html[data-skin="construct"] .tile[aria-pressed="true"] { background: #D9A22B; color: #161005; box-shadow: inset 0 0 0 2px #F2EFE6; }
  html[data-skin="construct"] .tile[aria-pressed="true"] .mark { color: #101010; }
  html[data-skin="construct"] .tile[aria-pressed="true"] .label,
  html[data-skin="construct"] .tile[aria-pressed="true"] .tiny,
  html[data-skin="construct"] .tile[aria-pressed="true"] .faint { color: #161005; }
  html[data-skin="construct"] .btn-primary { background: #F2EFE6; color: #0E0E0E; box-shadow: -6px 6px 0 #E23B4C; }
  html[data-skin="construct"] .btn-accent { background: #E23B4C; color: #0E0E0E; }
  html[data-skin="construct"] .btn-ghost { background: #1A1A19; color: #F2EFE6; box-shadow: inset 0 0 0 2px #F2EFE6; }
  html[data-skin="construct"] .tier-cell[aria-pressed="true"] { background: #E23B4C; color: #0E0E0E; box-shadow: -6px 6px 0 #F2EFE6; }
  html[data-skin="construct"] .tier-cell[aria-pressed="true"] .v { color: #0E0E0E; }
  html[data-skin="construct"] .tier-cell[aria-pressed="true"] .k { color: #2A0A0E; }
  html[data-skin="construct"] .dock { background: #1A1A19; }
  html[data-skin="construct"] .tab { color: #9B968A; }
  html[data-skin="construct"] .tab[aria-current="page"] { background: #E23B4C; color: #0E0E0E; }
  html[data-skin="construct"] .q-num { color: #F2EFE6; }
  html[data-skin="construct"] .family-tag { background: #F2EFE6; color: #0E0E0E; }
  html[data-skin="construct"] .badge.is-owned { background: #D9A22B; color: #161005; }
}

/* ---------- 6. specs/025 支线页特色装饰 + 本档动效 ----------
   记忆点：页面被一条红斜带从左下切过，右上角一枚几何章在做 steps 硬切滑入。
   振幅账：位移 26%（对 340px 宽的斜带即 ~88px）+ 周期 2.8s，两条都过守闸 M3b。 */
html[data-skin="construct"] .quest-body::before,
html[data-skin="construct"] .quest-body::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  left: -12px;
  right: -12px;
}
html[data-skin="construct"] .quest-body::before {
  top: 0;
  height: 140px;
  background:
    linear-gradient(124deg, transparent 0 56%, color-mix(in srgb, var(--vermillion) 62%, transparent) 56% 70%, transparent 70%),
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 22%, transparent) 0 3px, transparent 3px 20px);
  -webkit-mask: linear-gradient(#000 0 70%, transparent);
  mask: linear-gradient(#000 0 70%, transparent);
  animation: construct-cut 2.8s steps(5, end) infinite;
}
@keyframes construct-cut {
  0%   { transform: translateX(-26%); }
  25%, 100% { transform: translateX(0); }
}
html[data-skin="construct"] .quest-body::after {
  bottom: 0;
  height: 42%;
  background:
    linear-gradient(45deg, transparent 0 42%, color-mix(in srgb, var(--vermillion) 48%, transparent) 42% 52%, transparent 52%),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--ink) 16%, transparent) 0 4px, transparent 4px 18px);
  -webkit-mask: linear-gradient(transparent, #000 58%);
  mask: linear-gradient(transparent, #000 58%);
  animation: construct-blink 4.6s steps(2, end) infinite;
}
@keyframes construct-blink {
  0%, 72%  { opacity: 1; }
  73%, 100% { opacity: .18; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-skin="construct"] .quest-body::before,
  html[data-skin="construct"] .quest-body::after { animation: none; opacity: .6; transform: none; }
}
