/* ============================================================
   ナマケ者AI 求人チェッカー — スタイルシート
   設計方針: 暖色系・ゆるい・疲れた社会人に寄り添うUI
   ============================================================ */

/* ── リセット & ベース ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f5f2ed;
  --surface:   #ffffff;
  --border:    #e2dbd0;
  --text:      #2d2926;
  --text-muted:#7a7069;
  --accent:    #5c5bd4;

  --green-bg:  #f0fdf4;
  --green-fg:  #16a34a;
  --green-bd:  #bbf7d0;

  --yellow-bg: #fffbeb;
  --yellow-fg: #d97706;
  --yellow-bd: #fde68a;

  --red-bg:    #fff1f2;
  --red-fg:    #dc2626;
  --red-bd:    #fecaca;

  --critical-tag: #dc2626;
  --warning-tag:  #d97706;
  --caution-tag:  #2563eb;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 2px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);

  --font: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── レイアウト ── */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* ── ヘッダー ── */
.header {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.logo {
  font-size: 3rem;
  display: block;
  margin-bottom: .5rem;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.title-sub {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  margin-top: .2rem;
}

.tagline {
  margin-top: 1rem;
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── 入力セクション ── */
.input-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.input-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .75rem;
  color: var(--text-muted);
}

.textarea {
  width: 100%;
  min-height: 180px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .875rem 1rem;
  font-family: var(--font);
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  transition: border-color .2s;
  outline: none;
}

.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(92,91,212,.12);
}

.textarea::placeholder { color: #b0a898; }

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .5rem;
  margin-bottom: 1.25rem;
}

.char-count {
  font-size: .8rem;
  color: var(--text-muted);
}

.char-count.over { color: var(--red-fg); font-weight: 600; }

.input-footer-right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.shortcut-hint {
  font-size: .72rem;
  color: #b0a898;
}

@media (max-width: 400px) { .shortcut-hint { display: none; } }

.free-note {
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .2rem .6rem;
}

.btn-analyze {
  width: 100%;
  padding: .875rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background .2s, transform .1s, box-shadow .2s;
}

.btn-analyze:hover:not(:disabled) {
  background: #4a49c0;
  box-shadow: 0 4px 16px rgba(92,91,212,.3);
}

.btn-analyze:active:not(:disabled) { transform: scale(.98); }

.btn-analyze:disabled {
  background: #b0aee8;
  cursor: not-allowed;
}

.btn-icon { font-size: 1.1rem; }

/* ── ローディング ── */
.loading {
  margin-top: 2rem;
  text-align: center;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 1rem;
}

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

.loading-text {
  font-size: .9rem;
  color: var(--text-muted);
  transition: opacity .25s ease;
}

.loading-text.fading {
  opacity: 0;
}

/* ── 結果セクション ── */
.result { margin-top: 2rem; }

/* 総合バッジ */
.badge-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  border: 2px solid;
}

.badge-card.green {
  background: var(--green-bg);
  border-color: var(--green-bd);
  color: var(--green-fg);
}

.badge-card.yellow {
  background: var(--yellow-bg);
  border-color: var(--yellow-bd);
  color: var(--yellow-fg);
}

.badge-card.red {
  background: var(--red-bg);
  border-color: var(--red-bd);
  color: var(--red-fg);
}

.badge-emoji { font-size: 2.5rem; display: block; margin-bottom: .5rem; }
.badge-label { font-size: 1.2rem; font-weight: 700; display: block; }
.badge-score {
  font-size: .85rem;
  margin-top: .25rem;
  opacity: .75;
  display: block;
}
.badge-summary {
  margin-top: .75rem;
  font-size: .95rem;
  font-weight: 500;
  color: inherit;
  opacity: .9;
}

/* 指摘カード */
.findings-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}

.finding-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.finding-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .875rem;
}

.finding-category {
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
  background: #f0eee9;
  color: var(--text-muted);
}

.finding-severity {
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 99px;
}

.finding-severity.critical {
  background: #fee2e2;
  color: var(--critical-tag);
}

.finding-severity.warning {
  background: #fef3c7;
  color: var(--warning-tag);
}

.finding-severity.caution {
  background: #dbeafe;
  color: var(--caution-tag);
}

.finding-quote {
  font-size: .85rem;
  color: var(--text-muted);
  border-left: 3px solid var(--border);
  padding-left: .75rem;
  margin-bottom: .75rem;
  font-style: italic;
  line-height: 1.5;
}

