/* 小墨官网：宣纸、墨、一点朱砂 */
:root {
  --paper: #F7F1E1; --paper2: #EFE6CF; --paper3: #E6DBC0; --ink: #262626; --ink2: #3a3734; --muted: #7C6D5C; --faint: rgba(38, 38, 38, .12);
  --seal: #C2321F; --ok: #3F6B36; --radius: 18px; --wrap: 1080px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .27  0 0 0 .06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.brush { display: inline-block; line-height: 0; vertical-align: middle; }
.brush svg { display: block; overflow: visible; }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(247, 241, 225, .78); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--faint); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 34px; height: 34px; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 14.5px; }
.nav a { text-decoration: none; color: var(--ink2); opacity: .78; }
.nav a:hover { opacity: 1; }
@media (max-width: 720px) { .nav a.opt { display: none; } .nav { gap: 14px; } }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; border: 1.8px solid var(--ink); background: transparent; color: var(--ink); font: 600 15.5px/1 inherit; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(40, 28, 16, .14); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.ink { background: var(--ink); color: #F8F1DC; }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* 首屏：左边字，下面一整条地面，小墨就在上面活着 */
.hero { position: relative; z-index: 1; min-height: min(840px, calc(100vh - 62px)); min-height: min(840px, calc(100svh - 62px)); display: flex; flex-direction: column; }
.hero .wrap { flex: none; padding-top: min(7vh, 64px); }
.hero h1 { margin: 0; line-height: 0; }
.hero .tag { margin: 22px 0 6px; font-size: clamp(19px, 2.3vw, 24px); font-weight: 650; letter-spacing: .02em; }
.hero .sub { margin: 0 0 26px; color: var(--muted); font-size: 16px; max-width: 34em; }
.dl { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ver { margin-top: 14px; font-size: 13.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ver a { color: var(--muted); }
.ver .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.mobile-note { display: none; margin-top: 10px; font-size: 14px; color: var(--seal); font-weight: 600; }
.is-mobile .mobile-note { display: block; }
#stage { position: relative; flex: 1; min-height: 330px; }
#stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
#stage .hint { position: absolute; right: max(24px, calc((100vw - var(--wrap)) / 2 + 24px)); top: 14px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; pointer-events: none; }
#stage .hint b { color: var(--ink); font-weight: 650; }
#snd { position: absolute; left: max(24px, calc((100vw - var(--wrap)) / 2 + 24px)); top: 10px; z-index: 3; }
#bubble { position: absolute; z-index: 4; pointer-events: none; padding: 7px 14px; border-radius: 16px; background: #FFFDF6; box-shadow: 0 6px 18px rgba(40, 28, 16, .16); font-size: 14px; font-weight: 600; transform: translate(-50%, -100%) scale(.6); opacity: 0; transition: opacity .2s, transform .28s cubic-bezier(.34, 1.56, .64, 1); white-space: nowrap; }
#bubble.on { opacity: 1; transform: translate(-50%, -100%) scale(1); }
#bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: #FFFDF6; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }

/* 段落 */
section { position: relative; z-index: 1; padding: 96px 0 24px; }
.sec-h { display: flex; align-items: baseline; gap: 16px; margin: 0 0 30px; }
.sec-h .sub { color: var(--muted); font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { position: relative; padding: 22px 22px 20px; border-radius: var(--radius); background: rgba(255, 252, 242, .62); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 0 0 1px rgba(38, 38, 38, .07); overflow: hidden; }
.card .ic { height: 54px; display: flex; align-items: center; margin-bottom: 6px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--ink2); font-size: 14.5px; }
.card .wash { position: absolute; right: -30px; bottom: -40px; width: 160px; height: 130px; border-radius: 50%; background: radial-gradient(closest-side, rgba(38, 38, 38, .07), rgba(38, 38, 38, 0)); pointer-events: none; }

.film { display: grid; grid-template-columns: 1.35fr 1fr; gap: 34px; align-items: center; }
@media (max-width: 820px) { .film { grid-template-columns: 1fr; } }
.film a.cover { position: relative; display: block; border-radius: 16px; overflow: hidden; box-shadow: 0 14px 36px rgba(40, 28, 16, .2); }
.film a.cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s; }
.film a.cover:hover img { transform: scale(1.03); }
.film a.cover .play { position: absolute; left: 50%; top: 50%; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; background: rgba(38, 38, 38, .82); display: flex; align-items: center; justify-content: center; }
.film a.cover .play svg { width: 28px; height: 28px; margin-left: 4px; }
.film p { margin: 0 0 14px; color: var(--ink2); }

.plus { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 820px) { .plus { grid-template-columns: 1fr; } }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.perks li { position: relative; padding-left: 24px; }
.perks li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 8px; height: 10px; border-radius: 60% 60% 50% 50% / 70% 70% 40% 40%; background: var(--ink); transform: rotate(18deg); }
.price { font-size: 40px; font-weight: 800; letter-spacing: .01em; }
.price small { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.soon { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(194, 50, 31, .1); color: var(--seal); font-weight: 700; font-size: 13px; }

.faq details { border-top: 1px solid var(--faint); padding: 16px 4px; }
.faq details:last-child { border-bottom: 1px solid var(--faint); }
.faq summary { cursor: pointer; font-weight: 650; font-size: 16.5px; list-style: none; display: flex; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-flex; width: 22px; justify-content: center; font-weight: 400; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::before { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0 32px; color: var(--ink2); }
.faq code { background: rgba(38, 38, 38, .07); padding: 1px 6px; border-radius: 6px; font-size: .92em; }

/* 更新日志 */
.log { position: relative; padding-left: 26px; }
.log::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--ink), rgba(38, 38, 38, .1)); border-radius: 2px; }
.rel { position: relative; padding: 0 0 34px; }
.rel::before { content: ""; position: absolute; left: -25px; top: 7px; width: 14px; height: 16px; border-radius: 60% 60% 50% 50% / 70% 70% 40% 40%; background: var(--ink); transform: rotate(18deg); }
.rel h3 { margin: 0; font-size: 19px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.rel h3 .v { font-variant-numeric: tabular-nums; }
.rel h3 .d { color: var(--muted); font-weight: 500; font-size: 14px; }
.rel ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink2); }
.rel li { margin: 3px 0; }

