/* ============================================================
   インドネシア語の森  Design System "Merah Putih"
   - 赤×白（インドネシア国旗）を基調に、森のグリーンを補助色に
   - 学習サービスらしい丸み・押し込みボタン・カードUI
   ============================================================ */

:root {
    /* Palette */
    --merah: #CE1126;
    /* 国旗の赤 */
    --merah-tua: #9E0B1E;
    /* 赤の影（ボタンの底） */
    --merah-usui: #FBEAEC;
    /* 赤の薄地 */
    --putih: #FFFFFF;
    --kertas: #FDF9F7;
    /* ページ背景（わずかに温かい白） */
    --sumi: #2A2430;
    /* テキスト */
    --sumi-usui: #6E6575;
    /* サブテキスト */
    --hutan: #157A55;
    /* 森のグリーン（補助・成功） */
    --hutan-tua: #0E5A3E;
    --line: #F0DFE1;

    /* Type */
    --font-display: 'M PLUS Rounded 1c', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;

    /* Shape */
    --radius-card: 20px;
    --radius-btn: 999px;
    --shadow-card: 0 2px 0 var(--line);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--sumi);
    background: var(--kertas);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
    background: var(--putih);
    border-bottom: 2px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

/* 国旗チップ：ブランドの目印 */
.brand-flag {
    width: 28px;
    height: 20px;
    border-radius: 5px;
    overflow: hidden;
    border: 1.5px solid var(--line);
    display: inline-flex;
    flex-direction: column;
    flex-shrink: 0;
}

.brand-flag i {
    display: block;
    width: 100%;
    height: 50%;
}

.brand-flag i:first-child {
    background: var(--merah);
}

.brand-flag i:last-child {
    background: var(--putih);
}

.global-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--sumi-usui);
    padding: 8px 14px;
    border-radius: var(--radius-btn);
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
    color: var(--merah);
    background: var(--merah-usui);
}

.nav-link.is-active {
    color: var(--merah);
    background: var(--merah-usui);
}

/* ---------- Hero（メラプティ・カード） ---------- */

.hero {
    padding: 48px 0 16px;
}

.hero-card {
    border-radius: calc(var(--radius-card) + 8px);
    overflow: hidden;
    border: 2px solid var(--line);
    background: var(--putih);
}

.hero-merah {
    background: var(--merah);
    color: var(--putih);
    padding: 56px 40px 40px;
}

.hero-eyebrow {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    opacity: 0.9;
    margin: 0 0 12px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.7rem, 4.5vw, 2.6rem);
    line-height: 1.4;
    margin: 0;
}

.hero-putih {
    padding: 28px 40px 36px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}

.hero-lead {
    margin: 0;
    color: var(--sumi-usui);
    font-size: 1rem;
    max-width: 540px;
}

/* ---------- ボタン（押し込み式） ---------- */

.btn {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    padding: 14px 32px;
    border-radius: var(--radius-btn);
    transition: transform 0.08s, box-shadow 0.08s;
    will-change: transform;
}

.btn-merah {
    background: var(--merah);
    color: var(--putih);
    box-shadow: 0 4px 0 var(--merah-tua);
}

.btn-merah:hover {
    filter: brightness(1.05);
}

.btn-merah:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--merah-tua);
}

.btn-hutan {
    background: var(--hutan);
    color: var(--putih);
    box-shadow: 0 4px 0 var(--hutan-tua);
}

.btn-hutan:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--hutan-tua);
}

.btn-ghost {
    background: var(--putih);
    color: var(--merah);
    border: 2px solid var(--line);
    box-shadow: 0 4px 0 var(--line);
}

.btn-ghost:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--line);
}

/* ---------- セクション ---------- */

.section {
    padding: 40px 0;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-chip {
    width: 22px;
    height: 16px;
    border-radius: 4px;
    overflow: hidden;
    border: 1.5px solid var(--line);
    display: inline-flex;
    flex-direction: column;
    flex-shrink: 0;
}

.section-chip i {
    display: block;
    width: 100%;
    height: 50%;
}

.section-chip i:first-child {
    background: var(--merah);
}

.section-chip i:last-child {
    background: var(--putih);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0;
}

.section-note {
    margin: -12px 0 20px;
    color: var(--sumi-usui);
    font-size: 0.92rem;
}

/* ---------- カードグリッド ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 24px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.12s, border-color 0.12s;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--merah);
}

.card-emoji {
    font-size: 1.8rem;
    line-height: 1;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.08rem;
    margin: 0;
    color: var(--sumi);
}

.card-desc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--sumi-usui);
    flex-grow: 1;
}

.card-cta {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--merah);
}

.card.is-soon {
    opacity: 0.55;
    pointer-events: none;
}

.card.is-soon .card-cta {
    color: var(--sumi-usui);
}

/* ---------- リスト（コラム一覧） ---------- */

.entry-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.entry-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 18px 22px;
    text-decoration: none;
    transition: transform 0.12s, border-color 0.12s;
}

