/* =========================================================
   PHOTO GALLERY
   写真主体の露出・野外フォトページ
   ========================================================= */

.photo-index {
  --ph-bg: #ded4ce;
  --ph-bg-2: #cbbdb7;
  --ph-panel: #f7f0eb;
  --ph-panel-2: #e8ddd7;
  --ph-ink: #211619;
  --ph-muted: #705d62;
  --ph-line: rgba(65,25,34,.22);
  --ph-line-strong: rgba(86,24,39,.48);
  --ph-red: #a80d31;
  --ph-red-bright: #dc244c;
  --ph-red-dark: #5e081c;
  --ph-night: #110a0d;
  --ph-white: #fff7f8;
  --ph-shadow: 0 20px 48px rgba(54,17,27,.15);

  position: relative;
  isolation: isolate;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 84px;
  color: var(--ph-ink);
}

html[data-theme="black"] .photo-index,
html[data-theme="aqua"] .photo-index {
  --ph-bg: #070607;
  --ph-bg-2: #0f0b0d;
  --ph-panel: #171013;
  --ph-panel-2: #211419;
  --ph-ink: #f7edef;
  --ph-muted: #b7a4a8;
  --ph-line: rgba(255,105,135,.18);
  --ph-line-strong: rgba(255,105,135,.42);
  --ph-red: #e32149;
  --ph-red-bright: #ff4f70;
  --ph-red-dark: #7e0c28;
  --ph-night: #030203;
  --ph-white: #fff4f6;
  --ph-shadow: 0 24px 58px rgba(0,0,0,.45);
}

.photo-index,
.photo-index * {
  box-sizing: border-box;
}

.photo-index::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 12% 8%,
      color-mix(in srgb,var(--ph-red) 13%,transparent),
      transparent 28rem
    ),
    linear-gradient(155deg,var(--ph-bg),var(--ph-bg-2));
}

.photo-eyebrow {
  margin: 0 0 8px;
  color: var(--ph-red-bright);
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .22em;
  line-height: 1.4;
}

/* =========================================================
   HERO
   ========================================================= */

.photo-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(260px,.7fr);
  min-height: 300px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    linear-gradient(
      135deg,
      var(--ph-night),
      color-mix(in srgb,var(--ph-red-dark) 68%,#090406)
    );
  box-shadow: var(--ph-shadow);
  color: #fff;
}

.photo-hero::before {
  content: "PHOTO / EXPOSE / GAZE";
  position: absolute;
  right: -20px;
  bottom: -17px;
  color: rgba(255,255,255,.035);
  font-size: clamp(4rem,9vw,7.5rem);
  font-weight: 950;
  letter-spacing: -.07em;
  white-space: nowrap;
  pointer-events: none;
}

.photo-hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 42px;
}

.photo-hero h1 {
  margin: 0;
  color: #fff;
  font-family: "Noto Serif JP","Yu Mincho",serif;
  font-size: clamp(2.7rem,5.8vw,5rem);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: 1.02;
}

.photo-hero h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.76);
}

.photo-hero__lead {
  max-width: 620px;
  margin: 20px 0 0;
  color: rgba(255,255,255,.66);
  font-size: .83rem;
  line-height: 1.9;
}

.photo-hero__action {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px 34px;
  border-left: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.025);
}

.photo-hero__action-label {
  display: block;
  margin-bottom: 9px;
  color: rgba(255,255,255,.37);
  font-size: .52rem;
  font-weight: 900;
  letter-spacing: .2em;
}

.photo-post-button {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  padding: 16px 17px;
  border: 1px solid var(--ph-red-bright);
  background:
    linear-gradient(
      135deg,
      var(--ph-red-dark),
      var(--ph-red),
      var(--ph-red-bright)
    );
  color: #fff !important;
  font-size: .92rem;
  font-weight: 900;
  line-height: 1.4;
  text-decoration: none;
  transition: transform .18s ease,filter .18s ease;
}

.photo-post-button span {
  grid-column: 1;
  color: rgba(255,255,255,.58);
  font-size: .48rem;
  letter-spacing: .18em;
}

.photo-post-button b {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 1.8rem;
  font-weight: 400;
}

.photo-post-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

/* =========================================================
   TOOLBAR
   ========================================================= */

.photo-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ph-line);
}

.photo-toolbar h2 {
  margin: 0;
  color: var(--ph-ink);
  font-family: "Noto Serif JP","Yu Mincho",serif;
  font-size: clamp(1.45rem,3vw,2.2rem);
  font-weight: 900;
  letter-spacing: -.04em;
}

.photo-sort {
  display: flex;
  gap: 5px;
}

