.notes-main { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding-bottom: 70px; }
body[data-page-type="notes"] .chapter-menu-button { display: none; }
.notes-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; padding: 40px 0 28px; border-bottom: 1px solid var(--line); }
.notes-intro h1 { margin: 0; font: 800 clamp(44px, 5.1vw, 60px)/1.16 var(--font-serif); letter-spacing: -.03em; }
.notes-period { color: var(--accent); }
.notes-lede { margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.9; }
.notes-mobile-break { display: none; }
.notes-intro-aside { display: flex; flex-direction: column; align-items: flex-start; padding: 0 0 6px 34px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.notes-intro-number { color: var(--forest); font: 500 76px/1 Georgia, serif; margin-bottom: 12px; }
.notes-intro-number span { margin-left: 9px; font: 400 15px var(--font-sans); }
.notes-intro-date { margin-top: 4px; font-size: 12px; }
.notes-intro-aside a { margin-top: 22px; color: var(--ink); font-size: 13px; border-bottom: 1px solid var(--line); }
.notes-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; }
.notes-toolbar[hidden] { display: none; }
.notes-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.notes-filters button { min-height: 38px; border: 1px solid transparent; border-radius: 4px; padding: 6px 12px; color: var(--muted); background: transparent; font-size: 13px; cursor: pointer; white-space: nowrap; }
.notes-filters button:hover { color: var(--ink); background: var(--surface); }
.notes-filters button[aria-pressed="true"] { color: var(--surface); background: var(--ink); }
.notes-filters button span { margin-left: 5px; opacity: .7; font-size: 11px; }
.notes-search { position: relative; width: 190px; flex: none; }
.notes-search svg { position: absolute; left: 10px; top: 12px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.notes-search input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); padding: 0 10px 0 34px; font-size: 13px; }
.notes-wall-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 22px; font-size: 12px; color: var(--muted); }
.notes-wall-heading p { margin: 0; }
.notes-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.notes-wall.is-masonry { grid-auto-rows: 8px; row-gap: 0; }
.note-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.note-card:hover { border-color: color-mix(in srgb, var(--forest) 45%, var(--line)); box-shadow: 0 8px 26px #1f30270a; }
.note-card[hidden] { display: none; }
.note-art { position: relative; display: block; background: #f6f1e5; overflow: hidden; cursor: zoom-in; }
.note-art img { display: block; width: 100%; height: auto; }
.note-art-hint { display: inline-flex; align-items: center; gap: 6px; position: absolute; right: 12px; bottom: 12px; background: #fffefbeF; border: 1px solid #d8d5cd; border-radius: 3px; padding: 5px 9px; color: #263b30; font-size: 11px; opacity: 0; transform: translateY(3px); transition: opacity .2s, transform .2s; }
.note-art:hover .note-art-hint, .note-art:focus-visible .note-art-hint { opacity: 1; transform: none; }
.note-art-hint svg, .note-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.note-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 20px 20px 13px; }
.note-caption > span { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.note-caption > span:first-child { color: var(--accent); }
.note-caption h2 { width: 100%; margin: 0; color: var(--ink); font: 650 18px/1.55 var(--font-serif); }
.note-actions { display: flex; align-items: center; gap: 16px; padding: 0 20px 16px; }
.note-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; padding: 6px 0; color: var(--forest); font-size: 12px; cursor: pointer; min-height: 36px; }
.note-actions button:hover { color: var(--accent); }
.note-actions a { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.note-actions button:disabled { opacity: .5; cursor: progress; }
.note-text { border-top: 1px solid var(--line); font-size: 13px; }
.note-text summary { padding: 10px 20px; color: var(--muted); cursor: pointer; font-size: 11px; }
.note-text ol { margin: 0; padding: 6px 24px 22px 38px; }
.note-text li + li { margin-top: 16px; }
.note-text li > a { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.note-text p { margin: 6px 0; }
.note-text small { color: var(--muted); }
.notes-bottom-note { margin: 36px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.notes-empty { padding: 80px 0; text-align: center; color: var(--muted); }
.notes-empty p { font: 700 28px var(--font-serif); color: var(--ink); }
.notes-empty button { display: block; margin: 24px auto 0; padding: 8px 18px; background: var(--ink); color: var(--surface); border: 0; border-radius: 4px; cursor: pointer; }
.note-dialog, .note-share-dialog { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 0; box-shadow: 0 24px 100px #0004; }
.note-dialog::backdrop, .note-share-dialog::backdrop { background: #101b16bd; backdrop-filter: blur(5px); }
.note-dialog { width: min(800px, calc(100vw - 36px)); max-width: none; max-height: calc(100dvh - 40px); overflow: hidden; }
.note-dialog[open] { display: flex; flex-direction: column; }
.note-dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--line); flex: none; }
.note-dialog-bar span { font-size: 10px; color: var(--accent); }
.note-dialog-bar h2 { font-size: 16px; margin: 3px 0 0; line-height: 1.5; }
.note-close { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; font-size: 26px; line-height: 1; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; }
.note-view-scroll { overflow: auto; min-height: 0; overscroll-behavior: contain; background: #e8e4d8; }
.note-view-scroll img { display: block; width: 100%; height: auto; }
.note-dialog-text { background: var(--surface); }
.note-dialog-text .note-text { font-size: 15px; }
.note-dialog-text summary { padding: 15px 24px; font-size: 13px; }
.note-dialog-text ol { padding: 8px 32px 28px 48px; }
.note-dialog-actions { display: flex; justify-content: center; align-items: center; flex: none; gap: 10px; padding: 14px 20px 7px; }
.note-dialog-actions button, .note-dialog-actions a, .note-share-actions button { min-height: 42px; padding: 9px 20px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; }
.note-dialog-actions button:first-child, .note-share-actions button:first-child { background: var(--forest); color: var(--paper); border-color: var(--forest); }
.note-save-hint { margin: 0; padding: 0 16px 12px; font-size: 11px; text-align: center; color: var(--muted); flex: none; }
.note-share-dialog { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; text-align: left; overflow-y: auto; overscroll-behavior: contain; }
.note-share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.note-share-head h2 { margin: 0; font-size: 18px; }
.note-share-head .note-close { width: 34px; height: 34px; }
.note-share-dialog > p { margin: 18px 0 8px; font-size: 14px; }
.caption-intro { color: var(--muted); }
.caption-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 0; }
.caption-channels button { min-height: 64px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); padding: 10px 14px; text-align: center; font-size: 14px; font-weight: 650; cursor: pointer; }
.caption-channels button span { display: block; font-size: 11px; font-weight: 400; margin-top: 3px; opacity: .8; }
.caption-channels button:hover { border-color: var(--forest); color: var(--forest); }
.caption-channels button:disabled, .note-share-actions button:disabled { opacity: .6; cursor: wait; }
.caption-manual { display: block; margin: 12px 0; color: var(--accent); font-size: 12px; }
.caption-manual[hidden] { display: none; }
.caption-manual textarea { display: block; width: 100%; margin-top: 7px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 11px 13px; font: 16px/1.8 var(--font-sans); resize: vertical; }
.note-share-actions { display: flex; gap: 10px; margin: 16px 0 0; }
.note-share-actions button { flex: 1; }
.note-share-dialog output { display: block; color: var(--forest); font-size: 12px; margin-top: 12px; }
.note-share-dialog output:empty { display: none; }
.notes-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 150; width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: var(--paper); border-radius: 5px; padding: 12px 20px; font-size: 13px; box-shadow: 0 4px 24px #0002; pointer-events: none; }
.notes-toast:empty { display: none; }
@media (max-width: 1050px) { .notes-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } .notes-toolbar { align-items: flex-start; } .notes-filters { max-width: 540px; } }
@media (max-width: 640px) {
  .notes-main { width: calc(100% - 36px); padding-bottom: 42px; }
  .notes-intro { padding: 42px 0 28px; gap: 22px; align-items: flex-start; }
  .notes-intro .section-label { font-size: 10px; margin-bottom: 14px; }
  .notes-intro h1 { font-size: clamp(32px, 8.7vw, 44px); }
  .notes-lede { font-size: 14px; line-height: 1.85; margin-top: 16px; }
  .notes-mobile-break { display: inline; }
  .notes-intro-aside { display: none; }
  .notes-toolbar { display: block; padding: 20px 0 15px; }
  .notes-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
  .notes-filters button { min-height: 40px; font-size: 12px; padding: 6px 11px; }
  .notes-search { display: block; width: 100%; margin-top: 6px; }
  .notes-search input { font-size: 16px; height: 44px; }
  .notes-search svg { top: 14px; }
  .notes-wall { grid-template-columns: minmax(0, 1fr); }
  .notes-wall-heading { font-size: 11px; margin-bottom: 18px; }
  .note-art-hint { opacity: 1; transform: none; }
  .note-actions button, .note-actions a { font-size: 13px; min-height: 44px; }
  .note-caption h2 { font-size: 20px; }
  .note-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .note-dialog-bar { padding: 12px 14px; }
  .note-dialog-bar h2 { font-size: 14px; }
  .note-dialog-actions { padding: 12px 10px 8px; gap: 8px; }
  .note-dialog-actions button, .note-dialog-actions a { padding: 8px 12px; font-size: 12px; }
  .notes-bottom-note { text-align: left; }
  .note-share-dialog { width: min(420px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); padding: 18px; }
  .note-share-head h2 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .note-card, .note-art-hint { transition: none; } }