.entry-item a:hover {
    transform: translateY(-2px);
    border-color: var(--merah);
}

.entry-tag {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--merah);
    background: var(--merah-usui);
    border-radius: var(--radius-btn);
    padding: 4px 12px;
    white-space: nowrap;
}

.entry-tag.tag-hutan {
    color: var(--hutan);
    background: #E6F3ED;
}

.entry-title {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--sumi);
}

/* ---------- ページヘッダー（下層） ---------- */

.page-head {
    background: var(--putih);
    border-bottom: 2px solid var(--line);
    padding: 40px 0;
}

.page-head-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-head-desc {
    margin: 0;
    color: var(--sumi-usui);
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 48px;
    background: var(--putih);
    border-top: 2px solid var(--line);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 800;
}

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    text-decoration: none;
    color: var(--sumi-usui);
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: var(--merah);
}

.footer-copy {
    margin: 0;
    font-size: 0.8rem;
    color: var(--sumi-usui);
}

/* ---------- A11y / Motion ---------- */

a:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--hutan);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    .hero {
        padding: 24px 0 8px;
    }

    .hero-merah {
        padding: 36px 24px 28px;
    }

    .hero-putih {
        padding: 24px;
    }

    .header-inner {
        height: 56px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 0.88rem;
    }
}

/* ---- 追記パッチ：public/css/mori.css の末尾に追加 ---- */

/* ヒーローの二枚扉ボタン */
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================================
   追記パッチ v2：public/css/mori.css の末尾に追加
   /travel ピラー用コンポーネント（フレーズ・チェックリスト・目次・FAQ）
   ============================================================ */

/* ---------- 著者ノート ---------- */

.author-note {
    background: var(--putih);
    border: 2px solid var(--line);
    border-left: 6px solid var(--merah);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.author-note-text {
    margin: 0;
    font-size: 0.92rem;
    color: var(--sumi-usui);
}

/* ---------- 目次 ---------- */

.toc {
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    padding: 20px 24px;
}

.toc-title {
    font-family: var(--font-display);
    font-weight: 800;
    margin: 0 0 8px;
}

.toc-list {
    margin: 0;
    padding-left: 20px;
    font-size: 0.95rem;
}

.toc-list ol {
    padding-left: 18px;
}

.toc-list a {
    color: var(--merah);
    text-decoration: none;
    font-weight: 500;
}

.toc-list a:hover {
    text-decoration: underline;
}

/* ---------- フレーズカテゴリ見出し ---------- */

.phrase-cat {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--line);
}

/* ---------- フレーズリスト ---------- */

.phrase-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.phrase-item {
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 18px 22px;
}

.phrase-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.phrase-id {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--merah);
}

.phrase-kana {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--putih);
    background: var(--sumi);
    border-radius: var(--radius-btn);
    padding: 3px 12px;
}

.phrase-mean {
    margin: 8px 0 0;
    font-weight: 700;
    font-size: 0.98rem;
}

.phrase-tip {
    margin: 6px 0 0;
    font-size: 0.88rem;
    color: var(--sumi-usui);
    padding-left: 14px;
    border-left: 3px solid var(--merah-usui);
}

/* ---------- 数字グリッド ---------- */

.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.number-cell {
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.number-id {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--merah);
    min-width: 38px;
}

.number-kana {
    font-size: 0.8rem;
    color: var(--sumi-usui);
    font-weight: 500;
}

/* ---------- コールアウト ---------- */

.callout {
    border-radius: var(--radius-card);
    padding: 20px 24px;
    margin: 28px 0;
    border: 2px solid;
}

.callout-merah {
    background: var(--merah-usui);
    border-color: var(--merah);
}

