* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f5f7;
  font-family: "Hiragino Kaku Gothic ProN", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1f2430;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 60px;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #1f2a44, #2f6fed);
  color: #fff;
  padding: 56px 24px 68px;
  text-align: center;
  border-radius: 0 0 28px 28px;
}

.hero-inner {
  max-width: 560px;
  margin: 0 auto;
}

.eyebrow {
  letter-spacing: 0.12em;
  font-size: 12px;
  opacity: 0.85;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 26px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.hero-lead {
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.92;
  margin: 0 0 28px;
}

.hero-cta {
  display: inline-block;
  background: #fff;
  color: #2f6fed;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.hero-cta:hover {
  background: #eef1f6;
}

/* ---- Features ---- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 24px;
  max-width: 720px;
  margin: -32px auto 0;
  position: relative;
}

.feature {
  background: #fff;
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 8px 20px rgba(31, 42, 68, 0.12);
}

.feature-icon {
  font-size: 22px;
  margin-bottom: 8px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.feature p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* ---- Example ---- */
.example {
  max-width: 640px;
  margin: 36px auto 0;
  padding: 0 24px;
  text-align: center;
}

.example-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 14px;
}

.example-compare {
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.example-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.tag-text {
  background: #eef1f6;
  color: #3b4252;
}

.tag-audio {
  background: #fef3e2;
  color: #b45309;
}

.example-sentence {
  font-size: 15px;
}

.audio-sentence {
  font-weight: 600;
  color: #1f2430;
}

.example-arrow {
  font-size: 12px;
  color: #9aa1ac;
  margin: 12px 0;
}

/* ---- Practice card ---- */
.card {
  width: 100%;
  max-width: 520px;
  margin: 40px auto 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 32px 28px;
}

.header {
  text-align: center;
  margin-bottom: 8px;
}

.card .header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.progress {
  text-align: center;
  color: #9aa1ac;
  font-size: 13px;
  margin: 16px 0;
}

.audio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.play-btn, .replay-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
}

.play-btn {
  background: #2f6fed;
  color: #fff;
}

.play-btn:hover {
  background: #2557c7;
}

.replay-btn {
  background: #eef1f6;
  color: #3b4252;
}

.replay-btn:hover {
  background: #e2e6ee;
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}

.speed-control input[type="range"] {
  width: 120px;
}

.input-area {
  margin-bottom: 18px;
}

.input-area label {
  display: block;
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 6px;
}

.input-area textarea {
  width: 100%;
  border: 1px solid #d8dce3;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  resize: vertical;
  font-family: inherit;
}

.input-area textarea:focus {
  outline: none;
  border-color: #2f6fed;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.primary-btn, .secondary-btn {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
}

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

.primary-btn:hover {
  background: #33394a;
}

.secondary-btn {
  background: #eef1f6;
  color: #3b4252;
}

.secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary-btn:not(:disabled):hover {
  background: #e2e6ee;
}

.result {
  margin-top: 18px;
  border-top: 1px solid #eceff3;
  padding-top: 16px;
}

.result.hidden {
  display: none;
}

