/* phone.css — 查看记录入口与角色手机模拟界面 */

.phone-records-home-page .miss-section-title,
.phone-records-home-page .miss-list,
.phone-records-home-page .miss-empty,
.phone-records-home-page .miss-loading {
  overflow: visible;
}

/* ===== 全屏手机模拟层 ===== */
.phone-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.phone-fullscreen.show {
  opacity: 1;
}

.wechat-role-phone-page {
  z-index: 360;
}

.phone-fullscreen.is-closing {
  opacity: 0;
  pointer-events: none;
}

/* ===== 锁屏 ===== */
.phone-lock-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--c-text);
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.phone-lock-wallpaper {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(200, 200, 200, 0.15), transparent 50%),
    linear-gradient(160deg, #f0f0f0 0%, #e8e8e8 30%, #f5f5f5 50%, #eaeaea 70%, #f2f2f2 100%);
}

/* 锁屏时间 */
.phone-lock-time {
  margin-top: calc(60px + env(safe-area-inset-top, 0px));
  text-align: center;
  z-index: 1;
}

.phone-lock-time-digits {
  font-size: clamp(64px, 22vw, 96px);
  font-weight: 200;
  letter-spacing: 2px;
  line-height: 1;
  color: var(--c-text);
}

.phone-lock-date {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-sub);
  letter-spacing: 0.5px;
}

/* 锁屏占位，把通知和指纹推到底部 */
.phone-lock-spacer {
  flex: 1;
}

/* 锁屏通知卡片 */
.phone-lock-notification {
  margin: 0 20px 16px;
  width: calc(100% - 40px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  border: 1px solid rgba(0, 0, 0, 0.09);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.56),
    0 2px 8px rgba(0, 0, 0, 0.035),
    0 8px 22px rgba(0, 0, 0, 0.085);
  z-index: 1;
  animation: phoneSlideUp 0.4s var(--ease) both;
  animation-delay: 0.15s;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}

.phone-lock-notification:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.96);
}

@keyframes phoneSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.phone-lock-notif-avatar {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: visible;
  background: var(--c-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 500;
  color: var(--c-sub);
}

.phone-lock-notif-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.phone-lock-notif-avatar span:not(.phone-lock-notif-wechat) {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
  color: var(--c-hint);
  font-size: 20px;
  font-weight: 500;
}

.phone-lock-notif-wechat {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: linear-gradient(135deg, #dfe2e7 0%, #aeb4bd 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.phone-lock-notif-wechat i {
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.phone-lock-notif-body {
  flex: 1;
  min-width: 0;
}

.phone-lock-notif-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-text);
}

.phone-lock-notif-hint {
  margin-top: 2px;
  font-size: 12px;
  color: var(--c-hint);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-lock-message-editor .angel-editor-form {
  padding: 0 18px;
}

.phone-lock-message-editor .angel-editor-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-sub);
}

.phone-lock-message-editor textarea.input-field {
  min-height: 86px;
  resize: vertical;
}

.phone-lock-message-editor .angel-editor-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.phone-lock-message-editor .angel-editor-actions .btn-pill {
  flex: 1;
}

/* 指纹区域 */
.phone-fingerprint-area {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  z-index: 2;
}