.callout-hutan {
    background: #E6F3ED;
    border-color: var(--hutan);
}

.callout-title {
    font-family: var(--font-display);
    font-weight: 800;
    margin: 0 0 8px;
}

.callout-merah .callout-title {
    color: var(--merah-tua);
}

.callout-hutan .callout-title {
    color: var(--hutan-tua);
}

.callout-text {
    margin: 0;
    font-size: 0.92rem;
}

.callout-text a {
    color: var(--merah);
    font-weight: 700;
}

/* ---------- チェックリスト ---------- */

.check-progress {
    position: sticky;
    top: 72px;
    z-index: 10;
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-btn);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-card);
}

.check-progress strong {
    font-family: var(--font-display);
    font-weight: 800;
    white-space: nowrap;
}

.check-bar {
    flex: 1;
    height: 10px;
    background: var(--merah-usui);
    border-radius: var(--radius-btn);
    overflow: hidden;
}

.check-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--merah);
    border-radius: var(--radius-btn);
    transition: width 0.25s;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 16px 20px;
    cursor: pointer;
    transition: border-color 0.12s;
}

.check-item:hover {
    border-color: var(--merah);
}

.check-item input[type="checkbox"] {
    appearance: none;
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin-top: 2px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: var(--putih);
    cursor: pointer;
    position: relative;
    transition: background 0.12s, border-color 0.12s;
}

.check-item input[type="checkbox"]:checked {
    background: var(--merah);
    border-color: var(--merah);
}

.check-item input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid var(--putih);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.check-item input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--hutan);
    outline-offset: 2px;
}

.check-item:has(input:checked) {
    opacity: 0.6;
}

.check-item:has(input:checked) .check-name {
    text-decoration: line-through;
}

.check-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.check-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.check-name {
    font-weight: 700;
    font-size: 0.98rem;
}

.req {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.72rem;
    border-radius: var(--radius-btn);
    padding: 3px 10px;
    white-space: nowrap;
}

.req-must {
    color: var(--putih);
    background: var(--merah);
}

.req-reco {
    color: var(--merah-tua);
    background: var(--merah-usui);
}

.req-opt {
    color: var(--sumi-usui);
    background: var(--kertas);
    border: 1.5px solid var(--line);
}

.check-desc {
    font-size: 0.86rem;
    color: var(--sumi-usui);
}

/* ---------- FAQ ---------- */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.faq-item[open] {
    border-color: var(--merah);
}

.faq-q {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.98rem;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 48px;
}

.faq-q::-webkit-details-marker {
    display: none;
}

.faq-q::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--merah);
}

.faq-item[open] .faq-q::after {
    content: "−";
}

.faq-a {
    margin: 0;
    padding: 0 22px 18px;
    font-size: 0.92rem;
    color: var(--sumi-usui);
}

.faq-a a {
    color: var(--merah);
    font-weight: 700;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    .check-progress {
        top: 64px;
        padding: 10px 16px;
    }

    .phrase-item {
        padding: 16px 18px;
    }
}

/* ============================================================
   追記パッチ v3：public/css/mori.css の末尾に追加
   記事ページ用（即答カード・音声ボタン・ニュアンス表・クイズ）
   ============================================================ */

/* ---------- 即答カード ---------- */

.answer-card {
    background: var(--merah);
    color: var(--putih);
    border-radius: calc(var(--radius-card) + 8px);
    padding: 36px 32px;
}

.answer-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    opacity: 0.9;
    margin: 0 0 10px;
}

.answer-main {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.answer-phrase {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1.2;
}

.answer-kana {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 10px 0 0;
}

.answer-sub {
    margin: 14px 0 0;
    font-size: 0.95rem;
    opacity: 0.94;
    max-width: 640px;
}

/* ---------- 音声ボタン ---------- */

.audio-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    border: none;
    background: var(--merah);
    color: var(--putih);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--merah-tua);
    transition: transform 0.08s, box-shadow 0.08s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.audio-btn:hover {
    filter: brightness(1.06);
}

.audio-btn:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 var(--merah-tua);
}

.audio-btn:focus-visible {
    outline: 3px solid var(--hutan);
    outline-offset: 2px;
}

