/* ========================================
   phone-album.css - 查手机相册页面样式
   角色视角的私人相册，图片用文字叙述代替
   莫兰迪低饱和配色，简约耐看
   ======================================== */

/* ====== 全屏容器 ====== */
.pa-screen {
  position: absolute;
  inset: 0;
  max-width: 100%;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1), opacity .32s ease, visibility .32s;
  overflow: hidden;
  overflow-x: hidden;
  box-sizing: border-box;
}
.pa-screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* ====== 列表视图 ====== */
.pa-list-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  transition: transform .3s ease;
}
.pa-list-view.is-hidden {
  transform: translateX(-24%);
}

/* ====== 顶部导航栏 ====== */
.pa-nav {
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.pa-nav__back,
.pa-nav__action {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #5a564e;
  cursor: pointer;
  border-radius: 50%;
  transition: background .18s ease;
}
.pa-nav__back:active,
.pa-nav__action:active {
  background: rgba(0, 0, 0, .06);
}
.pa-nav__back svg,
.pa-nav__action svg {
  width: 22px;
  height: 22px;
}
.pa-nav__title {
  font-size: 17px;
  font-weight: 600;
  color: #3a372f;
  letter-spacing: .5px;
}
.pa-nav__right {
  display: flex;
  align-items: center;
}

/* ====== 角色身份提示条 ====== */
.pa-owner-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
}
.pa-owner-bar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d8d2c6;
  color: #6a655b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.pa-owner-bar__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pa-owner-bar__info {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.pa-owner-bar__name {
  font-size: 15px;
  font-weight: 600;
  color: #3a372f;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pa-owner-bar__hint {
  font-size: 13px;
  color: #9a958a;
}

/* ====== 列表主体（可滚动） ====== */
.pa-list-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 14px 28px;
}

/* ====== 相册网格 ====== */
.pa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* 单张照片卡片 */
.pa-photo-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #e8e3da;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pa-photo-item:active {
  transform: scale(.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

/* 画面叙述区（文字代替图片） */
.pa-photo-item__scene {
  flex: 1;
  padding: 14px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.6;
  color: #5c574e;
  overflow: hidden;
  position: relative;
}
.pa-photo-item__scene-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 底部配文条 */
.pa-photo-item__bar {
  flex-shrink: 0;
  padding: 8px 11px 9px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pa-photo-item__caption {
  font-size: 11.5px;
  color: #4a463e;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pa-photo-item__time {
  font-size: 10px;
  color: #a8a297;
  margin-top: 2px;
}

/* 角标小相机图标 */
.pa-photo-item__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8478;
}
.pa-photo-item__badge svg {
  width: 13px;
  height: 13px;
}

/* 网格中不同色调（莫兰迪） */
.pa-photo--tone1 { background: #e9e0d4; }
.pa-photo--tone2 { background: #e4ddd9; }
.pa-photo--tone3 { background: #dde2e2; }
.pa-photo--tone4 { background: #dee3da; }
.pa-photo--tone5 { background: #e3dde2; }
.pa-photo--tone6 { background: #e2dfd8; }

/* ====== 加载状态 ====== */
.pa-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  gap: 14px;
}
.pa-loading.is-hidden {
  display: none;
}
.pa-loading__spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0, 0, 0, .08);
  border-top-color: #b0a99a;
  border-radius: 50%;
  animation: paSpin .8s linear infinite;
}
@keyframes paSpin {
  to { transform: rotate(360deg); }
}
.pa-loading__text {
  font-size: 13px;
  color: #9a958a;
}

/* ====== 空状态 ====== */
.pa-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 30px;
  gap: 10px;
  text-align: center;
}
.pa-empty__icon {
  width: 52px;
  height: 52px;
  color: #cac4b8;
}
.pa-empty__text {
  font-size: 15px;
  font-weight: 600;
  color: #7a756b;
}
.pa-empty__hint {
  font-size: 12.5px;
  color: #a8a297;
}

/* ====== 照片详情视图 ====== */
.pa-detail-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .3s ease, visibility .3s;
}
.pa-detail-view.is-active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

/* 详情导航栏 */
.pa-detail-nav {
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: rgba(243, 241, 236, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.pa-detail-nav__back {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #5a564e;
  cursor: pointer;
  border-radius: 50%;
  transition: background .18s ease;
}
.pa-detail-nav__back:active {
  background: rgba(0, 0, 0, .06);
}
.pa-detail-nav__back svg {
  width: 22px;
  height: 22px;
}
.pa-detail-nav__title {
  font-size: 17px;
  font-weight: 600;
  color: #3a372f;
}
.pa-detail-nav__right {
  width: 38px;
}

/* 详情主体（可滚动） */
.pa-detail-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 20px 36px;
}

/* 画面叙述框（文字代替图片） */
.pa-photo {
  margin-bottom: 22px;
}
.pa-photo__frame {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(150deg, #e9e2d7 0%, #ddd9d2 100%);
  padding: 28px 22px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 6px 18px rgba(0, 0, 0, .05);
}
.pa-photo__icon {
  width: 40px;
  height: 40px;
  color: rgba(120, 114, 102, .45);
  flex-shrink: 0;
}
.pa-photo__scene {
  font-size: 15px;
  line-height: 1.85;
  color: #4a463e;
  text-align: center;
  letter-spacing: .3px;
}

/* 配文/心情 */
.pa-detail__caption {
  font-size: 15.5px;
  line-height: 1.75;
  color: #3a372f;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 16px;
}

/* 元信息：时间 · 地点 */
.pa-detail__meta {
  font-size: 12.5px;
  color: #a39e93;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 底部只读提示 */
.pa-detail-footer {
  flex-shrink: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, .05);
  background: rgba(255, 255, 255, .9);
}
.pa-detail-footer__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #a8a297;
}

/* ====== 列表/详情视图基础态 ====== */
.pa-list-view,
.pa-detail-view {
  will-change: transform;
}

/* ====== Toast ====== */
.pa-toast {
  position: absolute;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(58, 55, 47, .92);
  color: #f3f1ec;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 100;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}
.pa-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