.photo-sort a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  color: var(--ph-muted) !important;
  font-size: .68rem;
  font-weight: 900;
  text-decoration: none;
}

.photo-sort a.is-active,
.photo-sort a:hover {
  border-color: var(--ph-red);
  background: var(--ph-red);
  color: #fff !important;
}

/* =========================================================
   PHOTO GRID
   ========================================================= */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 13px;
}

.photo-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  box-shadow: var(--ph-shadow);
}

.photo-card__image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--ph-night);
  text-decoration: none;
}

.photo-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .32s ease,filter .32s ease;
}

.photo-card:hover .photo-card__image img {
  transform: scale(1.018);
}

.photo-card__image::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  pointer-events: none;
  background: linear-gradient(transparent,rgba(0,0,0,.42));
}

.photo-card__category {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 9px;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.48);
  background: rgba(0,0,0,.28);
  color: #fff;
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .08em;
  backdrop-filter: blur(5px);
}

.photo-card__content {
  padding: 12px 13px 11px;
}

.photo-card__caption {
  margin: 0 0 10px;
  color: var(--ph-ink);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.65;
}

/* =========================================================
   LIKE / COMMENT STATS
   ========================================================= */

.photo-card__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--ph-line);
  border-bottom: 1px solid var(--ph-line);
}

.photo-like-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ph-red);
  cursor: pointer;
  font: inherit;
}

.photo-like-button__heart {
  font-size: 1.25rem;
  line-height: 1;
}

.photo-like-count {
  font-size: .72rem;
  font-weight: 900;
}

.photo-like-button.is-liked .photo-like-button__heart {
  color: var(--ph-red-bright);
}

.photo-comment-count {
  color: var(--ph-muted) !important;
  font-size: .52rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
}

.photo-comment-count b {
  margin-left: 4px;
  color: var(--ph-ink);
  font-size: .7rem;
}

/* =========================================================
   EMPTY / PAGINATION / NOTE
   ========================================================= */

.photo-empty {
  padding: 52px 24px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  text-align: center;
}

.photo-empty > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ph-red);
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .18em;
}

.photo-empty strong {
  display: block;
  color: var(--ph-ink);
  font-family: "Noto Serif JP","Yu Mincho",serif;
  font-size: 1.25rem;
}

.photo-empty p {
  margin: 8px 0 0;
  color: var(--ph-muted);
  font-size: .75rem;
  line-height: 1.7;
}

.photo-empty a {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 18px;
  background: var(--ph-red);
  color: #fff !important;
  font-size: .75rem;
  font-weight: 900;
  text-decoration: none;
}

.photo-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 0;
}

.photo-pagination a,
.photo-pagination span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  color: var(--ph-ink);
  font-size: .7rem;
  font-weight: 900;
  text-decoration: none;
}

.photo-pagination a:hover {
  border-color: var(--ph-red);
  color: var(--ph-red);
}

.photo-pagination .is-current {
  background: var(--ph-red);
  border-color: var(--ph-red);
  color: #fff;
}

.photo-note {
  margin-top: 28px;
  padding: 15px 17px;
  border-left: 3px solid var(--ph-red);
  background: color-mix(in srgb,var(--ph-panel) 82%,transparent);
}

.photo-note > span {
  display: block;
  margin-bottom: 5px;
  color: var(--ph-red);
  font-size: .5rem;
  font-weight: 900;
  letter-spacing: .17em;
}

.photo-note p {
  margin: 0;
  color: var(--ph-muted);
  font-size: .67rem;
  line-height: 1.7;
}

/* =========================================================
   PHOTO INDEX — CARD LAYOUT / INLINE AD
   PC: 2カラム・横型
   MOBILE: 既存の縦型2カラム
   ========================================================= */

/* ---------- PC 通常フォト ---------- */
@media (min-width: 901px) {
  .photo-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: stretch;
  }

  .photo-grid > .photo-card:not(.photo-card--ad) {
    display: grid;
    grid-template-columns: minmax(180px,44%) minmax(0,56%);
    min-height: 290px;
  }

  .photo-grid > .photo-card:not(.photo-card--ad) .photo-card__image {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    align-self: start;
    border-right: 1px solid var(--ph-line);
  }

  .photo-grid > .photo-card:not(.photo-card--ad) .photo-card__image img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }

  .photo-grid > .photo-card:not(.photo-card--ad) .photo-card__content {
    min-width: 0;
    min-height: 290px;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 13px;
  }

  .photo-grid > .photo-card:not(.photo-card--ad) .photo-card__date {
    margin-top: auto;
  }
}

/* ---------- 一覧内広告 ---------- */
.photo-card--ad {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  box-shadow: var(--ph-shadow);
}

