/* ============================================================
   Photo Diary — public front pages
   ============================================================ */

/* ---------- List page (Instagram / SNS style) ---------- */
:is(.pcu95front, .pcu95top) .pd-page__main {
  background: linear-gradient(180deg, #faf8f6 0%, #f4f6f8 48%, #f8fafc 100%);
}

:is(.pcu95front, .pcu95top) .pd-page__section {
  padding-bottom: 48px;
}

:is(.pcu95front, .pcu95top) .pd-list-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -8px 0 20px;
}

:is(.pcu95front, .pcu95top) .pd-list-sub__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
}

:is(.pcu95front, .pcu95top) .pd-list-sub__lead--solo {
  margin: -8px 0 20px;
}

:is(.pcu95front, .pcu95top) .pd-list-sub__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

:is(.pcu95front, .pcu95top) .pd-page__inner {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 20px 16px 48px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  :is(.pcu95front, .pcu95top) .pd-page__inner {
    padding: 28px 24px 64px;
  }
}

/* Hero */
:is(.pcu95front, .pcu95top) .pd-hero {
  margin-bottom: 24px;
}

:is(.pcu95front, .pcu95top) .pd-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: #94a3b8;
}

:is(.pcu95front, .pcu95top) .pd-breadcrumb__list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

:is(.pcu95front, .pcu95top) .pd-breadcrumb__list li:not(:last-child)::after {
  content: '/';
  color: #cbd5e1;
}

:is(.pcu95front, .pcu95top) .pd-breadcrumb__link {
  color: #64748b;
  text-decoration: none;
}

:is(.pcu95front, .pcu95top) .pd-breadcrumb__link:hover {
  color: #0f172a;
}

:is(.pcu95front, .pcu95top) .pd-breadcrumb__current {
  color: #334155;
  font-weight: 600;
}

:is(.pcu95front, .pcu95top) .pd-hero__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

:is(.pcu95front, .pcu95top) .pd-hero__avatar-wrap {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

:is(.pcu95front, .pcu95top) .pd-hero__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

:is(.pcu95front, .pcu95top) .pd-hero__titles {
  min-width: 0;
}

:is(.pcu95front, .pcu95top) .pd-hero__eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #94a3b8;
}

