/* 公開サイト（/learn/）。構成と見た目はLingの記事ページに合わせている（2026-10-16、あとで変える前提）。
   色：色帯はYamolangの緑、ボタンはオレンジ、宣伝枠は黄色。白背景のみ（端末のダークモードに合わせない）。 */
:root {
  --bg: #ffffff;
  --text: #5c6b66;
  --heading: #33413c;
  --hero-bg: #2f8f6e;
  --hero-text: #ffffff;
  --hero-sub: #d9efe6;
  --button: #ff9900;
  --button-strong: #e58a00;
  --link: #e58a00;
  --cta-bg: linear-gradient(135deg, #ffe7a8 0%, #ffd98a 100%);
  --mark: #ffe9a6;
  --table-head: #2f8f6e;
  --row-a: #f2f4f3;
  --row-b: #dff1e8;
  --border: #e6e9e8;
  --footer-bg: #24302c;
  --footer-text: #c9d3cf;
  --radius: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 16px; line-height: 1.8;
}
a { color: var(--link); }
img { max-width: 100%; height: auto; }
strong { color: var(--heading); }
mark { background: linear-gradient(transparent 45%, var(--mark) 45%); color: inherit; padding: 0 2px; }
.center { text-align: center; }

/* ヘッダー（右上にアプリを開く） */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--heading); font-weight: 800; font-size: 1.3rem; }
.header-cta {
  background: var(--button); color: #fff; text-decoration: none; font-weight: 700; font-size: .9rem;
  padding: 9px 18px; border-radius: 10px; white-space: nowrap;
}

