:root {
  color-scheme: light;
  --paper: #fbfaf8;
  --ink: #1b0905;
  --muted: #655b55;
  --accent: #1b0905;
  --rule: #8a817b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent); color: white; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-shell { max-width: 1600px; min-height: 100dvh; margin: 0 auto; border-left: 1px dashed var(--rule); border-right: 1px dashed var(--rule); display: flex; flex-direction: column; }
.site-header { min-height: 82px; padding: 0 clamp(20px, 4.5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px dashed var(--rule); }
.brand { font-size: 30px; font-weight: 900; letter-spacing: -.075em; line-height: 1; text-decoration: none; }
.brand-dot, .title-period { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.site-header nav a { font-size: 18px; font-weight: 700; text-decoration: none; }
.site-header nav a:hover { opacity: .6; }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.post-page .site-header { min-height: 62px; }
.post-page .brand { font-size: 24px; }
.post-page .site-header nav a { font-size: 16px; }
.site-footer { margin-top: auto; min-height: 82px; padding: 22px clamp(20px, 4.5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px dashed var(--rule); font-size: 17px; font-weight: 700; }
.site-footer span:first-child { font-size: 24px; font-weight: 900; letter-spacing: -.07em; }

.post-row { min-height: 150px; padding: 28px clamp(20px, 4.5vw, 72px); display: grid; grid-template-columns: 60px minmax(0, 1fr) 36px; align-items: center; gap: 24px; border-bottom: 1px dashed var(--rule); text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.post-row:has(.post-thumbnail) { position: relative; padding-right: 0; grid-template-columns: 60px minmax(0, 1fr) 250px; }
.post-row:has(.post-thumbnail) .post-number, .post-row:has(.post-thumbnail) .post-summary { position: relative; z-index: 1; }
.post-row:hover { background: var(--ink); color: var(--paper); }
.post-row:hover .post-number, .post-row:hover .post-arrow { color: var(--paper); }
.post-number { color: var(--muted); font-size: 24px; font-weight: 900; letter-spacing: -.07em; }
.post-summary { display: flex; flex-direction: column; align-items: start; }
.post-meta { margin-bottom: 10px; font-size: 17px; font-weight: 700; }
.post-summary strong { max-width: 65ch; font-size: clamp(25px, 2.2vw, 32px); letter-spacing: -.055em; line-height: 1.14; }
.post-arrow { color: var(--muted); font-size: 32px; line-height: 1; font-weight: 400; justify-self: end; }
.post-thumbnail { position: absolute; top: 0; right: 0; display: block; width: 340px; height: 100%; object-fit: cover; object-position: center top; -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 20%, #000 58%); mask-image: linear-gradient(to right, transparent 0%, transparent 20%, #000 58%); }

.article-page { width: 100%; }
.article-header { padding: 22px clamp(20px, 4.5vw, 72px) 0; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--muted); font-size: 15px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--accent); }
.article-meta { display: flex; gap: 12px 28px; flex-wrap: wrap; margin-bottom: 8px; color: var(--muted); font-size: 15px; font-weight: 700; }

.music-pick { width: fit-content; max-width: 100%; min-height: 76px; margin-bottom: 2em; padding: 10px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--ink); background: #f0ece7; }
.music-cover { position: relative; flex: 0 0 54px; width: 54px; height: 54px; overflow: hidden; background: #d5cec7; }
.music-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-circle { position: absolute; display: block; border: 8px solid var(--accent); border-radius: 50%; }
.cover-circle-one { width: 70px; height: 70px; left: -29px; top: -24px; }
.cover-circle-two { width: 46px; height: 46px; right: -18px; bottom: -14px; border-width: 6px; }
.cover-center { position: absolute; display: block; width: 8px; height: 8px; left: 23px; top: 23px; border-radius: 50%; background: var(--paper); }
.music-info { min-width: 0; }
.music-info h2 { margin: 0 0 4px; font-size: 15px; font-weight: 900; letter-spacing: -.025em; }
.music-info p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.2; }
.music-info p strong { color: var(--ink); }
.music-track { color: var(--muted); font-size: 14px; line-height: 1.2; }
.music-track strong { color: var(--ink); }
.music-track a:hover { text-decoration: none; }
.music-separator { padding: 0 3px; }
.music-placeholder { margin-left: auto; padding: 6px 10px; border: 1px solid var(--rule); color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.music-link { flex: 0 0 32px; display: block; width: 32px; height: 32px; margin-left: auto; border-radius: 50%; }
.music-link svg { display: block; }
.music-link:hover { opacity: .75; }

.article-layout { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; padding: 32px clamp(20px, 4.5vw, 72px) 110px; }
.article-body { max-width: 760px; font-size: clamp(20px, 1.7vw, 23px); line-height: 1.65; letter-spacing: -.018em; }
.article-body #post-blocks > p { margin: 0 0 1.35em; white-space: pre-line; }
.article-body h1 { margin: 0 0 1em; font-size: clamp(26px, 2.5vw, 35px); font-weight: 700; line-height: 1.32; letter-spacing: -.05em; }
.article-body #post-blocks > h2 { margin: 2em 0 .65em; font-size: clamp(36px, 4vw, 58px); font-weight: 900; letter-spacing: -.07em; line-height: 1.04; white-space: pre-line; }
.article-body #post-blocks > blockquote { margin: 1.7em 0; padding: 8px 0 8px 26px; border-left: 7px solid var(--accent); font-size: clamp(30px, 3.5vw, 48px); font-weight: 900; letter-spacing: -.06em; line-height: 1.15; white-space: pre-line; }
.article-body #post-blocks > .post-image { margin: 1.8em 0; }
.post-image img { display: block; width: auto; max-width: 100%; height: auto; }
.post-image figcaption { margin-top: 9px; color: var(--muted); font-size: 15px; line-height: 1.4; letter-spacing: 0; }
.article-body #post-blocks > .post-gallery { margin: 1.8em 0; min-width: 0; }
.gallery-track { display: flex; width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery-track > .post-image { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery-track > .post-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #f0ece7; }
.gallery-track figcaption { padding: 0 4px 8px; overflow-wrap: anywhere; }
.gallery-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 10px; }
.gallery-controls button, .gallery-edit-button { border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: 8px 14px; font: inherit; font-size: 16px; cursor: pointer; }
.gallery-controls button:hover:not(:disabled), .gallery-edit-button:hover { background: var(--ink); color: var(--paper); }
.gallery-controls button:disabled { opacity: .35; cursor: default; }
.gallery-controls button:focus-visible, .gallery-edit-button:focus-visible, .gallery-track:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.gallery-count { min-width: 65px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.gallery-edit-button { display: block; margin: 12px auto 0; font-size: 14px; font-weight: 700; }
.gallery-editor-list { list-style: none; margin: 16px 0; padding: 0; }
.gallery-editor-list > li { padding: 14px 0; border-top: 1px dashed var(--rule); }
.gallery-editor-list > li > img { display: block; width: 140px; height: 90px; object-fit: contain; margin-bottom: 12px; background: var(--paper); }
.gallery-editor input[hidden] { display: none; }
.gallery-editor > strong { font-size: 16px; }
.editing-post [data-edit-title], .editing-post #post-blocks > p, .editing-post #post-blocks > h2, .editing-post #post-blocks > blockquote { cursor: text; border-radius: 3px; outline: 1px dashed transparent; outline-offset: 6px; }
.editing-post [data-edit-title]:hover, .editing-post #post-blocks > p:hover, .editing-post #post-blocks > h2:hover, .editing-post #post-blocks > blockquote:hover { outline-color: var(--rule); background: #f0ece7; }
.editing-post #post-blocks > .post-image { cursor: pointer; outline: 1px dashed transparent; outline-offset: 6px; }
.editing-post #post-blocks > .post-image:hover { outline-color: var(--rule); }
.editing-post .music-pick { cursor: pointer; outline: 1px dashed transparent; outline-offset: 6px; }
.editing-post .music-pick:hover { outline-color: var(--rule); }
.music-pick[hidden] { display: none; }
.editor-toolbar { margin: 22px 0 0; padding: 18px; border: 1px solid var(--ink); background: #f0ece7; display: flex; flex-direction: column; gap: 12px; }
.editor-label { font-size: 15px; font-weight: 900; }
.private-tag { display: inline-block; padding: 3px 7px; border: 1px solid currentColor; font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; text-transform: uppercase; }
.private-tag[hidden] { display: none; }
.editor-label .private-tag { margin-left: 8px; vertical-align: 1px; }
.post-summary .private-tag { margin-bottom: 8px; }
.editor-toolbar-actions, .inline-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-toolbar button, .inline-editor button { padding: 9px 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.editor-toolbar button:hover, .inline-editor button:hover { background: var(--ink); color: var(--paper); }
.editor-toolbar button.danger, .inline-editor button.danger { color: #9a2525; border-color: #9a2525; }
.editor-toolbar button.danger:hover, .inline-editor button.danger:hover { background: #9a2525; color: white; }
.editor-toolbar button:focus-visible, .inline-editor button:focus-visible, .inline-editor textarea:focus-visible, .inline-editor input:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.editor-toolbar button:disabled, .inline-editor button:disabled { opacity: .5; cursor: wait; }
.editor-status { min-height: 18px; color: var(--muted); font-size: 13px; }
.editor-status.error { color: #9a2525; }
.inline-editor { margin: 0 0 1.5em; padding: 12px; border: 1px solid var(--ink); background: #f0ece7; }
.inline-editor textarea { width: 100%; min-height: 100px; padding: 12px; border: 1px solid var(--rule); border-radius: 0; resize: vertical; background: var(--paper); color: var(--ink); font: inherit; line-height: 1.45; }
.image-editor label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.image-editor input { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-weight: 400; }
.inline-editor-actions { margin-top: 9px; }
.rich-text-field { min-height: 100px; padding: 12px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: inherit; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.rich-text-field:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.selection-tools { position: fixed; z-index: 100; display: flex; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--ink); box-shadow: 0 3px 12px #0002; }
.selection-tools[hidden], .word-image-preview[hidden] { display: none; }
.word-image { color: #8b3f76; text-decoration: underline dotted; text-underline-offset: .18em; cursor: pointer; }
.word-image:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.word-image-preview { position: fixed; z-index: 110; pointer-events: none; line-height: 0; }
.word-image-preview img { display: block; width: auto; height: auto; max-width: min(220px, calc(100vw - 16px)); max-height: min(160px, calc(100vh - 16px)); object-fit: contain; border-radius: 4px; box-shadow: 0 4px 16px #0003; }
.login-page { flex: 1; display: grid; place-items: center; padding: 56px clamp(20px, 4.5vw, 72px); }
.login-box { width: min(100%, 380px); display: flex; flex-direction: column; gap: 16px; }
.login-box[hidden] { display: none; }
.login-box h1 { margin: 0 0 8px; font-size: clamp(42px, 5vw, 58px); font-weight: 900; letter-spacing: -.07em; line-height: 1; }
.login-box p { margin: 0; font-size: 17px; line-height: 1.5; }
.login-box label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 700; }
.login-box input { padding: 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 17px; font-weight: 400; }
.login-box button, .login-primary { padding: 12px 16px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.login-box button[type="submit"], .login-primary { background: var(--ink); color: var(--paper); }
.login-box button:hover, .login-primary:hover { opacity: .8; }
.login-box button:disabled { opacity: .5; cursor: wait; }
.login-box input:focus-visible, .login-box button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.login-status { min-height: 1.5em; color: var(--muted); }
.login-status.error { color: #9a2525; }
.newsletter h2 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 42px); font-weight: 900; letter-spacing: -.06em; line-height: 1.05; }
.newsletter > p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.newsletter-fields { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; margin-top: 18px; }
.newsletter-fields input { flex: 1 1 220px; min-width: 0; padding: 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 17px; }
.newsletter-fields button { padding: 12px 18px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--paper); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.newsletter-fields button:hover { opacity: .8; }
.newsletter-fields button:disabled { opacity: .5; cursor: wait; }
.newsletter-fields input:focus-visible, .newsletter-fields button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.newsletter > .newsletter-status { min-height: 1.5em; margin-top: 10px; color: var(--ink); font-size: 15px; }
.newsletter > .newsletter-status.error { color: #9a2525; }
.newsletter-trap { position: absolute; left: -9999px; width: 1px; height: 1px; }
.blog-home .newsletter { padding: 34px clamp(20px, 4.5vw, 72px); }
.article-page .newsletter { margin: 0 clamp(20px, 4.5vw, 72px); padding: 30px 0 34px; border-top: 1px dashed var(--rule); }
.login-box.newsletter .newsletter-fields { margin-top: 0; }
.login-box.newsletter > .newsletter-status { margin-top: 0; }
.editor-toolbar button.primary { background: var(--ink); color: var(--paper); }
.editor-toolbar button.primary:hover { opacity: .8; }
.blog-editor-bar { margin: 0; padding: 16px clamp(20px, 4.5vw, 72px); flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px dashed var(--rule); }
.new-post-dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); }
.new-post-dialog::backdrop { background: rgb(27 9 5 / .45); }
.new-post-dialog h2 { margin: 0 0 18px; font-size: 32px; font-weight: 900; letter-spacing: -.06em; line-height: 1; }
.new-post-dialog label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 15px; font-weight: 700; }
.new-post-dialog input, .new-post-dialog textarea { padding: 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 17px; font-weight: 400; line-height: 1.5; }
.new-post-dialog textarea { min-height: 160px; resize: vertical; }
.new-post-status { min-height: 1.5em; margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.new-post-status.error { color: #9a2525; }
.new-post-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.new-post-actions button { padding: 11px 16px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.new-post-actions button.primary { background: var(--ink); color: var(--paper); }
.new-post-actions button:hover { opacity: .8; }
.new-post-actions button:disabled { opacity: .5; cursor: wait; }
.new-post-dialog input:focus-visible, .new-post-dialog textarea:focus-visible, .new-post-actions button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.article-end { padding: 0 clamp(20px, 4.5vw, 72px) 72px; }
.article-end a { display: block; padding: 28px 0; border-top: 1px dashed var(--rule); font-size: clamp(26px, 3vw, 42px); font-weight: 900; letter-spacing: -.06em; text-decoration: none; }
.article-end a:hover { color: var(--accent); }

@media (max-width: 700px) {
  .site-shell { border: 0; }
  .site-header { min-height: 72px; }
  .brand { font-size: 27px; }
  .site-header nav { gap: 20px; }
  .site-header nav a { font-size: 17px; }
  .post-page .site-header { min-height: 60px; }
  .post-page .brand { font-size: 23px; }
  .post-page .site-header nav a { font-size: 15px; }
  .post-row { min-height: 128px; padding: 22px 20px; grid-template-columns: 30px minmax(0, 1fr) 26px; gap: 12px; }
  .post-row:has(.post-thumbnail) { grid-template-columns: 30px minmax(0, 1fr) 100px; }
  .post-number { font-size: 18px; }
  .post-meta { font-size: 16px; margin-bottom: 8px; }
  .post-summary strong { font-size: clamp(25px, 7vw, 32px); }
  .post-arrow { font-size: 26px; }
  .post-thumbnail { width: 170px; }
  .article-header { padding-top: 18px; }
  .back-link { margin-bottom: 18px; font-size: 14px; }
  .article-meta { font-size: 14px; }
  .music-pick { min-height: 70px; padding: 9px; gap: 10px; }
  .music-cover { flex-basis: 48px; width: 48px; height: 48px; }
  .cover-center { left: 20px; top: 20px; }
  .music-placeholder { display: none; }
  .music-info h2 { font-size: 14px; }
  .music-info p { font-size: 13px; }
  .music-track { font-size: 13px; }
  .music-separator { display: none; }
  .music-info p span:last-child { display: block; }
  .music-track span:last-child { display: block; }
  .article-layout { display: block; padding-top: 28px; padding-bottom: 80px; }
  .article-body { font-size: 20px; }
  .article-body h1 { font-size: 27px; }
  .article-body blockquote { font-size: 34px; }
  .site-footer { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .post-row { transition: none; }
}
