/* ===== Hitotoki Note section — extends LP v3 design tokens ===== */

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.note-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
.note-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-card);
}
.note-thumb { aspect-ratio: 16 / 9; background: var(--c-line-soft); overflow: hidden; }
.note-thumb img { width: 100%; height: 100%; object-fit: cover; }
.note-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }

.note-badge {
  display: inline-block;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
  text-transform: uppercase;
  align-self: flex-start;
}
.note-badge--free { color: var(--c-accent); border: 1px solid var(--c-accent); }
.note-badge--paid { background: var(--c-accent); color: #fff; }

.note-title {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--c-ink);
  line-height: 1.6;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}
.note-excerpt {
  font-size: 12.5px;
  color: var(--c-ink-mute);
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--c-line-soft);
  gap: 12px;
}
.note-date { font-size: 10.5px; color: var(--c-ink-soft); letter-spacing: 0.08em; }

.note-btn {
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, filter .25s;
  white-space: nowrap;
}
.note-btn--free { background: transparent; color: var(--c-accent); border: 1px solid var(--c-accent); }
.note-btn--paid { background: var(--c-accent); color: #fff; border: 1px solid var(--c-accent); }
.note-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(44, 58, 90, .2);
  filter: brightness(1.05);
}

.note-skeleton {
  background: var(--c-line-soft);
  border-radius: var(--r-md);
  height: 320px;
  animation: notePulse 1.5s ease-in-out infinite;
}
@keyframes notePulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.note-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--c-ink-mute);
  font-size: 13px;
  padding: 60px 20px;
}

/* ---------- Article modal ---------- */
.note-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.note-modal-overlay.open { opacity: 1; pointer-events: all; }

.note-modal {
  background: var(--c-paper);
  border-radius: var(--r-lg);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 56px 56px 64px;
  position: relative;
  transform: translateY(20px);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.note-modal-overlay.open .note-modal { transform: translateY(0); }

.note-modal-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 36px; height: 36px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-ink-mute);
  font-size: 14px;
  transition: background .2s, color .2s;
}
.note-modal-close:hover { background: var(--c-line-soft); color: var(--c-ink); }

.note-modal-title {
  font-family: var(--ff-display);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 500;
  color: var(--c-ink);
  line-height: 1.55;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  padding-right: 36px;
}
.note-modal-body { font-size: 14.5px; color: var(--c-ink); line-height: 2.0; }
.note-modal-body p { margin: 0 0 1.4em; color: var(--c-ink-mute); }
.note-modal-body h2, .note-modal-body h3 {
  font-family: var(--ff-display);
  color: var(--c-ink);
  margin: 1.8em 0 0.7em;
  letter-spacing: 0.03em;
}
.note-modal-body h2 { font-size: 19px; }
.note-modal-body h3 { font-size: 16px; }
.note-modal-body img { max-width: 100%; height: auto; border-radius: var(--r-sm); margin: 1.4em 0; }
.note-modal-body a { color: var(--c-accent); text-decoration: underline; }
.note-modal-body ul, .note-modal-body ol {
  margin: 0 0 1.4em 1.6em;
  padding-left: 0;
  list-style: revert;
  color: var(--c-ink-mute);
}

@media (max-width: 960px) { .note-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .note-grid { grid-template-columns: 1fr; }
  .note-modal { padding: 40px 26px 48px; }
}