.photo-card-ad__link {
  min-height: 100%;
  color: inherit;
  text-decoration: none;
}

.photo-card-ad__image {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ph-night);
}

.photo-card-ad__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card-ad__image.is-empty {
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb,var(--ph-red) 12%,var(--ph-night)),
      var(--ph-night)
    );
}

.photo-card-ad__image.is-empty::before {
  content: "PICK UP";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.18);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: .16em;
}

/* 写真左下のPRバッジ */
.photo-card--ad .photo-card__badge {
  position: absolute;
  left: 10px;
  bottom: 9px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.48);
  background: rgba(0,0,0,.28);
  color: #fff;
  font-size: .56rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .08em;
  backdrop-filter: blur(5px);
}

.photo-card-ad__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* タイトル上の「PR / PICK UP」は残す */
.photo-card--ad .photo-card__poster {
  color: var(--ph-red);
}

.photo-card--ad .photo-card__caption {
  color: var(--ph-ink);
}

/* 見せかけのいいね・コメント */
.photo-card-ad__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--ph-line);
  border-bottom: 1px solid var(--ph-line);
  pointer-events: none;
  user-select: none;
}

.photo-card--ad .photo-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ph-red);
  font-weight: 900;
}

.photo-card--ad .photo-like__heart {
  color: var(--ph-red);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}

.photo-card--ad .photo-like__count {
  color: var(--ph-red);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1;
}

.photo-card--ad .photo-comment-count {
  color: var(--ph-muted) !important;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1;
  white-space: nowrap;
}

.photo-card-ad__cta {
  margin-top: auto;
  color: var(--ph-red);
  font-weight: 900;
  white-space: nowrap;
  text-align: right;
}

.photo-card-ad__link:hover .photo-card-ad__cta {
  color: var(--ph-red-bright);
}

/* PC広告も通常カードと同じ横型 */
@media (min-width: 901px) {
  .photo-card-ad__link {
    display: grid;
    grid-template-columns: minmax(180px,44%) minmax(0,56%);
    min-height: 290px;
  }

  .photo-card-ad__image {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    align-self: start;
    border-right: 1px solid var(--ph-line);
  }

  .photo-card-ad__content {
    min-height: 290px;
    padding: 16px 16px 13px;
  }
}

/* スマホは通常フォトと同じ縦型 */
@media (max-width: 900px) {
  .photo-card-ad__link {
    display: block;
  }

  .photo-card-ad__image {
    aspect-ratio: 4 / 5;
    min-height: 0;
    border-right: 0;
  }

  .photo-card-ad__content {
    min-height: 0;
    padding: 14px 14px 12px;
  }

  .photo-card-ad__cta {
    margin-top: 10px;
  }
}