:is(.pcu95front, .pcu95top) .pd-hero__title {
  margin: 0;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

:is(.pcu95front, .pcu95top) .pd-hero__lead {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
}

:is(.pcu95front, .pcu95top) .pd-hero__cast-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* Toolbar */
:is(.pcu95front, .pcu95top) .pd-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

:is(.pcu95front, .pcu95top) .pd-filter__scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

:is(.pcu95front, .pcu95top) .pd-filter__scroll::-webkit-scrollbar {
  display: none;
}

:is(.pcu95front, .pcu95top) .pd-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

:is(.pcu95front, .pcu95top) .pd-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

:is(.pcu95front, .pcu95top) .pd-chip.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

:is(.pcu95front, .pcu95top) .pd-chip__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

:is(.pcu95front, .pcu95top) .pd-chip__count {
  min-width: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 11px;
  font-weight: 700;
}

:is(.pcu95front, .pcu95top) .pd-chip.is-active .pd-chip__count {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

:is(.pcu95front, .pcu95top) .pd-name-search {
  display: grid;
  gap: 8px;
}

:is(.pcu95front, .pcu95top) .pd-name-search__label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
}

:is(.pcu95front, .pcu95top) .pd-name-search__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

:is(.pcu95front, .pcu95top) .pd-name-search__input {
  flex: 1 1 180px;
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

:is(.pcu95front, .pcu95top) .pd-name-search__input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

:is(.pcu95front, .pcu95top) .pd-name-search__input::placeholder {
  color: #94a3b8;
}

:is(.pcu95front, .pcu95top) .pd-name-search__btn,
:is(.pcu95front, .pcu95top) .pd-name-search__clear {
  flex: 0 0 auto;
}

:is(.pcu95front, .pcu95top) .pd-sort {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

:is(.pcu95front, .pcu95top) .pd-sort__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

:is(.pcu95front, .pcu95top) .pd-sort__btn:hover {
  color: #0f172a;
}

:is(.pcu95front, .pcu95top) .pd-sort__btn.is-active {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

/* Feed grid */
:is(.pcu95front, .pcu95top) .pd-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 768px) {
  :is(.pcu95front, .pcu95top) .pd-feed {
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  :is(.pcu95front, .pcu95top) .pd-feed {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Mobile: single column list */
:is(.pcu95front, .pcu95top) .pd-feed-strip--mobile {
  display: none;
}

@media (max-width: 767px) {
  :is(.pcu95front, .pcu95top) .pd-feed--desktop {
    display: none;
  }

  /* 一覧ページなので横スワイプではなく縦1列で上から読ませる。
     ここでは overflow-x / scroll-snap を使わない。 */
  :is(.pcu95front, .pcu95top) .pd-feed-strip--mobile {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 2px 2px 10px;
  }

  :is(.pcu95front, .pcu95top) .pd-feed-strip__cell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  /* 画像はカード幅いっぱいまで広げる。ただし横幅の広い端末で
     縦に伸びすぎないよう上限を付ける（1/1 と object-fit: cover は維持）。 */
  :is(.pcu95front, .pcu95top) .pd-feed-strip--mobile .pd-compact-card__thumb {
    max-height: 360px;
  }
}

/* Compact card (list page mobile strip + reusable) */
:is(.pcu95front, .pcu95top) .pd-compact-card {
  height: 100%;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

:is(.pcu95front, .pcu95top) .pd-compact-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #94a3b8;
  font-size: 20px;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__album {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 10px;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px 12px;
  min-height: 88px;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__author {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__avatar-wrap {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

:is(.pcu95front, .pcu95top) .pd-compact-card__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__date {
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__title,
:is(.pcu95front, .pcu95top) .diary-title {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}

:is(.pcu95front, .pcu95top) .pd-compact-card__excerpt {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card */
:is(.pcu95front, .pcu95top) .pd-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 6px 18px rgba(15, 23, 42, 0.05),
    0 1px 4px rgba(15, 23, 42, 0.03);
}

@media (hover: hover) and (pointer: fine) {
  :is(.pcu95front, .pcu95top) .pd-card {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
  }
}

@media (min-width: 1024px) {
  :is(.pcu95front, .pcu95top) .pd-card {
    border-radius: 16px;
  }
}

:is(.pcu95front, .pcu95top) .pd-card.scroll-reveal {
  transition:
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
  transition-delay: calc(var(--pd-i, 0) * 70ms);
}

:is(.pcu95front, .pcu95top) .pd-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  text-decoration: none;
}

:is(.pcu95front, .pcu95top) .pd-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  :is(.pcu95front, .pcu95top) .pd-card__img {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }

  :is(.pcu95front, .pcu95top) .pd-card:hover {
    transform: translateY(-4px);
    box-shadow:
      0 18px 40px rgba(15, 23, 42, 0.1),
      0 4px 12px rgba(15, 23, 42, 0.05);
  }

  :is(.pcu95front, .pcu95top) .pd-card:hover .pd-card__img {
    transform: scale(1.03);
  }
}

:is(.pcu95front, .pcu95top) .pd-card__placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  color: #94a3b8;
  font-size: 13px;
}

:is(.pcu95front, .pcu95top) .pd-card__placeholder i {
  font-size: 28px;
  opacity: 0.7;
}

:is(.pcu95front, .pcu95top) .pd-card__album {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

:is(.pcu95front, .pcu95top) .pd-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 12px;
}

@media (min-width: 768px) {
  :is(.pcu95front, .pcu95top) .pd-card__body {
    gap: 8px;
    padding: 12px 12px 14px;
  }
}

:is(.pcu95front, .pcu95top) .pd-card__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  text-decoration: none;
  color: inherit;
}

:is(.pcu95front, .pcu95top) .pd-card__avatar-wrap {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

@media (min-width: 768px) {
  :is(.pcu95front, .pcu95top) .pd-card__avatar-wrap {
    width: 32px;
    height: 32px;
  }
}

:is(.pcu95front, .pcu95top) .pd-card__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

:is(.pcu95front, .pcu95top) .pd-card__author-name {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

:is(.pcu95front, .pcu95top) .pd-card__date {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

:is(.pcu95front, .pcu95top) .pd-card__title,
:is(.pcu95front, .pcu95top) .pd-card__title.diary-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

:is(.pcu95front, .pcu95top) .pd-card__title a {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: inherit;
  text-decoration: none;
}

:is(.pcu95front, .pcu95top) .pd-card__excerpt {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

:is(.pcu95front, .pcu95top) .pd-card__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

:is(.pcu95front, .pcu95top) .pd-card__actions .pd-btn {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

@media (min-width: 768px) {
  :is(.pcu95front, .pcu95top) .pd-card__author-name {
    font-size: 13px;
  }

  :is(.pcu95front, .pcu95top) .pd-card__title {
    font-size: 14px;
  }

  :is(.pcu95front, .pcu95top) .pd-card__excerpt {
    font-size: 12px;
    -webkit-line-clamp: 3;
  }

  :is(.pcu95front, .pcu95top) .pd-card__actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  :is(.pcu95front, .pcu95top) .pd-card__actions .pd-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  :is(.pcu95front, .pcu95top) .pd-card__actions .pd-btn:only-child {
    flex-basis: 100%;
  }
}

@media (min-width: 1024px) {
  :is(.pcu95front, .pcu95top) .pd-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  :is(.pcu95front, .pcu95top) .pd-card__actions .pd-btn {
    width: 100%;
    min-height: 34px;
    padding: 0 6px;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
  }

  :is(.pcu95front, .pcu95top) .pd-card__actions .pd-btn:only-child {
    grid-column: 1 / -1;
  }
}

:is(.pcu95front, .pcu95top) .pd-card__title a:hover {
  opacity: 0.82;
}

/* Buttons */
:is(.pcu95front, .pcu95top) .pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

:is(.pcu95front, .pcu95top) .pd-btn:hover {
  transform: translateY(-1px);
}

:is(.pcu95front, .pcu95top) .pd-btn--primary {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

:is(.pcu95front, .pcu95top) .pd-btn--primary:hover {
  background: #1e293b;
}

:is(.pcu95front, .pcu95top) .pd-btn--ghost {
  background: #fff;
  color: #334155;
  border-color: rgba(15, 23, 42, 0.1);
}

:is(.pcu95front, .pcu95top) .pd-btn--ghost:hover {
  background: #f8fafc;
}

:is(.pcu95front, .pcu95top) .pd-btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
}

/* Empty state */
:is(.pcu95front, .pcu95top) .pd-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 56px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px dashed rgba(15, 23, 42, 0.12);
  text-align: center;
}

:is(.pcu95front, .pcu95top) .pd-empty__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #94a3b8;
  font-size: 28px;
}

:is(.pcu95front, .pcu95top) .pd-empty__title {
  margin: 0;
  font-size: 20px;
  color: #0f172a;
}

:is(.pcu95front, .pcu95top) .pd-empty__text {
  margin: 0;
  max-width: 28em;
  font-size: 14px;
  line-height: 1.7;
  color: #64748b;
}

/* Pagination */
:is(.pcu95front, .pcu95top) .pd-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}

:is(.pcu95front, .pcu95top) .pd-pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

:is(.pcu95front, .pcu95top) .pd-pagination__link:hover {
  background: #f8fafc;
}

:is(.pcu95front, .pcu95top) .pd-pagination__link.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

:is(.pcu95front, .pcu95top) .pd-pagination__link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Legacy aliases (profile section etc.) */
.photo-diary-list-lead {
  margin: 0 0 16px;
  font-size: 14px;
}

.photo-diary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.photo-diary-card {
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.photo-diary-card__media {
  aspect-ratio: 1 / 1;
  background: #f1f5f9;
}

.photo-diary-card__img,
.photo-diary-detail__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-diary-card__placeholder,
.photo-diary-profile-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #94a3b8;
  font-size: 14px;
}

.photo-diary-card__body {
  padding: 12px 14px 16px;
}

.photo-diary-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.photo-diary-card__title {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.photo-diary-empty {
  text-align: center;
  color: #64748b;
  padding: 32px 0;
}

/* ---------- Detail page (show) ---------- */
:is(.pcu95front, .pcu95top) .pd-page__inner--show {
  width: min(100%, 720px);
}

:is(.pcu95front, .pcu95top) .pd-show {
  margin-top: 8px;
}

:is(.pcu95front, .pcu95top) .pd-show__card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(15, 23, 42, 0.04);
}

:is(.pcu95front, .pcu95top) .pd-show__head {
  padding: 16px 16px 0;
}

:is(.pcu95front, .pcu95top) .pd-show__author {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

:is(.pcu95front, .pcu95top) .pd-show__avatar-wrap {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

:is(.pcu95front, .pcu95top) .pd-show__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

:is(.pcu95front, .pcu95top) .pd-show__author-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

:is(.pcu95front, .pcu95top) .pd-show__author-name {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

:is(.pcu95front, .pcu95top) .pd-show__date {
  font-size: 12px;
  color: #94a3b8;
}

:is(.pcu95front, .pcu95top) .pd-show__date--solo {
  display: block;
  padding: 4px 0 0;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery {
  margin-top: 14px;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  overflow: hidden;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__frame--empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 280px;
  color: #94a3b8;
  font-size: 14px;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__frame--empty i {
  font-size: 32px;
  opacity: 0.7;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  :is(.pcu95front, .pcu95top) .pd-show-gallery__nav:hover {
    transform: translateY(-50%) scale(1.05);
    background: #fff;
  }
}
:is(.pcu95front, .pcu95top) .pd-show-gallery__nav--prev {
  left: 12px;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__nav--next {
  right: 12px;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__counter {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

:is(.pcu95front, .pcu95top) .pd-show-gallery__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

:is(.pcu95front, .pcu95top) .pd-show__content {
  padding: 20px 18px 8px;
}

:is(.pcu95front, .pcu95top) .pd-show__title {
  margin: 0 0 14px;
  font-size: clamp(20px, 4.5vw, 26px);
  line-height: 1.35;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

:is(.pcu95front, .pcu95top) .pd-show__body {
  font-size: 15px;
  line-height: 1.85;
  color: #334155;
  white-space: normal;
  word-break: break-word;
}

:is(.pcu95front, .pcu95top) .pd-show__footer {
  padding: 8px 18px 22px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  margin-top: 12px;
}

:is(.pcu95front, .pcu95top) .pd-show__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

:is(.pcu95front, .pcu95top) .pd-show__back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

:is(.pcu95front, .pcu95top) .pd-show__back-link:hover {
  color: #0f172a;
}

@media (min-width: 768px) {
  :is(.pcu95front, .pcu95top) .pd-show__head {
    padding: 20px 24px 0;
  }

  :is(.pcu95front, .pcu95top) .pd-show__content {
    padding: 24px 24px 10px;
  }

  :is(.pcu95front, .pcu95top) .pd-show__footer {
    padding: 10px 24px 26px;
  }

  :is(.pcu95front, .pcu95top) .pd-show-gallery__frame {
    aspect-ratio: 1 / 1;
    max-height: min(72vh, 720px);
  }

  :is(.pcu95front, .pcu95top) .pd-show-gallery__img {
    object-fit: contain;
    background: #0f172a;
  }
}

/* Legacy detail aliases */
.photo-diary-detail__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #64748b;
  font-size: 14px;
  margin-bottom: 12px;
}

.photo-diary-detail__cast {
  color: inherit;
}

.photo-diary-detail__title {
  font-size: 24px;
  margin: 0 0 16px;
}

.photo-diary-detail__gallery {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.photo-diary-detail__body {
  line-height: 1.8;
  white-space: normal;
}

.photo-diary-detail__back {
  margin-top: 28px;
}

/* ---------- Profile section ---------- */
.photo-diary-profile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.photo-diary-profile-head__more {
  font-size: 14px;
}

.photo-diary-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

/* プロフィールの表示上限は5件（config: photo_diary.profile_preview_limit）。
   列の最小幅を「5列ぶん」まで広げて、5件のときに横幅を使い切る。
   幅が足りない環境では 160px 下限に戻り、従来どおり列数が減る。 */
@media (min-width: 768px) {
  .photo-diary-profile-grid {
    grid-template-columns: repeat(auto-fill, minmax(max(160px, (100% - 4 * 12px) / 5), 1fr));
  }
}

@media (max-width: 767px) {
  .photo-diary-profile-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .photo-diary-profile-card {
    flex: 0 0 156px;
    scroll-snap-align: start;
  }
}

.photo-diary-profile-card {
  display: block;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.photo-diary-profile-card__media {
  aspect-ratio: 1 / 1;
  background: #f8fafc;
}

.photo-diary-profile-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-diary-profile-card__body {
  padding: 10px;
}

.photo-diary-profile-card__date {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.photo-diary-profile-card__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-diary-profile-card__text {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-diary-profile-empty {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  background: #f8fafc;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 10px;
}

.photo-diary-profile-foot {
  margin-top: 12px;
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  :is(.pcu95front, .pcu95top) .pd-card,
  :is(.pcu95front, .pcu95top) .pd-card__img,
  :is(.pcu95front, .pcu95top) .pd-chip,
  :is(.pcu95front, .pcu95top) .pd-btn,
  :is(.pcu95front, .pcu95top) .pd-card.scroll-reveal {
    transition: none !important;
  }

  :is(.pcu95front, .pcu95top) .pd-card:hover,
  :is(.pcu95front, .pcu95top) .pd-card:hover .pd-card__img,
  :is(.pcu95front, .pcu95top) .pd-chip:hover,
  :is(.pcu95front, .pcu95top) .pd-btn:hover,
  :is(.pcu95front, .pcu95top) .pd-show-gallery__nav:hover {
    transform: none;
  }

  :is(.pcu95front, .pcu95top) .pd-show-gallery__nav--prev,
  :is(.pcu95front, .pcu95top) .pd-show-gallery__nav--next {
    transform: translateY(-50%);
  }
}

/* ---------- App-like viewer modal (portaled to body, global scope) ---------- */
.pd-viewer { position: fixed; inset: 0; z-index: 10000; }
.pd-viewer__overlay { position: absolute; inset: 0; background: rgba(8, 10, 14, 0.94); }
.pd-viewer__scroller {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-y;
}
.pd-viewer__scroller::-webkit-scrollbar { display: none; }
.pd-viewer__slide {
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.pd-viewer-card {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #14171c;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
}
.pd-viewer-card__media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-viewer-card__images {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.pd-viewer-card__images::-webkit-scrollbar { display: none; }
.pd-viewer-card__image-wrap {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.pd-viewer-card__image { width: 100%; height: 100%; object-fit: contain; }
.pd-viewer-card__placeholder { font-size: 48px; opacity: 0.5; }
.pd-viewer-card__count {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
}
.pd-viewer-card__body {
  flex: 0 0 auto;
  max-height: 44%;
  overflow-y: auto;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(20, 23, 28, 0) 0%, #14171c 16%);
}
.pd-viewer-card__author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pd-viewer-card__avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.pd-viewer-card__author-meta { display: flex; flex-direction: column; }
.pd-viewer-card__cast { font-size: 14px; font-weight: 700; }
.pd-viewer-card__date { font-size: 12px; color: #9aa3ad; }
.pd-viewer-card__title { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 1.4; }
.pd-viewer-card__text { font-size: 14px; line-height: 1.7; color: #e2e6ea; }
.pd-viewer-card__text p { margin: 0 0 2px; }
.pd-viewer-card__loading { color: #9aa3ad; }
.pd-viewer-card__profile-link {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  text-decoration: none;
}
.pd-viewer__close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-viewer__progress {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.pd-viewer__nav {
  position: fixed;
  right: 18px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.pd-viewer__nav:hover { background: rgba(255, 255, 255, 0.28); }
.pd-viewer__nav:disabled { opacity: 0.3; cursor: default; }
.pd-viewer__nav--prev { top: calc(50% - 52px); }
.pd-viewer__nav--next { top: calc(50% + 8px); }

@media (min-width: 768px) {
  .pd-viewer__slide { padding: 24px; }
  .pd-viewer-card {
    width: min(440px, 92vw);
    height: min(86vh, 820px);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
  .pd-viewer-card__body { max-height: 40%; }
  .pd-viewer__nav { display: flex; }
}
