/* =========================================================
   OUR HUB — 02 사진 공유
   ========================================================= */

.ph-page { max-width: 1120px; }

.ph { display: grid; gap: 14px; margin-top: 18px; }

/* ── 앨범 머리 ────────────────────────────────────────── */
.ph-top-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 18px;
}
.ph-album-name { flex: 1 1 260px; min-width: 0; }
.ph-album-name .input { font-size: 16px; font-weight: 600; padding: 11px 14px; }
.ph-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
}
.ph-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 6px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  font-size: 11px;
  color: var(--text-4);
  white-space: nowrap;
}
.ph-stat b {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.ph-stat--room b { letter-spacing: .1em; color: var(--accent-3); }

/* ── 올리기 ───────────────────────────────────────────── */
.ph-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border: 1.5px dashed rgba(96, 165, 250, .38);
  border-radius: 20px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(59, 130, 246, .12), transparent 60%),
    linear-gradient(180deg, rgba(16, 22, 32, .85), rgba(10, 13, 19, .85));
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
.ph-drop:hover, .ph-drop.is-over {
  border-color: rgba(96, 165, 250, .8);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(59, 130, 246, .2), transparent 60%),
    linear-gradient(180deg, rgba(19, 27, 41, .92), rgba(11, 15, 22, .92));
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12), 0 22px 44px -32px #000;
}
.ph-drop:active { transform: scale(.997); }
.ph-drop:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.ph-drop-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(59, 130, 246, .24), rgba(59, 130, 246, .07));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .34);
  font-size: 24px;
}
.ph-drop-main { min-width: 0; flex: 1 1 auto; }
.ph-drop-title { margin: 0; font-size: 14px; color: var(--text); }
.ph-drop-title b { font-weight: 600; }
.ph-drop-sub { margin: 4px 0 0; font-size: 11.5px; color: var(--text-4); word-break: keep-all; }
.ph-drop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.ph-drop-chips span {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(59, 130, 246, .12);
  color: var(--accent-3);
  font-size: 10px;
  letter-spacing: .02em;
}
.ph-drop-plus {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(96, 165, 250, .34);
  color: var(--accent-3);
  font-size: 16px;
}

/* ── 도구 줄 ──────────────────────────────────────────── */
.ph-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 0 2px;
}
.ph-tools-left { min-width: 0; }
.ph-tools-note { margin: 0; font-size: 11.5px; color: var(--text-4); }
.ph-tools-right { display: flex; flex-wrap: wrap; gap: 7px; }

.ph-progress { padding: 2px 2px 0; }
.ph-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.ph-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-2));
  transition: width .18s;
}
.ph-progress-txt { margin: 6px 0 0; font-size: 11px; color: var(--text-4); }

/* ── 사진 그리드 ──────────────────────────────────────── */
.ph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ph-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0f16;
  animation: rise .3s both;
}
.ph-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform .3s;
}
.ph-item:hover img { transform: scale(1.035); }
.ph-item.is-selected { box-shadow: 0 0 0 2px var(--accent-2), 0 0 0 4px rgba(59, 130, 246, .2); }
.ph-item.is-failed {
  display: grid;
  place-items: center;
  padding: 10px;
}
.ph-failed-ico { font-size: 28px; opacity: .7; }

.ph-check {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  background: rgba(4, 7, 12, .55);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.ph-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ph-check span {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7);
}
.ph-check input:checked + span {
  background: var(--accent-2);
  box-shadow: inset 0 0 0 1.5px #fff;
}
.ph-check input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.ph-actions {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .16s, transform .16s;
}
.ph-item:hover .ph-actions,
.ph-item:focus-within .ph-actions { opacity: 1; transform: none; }
.ph-act {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 9px;
  background: rgba(5, 9, 14, .72);
  backdrop-filter: blur(6px);
  color: #e6efff;
  font-size: 13px;
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.ph-act:hover { background: rgba(59, 130, 246, .75); border-color: rgba(255, 255, 255, .5); }
.ph-act.is-danger:hover { background: rgba(220, 60, 60, .8); }

.ph-badge {
  position: absolute;
  left: 7px;
  bottom: 7px;
  z-index: 1;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(4, 7, 12, .6);
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: #dbeafe;
  letter-spacing: .03em;
}

@media (max-width: 560px) {
  .ph-grid { grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 7px; }
  .ph-drop { padding: 18px 16px; gap: 13px; }
  .ph-drop-ico { width: 46px; height: 46px; border-radius: 13px; font-size: 20px; }
  .ph-drop-plus { display: none; }
  .ph-actions { opacity: 1; transform: none; }
  .ph-act { width: 27px; height: 27px; border-radius: 8px; font-size: 12px; }
}
@media (max-width: 380px) {
  .ph-drop-ico { display: none; }
}

/* ── 공유 방 ──────────────────────────────────────────── */
.ph-room-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}
.ph-room-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px dashed rgba(96, 165, 250, .4);
  border-radius: 999px;
  background: rgba(59, 130, 246, .08);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--accent-3);
}


/* 내 이름 + 재치 닉네임 */
.ph-name-field { flex: 1 1 240px; min-width: 0; display: grid; gap: 7px; }
.ph-name-field > .label { font-size: 11px; font-weight: 600; color: var(--text-4); }

/* 공유 방에 올라온 사진 표시 */
.ph-item.is-remote .ph-badge { border-color: rgba(52, 211, 153, .4); color: #a7f3d0; }
.ph-remote-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(6, 9, 14, .72);
  border: 1px solid rgba(52, 211, 153, .4);
  color: #a7f3d0;
  font-size: 9.5px;
  letter-spacing: .02em;
  pointer-events: none;
}
.ph-share .cloud { margin-bottom: 12px; }

/* ── 크게 보기 ────────────────────────────────────────── */
.ph-lightbox {
  width: min(980px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}
.ph-lightbox::backdrop { background: rgba(3, 5, 9, .86); backdrop-filter: blur(6px); }
.ph-lightbox[open] { animation: modal-in .22s ease both; }
.ph-lb-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  border: 1px solid rgba(96, 165, 250, .28);
  border-radius: 20px;
  background: #0a0d13;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px #000;
}
.ph-lb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px dashed var(--line-soft);
}
.ph-lb-meta { display: grid; gap: 1px; min-width: 0; }
.ph-lb-meta b {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ph-lb-meta span { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-4); }
.ph-lb-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.ph-lb-close:hover { color: var(--text); border-color: var(--line); }
.ph-lb-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .025) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, .025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .025) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}
.ph-lb-stage img {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: 6px;
}
.ph-lb-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 11px 14px;
  border-top: 1px dashed var(--line-soft);
}
