/* みんなのノート（/notes/・/authors/）。読み物としての作りは note に寄せる
   （白地・細い区切り線・文字は本文 18px / 行間 2・見出し 32px、カードは 1.91:1 のサムネ＋3行のタイトル）。
   ロゴ・色のアクセント・言葉は Kinapse のもの。 */

.is-notes {
  --n-text: #08131A;
  --n-sub: rgba(8, 19, 26, .66);
  --n-faint: rgba(8, 19, 26, .44);
  --n-line: rgba(8, 19, 26, .14);
  --n-bg-soft: #F5F8FA;
  --n-font: 'Helvetica Neue', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Arial, 'Noto Sans JP', Meiryo, sans-serif;
  font-family: var(--n-font);
  color: var(--n-text);
}
.is-notes .site-header { background: #fff; backdrop-filter: none; border-bottom: 1px solid var(--n-line); }
.is-notes h1, .is-notes h2, .is-notes h3 { font-family: var(--n-font); }

/* ---------- 一覧 ---------- */
.n-page { padding: 24px 0 96px; }
.n-wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

.n-search { position: relative; margin: 8px 0 14px; }
.n-search input { width: 100%; font: inherit; font-size: 15px; padding: 11px 14px 11px 42px; border: 1px solid var(--n-line); border-radius: 8px; background: #fff; color: var(--n-text); }
.n-search input:focus { outline: 2px solid var(--mint-200); border-color: var(--mint); }
.n-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--n-faint); }

.n-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.n-chips::-webkit-scrollbar { display: none; }
.n-chip { flex: none; font-size: 14px; font-weight: 700; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--n-line); background: #fff; color: var(--n-text); text-decoration: none; line-height: 1.4; }
.n-chip:hover { background: var(--n-bg-soft); }
.n-chip[aria-current='page'] { background: var(--n-text); border-color: var(--n-text); color: #fff; }

.n-intro { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 20px; margin: 10px 0 8px; padding: 16px 18px; border-radius: 8px; background: var(--n-bg-soft); font-size: 14px; color: var(--n-sub); }
.n-intro strong { color: var(--n-text); }
.n-intro a { font-weight: 700; color: var(--mint-700); text-decoration: none; white-space: nowrap; }

.n-section { margin-top: 36px; }
.n-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.n-section-head h2 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.n-section-head h2 a { color: inherit; text-decoration: none; }
.n-section-head .chev { color: var(--n-faint); font-size: 18px; }
.n-title-lg { font-size: 26px; font-weight: 700; margin: 14px 0 4px; }
.n-lead { color: var(--n-sub); font-size: 14px; margin-bottom: 8px; }

.n-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px 24px; }

