/* ============================================================
   护理服务工单抽检系统 - 微信小程序风格
   主色: 微信绿 #07C160
   背景: #F5F5F5 / 卡片 #FFFFFF
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --wechat-green: #07C160;
  --wechat-green-dark: #06AD56;
  --wechat-green-light: #95EC69;
  --wechat-green-bg: rgba(7, 193, 96, 0.08);
  --bg-page: #F5F5F5;
  --bg-white: #FFFFFF;
  --bg-chat: #EDEDED;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-white: #FFFFFF;
  --border-light: rgba(0, 0, 0, 0.06);
  --border-card: rgba(0, 0, 0, 0.08);
  --red: #FA5151;
  --red-dark: #E84040;
  --orange: #FF9800;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-bubble: 18px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-float: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-phone: 0 0 60px rgba(0,0,0,0.15), 0 0 120px rgba(0,0,0,0.08);
  --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --phone-width: 430px;
  --phone-radius: 44px;
  --nav-height: 44px;
  --statusbar-height: 44px;
  --bottom-bar-height: 80px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: #E8E8E8;
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== PC Phone Frame ========== */
.phone-frame {
  width: var(--phone-width);
  height: 93vh;
  max-height: 900px;
  min-height: 640px;
  background: var(--bg-page);
  border-radius: var(--phone-radius);
  box-shadow: var(--shadow-phone);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 2px solid #D0D0D0;
}

/* Notch */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 28px;
  background: #1A1A1A;
  border-radius: 0 0 22px 22px;
  z-index: 100;
}

/* ========== Status Bar (fake iOS) ========== */
.phone-statusbar {
  height: var(--statusbar-height);
  background: var(--bg-white);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 24px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
  position: relative;
  z-index: 50;
}

.statusbar-left { font-variant-numeric: tabular-nums; }
.statusbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
}

/* ========== Nav Bar (WeChat style) ========== */
.nav-bar {
  height: var(--nav-height);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 0.5px solid var(--border-light);
  flex-shrink: 0;
  position: relative;
  z-index: 50;
}

.nav-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.nav-back svg { width: 22px; height: 22px; }

.nav-title {
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--text-primary);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-right {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.nav-right svg { width: 20px; height: 20px; }

/* ========== Progress Bar (thin top line) ========== */
.progress-track {
  height: 3px;
  background: var(--border-light);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--wechat-green), var(--wechat-green-light));
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 0 2px 2px 0;
}

/* Phase labels under progress */
.phase-labels {
  display: flex;
  justify-content: space-between;
  padding: 6px 20px;
  background: var(--bg-white);
  border-bottom: 0.5px solid var(--border-light);
  flex-shrink: 0;
}

.phase-label-item {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
  transition: var(--transition);
}

.phase-label-item.active {
  color: var(--wechat-green);
  font-weight: 600;
}

.phase-label-item.completed {
  color: var(--text-secondary);
}

.phase-label-item .phase-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition);
}

.phase-label-item.active .phase-dot {
  background: var(--wechat-green);
  box-shadow: 0 0 6px rgba(7,193,96,0.4);
}

.phase-label-item.completed .phase-dot {
  background: var(--wechat-green);
}

/* ========== Main Content Scroll Area ========== */
.main-scroll {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ========== Dial Screen (initial) ========== */
.dial-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 24px;
  padding: 40px 32px;
  animation: fadeIn 0.5s ease;
}

.dial-avatar-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wechat-green), var(--wechat-green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dial-avatar-wrapper::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(7,193,96,0.25);
  animation: spin-slow 15s linear infinite;
}

.dial-avatar-emoji {
  font-size: 52px;
  line-height: 1;
}

.dial-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.dial-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  max-width: 260px;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 44px;
  background: var(--wechat-green);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(7,193,96,0.3);
  margin-top: 8px;
}

.btn-start:hover {
  background: var(--wechat-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(7,193,96,0.35);
}

.btn-start:active { transform: scale(0.97); }
.btn-start:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ========== Call Screen ========== */
.call-screen {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.call-screen.active { display: flex; }

/* Call Top Profile Area */
.call-profile-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 12px;
  background: var(--bg-white);
  border-bottom: 0.5px solid var(--border-light);
  flex-shrink: 0;
}

/* ========== Video Area ========== */
.video-area {
  position: relative;
  flex-shrink: 0;
  background: var(--bg-white);
  overflow: hidden;
}

.video-preview-wrapper {
  display: none;
  position: relative;
  width: 100%;
  max-height: 50vh;
  overflow: hidden;
  background: #111;
}

.video-preview-wrapper.active {
  display: block;
}

.video-preview-wrapper video {
  width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: cover;
  display: block;
  background: #111;
}

/* AI Avatar Float (right top corner) */
.ai-avatar-float {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wechat-green), var(--wechat-green-dark));
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  z-index: 10;
  border: 2px solid rgba(255,255,255,0.8);
}