.audio-btn-light {
    background: var(--putih);
    color: var(--merah);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

/* ---------- ニュアンス早見表 ---------- */

.nuance-scale {
    margin-top: 24px;
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    padding: 40px 28px 18px;
}

.nuance-track {
    position: relative;
    height: 8px;
    border-radius: var(--radius-btn);
    background: linear-gradient(90deg, var(--merah-usui), var(--merah));
}

.nuance-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--sumi);
    color: var(--putih);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: var(--radius-btn);
    white-space: nowrap;
}

.nuance-dot::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -14px;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sumi);
    border: 2px solid var(--putih);
}

.nuance-dot-main {
    background: var(--merah);
}

.nuance-dot-main::after {
    background: var(--merah);
}

.nuance-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 26px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--sumi-usui);
}

/* ---------- ニュアンスバッジ ---------- */

.nuance-badge {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.72rem;
    border-radius: var(--radius-btn);
    padding: 3px 10px;
    white-space: nowrap;
}

.nb-mid {
    background: var(--merah-usui);
    color: var(--merah-tua);
}

.nb-polite {
    background: var(--sumi);
    color: var(--putih);
}

.nb-casual {
    background: #FFF3D6;
    color: #8A5A00;
}

.nb-slang {
    background: var(--kertas);
    color: var(--sumi-usui);
    border: 1.5px solid var(--line);
}

.nb-bali {
    background: #E6F3ED;
    color: var(--hutan-tua);
}

/* ---------- クイズ ---------- */

.quiz-card {
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: calc(var(--radius-card) + 8px);
    box-shadow: var(--shadow-card);
    padding: 28px;
    max-width: 640px;
}

.quiz-progress {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--sumi-usui);
    margin-bottom: 16px;
}

.quiz-phrase {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.quiz-phrase-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--merah);
}

.quiz-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-choice {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: left;
    padding: 14px 18px;
    border-radius: 14px;
    border: 2px solid var(--line);
    background: var(--putih);
    color: var(--sumi);
    cursor: pointer;
    box-shadow: 0 3px 0 var(--line);
    transition: transform 0.08s, border-color 0.12s, box-shadow 0.08s;
}

.quiz-choice:hover {
    border-color: var(--merah);
}

.quiz-choice:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 var(--line);
}

.quiz-choice:focus-visible {
    outline: 3px solid var(--hutan);
    outline-offset: 2px;
}

.quiz-choice.is-correct {
    background: #E6F3ED;
    border-color: var(--hutan);
    color: var(--hutan-tua);
    box-shadow: 0 3px 0 var(--hutan);
}

.quiz-choice.is-wrong {
    background: var(--merah-usui);
    border-color: var(--merah);
    color: var(--merah-tua);
    box-shadow: 0 3px 0 var(--merah);
}

.quiz-feedback {
    margin-top: 16px;
    font-weight: 700;
    font-size: 0.92rem;
    min-height: 1.4em;
}

.fb-correct {
    color: var(--hutan-tua);
}

.fb-wrong {
    color: var(--merah-tua);
}

.quiz-actions {
    margin-top: 16px;
}

.quiz-result {
    text-align: center;
    padding: 12px 0;
}

.quiz-result-score {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--merah);
    margin: 0 0 8px;
}

.quiz-result-msg {
    margin: 0 0 20px;
    color: var(--sumi-usui);
}

/* ============================================================
   追記パッチ v5：public/css/mori.css の末尾に追加
   単語の森（フェーズ1）用コンポーネント
   ============================================================ */

/* ---------- ハブ：復習コールアウト ---------- */

.review-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* ---------- 学習モード ---------- */

.study-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.study-card {
    cursor: pointer;
}

.study-card:hover {
    border-color: var(--hutan);
}

.study-toggle {
    margin-left: auto;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--sumi-usui);
    white-space: nowrap;
}

.study-back {
    margin-top: 10px;
}

.study-footer {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- クイズ拡張 ---------- */

.quiz-contact {
    margin: -8px 0 14px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--hutan);
}

.quiz-hint-area {
    margin-top: 14px;
}

.quiz-hint-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.quiz-hint-text {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: var(--sumi-usui);
    background: var(--kertas);
    border: 1.5px dashed var(--line);
    border-radius: 12px;
    padding: 10px 14px;
    min-height: 1.2em;
}

.quiz-hint-text:empty {
    display: none;
}