@media (max-width: 620px) {
  .photo-card-ad__content {
    padding: 12px 11px 10px;
  }

  .photo-card--ad .photo-card__badge {
    left: 7px;
    bottom: 7px;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 700px) {
  .photo-hero {
    grid-template-columns: 1fr;
  }

  .photo-hero__action {
    border-top: 1px solid rgba(255,255,255,.10);
    border-left: 0;
  }
}

@media (max-width: 620px) {

  .photo-index {
    width: 100%;
    padding: 14px 10px 72px;
  }

  .photo-hero__copy {
    padding: 34px 20px 30px;
  }

  .photo-hero__action {
    padding: 20px;
  }

  .photo-hero h1 {
    font-size: clamp(2.6rem,13vw,3.8rem);
  }

  .photo-toolbar {
    align-items: center;
    margin-top: 22px;
  }

  .photo-sort a {
    min-height: 34px;
    padding: 6px 9px;
    font-size: .62rem;
  }

  .photo-grid {
    gap: 8px;
  }

  .photo-card__content {
    padding: 10px 10px 9px;
  }

  .photo-card__caption {
    font-size: .72rem;
  }

  .photo-card__comment p {
    font-size: .65rem;
  }

  .photo-comment-count {
    font-size: .48rem;
  }

  .photo-card__category {
    left: 7px;
    bottom: 7px;
  }
}

@media (max-width: 390px) {

  .photo-index {
    padding-left: 7px;
    padding-right: 7px;
  }

  .photo-grid {
    gap: 6px;
  }

  .photo-card__content {
    padding-left: 8px;
    padding-right: 8px;
  }
}


/* =========================================================
   PHOTO POST / CONFIRM
   ========================================================= */

.photo-write {
  max-width: 920px;
}

.photo-write__hero {
  margin-bottom: 16px;
  padding: 30px 32px;
  border: 1px solid var(--ph-line);
  border-left: 4px solid var(--ph-red);
  background: var(--ph-panel);
  box-shadow: var(--ph-shadow);
}

.photo-write__hero h1 {
  margin: 0;
  color: var(--ph-ink);
  font-family: "Noto Serif JP","Yu Mincho",serif;
  font-size: clamp(1.8rem,4vw,2.8rem);
  font-weight: 900;
  letter-spacing: -.045em;
}

.photo-write__hero > p:last-child {
  margin: 10px 0 0;
  color: var(--ph-muted);
  font-size: .78rem;
  line-height: 1.8;
}

.photo-form {
  display: grid;
  gap: 12px;
}

.photo-form__block {
  padding: 22px 24px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
}

.photo-form__label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.photo-form__label > span {
  color: var(--ph-red);
  font-size: .62rem;
  font-weight: 950;
  letter-spacing: .1em;
}

.photo-form__label strong,
.photo-form__label small {
  display: block;
}

.photo-form__label strong {
  color: var(--ph-ink);
  font-size: .88rem;
  font-weight: 900;
}

.photo-form__label small {
  margin-top: 2px;
  color: var(--ph-muted);
  font-size: .62rem;
}

.photo-form textarea,
.photo-form input[type="password"] {
  width: 100%;
  border: 1px solid var(--ph-line);
  border-radius: 0;
  outline: 0;
  background: color-mix(in srgb,var(--ph-panel) 82%,#fff);
  color: var(--ph-ink);
  font: inherit;
}

.photo-form textarea {
  min-height: 120px;
  resize: vertical;
  padding: 13px 14px;
  font-size: .82rem;
  line-height: 1.75;
}

.photo-form input[type="password"] {
  min-height: 46px;
  padding: 10px 13px;
  font-size: .82rem;
}

.photo-form textarea:focus,
.photo-form input[type="password"]:focus {
  border-color: var(--ph-red);
}

.photo-form__help {
  margin: 7px 0 0;
  color: var(--ph-muted);
  font-size: .64rem;
  line-height: 1.6;
}

.photo-upload {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--ph-line-strong);
  background: var(--ph-panel-2);
  cursor: pointer;
  text-align: center;
}

.photo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-upload__icon {
  margin-bottom: 6px;
  color: var(--ph-red);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}

.photo-upload strong {
  color: var(--ph-ink);
  font-size: .84rem;
  font-weight: 900;
}

.photo-upload small {
  margin-top: 5px;
  color: var(--ph-muted);
  font-size: .62rem;
}

.photo-preview {
  overflow: hidden;
  max-width: 520px;
  margin: 14px auto 0;
  border: 1px solid var(--ph-line);
  background: var(--ph-night);
}

.photo-preview img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
}

.photo-category-select {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 7px;
}

.photo-category-select input {
  position: absolute;
  opacity: 0;
}

.photo-category-select span {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel-2);
  color: var(--ph-muted);
  font-size: .75rem;
  font-weight: 900;
  cursor: pointer;
}

.photo-category-select input:checked + span {
  border-color: var(--ph-red);
  background: var(--ph-red);
  color: #fff;
}

.photo-post-rules {
  padding: 18px 20px;
  border: 1px solid var(--ph-line);
  border-left: 3px solid var(--ph-red);
  background: var(--ph-panel);
}

.photo-post-rules > span {
  display: block;
  color: var(--ph-red);
  font-size: .5rem;
  font-weight: 900;
  letter-spacing: .18em;
}

.photo-post-rules > strong {
  display: block;
  margin-top: 3px;
  color: var(--ph-ink);
  font-size: .78rem;
}

.photo-post-rules ul {
  margin: 9px 0 0;
  padding-left: 1.25em;
  color: var(--ph-muted);
  font-size: .65rem;
  line-height: 1.8;
}

.photo-submit {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  padding: 15px 20px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg,var(--ph-red-dark),var(--ph-red),var(--ph-red-bright));
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
  font-weight: 900;
  text-align: left;
}

.photo-submit span {
  grid-column: 1;
  color: rgba(255,255,255,.57);
  font-size: .48rem;
  letter-spacing: .18em;
}

.photo-submit b {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 1.25rem;
}

.photo-form-errors {
  margin-bottom: 12px;
  padding: 14px 17px;
  border: 1px solid var(--ph-red);
  background: color-mix(in srgb,var(--ph-red) 7%,var(--ph-panel));
  color: var(--ph-ink);
}

.photo-form-errors strong {
  color: var(--ph-red);
  font-size: .76rem;
}

.photo-form-errors ul {
  margin: 6px 0 0;
  padding-left: 1.2em;
  font-size: .7rem;
  line-height: 1.7;
}

