/* DailyPlayDen 全站样式（Paper Den：暖纸游戏周刊）
 * 管：顶栏、页脚、首页刊头和今日清单、正文、FAQ、联系表单、404。
 * 游戏界面的样式在各游戏工具自己的 style.css（den.css + play.css），挂在 .den 下，这里不碰。
 * 游戏区外层（.game-host 及以上）不加 transform / filter，否则键盘弹出时 position: fixed 会失效。 */
:root {
  --paper: #F4EFE4; --card: #FFFDF8; --line: #E3DACB; --ink: #1B1A17; --ink-2: #6A6358; --ink-3: #34312B;
  --brand: #F2542D; --ok: #1E8E68; --gold: #F2B33D;
  --t-common: #2F5DB8; --t-rare: #7650C8; --t-ultra: #F2B33D;
  --desk: #1B2436; --desk-text: #F4EFE4; --desk-mute: #A7B1C6;
  --f-display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --f-ui: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-num: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: 32px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .30 0 0 0 0 .22 0 0 0 0 .10 1.5 0 0 0 -.66'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1.5 0 0 0 -.66'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  --ink-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.6 0 0 0 2.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (max-width: 720px) { :root { --gutter: 16px; } }

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: clip;
  background-color: var(--paper); background-image: var(--grain);
  color: var(--ink); font: 400 16px/1.6 var(--f-ui); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; margin: 0; line-height: 1.1; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--t-common); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.num { font-family: var(--f-num); font-weight: 500; font-variant-numeric: tabular-nums; }
.kicker { display: block; font: 700 12px/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 12px 16px; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* 按钮 */
.btn {
  --bg: var(--card); --fg: var(--ink); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: var(--bg); color: var(--fg); border: 2px solid var(--bd); box-shadow: 0 3px 0 var(--bd);
  font: 700 16px/1.1 var(--f-ui); text-align: center;
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--bd); }
.btn:active { transform: translateY(2px) scale(.98); box-shadow: 0 1px 0 var(--bd); }
.btn-primary { --bg: var(--brand); }
.arr { display: inline-block; transition: transform 150ms var(--ease); }
a:hover .arr, .btn:hover .arr { transform: translateX(3px); }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 12px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; }
.card { background-color: var(--card); border: 1px solid var(--line); border-radius: 16px; }

