/* Header: always centered */
.header-nav {
  justify-content: center !important;
}
.logo {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 !important;   /* override PaperMod's margin: auto 24px */
}
.logo a {
  font-size: 20px;
}
.logo-switches {
  margin-top: 2px;
}
/* No nav menu items on this site — remove ul from flex layout so it
   doesn't offset the logo. :empty won't match due to whitespace text nodes. */
#menu {
  display: none;
}
@media (max-width: 767px) {
  :root {
    --header-height: 48px;
  }
}

/* Post title size */
.post-title {
  font-size: 1.3rem;
}
@media (min-width: 768px) {
  .post-title {
    font-size: 1.5rem;
  }
}

/* Japanese-friendly font stack */
body, .post-content, .post-title, .entry-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Meiryo", sans-serif;
}

/* Top prev/next arrows */
.post-arrows {
  display: flex;
  justify-content: space-between;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.85rem;
}
.post-arrows a { color: var(--secondary, #888); text-decoration: none; }
.post-arrows a:hover { color: var(--primary, #333); }
.arrow-disabled { color: #ccc; }

/* Post images */
.post-images {
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  /* prevent flex children from overflowing on narrow viewports */
  min-width: 0;
}
.post-images img {
  max-width: 100%;
  width: 100%;       /* fills flex cell; natural size via height:auto */
  height: auto;
  border-radius: 4px;
  display: block;
}
.post-images.single img {
  max-width: min(600px, 100%);
  width: auto;
}

/* Attachment link-preview card */
.attachment-card {
  display: flex;
  gap: 1rem;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 6px;
  padding: 0.75rem;
  margin: 1rem 0;
  background: var(--entry, #f9f9f9);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  /* don't let the card itself expand beyond its container */
  max-width: 100%;
  box-sizing: border-box;
}
.attachment-card:hover {
  border-color: var(--primary, #aaa);
}
.attachment-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  max-width: 80px;
  object-fit: cover;
  border-radius: 4px;
  background: #ddd;
}
.attachment-body {
  min-width: 0;
}
.attachment-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary, #333);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment-desc {
  font-size: 0.8rem;
  color: var(--secondary, #666);
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.attachment-url {
  font-size: 0.75rem;
  color: var(--secondary, #888);
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Facebook — desktop link */
.fb-desktop-link {
  display: inline-block;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.85rem;
  color: var(--secondary, #666);
}
/* Facebook — mobile fallback message */
.fb-mobile-note {
  display: none;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.85rem;
  color: var(--secondary, #666);
}
@media (max-width: 768px) {
  .fb-desktop-link { display: none; }
  .fb-mobile-note  { display: block; }
}

/* Event info box */
.event-box {
  border-left: 4px solid #1877f2;
  background: var(--entry, #f0f4ff);
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.5rem;
  border-radius: 0 6px 6px 0;
}
.event-box h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}
.event-box .event-meta {
  font-size: 0.85rem;
  color: var(--secondary, #555);
}
.event-box .event-meta span {
  margin-right: 1rem;
}

/* Time machine navigation */
.time-machine {
  margin: 2.5rem 0 1rem;
  border-top: 1px solid var(--border, #e0e0e0);
  padding-top: 1.5rem;
}
.time-machine h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary, #888);
  margin-bottom: 1rem;
}

.tm-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tm-timeline li {
  font-size: 0.82rem;
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--border, #f0f0f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tm-timeline li a {
  color: inherit;
  text-decoration: none;
}
.tm-timeline li a:hover { text-decoration: underline; }
.tm-timeline .tm-date {
  color: var(--secondary, #888);
  margin-right: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.tm-current {
  font-weight: 600;
  background: var(--entry, #f5f5f5);
  border-radius: 3px;
}
.tm-this {
  font-weight: 400;
  color: var(--secondary, #888);
  font-size: 0.78rem;
  margin-left: 0.3rem;
}

/* Post list cards */
.entry-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.entry-text {
  flex: 1;
  min-width: 0;
}
.entry-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  /* sit behind the .entry-link overlay but still visible */
  position: relative;
  z-index: 1;
}

/* Browse / search pages */
.date-picker-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1.5rem 0;
}
.date-picker-form input[type="date"] {
  font-size: 1rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border, #ccc);
  border-radius: 4px;
}
.date-picker-form button {
  font-size: 1rem;
  padding: 0.4rem 1rem;
  background: var(--primary, #333);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Archive page */
.archive-year { margin-bottom: 2rem; }
.archive-year h2 { margin-bottom: 0.5rem; }
.archive-month { margin: 0.5rem 0 0.5rem 1rem; }
.archive-month h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.archive-post-list { list-style: none; padding: 0; margin: 0 0 0 1rem; }
.archive-post-list li { font-size: 0.85rem; padding: 0.15rem 0; }
.archive-post-list .a-date {
  color: var(--secondary, #888);
  font-variant-numeric: tabular-nums;
  margin-right: 0.5rem;
}
