/* 站点共享视觉层
 * 主站 heytizy.top / game / reports / notes 共用这一份文件。
 * 改配色、字体、卡片、页脚、主题按钮，四个站点同时生效。
 * 页面专属排版（如笔记正文、报告空状态）放在各页面自己的 <style> 里。
 */

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f3e8;
  --bg-2: #efe9da;
  --card: #fffdf7;
  --card-hover: #fffef9;
  --ink: #1a1a1a;
  --ink-soft: #5b564c;
  --seal: #c8372d;
  --seal-ink: #f7f3e8;
  --line: #1a1a1a;
  --soft-line: rgba(26, 26, 26, .30);
  --dot: rgba(26, 26, 26, .10);
  --shadow: rgba(26, 26, 26, .88);
  --shadow-hover: rgba(26, 26, 26, .96);
  --seal-soft: rgba(200, 55, 45, .08);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414;
  --bg-2: #191816;
  --card: #1d1c19;
  --card-hover: #23221e;
  --ink: #ece6d8;
  --ink-soft: #a9a294;
  --seal: #f0655c;
  --seal-ink: #141414;
  --line: #ece6d8;
  --soft-line: rgba(236, 230, 216, .32);
  --dot: rgba(236, 230, 216, .09);
  --shadow: rgba(236, 230, 216, .22);
  --shadow-hover: rgba(236, 230, 216, .40);
  --seal-soft: rgba(240, 101, 92, .12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  margin: 0;
  padding: 76px 20px 56px;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}
::selection { background: var(--seal); color: var(--seal-ink); }

/* 纸张 + 半调网点，只在顶部渐显 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.2px);
  background-size: 7px 7px;
  mask-image: radial-gradient(ellipse 92% 62% at 50% 0%, #000 18%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 92% 62% at 50% 0%, #000 18%, transparent 78%);
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

header.site {
  position: relative;
  margin-bottom: 46px;
}

/* 漫画装饰：集中线 + 朱印 */
.header-deco {
  position: absolute;
  top: 0;
  right: 0;
  width: 260px;
  height: 190px;
  pointer-events: none;
  color: var(--ink);
}
.speedlines {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  opacity: .14;
  mask-image: linear-gradient(215deg, #000 8%, transparent 72%);
  -webkit-mask-image: linear-gradient(215deg, #000 8%, transparent 72%);
}
.seal {
  position: absolute;
  top: 64px;
  right: 4px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: var(--seal);
  color: var(--seal-ink);
  border-radius: 3px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-7deg);
  box-shadow: 3px 3px 0 var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 3px 10px;
  border: 2px solid var(--line);
  border-radius: 2px;
  background: var(--card);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--ink-soft);
  transform: rotate(-.6deg);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--seal);
}
h1 {
  margin: 0 0 12px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.35;
}
h1 .mark {
  display: inline-block;
  padding: 0 .16em .04em;
  background: var(--seal);
  color: var(--seal-ink);
  line-height: 1.26;
  box-shadow: 4px 4px 0 var(--shadow);
  transform: rotate(-1.2deg);
}
/* 旁白对话框 */
p.intro {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 8px 0 0;
  padding: 10px 16px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}
p.intro::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 26px;
  width: 14px;
  height: 14px;
  background: var(--card);
  border-left: 2px solid var(--line);
  border-top: 2px solid var(--line);
  transform: rotate(45deg);
}

section { margin-bottom: 38px; }
.section-head {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  padding: 3px 10px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 2px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1.6;
}
.section-head::after {
  content: "";
  flex: 1;
  height: 6px;
  margin-left: 14px;
  background-image: radial-gradient(var(--ink) 1px, transparent 1.1px);
  background-size: 5px 5px;
  opacity: .22;
}

ul.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
a.card, div.card {
  position: relative;
  display: block;
  padding: 18px 20px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 3px;
  box-shadow: 5px 5px 0 var(--shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .14s cubic-bezier(.2, .8, .2, 1),
              box-shadow .14s cubic-bezier(.2, .8, .2, 1),
              background-color .14s ease;
}
/* 右下角半调网点 */
a.card::after, div.card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 76px;
  height: 50px;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.1px);
  background-size: 5px 5px;
  opacity: .9;
  mask-image: radial-gradient(circle at 100% 100%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000, transparent 72%);
  pointer-events: none;
}
@media (hover: hover) {
  a.card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--shadow-hover);
    background: var(--card-hover);
  }
  a.card:hover .arrow { transform: translateX(4px); color: var(--seal); }
  .theme-toggle:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--shadow);
  }
}
a.card:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid var(--seal);
  outline-offset: 3px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
}
h3.card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.5;
}
.card-desc {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.tag {
  display: inline-block;
  padding: 1px 7px;
  border: 1.5px solid var(--seal);
  border-radius: 2px;
  background: var(--seal-soft);
  color: var(--seal);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1.6;
  transform: rotate(-2deg);
}
.tag.muted {
  border: 1px dashed var(--soft-line);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 400;
  transform: none;
}
.arrow {
  font-size: 15px;
  color: var(--ink-soft);
  transition: transform .14s cubic-bezier(.2, .8, .2, 1), color .14s ease;
}

/* 建设中：虚线灰墨，不用整体降透明度 */
div.card.is-disabled {
  background: var(--bg-2);
  border-style: dashed;
  border-color: var(--soft-line);
  cursor: default;
}
div.card.is-disabled::after { display: none; }
div.card.is-disabled .card-title,
div.card.is-disabled .card-desc,
div.card.is-disabled .arrow { color: var(--ink-soft); }

/* 列表空状态，报告页与笔记页共用 */
li.empty {
  padding: 18px 20px;
  background: var(--bg-2);
  border: 2px dashed var(--soft-line);
  border-radius: 3px;
  color: var(--ink-soft);
  font-size: 14px;
}

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 2px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
}
footer a {
  display: inline-block;
  padding: 5px 0;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--soft-line);
}
footer a:hover { color: var(--seal); text-decoration-color: var(--seal); }

.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
  transition: transform .14s cubic-bezier(.2, .8, .2, 1),
              box-shadow .14s cubic-bezier(.2, .8, .2, 1);
}
.theme-toggle .icon { width: 20px; height: 20px; display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* 入场：面板轻轻落下 */
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.reveal { animation: panel-in .42s cubic-bezier(.2, .8, .2, 1) both; }
.d1 { animation-delay: .04s; }
.d2 { animation-delay: .10s; }
.d3 { animation-delay: .16s; }
.d4 { animation-delay: .22s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
  body { transition: none; }
  a.card, .theme-toggle, .arrow { transition: none; }
  a.card:hover, .theme-toggle:hover { transform: none; }
  a.card:hover .arrow { transform: none; }
}

@media (max-width: 620px) {
  body { padding: 68px 16px 44px; }
  h1 { font-size: 28px; }
  .header-deco { display: none; }
  p.intro::before { left: 18px; }
  footer { gap: 4px 16px; }
}

@media (max-width: 360px) {
  h1 { font-size: 27px; }
}
