:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #383a43;
  background: #fbfbfc;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--module-color, #4e6fa7); outline-offset: 4px; }
[data-module="knowledge"], [data-column="knowledge"] { --module-color: #4e6fa7; --module-tint: #f0f4fc; --module-border: #dce5f5; }
[data-module="cases"], [data-column="cases"] { --module-color: #477c68; --module-tint: #eef7f2; --module-border: #d8eadd; }
[data-module="essays"], [data-column="essays"] { --module-color: #a47143; --module-tint: #fcf4eb; --module-border: #f0dfca; }
.workspace { max-width: 1180px; margin: 0 auto; padding: 64px 40px 40px; }
.site-header { padding: 0 12px; margin-bottom: 48px; }
.site-header h1 { margin: 0; font-size: 20px; font-weight: 550; letter-spacing: .01em; }
.site-header p { margin: 10px 0 0; font-size: 12px; color: #85808f; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: start; }
.column { min-width: 0; padding: 0 12px 24px; scroll-margin-top: 24px; }
.column-label { margin: 0 0 24px; text-align: center; color: var(--module-color); font-size: 14px; font-weight: 550; }
.column-switch { display: none; }
.note-list { list-style: none; display: grid; gap: 14px; margin: 0; padding: 0; }
.note-card { display: flex; flex-direction: column; justify-content: center; min-height: 76px; gap: 8px; padding: 20px 22px; border: 1px solid var(--module-border); border-radius: 15px; background: var(--module-tint); transition: border-color .18s; overflow-wrap: anywhere; }
.note-card:hover { border-color: var(--module-color); }
.note-title { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.7; }
.note-summary { margin: 0; font-size: 12px; line-height: 1.8; color: #737581; }
.note-date { font-size: 11px; color: #85808f; }
.empty-state { padding: 30px 20px; text-align: center; border: 1px dashed var(--module-border); border-radius: 15px; background: var(--module-tint); }
.empty-title { margin: 0 0 10px; font-size: 14px; color: var(--module-color); }
.empty-copy { margin: 0; font-size: 12px; line-height: 1.9; color: #85808f; }
.site-footer { margin: 56px 12px 0; font-size: 12px; color: #96929e; }
body.detail-open { overflow: hidden; }
.detail { position: fixed; inset: 0; margin: auto; width: min(92vw, 960px); height: 88dvh; max-width: calc(100vw - 48px); max-height: calc(100dvh - 48px); padding: 0; overflow: hidden; border: 1px solid var(--module-border); border-radius: 24px; background: var(--module-tint); color: inherit; box-shadow: 0 24px 100px #2721361a; }
.detail[open] { display: flex; flex-direction: column; }
.detail::backdrop { background: #25203633; backdrop-filter: blur(3px); }
.detail-top { display: flex; flex: 0 0 auto; justify-content: flex-end; padding: 10px 18px; }
.close-detail { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--module-color); cursor: pointer; font-size: 28px; font-weight: 300; }
.close-detail:hover { background: var(--module-border); }
.detail-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 48px 48px; }
.reader { max-width: 820px; margin: 0 auto; padding: 48px 32px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 24px; font-size: 13px; color: var(--module-color); }
.reader > .note-date { display: block; margin: 0 0 16px; }
.prose { max-width: 700px; margin: 0 auto; font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: 26px; line-height: 1.5; margin-bottom: 28px; }
.prose h2 { font-size: 21px; margin: 32px 0 16px; }
.prose h3 { font-size: 18px; margin: 24px 0 12px; }
.prose :is(h1, h2, h3, h4, a) { color: var(--module-color); }
.prose p { margin: 0 0 20px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose img { display: block; max-width: 100%; height: auto; }
.prose blockquote { margin: 20px 0; padding: 2px 18px; border-left: 3px solid var(--module-border); color: #737581; }
.prose pre { overflow-x: auto; padding: 18px; background: #ffffffa6; border-radius: 8px; font-size: 13px; line-height: 1.7; }
.prose :not(pre) > code { padding: 2px 5px; background: var(--module-tint); border-radius: 4px; font-size: .9em; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.prose td, .prose th { padding: 8px 12px; border: 1px solid var(--module-border); }
.prose hr { margin: 28px 0; border: 0; border-top: 1px solid var(--module-border); }
@media (max-width: 720px) {
  .workspace { padding: 0 0 calc(32px + env(safe-area-inset-bottom, 0px)); }
  .site-header { margin: 0; padding: calc(28px + env(safe-area-inset-top, 0px)) 24px 24px; }
  .site-header h1 { font-size: 18px; }
  .column-switch { display: flex; position: sticky; top: 0; z-index: 1; gap: 8px; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); background: #fbfbfc; }
  .column-switch a { display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; min-height: 44px; border-radius: 14px; font-size: 14px; color: var(--module-color); }
  .column-switch a[aria-current="true"] { background: var(--module-tint); box-shadow: inset 0 0 0 1px var(--module-border); }
  .board { display: flex; gap: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .board::-webkit-scrollbar { display: none; }
  .column { flex: 0 0 100%; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); scroll-snap-align: start; scroll-margin-top: 72px; }
  .column-label { display: none; }
  .note-card { padding: 18px 20px; border-radius: 14px; }
  .note-title { font-size: 15px; }
  .empty-state { padding: 36px 20px; }
  .site-footer { margin: 32px 24px 0; }
  .detail { inset: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); margin: 0; width: auto; height: auto; max-width: none; max-height: none; border: 0; border-radius: 0; }
  .detail-top { padding: 8px max(12px, env(safe-area-inset-right, 0px)); }
  .detail-scroll { padding: 8px max(24px, env(safe-area-inset-right, 0px)) 32px max(24px, env(safe-area-inset-left, 0px)); }
  .reader { padding: calc(20px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px)); }
  .prose h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
