/* デザイン方針：明るい背景・シンプル・モダン（CLAUDE.md準拠） */

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

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans', sans-serif;
  background: #f8f9fa;
  color: #222;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px;
  padding-top: env(safe-area-inset-top, 24px);
  padding-bottom: env(safe-area-inset-bottom, 24px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header {
  text-align: center;
  padding: 8px 0 8px;
}

.brand {
  font-size: 13px;
  color: #999;
  letter-spacing: 0.05em;
}

.meta {
  font-size: 12px;
  color: #aaa;
  margin-top: 4px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hidden {
  display: none !important;
}

/* 問い表示カード */
.question-card {
  border-left: 3px solid #222;
  padding: 20px;
}

.question-meta {
  font-size: 12px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.question-text {
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  font-weight: 500;
}

/* 入力カード */
.hint {
  font-size: 13px;
  color: #888;
  margin-bottom: 12px;
  text-align: center;
}

.answer-input {
  width: 100%;
  min-height: 200px;
  padding: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  background: #fafafa;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
}

.answer-input:focus {
  border-color: #222;
  background: #fff;
}

.counter {
  text-align: right;
  font-size: 12px;
  color: #aaa;
  margin-top: 8px;
  margin-bottom: 20px;
}

.counter.warn {
  color: #e53935;
}

/* ボタン */
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: #222;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #000;
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background: #e8e8e8;
}

/* 成功・エラー */
.success-card,
.error-card {
  text-align: center;
  padding: 32px 24px;
}

.success-icon {
  font-size: 40px;
  color: #4caf50;
  margin-bottom: 12px;
}

.success-title,
.error-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.success-msg,
.error-msg {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 24px;
}

.error-title {
  color: #e53935;
}

/* ========== ドラフト承認UI (review.html) ========== */
.review-container {
  max-width: 640px;
}

.loading-card {
  text-align: center;
  padding: 48px 24px;
  color: #888;
}

/* Q&A 折りたたみ */
.qa-toggle {
  margin-bottom: 24px;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 0;
}

.qa-summary {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #888;
  outline: none;
}

.qa-content {
  padding: 0 16px 16px;
  border-top: 1px solid #eee;
}

.qa-label {
  font-size: 12px;
  color: #999;
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: 600;
}

.qa-text {
  font-size: 13px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

/* プレビューセクション */
.preview-section {
  margin-bottom: 24px;
}

.preview-title {
  font-size: 15px;
  color: #222;
  margin-bottom: 12px;
  font-weight: 600;
}

.preview-sub {
  font-size: 12px;
  color: #888;
  margin: 16px 0 8px;
}

.preview-body {
  background: #fafafa;
  padding: 16px;
  border-radius: 6px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  border: 1px solid #f0f0f0;
}

.hashtags {
  font-size: 13px;
  line-height: 1.7;
  color: #1976d2;
}

.image-text-card {
  background: #fff;
  padding: 12px;
  border-radius: 4px;
  margin-top: 8px;
  border: 1px solid #e0e0e0;
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  white-space: pre-wrap;
}

.image-text-card p {
  margin: 0;
}

.image-text-label {
  display: block;
  color: #999;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* ステータスバッジ */
.status-badge {
  display: block;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  margin-top: 16px;
}

.status-approved {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-rejected {
  background: #ffebee;
  color: #c62828;
}

/* 承認・却下ボタンレイアウト */
.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.actions .btn-primary,
.actions .btn-secondary {
  flex: 1;
}