.finding-comment {
  font-size: .9rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.finding-question-box {
  background: #f0effe;
  border: 1px solid #c7c6f5;
  border-radius: var(--radius-sm);
  padding: .875rem;
}

.finding-question-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: .375rem;
  display: block;
}

.finding-question {
  font-size: .85rem;
  color: #3d3c8e;
  line-height: 1.5;
}

/* 法律メモ */
.legal-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1.125rem;
  margin-bottom: 1.5rem;
  font-size: .85rem;
  line-height: 1.65;
  color: #78350f;
}

.legal-note-label {
  font-weight: 700;
  display: block;
  margin-bottom: .25rem;
  font-size: .8rem;
}

/* 問題なし */
.all-clear {
  text-align: center;
  padding: 2rem;
  background: var(--green-bg);
  border: 1px solid var(--green-bd);
  border-radius: var(--radius);
  color: var(--green-fg);
  font-size: .95rem;
}

/* 緑判定：もっと知りたい人向け記事 */
.learn-more-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}

.learn-more-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.learn-more-text {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: .875rem;
}

.learn-more-btn {
  display: block;
  width: 100%;
  padding: .75rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  text-align: center;
  transition: background .15s, border-color .15s;
}

.learn-more-btn:hover {
  background: #ede8e0;
  border-color: #c8bfb0;
}

/* dodaチャレンジセクション（アフィリエイト内・控えめ） */
.doda-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.doda-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: .4rem;
}

.doda-text {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: .75rem;
}

.doda-btn {
  display: block;
  width: 100%;
  padding: .7rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  transition: background .15s, color .15s;
}

.doda-btn:hover {
  background: #ede8e0;
  color: var(--text);
}

.doda-btn span {
  display: block;
  font-size: .72rem;
  font-weight: 400;
  margin-top: .1rem;
  color: #b0a898;
}

/* アフィリエイトセクション */
.affiliate-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow);
}

.affiliate-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.affiliate-lead {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.affiliate-btn {
  display: block;
  width: 100%;
  padding: .875rem 1rem;
  background: #f97316;
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  text-decoration: none;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: .625rem;
  transition: background .15s, transform .1s, box-shadow .15s;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(249,115,22,.3);
}

.affiliate-btn:hover {
  background: #ea6c0a;
  box-shadow: 0 4px 16px rgba(249,115,22,.4);
  transform: translateY(-1px);
}

.affiliate-btn:active { transform: scale(.98); }

.affiliate-btn span { display: block; font-size: .75rem; font-weight: 400; color: rgba(255,255,255,.8); margin-top: .15rem; }

.affiliate-disclaimer {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .75rem;
  text-align: center;
}

/* エラー */
.error-box {
  background: var(--red-bg);
  border: 1px solid var(--red-bd);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.5rem;
  font-size: .9rem;
  color: var(--red-fg);
  line-height: 1.6;
}

/* フッター */
.footer {
  margin-top: 4rem;
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-author { margin-bottom: .4rem; }
.footer-contact { margin-bottom: .25rem; }

.footer-link {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-link:hover { color: var(--text); }

.footer-link--bold {
  font-weight: 600;
  color: var(--accent);
}

.footer-link--bold:hover { color: #4a49c0; }

/* ── ハニーポット（ボット対策・絶対に表示しない） ── */
.hp-wrap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ── レスポンシブ ── */

/* タブレット（〜768px） */
@media (max-width: 768px) {
  .container { padding: 1.5rem 1rem 3rem; }
  .header { padding: 2rem 0 1.5rem; }
}

/* スマホ（〜480px） */
@media (max-width: 480px) {
  /* ヘッダー */
  .logo { font-size: 2.5rem; }
  .title { font-size: 1.35rem; }
  .tagline { font-size: .875rem; }

  /* 入力エリア */
  .input-section { padding: 1rem; }
  .textarea { min-height: 140px; font-size: .875rem; }
  .input-footer { flex-wrap: wrap; gap: .25rem; }

  /* ボタン */
  .btn-analyze { font-size: .95rem; padding: .8rem; }

  /* 結果カード */
  .badge-card { padding: 1.25rem 1rem; }
  .badge-emoji { font-size: 2rem; }
  .badge-label { font-size: 1.05rem; }
  .finding-card { padding: 1rem; }
  .finding-question-box { padding: .75rem; }

  /* アフィリエイト */
  .affiliate-section { padding: 1.125rem; }
  .affiliate-btn { font-size: .875rem; padding: .8rem; }
  .affiliate-btn span { font-size: .7rem; }

  /* フッター */
  .footer { font-size: .7rem; }
  .footer-author, .footer-contact { line-height: 1.8; }
}
