/* ============================================================
   Blog — note風の白基調UI
   ============================================================ */

:root {
  --n-text: #08131a;
  --n-text-sub: #757575;
  --n-line: #e6e6e6;
  --n-bg: #ffffff;
  --n-bg-soft: #f5f5f5;
  --n-accent: #08131a;
  --n-suki: #e0245e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--n-bg);
  color: var(--n-text);
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- header ---------- */

.n-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--n-line);
}

.n-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.n-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.n-back {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--n-accent);
  padding: 9px 18px;
  border-radius: 999px;
  transition: opacity 0.15s;
}

.n-back:hover { opacity: 0.8; }

.n-header-nav { display: flex; align-items: center; gap: 10px; }

.n-write {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--n-text);
  border: 1px solid var(--n-line);
  padding: 8px 18px;
  border-radius: 999px;
  transition: border-color 0.15s;
}

.n-write:hover { border-color: var(--n-text); }

.n-edit-link {
  font-size: 13px;
  color: var(--n-text-sub);
  text-decoration: none;
  margin-left: 18px;
}

.n-edit-link:hover { color: var(--n-text); }

/* ---------- timeline (一覧) ---------- */

.n-timeline {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

.n-timeline-head { margin-bottom: 24px; }

.n-timeline-title {
  font-size: 22px;
  font-weight: 800;
}

/* カテゴリタブ */
.n-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.n-cats:empty { display: none; }

.n-cat-tab {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--n-text-sub);
  background: var(--n-bg-soft);
  border: 1px solid transparent;
  padding: 7px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.n-cat-tab:hover { color: var(--n-text); }

.n-cat-tab.active {
  background: var(--n-text);
  color: #fff;
}

/* 記事ページのカテゴリ表示 */
.n-art-cat {
  margin-left: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--n-text-sub);
  background: var(--n-bg-soft);
  padding: 2px 12px;
  border-radius: 999px;
  text-decoration: none;
}

.n-art-cat:hover { color: var(--n-text); }

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

.n-card {
  background: #fff;
  border: 1px solid var(--n-line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s;
}

.n-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.n-card-img {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  display: block;
  background: var(--n-bg-soft);
}

.n-card-body {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.n-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.n-card-excerpt {
  margin-top: 8px;
  font-size: 13px;
  color: var(--n-text-sub);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.n-card-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--n-text-sub);
}

.n-card-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4655, #ff8a5c);
  flex: none;
}

.n-card-heart { margin-left: auto; display: flex; align-items: center; gap: 4px; }

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

/* ---------- article (記事) ---------- */

.n-article {
  max-width: 680px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}

.n-eyecatch {
  margin-bottom: 32px;
  border-radius: 12px;
  overflow: hidden;
}

.n-eyecatch img { width: 100%; display: block; }

.n-article-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
}

.n-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--n-line);
  margin-bottom: 40px;
}

.n-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4655, #ff8a5c);
  flex: none;
}

.n-author-name { font-size: 14px; font-weight: 700; }

.n-article-date { font-size: 12.5px; color: var(--n-text-sub); }

/* ---------- 本文 ---------- */

.n-body {
  font-size: 16.5px;
  line-height: 2.0;
  letter-spacing: 0.02em;
}

.n-body p { margin: 0 0 1.8em; }

.n-body h2 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.6;
  margin: 2.2em 0 0.9em;
}

.n-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 2em 0 0.8em;
}

.n-body strong { font-weight: 700; }

.n-body a { color: #0f83fd; text-decoration: none; }
.n-body a:hover { text-decoration: underline; }

.n-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 0.5em 0 1.8em;
  display: block;
}

.n-body ul, .n-body ol { margin: 0 0 1.8em; padding-left: 1.5em; }
.n-body li { margin-bottom: 0.4em; }

.n-body blockquote {
  border-left: 3px solid #d0d0d0;
  padding-left: 18px;
  color: #555;
  margin: 0 0 1.8em;
}

.n-body pre {
  background: #f4f4f4;
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  margin: 0 0 1.8em;
  font-family: Consolas, "Courier New", monospace;
}

.n-body code {
  background: #f4f4f4;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.88em;
  font-family: Consolas, "Courier New", monospace;
}

.n-body pre code { background: none; padding: 0; }

.n-body hr {
  border: none;
  text-align: center;
  margin: 2.5em 0;
}

.n-body hr::before {
  content: "＊＊＊";
  color: #bbb;
  letter-spacing: 0.6em;
  font-size: 13px;
}

/* ---------- tags / suki ---------- */

.n-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 20px;
}

.n-tag {
  font-size: 13px;
  color: var(--n-text-sub);
  background: var(--n-bg-soft);
  padding: 5px 14px;
  border-radius: 999px;
}

.n-actions {
  display: flex;
  align-items: center;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--n-line);
}

.n-suki {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--n-line);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--n-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.n-suki:hover { border-color: var(--n-suki); }

.n-suki-heart { font-size: 17px; line-height: 1; transition: transform 0.15s; }

.n-suki.liked { border-color: var(--n-suki); color: var(--n-suki); }
.n-suki.liked .n-suki-heart { transform: scale(1.15); }

.n-suki-count { color: var(--n-text-sub); font-weight: 600; }
.n-suki.liked .n-suki-count { color: var(--n-suki); }

/* ---------- comments ---------- */

.n-comments { padding-top: 32px; }

.n-comments-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 20px;
}

.n-comments-count {
  margin-left: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--n-text-sub);
}

.n-comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--n-line);
}

.n-comment-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.n-comment-name { font-size: 13.5px; font-weight: 700; }

.n-comment-time { font-size: 12px; color: var(--n-text-sub); }

.n-comment-del {
  margin-left: auto;
  font-size: 12px;
  color: var(--n-text-sub);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.n-comment-del:hover { color: #e0245e; }

.n-comment-body {
  font-size: 14.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.n-comment-like {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--n-text-sub);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 2px 0;
}

.n-comment-like:hover { color: var(--n-suki); }

.n-comment-like.liked { color: var(--n-suki); font-weight: 700; }

.n-comment-empty { font-size: 13.5px; color: var(--n-text-sub); padding: 6px 0 14px; }

.n-comment-form { margin-top: 18px; }

.n-comment-form input,
.n-comment-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--n-line);
  border-radius: 10px;
  outline: none;
  margin-bottom: 10px;
  resize: vertical;
}

.n-comment-form input { max-width: 260px; display: block; }

.n-comment-form input:focus,
.n-comment-form textarea:focus { border-color: var(--n-text); }

.n-comment-form-foot { display: flex; justify-content: flex-end; }

.n-comment-submit {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--n-text);
  border: none;
  border-radius: 999px;
  padding: 10px 26px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.n-comment-submit:hover { opacity: 0.82; }

.n-comment-submit:disabled { opacity: 0.4; cursor: default; }

.n-article-footer { padding-top: 28px; }

.n-back-link {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--n-text-sub);
}

.n-back-link:hover { color: var(--n-text); }

/* ---------- footer ---------- */

.n-footer {
  border-top: 1px solid var(--n-line);
  padding: 26px 20px 48px;
  text-align: center;
  color: var(--n-text-sub);
  font-size: 12.5px;
}

@media (max-width: 600px) {
  .n-article-title { font-size: 24px; }
  .n-body { font-size: 16px; }
}