.phone-fingerprint {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: var(--c-hint);
  background: rgba(0, 0, 0, 0.04);
  border: 1.5px solid var(--c-border-m);
  transition: all 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-fingerprint i {
  font-size: 28px;
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

.phone-fingerprint:active {
  transform: scale(0.92);
  background: rgba(0, 0, 0, 0.07);
}

.phone-fingerprint-hint {
  font-size: 11px;
  color: var(--c-hint);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* 指纹扫描动画 */
.phone-fingerprint.scanning {
  border-color: var(--c-accent);
  background: rgba(138, 138, 138, 0.1);
  box-shadow: 0 0 20px rgba(138, 138, 138, 0.15);
}

.phone-fingerprint.scanning i {
  color: var(--c-accent-dark);
  animation: phoneFpPulse 0.6s var(--ease);
}

@keyframes phoneFpPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.phone-fingerprint.scanning::before,
.phone-fingerprint.scanning::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--c-accent);
  animation: phoneFpRipple 0.8s var(--ease) forwards;
}

.phone-fingerprint.scanning::after {
  animation-delay: 0.15s;
}

@keyframes phoneFpRipple {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* 指纹成功 */
.phone-fingerprint.success {
  border-color: var(--c-accent-dark);
  background: rgba(138, 138, 138, 0.12);
  box-shadow: 0 0 24px rgba(138, 138, 138, 0.2);
}

.phone-fingerprint.success i {
  color: var(--c-text);
}

/* ===== 主页 ===== */
.phone-home-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  color: var(--c-text);
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.phone-home-wallpaper {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.5), transparent 55%),
    radial-gradient(ellipse at 75% 75%, rgba(220, 220, 220, 0.2), transparent 50%),
    linear-gradient(155deg, #f2f2f2 0%, #eaeaea 40%, #f0f0f0 60%, #e6e6e6 80%, #f4f4f4 100%);
}

/* 主页头部用户信息 */
.phone-home-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 20px 0;
  margin-top: calc(8px + env(safe-area-inset-top, 0px));
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.phone-home-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--c-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--c-sub);
}

.phone-home-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-home-name {
  max-width: min(220px, 60vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-text);
}

.phone-home-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--c-hint);
  font-weight: 500;
}

/* 角色资料组件 */
.phone-profile-card {
  margin: calc(8px + env(safe-area-inset-top, 0px)) 20px 0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.045);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.phone-profile-top {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.phone-profile-avatar {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-sub);
  font-size: 22px;
  font-weight: 800;
}

.phone-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-profile-main {
  flex: 1;
  min-width: 0;
}

.phone-profile-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.phone-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.phone-profile-stat {
  min-width: 0;
  text-align: center;
}

.phone-profile-stat strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}

.phone-profile-stat span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-hint);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.phone-profile-account {
  margin-top: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-sub);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.phone-profile-bio {
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--c-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
}

.phone-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.phone-profile-action {
  min-width: 0;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.72);
  color: var(--c-text);
  font-size: 13px;
  font-weight: 750;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.045);
}

.phone-profile-action-primary {
  background: rgba(36, 36, 36, 0.88);
  color: #fff;
  box-shadow: none;
}

/* 应用网格 */
.phone-home-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 82px;
  align-content: start;
  gap: 12px 8px;
  padding: 16px 20px 10px;
  z-index: 1;
}

/* Dock 栏 */
.phone-home-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 20px 6px;
  padding: 10px 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* 应用按钮 */
.phone-home-app {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  max-width: 78px;
  padding: 4px 8px;
  color: var(--c-text);
  transition: transform 0.15s var(--ease), opacity 0.15s var(--ease);
}

.phone-home-grid .phone-home-app {
  flex: none;
  max-width: none;
  padding: 0;
}

.phone-home-app:active {
  transform: scale(0.88);
  opacity: 0.75;
}

/* 玻璃质感图标 — 和主页 icon-bg 一致 */
.phone-home-app-icon {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(180%) brightness(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(1.05);
  box-shadow: none;
  color: var(--icon-color, var(--c-accent-dark));
  position: relative;
  overflow: hidden;
}

/* 主桌面与模拟手机主页共用同一套局部玻璃反射语言。 */
.phone-home-header,
.phone-profile-card,
.phone-home-dock,
.phone-home-app-icon {
  --glass-edge-highlight: rgba(255, 255, 255, 0.4);
  --glass-edge-soft: rgba(255, 255, 255, 0.14);
}

.phone-home-header::before,
.phone-profile-card::before,
.phone-home-dock::before,
.phone-home-app-icon::before,
.phone-home-header::after,
.phone-profile-card::after,
.phone-home-dock::after,
.phone-home-app-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0.8px solid transparent;
  border-radius: inherit;
  pointer-events: none;
}