.photo-confirm-card {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr);
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  box-shadow: var(--ph-shadow);
}

.photo-confirm-card__image {
  display: flex;
  min-height: 460px;
  align-items: center;
  justify-content: center;
  background: var(--ph-night);
}

.photo-confirm-card__image img {
  display: block;
  max-width: 100%;
  max-height: 680px;
  object-fit: contain;
}

.photo-confirm-card__info {
  padding: 26px 24px;
  border-left: 1px solid var(--ph-line);
}

.photo-confirm-card__info > div {
  padding: 15px 0;
  border-bottom: 1px solid var(--ph-line);
}

.photo-confirm-card__info > div:first-child {
  padding-top: 0;
}

.photo-confirm-card__info span {
  display: block;
  margin-bottom: 5px;
  color: var(--ph-red);
  font-size: .5rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.photo-confirm-card__info strong,
.photo-confirm-card__info p {
  color: var(--ph-ink);
}

.photo-confirm-card__info p {
  margin: 0;
  font-size: .8rem;
  line-height: 1.8;
}

.photo-confirm-card__info .is-muted {
  color: var(--ph-muted);
}

.photo-confirm-actions {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.photo-confirm-actions form {
  margin: 0;
}

.photo-back-button {
  display: block;
  padding: 11px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  color: var(--ph-muted) !important;
  font-size: .7rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 700px) {
  .photo-write__hero {
    padding: 23px 19px;
  }

  .photo-form__block {
    padding: 18px 15px;
  }

  .photo-confirm-card {
    grid-template-columns: 1fr;
  }

  .photo-confirm-card__image {
    min-height: 0;
  }

  .photo-confirm-card__info {
    border-top: 1px solid var(--ph-line);
    border-left: 0;
  }
}

/* =========================================================
   PHOTO DETAIL / COMMENTS / DELETE
   ========================================================= */

.photo-detail__notice {
  margin-bottom: 12px;
  padding: 11px 14px;
  border-left: 4px solid var(--ph-red);
  background: var(--ph-panel);
  color: var(--ph-red);
  font-size: .74rem;
  font-weight: 900;
}

.photo-detail__hero {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ph-line);
}

.photo-detail__hero h1 {
  margin: 0;
  color: var(--ph-ink);
  font-family: "Noto Serif JP","Yu Mincho",serif;
  font-size: clamp(1.7rem,3.5vw,2.6rem);
  font-weight: 900;
}

.photo-detail__hero h1 span {
  color: var(--ph-red);
  font-size: .55em;
}

.photo-detail__main {
  display: grid;
  grid-template-columns: minmax(0,1.42fr) minmax(280px,.58fr);
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  box-shadow: var(--ph-shadow);
}

.photo-detail__image {
  display: flex;
  min-height: 600px;
  align-items: center;
  justify-content: center;
  background: var(--ph-night);
}

.photo-detail__image img {
  display: block;
  width: 100%;
  max-height: 850px;
  object-fit: contain;
}

.photo-detail__side {
  padding: 24px 22px;
  border-left: 1px solid var(--ph-line);
}

.photo-detail__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--ph-line);
}

.photo-detail__meta > span {
  padding: 4px 7px;
  background: var(--ph-red);
  color: #fff;
  font-size: .58rem;
  font-weight: 900;
}

.photo-detail__meta time {
  color: var(--ph-muted);
  font-size: .6rem;
}

.photo-detail__caption {
  padding: 18px 0;
  border-bottom: 1px solid var(--ph-line);
}

.photo-detail__caption > span {
  color: var(--ph-red);
  font-size: .5rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.photo-detail__caption p {
  margin: 7px 0 0;
  color: var(--ph-ink);
  font-size: .82rem;
  line-height: 1.8;
}

.photo-detail__reaction {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 18px;
}

.photo-like-button--detail,
.photo-detail__comment-link {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel-2);
  color: var(--ph-ink) !important;
  font-size: .7rem;
  font-weight: 900;
  text-decoration: none;
}

.photo-like-button--detail {
  cursor: pointer;
}

.photo-like-button--detail .photo-like-button__heart {
  color: var(--ph-red);
}

.photo-like-button--detail b,
.photo-detail__comment-link b {
  color: var(--ph-red);
}

.photo-detail__delete {
  display: block;
  margin-top: 10px;
  padding: 9px 0;
  color: var(--ph-muted) !important;
  font-size: .62rem;
  font-weight: 800;
  text-align: right;
  text-decoration: none;
}

.photo-comments {
  margin-top: 24px;
}

.photo-comments__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ph-line);
}

