/* 看见 · 样式。视觉规则见设计文档第 10 节，参考 prototype/index.html */
:root {
  --bg: #f7f6ef; --ink: #363531; --mute: #8b897f; --faint: #b8b5ab; --line: #d9d6cc;
  --ui: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --text: "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a18; --ink: #d9d6ce; --mute: #8a867d; --faint: #5d5a53; --line: #34322e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1a18; --ink: #d9d6ce; --mute: #8a867d; --faint: #5d5a53; --line: #34322e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--ui); font-size: 12px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
[hidden] { display: none !important; }

.k { color: var(--mute); }
.t { font-family: var(--text); }
.link { font-family: var(--text); font-size: 16px; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.err { font-family: var(--text); font-size: 13px; margin: 8px 0 0; }
.banner { margin: 0; padding: 8px 24px; border-bottom: .5px solid var(--line); color: var(--mute); }

/* 顶栏 */
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px 24px; }
.top nav { display: flex; gap: 18px; }
.top nav:last-child { justify-content: flex-end; }
.top nav a { color: var(--mute); }
.top nav a[aria-current], .top nav a:hover { color: var(--ink); }
.logo {
  display: block; width: 66px; height: 34px; background: var(--ink);
  -webkit-mask: url(icons/logo.svg) center / contain no-repeat;
  mask: url(icons/logo.svg) center / contain no-repeat;
}
main { padding: 0 24px 96px; }

/* 首页 */
.home { min-height: calc(100vh - 90px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px; align-items: end; padding-bottom: 32px; }
.date { font-family: var(--text); font-weight: 400; font-size: clamp(40px, 8vw, 88px); line-height: 1.05; margin: 0; }
.meta { display: flex; gap: 24px; margin: 18px 0 40px; }
.yday { align-self: end; justify-self: end; width: min(260px, 100%); }
.yday img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.yday p { margin: 6px 0 0; }

/* 引导、完成、关于 */
.text-page { max-width: 520px; padding-top: 14vh; }
.text-page h1 { font-family: var(--text); font-weight: 400; font-size: clamp(28px, 6vw, 44px); line-height: 1.3; margin: 12px 0 18px; }
.text-page .body { font-family: var(--text); font-size: 16px; line-height: 1.9; margin: 0 0 32px; }
.text-page .fine { color: var(--mute); line-height: 1.8; margin: 0 0 24px; }
.choices { display: flex; gap: 16px; margin: 0 0 28px; font-family: var(--text); font-size: 15px; }
.choices button { color: var(--mute); }
.choices button[aria-pressed="true"] { color: var(--ink); border-bottom: 1px solid var(--ink); }

/* 热身 */
.warm { max-width: 980px; margin: 24px auto 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 18px; }
.fig { position: relative; overflow: hidden; aspect-ratio: 1; background: var(--bg); }
.fig img { width: 100%; height: 100%; object-fit: cover; }
.fig.aged::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .6;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(45, 30, 15, .55) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.warm .q { font-family: var(--text); font-size: 20px; margin: 0 0 12px; }
.feel { display: flex; flex-wrap: wrap; gap: 4px 0; font-family: var(--text); font-size: 15px; }
.feel button { color: var(--mute); }
.feel button[aria-pressed="true"] { color: var(--ink); border-bottom: 1px solid var(--ink); }
.feel span { color: var(--faint); margin: 0 10px; }
.feel.locked button { pointer-events: none; }
.warm .go { margin: 18px 0 0; }
.ans { margin-top: 18px; font-family: var(--text); font-size: 15px; }
.ans p { margin: 0 0 8px; }

/* 慢看和单日回看 */
.look { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 40px; margin-top: 24px; }
.art img { width: 100%; max-height: calc(100vh - 120px); object-fit: contain; object-position: left top; cursor: zoom-in; }
.side { display: flex; flex-direction: column; min-height: 60vh; }
.side .q { font-family: var(--text); font-size: 22px; line-height: 1.5; margin: 14px 0 22px; }
.side input { width: 100%; border: 0; border-bottom: .5px solid var(--ink); border-radius: 0; background: transparent;
  color: var(--ink); font-family: var(--text); font-size: 16px; padding: 6px 0; outline: none; }
.side input::placeholder { color: var(--faint); }
.side .row { margin-top: auto; padding-top: 24px; }
.zoom { position: fixed; inset: 0; z-index: 10; background: var(--bg); display: grid; place-items: center; cursor: zoom-out; }
.zoom img { max-width: 100vw; max-height: 100vh; object-fit: contain; }

/* 展签 */
.label { max-width: 360px; }
.label h2 { font-family: var(--text); font-weight: 400; font-size: 18px; margin: 14px 0 2px; }
.label .by { color: var(--mute); margin: 0 0 16px; }
.label .notes { font-family: var(--text); font-size: 15px; line-height: 1.95; margin: 0 0 16px; }
.label .looks a { color: var(--mute); }
.label .looks a:hover { color: var(--ink); }
.yours { border-top: .5px solid var(--line); padding-top: 12px; margin-top: 20px; }
.yours .qa { margin: 8px 0 0; font-family: var(--text); font-size: 14px; }
.yours .like { margin: 6px 0 0; font-family: var(--text); font-size: 15px; }
.label + .go, .look .go { margin-top: 28px; }

/* 日记 */
.filters { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 20px 0 8px; }
.filters a { color: var(--mute); }
.filters a.on { color: var(--ink); }
.tools { display: flex; gap: 16px; margin: 0 0 28px; }
.tools button { color: var(--mute); }
.tools button:hover { color: var(--ink); }
.notice { font-family: var(--text); font-size: 14px; margin: 0 0 24px; }
.notice button { border-bottom: 1px solid currentColor; margin: 0 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 36px 20px; }
.grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.grid .n { margin: 8px 0 0; color: var(--mute); font-size: 11px; }
.grid .ti { font-family: var(--text); font-size: 13px; margin: 0; }
.grid .say { font-family: var(--text); font-size: 12px; color: var(--mute); margin: 2px 0 0; }
.grid .gone { aspect-ratio: 4 / 5; border: .5px solid var(--line); }

@media (max-width: 720px) {
  .top { padding: 14px 16px; }
  .top nav { gap: 12px; }
  main { padding: 0 16px 96px; }
  .home { grid-template-columns: 1fr; align-items: start; min-height: auto; padding-top: 18vh; }
  .yday { justify-self: start; width: 55%; margin-top: 40px; }
  .look { grid-template-columns: 1fr; gap: 8px; margin-top: 4px; }
  .art { margin: 0 -16px; }
  .side { min-height: auto; }
  .warm .q { font-size: 18px; }
}
