:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: #f6f2ff;
  background: #10101b;
  --muted: #afaac4;
  --violet: #c0adff;
  --border: #2d2b40;
  --surface: #191827;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; }
body:has(dialog[open]) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a[href] { cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, video:focus-visible, audio:focus-visible {
  outline: 2px solid #d4c4ff;
  outline-offset: 4px;
}
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.12em; height: 1.12em; display: inline-block; flex: none; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; padding: 10px 14px; background: #ded2ff; color: #1c1231; z-index: 5; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.topbar { border-bottom: 1px solid #ffffff0d; background: #11111c; }
.topbar-inner { min-height: 73px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.wordmark, .brand-name { display: flex; }
.wordmark { align-items: center; gap: 11px; width: fit-content; }
.brand-icon { width: 39px; height: auto; flex: none; }
.brand-name { flex-direction: column; gap: 4px; font-size: .95rem; line-height: 1.1; font-weight: 800; letter-spacing: .07em; white-space: nowrap; }
.brand-name small { font-size: .59rem; font-weight: 750; color: #aaa0c5; letter-spacing: .16em; }
.nav { display: flex; min-height: 73px; gap: clamp(18px, 3vw, 43px); }
.nav a { position: relative; display: grid; place-items: center; min-width: 38px; font-size: .89rem; white-space: nowrap; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: #e9ddff; }
.nav a[aria-current]::after { content: ""; position: absolute; inset: auto 3px 0; height: 2px; border-radius: 5px 5px 0 0; background: #c4aeff; }
.about-link { justify-self: end; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border: 1px solid var(--border); border-radius: 9px; color: #dcd5ef; font-size: .86rem; white-space: nowrap; }
.about-link:hover { border-color: #8170ac; background: #201b31; }

.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 396px; margin-top: 28px; padding: 48px 52px; overflow: hidden; border: 1px solid #4a3b5a; border-radius: 23px; background: #1a172b; }
.hero-picture, .hero::after { position: absolute; inset: 0; }
.hero-picture { z-index: -2; }
.hero-picture img { width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.hero::after { content: ""; z-index: -1; background: linear-gradient(90deg, #141122f0 0%, #151023d9 25%, #17112580 48%, #1511220a 77%), linear-gradient(0deg, #110d1d60 0%, transparent 30%); }
.hero-content { position: relative; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid #bb9ff350; border-radius: 100px; background: #3c2b5c69; color: #e0cbff; font-size: .83rem; font-weight: 700; letter-spacing: .08em; }
.hero-kicker .icon { color: #d0aaff; }
.hero h1 { margin-top: 18px; font-size: clamp(2.5rem, 5.3vw, 4.5rem); font-weight: 850; line-height: 1.08; letter-spacing: .02em; white-space: nowrap; }
.hero-description { margin-top: 17px; color: #ded5ec; font-size: 1.06rem; line-height: 1.85; letter-spacing: .04em; }
.hero-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; margin-top: 25px; padding: 9px 17px; border-radius: 10px; background: #c1aaff; color: #221736; font-size: .9rem; font-weight: 800; box-shadow: 0 6px 22px #120d2b5c; transition: background .18s, transform .18s; }
.hero-link:hover { background: #d5c4ff; transform: translateY(-2px); }
.hero-caption { position: absolute; right: 19px; bottom: 17px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid #ffffff2b; border-radius: 7px; color: #fff2f6; background: #181121ac; font-size: .76rem; }

.journal { margin-top: 41px; scroll-margin-top: 24px; }
.section-header h2 { display: flex; align-items: center; gap: 10px; font-size: 1.75rem; letter-spacing: .03em; }
.section-header .icon { width: .8em; height: .8em; color: var(--violet); }
.section-header p { margin-top: 9px; color: var(--muted); font-size: .94rem; line-height: 1.7; }
.filter-bar { margin: 19px 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; scroll-margin-top: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 13px; border: 1px solid var(--border); border-radius: 8px; background: #171625; color: #c7c0da; font-size: .87rem; font-weight: 650; white-space: nowrap; }
.filters button:hover { border-color: #8473b4; color: #f2e8ff; }
.filters button[aria-pressed="true"] { border-color: #8270ba; background: #302448; color: #e4d1ff; }
.post-count { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); transition: border-color .2s, transform .2s; }
.post:hover, .post:focus-within { border-color: #786593; }
.post:hover { transform: translateY(-3px); }
.post-cover { position: relative; display: block; width: 100%; aspect-ratio: 1.95; overflow: hidden; border: 0; padding: 0; background: #282139; color: #fff; }
.post-cover:focus-visible { outline-offset: -4px; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-cover:hover img { transform: scale(1.04); }
.post-cover::after { position: absolute; z-index: 0; inset: 0; content: ""; background: linear-gradient(0deg, #130d2470, transparent 34%); pointer-events: none; }
.post-cover-placeholder { background: radial-gradient(ellipse at 68% 24%, #805782, transparent 65%), linear-gradient(135deg, #2e2552, #542b5c 62%, #282346); }
.post-cover-placeholder:hover { filter: brightness(1.12); }
.post-kind, .cover-note, .cover-action { position: absolute; z-index: 1; }
.post-kind { left: 12px; top: 12px; }
.post-kind, .type-label { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 4px 8px; border: 1px solid #ffffff24; border-radius: 6px; background: #211833e8; color: #ebd7ff; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.post[data-type="photo"] .post-kind, .type-label[data-type="photo"] { color: #ffe5cf; background: #412a36ee; }
.post[data-type="audio"] .post-kind, .type-label[data-type="audio"] { color: #d4e6ff; background: #202a4beb; }
.post[data-type="diary"] .post-kind, .type-label[data-type="diary"] { color: #e2f3ce; background: #293528ed; }
.cover-action { display: grid; place-items: center; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 49px; height: 49px; border: 1px solid #ffffff7d; border-radius: 50%; background: #21162a8c; backdrop-filter: blur(6px); font-size: 1.2rem; }
.post[data-type="video"] .cover-action .icon { transform: translateX(1px); }
.post[data-type="photo"] .cover-action { width: 33px; height: 33px; left: auto; right: 11px; top: 11px; transform: none; border-radius: 7px; font-size: .87rem; }
.cover-action:empty, .cover-note:empty { display: none; }
.cover-note { right: 10px; bottom: 10px; border-radius: 5px; padding: 4px 7px; color: #fff; background: #15111edb; font-size: .72rem; font-variant-numeric: tabular-nums; }
.post-content { padding: 16px 17px 19px; }
.post-content time { display: inline-flex; align-items: center; gap: 5px; color: #b5aacb; font-size: .78rem; font-variant-numeric: tabular-nums; }
.post-content h3 { margin: 7px 0 7px; font-size: 1.14rem; line-height: 1.35; letter-spacing: .035em; }
.post-title { color: #e4d7ff; font-weight: 750; text-decoration: underline; text-decoration-color: #9a83cb; text-underline-offset: .22em; }
.post-title:hover { color: #fcf8ff; text-decoration-color: currentColor; }
.post-content p { color: #c3bad4; font-size: .91rem; line-height: 1.65; }
.external-video-link { color: #d8c5ff; text-decoration: underline; text-underline-offset: .22em; }
.external-video-link:hover { color: #fcf8ff; }

.about { display: flex; align-items: flex-start; gap: 17px; margin-top: 42px; padding: 24px 26px; border: 1px solid var(--border); border-radius: 15px; background: #171625; scroll-margin-top: 24px; }
.about-icon { width: 45px; }
.about h2 { font-size: 1.22rem; }
.about p { max-width: 660px; margin-top: 8px; color: var(--muted); line-height: 1.8; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 83px; margin-top: 20px; color: var(--muted); font-size: .83rem; }
.footer a { display: inline-flex; align-items: center; gap: 5px; }
.footer a:hover { color: #e0ccff; }
.footer-dot { margin-inline: 3px; color: #a78bdb; }

dialog { width: min(760px, calc(100% - 30px)); max-height: calc(100dvh - 30px); overflow: auto; padding: 25px; border: 1px solid #54476d; border-radius: 17px; background: #1a1829; color: #f6f2ff; box-shadow: 0 20px 90px #0009; }
dialog::backdrop { background: #080610d9; backdrop-filter: blur(5px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entry-meta { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: .86rem; }
.icon-button { display: grid; place-items: center; flex: none; width: 39px; height: 39px; border: 1px solid #54476d; border-radius: 9px; color: #f0e9ff; background: #242039; font-size: 1rem; }
.icon-button:hover { background: #3a2b52; }
dialog h2 { margin: 6px 0 19px; font-size: clamp(1.5rem, 4vw, 2.15rem); line-height: 1.3; }
.entry-text { margin-top: 17px; color: #e1d8ef; font-size: 1rem; line-height: 1.85; }
.entry-video { display: block; width: 100%; max-height: 55dvh; aspect-ratio: 16 / 9; border-radius: 10px; background: #0e0d15; }
.entry-audio { display: block; width: 100%; height: 54px; }
.transcript { padding: 12px 15px; margin-top: 15px; border: 1px solid var(--border); border-radius: 8px; color: #e4d9f6; background: #211c32; }
.transcript summary { cursor: pointer; }
.media-error { margin-top: 10px; color: #ffcfcd; font-size: .9rem; }
.gallery { margin: 0; }
.gallery img { width: 100%; max-height: 55dvh; aspect-ratio: 3 / 2; object-fit: contain; background: #11101d; border-radius: 10px; }
.gallery-controls { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.gallery-caption { flex: 1; text-align: center; font-size: .9rem; color: #e1d7ef; line-height: 1.5; }
.gallery-controls small { display: block; margin-top: 3px; color: var(--muted); }

@media (max-width: 900px) {
  .shell { width: calc(100% - 48px); }
  .hero { min-height: 377px; padding-inline: 36px; }
  .post-grid { gap: 14px; }
  .post-content { padding-inline: 12px; }
}

@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .topbar-inner { min-height: 62px; gap: 10px; }
  .brand-icon { width: 34px; }
  .brand-name { font-size: .83rem; }
  .brand-name small { display: none; }
  .wordmark { gap: 6px; }
  .nav { min-height: 62px; gap: 12px; }
  .nav a { min-width: 30px; font-size: .83rem; }
  .about-link { padding: 7px; }
  .about-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .hero { min-height: 348px; margin-top: 17px; padding: 34px 23px; border-radius: 17px; }
  .hero-picture img { object-position: 63% center; }
  .hero::after { background: linear-gradient(90deg, #141122e8 0%, #151023bb 42%, #17112545 100%); }
  .hero h1 { font-size: clamp(1.1rem, 6.1vw, 2.75rem); }
  .hero-description { font-size: .99rem; }
  .hero-caption { right: 11px; bottom: 10px; }
  .journal { margin-top: 33px; }
  .section-header h2 { font-size: 1.46rem; }
  .filter-bar { margin-top: 17px; flex-wrap: wrap; gap: 10px; }
  .filters { gap: 5px; }
  .filters button { gap: 4px; padding-inline: 8px; font-size: .8rem; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-content h3 { font-size: 1.04rem; }
  .about { padding: 17px; }
  dialog { padding: 17px; }
}

@media (max-width: 460px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-content { padding: 15px; }
}

@media (max-width: 365px) {
  .topbar-inner { width: calc(100% - 20px); gap: 6px; }
  .wordmark .brand-icon { display: none; }
  .brand-name { font-size: .75rem; letter-spacing: .015em; }
  .nav { gap: 6px; }
  .nav a { min-width: 27px; }
  .hero-kicker { font-size: .75rem; }
  .filters button .icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