.phone-home-header::before,
.phone-profile-card::before,
.phone-home-dock::before,
.phone-home-app-icon::before {
  border-color: var(--glass-edge-highlight);
  -webkit-mask-image: radial-gradient(
    ellipse 100% 100% at top left,
    #000 0%,
    #000 25%,
    transparent 80%
  );
  mask-image: radial-gradient(
    ellipse 100% 100% at top left,
    #000 0%,
    #000 25%,
    transparent 80%
  );
}

.phone-home-header::after,
.phone-profile-card::after,
.phone-home-dock::after,
.phone-home-app-icon::after {
  border-color: var(--glass-edge-soft);
  -webkit-mask-image: radial-gradient(
    ellipse 100% 100% at bottom right,
    #000 0%,
    #000 25%,
    transparent 80%
  );
  mask-image: radial-gradient(
    ellipse 100% 100% at bottom right,
    #000 0%,
    #000 25%,
    transparent 80%
  );
}

.phone-home-dock .phone-home-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

.phone-home-app-icon i {
  font-size: 24px;
}

.phone-home-app-icon svg {
  width: 26px;
  height: 26px;
}

.phone-home-app-icon svg path {
  fill: var(--icon-color, var(--c-accent-dark));
}

.phone-home-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-home-app-label {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--c-text);
  opacity: 0.7;
}

/* ===== 查看记录手机 iScreen ===== */
.phone-iscreen-page {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  color: var(--c-text);
  transform: translateY(100%);
  transition: transform 0.28s var(--ease);
  overflow: hidden;
}

.phone-iscreen-page.show {
  transform: translateY(0);
}

.phone-iscreen-page.is-closing {
  pointer-events: none;
}