.n-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--n-text); min-width: 0; }
.n-thumb { position: relative; aspect-ratio: 1.91 / 1; border-radius: 6px; overflow: hidden; display: grid; place-items: center; padding: 14px 16px; }
.n-thumb::after { content: ''; position: absolute; right: -18px; bottom: -22px; width: 92px; height: 92px; background: url('/assets/img/kinapse-mark.svg') no-repeat center / contain; opacity: .14; }
.n-thumb-title { position: relative; z-index: 1; font-weight: 700; font-size: 14px; line-height: 1.55; text-align: center; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.n-thumb.t-guide { background: linear-gradient(135deg, #E9F8F4, #CDEFE6); }
.n-thumb.t-clinical { background: linear-gradient(135deg, #F2FBF8, #DDF3EC); }
.n-thumb.t-paper { background: linear-gradient(135deg, #FFFBEA, #FFEFB0); }
.n-thumb.t-ai { background: linear-gradient(135deg, #EEF3F7, #D7EEE8); }
.n-card-title { font-size: 16px; font-weight: 700; line-height: 1.5; letter-spacing: .05em; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.n-card:hover .n-card-title { text-decoration: underline; text-underline-offset: 3px; }
.n-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--n-sub); min-width: 0; }
.n-meta .n-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-meta time { flex: none; color: var(--n-faint); }
.n-avatar { width: 20px; height: 20px; border-radius: 50%; flex: none; overflow: hidden; background: var(--mint-100); display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--mint-700); }
.n-avatar img { width: 100%; height: 100%; object-fit: cover; }
.n-avatar.md { width: 40px; height: 40px; font-size: 16px; }
.n-avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.n-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--n-sub); }

.n-empty { padding: 40px 0; text-align: center; color: var(--n-sub); }
.n-noresult { padding: 24px 0; color: var(--n-sub); }

/* ---------- 記事 ---------- */
.n-article { padding: 0 0 96px; }
.n-col { width: min(620px, 100% - 32px); margin-inline: auto; }
.n-cover { width: min(960px, 100%); margin: 0 auto; }
.n-cover .n-thumb { border-radius: 0; padding: 28px; }
.n-cover .n-thumb-title { font-size: clamp(18px, 2.6vw, 28px); max-width: 640px; }
.n-cover .n-thumb::after { width: 200px; height: 200px; right: -30px; bottom: -40px; }
.n-article h1 { font-size: 32px; line-height: 1.5; letter-spacing: .04em; font-weight: 700; margin: 48px 0 18px; }
.n-byline { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--n-text); }
.n-byline-name { font-size: 15px; font-weight: 700; }
.n-byline-sub { font-size: 13px; color: var(--n-sub); }
.n-date { font-size: 13px; color: var(--n-sub); margin: 14px 0 0; }
.n-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.n-tags a { font-size: 13px; color: var(--n-sub); text-decoration: none; padding: 4px 12px; border-radius: 999px; background: var(--n-bg-soft); }
.n-tags a:hover { color: var(--n-text); }

.n-body { font-size: 18px; line-height: 2; color: var(--n-text); margin-top: 40px; word-break: break-word; }
.n-body p { margin: 36px 0; }
.n-body > :first-child { margin-top: 0; }
.n-body h2 { font-size: 24px; line-height: 1.6; letter-spacing: .04em; font-weight: 700; margin: 64px 0 -12px; }
.n-body h3 { font-size: 20px; line-height: 1.8; letter-spacing: .04em; font-weight: 700; margin: 54px 0 -18px; }
.n-body a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.n-body strong { font-weight: 700; }
.n-body ul, .n-body ol { margin: 36px 0; padding-left: 1.5em; }
.n-body li + li { margin-top: 6px; }
.n-body blockquote { margin: 36px 0; padding: 0 0 0 20px; border-left: 3px solid var(--n-line); color: var(--n-sub); }
.n-body blockquote p { margin: 0; }
.n-body blockquote p + p { margin-top: 12px; }
.n-body hr { border: 0; text-align: center; margin: 48px 0; }
.n-body hr::after { content: '・・・'; color: var(--n-faint); letter-spacing: .4em; }
.n-body code { font-size: .88em; background: var(--n-bg-soft); border-radius: 4px; padding: 2px 6px; }
.n-body pre { font-size: 14px; line-height: 1.7; background: var(--n-bg-soft); border-radius: 8px; padding: 16px; overflow-x: auto; }
.n-body pre code { background: none; padding: 0; }
.n-body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.7; margin: 36px 0; display: block; overflow-x: auto; }
.n-body th, .n-body td { border: 1px solid var(--n-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.n-body th { background: var(--n-bg-soft); font-weight: 700; white-space: nowrap; }

.n-refs { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--n-line); }
.n-refs h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.n-refs ol { padding-left: 1.4em; font-size: 14px; line-height: 1.8; color: var(--n-sub); display: grid; gap: 12px; margin: 0; }
.n-refs .ref-links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; margin-top: 2px; }
.n-refs .ref-links a { color: var(--mint-700); }

.n-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding: 14px 0; border-top: 1px solid var(--n-line); border-bottom: 1px solid var(--n-line); }
.n-act { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 0; background: transparent; color: var(--n-text); font: 700 13px/1 var(--n-font); text-decoration: none; cursor: pointer; }
.n-act:hover { background: var(--n-bg-soft); }
.n-act svg { width: 18px; height: 18px; }
.n-act-primary { background: var(--mint-50); color: var(--mint-700); }
.n-act-primary:hover { background: var(--mint-100); }
.n-act-note { font-size: 12px; color: var(--n-faint); margin-top: 10px; }

.n-author { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; margin-top: 40px; padding: 22px; border-radius: 8px; background: var(--n-bg-soft); }
.n-author h3 { font-size: 16px; font-weight: 700; }
.n-author .n-author-sub { font-size: 13px; color: var(--n-sub); }
.n-author p { font-size: 14px; color: var(--n-sub); margin-top: 8px; line-height: 1.8; }
.n-author a.more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--mint-700); text-decoration: none; }
.n-disclaimer { margin-top: 28px; font-size: 12px; color: var(--n-faint); line-height: 1.8; }
.n-related { margin-top: 72px; padding-top: 8px; border-top: 1px solid var(--n-line); }

/* ---------- 書き手 ---------- */
.n-profile { text-align: center; padding: 40px 0 28px; border-bottom: 1px solid var(--n-line); }
.n-profile .n-avatar { margin: 0 auto 14px; }
.n-profile h1 { font-size: 24px; font-weight: 700; }
.n-profile .roman { display: block; font-size: 13px; color: var(--n-sub); font-weight: 400; margin-top: 2px; }
.n-profile .n-profile-title { font-size: 14px; color: var(--n-sub); margin-top: 6px; }
.n-profile .badges { justify-content: center; }
.n-profile-bio { font-size: 15px; line-height: 2; color: var(--n-text); margin: 24px 0; }
.n-profile-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 8px; }
.n-profile-cols h2 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.n-profile-cols ul { margin: 0; padding-left: 1.2em; font-size: 14px; color: var(--n-sub); line-height: 1.9; }

/* ---------- スマホ ---------- */
@media (max-width: 720px) {
  .n-page { padding-top: 16px; }
  .n-grid { grid-template-columns: 1fr 1fr; gap: 24px 14px; }
  /* トップの段は note のように横にすべらせる */
  .n-row { display: flex; gap: 14px; overflow-x: auto; margin-inline: -16px; padding: 0 16px 6px; scroll-padding-inline: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .n-row::-webkit-scrollbar { display: none; }
  .n-row .n-card { flex: 0 0 64%; scroll-snap-align: start; }
  .n-card-title { font-size: 15px; }
  .n-article h1 { font-size: 24px; margin-top: 28px; }
  .n-body { font-size: 16px; line-height: 2; margin-top: 28px; }
  .n-body p { margin: 28px 0; }
  .n-body h2 { font-size: 20px; margin-top: 48px; }
  .n-body h3 { font-size: 18px; margin-top: 40px; }
  .n-intro { grid-template-columns: 1fr; }
  .n-profile-cols { grid-template-columns: 1fr; }
  .n-author { grid-template-columns: 1fr; }
  .n-cover .n-thumb { padding: 20px; }
}
@media (max-width: 380px) {
  .n-grid { grid-template-columns: 1fr; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.n-card[hidden], .js-sec[hidden] { display: none; }