/* 色帯（中央寄せ：パンくず→タイトル→ボタン→著者と日付） */
.hero { background: var(--hero-bg); color: var(--hero-text); text-align: center; }
.hero-inner { max-width: 820px; margin: 0 auto; padding: 18px 16px 36px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; margin: 0 0 28px; padding: 0; font-size: .8rem; }
.crumbs li { color: var(--hero-sub); }
.crumbs li + li::before { content: "›"; margin: 0 10px; }
.crumbs a { color: var(--hero-text); text-decoration: none; }
.hero h1 { margin: 0 0 22px; font-size: clamp(1.5rem, 5.5vw, 2.4rem); line-height: 1.45; overflow-wrap: anywhere; }
.author { margin-top: 26px; }
.author img { border-radius: 50%; background: #fff; }
.author-name { margin: 4px 0 0; font-weight: 700; font-size: .9rem; }
.author-date { margin: 0; font-size: .8rem; color: var(--hero-sub); }

/* ボタン（Lingのオレンジ） */
.button {
  display: inline-block; background: var(--button); color: #fff; text-decoration: none;
  font-weight: 700; padding: 11px 26px; border-radius: 10px; text-align: center;
}
.button:hover { background: var(--button-strong); }
.button-large { font-size: 1.1rem; padding: 14px 40px; }

/* 本文（1カラム） */
main { max-width: 700px; margin: 0 auto; padding: 28px 16px 40px; }
main p { margin: 0 0 14px; }
main h2 { color: var(--heading); font-size: clamp(1.35rem, 4.5vw, 1.8rem); line-height: 1.45; margin: 48px 0 16px; }
main h3 { color: var(--heading); font-size: 1.2rem; margin: 32px 0 8px; }
.more { font-size: .9rem; }

/* 宣伝枠（黄色・マスコット・中央寄せ） */
.cta-box {
  background: var(--cta-bg); border-radius: 22px; padding: 28px 20px 30px; margin: 28px 0; text-align: center;
}
.cta-box img { display: block; margin: 0 auto 8px; }
.cta-box-heading { color: var(--heading); font-weight: 800; font-size: 1.2rem; line-height: 1.5; margin: 0 0 18px !important; }

/* 目次 */
.toc { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin: 28px 0; background: #fafbfa; }
.toc summary { cursor: pointer; font-weight: 800; color: var(--heading); font-size: 1.05rem; }
.toc ol { margin: 8px 0 0; padding-left: 1.4em; }
.toc ol ol { margin: 2px 0 6px; list-style: none; padding-left: 1em; font-size: .9rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }

/* フレーズのカード */
.phrase-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 18px; margin: 18px 0; text-align: center; background: #fafbfa; }
.phrase-vi { margin: 0 !important; color: var(--heading); font-size: clamp(1.6rem, 7vw, 2.2rem); font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.phrase-guide { margin: 6px 0 0 !important; }
.phrase-ja { margin: 8px 0 0 !important; font-weight: 700; color: var(--heading); }
.phrase-item h3 { border-left: 5px solid var(--hero-bg); padding-left: 10px; }
.phrase-line { font-size: 1.15rem; margin-bottom: 8px !important; }
.phrase-line .guide { font-size: .95rem; }

/* 再生ボタン（Lingの Play を横に広い丸型に。「ゆっくり」は白地の枠つき） */
.speak {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--button); cursor: pointer;
  background: var(--button); color: #fff; font: inherit; font-weight: 700; font-size: .95rem;
  padding: 9px 26px; border-radius: 999px; min-height: 44px; min-width: 148px;
}
.speak:hover { background: var(--button-strong); border-color: var(--button-strong); }
.speak-slow { background: #fff; color: var(--button-strong); }
.speak-slow:hover { background: #fff4e0; color: var(--button-strong); }
.speak.is-playing { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255,153,0,.3); } }
@media (prefers-reduced-motion: reduce) { .speak.is-playing { animation: none; } }
.speak-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.phrase-card .speak-row { justify-content: center; margin-top: 16px; }

/* 表（見出し行＋2色の縞） */
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; background: var(--table-head); color: #fff; font-size: .82rem; padding: 10px 12px; white-space: nowrap; }
td { padding: 12px; vertical-align: middle; }
tbody tr:nth-child(odd) { background: var(--row-a); }
tbody tr:nth-child(even) { background: var(--row-b); }
td .vi { font-weight: 700; color: var(--heading); }
td.guide { font-size: .82rem; }
.cell-speak { width: 1%; white-space: nowrap; }
.cell-speak .speak { padding: 6px 18px; min-height: 36px; min-width: 96px; font-size: .85rem; }
td a { color: var(--heading); }

.pattern { background: #fafbfa; border: 2px dashed var(--hero-bg); border-radius: var(--radius); padding: 14px 16px; font-weight: 700; color: var(--heading); }
.tip { background: #fff8e6; border-left: 5px solid var(--button); border-radius: 8px; padding: 14px 16px; }

/* よくある質問（開閉） */
.faq details { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--heading); }
.faq summary::before { content: "Q. "; color: var(--hero-bg); }
.faq details p { margin: 10px 0 0; }

/* 記事末のアプリ紹介 */
.app-section-card { display: flex; gap: 16px; align-items: center; background: #fafbfa; border-radius: var(--radius); padding: 18px; margin: 18px 0; }
.app-section-card img { flex: none; }
.app-section-card ul { margin: 0; padding-left: 1.2em; }
.app-section-card li { margin: 4px 0; }
@media (max-width: 520px) { .app-section-card { flex-direction: column; text-align: left; } }

/* おすすめ記事（カード） */
.related-grid { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.related-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--heading); height: 100%; }
.related-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; border-radius: 12px; }
.related-thumb img { width: 42%; }
.related-tag { font-size: .75rem; color: var(--hero-bg); font-weight: 700; margin-top: 4px; }
.related-title { font-weight: 700; font-size: .92rem; line-height: 1.5; }
.related-card:hover .related-title { color: var(--link); }

/* 紹介ページ */
.start-hero { text-align: center; }
.start-hero img { display: block; margin: 0 auto 10px; }
.feature-grid { list-style: none; padding: 0; margin: 16px 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.feature-grid li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: #fafbfa; border-radius: var(--radius); padding: 16px 12px; }
.feature-grid span { font-size: .85rem; }

/* フッター（濃い色・場面と言語の一覧） */
.site-footer { background: var(--footer-bg); color: var(--footer-text); font-size: .88rem; }
.footer-inner { max-width: 900px; margin: 0 auto; padding: 36px 16px 28px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; color: #fff; }
.footer-lead { margin: 6px 0 22px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }
.footer-title { color: #fff; font-weight: 700; margin: 0 0 6px; }
.footer-title a { color: #fff; text-decoration: none; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 3px 0; }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.fine { font-size: .75rem; margin-top: 26px; opacity: .8; }

/* 招待の申し込み */
.invite-card { border-radius: 22px; padding: 24px 20px; margin: 28px 0; background: #f1f7f4; }
.invite-card h2 { margin-top: 0; }
.invite-form { display: flex; flex-direction: column; gap: 14px; }
.field span { display: block; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.field input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #cdd5d2; border-radius: 10px; background: #fff; color: var(--heading); }
.field input:focus { outline: 2px solid var(--hero-bg); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; line-height: 1.6; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--hero-bg); }
.turnstile { min-height: 65px; }
.invite-form .button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.invite-form .button:disabled { opacity: .6; cursor: wait; }
.form-message { margin: 0 !important; font-size: .9rem; }
.form-message.is-ok { color: #1f6b52; font-weight: 700; }
.form-message.is-error { color: #b5452f; font-weight: 700; }
.invite-notice { background: #fdecea; color: #8a3324; border-radius: 10px; padding: 10px 14px; }
.draft-note { background: #fff4dc; border-radius: 8px; padding: 8px 12px; font-size: .85rem; }
.invite-accept { max-width: 480px; margin: 48px auto; padding: 0 16px; text-align: center; }
.invite-accept h1 { color: var(--heading); font-size: 1.6rem; }
.invite-accept .button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.turnstile-loading { margin: 0 !important; font-size: .8rem; color: #8a958f; }
.promo-video { margin: 24px auto 8px; max-width: 300px; }
.promo-video video { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: 0 8px 28px rgba(0,0,0,.15); background: #24302c; }
.promo-video figcaption { font-size: .82rem; margin-top: 8px; }

/* レッスンの会話の例 */
.lesson-conversation { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 12px; }
.lesson-conversation .phrase-card { margin: 0; text-align: left; padding: 16px 18px; }
.lesson-conversation .phrase-vi { font-size: 1.25rem; }
.conversation-speaker { margin: 0 0 4px !important; font-size: .78rem; font-weight: 700; color: var(--hero-bg); }
.lesson-conversation .speak { margin-top: 10px; }
.conversation-alts { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: .88rem; }
.conversation-alts p { margin: 0 0 4px !important; font-weight: 700; }
.conversation-alts ul { list-style: none; padding: 0; margin: 0; }
.conversation-alts li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.conversation-alts .speak { margin-top: 0; min-width: 96px; min-height: 34px; padding: 4px 14px; font-size: .8rem; }
.field select, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #cdd5d2; border-radius: 10px; background: #fff; color: var(--heading); }
.field textarea { resize: vertical; min-height: 140px; }

/* 手続きのページ（規約・ポリシー・特商法・お問い合わせ）：控えめな見出しと、表ではなく項目の並び */
.hero-plain .hero-inner { padding: 14px 16px 22px; }
.hero-plain .crumbs ol { margin-bottom: 10px; }
.hero-plain h1 { font-size: clamp(1.25rem, 4.5vw, 1.7rem); margin: 0; }
.legal-list { margin: 20px 0; border-top: 1px solid var(--border); }
.legal-row { display: grid; grid-template-columns: 13em 1fr; gap: 4px 20px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.legal-row dt { font-size: .85rem; font-weight: 700; color: #7a8782; }
.legal-row dd { margin: 0; color: var(--heading); }
@media (max-width: 600px) { .legal-row { grid-template-columns: 1fr; } }

/* 手続きのページの見出し（白地・左寄せ。参考：interviewcat の特商法ページ） */
.legal-head { max-width: 900px; margin: 0 auto; padding: 44px 16px 8px; }
.legal-eyebrow { margin: 0 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .18em; color: var(--hero-bg); display: flex; align-items: center; gap: 10px; }
.legal-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hero-bg); }
.legal-head h1 { margin: 0; color: var(--heading); font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.35; }
.legal-lead { margin: 14px 0 0; color: var(--text); }
.legal-head + main { max-width: 900px; }
.legal-list { border-top: none; }
.legal-row { grid-template-columns: 12em 1fr; padding: 18px 12px; }
.legal-row dt { font-weight: 600; color: #6c7a75; font-size: .92rem; }

/* 検定記事・本の紹介と音声（2026-10-31） */
.kentei-note { font-size: .85rem; color: #6c7a75; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 32px; }
.kentei-group { font-weight: 700; color: var(--heading); margin: 16px 0 4px; }
.kentei-list { padding-left: 1.2em; }
.kentei-list li { margin: 6px 0; }
.quiz-audio { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.audio-play { font: inherit; font-size: .9rem; font-weight: 700; color: var(--hero-bg); background: #fff; border: 1.5px solid var(--hero-bg); border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 36px; }
.audio-play:hover, .audio-play.is-playing { background: var(--hero-bg); color: #fff; }
.book-hero { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin: 8px 0 24px; }
.book-cover-link { display: inline-block; cursor: pointer; flex: none; }
.book-cover-link img { display: block; transition: transform .15s; }
.book-cover-link:hover img { transform: translateY(-2px); }
.book-cover-wrap { width: 200px; max-width: 45%; }
.book-cover { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.book-hero > div { flex: 1; min-width: 200px; }
.book-sub { font-size: 1.1rem; font-weight: 700; color: var(--heading); }
.book-points li { margin: 8px 0; }
.form-fine { font-size: .85rem; margin: 0 !important; }
.book-audio-chapter { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin: 10px 0; background: #fff; }
.book-audio-chapter summary { cursor: pointer; font-weight: 700; color: var(--heading); }
.book-audio-questions { list-style: none; padding: 0; margin: 10px 0 0; }
.book-audio-questions li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid var(--border); }
.book-audio-no { font-weight: 700; min-width: 3.2em; }
.book-audio-questions .audio-play { padding: 4px 12px; min-height: 34px; }
.book-audio-zips { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.book-audio-zips .button { display: block; text-align: center; }
/* 検定記事の問題カード（2026-10-31） */
.quiz { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 14px; margin: 20px 0 28px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.quiz p { margin: 0 0 10px; }
.quiz-title { display: inline-block; background: var(--hero-bg); color: #fff; font-weight: 800; font-size: .85rem; border-radius: 999px; padding: 2px 12px; }
.quiz-prompt { color: var(--heading); font-weight: 700; }
.quiz-ja { font-weight: 700; color: var(--heading); }
.quiz-vi { font-size: 1.1rem; color: var(--heading); background: #fafbfa; border-radius: 8px; padding: 10px 12px; }
.quiz-kana { display: block; font-size: .8rem; color: #7c8a85; }
.quiz-picture { display: block; width: 100%; max-width: 420px; height: auto; border: 1px solid var(--border); border-radius: 10px; margin: 0 0 12px; }
.quiz-choices { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.quiz-choices li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 12px; font-size: 1.05rem; color: var(--heading); }
.quiz-choices .quiz-kana { display: inline; }
.quiz-letter { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--row-b); color: var(--hero-bg); font-weight: 800; font-size: .85rem; flex: none; }
.quiz-answer { border-top: 1px dashed var(--border); padding-top: 10px; }
.quiz-answer summary { cursor: pointer; font-weight: 700; color: var(--link); }
.quiz-answer[open] summary { margin-bottom: 10px; }
.quiz-right { font-weight: 800; color: #1f6b52; }
.quiz-full { font-size: 1.05rem; color: var(--heading); }
.quiz-others-title { font-size: .85rem; font-weight: 700; margin-bottom: 4px !important; }
.quiz-others { margin: 0; padding-left: 1.2em; font-size: .9rem; }
.book-box .book-cover-link { display: block; width: 120px; margin: 0 auto 8px; }
.book-box img { margin: 0 auto; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); border-radius: 4px; }
.kentei-body .table-wrap + p { margin-top: 4px; }
.book-toc td:first-child { white-space: nowrap; }
.book-hero .button { cursor: pointer; }
.book-box .button { cursor: pointer; }
/* 記事末の本のカード（2026-10-31 作り直し）：左に緑のパネルと表紙、右に書名・特徴・リンク。カード全体がリンク */
.book-card { display: flex; align-items: stretch; margin: 20px 0; border-radius: 20px; overflow: hidden; background: #f1f7f4; border: 1px solid #d5e9df;
  color: var(--text); text-decoration: none; cursor: pointer; transition: box-shadow .18s, transform .18s; }
.book-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(47, 143, 110, .16); }
.book-card-art { flex: none; width: 200px; display: flex; align-items: center; justify-content: center; padding: 26px 0;
  background: linear-gradient(160deg, #2f8f6e 0%, #3fa883 100%); }
.book-card-art img { width: 118px; height: auto; border-radius: 4px; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); transform: rotate(-3deg); transition: transform .18s; }
.book-card:hover .book-card-art img { transform: rotate(0deg) scale(1.03); }
.book-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 22px 24px; }
.book-card-tag { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: var(--hero-bg); background: #fff; border: 1px solid #cfe6db; border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
.book-card-title { color: var(--heading); font-weight: 800; font-size: 1.15rem; line-height: 1.45; }
.book-card-sub { font-size: .85rem; margin: 2px 0 14px; }
.book-card-points { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: .9rem; color: var(--heading); }
.book-card-points li { position: relative; padding-left: 1.5em; margin: 0; }
.book-card-points li::before { content: ""; position: absolute; left: 0; top: .45em; width: .95em; height: .95em; border-radius: 50%;
  background: var(--hero-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; }
.book-card-more { margin-top: auto; align-self: flex-start; font-weight: 800; color: #fff; background: var(--button); border-radius: 999px; padding: 9px 20px; font-size: .92rem; transition: background .18s; }
.book-card:hover .book-card-more { background: var(--button-strong); }
@media (max-width: 560px) {
  .book-card { flex-direction: column; }
  .book-card-art { width: auto; padding: 22px 0; }
  .book-card-points { grid-template-columns: 1fr; }
  .book-card-more { align-self: stretch; text-align: center; }
}