.phone-iscreen-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phone-iscreen-section-title {
  color: var(--c-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.phone-iscreen-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.phone-iscreen-gallery-section,
.phone-iscreen-preset-section,
.phone-iscreen-wallpaper-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-preset-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.phone-preset-save-row,
.phone-preset-apply-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.phone-preset-name-input,
.phone-preset-select {
  min-width: 0;
  height: 36px;
  font-size: 13px;
}

.phone-preset-save,
.phone-preset-apply {
  height: 36px;
  white-space: nowrap;
}

.phone-preset-apply:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.phone-gallery-grid,
.phone-wallpaper-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.phone-gallery-card,
.phone-wallpaper-card {
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.phone-gallery-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.phone-gallery-card-title,
.phone-wallpaper-card-title {
  min-width: 0;
  color: var(--c-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.phone-wallpaper-card-title {
  margin-bottom: 8px;
}

.phone-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 48px;
}

.phone-gallery-thumb {
  aspect-ratio: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
}

.phone-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-gallery-empty {
  grid-column: 1 / -1;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--c-surface);
  color: var(--c-hint);
  font-size: 12px;
}

.phone-wallpaper-preview {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #d8d8d8;
  border: 1px solid var(--c-border);
}

.phone-wallpaper-preview-bg {
  position: absolute;
  inset: 0;
  background: #d8d8d8;
  background-size: cover;
  background-position: center;
}

.phone-wallpaper-pick {
  width: 100%;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  color: var(--c-text);
  font-size: 13px;
  font-weight: 600;
}

.phone-wallpaper-pick:active {
  background: var(--c-surface-2);
}

.phone-wallpaper-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.phone-iscreen-page .iscreen-row {
  box-shadow: var(--shadow-sm);
}

.phone-iscreen-page .iscreen-row-icon .phone-home-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

/* ===== iOS Home Indicator 退出条 ===== */
.phone-home-indicator {
  width: 100%;
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.phone-home-indicator-bar {
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.18);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.phone-home-indicator:active .phone-home-indicator-bar {
  transform: scaleX(0.92);
  background: rgba(0, 0, 0, 0.35);
}

/* ===== 锁屏 → 主页过渡 ===== */
.phone-lock-screen.unlocking {
  animation: phoneLockOut 0.5s var(--ease) forwards;
}

@keyframes phoneLockOut {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
    filter: blur(8px);
  }
}

.phone-home-screen.entering {
  animation: phoneHomeIn 0.45s var(--ease) both;
}

@keyframes phoneHomeIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== 响应式 ===== */
@media (max-height: 640px) {
  .phone-lock-time {
    margin-top: calc(30px + env(safe-area-inset-top, 0px));
  }

  .phone-lock-time-digits {
    font-size: clamp(52px, 18vw, 76px);
  }

  .phone-lock-notification {
    bottom: 110px;
  }

  .phone-home-grid {
    grid-auto-rows: 78px;
    gap: 10px 8px;
    padding: 14px 18px 8px;
  }

  .phone-home-app-icon {
    width: 50px;
    height: 50px;
  }

  .phone-home-dock .phone-home-app-icon {
    width: 48px;
    height: 48px;
  }
}

@media (min-height: 800px) {
  .phone-lock-time {
    margin-top: calc(80px + env(safe-area-inset-top, 0px));
  }

  .phone-lock-notification {
    bottom: 170px;
  }
}

/* ===== Edit Phone / Clean Phone 应用选择面板 ===== */
.phone-app-panel {
  width: min(320px, calc(100vw - 48px));
}

.phone-app-panel .angel-editor-heading {
  padding: 0 18px;
}

.phone-app-panel-tip {
  margin: 10px 0 4px;
  padding: 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--c-sub, #666);
}

.phone-app-panel-list {
  margin-top: 12px;
  padding: 0 18px;
  max-height: 46vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.phone-app-panel .angel-editor-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 0 18px;
}

.phone-app-panel .angel-editor-actions .btn-pill {
  flex: 1;
}

.phone-app-panel-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.035);
  font-size: 14px;
  color: var(--c-text);
  text-align: left;
}

.phone-app-panel-option .phone-app-panel-state {
  font-size: 12px;
  color: var(--c-hint, #999);
}

.phone-app-panel-option .phone-app-panel-state i {
  visibility: hidden;
}

.phone-app-panel-option.is-selected {
  background: rgba(36, 36, 36, 0.08);
  box-shadow: inset 0 0 0 1.5px rgba(36, 36, 36, 0.55);
}

.phone-app-panel-option.is-selected .phone-app-panel-state i {
  visibility: visible;
}

.phone-app-panel-option.is-disabled {
  opacity: 0.45;
}

/* NPC 只读聊天窗口的纯装饰底栏 */
.phone-snapshot-input-area {
  pointer-events: none;
}

/* ===== 查手机：浏览器 / 备忘录 / 相册 / Game Center ===== */

.phone-app-page {
  z-index: 360;
}

.phone-app-page .phone-app-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 32px;
  -webkit-overflow-scrolling: touch;
}

.phone-app-empty {
  min-height: 260px;
  padding: 42px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--c-sub);
  gap: 8px;
}

.phone-app-empty i {
  font-size: 28px;
  color: var(--c-hint);
  margin-bottom: 4px;
}

.phone-app-empty div {
  color: var(--c-text);
  font-size: 15px;
  font-weight: 600;
}

.phone-app-empty span {
  color: var(--c-hint);
  font-size: 12px;
  line-height: 1.6;
}

.phone-app-section-title {
  margin: 18px 4px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-sub);
}

.phone-app-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone-app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--c-surface, rgba(0, 0, 0, 0.035));
  text-align: left;
  color: var(--c-text);
}

button.phone-app-row:active {
  background: rgba(0, 0, 0, 0.07);
}

.phone-app-row-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  color: var(--c-sub);
  font-size: 14px;
}

