/* ── Poetry Pavilion (诗词阁) ─────────────────────────────────────────── */
.poetry-zone { margin-top: 0; }
.poetry-hero {
    display: flex; gap: 32px; align-items: stretch; flex-wrap: wrap;
}
.poetry-feihualing {
    flex: 1.2; min-width: 320px;
    background: linear-gradient(160deg, #fef9f0 0%, #fdf3e2 60%, #fff 100%);
    border-radius: 20px; padding: 36px 32px;
    border: 2px solid #e8d5c4; position: relative; overflow: hidden;
}
.poetry-feihualing::before {
    content: ''; position: absolute; top: -30px; right: -30px;
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(141,110,99,0.06);
}
.poetry-fh-keyword {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 18px; background: #8d6e63; color: #fff;
    border-radius: 100px; font-size: 14px; font-weight: 800; margin-bottom: 20px;
}
.poetry-fh-keyword em {
    font-style: normal; font-size: 28px; line-height: 1;
}
.poetry-fh-input-row {
    display: flex; gap: 10px; margin-bottom: 12px;
}
.poetry-fh-input {
    flex: 1; padding: 12px 18px; border: 2px solid #e8d5c4;
    border-radius: 12px; font-family: var(--pk-font); font-size: 16px;
    background: #fff; transition: border-color 0.2s;
}
.poetry-fh-input:focus { outline: none; border-color: #8d6e63; }
.poetry-fh-streak {
    font-size: 13px; color: var(--pk-text-soft); margin-bottom: 8px;
}
.poetry-fh-streak strong { color: #8d6e63; }
.poetry-fh-result {
    margin-top: 16px; padding: 16px 20px; border-radius: 12px;
    background: #fff; border: 1px solid #e8d5c4; display: none;
}
.poetry-fh-result--ok { border-color: #6BCB77; background: #f1f8e9; }
.poetry-fh-result--fail { border-color: #FF6B6B; background: #fff5f5; }
.poetry-fh-result .fh-poem-title { font-size: 16px; font-weight: 800; color: #5d4037; }
.poetry-fh-result .fh-author { font-size: 13px; color: var(--pk-text-soft); margin-top: 4px; }
.poetry-fh-result .fh-couplet {
    font-size: 15px; color: #8d6e63; margin-top: 8px; padding-top: 8px;
    border-top: 1px dashed #e8d5c4; font-style: italic;
}
.poetry-fh-result .fh-hint { font-size: 13px; color: var(--pk-coral); }

/* Poetry quick links */
.poetry-links {
    flex: 0.8; min-width: 240px;
    display: flex; flex-direction: column; gap: 14px;
}
.poetry-link-card {
    flex: 1; display: flex; align-items: center; gap: 16px;
    background: #fff; border-radius: 16px; padding: 22px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04); transition: all 0.2s;
    text-decoration: none; color: var(--pk-text);
}
.poetry-link-card:hover {
    transform: translateY(-2px); box-shadow: var(--pk-shadow);
}
.poetry-link-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.poetry-link-text h4 { font-size: 16px; font-weight: 800; margin-bottom: 2px; }
.poetry-link-text p { font-size: 12px; color: var(--pk-text-soft); line-height: 1.4; }

/* ── Writing Material Library ─────────────────────────────────────────── */
.material-section { margin-top: 0; }
.material-tabs {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.material-tab {
    padding: 8px 18px; border-radius: 100px; border: 2px solid #eee;
    background: #fff; font-family: var(--pk-font); font-size: 14px;
    font-weight: 700; color: var(--pk-text-soft); cursor: pointer;
    transition: all 0.2s;
}
.material-tab:hover { border-color: #8d6e63; color: #8d6e63; }
.material-tab--active { background: #8d6e63; color: #fff; border-color: #8d6e63; }
.material-card {
    background: linear-gradient(135deg, #fef9f0, #fff);
    border-radius: 20px; padding: 32px 28px;
    border: 1px solid #f0e6da; position: relative;
}
.material-card-category {
    display: inline-block; padding: 3px 12px; border-radius: 100px;
    background: #f0e6da; color: #8d6e63; font-size: 12px; font-weight: 700;
    margin-bottom: 12px;
}
.material-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.material-card-content { font-size: 15px; line-height: 1.8; color: var(--pk-text); margin-bottom: 14px; }
.material-card-meta {
    display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px;
    color: var(--pk-text-soft); margin-bottom: 16px;
}
.material-card-hint {
    padding: 14px 18px; background: #fdf3e2; border-radius: 10px;
    font-size: 13px; color: #8d6e63; line-height: 1.6;
    margin-bottom: 16px;
}
.material-card-hint strong { font-weight: 800; }
.material-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.material-empty { text-align: center; padding: 40px; color: var(--pk-text-soft); }

/* ── Essay correction CTA ─────────────────────────────────────────────── */
.essay-cta {
    background: linear-gradient(135deg, #4a148c, #7b1fa2);
    border-radius: 24px; padding: 48px 40px; color: #fff;
    display: flex; align-items: center; gap: 36px; flex-wrap: wrap;
    position: relative; overflow: hidden;
}
.essay-cta::before {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 180px; height: 180px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.essay-cta::after {
    content: ''; position: absolute; bottom: -30px; left: 30%;
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.essay-cta-text { flex: 1; min-width: 260px; position: relative; z-index: 1; }
.essay-cta-text h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.essay-cta-text p { font-size: 15px; opacity: 0.9; line-height: 1.7; margin-bottom: 0; }
.essay-cta-features { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.essay-cta-feature {
    padding: 6px 16px; background: rgba(255,255,255,0.15);
    border-radius: 100px; font-size: 13px; font-weight: 700;
}
.essay-cta-btn { flex-shrink: 0; position: relative; z-index: 1; }

/* ── Common mistake quiz ──────────────────────────────────────────────── */
.mistake-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mistake-card {
    background: #fff; border-radius: 16px; padding: 24px 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04); border-left: 4px solid #c62828;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mistake-card:hover { transform: translateY(-2px); box-shadow: var(--pk-shadow); }
.mistake-card h4 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.mistake-card .mistake-pair { font-size: 24px; font-weight: 900; color: #c62828; margin-bottom: 8px; }
.mistake-card p { font-size: 13px; color: var(--pk-text-soft); line-height: 1.5; }

/* ── Chengyu chain ─────────────────────────────────────────────────────── */
.poetry-tabs { display: flex; gap: 0; margin-bottom: 24px; }
.poetry-tab {
    padding: 10px 24px; border: 2px solid #e8d5c4; background: #fff;
    font-family: var(--pk-font); font-size: 14px; font-weight: 700;
    color: var(--pk-text-soft); cursor: pointer; transition: all 0.2s;
}
.poetry-tab:first-child { border-radius: 12px 0 0 12px; }
.poetry-tab:last-child { border-radius: 0 12px 12px 0; }
.poetry-tab--active { background: #8d6e63; color: #fff; border-color: #8d6e63; }
.poetry-tab:hover:not(.poetry-tab--active) { border-color: #8d6e63; color: #8d6e63; }

/* ── Sentence error ────────────────────────────────────────────────────── */
.error-practice-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fce4ec 40%, #fff 100%);
    border-radius: 20px; padding: 32px 28px; border: 2px solid #f8bbd0;
}
.error-sentence-display {
    font-size: 20px; font-weight: 700; color: #c62828; line-height: 1.6;
    padding: 16px 20px; background: #fff; border-radius: 12px;
    margin-bottom: 16px; border-left: 4px solid #c62828;
}
.error-type-tag {
    display: inline-block; padding: 3px 12px; border-radius: 100px;
    background: #fce4ec; color: #c62828; font-size: 12px; font-weight: 700;
    margin-bottom: 12px;
}
.error-answer-row { display: flex; gap: 10px; }
.error-answer-input {
    flex: 1; padding: 12px 18px; border: 2px solid #f8bbd0;
    border-radius: 12px; font-family: var(--pk-font); font-size: 16px;
}
.error-answer-input:focus { outline: none; border-color: #c62828; }
.error-result {
    margin-top: 16px; padding: 16px 20px; border-radius: 12px; display: none;
}
.error-result--ok { background: #e8f5e9; border: 1px solid #6BCB77; }
.error-result--fail { background: #fff5f5; border: 1px solid #FF6B6B; }
.error-result .err-correct { font-size: 18px; font-weight: 800; color: #6BCB77; margin-bottom: 6px; }
.error-result .err-explain { font-size: 13px; color: var(--pk-text-soft); line-height: 1.6; }
.error-refresh { text-align: center; margin-top: 16px; }

/* ── Dictation ─────────────────────────────────────────────────────────── */
.dictation-card {
    background: linear-gradient(135deg, #e8eaf6 0%, #e3f2fd 40%, #fff 100%);
    border-radius: 20px; padding: 32px 28px; border: 2px solid #c5cae9;
}
.dictation-prompt {
    font-size: 16px; color: var(--pk-text-soft); margin-bottom: 8px;
}
.dictation-ref-line {
    font-size: 22px; font-weight: 800; color: #283593; line-height: 1.6;
    padding: 12px 20px; background: #fff; border-radius: 12px;
    margin-bottom: 16px;
}
.dictation-ref-line .blank { color: #c62828; border-bottom: 2px dashed #c62828; }
.dictation-input-row { display: flex; gap: 10px; margin-bottom: 12px; }
.dictation-input {
    flex: 1; padding: 12px 18px; border: 2px solid #c5cae9;
    border-radius: 12px; font-family: var(--pk-font); font-size: 20px;
    text-align: center; letter-spacing: 4px;
}
.dictation-input:focus { outline: none; border-color: #283593; }
.dictation-result { margin-top: 16px; padding: 16px 20px; border-radius: 12px; display: none; }
.dictation-result--ok { background: #e8f5e9; border: 1px solid #6BCB77; }
.dictation-result--fail { background: #fff5f5; border: 1px solid #FF6B6B; }
.dictation-result .dict-errors { font-size: 13px; margin-top: 8px; }
.dictation-result .dict-error-item { color: #c62828; margin: 2px 0; }

/* ── Writing samples ───────────────────────────────────────────────────── */
.sample-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sample-card {
    background: #fff; border-radius: 16px; padding: 24px 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04); transition: all 0.2s;
    cursor: pointer; border: 2px solid transparent;
}
.sample-card:hover { border-color: #4527a0; transform: translateY(-2px); box-shadow: var(--pk-shadow); }
.sample-card-category {
    display: inline-block; padding: 2px 10px; border-radius: 100px;
    background: #ede7f6; color: #4527a0; font-size: 11px; font-weight: 700;
    margin-bottom: 8px;
}
.sample-card h4 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.sample-card-meta { font-size: 12px; color: var(--pk-text-soft); }
.sample-detail {
    background: #fff; border-radius: 20px; padding: 32px 28px;
    box-shadow: var(--pk-shadow); display: none;
}
.sample-detail-content {
    font-size: 15px; line-height: 1.9; white-space: pre-wrap;
    margin: 16px 0; padding: 20px 24px; background: var(--pk-bg-warm);
    border-radius: 12px;
}
.sample-detail-highlights { margin: 16px 0; }
.sample-detail-highlights h4 { font-size: 14px; font-weight: 800; margin-bottom: 8px; color: #4527a0; }
.sample-highlight-item {
    padding: 8px 14px; background: #ede7f6; border-radius: 8px;
    margin-bottom: 6px; font-size: 13px; line-height: 1.6;
}
.sample-detail-commentary {
    padding: 20px 24px; background: linear-gradient(135deg, #ede7f6, #e8eaf6);
    border-radius: 12px; font-size: 14px; line-height: 1.8;
}
.sample-detail-commentary h4 { font-size: 14px; font-weight: 800; margin-bottom: 8px; color: #4527a0; }
.sample-back { margin-bottom: 16px; }

@media (max-width: 768px) {
    .poetry-hero { flex-direction: column; }
    .mistake-grid { grid-template-columns: 1fr; }
    .sample-grid { grid-template-columns: 1fr; }
    .essay-cta { padding: 36px 24px; }
    .poetry-fh-input-row { flex-direction: column; }
    .error-answer-row { flex-direction: column; }
    .dictation-input-row { flex-direction: column; }
}
