*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  background: #fafafa;
  color: #333;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ── ログイン画面 ── */
#login-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 24px;
  background: linear-gradient(160deg, #fce4ec 0%, #fff 60%);
}

.login-icon {
  font-size: 56px;
  line-height: 1;
}

.login-title {
  font-size: 32px;
  font-weight: 800;
  color: #C2185B;
  letter-spacing: -0.5px;
}

.login-sub {
  font-size: 15px;
  color: #888;
  margin-top: -8px;
}

.google-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, transform 0.1s;
  margin-top: 8px;
}
.google-btn:hover  { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.google-btn:active { transform: scale(0.98); }

.login-error {
  font-size: 13px;
  color: #d32f2f;
  text-align: center;
}

/* ── ヘッダー ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid #eee;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title {
  font-size: 19px;
  font-weight: 700;
  color: #C2185B;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.logout-btn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: inherit;
  color: #666;
  cursor: pointer;
}
.logout-btn:hover { background: #f5f5f5; }

/* ── 録音セクション ── */
.record-section {
  background: white;
  margin: 16px;
  border-radius: 20px;
  padding: 32px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.record-timer {
  font-size: 36px;
  font-weight: 200;
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
  color: #C2185B;
}

.record-btn {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #C2185B;
  border: none;
  cursor: pointer;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(194,24,91,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.record-btn:hover  { transform: scale(1.06); }
.record-btn:active { transform: scale(0.96); }

.record-btn.recording {
  background: #d32f2f;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(211,47,47,0.45); }
  60%  { box-shadow: 0 0 0 18px rgba(211,47,47,0); }
  100% { box-shadow: 0 0 0 0   rgba(211,47,47,0); }
}

.record-status {
  font-size: 14px;
  color: #888;
}

.processing {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #C2185B;
  font-weight: 500;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #f8bbd0;
  border-top-color: #C2185B;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── メモ一覧 ── */
.memo-list-section {
  padding: 0 16px 32px;
}

.list-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #bbb;
  padding: 4px 4px 10px;
}

/* カード */
.memo-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

.memo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.memo-date {
  font-size: 12px;
  color: #aaa;
}

.memo-badge {
  font-size: 11px;
  background: #fce4ec;
  color: #C2185B;
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 600;
}

.memo-transcript {
  font-size: 15px;
  line-height: 1.7;
  color: #333;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 12px;
}

.memo-transcript.empty {
  color: #ccc;
  font-style: italic;
  font-size: 13px;
}

.memo-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.play-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #fce4ec;
  color: #C2185B;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.play-btn:hover { background: #f8bbd0; }

.memo-audio {
  flex: 1;
  height: 32px;
  accent-color: #C2185B;
}

.download-btn, .delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #ccc;
  transition: color 0.15s;
  line-height: 1;
}
.download-btn:hover { color: #1976d2; }
.delete-btn:hover   { color: #d32f2f; }

/* 空・ローディング */
.empty-state, .loading-state {
  text-align: center;
  padding: 48px 16px;
  color: #ccc;
}

.empty-state-icon { font-size: 44px; margin-bottom: 10px; }
.empty-state-text { font-size: 14px; }

.loading-state {
  display: flex;
  justify-content: center;
}