.result-header {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.result-header.success {
  color: #1c8a4b;
}

.result-header.partial {
  color: #d97706;
}

.result-line {
  margin-bottom: 10px;
}

.result-label {
  display: block;
  font-size: 12px;
  color: #9aa1ac;
  margin-bottom: 4px;
}

.sentence {
  font-size: 16px;
  line-height: 1.7;
}

.sentence.your-answer {
  color: #6b7280;
}

.sentence.translation {
  color: #4b5563;
  font-style: italic;
}

.word-missing {
  color: #d64545;
  background: #fdeceb;
  border-radius: 4px;
  padding: 0 3px;
}

.word-near {
  color: #1f2430;
}

.word-near .suffix {
  color: #d97706;
  background: #fef3e2;
  border-radius: 4px;
  padding: 0 2px;
}

.score {
  margin-top: 10px;
  font-size: 13px;
  color: #4b5563;
}

.note {
  margin: 20px 0 0;
  font-size: 11px;
  color: #b0b6c0;
  text-align: center;
  line-height: 1.6;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 40px 24px 0;
  font-size: 12px;
  color: #9aa1ac;
}

/* ---- Site nav (共通ナビ) ---- */
.site-nav {
  background: #fff;
  border-bottom: 1px solid #eceff3;
}

.site-nav-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-logo {
  font-size: 14px;
  font-weight: 700;
  color: #1f2430;
  text-decoration: none;
}

.site-nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav-links a {
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
}

.site-nav-links a:hover {
  color: #2f6fed;
}

/* ---- Simple page header (About / Privacy 等) ---- */
.page-header {
  text-align: center;
  padding: 40px 24px 8px;
}

.page-header h1 {
  font-size: 24px;
  margin: 0 0 8px;
}

.page-header p {
  color: #6b7280;
  font-size: 13px;
  margin: 0;
}

/* ---- Content card (About / Privacy 等の本文) ---- */
.content-card {
  max-width: 640px;
  margin: 24px auto 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 32px 28px;
}

.content-card h2 {
  font-size: 16px;
  margin: 26px 0 10px;
  color: #1f2430;
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-card p,
.content-card li {
  font-size: 14px;
  line-height: 1.9;
  color: #3b4252;
}

.content-card ul {
  padding-left: 20px;
  margin: 8px 0;
}

.content-card .placeholder {
  color: #b45309;
  background: #fef3e2;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ---- Footer links ---- */
.footer-links {
  margin-top: 6px !important;
}

.footer-links a {
  color: #6b7280;
  text-decoration: none;
}

.footer-links a:hover {
  color: #2f6fed;
}

/* ---- Give up / Skip / Keyboard hint ---- */
.skip-link {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: none;
  color: #9aa1ac;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
}

.skip-link:hover {
  color: #6b7280;
}

.kbd-hint {
  text-align: center;
  font-size: 11px;
  color: #b0b6c0;
  margin: 10px 0 0;
}

.result-header.neutral {
  color: #6b7280;
}

/* ---- 頻出熟語・表現の解説ボックス ---- */
.idiom-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: #eef4ff;
  border-radius: 10px;
  border-left: 3px solid #2f6fed;
}

.idiom-label {
  margin: 0 0 6px;
  font-size: 13px;
  color: #1f2430;
}

.idiom-meaning {
  margin: 0 0 4px;
  font-size: 13px;
  color: #3b4252;
  line-height: 1.7;
}

.idiom-note {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.6;
}

/* ---- レベル/カテゴリ フィルター ---- */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-group label {
  font-size: 12px;
  color: #6b7280;
}

.filter-group select {
  border: 1px solid #d8dce3;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #1f2430;
  cursor: pointer;
}

.filter-group select:focus {
  outline: none;
  border-color: #2f6fed;
}

.empty-state {
  text-align: center;
  font-size: 13px;
  color: #9aa1ac;
  background: #f4f5f7;
  border-radius: 10px;
  padding: 24px 16px;
  margin: 16px 0;
}

.empty-state.hidden {
  display: none;
}

/* ---- 無効化(絞り込み結果0件のとき)のスタイル ---- */
.play-btn:disabled,
.replay-btn:disabled,
.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-area textarea:disabled {
  background: #f4f5f7;
  color: #9aa1ac;
}

/* ---- モバイル向け調整(〜480px) ---- */
@media (max-width: 480px) {
  .hero {
    padding: 40px 18px 52px;
    border-radius: 0 0 20px 20px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero-lead {
    font-size: 13px;
  }

  .card,
  .content-card {
    padding: 24px 18px;
    border-radius: 14px;
  }

  .example-compare {
    padding: 18px 16px;
  }

  .actions .primary-btn,
  .actions .secondary-btn {
    flex: 1 1 auto;
    padding: 12px 14px;
  }

  .site-nav-inner {
    padding: 12px 16px;
  }

  .filter-bar {
    gap: 10px;
  }

  .filter-group select {
    font-size: 12px;
    padding: 5px 8px;
  }
}

/* ---- お問い合わせフォーム ---- */
.contact-form label {
  display: block;
  font-size: 13px;
  color: #4b5563;
  margin: 16px 0 6px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  border: 1px solid #d8dce3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2f6fed;
}

.contact-form .primary-btn {
  margin-top: 20px;
  width: 100%;
}

.form-note {
  font-size: 12px !important;
  color: #9aa1ac !important;
  margin-top: 12px;
}

.form-errors {
  background: #fdeceb;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.form-errors p {
  color: #d64545 !important;
  margin: 4px 0;
  font-size: 13px !important;
}

/* ボット対策の隠し入力欄: 画面外に飛ばして人間には見せない */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- 実際の音声(くだけた表記)の表示 ---- */
.sentence.spoken {
  color: #b45309;
  font-weight: 600;
}

.casual-note {
  font-size: 12px;
  color: #6b7280;
  background: #fef3e2;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 10px 0 0;
  line-height: 1.6;
}

/* ---- 解説記事 ---- */
.article h2 {
  margin: 30px 0 12px;
  font-size: 17px;
  padding-bottom: 6px;
  border-bottom: 2px solid #eef1f6;
}

.article p {
  margin: 0 0 14px;
}

.article code {
  background: #f4f5f7;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
}

.example-pair {
  background: #f8f9fb;
  border-left: 3px solid #2f6fed;
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 2;
}

.label-text, .label-audio {
  display: inline-block;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: 8px;
}

.label-text { background: #eef1f6; color: #3b4252; }
.label-audio { background: #fef3e2; color: #b45309; }

.pattern-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 13px;
}

.pattern-table th,
.pattern-table td {
  border-bottom: 1px solid #eef1f6;
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}

.pattern-table th {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.pattern-table td:first-child {
  font-weight: 600;
  color: #b45309;
  white-space: nowrap;
}

.article-cta {
  text-align: center;
  margin: 28px 0 8px !important;
}

.article-related {
  margin-top: 28px !important;
  padding-top: 16px;
  border-top: 1px solid #eef1f6;
  font-size: 12px !important;
  color: #9aa1ac !important;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.article-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 16px 14px;
  border-radius: 12px;
}

.article-item:hover {
  background: #f8f9fb;
}

.article-item h2 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #2f6fed;
}

.article-item p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.7;
}

/* ---- 記事内の音声再生ボタン ---- */
.play-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #2f6fed;
  background: #fff;
  color: #2f6fed;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
}

.play-inline:hover {
  background: #eef4ff;
}

.play-inline.playing {
  background: #2f6fed;
  color: #fff;
}

.play-icon {
  font-size: 10px;
}

/* ---- 記事の図解 ---- */
.article-hero {
  margin: 0 0 24px;
  text-align: center;
}

.article-hero svg {
  width: 100%;
  height: auto;
  max-width: 460px;
}

.figure {
  margin: 20px 0 24px;
  text-align: center;
}

.figure svg {
  width: 100%;
  height: auto;
  max-width: 440px;
}

.figure figcaption {
  font-size: 12px;
  color: #9aa1ac;
  margin-top: 8px;
}

/* ---- 5つの変化カード ---- */
.change-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0 26px;
}

.change-card {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
}

.change-card .num {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 999px;
  background: #2f6fed;
  color: #fff;
  font-size: 12px;
  margin-bottom: 6px;
}

.change-card .name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.change-card .sub {
  display: block;
  font-size: 11px;
  color: #9aa1ac;
}

/* ---- 学習ステップ ---- */
.step-flow {
  margin: 18px 0 26px;
}

.step-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f6;
}

.step-row:last-child { border-bottom: none; }

.step-num {
  flex: 0 0 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 999px;
  background: #2f6fed;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.step-body h3 {
  margin: 2px 0 4px;
  font-size: 14px;
}

.step-body p {
  margin: 0 !important;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.7;
}

/* ---- 記事一覧のセクション見出し ---- */
.article-section {
  font-size: 13px;
  color: #9aa1ac;
  margin: 24px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef1f6;
}

.article-section:first-child { margin-top: 0; }

/* ---- 問題番号で移動 ---- */
.jump-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 0;
}

.jump-bar label {
  font-size: 12px;
  color: #6b7280;
}

.jump-bar input[type="number"] {
  width: 92px;
  border: 1px solid #d8dce3;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
}

.jump-bar input[type="number"]:focus {
  outline: none;
  border-color: #2f6fed;
}

.jump-btn {
  border: 1px solid #d8dce3;
  background: #fff;
  color: #3b4252;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.jump-btn:hover {
  background: #f4f5f7;
  border-color: #2f6fed;
  color: #2f6fed;
}
