*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

/* 霞鹜文楷屏幕版，只留站里用到的字，改了文案要重新生成（见 README） */
@font-face { font-family: "LXGW WenKai Screen"; src: url("fonts/wenkai-subset.woff2?v=2") format("woff2"); font-display: swap; }

:root {
  --paper: #E9ECF1;
  --card: #F8F9FB;
  --ink: #1A1F2B;
  --muted: #667085;
  --line: #D2D7DF;
  --tone: #CF9764;
  --hand: "LXGW WenKai Screen", "Kaiti SC", "STKaiti", serif;
  --sans: "Noto Sans SC", -apple-system, "PingFang SC", system-ui, sans-serif;
}
body {
  background: color-mix(in srgb, var(--tone) 10%, var(--paper));
  color: var(--ink);
  font: 400 15px/1.7 var(--sans);
  transition: background-color .9s ease;
  -webkit-font-smoothing: antialiased;
}
[data-lang="zh"] .en { display: none !important; }
[data-lang="en"] .zh { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lang { position: fixed; right: 20px; top: 16px; z-index: 50; font-size: 13px; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.lang:hover { color: var(--ink); }

/* 子页面的顶栏 */
.top { max-width: 1180px; margin: 0 auto; padding: 18px 40px; display: flex; align-items: center; gap: 28px; }
.top .home { font: 400 26px/1 var(--hand); text-decoration: none; }
.top nav { display: flex; gap: 20px; font-size: 14px; color: var(--muted); }
.top nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current] { color: var(--ink); border-color: var(--tone); }
.page { max-width: 1180px; margin: 0 auto; padding: 40px 40px 80px; }
.page-head { max-width: 40em; margin-bottom: 48px; }
.page-head h1 { font: 400 clamp(40px, 5vw, 60px)/1.15 var(--hand); margin: 0 0 14px; }
.page-head p { margin: 0; font-size: 17px; color: #4A5263; }
.foot { max-width: 1180px; margin: 0 auto; padding: 28px 40px 48px; color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* 前后对比 */
.cmp { position: relative; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: #C9CED6; --p: 50%; touch-action: pan-y; }
.cmp.portrait { aspect-ratio: 2 / 3; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp .before { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.cmp .bar { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08); pointer-events: none; }
.cmp .bar::after { content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; background: #fff no-repeat center / 18px; box-shadow: 0 2px 10px rgba(0,0,0,.25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1F2B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-5 6 5 6M15 6l5 6-5 6'/%3E%3C/svg%3E"); }
.cmp .tag { position: absolute; bottom: 12px; font-size: 12px; color: #fff; background: rgba(20,22,30,.5);
  padding: 3px 10px; border-radius: 999px; backdrop-filter: blur(6px); pointer-events: none; }
.cmp .tag.l { left: 12px; } .cmp .tag.r { right: 12px; }
.cmp input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

/* 提示词块 */
.prompt { border-radius: 12px; background: color-mix(in srgb, var(--c, var(--tone)) 12%, #fff); padding: 14px 16px; }
.prompt .row1 { display: flex; gap: 14px; align-items: flex-start; }
.prompt .mood { margin: 0; flex: 1; font: 400 17px/1.6 var(--hand); }
.prompt pre { white-space: pre-wrap; font: 400 14px/1.8 var(--sans); margin: 12px 0 0; color: #3A4152; }
.prompt details summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-top: 8px; width: max-content; }
.copy { flex: none; font-size: 13px; padding: 6px 12px; border-radius: 8px; background: var(--ink); color: #fff; white-space: nowrap; }
.copy:hover { background: color-mix(in srgb, var(--c, var(--tone)) 55%, var(--ink)); }

.todo { color: #9A6B1E; background: #FBF1DD; padding: 1px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; }
.idcopy { font: 500 13px/1 var(--sans); padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; white-space: nowrap; }
.idcopy:hover { border-color: var(--ink); }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none;
  border-bottom: 1.5px solid var(--c, var(--tone)); padding-bottom: 1px; }

@media (max-width: 860px) {
  .top { padding: 14px 16px; gap: 16px; padding-right: 84px; flex-wrap: wrap; }
  .top nav { gap: 14px; }
  .page { padding: 24px 16px 56px; }
  .page-head { margin-bottom: 32px; }
  .page-head p { font-size: 16px; }
  .foot { padding: 24px 16px 40px; }
  .lang { top: 12px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
