/* 公開サイト（/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: 2px solid var(--hero-bg); border-radius: 22px; padding: 22px 20px; margin: 28px 0; background: #fbfdfc; }
.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; }
.assure { margin: 0 0 18px; padding: 12px 16px 12px 2.2em; background: #f2f8f5; border-radius: 12px; font-size: .9rem; }
.assure li { margin: 2px 0; }
.assure li::marker { content: "✓  "; color: var(--hero-bg); 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; }