.photo-comments__head h2 {
  margin: 0;
  color: var(--ph-ink);
  font-family: "Noto Serif JP","Yu Mincho",serif;
  font-size: 1.4rem;
  font-weight: 900;
}

.photo-comments__head > span {
  color: var(--ph-muted);
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.photo-comment-form {
  padding: 18px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
}

.photo-comment-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-comment-form input,
.photo-comment-form textarea {
  width: 100%;
  border: 1px solid var(--ph-line);
  border-radius: 0;
  outline: 0;
  background: var(--ph-panel-2);
  color: var(--ph-ink);
  font: inherit;
}

.photo-comment-form input {
  min-height: 42px;
  padding: 9px 11px;
  font-size: .73rem;
}

.photo-comment-form__body {
  display: grid;
  grid-template-columns: minmax(0,1fr) 160px;
  gap: 8px;
  margin-top: 8px;
}

.photo-comment-form textarea {
  min-height: 88px;
  padding: 11px;
  resize: vertical;
  font-size: .76rem;
  line-height: 1.65;
}

.photo-comment-form button {
  border: 0;
  background: linear-gradient(135deg,var(--ph-red-dark),var(--ph-red),var(--ph-red-bright));
  color: #fff;
  font: inherit;
  font-size: .74rem;
  font-weight: 900;
  cursor: pointer;
}

.photo-comment-form button span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255,255,255,.58);
  font-size: .46rem;
  letter-spacing: .14em;
}

.photo-comment-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.photo-comment-item {
  position: relative;
  padding: 13px 14px 28px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
}

.photo-comment-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.photo-comment-item__top strong {
  color: var(--ph-red);
  font-size: .69rem;
}

.photo-comment-item__top time {
  color: var(--ph-muted);
  font-size: .56rem;
}

.photo-comment-item p {
  margin: 0;
  color: var(--ph-ink);
  font-size: .75rem;
  line-height: 1.7;
}

.photo-comment-item__delete {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: var(--ph-muted) !important;
  font-size: .56rem;
  font-weight: 800;
  text-decoration: none;
}

.photo-comments__empty {
  padding: 24px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  color: var(--ph-muted);
  font-size: .73rem;
  text-align: center;
}

.photo-delete-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(300px,.7fr);
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
  box-shadow: var(--ph-shadow);
}

.photo-delete-card__image {
  display: flex;
  min-height: 420px;
  align-items: center;
  justify-content: center;
  background: var(--ph-night);
}

.photo-delete-card__image img {
  display: block;
  width: 100%;
  max-height: 650px;
  object-fit: contain;
}

.photo-delete-card__form {
  padding: 24px;
  border-left: 1px solid var(--ph-line);
}

.photo-delete-card__form form {
  display: grid;
  gap: 11px;
}

.photo-delete-card__form label {
  color: var(--ph-ink);
  font-size: .76rem;
  font-weight: 900;
}

.photo-delete-card__form label span {
  display: block;
  margin-bottom: 3px;
  color: var(--ph-red);
  font-size: .48rem;
  letter-spacing: .15em;
}

.photo-delete-card__form input {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--ph-line);
  border-radius: 0;
  background: var(--ph-panel-2);
  color: var(--ph-ink);
}

.photo-delete-submit {
  min-height: 58px;
  border: 0;
  background: linear-gradient(135deg,var(--ph-red-dark),var(--ph-red),var(--ph-red-bright));
  color: #fff;
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
}

.photo-delete-submit span {
  display: block;
  color: rgba(255,255,255,.58);
  font-size: .46rem;
  letter-spacing: .15em;
}

.photo-delete-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--ph-red);
  background: color-mix(in srgb,var(--ph-red) 7%,var(--ph-panel));
  color: var(--ph-red);
  font-size: .7rem;
  font-weight: 900;
}

.photo-delete-card--comment {
  grid-template-columns: minmax(0,1fr) minmax(300px,.7fr);
}

.photo-delete-comment-preview {
  padding: 26px;
}

.photo-delete-comment-preview strong {
  color: var(--ph-red);
  font-size: .72rem;
}

.photo-delete-comment-preview p {
  margin: 8px 0 0;
  color: var(--ph-ink);
  font-size: .82rem;
  line-height: 1.8;
}

@media (max-width: 760px) {
  .photo-detail__main,
  .photo-delete-card,
  .photo-delete-card--comment {
    grid-template-columns: 1fr;
  }

  .photo-detail__image {
    min-height: 0;
  }

  .photo-detail__side,
  .photo-delete-card__form {
    border-top: 1px solid var(--ph-line);
    border-left: 0;
  }

  .photo-comment-form__body {
    grid-template-columns: 1fr;
  }

  .photo-comment-form button {
    min-height: 52px;
  }
}