/* ---------- マイページ統計 ---------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-cell {
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
}

.stat-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--hutan-tua);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--sumi-usui);
    font-weight: 500;
}

/* ============================================================
   追記パッチ v6：public/css/mori.css の末尾に追加
   フェーズ2（認証フォーム・育つ森・単語一覧テーブル）
   ============================================================ */

/* ---------- 認証フォーム ---------- */

.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: calc(var(--radius-card) + 8px);
    box-shadow: var(--shadow-card);
    padding: 32px;
}

.auth-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.auth-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-input {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 12px 16px;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--kertas);
    transition: border-color 0.12s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--hutan);
    background: var(--putih);
}

.auth-check {
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--sumi-usui);
}

.auth-error {
    background: var(--merah-usui);
    border: 2px solid var(--merah);
    color: var(--merah-tua);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    margin-top: 12px;
}

.auth-status {
    background: #E6F3ED;
    border: 2px solid var(--hutan);
    color: var(--hutan-tua);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    margin: 12px 0;
}

.auth-alt {
    margin: 20px 0 0;
    font-size: 0.88rem;
    color: var(--sumi-usui);
    text-align: center;
}

.auth-alt a {
    color: var(--hutan);
    font-weight: 700;
}

.auth-logout-link {
    background: none;
    border: none;
    color: var(--sumi-usui);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.auth-logout-link:hover {
    color: var(--merah);
}

/* ---------- 育つ森 ---------- */

.forest {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.forest-area {
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.forest-area-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    border-bottom: 2px solid var(--line);
}

.forest-area-count {
    font-size: 0.8rem;
    color: var(--hutan-tua);
    background: #E6F3ED;
    border-radius: var(--radius-btn);
    padding: 3px 12px;
}

.forest-ground {
    padding: 16px 18px;
    background: linear-gradient(180deg, var(--putih) 0%, #EDF6F1 100%);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 56px;
    align-items: flex-end;
}

.forest-tree {
    font-size: 1.4rem;
    line-height: 1;
    cursor: default;
    transition: transform 0.12s;
}

.forest-tree.is-sprout {
    font-size: 1.05rem;
    opacity: 0.9;
}

.forest-tree:hover {
    transform: scale(1.3);
}

.forest-empty {
    font-size: 0.82rem;
    color: var(--sumi-usui);
}

/* ---------- 単語一覧テーブル（SEOページ） ---------- */
/* ---------- 単語一覧テーブル（SEOページ） ---------- */

/* ===== PC基本形（テーブル） ===== */

.word-table-wrap {
    overflow-x: auto;
}

.word-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
    font-size: 0.92rem;
}

.word-table th {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.8rem;
    text-align: left;
    background: var(--merah-usui);
    color: var(--merah-tua);
    padding: 12px 14px;
}

.word-table td {
    padding: 12px 14px;
    border-top: 1.5px solid var(--line);
    vertical-align: top;
}

.word-table .audio-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 0.85rem;
}

.wt-id {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--merah);
    white-space: nowrap;
}

.wt-kana {
    color: var(--sumi-usui);
    white-space: nowrap;
}

.wt-mean {
    font-weight: 700;
}

.wt-example-ja {
    color: var(--sumi-usui);
    font-size: 0.85rem;
}

/* 読み方インライン（PCでは非表示・モバイルで単語の隣に出す） */
.wt-kana-inline {
    display: none;
    color: var(--sumi-usui);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 8px;
}

/* ===== モバイル：Merah Putihカード型 ===== */

@media (max-width: 640px) {

    .auth-card {
        padding: 24px 20px;
    }

    .word-table-wrap {
        overflow-x: visible;
    }

    .word-table {
        display: block;
        /* tableの器をやめる（センターずれの原因） */
        width: 100%;
        border: none;
        border-radius: 0;
        background: transparent;
        overflow: visible;
        font-size: 1rem;
    }

    .word-table thead {
        display: none;
    }

    .word-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .word-table tr {
        display: grid;
        grid-template-columns: 44px 1fr;
        grid-template-areas:
            "audio head"
            "audio mean"
            "audio example";
        column-gap: 14px;
        row-gap: 3px;
        width: 100%;
        background: var(--putih);
        border: 2px solid var(--line);
        border-radius: var(--radius-card);
        box-shadow: var(--shadow-card);
        padding: 18px 20px;
    }

    .word-table td {
        display: block;
        padding: 0;
        border-top: none;
    }

    .word-table td:first-child {
        grid-area: audio;
        align-self: start;
    }

    .word-table td.wt-id {
        grid-area: head;
        white-space: normal;
    }

    .wt-kana-inline {
        display: inline;
    }

    .word-table td.wt-kana {
        display: none;
    }

    .word-table td.wt-mean {
        grid-area: mean;
    }

    .word-table td.wt-example {
        grid-area: example;
        margin-top: 6px;
        font-size: 0.9rem;
        line-height: 1.7;
    }
}