.ai-avatar-float.active {
  display: flex;
}

/* Capture Button */
.btn-capture {
  display: none;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff;
  font-size: 20px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.btn-capture:active {
  transform: translateX(-50%) scale(0.88);
  background: rgba(0,0,0,0.65);
}

/* Capture Flash */
.capture-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: none;
}

.capture-flash.active {
  opacity: 0.7;
  transition: opacity 0.05s ease-in;
}

/* Fallback Avatar (no video) */
.call-avatar-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: var(--bg-white);
}

.call-avatar-fallback.active {
  display: flex;
}

/* Timer Bar */
.call-timer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-white);
  border-bottom: 0.5px solid var(--border-light);
  flex-shrink: 0;
  gap: 8px;
}

.call-avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wechat-green), var(--wechat-green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  position: relative;
  margin-bottom: 8px;
}

/* Ripple animation */
.call-avatar-circle::before,
.call-avatar-circle::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--wechat-green);
  opacity: 0;
}

.call-screen.active .call-avatar-circle::before {
  animation: ripple 2s ease-out infinite;
}

.call-screen.active .call-avatar-circle::after {
  animation: ripple 2s ease-out infinite 1s;
}

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

.call-robot-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.call-timer-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
}

.call-elapsed {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.call-countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  background: var(--wechat-green-bg);
  color: var(--wechat-green);
  transition: var(--transition);
}

.call-countdown.warning {
  background: rgba(255,152,0,0.1);
  color: var(--orange);
  animation: countdown-pulse 1s ease-in-out infinite;
}

.call-countdown.danger {
  background: rgba(250,81,81,0.1);
  color: var(--red);
  animation: countdown-pulse 0.6s ease-in-out infinite;
}

@keyframes countdown-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Sound Wave (inline in timer bar) */
.call-timer-bar .sound-wave {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 24px;
}

.sound-wave .bar {
  width: 3px;
  border-radius: 100px;
  background: var(--wechat-green);
  height: 6px;
  opacity: 0.3;
  transition: height 0.15s ease;
}

.sound-wave.active .bar {
  opacity: 0.8;
  animation: wave-bar 1.2s ease-in-out infinite;
}

.sound-wave.active .bar:nth-child(1) { animation-delay: 0s; }
.sound-wave.active .bar:nth-child(2) { animation-delay: 0.1s; }
.sound-wave.active .bar:nth-child(3) { animation-delay: 0.2s; }
.sound-wave.active .bar:nth-child(4) { animation-delay: 0.3s; }
.sound-wave.active .bar:nth-child(5) { animation-delay: 0.15s; }
.sound-wave.active .bar:nth-child(6) { animation-delay: 0.25s; }
.sound-wave.active .bar:nth-child(7) { animation-delay: 0.35s; }
.sound-wave.active .bar:nth-child(8) { animation-delay: 0.05s; }

@keyframes wave-bar {
  0%, 100% { height: 6px; }
  50% { height: 24px; }
}

/* ========== Chat / Transcript Area ========== */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  background: var(--bg-page);
}

.chat-area::-webkit-scrollbar { width: 0; }

/* WeChat-style chat bubbles */
.msg {
  display: flex;
  gap: 8px;
  max-width: 82%;
  animation: msg-in 0.3s ease-out;
}

.msg.ai { align-self: flex-start; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  overflow: hidden;
}

.msg.ai .msg-avatar {
  background: linear-gradient(135deg, var(--wechat-green), var(--wechat-green-dark));
  color: white;
}

.msg.user .msg-avatar {
  background: #C8E6C9;
}

.msg-body { display: flex; flex-direction: column; }
.msg.user .msg-body { align-items: flex-end; }

.msg-bubble {
  padding: 10px 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  position: relative;
  word-break: break-word;
}

.msg.ai .msg-bubble {
  background: var(--bg-white);
  border-radius: 0 var(--radius-bubble) var(--radius-bubble) var(--radius-bubble);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.msg.user .msg-bubble {
  background: var(--wechat-green-light);
  border-radius: var(--radius-bubble) 0 var(--radius-bubble) var(--radius-bubble);
  color: #1A3A1A;
}

.msg-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 3px;
  padding: 0 4px;
}

