body {
  background: #0d0d0d;
  color: #f0f0f0;
  font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  line-height: 1.9;
  max-width: 760px;
  margin: auto;
  padding: 2em;
  letter-spacing: 0.06em;
}

a {
  color: #d8d8d8;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.diary-header {
  text-align: center;
  margin-bottom: 2.5em;
}

.diary-header h1 {
  margin: 0;
  font-family: "Courier New", monospace;
  letter-spacing: 0.2em;
  font-size: 3em;
  filter: blur(0.4px);
}

.diary-header h1 a {
  text-decoration: none;
  color: #bbb;
}

.diary-header p {
  color: #777;
  font-size: 0.9em;
  margin-top: 0.8em;
}

.diary-site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2em;
  margin: 0.6em 0 0.4em;
  color: #777;
  font-size: 0.92em;
  letter-spacing: 0.12em;
}

.diary-site-nav a {
  color: #aaa;
  text-decoration: none;
  opacity: 0.78;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.diary-site-nav a:hover {
  color: #eee;
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}


.diary-main {
  margin-top: 2em;
}

.note-card {
  background: #111;
  border-left: 4px solid #333;
  padding: 1.2em 1.3em;
  margin: 0 0 1.4em;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02);
  overflow: hidden;
}

.note-date {
  display: block;
  color: #888;
  font-size: 0.82em;
  margin-bottom: 0.7em;
  font-family: "Courier New", monospace;
  letter-spacing: 0.08em;
}

.note-body {
  white-space: normal;
  word-break: break-word;
}


.link-card {
  display: block;
  max-width: 520px;
  margin-top: 1em;
  padding: 0.95em 1em;
  border: 1px solid #2a2a2a;
  border-radius: 0.65em;
  background: #0b0b0b;
  color: #ddd;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.link-card:hover {
  border-color: #444;
  background: #101010;
}

.link-card-domain,
.link-card-title,
.link-card-description {
  display: block;
}

.link-card-domain {
  color: #888;
  font-size: 0.78em;
  font-family: "Courier New", monospace;
  letter-spacing: 0.04em;
  margin-bottom: 0.35em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card-title {
  color: #e6e6e6;
  font-size: 0.98em;
  line-height: 1.65;
  letter-spacing: 0.04em;
}

.link-card-description {
  color: #999;
  font-size: 0.86em;
  line-height: 1.7;
  margin-top: 0.35em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card .note-media-grid {
  display: grid !important;
  gap: 0.35em;
  margin-top: 1em;
  width: min(100%, 520px) !important;
  max-width: 520px !important;
  border-radius: 0.7em;
  overflow: hidden;
  background: #050505;
  border: 1px solid #222;
}

.note-card .note-media-grid.media-count-1 {
  grid-template-columns: 1fr;
}

.note-card .note-media-grid.media-count-2,
.note-card .note-media-grid.media-count-4 {
  grid-template-columns: repeat(2, 1fr);
}

.note-card .note-media-grid.media-count-3 {
  grid-template-columns: repeat(2, 1fr);
}

.note-card .note-media-grid.media-count-3 .note-media-item:first-child {
  grid-row: span 2;
}

.note-card .note-media-item {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 1 / 1;
  background: #050505;
  overflow: hidden;
  cursor: default;
}

.note-card .media-count-1 .note-media-item {
  aspect-ratio: 16 / 10;
  max-height: 330px !important;
}

.note-card .note-media-item img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 330px !important;
  object-fit: cover;
}

.note-card .media-count-1 .note-media-item img {
  object-fit: contain;
  background: #050505;
}

.note-embeds {
  margin-top: 1em;
  max-width: 520px;
}

.youtube-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050505;
  overflow: hidden;
  border: 1px solid #222;
}

.youtube-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  border-top: 1px solid #222;
  margin-top: 2.5em;
  padding-top: 1.2em;
  font-size: 0.9em;
  color: #888;
}

.pager a {
  color: #bbb;
  text-decoration: none;
}

.pager a:hover {
  text-decoration: underline;
}

.pager-current {
  color: #777;
  font-family: "Courier New", monospace;
}

.diary-footer {
  text-align: center;
  margin-top: 4em;
  padding-top: 2em;
  border-top: 1px solid #222;
  font-size: 0.8em;
  opacity: 0.6;
}

.diary-footer a {
  color: inherit;
  text-decoration: none;
}

@media screen and (max-width: 600px) {
  body {
    padding: 1em;
    font-size: 1.16em;
    line-height: 2.08;
    letter-spacing: 0.055em;
  }

  .diary-header {
    margin-bottom: 2em;
  }

  .diary-header h1 {
    font-size: 2.2em;
  }

  .diary-site-nav {
    font-size: 1em;
    gap: 1em;
    margin: 0.5em 0 0.3em;
  }


  .diary-header p {
    font-size: 0.95em;
  }


  .link-card {
    max-width: 100%;
    padding: 0.9em 0.95em;
  }

  .link-card-title {
    font-size: 1em;
  }

  .link-card-description {
    font-size: 0.9em;
  }

  .note-card {
    padding: 1.05em;
    margin-bottom: 1.2em;
  }

  .note-date {
    font-size: 0.86em;
  }

  .note-body {
    font-size: 1.04em;
    line-height: 2.1;
  }

  .note-card .note-media-grid,
  .note-embeds {
    width: 100% !important;
    max-width: 100% !important;
  }

  .note-card .media-count-1 .note-media-item {
    max-height: 260px !important;
  }

  .note-card .note-media-item img {
    max-height: 260px !important;
  }

  .pager {
    font-size: 0.95em;
  }

  .diary-footer {
    font-size: 0.9em;
  }
}
