:root {
    /* 共通設定 (Component variables only) */
    --primary: #00AEEF;
    --primary-rgb: 0, 174, 239;
    --primary-dark: #008dc2;
    --bg-base: #FFFFFF;
    --bg-pale: #F4FAFD;
    --accent: #FFC107;
    --text-main: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --border-light: #E1F0F5;

    /* タイポグラフィ */
    --font-ja: 'Noto Sans JP', sans-serif;
    --font-en: 'Montserrat', sans-serif;

    /* Component specific */
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;

    /* シャドウ */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* --- Utilities helper --- */
.font-en {
    font-family: var(--font-en);
}

/* POINTコンポーネント (Tip Box) */
.summary-box {
    background: var(--bg-pale);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    position: relative;
    margin-bottom: 4.5rem;
}

.summary-box::before {
    content: "POINT";
    position: absolute;
    top: -14px;
    left: 30px;
    background: var(--primary);
    color: white;
    font-family: var(--font-en);
    font-weight: 700;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
}

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

.summary-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.summary-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 900;
}

/* --- ① English Option Card (和英特化 / Phrase Card) --- */
.option-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: 0.3s ease;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-phrase {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    flex: 1;
}

.copy-btn {
    background: var(--bg-pale);
    border: 1px solid var(--border-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: var(--font-en);
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.option-detail-grid {
    display: grid;
    /* Change to 2 columns for Reading/Meaning on Desktop, Scene takes full width */
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-pale);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.detail-item strong {
    display: block;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.detail-item span {
    font-weight: 700;
    font-size: 1.0rem;
    line-height: 1.5;
}

.detail-item.full-width {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
}

.scene-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
    color: var(--text-main);
}

/* Old tag styles removed/kept for safety but unused by new block render */
.scene-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 700;
}

/* ... colors .. */

/* --- ② Scene-based Tabs (Sticky) --- */
.tabs-container {
    margin: 4rem 0;
    position: relative;
}

.tabs-header {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 3rem;
    position: sticky;
    top: 79px;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 100;
    padding-top: 1.5rem;
}

.tab-trigger {
    padding: 1.2rem 2.5rem;
    cursor: pointer;
    font-weight: 800;
    color: var(--text-light);
    border-bottom: 4px solid transparent;
    transition: 0.3s;
    font-size: 1.05rem;
}

.tab-trigger.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* --- ③ Nuance Difference (使い分け表 / Comparison Table) --- */
.nuance-table-wrapper {
    overflow-x: auto;
    margin: 3rem 0;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
}

.nuance-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.nuance-table th {
    background: var(--bg-pale);
    color: var(--primary);
    padding: 1.2rem;
    text-align: left;
    font-weight: 800;
    border-bottom: 2px solid var(--border-light);
}

.nuance-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.nuance-table tr:last-child td {
    border-bottom: none;
}

/* --- ④ Literal vs Natural (対比 / Natural vs Literal) --- */
.comparison-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 4rem 0;
}

.comp-box {
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid;
    height: 100%;
}

.comp-box.literal {
    background: #FFF5F5;
    border-color: #FED7D7;
}

.comp-box.natural {
    background: #F0FFF4;
    border-color: #C6F6D5;
}

.comp-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.literal .comp-label {
    color: #C53030;
}

.natural .comp-label {
    color: #2F855A;
}

.comp-phrase {
    display: block;
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.comp-desc {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- ⑤ Dialogue Example (会話例 / Dialogue) --- */
.wp-block-group.dialogue-container,
.dialogue-container {
    background: #FAFDFF;
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    border: 1px solid var(--border-light);
    margin: 5rem 0;
}

.chat-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    align-items: flex-start;
}

.chat-row:last-child {
    margin-bottom: 0;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.chat-bubble {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    flex: 1;
    position: relative;
    line-height: 1.6;
}

.chat-row.left .chat-bubble {
    background: white;
    border: 1px solid var(--border-light);
}

.chat-row.right {
    flex-direction: row-reverse;
}

.chat-row.right .chat-bubble {
    background: var(--primary);
    color: white;
}

.chat-translation {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.8rem;
    opacity: 0.8;
}

/* --- Cultural Column --- */
.cultural-column {
    background: linear-gradient(135deg, #fff 0%, var(--bg-pale) 100%);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    margin: 8rem 0;
    border-top: 6px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

/* --- Responsive Control --- */
@media (max-width: 1080px) {

    .summary-box,
    .option-card,
    .nuance-table-wrapper,
    .comparison-block,
    .dialogue-container,
    .cultural-column {
        margin-bottom: 3.5rem;
    }

    .cultural-column {
        margin: 5rem 0;
    }
}

@media (max-width: 900px) {

    /* Main Layout Spacing Reduce */
    .summary-box {
        padding: 2rem;
    }

    .option-card {
        padding: 2rem;
    }

    /* Option Card adjustments */
    .option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .option-phrase {
        font-size: 1.6rem;
    }

    .tabs-container {
        margin: 3.5rem 0;
    }

    .tabs-header {
        top: 60px;
        /* Header height changes on mobile */
        padding-top: 1rem;
        margin-bottom: 2rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tab-trigger {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    /* Comparison Block: Stack earlier if needed, or keep 2 col but tighter */
    .comparison-block {
        gap: 1rem;
    }

    .comp-box {
        padding: 1.5rem;
    }

    .comp-phrase {
        font-size: 1.15rem;
    }

    /* Dialogue */
    .dialogue-container {
        padding: 2.5rem 2rem;
        margin: 4rem 0;
    }

    .chat-row {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .avatar {
        width: 56px;
        height: 56px;
    }

    .chat-bubble {
        padding: 1.2rem;
    }

    /* Cultural Column */
    .cultural-column {
        padding: 2.5rem;
        margin: 5rem 0;
    }
}

@media (max-width: 600px) {

    /* Global Component Spacing for Mobile */
    .summary-box,
    .option-card,
    .dialogue-container {
        padding: 1.5rem;
        border-radius: var(--radius-md);
        margin-bottom: 3rem;
    }

    .cultural-column {
        padding: 1.5rem;
        margin: 4rem 0;
        border-radius: var(--radius-md);
    }

    .summary-box::before {
        font-size: 0.75rem;
        padding: 3px 15px;
        left: 20px;
    }

    /* Option Card */
    .option-phrase {
        font-size: 1.4rem;
    }

    .option-detail-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
        gap: 1.2rem;
    }

    .detail-item.full-width {
        grid-column: auto;
        /* Reset to natural flow */
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    /* Tabs */
    .tabs-container {
        margin: 3rem 0;
    }

    .tabs-header {
        top: 55px;
        /* Adjust for smaller variable header if needed */
        margin-bottom: 1.5rem;
        padding-bottom: 0.5rem;
        /* Scroll hint */
    }

    .tab-trigger {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* Comparison Block: Stack vertically */
    .comparison-block {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 3rem 0;
    }

    .comp-box {
        padding: 1.5rem;
    }

    .comp-phrase {
        font-size: 1.2rem;
    }

    /* Dialogue */
    .dialogue-container {
        margin: 3rem 0;
    }

    .chat-row {
        flex-direction: column;
        /* Avatar top, bubble bottom? Or keep side-by-side but tighter? */
        /* Keeping side-by-side is usually better for chat feel unless very narrow. 
           Let's keep side-by-side but adjust sizes. */
        flex-direction: row;
        gap: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .chat-row.right {
        flex-direction: row-reverse;
    }

    .avatar {
        width: 44px;
        height: 44px;
        font-size: 0.7rem;
    }

    .chat-bubble {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .chat-translation {
        font-size: 0.8rem;
    }
}