/* iPhone-friendly minimalist */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f7f7f7;
  color: #1c1c1e;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  min-height: 100vh;
}

#app { max-width: 480px; margin: 0 auto; padding: 16px; }

header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
header h1 { font-size: 24px; margin: 0; }
#user-info { font-size: 14px; color: #666; display: flex; gap: 8px; align-items: center; }

.card {
  background: #fff; border-radius: 16px; padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card h2 { font-size: 17px; margin: 0 0 12px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-header h2 { margin: 0; }

.btn-primary {
  display: block; text-align: center;
  background: #fe2c55;
  color: white; padding: 14px 24px;
  border-radius: 12px; text-decoration: none;
  font-weight: 600; font-size: 16px;
  border: none; cursor: pointer; width: 100%;
}
.btn-primary:active { opacity: 0.7; }

.link-btn {
  background: none; border: none; color: #007aff;
  font-size: 14px; cursor: pointer; padding: 4px 8px;
}

.summary-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 16px;
}
.stat-card {
  background: #fff; border-radius: 12px; padding: 12px 8px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.stat-label { font-size: 11px; color: #8e8e93; text-transform: uppercase; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-delta { font-size: 12px; color: #34c759; margin-top: 2px; }
.stat-delta.neg { color: #ff3b30; }
.stat-delta.zero { color: #8e8e93; }

#video-list .video-row {
  display: flex; align-items: center; padding: 10px 0;
  border-bottom: 1px solid #eee;
  gap: 12px;
}
#video-list .video-row:last-child { border-bottom: none; }
.video-thumb {
  width: 56px; height: 80px; border-radius: 8px;
  background: #ddd; flex-shrink: 0; object-fit: cover;
}
.video-info { flex: 1; min-width: 0; }
.video-title {
  font-size: 13px; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.video-date { font-size: 11px; color: #8e8e93; }
.video-views { font-size: 15px; font-weight: 600; text-align: right; }
.video-views-delta { font-size: 11px; color: #34c759; text-align: right; }
.video-views-delta.neg { color: #ff3b30; }

.muted { color: #8e8e93; font-size: 12px; margin-top: 8px; text-align: center; }
.error {
  background: #fff3f3; color: #d70015; padding: 12px 16px;
  border-radius: 12px; margin: 16px 0; font-size: 14px;
}
.hidden { display: none !important; }

#chart { max-width: 100%; height: 240px !important; }