footer { position: relative; z-index: 1; padding: 70px 0 50px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--faint); padding-top: 26px; }
footer a { color: var(--muted); }
footer .sp { flex: 1; }

/* 普通页（更新日志、隐私、付款） */
.page { position: relative; z-index: 1; padding: 56px 0 40px; min-height: 60vh; }
.page h1 { margin: 0 0 8px; line-height: 0; }
.page .lead { color: var(--muted); margin: 18px 0 36px; }
.prose { max-width: 720px; }
.prose h2 { font-size: 19px; margin: 34px 0 8px; }
.prose p, .prose li { color: var(--ink2); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .9, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* 购买、付款成功、404 */
.paycard { max-width: 560px; margin: 0 auto; padding: 34px 34px 28px; border-radius: 22px; background: rgba(255, 252, 242, .7); box-shadow: 0 0 0 1px rgba(38, 38, 38, .08), 0 18px 40px rgba(40, 28, 16, .12); }
.paycard h1 { margin: 0 0 4px; }
.paycard .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 6px; }
.paycard .bigprice { font-size: 44px; font-weight: 800; letter-spacing: .01em; }
.paycard .bigprice small { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.paycard [role=status] { min-height: 24px; color: var(--muted); font-size: 14.5px; }
.paycard .codebox { margin: 14px 0; padding: 18px; border-radius: 14px; background: #FFFDF6; box-shadow: inset 0 0 0 1.5px rgba(38, 38, 38, .2); text-align: center; }
.paycard #code { margin: 0; font: 800 26px/1.4 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .06em; user-select: all; word-break: break-all; }
.paycard small, .paycard .note { color: var(--muted); font-size: 13.5px; }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(38, 38, 38, .2); border-top-color: var(--ink); animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
