.example-grid, .role-grid, #role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin: 2rem 0 4rem;
}
.role-card {
    display: block;
    background: #fff;
    border: 1px solid var(--line, #e7e0d6);
    border-radius: 1.1rem;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 16px 40px -28px rgba(28, 25, 23, 0.4);
    transition: transform .15s ease;
}
.role-card:hover { transform: translateY(-4px); }
.role-card strong { display: block; font-size: 1.05rem; }
.role-card span { display: block; color: #c2410c; font-size: 0.8rem; font-weight: 700; margin: 0.25rem 0 0.5rem; }
.role-card p { margin: 0; color: #57534e; font-size: 0.9rem; }

.lang-toggle {
    border: 1px solid #e7e0d6;
    background: #fff;
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
}

.toast-note {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1c1917;
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    z-index: 90;
}

.cover-letter-page {
    width: min(100%, 210mm);
    min-height: 297mm;
    margin: 0 auto;
    background: #fff;
    padding: 22mm 20mm;
    box-sizing: border-box;
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
    color: #1c1917;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.55;
}
.cover-letter-page h1 { font-size: 1.5rem; margin: 0; }
.cover-letter-page .cl-meta { color: #57534e; font-size: 0.88rem; margin: 0.4rem 0 1.4rem; }
.cover-letter-page .cl-body { white-space: pre-wrap; font-size: 0.98rem; }

.order-row, .match-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.75rem;
    margin-bottom: 0.45rem;
    background: #fff;
}
.match-hit { color: #047857; font-weight: 700; }
.match-miss { color: #b45309; font-weight: 700; }

.suggest-field { position: relative; }
.suggest-list {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 0.2rem);
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 0.75rem;
    box-shadow: 0 16px 40px -24px rgba(28, 25, 23, 0.45);
    max-height: 14rem;
    overflow: auto;
    padding: 0.3rem;
}
.suggest-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.45rem 0.55rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font: inherit;
}
.suggest-item:hover { background: #f5f0e8; }
.suggest-item span { color: #78716c; font-size: 0.75rem; }

/* CV Score & Review Widget Styles */
.topbar-score-badge {
    background: #fff7ed;
    border: 1px solid #ffedd5;
    color: #c2410c;
    padding: 0.35rem 0.65rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: transform .12s ease, background-color .12s ease;
}
.topbar-score-badge:hover {
    transform: scale(1.03);
    background: #ffedd5;
}
.topbar-score-badge .score-num {
    background: #c2410c;
    color: #fff;
    padding: 0.1rem 0.35rem;
    border-radius: 99px;
    font-size: 0.7rem;
}
.topbar-score-badge .score-lbl {
    font-weight: 700;
}

.tab-score-badge {
    background: #e7e5e4;
    color: #44403c;
    padding: 0.05rem 0.3rem;
    border-radius: 99px;
    font-size: 0.64rem;
    margin-left: 0.2rem;
    font-weight: 700;
    display: inline-block;
}
.section-tab.active .tab-score-badge {
    background: #fff;
    color: #c2410c;
}

.score-breakdown-container {
    display: grid;
    gap: 1.25rem;
}
.score-circle-large-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fffaf4;
    border: 1px solid #f5ebe0;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 8px 24px -16px rgba(194, 65, 12, 0.12);
}
.score-circle-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.65rem;
    font-weight: 700;
    color: #1c1917;
    font-family: var(--serif, Georgia, serif);
    transition: background 0.3s ease;
}
.score-rating-text {
    font-size: 1rem;
    font-weight: 800;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.score-tips-list {
    display: grid;
    gap: 0.5rem;
}
.score-tip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.75rem;
    background: #fff;
    transition: transform 0.12s ease, border-color 0.12s ease;
}
.score-tip-row.completed {
    border-color: #d1fae5;
    background: #f0fdf4;
}
.score-tip-row:not(.completed):hover {
    transform: translateX(3px);
    border-color: #fca5a5;
}
.score-tip-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
}
.score-tip-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    font-size: 0.68rem;
    font-weight: bold;
    flex-shrink: 0;
}
.score-tip-row.completed .score-tip-status-icon {
    background: #10b981;
    color: #fff;
}
.score-tip-row:not(.completed) .score-tip-status-icon {
    background: #ea580c;
    color: #fff;
}
.score-tip-points {
    font-size: 0.7rem;
    color: #78716c;
    background: #f5f5f4;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: 700;
}
.score-tip-row.completed .score-tip-points {
    color: #047857;
    background: #d1fae5;
}
.score-tip-btn {
    border: 1px solid #e7e0d6;
    background: #fff;
    color: #c2410c;
    font-weight: 700;
    font-size: 0.72rem;
    cursor: pointer;
    padding: 0.25rem 0.45rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}
.score-tip-btn:hover {
    background: #fffaf4;
    border-color: #c2410c;
}

@media (max-width: 960px) {
    .preview-pane {
        order: -1;
        max-height: 52vh;
        overflow: auto;
    }
    .layout { display: flex; flex-direction: column; }
}