/* 邮票齿孔、橡皮章（首页示例和 404 用；游戏里的在 den.css） */
.perf {
  --hole: 4px; --gap: 11px;
  -webkit-mask:
    radial-gradient(circle var(--hole) at 50% 0, #0000 96%, #000) 50% 0 / var(--gap) 100% repeat-x,
    radial-gradient(circle var(--hole) at 50% 100%, #0000 96%, #000) 50% 100% / var(--gap) 100% repeat-x,
    radial-gradient(circle var(--hole) at 0 50%, #0000 96%, #000) 0 50% / 100% var(--gap) repeat-y,
    radial-gradient(circle var(--hole) at 100% 50%, #0000 96%, #000) 100% 50% / 100% var(--gap) repeat-y;
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle var(--hole) at 50% 0, #0000 96%, #000) 50% 0 / var(--gap) 100% repeat-x,
    radial-gradient(circle var(--hole) at 50% 100%, #0000 96%, #000) 50% 100% / var(--gap) 100% repeat-x,
    radial-gradient(circle var(--hole) at 0 50%, #0000 96%, #000) 0 50% / 100% var(--gap) repeat-y,
    radial-gradient(circle var(--hole) at 100% 50%, #0000 96%, #000) 100% 50% / 100% var(--gap) repeat-y;
  mask-composite: intersect;
}
.rubber {
  --c: var(--t-rare); --rot: -8deg;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; white-space: nowrap;
  color: var(--c); border: 2.5px solid currentColor; border-radius: 6px; outline: 1.5px solid currentColor; outline-offset: 2px;
  font: 700 12px/1.1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase;
  transform: rotate(var(--rot));
  -webkit-mask-image: var(--ink-mask); mask-image: var(--ink-mask); -webkit-mask-size: 120px; mask-size: 120px;
}
.rubber .num { letter-spacing: 0; }
.rubber.common { --c: var(--t-common); }
.rubber.ultra { --c: #A06A00; }

/* ---------- 顶栏 ---------- */
.site-head { position: sticky; top: 0; z-index: 60; background: rgba(244, 239, 228, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head-in { height: 60px; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; text-decoration: none; min-width: 0; }
.brand-icon { display: inline-grid; width: 32px; height: 32px; flex: none; }
.brand-icon > img, .brand-icon > svg, .brand-icon .gf-site-icon, .brand-icon .gf-site-icon img, .brand-icon .gf-site-icon svg { display: block; width: 100%; height: 100%; border-radius: 8px; }
.brand-name { font: 400 21px/1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; }
.brand-name span { color: var(--brand); }
.head-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.den-pill, .streak-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 10px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--card); font: 600 14px/1 var(--f-ui); white-space: nowrap; text-decoration: none;
}
.den-pill:hover { background: #fff; }
.den-pill-ring { width: 18px; height: 18px; flex: none; }
.den-pill-ring circle { fill: none; stroke-width: 3; }
.den-pill-ring .t { stroke: var(--line); }
.den-pill-ring .p { stroke: var(--ok); stroke-linecap: round; transition: stroke-dasharray 400ms var(--ease); }
.den-pill-n { font-family: var(--f-num); font-weight: 500; min-width: 2.2em; }
.den-pill.is-done { border-color: var(--ok); }
.streak-pill { gap: 6px; padding: 0 12px 0 9px; font-family: var(--f-num); font-weight: 500; }
.streak-pill[hidden] { display: none; }
.streak-pill svg { width: 16px; height: 18px; }

/* ---------- 页脚 ---------- */
.site-foot { margin-top: 64px; padding: 28px 0 36px; border-top: 3px solid var(--ink); }
.site-foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 32px; }
.foot-brand p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.foot-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; }
.foot-nav a:hover { background: rgba(27, 26, 23, .06); }
.foot-contact { display: inline-flex; align-items: center; }
.ticket-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: -4px; border-radius: 999px; background: var(--brand); color: var(--ink); font: 500 12px/1 var(--f-num); }
.ticket-badge[hidden] { display: none; }
.ticket-badge:empty { width: 10px; min-width: 0; height: 10px; padding: 0; }
.foot-copy { margin-top: 18px; color: var(--ink-2); font-size: 14px; }

/* ---------- 首页：刊头（全站唯一的记忆点：刊头里探头的小狐狸） ---------- */
.home { padding-top: 18px; }
.mh-dateline { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); font: 600 12.5px/1.2 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; }
.mh-main { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 14px 0 12px; border-bottom: 1px solid var(--ink); }
/* 孔版套色错位感，只用在刊头 */
.mh-title { font-size: clamp(52px, 7vw, 92px); line-height: .92; letter-spacing: -.02em; text-shadow: 3px 2px 0 rgba(242, 84, 45, .55); }
.mh-title .amp { color: var(--brand); text-shadow: 3px 2px 0 rgba(27, 26, 23, .9); }
.mh-den { width: 132px; flex: none; margin-bottom: -12px; }
.mh-den svg { display: block; width: 100%; height: auto; overflow: visible; }
.mh-den .fox { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 360ms var(--ease); }
.mh-den:hover .fox { transform: translateY(-5px); }
.mh-den .eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 5.2s 2.6s infinite; }
.mh-den .ear-l { transform-box: fill-box; transform-origin: 70% 100%; animation: ear-twitch 7s 4s infinite; }
.mh-den .lamp-glow { animation: lamp-glow 3.6s ease-in-out infinite; }
.mh-den .fox-rise { animation: fox-rise 620ms 420ms var(--ease) both; }
.mh-sub { padding-top: 12px; }
.mh-sub p { font-size: 17px; color: var(--ink-2); max-width: 64ch; }
.mh-sub b { color: var(--ink); font-weight: 600; }

/* 首页：主打卡 + 右栏 */
.home-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px; padding: 22px 0 8px; align-items: start; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); grid-template-areas: "head demo" "cta demo"; gap: 18px 28px; padding: 28px; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.feature:not(:has(.ft-demo)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "cta"; }
.ft-head { grid-area: head; align-self: end; }
.ft-cta { grid-area: cta; align-self: start; }
.ft-demo { grid-area: demo; }
.ft-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ft-kicker .kicker { display: inline; }
.ft-kicker .kicker b { color: var(--ink); font-family: var(--f-num); font-weight: 500; }
.ft-title { font-size: clamp(44px, 4.4vw, 56px); margin: 14px 0 10px; letter-spacing: -.02em; }
.ft-title a { text-decoration: none; }
.ft-hook { font-size: 19px; line-height: 1.45; font-weight: 600; max-width: 26ch; }
.ft-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 18px; padding: 0; list-style: none; color: var(--ink-2); font-size: 15px; font-weight: 600; }
.ft-meta li { display: inline-flex; align-items: center; gap: 6px; }
.ft-meta svg { width: 16px; height: 16px; }
.ft-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ft-actions .btn { min-height: 54px; padding: 0 26px; font-size: 17px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.status i { width: 14px; height: 14px; border-radius: 50%; border: 2px dashed var(--ink-2); }
.feature.is-done .status { color: var(--ok); }
.feature.is-done .status i { border: 0; background: var(--ok); }

/* 主打卡右侧：用游戏皮肤做的"2 秒看懂"示例（标 Example，不写玩家占比） */
.demo { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px 18px 18px; border-radius: 14px; overflow: hidden; background-color: var(--desk); background-image: var(--grain-light); color: var(--desk-text); }
.demo-label { display: flex; justify-content: space-between; align-items: center; font: 500 12px/1 var(--f-num); letter-spacing: .14em; text-transform: uppercase; color: var(--desk-mute); }
.demo-tag { padding: 4px 8px; border-radius: 4px; background: var(--gold); color: var(--ink); }
.mini-stamp-wrap { filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .35)); align-self: flex-start; }
.mini-stamp { display: block; background: var(--card); color: var(--ink); padding: 12px 20px 10px; }
.mini-stamp .k { display: block; font: 500 12px/1 var(--f-num); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.mini-stamp .w { display: block; font: 400 40px/1.05 var(--f-display); margin-top: 6px; }
.slip { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--card); color: var(--ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.slip q { font-size: 16px; font-weight: 600; line-height: 1.3; quotes: "\201C" "\201D"; }
.slip.s1 { transform: rotate(-.6deg); }
.slip.s2 { transform: rotate(.5deg); }
.demo-foot { font-size: 15px; color: var(--desk-mute); font-weight: 600; }
.demo-foot b { color: var(--desk-text); }

/* 右栏：今日清单 / 连胜 / 预告便签 */
.side { display: grid; gap: 16px; }
.side .card { padding: 20px; }
.side h2 { font-size: 24px; }
.den-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.den-head .num { font-size: 15px; color: var(--ink-2); }
.bar-track { height: 8px; margin: 12px 0 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--ok); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 500ms var(--ease); }
.den-list { list-style: none; margin: 8px 0 0; padding: 0; }
.den-list li + li .den-item { border-top: 1px dashed var(--line); }
.den-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; }
.check { width: 44px; height: 44px; display: grid; place-items: center; }
.check i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); color: var(--ink); }
.check svg { width: 14px; height: 14px; opacity: 0; }
.is-done .check svg { opacity: 1; }
.is-done .check i { background: #17765A; border-color: #17765A; color: #fff; }
.den-item b { display: block; font-weight: 700; }
.den-item small { display: block; color: var(--ink-2); font-size: 14px; }
.den-item .go { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.streak-card { display: grid; gap: 12px; }
.streak-top { display: flex; align-items: center; gap: 14px; }
.streak-big { min-width: 1ch; font: 500 44px/1 var(--f-num); }
.streak-top p { font-size: 14.5px; color: var(--ink-2); line-height: 1.4; }
.streak-top p b { display: block; color: var(--ink); font-size: 16px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; list-style: none; margin: 0; padding: 0; }
.week li { display: grid; justify-items: center; gap: 4px; font: 600 12px/1 var(--f-ui); color: var(--ink-2); }
.week li i { width: 100%; max-width: 32px; aspect-ratio: 1; border-radius: 8px; border: 1.5px solid var(--line); background: var(--paper); }
.week li.is-today { color: var(--ink); }
.week li.is-today i { border: 2px dashed var(--brand); background: var(--card); }
.week li.is-lit i { background: var(--brand); border: 1.5px solid var(--ink); }
.notice { position: relative; padding: 22px 20px 18px; background: #FBF3DF; border: 1px solid #E8D9B4; border-radius: 4px; transform: rotate(.6deg); box-shadow: 0 10px 20px -16px rgba(70, 48, 20, .5); }
.notice::before { content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--brand); border: 2px solid var(--ink); }
.notice p { margin-top: 8px; font-size: 16px; line-height: 1.5; }

/* ---------- 正文 ---------- */
.prose { max-width: 760px; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin-top: 40px; }
.prose h3 { font-size: 22px; margin-top: 28px; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { font-size: 17px; line-height: 1.7; color: var(--ink-3); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--brand); }
.prose a { color: var(--ink); text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: rgba(242, 84, 45, .1); }
.prose strong { color: var(--ink); }
.prose code { font: 500 .9em var(--f-num); padding: 1px 5px; border-radius: 4px; background: var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { font-weight: 700; border-bottom: 2px solid var(--ink); }
.prose blockquote { margin: 16px 0 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); }
.card-prose { max-width: none; padding: 32px 36px; background-color: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.card-prose > * { max-width: 760px; }
.home-prose { margin-top: 56px; padding-top: 28px; border-top: 3px solid var(--ink); max-width: 820px; }

/* FAQ */
.faq { margin-top: 48px; }
.faq h2 { font-size: clamp(28px, 3vw, 36px); padding-top: 24px; margin-bottom: 8px; border-top: 1px solid var(--ink); }
.faq-list { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 0; font-weight: 700; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq .pm { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1.5px solid var(--ink); transition: transform 260ms var(--ease), background-color 260ms var(--ease); }
.faq .pm::before, .faq .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; background: var(--ink); border-radius: 1px; }
.faq .pm::after { transform: rotate(90deg); }
.faq details[open] .pm { transform: rotate(45deg); background: var(--brand); }
.faq details p { padding: 0 0 18px; max-width: 70ch; font-size: 16.5px; color: var(--ink-3); }
.faq details a { color: var(--ink); font-weight: 600; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- 游戏页 ---------- */
.game-head { padding-top: 14px; padding-bottom: 12px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -8px 0 -6px; font-size: 14px; color: var(--ink-2); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.game-h1 { margin-top: 2px; font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -.02em; }
.game-sub { margin-top: 6px; font-size: 17px; color: var(--ink-2); max-width: 60ch; }
.game-host { position: relative; }
.game-article { margin-top: 40px; }
.game-foot { margin-top: 40px; display: grid; gap: 16px; }
.unofficial { max-width: 820px; padding: 14px 16px; border-radius: 12px; border: 1.5px dashed var(--ink-2); font-size: 16px; color: var(--ink-3); }
.unofficial a { color: var(--ink); font-weight: 600; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.related-card { display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--ink); background: var(--card); text-decoration: none; transition: transform 150ms var(--ease), box-shadow 150ms var(--ease); }
.related-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.related-card b { font: 400 22px/1.15 var(--f-display); }
.related-card span:last-child { color: var(--ink-2); font-size: 15px; }

/* ---------- 普通页 / 法律页 ---------- */
.doc-head { padding-top: 22px; padding-bottom: 18px; }
.doc-head h1 { margin-top: 4px; font-size: clamp(38px, 5vw, 58px); letter-spacing: -.02em; }
.doc-body { display: grid; gap: 24px; }
.prose-legal p, .prose-legal li { font-size: 16.5px; }
.play-cta { margin-top: 48px; }
.play-cta-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k btn" "name btn" "hook btn"; align-items: center; gap: 4px 24px; padding: 24px 28px; border-radius: 16px; background-color: var(--desk); background-image: var(--grain-light); color: var(--desk-text); text-decoration: none; }
.play-cta-card .kicker { grid-area: k; color: var(--desk-mute); }
.play-cta-card b { grid-area: name; font: 400 34px/1.1 var(--f-display); }
.play-cta-hook { grid-area: hook; color: var(--desk-mute); font-size: 16px; }
.play-cta-card .btn { grid-area: btn; }

/* 联系表单（引擎接管提交和留言列表，这里只管样子） */
.ticket-zone { display: grid; gap: 24px; max-width: 760px; }
.ticket { position: relative; display: grid; gap: 12px; padding: 24px; border-radius: 16px; border: 2px solid var(--ink); background: var(--card); box-shadow: 6px 6px 0 var(--ink); }
.ticket::before { content: "Write to the den"; font: 500 12px/1 var(--f-num); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.ticket input, .ticket textarea, .gf-ticket-reply input, .gf-ticket-reply textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper);
  font: 400 16px/1.5 var(--f-ui); color: var(--ink); transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.ticket textarea { min-height: 150px; resize: vertical; }
.gf-ticket-reply textarea { min-height: 96px; resize: vertical; }
.ticket input:focus, .ticket textarea:focus, .gf-ticket-reply input:focus, .gf-ticket-reply textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(242, 84, 45, .35); }
.ticket ::placeholder, .gf-ticket-reply ::placeholder { color: #8C8476; }
.ticket button, .gf-ticket-reply button {
  justify-self: start; min-height: 48px; padding: 0 28px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--ink); background: var(--brand); color: var(--ink); box-shadow: 0 3px 0 var(--ink);
  font: 700 16px/1 var(--f-ui); transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
}
.ticket button:hover, .gf-ticket-reply button:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.ticket button:active, .gf-ticket-reply button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ticket button:disabled, .gf-ticket-reply button:disabled { opacity: .55; cursor: progress; }
.ticket [data-gf-ticket-msg] { font-size: 15.5px; font-weight: 600; color: var(--ink-2); }
.ticket [data-gf-ticket-msg]:empty { display: none; }
/* 发送成功：盖一个绿色"Sent"章 */
.ticket[data-gf-done] { border-color: var(--ok); box-shadow: 6px 6px 0 var(--ok); }
.ticket[data-gf-done]::after { content: "Sent"; position: absolute; top: 16px; right: 18px; padding: 4px 10px; color: var(--ok); border: 2.5px solid currentColor; outline: 1.5px solid currentColor; outline-offset: 2px; border-radius: 6px; font: 700 13px/1.1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; transform: rotate(-8deg); -webkit-mask-image: var(--ink-mask); mask-image: var(--ink-mask); -webkit-mask-size: 120px; mask-size: 120px; animation: slam 220ms var(--ease) both; }
.ticket[data-gf-done] [data-gf-ticket-msg] { color: var(--ok); }
/* 我的留言：没有留言时整块（标题 + 列表）都藏起来 */
.tickets-wrap { display: grid; gap: 14px; }
.tickets-wrap h2 { font-size: 28px; }
.tickets-wrap:has([data-gf-empty]), .tickets-wrap:has([data-gf-tickets]:empty) { display: none; }
[data-gf-tickets][data-gf-empty] { display: none; }
[data-gf-tickets] { display: grid; gap: 14px; }
.gf-ticket { position: relative; display: grid; gap: 10px; padding: 18px; border-radius: 14px; border: 1.5px solid var(--ink); background: var(--card); }
.gf-ticket[data-gf-unread] { box-shadow: 4px 4px 0 var(--brand); }
.gf-ticket[data-gf-unread]::before { content: "New reply"; position: absolute; top: -11px; left: 16px; padding: 3px 8px; border-radius: 999px; background: var(--brand); color: var(--ink); font: 700 12px/1.2 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
.gf-ticket-subject { font: 400 21px/1.2 var(--f-display); overflow-wrap: anywhere; }
.gf-ticket-status { justify-self: start; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--line); color: var(--ink); font: 700 12px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; }
.gf-ticket[data-status="open"] .gf-ticket-status { background: #FBF3DF; color: #8A5A00; box-shadow: inset 0 0 0 1px #E8D9B4; }
.gf-ticket[data-status="answered"] .gf-ticket-status { background: rgba(30, 142, 104, .14); color: var(--ok); }
.gf-ticket[data-status="closed"] { border-color: var(--line); }
.gf-ticket-msg { display: grid; gap: 4px; padding: 12px 14px; border-radius: 10px; background: var(--paper); }
.gf-ticket-msg[data-from="me"] { margin-left: 24px; }
.gf-ticket-msg[data-from="site"] { margin-right: 24px; background: #EEF6F2; border-left: 3px solid var(--ok); }
.gf-ticket-who { font: 500 12px/1.2 var(--f-num); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.gf-ticket-text { font-size: 16px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.gf-ticket-reply { display: grid; gap: 8px; margin-top: 4px; }

/* ---------- 404：退回寄件人 ---------- */
.lost { padding-top: 48px; }
.lost-card { position: relative; max-width: 680px; padding: 36px; border-radius: 16px; border: 2px solid var(--ink); background: var(--card); box-shadow: 6px 6px 0 var(--ink); display: grid; gap: 14px; }
.lost-stamp { --c: var(--brand); --rot: -10deg; justify-self: start; margin-bottom: 10px; font-size: 18px; padding: 7px 14px; border-width: 3.5px; outline-width: 2px; outline-offset: 3px; animation: slam 260ms 200ms var(--ease) both; }
.lost h1 { font-size: clamp(34px, 5vw, 52px); }
.lost .lede { font-size: 18px; color: var(--ink-3); }
.lost-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ---------- 入场动效 ---------- */
.mh-dateline { animation: rule-in 520ms var(--ease) both; transform-origin: left; }
.mh-title { animation: rise 420ms 80ms var(--ease) both; }
.feature, .side > * { animation: rise 260ms var(--ease) both; }
.side > :nth-child(1) { animation-delay: 120ms; }
.side > :nth-child(2) { animation-delay: 170ms; }
.side > :nth-child(3) { animation-delay: 220ms; }
.demo .mini-stamp-wrap { animation: rise 260ms 220ms var(--ease) both; }
.demo .s1 { animation: slip-in 320ms 560ms var(--ease) both; }
.demo .s1 .rubber { animation: slam 220ms 960ms var(--ease) both; }
.demo .s2 { animation: slip-in 320ms 1300ms var(--ease) both; }
.demo .s2 .rubber { animation: slam 220ms 1720ms var(--ease) both; }
.demo .demo-foot { animation: fade 400ms 2050ms var(--ease) both; }
.notice { animation-name: rise-tilt; }

/* ---------- 宽屏以下 ---------- */
@media (max-width: 980px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side .notice { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .site-head-in { height: 56px; gap: 8px; }
  .brand-icon { width: 30px; height: 30px; }
  .brand-name { font-size: 19px; }
  .den-pill, .streak-pill { padding: 0 11px 0 9px; gap: 6px; font-size: 14px; }
  .home { padding-top: 10px; }
  .mh-dateline { font-size: 12px; letter-spacing: .08em; }
  .mh-dateline .r { display: none; }
  .mh-main { padding: 10px 0 10px; }
  .mh-title { font-size: clamp(44px, 13vw, 60px); }
  .mh-den { width: 96px; margin-bottom: -10px; }
  .mh-sub p { font-size: 16px; }
  .home-grid { padding-top: 16px; gap: 16px; }
  .feature { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "cta" "demo"; padding: 18px; gap: 14px; box-shadow: 4px 4px 0 var(--ink); }
  .ft-title { font-size: 40px; margin: 10px 0 6px; }
  .ft-hook { font-size: 17px; max-width: none; }
  .ft-meta { gap: 4px 12px; margin-bottom: 14px; }
  .ft-actions .btn { width: 100%; }
  .demo { padding: 14px; gap: 10px; }
  .mini-stamp .w { font-size: 32px; }
  .slip { padding: 10px 12px; gap: 10px; }
  .slip q { font-size: 16px; }
  .slip .rubber { font-size: 12px; padding: 3px 7px; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .card-prose { padding: 22px 18px; }
  .prose p, .prose li { font-size: 16.5px; }
  .home-prose { margin-top: 40px; }
  .game-head { padding-top: 8px; padding-bottom: 10px; }
  .crumbs { font-size: 14px; }
  .game-h1 { font-size: 32px; }
  .game-sub { font-size: 16px; line-height: 1.45; }
  .play-cta-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "k" "name" "hook" "btn"; padding: 20px; }
  .play-cta-card .btn { margin-top: 12px; }
  .ticket { padding: 18px; box-shadow: 4px 4px 0 var(--ink); }
  .ticket button { justify-self: stretch; }
  .gf-ticket-msg[data-from="me"] { margin-left: 12px; }
  .gf-ticket-msg[data-from="site"] { margin-right: 12px; }
  .lost-card { padding: 22px; }
  .site-foot-in { flex-direction: column; }
  .foot-nav { margin-left: -10px; }
}
@media (max-width: 480px) {
  .den-pill-l { display: none; }
}

/* ---------- 关键帧 ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rise-tilt { from { opacity: 0; transform: translateY(16px) rotate(.6deg); } to { opacity: 1; transform: rotate(.6deg); } }
@keyframes rule-in { from { opacity: 0; transform: scaleX(.6); } to { opacity: 1; transform: none; } }
@keyframes slip-in { from { opacity: 0; transform: translateX(-14px) rotate(-2deg); } }
@keyframes slam { 0% { opacity: 0; transform: rotate(var(--rot, 0deg)) scale(1.35); } 60% { opacity: 1; transform: rotate(var(--rot, 0deg)) scale(.96); } 100% { opacity: 1; transform: rotate(var(--rot, 0deg)) scale(1); } }
@keyframes fox-rise { from { transform: translateY(34px); } to { transform: none; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes ear-twitch { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-10deg); } 96% { transform: rotate(4deg); } }
@keyframes lamp-glow { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