.phone-app-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.phone-app-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-app-row-sub {
  font-size: 12px;
  color: var(--c-hint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-app-row-arrow {
  flex-shrink: 0;
  color: var(--c-hint);
  font-size: 14px;
}

/* --- 浏览器 --- */

.phone-browser-searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  margin-top: 6px;
  border-radius: 22px;
  background: var(--c-surface, rgba(0, 0, 0, 0.05));
  color: var(--c-hint);
  font-size: 14px;
}

.phone-browser-searchbar-filled {
  color: var(--c-text);
}

.phone-browser-searchbar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-browser-bookmark-icon {
  color: #d9a13c;
}

.phone-browser-result-meta {
  margin: 12px 6px 4px;
  font-size: 12px;
  color: var(--c-hint);
}

.phone-browser-result-card {
  padding: 13px 14px;
  margin-top: 10px;
  border-radius: 14px;
  background: var(--c-surface, rgba(0, 0, 0, 0.035));
}

.phone-browser-result-site {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--c-sub);
}

.phone-browser-result-favicon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.08);
  font-size: 10px;
  color: var(--c-text);
}

.phone-browser-result-title {
  margin-top: 7px;
  font-size: 15px;
  font-weight: 600;
  color: #2f5db3;
  line-height: 1.4;
}

.phone-browser-result-snippet {
  margin-top: 5px;
  font-size: 13px;
  color: var(--c-sub);
  line-height: 1.6;
}

/* --- 备忘录 --- */

.phone-note-pin {
  font-size: 11px;
  color: #d9a13c;
  margin-right: 6px;
}

.phone-note-time {
  color: var(--c-sub);
  margin-right: 8px;
}

.phone-note-detail {
  padding: 8px 4px;
}

.phone-note-detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.4;
}

.phone-note-detail-time {
  margin-top: 8px;
  font-size: 12px;
  color: var(--c-hint);
}

.phone-note-detail-content {
  margin-top: 16px;
  font-size: 15px;
  color: var(--c-text);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --- 相册 --- */

.phone-album-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
}

.phone-album-card {
  flex-shrink: 0;
  width: 108px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  color: var(--c-text);
}

.phone-album-cover {
  display: block;
  width: 108px;
  height: 108px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
}

.phone-album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-album-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-album-count {
  font-size: 12px;
  color: var(--c-hint);
}

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

.phone-photo-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  padding: 0;
}

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

.phone-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 370;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.phone-photo-viewer.show {
  opacity: 1;
}

.phone-photo-viewer-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-photo-viewer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.phone-photo-viewer-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.phone-photo-viewer-caption {
  padding: 14px 20px calc(26px + env(safe-area-inset-bottom, 0px));
}

.phone-photo-viewer-desc {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  line-height: 1.6;
}

.phone-photo-viewer-time {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

/* --- Game Center --- */

.phone-game-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: #2f2f2f;
}

.phone-game-genre {
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 11px;
  font-weight: 500;
  color: var(--c-sub);
}

.phone-game-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px 4px;
}

.phone-game-hero .phone-game-icon {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  font-size: 22px;
}

.phone-game-hero-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
}

.phone-game-hero-genre {
  margin-top: 4px;
  font-size: 12px;
  color: var(--c-hint);
}

.phone-game-hours {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.phone-game-hours-card {
  padding: 12px 8px;
  border-radius: 14px;
  background: var(--c-surface, rgba(0, 0, 0, 0.035));
  text-align: center;
}

.phone-game-hours-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}

.phone-game-hours-last {
  font-size: 13px;
  font-weight: 600;
}

.phone-game-hours-label {
  margin-top: 4px;
  font-size: 11px;
  color: var(--c-hint);
}

.phone-achievement-row.is-locked {
  opacity: 0.55;
}

.phone-achievement-icon {
  color: #d9a13c;
}

.phone-achievement-row.is-locked .phone-achievement-icon {
  color: var(--c-hint);
}

.phone-achievement-check {
  flex-shrink: 0;
  color: #4caf7d;
  font-size: 13px;
}

.phone-game-stats {
  border-radius: 14px;
  background: var(--c-surface, rgba(0, 0, 0, 0.035));
  overflow: hidden;
}

