:root { color-scheme: dark; --notes-bg: #171320; --notes-text: #eee8e1; --notes-muted: #bcb3cb; --notes-gold: #efda7e; --notes-line: #50465d; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.notes-page { margin: 0; min-height: 100vh; color: var(--notes-text); background: radial-gradient(ellipse at 80% 0, #302139 0, transparent 55%), var(--notes-bg); font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif; line-height: 1.9; overflow-wrap: anywhere; }
a { color: var(--notes-gold); text-underline-offset: .3em; text-decoration-thickness: 1px; }
a:hover { color: #fff4bd; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--notes-gold); outline-offset: 5px; }
button, input, textarea, select { font: inherit; }
button, input[type=submit], .notes-new { cursor: pointer; }
.notes-skip { position: absolute; top: -100px; left: 1rem; z-index: 5; background: var(--notes-bg); padding: .6rem 1rem; }
.notes-skip:focus { top: 1rem; }
.notes-header { max-width: 1240px; margin: 0 auto; padding: 2rem 4rem; display: flex; justify-content: space-between; gap: 2rem; align-items: center; border-bottom: 1px solid var(--notes-line); }
.notes-wordmark { font-family: Georgia, "Times New Roman", serif; color: var(--notes-text); letter-spacing: .15em; font-size: 1.2rem; line-height: 1.45; text-decoration: none; }
.notes-wordmark span { display: block; font-size: .64rem; letter-spacing: .32em; }
.notes-header nav { display: flex; gap: 2rem; font-size: .94rem; }
.notes-header nav a { text-decoration: none; padding: .3rem 0; border-bottom: 1px solid transparent; }
.notes-header nav a[aria-current] { border-color: var(--notes-gold); }
.notes-main { width: min(100% - 3rem, 880px); margin: 0 auto; padding: 5rem 0 6rem; }
.notes-title { margin-bottom: 2.8rem; }
.notes-eyebrow { color: var(--notes-muted); font-size: .75rem; letter-spacing: .16em; margin: 0 0 1rem; }
h1 { font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.5; letter-spacing: .07em; margin: 0; }
.notes-search { max-width: 600px; margin: 0 0 2rem; }
.notes-search label { display: block; color: var(--notes-muted); font-size: .85rem; margin-bottom: .4rem; }
.notes-search-row { display: flex; gap: .75rem; }
.notes-search input[type=search] { min-width: 0; flex: 1; padding: .7rem .9rem; color: var(--notes-text); border: 1px solid var(--notes-line); background: #141019; border-radius: 2px; font-family: sans-serif; font-size: .95rem; }
.notes-search button, .notes-editor-form input[type=submit] { border: 1px solid #7e7152; border-radius: 2px; color: var(--notes-gold); background: #241d2d; padding: .65rem 1.2rem; min-height: 44px; }
.notes-search button:hover, .notes-editor-form input[type=submit]:hover { background: #3b3044; }
.notes-search-summary { font-size: .9rem; color: var(--notes-muted); }
.notes-search-summary a { margin-left: .8rem; }
.note-index-entry { padding: 2rem 0; border-bottom: 1px solid var(--notes-line); }
.note-kicker { color: var(--notes-muted); font-size: .75rem; letter-spacing: .1em; margin: 0 0 .4rem; }
.note-index-entry h2 { font-size: 1.35rem; font-weight: 500; margin: 0 0 .5rem; }
.note-index-entry h2 a { color: var(--notes-text); text-decoration: none; }
.note-index-entry h2 a:hover { color: var(--notes-gold); }
.note-excerpt { color: var(--notes-muted); margin: .5rem 0; font-size: .94rem; }
.note-tags { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.note-tag { font-family: sans-serif; font-size: .78rem; text-decoration: none; padding: .25rem 0; }
.notes-empty { color: var(--notes-muted); padding: 3rem 0; border-block: 1px solid var(--notes-line); }
.notes-pagination { display: flex; flex-wrap: wrap; gap: 1.2rem; padding: 1.8rem 0; font-size: .88rem; }
.notes-pagination span { color: var(--notes-muted); }
.notes-footer { max-width: 1120px; margin: 0 auto; border-top: 1px solid var(--notes-line); padding: 2rem 1.5rem; text-align: center; font-size: .8rem; color: var(--notes-muted); }
.notes-footer p { margin-bottom: 0; font-family: Georgia, serif; letter-spacing: .07em; }
.note-reading { max-width: 780px; }
.note-back { display: inline-block; margin-bottom: 2.5rem; font-size: .87rem; }
.note-date { color: var(--notes-muted); font-family: sans-serif; font-size: .78rem; margin-top: 1.3rem; }
.note-toc { border-block: 1px solid var(--notes-line); padding: 1.3rem 0; margin: 0 0 3.5rem; }
.note-toc h2 { font-size: .9rem; font-weight: 400; margin: 0 0 .5rem; color: var(--notes-muted); }
.note-toc ol { margin: 0; padding-left: 1.5rem; font-size: .94rem; }
.note-toc li { padding: .15rem 0; }
.note-toc-sub { margin-left: 1.2rem; }
.note-prose { font-size: 1.04rem; line-height: 2.15; }
.note-prose h2, .note-prose h3 { font-weight: 500; line-height: 1.6; scroll-margin-top: 2rem; }
.note-prose h2 { font-size: 1.5rem; margin: 3.5rem 0 1.3rem; color: var(--notes-gold); }
.note-prose h3 { font-size: 1.2rem; margin: 2.5rem 0 1rem; }
.note-prose p { margin: 1.4rem 0; }
.note-prose ul { padding-left: 1.5rem; }
.note-prose ol { padding-left: 1.8rem; }
.note-prose blockquote { margin: 1.5rem 0; border-left: 3px solid var(--notes-line); padding: .2rem 1.2rem; }
.note-prose a { overflow-wrap: anywhere; }
.note-prose .note-image { margin: 2rem 0; max-width: 100%; }
.note-prose .note-image > img { display: block; width: 100%; height: auto; max-width: 100%; }
.note-prose .note-image-size-small { width: min(100%, 20rem); }
.note-prose .note-image-size-medium { width: min(100%, 36rem); }
.note-prose .note-image-size-full { width: 100%; }
.note-prose figcaption { margin-top: .6rem; font-size: .9rem; line-height: 1.8; }
.note-prose .note-inline-icon { width: 1.5em; height: 1.5em; object-fit: contain; vertical-align: -.3em; }
img[data-note-media-src][hidden], [data-note-media-fallback][hidden] { display: none !important; }
.note-neighbors { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; border-top: 1px solid var(--notes-line); margin-top: 5rem; padding-top: 2rem; }
.note-neighbors a { display: block; font-size: 1rem; text-decoration: none; }
.note-neighbors a[rel=next] { grid-column: 2; text-align: right; }
.note-neighbors span { display: block; color: var(--notes-muted); font-size: .74rem; margin-bottom: .3rem; }
.notes-admin-main { max-width: 1240px; margin: auto; padding: 3rem 3rem 5rem; }
.notes-editor-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; }
.notes-editor-index { font-family: sans-serif; font-size: .9rem; }
.notes-new { display: block; padding: .8rem .3rem; border-bottom: 1px solid var(--notes-line); text-decoration: none; }
.notes-editor-index ol { margin: .6rem 0 0; padding: 0; list-style: none; }
.notes-editor-index li a { display: block; padding: .9rem .6rem; text-decoration: none; border-left: 2px solid transparent; color: var(--notes-text); }
.notes-editor-index a[aria-current] { border-color: var(--notes-gold); background: #2b2235; }
.notes-editor-index small { display: block; color: var(--notes-muted); margin-top: .35rem; line-height: 1.6; }
.notes-editor-form { min-width: 0; font-family: "Yu Gothic", Meiryo, sans-serif; }
.note-field { min-width: 0; margin: 1.5rem 0; }
.note-field label { display: block; margin-bottom: .45rem; }
.note-field input, .note-field select, .note-field textarea { display: block; width: 100%; min-width: 0; border: 1px solid #665971; border-radius: 2px; background: #141019; color: var(--notes-text); padding: .65rem .75rem; font-size: 1rem; }
.note-field textarea { resize: vertical; line-height: 1.8; }
.note-field input[readonly] { color: var(--notes-muted); background: #211b29; }
.note-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.note-field-row .note-field { margin-bottom: 0; }
.note-help { color: var(--notes-muted); font-size: .78rem; line-height: 1.8; margin: .5rem 0; }
.note-publication-state { color: var(--notes-gold); margin-top: 0; }
.note-public-link { font-size: .85rem; }
.notes-editor-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.5rem 0 .7rem; }
.notes-editor-form input.note-primary { color: #1b1423; background: var(--notes-gold); }
.notes-editor-form input.note-primary:hover { background: #fff0ab; }
.note-status { border-left: 3px solid var(--notes-gold); background: #2d2637; padding: 1rem; margin-bottom: 1.5rem; font-size: .9rem; }
.note-status-error { border-color: #eaa1b4; color: #ffd7e1; }
.notes-preview-action { margin: 2rem 0 1rem; }
.notes-draft-preview { border-top: 1px solid var(--notes-line); padding-top: 1.5rem; }
.notes-draft-preview > h2 { font-size: .9rem; color: var(--notes-muted); font-weight: 400; }
.note-preview-title { font-family: "Yu Mincho", serif; font-size: 1.5rem; font-weight: 500; }
.notes-draft-preview .note-prose { font-family: "Yu Mincho", serif; }
@media (max-width: 760px) {
  .notes-header { padding: 1.3rem 1.5rem; gap: 1.2rem; flex-wrap: wrap; }
  .notes-header nav { gap: 1.5rem; font-size: .88rem; }
  .notes-main { padding-top: 3rem; padding-bottom: 4rem; }
  .notes-title { margin-bottom: 2rem; }
  .note-reading { width: min(100% - 3rem, 780px); }
  .note-prose { font-size: 1rem; line-height: 2; }
  .notes-admin-main { padding: 2rem 1.5rem 4rem; }
  .notes-editor-layout { display: flex; flex-direction: column; gap: 2rem; }
  .notes-editor-index ol { max-height: 200px; overflow: auto; }
  .note-field-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 380px) {
  .notes-header { padding-inline: 1rem; }
  .notes-main, .note-reading { width: calc(100% - 2rem); }
  .notes-search-row { gap: .4rem; }
  .notes-search button { padding-inline: .8rem; }
  .notes-admin-main { padding-inline: 1rem; }
  .note-neighbors { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body.notes-page { color: #111; background: #fff; }
  .notes-header, .notes-footer, .note-toc, .note-neighbors, .note-back { display: none; }
  .notes-main { width: 100%; padding: 0; }
  .note-prose h2, .note-prose h3, .notes-eyebrow, .note-date { color: #111; }
  a { color: #111; }
}