@media (max-width: 620px) {
  .photo-comment-form__row {
    grid-template-columns: 1fr;
  }

  .photo-detail__reaction {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   PHOTO DETAIL — Instagram-style side comments
   ========================================================= */

.photo-detail__main {
  align-items: stretch;
}

.photo-detail__side {
  display: flex;
  min-height: 600px;
  flex-direction: column;
  padding: 20px 20px 14px;
}

.photo-detail__caption {
  flex: 0 0 auto;
}

.photo-detail__reaction {
  flex: 0 0 auto;
}

.photo-detail__comment-count {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel-2);
  color: var(--ph-ink);
  font-size: .7rem;
  font-weight: 900;
}

.photo-detail__comment-count b {
  color: var(--ph-red);
}

.photo-detail__comments-panel {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  margin-top: 12px;
  border: 1px solid var(--ph-line);
  background: var(--ph-panel);
}

.photo-detail__comments-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--ph-line);
  background: var(--ph-panel-2);
}

.photo-detail__comments-head span {
  color: var(--ph-red);
  font-size: .5rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.photo-detail__comments-head b {
  color: var(--ph-muted);
  font-size: .62rem;
}

.photo-detail__comments-scroll {
  flex: 1 1 auto;
  min-height: 170px;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--ph-red) var(--ph-panel-2);
}

.photo-detail__comments-scroll::-webkit-scrollbar {
  width: 7px;
}

.photo-detail__comments-scroll::-webkit-scrollbar-track {
  background: var(--ph-panel-2);
}

.photo-detail__comments-scroll::-webkit-scrollbar-thumb {
  background: var(--ph-red);
}

.photo-detail__comments-empty {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--ph-muted);
  font-size: .68rem;
  text-align: center;
}

.photo-detail__comment-item {
  position: relative;
  padding: 11px 12px 24px;
  border-bottom: 1px solid var(--ph-line);
}

.photo-detail__comment-item:last-child {
  border-bottom: 0;
}

.photo-detail__comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.photo-detail__comment-top strong {
  color: var(--ph-red);
  font-size: .66rem;
  font-weight: 900;
}

.photo-detail__comment-top time {
  color: var(--ph-muted);
  font-size: .52rem;
}

.photo-detail__comment-item p {
  margin: 0;
  color: var(--ph-ink);
  font-size: .7rem;
  line-height: 1.65;
}

.photo-detail__comment-delete {
  position: absolute;
  right: 10px;
  bottom: 7px;
  color: var(--ph-muted) !important;
  font-size: .52rem;
  font-weight: 800;
  text-decoration: none;
}

.photo-detail__comment-form {
  flex: 0 0 auto;
  padding: 9px;
  border-top: 1px solid var(--ph-line);
  background: var(--ph-panel-2);
}

.photo-detail__comment-form-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.photo-detail__comment-form input,
.photo-detail__comment-form textarea {
  width: 100%;
  border: 1px solid var(--ph-line);
  border-radius: 0;
  outline: 0;
  background: var(--ph-panel);
  color: var(--ph-ink);
  font: inherit;
}

.photo-detail__comment-form input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: .64rem;
}

.photo-detail__comment-form-body {
  display: grid;
  grid-template-columns: minmax(0,1fr) 66px;
  gap: 6px;
  margin-top: 6px;
}

.photo-detail__comment-form textarea {
  min-height: 54px;
  max-height: 90px;
  padding: 8px;
  resize: vertical;
  font-size: .66rem;
  line-height: 1.55;
}

.photo-detail__comment-form button {
  border: 0;
  background: linear-gradient(135deg,var(--ph-red-dark),var(--ph-red),var(--ph-red-bright));
  color: #fff;
  font: inherit;
  font-size: .68rem;
  font-weight: 900;
  cursor: pointer;
}

.photo-detail__comment-form button span {
  display: block;
  margin-bottom: 2px;
  color: rgba(255,255,255,.58);
  font-size: .42rem;
  letter-spacing: .12em;
}

.photo-form-errors--compact {
  margin: 0;
  padding: 7px 9px;
  border-width: 1px 0 0;
}

.photo-form-errors--compact ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: .62rem;
}

.photo-detail__delete {
  flex: 0 0 auto;
  margin-top: 8px;
}

/* 旧・詳細下の独立コメントUIは非表示 */
.photo-comments {
  display: none !important;
}

@media (max-width: 760px) {
  .photo-detail__side {
    min-height: 0;
  }

  .photo-detail__comments-scroll {
    max-height: 300px;
  }
}