/* ============================================================
   追記パッチ v7：public/css/mori.css の末尾に追加
   SRS説明・ヒント消去・アクションボタン群
   ============================================================ */

/* ---------- SRS 3段階フロー ---------- */

.srs-flow {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}

.srs-stage {
    flex: 1;
    min-width: 180px;
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.srs-emoji {
    font-size: 1.6rem;
    line-height: 1;
}

.srs-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--hutan-tua);
}

.srs-desc {
    font-size: 0.82rem;
    color: var(--sumi-usui);
}

.srs-arrow {
    align-self: center;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--hutan);
    font-size: 1.2rem;
}

.srs-notes {
    margin-top: 14px;
    background: var(--kertas);
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-card);
    padding: 14px 18px;
}

.srs-notes p {
    margin: 0 0 8px;
    font-size: 0.88rem;
    color: var(--sumi-usui);
}

.srs-notes p:last-child {
    margin-bottom: 0;
}

.srs-notes strong {
    color: var(--sumi);
}

/* ---------- 復習コールアウトのボタン群 ---------- */

.review-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ---------- ヒント：選択肢消去 ---------- */

.quiz-choice.is-eliminated {
    opacity: 0.25;
    text-decoration: line-through;
    pointer-events: none;
}

@media (max-width: 720px) {
    .srs-arrow {
        display: none;
    }

    .srs-stage {
        min-width: 100%;
    }
}

/* ============================================================
   タイピング機能 追加スタイル（既存CSSの末尾に追記でもOK）
   Merah Putih トークンに準拠。新色・新フォントなし
   ============================================================ */

/* ---- 文字スロット（共通エンジン strict モード） ---- */
.ts-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 18px 0 10px;
}

.ts-slot {
    width: 34px;
    height: 46px;
    border: 2px solid var(--line);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--sumi-usui);
    background: var(--putih);
    transition: background .12s, border-color .12s, color .12s;
}

.ts-slot.is-current {
    border-color: var(--hutan);
    box-shadow: 0 0 0 3px rgba(21, 122, 85, .14);
}

.ts-slot.is-done {
    background: var(--hutan);
    border-color: var(--hutan);
    color: var(--putih);
}

.ts-slot.is-miss {
    border-color: var(--merah);
    background: var(--merah-usui);
    animation: ts-shake .18s;
}

.ts-space {
    width: 18px;
    border-style: dashed;
    background: transparent;
}

@keyframes ts-shake {
    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

/* ---- 隠し入力（ゲーム用） ---- */
.ts-hidden-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

/* ---- SRSクイズの typing 入力欄 ---- */
.quiz-typing {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 18px 0;
}

.typing-field {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--sumi);
    background: var(--putih);
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 12px 16px;
    width: min(320px, 100%);
    text-align: center;
}

.typing-field:focus-visible {
    outline: 3px solid var(--hutan);
    outline-offset: 2px;
    border-color: var(--hutan);
}

.typing-field:disabled {
    background: var(--kertas);
    color: var(--sumi-usui);
}

/* ---- ゲームHUD ---- */
.tg-hud {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: .95rem;
    color: var(--sumi-usui);
}

.tg-hud-item strong {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--sumi);
}

.tg-meaning {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--sumi);
    margin: 0;
}

.tg-kana {
    text-align: center;
    color: var(--sumi-usui);
    font-size: .9rem;
    margin: 0 0 8px;
}

/* ---- 結果画面の単語復習リスト ---- */
.tg-result-review {
    margin: 20px auto;
    max-width: 480px;
    text-align: left;
}

.tg-result-review-title {
    font-weight: 700;
    color: var(--hutan);
    margin-bottom: 8px;
}

.tg-word-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tg-word-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
    font-size: .95rem;
}

@media (prefers-reduced-motion: reduce) {
    .ts-slot {
        transition: none;
    }

    .ts-slot.is-miss {
        animation: none;
    }
}