.phone-game-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.phone-game-stat-row + .phone-game-stat-row {
  border-top: 1px solid var(--c-border, rgba(0, 0, 0, 0.06));
}

.phone-game-stat-label {
  font-size: 13px;
  color: var(--c-sub);
}

.phone-game-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}

/* --- 隐私空间 --- */

.phone-ph-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: #111;
}

.phone-ph-logo-text {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
}

.phone-ph-logo-block {
  padding: 1px 7px;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
}

.phone-ph-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.phone-ph-tab {
  padding: 7px 16px;
  border-radius: 18px;
  background: var(--c-surface, rgba(0, 0, 0, 0.035));
  color: var(--c-sub);
  font-size: 13px;
  font-weight: 600;
}

.phone-ph-tab.is-active {
  background: #1c1c1c;
  color: #fff;
}

.phone-ph-panel {
  margin-top: 14px;
}

.phone-ph-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-ph-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 14px;
  background: var(--c-surface, rgba(0, 0, 0, 0.035));
  text-align: left;
  color: var(--c-text);
}

button.phone-ph-card:active {
  background: rgba(0, 0, 0, 0.07);
}

.phone-ph-thumb {
  position: relative;
  flex-shrink: 0;
  width: 128px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
}

.phone-ph-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.35) brightness(0.82);
}

.phone-ph-duration {
  position: absolute;
  right: 5px;
  bottom: 7px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.phone-ph-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
}

.phone-ph-progress span {
  display: block;
  height: 100%;
  background: #e6e6e6;
}

.phone-ph-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phone-ph-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.phone-ph-card-channel {
  font-size: 12px;
  color: var(--c-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-ph-card-meta {
  font-size: 11px;
  color: var(--c-hint);
}

.phone-ph-detail-thumb {
  position: relative;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.08);
}

.phone-ph-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.35) brightness(0.82);
}

.phone-ph-detail-title {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.5;
}

.phone-ph-detail-desc {
  margin: 8px 0 14px;
  font-size: 13px;
  color: var(--c-sub);
  line-height: 1.7;
}

.phone-ph-detail-title + .phone-game-stats {
  margin-top: 14px;
}

/* --- Mail --- */

.phone-mail-list {
  display: flex;
  flex-direction: column;
}

.phone-mail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  text-align: left;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border, rgba(0, 0, 0, 0.06));
}

button.phone-mail-row:active {
  background: rgba(0, 0, 0, 0.05);
}

.phone-mail-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.phone-mail-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.phone-mail-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.phone-mail-sender {
  font-size: 14px;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-mail-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--c-hint);
}

.phone-mail-subject {
  font-size: 13px;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-mail-preview {
  font-size: 12px;
  color: var(--c-hint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-mail-row.is-unread .phone-mail-sender,
.phone-mail-row.is-unread .phone-mail-subject {
  font-weight: 700;
}

.phone-mail-row.is-unread .phone-mail-time {
  color: var(--c-text);
  font-weight: 600;
}

.phone-mail-spam-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.07);
  color: var(--c-sub);
  font-size: 10px;
  font-weight: 500;
  vertical-align: 1px;
}

.phone-mail-detail-subject {
  margin-top: 10px;
  padding: 0 4px;
  font-size: 19px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.45;
}

.phone-mail-detail-sender {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 0 4px;
}

.phone-mail-detail-sender-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.phone-mail-detail-sender-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-mail-detail-sender-address {
  font-size: 12px;
  color: var(--c-hint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-mail-detail-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--c-hint);
}

.phone-mail-detail-body {
  margin-top: 18px;
  padding: 0 4px;
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.phone-mail-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 0 4px;
}

.phone-mail-attachment {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--c-surface, rgba(0, 0, 0, 0.035));
  border: 1px solid var(--c-border, rgba(0, 0, 0, 0.06));
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text);
}

.phone-mail-attachment i {
  color: var(--c-sub);
}

.phone-mail-attachment-size {
  color: var(--c-hint);
}