@media (max-width: 620px) {
  .photo-detail__comments-scroll {
    max-height: 260px;
  }

  .photo-detail__comment-form-meta {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   PHOTO POSTER NAME
   ========================================================= */

.photo-form .photo-form__text {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--ph-line);
  border-radius: 0;
  outline: 0;
  background: color-mix(in srgb,var(--ph-panel) 82%,#fff);
  color: var(--ph-ink);
  font: inherit;
  font-size: .82rem;
}

.photo-form .photo-form__text:focus {
  border-color: var(--ph-red);
}

.photo-card__poster {
  margin: 0 0 5px;
  color: var(--ph-red);
  font-size: .66rem;
  font-weight: 900;
  line-height: 1.4;
}

.photo-detail__poster {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ph-line);
}

.photo-detail__poster > span {
  display: block;
  margin-bottom: 3px;
  color: var(--ph-red);
  font-size: .48rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.photo-detail__poster > strong {
  color: var(--ph-ink);
  font-family: "Noto Serif JP","Yu Mincho",serif;
  font-size: 1.05rem;
  font-weight: 900;
}

.photo-detail__poster + .photo-detail__meta {
  margin-top: 12px;
}

/* =========================================================
   PHOTO INDEX — TEXT READABILITY
   一覧カード内の文字を全体的に読みやすく調整
   ========================================================= */

.photo-card__content {
  padding: 14px 14px 12px;
}

.photo-card__poster {
  margin-bottom: 7px;
  font-size: .78rem;
  line-height: 1.45;
}

.photo-card__caption {
  margin-bottom: 12px;
  font-size: .9rem;
  line-height: 1.7;
}

.photo-card__stats {
  padding: 11px 0;
}

.photo-like-button {
  gap: 6px;
}

.photo-like-button__heart {
  font-size: 1.35rem;
}

.photo-like-count {
  font-size: .82rem;
}

.photo-comment-count {
  font-size: .64rem;
  letter-spacing: .06em;
}

.photo-comment-count b {
  font-size: .82rem;
}






.photo-card__date {
  margin-top: 10px;
  font-size: .66rem;
}

/* 詳細画面のコメントパネルは固定ヘッダー分のスクロール位置を確保。
   外部/古い #comments リンクが残っていても見切れにくくする。 */
.photo-detail__comments-panel {
  scroll-margin-top: calc(var(--site-header-height, 92px) + 18px);
}

/* 詳細側も一覧と文字サイズの差が大きくならないよう少し拡大 */
.photo-detail__comments-head span {
  font-size: .58rem;
}

.photo-detail__comments-head b {
  font-size: .7rem;
}

.photo-detail__comment-top strong {
  font-size: .76rem;
}

.photo-detail__comment-top time {
  font-size: .6rem;
}

.photo-detail__comment-item p {
  font-size: .8rem;
  line-height: 1.7;
}

.photo-detail__comment-delete {
  font-size: .6rem;
}

@media (max-width: 620px) {
  .photo-card__content {
    padding: 12px 11px 10px;
  }

  .photo-card__poster {
    font-size: .72rem;
  }

  .photo-card__caption {
    font-size: .82rem;
  }

  .photo-card__comment strong {
    font-size: .7rem;
  }

  .photo-card__comment p {
    font-size: .76rem;
  }

  .photo-card__more {
    font-size: .7rem;
  }

  .photo-card__date {
    font-size: .62rem;
  }
}


/* =========================================================
   PHOTO → BOARD BRIDGE
   photo/index.php から掲示板へ戻す導線
   ========================================================= */

/* 別掲示板への導線 */
.photo-index .board-bridge-card {
  position: relative;
  overflow: hidden;
  margin: 0 0 24px;
  padding: 22px 24px;
  border: 1px solid var(--ph-line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ph-red) 8%, transparent), transparent 55%),
    var(--ph-panel);
  box-shadow: var(--ph-shadow-soft);
}

.photo-index .board-bridge-card::after {
  content: "";
  position: absolute;
  top: -74px;
  right: -54px;
  width: 160px;
  height: 160px;
  border: 1px solid var(--ph-line);
  border-radius: 50%;
}

.photo-index .board-bridge-card__label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--ph-red-bright);
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .2em;
}

.photo-index .board-bridge-card strong {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--ph-ink);
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 1.2rem;
  font-weight: 900;
}

.photo-index .board-bridge-card p {
  position: relative;
  z-index: 1;
  margin: 7px 0 15px;
  color: var(--ph-muted);
  font-size: .8rem;
}

.photo-index .board-bridge-card__link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ph-line-strong);
  color: var(--ph-red) !important;
  font-size: .76rem;
  font-weight: 900;
}

.photo-index .board-bridge-card__link b {
  font-size: 1rem;
}