.msg-system {
  align-self: center;
  max-width: 90%;
  padding: 4px 12px;
  background: rgba(0,0,0,0.04);
  border-radius: 100px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Bottom Action Bar ========== */
.bottom-bar {
  height: var(--bottom-bar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: var(--bg-white);
  border-top: 0.5px solid var(--border-light);
  flex-shrink: 0;
  padding: 0 20px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: var(--transition);
  padding: 4px;
}

.action-btn:active { transform: scale(0.92); }

.action-btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: var(--transition);
}

.action-btn-label {
  font-size: 0.65rem;
  font-family: var(--font);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Mute button */
.action-btn.mute .action-btn-icon {
  background: var(--bg-page);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}

.action-btn.mute.active .action-btn-icon {
  background: var(--wechat-green);
  color: #fff;
  border-color: var(--wechat-green);
}

/* End call button */
.action-btn.end-call .action-btn-icon {
  background: var(--red);
  color: #fff;
}

.action-btn.end-call:hover .action-btn-icon {
  background: var(--red-dark);
}

/* Record button */
.action-btn.record .action-btn-icon {
  background: var(--bg-page);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}

/* ========== Half-screen Panel (Bottom Sheet) ========== */
.sheet-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.sheet-overlay.active {
  display: block;
  opacity: 1;
}

.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70%;
  background: var(--bg-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 301;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bottom-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  display: flex;
  justify-content: center;
  padding: 10px 0 6px;
  flex-shrink: 0;
}

.sheet-handle-bar {
  width: 36px;
  height: 4px;
  border-radius: 100px;
  background: #DDD;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 12px;
  border-bottom: 0.5px solid var(--border-light);
  flex-shrink: 0;
}

.sheet-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sheet-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-page);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
}

.sheet-tabs {
  display: flex;
  border-bottom: 0.5px solid var(--border-light);
  flex-shrink: 0;
}

.sheet-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.sheet-tab.active {
  color: var(--wechat-green);
  border-bottom-color: var(--wechat-green);
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.sheet-body::-webkit-scrollbar { width: 0; }

/* Info Cards */
.info-card {
  background: var(--bg-page);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.info-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.info-row + .info-row {
  border-top: 0.5px solid var(--border-light);
}

.info-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.info-value {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
  max-width: 55%;
  word-break: break-all;
}

.info-value.empty {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 400;
}

.info-value.highlight {
  color: var(--wechat-green);
}

/* Report */
.report-panel { display: none; }
.report-panel.active { display: block; }

.report-header {
  text-align: center;
  padding: 12px 0 16px;
  border-bottom: 0.5px solid var(--border-light);
  margin-bottom: 14px;
}

.report-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.report-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.report-table th,
.report-table td {
  padding: 8px 10px;
  text-align: left;
  font-size: 0.8rem;
  border-bottom: 0.5px solid var(--border-light);
}

.report-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.72rem;
}

.report-conclusion {
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 12px 0;
}

.report-conclusion.pass {
  background: rgba(7,193,96,0.08);
  border: 1px solid rgba(7,193,96,0.2);
  color: var(--wechat-green);
}

.report-conclusion.suspect {
  background: rgba(255,152,0,0.08);
  border: 1px solid rgba(255,152,0,0.2);
  color: var(--orange);
}

.report-conclusion.fail {
  background: rgba(250,81,81,0.08);
  border: 1px solid rgba(250,81,81,0.2);
  color: var(--red);
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-report {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: var(--bg-white);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-report:hover { background: var(--bg-page); }

.btn-report.primary {
  background: var(--wechat-green);
  border-color: var(--wechat-green);
  color: #fff;
}

.btn-report.primary:hover { background: var(--wechat-green-dark); }

/* ========== Toast ========== */
.toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 0.85rem;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.6s forwards;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
}

/* ========== Animations ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========== Responsive: Real Mobile ========== */
@media (max-width: 480px) {
  body {
    background: var(--bg-page);
    align-items: stretch;
    justify-content: stretch;
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    max-height: none;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  .phone-frame::before { display: none; }

  .phone-statusbar { display: none; }

  .bottom-sheet {
    max-height: 80%;
  }
}

@media (max-width: 480px) and (display-mode: standalone) {
  .phone-statusbar { display: none; }
}

/* ========== Utility ========== */
.hidden { display: none !important; }

/* ========== Evidence Grid ========== */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.evidence-thumb {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eee;
}

.evidence-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.evidence-thumb .evidence-time {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2px 4px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.6rem;
  text-align: center;
}
