@font-face {
    font-family: 'TemelYazi';
    src: url('../../fontlar/temelyazi.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@page {
    size: A4 portrait;
    margin: 0;
}

* {
    box-sizing: border-box;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

:root {
    --theme-main: #2563eb;
    --theme-dark: #1e40af;
    --theme-light: #eff6ff;
    --theme-border: #bfdbfe;
    --ink: #0f172a;
    --muted: #475569;
}

body.theme-turkce {
    --theme-main: #e11d48;
    --theme-dark: #9f1239;
    --theme-light: #fff1f2;
    --theme-border: #fecdd3;
}

body.theme-matematik {
    --theme-main: #2563eb;
    --theme-dark: #1e40af;
    --theme-light: #eff6ff;
    --theme-border: #bfdbfe;
}

body.theme-fen {
    --theme-main: #059669;
    --theme-dark: #065f46;
    --theme-light: #ecfdf5;
    --theme-border: #a7f3d0;
}

body.theme-hayat {
    --theme-main: #d97706;
    --theme-dark: #92400e;
    --theme-light: #fffbeb;
    --theme-border: #fde68a;
}

body.theme-sosyal {
    --theme-main: #7c3aed;
    --theme-dark: #5b21b6;
    --theme-light: #f5f3ff;
    --theme-border: #ddd6fe;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', 'TemelYazi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background-color: #e2e8f0;
    -webkit-tap-highlight-color: transparent;
}

/* ==================== ÜST KONTROL BARI (SADECE EKRANDA) ==================== */
.top-toolbar,
.sd-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0f172a;
    color: #ffffff;
    border-bottom: 3px solid var(--theme-main);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 10px 16px;
}

.toolbar-inner,
.sd-toolbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.toolbar-left,
.sd-toolbar-left,
.sd-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-btn,
.sd-btn,
.sd-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s ease;
    font-family: inherit;
    white-space: nowrap;
}

.toolbar-btn:active,
.sd-btn:active,
.sd-back-btn:active {
    transform: scale(0.96);
}

.btn-back,
.sd-back-btn {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}
.btn-back:hover,
.sd-back-btn:hover {
    background: #334155;
    color: #ffffff;
}

.btn-rubric {
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}
.btn-rubric:hover {
    filter: brightness(1.1);
}

.btn-key,
.sd-btn-key {
    background: #1e293b;
    color: #fbbf24;
    border-color: #f59e0b;
}
.btn-key.active,
.sd-btn-key.active {
    background: #059669;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.btn-reset,
.sd-btn-outline {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}
.btn-reset:hover,
.sd-btn-outline:hover {
    background: #be123c;
    color: #ffffff;
    border-color: #e11d48;
}

.btn-print,
.sd-btn-print {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 14px;
    padding: 8px 16px;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
}
.btn-print:hover,
.sd-btn-print:hover {
    filter: brightness(1.08);
}

.quick-nav-select,
.sd-select {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #475569;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.score-pill,
.sd-score-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fde68a;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ==================== EKRAN ÖNİZLEME SAHNESİ ==================== */
.workspace-stage,
.sd-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 12px 40px 12px;
    gap: 28px;
}

/* ==================== A4 KAĞIT YAPISI (210mm x 297mm) ==================== */
.sheet,
.a4-page {
    width: 210mm;
    height: 297mm;
    max-height: 297mm;
    background: #ffffff;
    padding: 7mm 10mm 6mm 10mm;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
    border-radius: 6px;
    page-break-after: always;
    break-after: page;
}

.sheet:last-of-type,
.a4-page:last-of-type {
    page-break-after: auto;
    break-after: auto;
}

.page-frame {
    display: none;
}

/* ==================== SADELEŞTİRME (FAZLA BİLGİ GİZLEME) ==================== */
.sheet-sub-title,
.ws-subtitle,
.ws-outcomes-bar,
.outcome-tag,
.seo-guide-container {
    display: none !important;
}

/* ==================== A4 ÜST BAŞLIK (2. SINIF & 3-4. SINIF ORTAK) ==================== */
.sheet-header,
.ws-header {
    border-bottom: 2.5px solid var(--theme-main);
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.header-top-strip,
.ws-brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grade-pill,
.ws-Curriculum-pill {
    display: inline-block;
    background: var(--theme-main);
    color: #ffffff;
    font-weight: 900;
    font-size: 10pt;
    padding: 3px 10px;
    border-radius: 7px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.ws-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.ws-eyebrow > span:first-child {
    display: none;
}

.sheet-main-title,
.ws-title-block h1 {
    margin: 0;
    font-size: 13.5pt;
    font-weight: 900;
    color: var(--theme-dark);
    line-height: 1.15;
}

.page-indicator {
    background: var(--theme-light);
    border: 1.5px solid var(--theme-border);
    color: var(--theme-dark);
    font-weight: 800;
    font-size: 9.5pt;
    padding: 3px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

/* 2. Sınıf Öğrenci Bilgi Barı */
.student-info-bar {
    display: grid;
    grid-template-columns: 2fr 1fr 1.1fr;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 9.5pt;
    font-weight: 800;
    color: #334155;
}

.student-info-bar span {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.dots-fill {
    color: #94a3b8;
    font-weight: 400;
    overflow: hidden;
    text-overflow: clip;
}

/* 3. ve 4. Sınıf Öğrenci Bilgi Kutusu */
.ws-student-box {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 5px 10px;
    min-width: 245px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ws-field {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 8.8pt;
    font-weight: 800;
    color: #334155;
}

.ws-field label {
    white-space: nowrap;
}

.ws-field-line {
    flex: 1;
    border-bottom: 1.5px dotted #94a3b8;
    height: 12px;
}

.ws-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ==================== GÖVDE VE BÖLÜMLER ==================== */
.sheet-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 7px;
}

.section-block,
.ws-section {
    border: 1.8px solid var(--theme-border);
    border-radius: 10px;
    background: #ffffff;
    padding: 6px 10px;
}

.section-header,
.ws-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--theme-light);
    border-left: 5px solid var(--theme-main);
    border-radius: 6px;
    padding: 4px 10px;
    margin-bottom: 6px;
}

.section-title-left,
.ws-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10pt;
    font-weight: 800;
    color: var(--theme-dark);
}

.ws-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--theme-main);
    color: #ffffff;
    font-size: 9.5pt;
    font-weight: 900;
    flex-shrink: 0;
}

.section-badge-img,
.ws-section-icon {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    object-fit: contain;
    flex-shrink: 0;
}

.section-title-text {
    font-size: 10.5pt;
    font-weight: 900;
    color: var(--theme-dark);
}

.section-instruction {
    font-size: 9.2pt;
    font-weight: 700;
    color: #334155;
    margin-left: 4px;
}

.ws-section-pts {
    background: #ffffff;
    border: 1px solid var(--theme-border);
    color: var(--theme-dark);
    font-size: 8.5pt;
    font-weight: 800;
    padding: 1.5px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ==================== OKUMA METNİ KUTUSU ==================== */
.reading-card {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #fffdf9;
    border: 1.5px dashed var(--theme-main);
    border-radius: 9px;
    padding: 6px 10px;
    margin-bottom: 6px;
}

.reading-illustration {
    width: 72px !important;
    height: 72px !important;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
}

.reading-visual {
    width: 82px !important;
    max-width: 82px !important;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
}

.reading-visual img {
    width: 68px !important;
    height: 68px !important;
    max-width: 68px !important;
    max-height: 68px !important;
    object-fit: contain;
    display: block;
}

.reading-visual-caption {
    font-size: 7pt;
    font-weight: 800;
    color: #64748b;
    text-align: center;
    margin-top: 2px;
}

.reading-content h4,
.reading-text h4 {
    margin: 0 0 2px 0;
    font-size: 10.5pt;
    font-weight: 900;
    color: var(--theme-dark);
}

.reading-content p,
.reading-text p {
    margin: 0;
    font-size: 9.5pt;
    line-height: 1.34;
    color: #1e293b;
}

/* ==================== 5N1K & ANALİZ KUTULARI (3-4. SINIF BÖLÜM A) ==================== */
.fivew-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.fivew-box {
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 5px 9px;
    background: #f8fafc;
    cursor: pointer;
    position: relative;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fivew-box:hover {
    border-color: var(--theme-main);
}

.fivew-label {
    font-size: 8.5pt;
    font-weight: 900;
    color: var(--theme-dark);
}

.fivew-line {
    border-bottom: 1.5px dotted #94a3b8;
    height: 16px;
    margin-top: 2px;
}

.ans-reveal {
    display: none;
    font-size: 9pt;
    font-weight: 800;
    color: #047857;
    background: #ecfdf5;
    padding: 2px 6px;
    border-radius: 5px;
    margin-top: 2px;
}

.fivew-box.revealed .fivew-line,
body.show-answer-key .fivew-box .fivew-line {
    display: none;
}

.fivew-box.revealed .ans-reveal,
body.show-answer-key .fivew-box .ans-reveal {
    display: block;
}

/* ==================== DOĞRU / YANLIŞ TABLOSU ==================== */
.tf-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tf-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 7px;
    border: 1.4px solid #e2e8f0;
    background: #f8fafc;
    font-size: 9.5pt;
    font-weight: 700;
}

.tf-row:nth-child(even) {
    background: #ffffff;
}

.tf-text,
.tf-statement {
    flex: 1;
    line-height: 1.26;
}

.tf-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tf-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--theme-main);
    color: #ffffff;
    font-size: 8.5pt;
    font-weight: 900;
    flex-shrink: 0;
}

.tf-actions,
.tf-btns {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.tf-btn {
    width: 28px;
    height: 23px;
    border: 1.6px solid #94a3b8;
    border-radius: 6px;
    background: #ffffff;
    font-weight: 900;
    font-size: 9pt;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    transition: all 0.15s;
}

.tf-btn:hover {
    border-color: var(--theme-main);
}

.tf-btn.selected-correct,
body.show-answer-key .tf-btn[data-correct="true"],
body.show-answer-key .tf-row[data-correct="D"] .tf-btn[data-val="D"],
body.show-answer-key .tf-row[data-correct="Y"] .tf-btn[data-val="Y"] {
    background: #10b981 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

.tf-btn.selected-wrong {
    background: #ef4444 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

/* ==================== KELİME KUTUSU & BOŞLUK DOLDURMA (BÖLÜM C) ==================== */
.word-bank {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    background: var(--theme-light);
    border: 1.4px dashed var(--theme-main);
    border-radius: 8px;
    padding: 4px 10px;
    margin-bottom: 6px;
}

.word-bank-label {
    font-size: 9pt;
    font-weight: 900;
    color: var(--theme-dark);
}

.word-pill {
    background: #ffffff;
    border: 1.4px solid var(--theme-border);
    color: #0f172a;
    font-size: 9pt;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 999px;
}

.fill-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fill-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 7px;
    border: 1.4px solid #e2e8f0;
    background: #f8fafc;
    font-size: 9.5pt;
    font-weight: 700;
    line-height: 1.3;
}

.fill-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--theme-main);
    color: #ffffff;
    font-size: 8.5pt;
    font-weight: 900;
    flex-shrink: 0;
}

.fill-illus {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px;
    flex-shrink: 0;
}

.blank-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    min-height: 21px;
    padding: 1px 8px;
    border-bottom: 2px dashed var(--theme-main);
    background: #ffffff;
    border-radius: 4px;
    font-weight: 900;
    font-size: 9.2pt;
    color: #047857;
    cursor: pointer;
    vertical-align: middle;
}

.blank-slot::after {
    content: "....................";
    color: #94a3b8;
    font-weight: 400;
}

.blank-slot.revealed::after,
body.show-answer-key .blank-slot::after {
    content: attr(data-answer) !important;
    color: #047857 !important;
    font-weight: 900 !important;
}

.blank-slot.revealed,
body.show-answer-key .blank-slot {
    background: #ecfdf5 !important;
    border-bottom: 2px solid #10b981 !important;
}

/* ==================== UYGULAMA / KART ETKİNLİKLERİ (2. SINIF) ==================== */
.activity-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.activity-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.activity-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.act-card {
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 5px 8px;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    font-size: 9.5pt;
}

.act-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-weight: 800;
    color: #1e293b;
}

.act-img {
    width: 46px !important;
    height: 46px !important;
    object-fit: contain;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 6px;
    padding: 2px;
}

.write-blank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    min-height: 22px;
    padding: 2px 8px;
    border: 1.6px dashed #64748b;
    border-radius: 6px;
    background: #ffffff;
    font-weight: 800;
    font-size: 9.2pt;
    color: transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.write-blank::after {
    content: "....................";
    color: #94a3b8;
    font-weight: 400;
}

.write-blank.revealed,
body.show-answer-key .write-blank {
    color: #047857 !important;
    border-style: solid !important;
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
}

.write-blank.revealed::after,
body.show-answer-key .write-blank::after {
    content: none !important;
}

/* ==================== ÇOKTAN SEÇMELİ KAZANIM TESTİ (SAYFA 2) ==================== */
.quiz-grid-2,
.mc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
}

.quiz-card,
.mc-card {
    border: 1.6px solid #cbd5e1;
    border-radius: 9px;
    padding: 6px 9px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
}

.quiz-card.full-width,
.mc-card.full-width {
    grid-column: span 2;
}

.quiz-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 3px;
}

.mc-top {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.quiz-num-badge {
    background: var(--theme-main);
    color: #ffffff;
    font-size: 8.8pt;
    font-weight: 900;
    padding: 1.5px 8px;
    border-radius: 6px;
}

.mc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--theme-main);
    color: #ffffff;
    font-size: 9pt;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 1px;
}

.quiz-body-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.quiz-thumb {
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 2px;
    background: #ffffff;
    flex-shrink: 0;
}

.quiz-question-text,
.mc-stem {
    margin: 0;
    font-size: 9.5pt;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.32;
}

.quiz-options,
.mc-options {
    display: flex;
    flex-direction: column;
    gap: 3.5px;
}

.quiz-options.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.quiz-options.horizontal .quiz-opt {
    flex: 1;
    min-width: 90px;
}

.quiz-opt,
.mc-opt {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3.5px 7px;
    border: 1.4px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    font-size: 9.2pt;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all 0.15s;
}

.quiz-opt:hover,
.mc-opt:hover {
    border-color: var(--theme-main);
    background: var(--theme-light);
}

.opt-letter,
.mc-letter {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #1e293b;
    font-weight: 900;
    font-size: 8.2pt;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quiz-opt.selected-correct,
.mc-opt.selected-correct,
body.show-answer-key .quiz-opt[data-correct="true"],
body.show-answer-key .mc-card[data-correct="A"] .mc-opt[data-opt="A"],
body.show-answer-key .mc-card[data-correct="B"] .mc-opt[data-opt="B"],
body.show-answer-key .mc-card[data-correct="C"] .mc-opt[data-opt="C"],
body.show-answer-key .mc-card[data-correct="D"] .mc-opt[data-opt="D"] {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
}

.quiz-opt.selected-correct .opt-letter,
.mc-opt.selected-correct .mc-letter,
body.show-answer-key .quiz-opt[data-correct="true"] .opt-letter,
body.show-answer-key .mc-card[data-correct="A"] .mc-opt[data-opt="A"] .mc-letter,
body.show-answer-key .mc-card[data-correct="B"] .mc-opt[data-opt="B"] .mc-letter,
body.show-answer-key .mc-card[data-correct="C"] .mc-opt[data-opt="C"] .mc-letter,
body.show-answer-key .mc-card[data-correct="D"] .mc-opt[data-opt="D"] .mc-letter {
    background: #10b981 !important;
    color: #ffffff !important;
}

.quiz-opt.selected-wrong,
.mc-opt.selected-wrong {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

.quiz-opt.selected-wrong .opt-letter,
.mc-opt.selected-wrong .mc-letter {
    background: #ef4444 !important;
    color: #ffffff !important;
}

/* ==================== ALT ÖZ DEĞERLENDİRME & ÖĞRETMEN ÖLÇEĞİ ==================== */
.rubric-footer-box,
.self-eval-box {
    border: 1.8px solid var(--theme-main);
    border-radius: 9px;
    background: var(--theme-light);
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rubric-title,
.self-eval-title {
    font-size: 9pt;
    font-weight: 900;
    color: var(--theme-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.self-eval-title img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
}

.rubric-levels,
.self-eval-faces {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rubric-lvl,
.eval-face {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1.4px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 8.5pt;
    font-weight: 800;
    color: #1e293b;
    cursor: pointer;
}

.rubric-lvl.active,
.eval-face.selected {
    border-color: var(--theme-main);
    background: #dbeafe;
}

/* Cevap Anahtarı Alt Şeridi (Sadece Cevap Anahtarı Açıkken Gösterilir) */
.answer-key-strip {
    display: none;
    background: #ecfdf5;
    border: 1.5px solid #10b981;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 8pt;
    color: #065f46;
    line-height: 1.35;
}

body.show-answer-key .answer-key-strip {
    display: block;
}

.sheet-footer-meta,
.ws-page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 8pt;
    font-weight: 700;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 3px;
}

/* ==================== BASKI (PRINT) KURALLARI ==================== */
@media print {
    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .no-print,
    .top-toolbar,
    .sd-toolbar,
    .seo-guide-container,
    .adsbygoogle,
    ins.adsbygoogle,
    iframe {
        display: none !important;
        height: 0 !important;
        visibility: hidden !important;
    }
    .workspace-stage,
    .sd-workspace {
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important;
        display: block !important;
    }
    .sheet,
    .a4-page {
        margin: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        width: 210mm !important;
        height: 297mm !important;
        max-height: 297mm !important;
        page-break-after: always !important;
        break-after: page !important;
    }
    .sheet:last-of-type,
    .a4-page:last-of-type {
        page-break-after: auto !important;
        break-after: auto !important;
    }
}

/* ==================== TYMM SÜREÇ ODAKLI AÇIK UÇLU / UYGULAMA KARTLARI ==================== */
.tymm-open-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.tymm-open-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

.tymm-open-card.full-span {
    grid-column: span 2;
}

.tymm-open-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.tymm-open-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--theme-main, #2563eb);
    color: #ffffff;
    font-size: 8.5pt;
    font-weight: 800;
}

.tymm-open-tag {
    font-size: 7.5pt;
    font-weight: 800;
    color: var(--theme-dark, #1e40af);
    background: var(--theme-soft, #eff6ff);
    border: 1px solid var(--theme-border, #bfdbfe);
    padding: 1px 7px;
    border-radius: 999px;
}

.tymm-open-prompt {
    font-size: 9.3pt;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.36;
    margin: 0;
}

.tymm-open-box {
    border: 1.4px dashed #94a3b8;
    border-radius: 8px;
    background: #f8fafc;
    padding: 6px 8px;
    min-height: 44px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
}

.tymm-open-line {
    border-bottom: 1.4px dotted #94a3b8;
    height: 15px;
}

.tymm-open-box .ans-reveal {
    display: none;
    font-size: 8.6pt;
    font-weight: 800;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 3px 7px;
    margin-top: 2px;
}

.tymm-open-box.revealed .ans-reveal,
body.show-answers .tymm-open-box .ans-reveal,
body.show-answer-key .tymm-open-box .ans-reveal {
    display: block;
}

.tymm-open-box.revealed .tymm-open-line,
body.show-answers .tymm-open-box .tymm-open-line,
body.show-answer-key .tymm-open-box .tymm-open-line {
    display: none;
}

/* ==================== V2 ÇOK ÇEŞİTLİ SÜREÇ DEĞERLENDİRME SİSTEMİ (.sd-v2) ==================== */
/* Matematik motoru (stil.css) ile birlikte yüklendiğinde sayfa kaydırmasını ve A4 düzenini koru */
body.sd-with-ysm {
    display: block !important;
    height: auto !important;
    overflow: auto !important;
    background-color: #e2e8f0 !important;
    font-family: 'Nunito', 'TemelYazi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Matematik motoru baskı cevap katmanı (.cevap) kontrolü */
.sd-math-slot .cevap {
    display: none;
}
body.show-answer-key .sd-math-slot .cevap,
body.cevap-acik .sd-math-slot .cevap,
.sd-math-slot.revealed .cevap {
    display: inline !important;
}

/* Hafif kareli defter dokulu ferah A4 sayfa */
.a4-page.sd-v2 {
    background-color: #ffffff;
    background-image:
        linear-gradient(to right, rgba(148, 163, 184, 0.13) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.13) 1px, transparent 1px);
    background-size: 5mm 5mm;
    padding: 7mm 9.5mm 6mm 9.5mm;
    justify-content: flex-start;
    gap: 3.2mm;
}

.a4-page.sd-v2 .sd-v2-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4.5mm;
}

.sd-task.sd-grow {
    flex: 1;
    min-height: 0;
}

.sd-task.sd-grow .tymm-open-box {
    flex: 1;
    justify-content: flex-start;
    gap: 7px;
    padding: 8px 10px;
}

.sd-task.sd-grow .tymm-open-line {
    height: 21px;
}

.sd-task.sd-grow .sd-reason-wrap {
    flex: 1;
}

.sd-reason-wrap > .sd-pic-card {
    justify-content: center;
    gap: 8px;
}

.sd-task.sd-grow .sd-reason-text {
    flex: 1;
}

.sd-work-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 8px;
    min-height: 36mm;
}

.sd-work-pane {
    border: 1.4px dashed #94a3b8;
    border-radius: 8px;
    background: #f8fafc;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    cursor: pointer;
}

.sd-work-pane-label {
    font-size: 8.2pt;
    font-weight: 900;
    color: var(--theme-dark);
    letter-spacing: 0.2px;
}

.sd-work-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 7px;
}

.sd-work-line {
    border-bottom: 1.4px dotted #94a3b8;
    min-height: 18px;
    font-size: 8.4pt;
    font-weight: 800;
    color: #475569;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2px;
}

.sd-rubric-strip {
    margin-top: auto;
}

/* Üst tema bandı (2., 3. ve 4. sayfalarda ince şerit) */
.sd-v2-minihead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 2px solid var(--theme-main);
    padding-bottom: 3.5px;
    margin-bottom: 1px;
}

.sd-v2-minihead-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.sd-v2-ders-pill {
    background: var(--theme-main);
    color: #ffffff;
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 9pt;
    padding: 2px 10px;
    border-radius: 999px;
    letter-spacing: 0.4px;
}

.sd-v2-tema-rozet {
    background: #fef3c7;
    color: #92400e;
    border: 1.5px solid #f59e0b;
    font-weight: 900;
    font-size: 8pt;
    padding: 1.5px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.sd-v2-altkonu {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 10.8pt;
    color: var(--theme-dark);
}

.sd-v2-sayfa-no {
    font-size: 8.5pt;
    font-weight: 800;
    color: var(--muted);
    background: #ffffff;
    border: 1.2px solid var(--theme-border);
    padding: 1.5px 8px;
    border-radius: 999px;
}

/* Çalışma Bloğu (ÇALIŞMA 1, ÇALIŞMA 2 ...) — her çalışma belirgin renkli dış çerçeveyle ayrılır */
.sd-task {
    background: rgba(255, 255, 255, 0.96);
    border: 2px solid #3b82f6;
    border-radius: 11px;
    padding: 8px 10.5px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sd-v2-body > .sd-task:nth-of-type(4n + 1) {
    border-color: #3b82f6;
}
.sd-v2-body > .sd-task:nth-of-type(4n + 1) .sd-task-badge {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.sd-v2-body > .sd-task:nth-of-type(4n + 1) .sd-task-badge b {
    color: #1d4ed8;
}

.sd-v2-body > .sd-task:nth-of-type(4n + 2) {
    border-color: #f97316;
}
.sd-v2-body > .sd-task:nth-of-type(4n + 2) .sd-task-badge {
    background: linear-gradient(135deg, #f97316, #ea580c);
}
.sd-v2-body > .sd-task:nth-of-type(4n + 2) .sd-task-badge b {
    color: #c2410c;
}

.sd-v2-body > .sd-task:nth-of-type(4n + 3) {
    border-color: #10b981;
}
.sd-v2-body > .sd-task:nth-of-type(4n + 3) .sd-task-badge {
    background: linear-gradient(135deg, #10b981, #059669);
}
.sd-v2-body > .sd-task:nth-of-type(4n + 3) .sd-task-badge b {
    color: #047857;
}

.sd-v2-body > .sd-task:nth-of-type(4n + 4) {
    border-color: #8b5cf6;
}
.sd-v2-body > .sd-task:nth-of-type(4n + 4) .sd-task-badge {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.sd-v2-body > .sd-task:nth-of-type(4n + 4) .sd-task-badge b {
    color: #6d28d9;
}

.sd-task-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.sd-task-title {
    display: flex;
    align-items: baseline;
    gap: 7px;
    font-size: 9.6pt;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.32;
}

.sd-task-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 8.4pt;
    padding: 1.5px 8px 1.5px 7px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.sd-task-badge b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #c2410c;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    font-size: 8.2pt;
    padding: 0 3px;
}

.sd-task-kod {
    font-size: 7.4pt;
    font-weight: 800;
    color: var(--theme-dark);
    background: var(--theme-light);
    border: 1px solid var(--theme-border);
    padding: 1.5px 7px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Izgaralar */
.sd-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.sd-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.sd-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

/* Matematik Bileşen Kartı */
.sd-math-slot {
    background: #ffffff;
    border: 1.3px solid #dbeafe;
    border-radius: 9px;
    padding: 5px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sd-math-slot:hover {
    border-color: var(--theme-main);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.sd-math-slot.revealed {
    border-color: #10b981;
    background: #f0fdf4;
}

.sd-math-canvas {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-math-canvas .ysm-b {
    width: 100%;
    height: 100%;
}

.sd-math-canvas svg {
    width: 100%;
    height: 100%;
    display: block;
}

.sd-slot-foot {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 8.6pt;
    font-weight: 800;
    color: #334155;
    padding-top: 2px;
    border-top: 1px dashed #e2e8f0;
}

/* Gerçek Türk Lirası Kâğıt & Madenî Para Kartları (uygulamalar/para/paralar/) */
.sd-money-card {
    background: #ffffff;
    border: 1.3px solid #dbeafe;
    border-radius: 9px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.sd-money-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px 7px;
    min-height: 30mm;
    width: 100%;
}

.sd-banknote {
    height: 16mm;
    width: auto;
    border-radius: 3px;
    border: 0.8px solid rgba(15, 23, 42, 0.22);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
    object-fit: contain;
    display: block;
}

.sd-coin {
    height: 12.5mm;
    width: 12.5mm;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 1.5px rgba(15, 23, 42, 0.22));
}

.sd-coin.kr {
    height: 11mm;
    width: 11mm;
}

/* Görselli Etkinlik Kartları (Fen, Türkçe, Hayat Bilgisi — Sıfır Emoji, Saf Beyaz WebP) */
.sd-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }

.sd-pic-card {
    background: #ffffff;
    border: 1.3px solid #cbd5e1;
    border-radius: 9px;
    padding: 5px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    position: relative;
}

.sd-pic-card img {
    width: 100%;
    height: 24mm;
    object-fit: contain;
    display: block;
    background: #ffffff;
    border-radius: 6px;
}

.sd-pic-card.tall img { height: 30mm; }
.sd-pic-card.sm img { height: 19mm; }

.sd-pic-title {
    font-size: 8.4pt;
    font-weight: 900;
    color: #0f172a;
    text-align: center;
    line-height: 1.22;
}

.sd-pic-sub {
    font-size: 7.7pt;
    font-weight: 700;
    color: #475569;
    text-align: center;
    line-height: 1.2;
}

.sd-seq-circle {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.6px dashed var(--theme-main);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9.5pt;
    font-weight: 900;
    color: transparent;
    cursor: pointer;
}

.sd-seq-circle::before {
    content: attr(data-answer);
    visibility: hidden;
}

.sd-seq-circle.revealed,
body.show-answer-key .sd-seq-circle {
    border-style: solid !important;
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
    color: #047857 !important;
}

.sd-seq-circle.revealed::before,
body.show-answer-key .sd-seq-circle::before {
    visibility: visible !important;
}

/* Okuma / Senaryo Görselli Kutusu */
.sd-story-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1.3px solid #cbd5e1;
    border-radius: 9px;
    padding: 7px 10px;
}

.sd-story-box img {
    width: 34mm;
    height: 30mm;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
}

.sd-story-box.wide-img img {
    width: 44mm;
    height: 30mm;
}

.sd-story-content {
    flex: 1;
    min-width: 0;
}

.sd-story-content h4 {
    margin: 0 0 3px 0;
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 10.2pt;
    font-weight: 700;
    color: var(--theme-dark);
}

.sd-story-content p {
    margin: 0;
    font-size: 9pt;
    font-weight: 600;
    line-height: 1.4;
    color: #1e293b;
}

.sd-story-content p + p {
    margin-top: 3px;
}

/* İki Sütun Eşleştirme Satırları */
.sd-match-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 6px 10px;
}

.sd-match-left,
.sd-match-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sd-match-item {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    border: 1.2px solid #e2e8f0;
    border-radius: 7px;
    padding: 4.5px 8px;
    font-size: 8.8pt;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.28;
}

.sd-match-item img {
    width: 11mm;
    height: 11mm;
    object-fit: contain;
    background: #ffffff;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    padding: 1px;
    flex-shrink: 0;
}

.sd-key-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--theme-main);
    color: #ffffff;
    font-size: 8.2pt;
    font-weight: 900;
    flex-shrink: 0;
}

/* Boş Kendi Örüntünü / Şemanı Oluştur Kutuları */
.sd-empty-boxes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sd-empty-box {
    flex: 1;
    height: 16mm;
    border: 1.6px dashed #64748b;
    border-radius: 8px;
    background: #ffffff;
}

/* Şiir Kutusu */
.sd-poem-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fffdf9;
    border: 1.3px solid var(--theme-border);
    border-radius: 9px;
    padding: 7px 11px;
}

.sd-poem-box img {
    width: 34mm;
    height: 30mm;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
}

.sd-poem-verses {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 9pt;
    font-weight: 700;
    line-height: 1.42;
    color: #1e293b;
    font-style: italic;
}

/* Satır İçi Noktalı Boşluk (Tıkla-Gör & Baskıda Temiz Çizgi) */
.sd-blank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 20px;
    padding: 0 5px;
    border-bottom: 1.8px dotted #64748b;
    background: #f8fafc;
    border-radius: 4px 4px 0 0;
    font-family: 'TemelYazi', 'Nunito', sans-serif;
    font-size: 9.5pt;
    font-weight: 900;
    color: transparent;
    cursor: pointer;
    vertical-align: baseline;
    transition: all 0.15s;
    user-select: none;
}

.sd-blank.sm { min-width: 32px; }
.sd-blank.md { min-width: 58px; }
.sd-blank.lg { min-width: 96px; }
.sd-blank.xl { min-width: 145px; }

.sd-blank::before {
    content: attr(data-answer);
    visibility: hidden;
    white-space: nowrap;
}

.sd-blank:hover {
    border-bottom-color: var(--theme-main);
    background: var(--theme-light);
}

.sd-blank.revealed,
body.show-answer-key .sd-blank {
    color: #047857 !important;
    background: #ecfdf5 !important;
    border-bottom: 2px solid #10b981 !important;
}

.sd-blank.revealed::before,
body.show-answer-key .sd-blank::before {
    visibility: visible !important;
}

/* Kısa Alıştırma Satırları (Dönüşüm, Romen, Eşitlik) */
.sd-drill-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1.2px solid #e2e8f0;
    border-radius: 7px;
    padding: 6px 9px;
    font-size: 9.3pt;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.32;
    flex-wrap: wrap;
}

.sd-dot {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--theme-light);
    border: 1.4px solid var(--theme-main);
    color: var(--theme-dark);
    font-size: 7.8pt;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sd-arrow {
    color: #ea580c;
    font-weight: 900;
    font-size: 10pt;
}

/* Kesir Metin Gösterimi (Altlı Üstlü) */
.sd-frac {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: middle;
    line-height: 1.05;
    font-size: 0.92em;
    font-weight: 900;
    margin: 0 2px;
    color: #1e3a8a;
}
.sd-frac i {
    font-style: normal;
    border-top: 1.5px solid currentColor;
    padding-top: 1px;
    margin-top: 1px;
}

/* Tablo Etkinliği */
.sd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.8pt;
    background: #ffffff;
}

.sd-table th {
    background: var(--theme-light);
    color: var(--theme-dark);
    font-weight: 900;
    border: 1.3px solid var(--theme-border);
    padding: 5.5px 6px;
    text-align: center;
}

.sd-table td {
    border: 1.3px solid #cbd5e1;
    padding: 6.5px 6px;
    text-align: center;
    vertical-align: middle;
    font-weight: 700;
}

/* Mini Seçim Hapları (Süre Tahmini vb. — Baskıda Daire İçine Al, Ekranda Tıkla) */
.sd-choice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: #f8fafc;
    border: 1.2px solid #e2e8f0;
    border-radius: 7px;
    padding: 5.5px 9px;
    font-size: 8.9pt;
    font-weight: 800;
    color: #1e293b;
}

.sd-choice-group {
    display: inline-flex;
    gap: 4px;
    flex-shrink: 0;
}

.sd-choice-btn {
    background: #ffffff;
    border: 1.3px solid #94a3b8;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 8pt;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.sd-choice-btn:hover {
    border-color: var(--theme-main);
    background: var(--theme-light);
}

.sd-choice-btn.selected-correct,
body.show-answer-key .sd-choice-btn[data-correct="true"] {
    background: #10b981 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

.sd-choice-btn.selected-wrong {
    background: #ef4444 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Gerekçeli Kısa Açık Uçlu Kutu (Matematik / Yaşam Problemi) */
.sd-reason-wrap {
    display: flex;
    align-items: stretch;
    gap: 9px;
}

.sd-reason-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sd-reason-prompt {
    margin: 0;
    font-size: 9.2pt;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.38;
}

/* Sade 4'lü Süreç Değerlendirme Rubrik Şeridi (Artı Eğitim ritminde, temiz tablo) */
.sd-rubric-strip {
    border: 1.6px solid var(--theme-main);
    border-radius: 9px;
    overflow: hidden;
    background: #ffffff;
}

.sd-rubric-head {
    background: var(--theme-main);
    color: #ffffff;
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 8.6pt;
    font-weight: 700;
    padding: 3px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 0.3px;
}

.sd-rubric-head small {
    font-family: 'Nunito', sans-serif;
    font-size: 7.6pt;
    font-weight: 700;
    opacity: 0.92;
}

.sd-rubric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.sd-rubric-cell {
    border-right: 1.2px solid var(--theme-border);
    padding: 3.5px 6px 5px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: background 0.15s;
}

.sd-rubric-cell:last-child {
    border-right: none;
}

.sd-rubric-cell span {
    font-size: 8pt;
    font-weight: 900;
    color: var(--theme-dark);
}

.sd-rubric-check {
    width: 16px;
    height: 16px;
    border: 1.5px solid #94a3b8;
    border-radius: 4px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10pt;
    font-weight: 900;
    color: #ffffff;
}

.sd-rubric-cell.active {
    background: var(--theme-light);
}

.sd-rubric-cell.active .sd-rubric-check {
    background: var(--theme-main);
    border-color: var(--theme-main);
}

.sd-rubric-cell.active .sd-rubric-check::after {
    content: "✓";
}

@media print {
    body.sd-with-ysm {
        background: #ffffff !important;
    }
    .a4-page.sd-v2 {
        padding: 7mm 9.5mm 6mm 9.5mm !important;
    }
}

/* Mobil ve Tablet Uyumluluğu */
@media screen and (max-width: 820px) {
    html,
    body,
    body.sd-with-ysm {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    .sd-toolbar {
        padding: 8px 10px !important;
        max-width: 100vw;
        box-sizing: border-box;
    }
    .sd-toolbar-inner,
    .sd-toolbar-left,
    .sd-toolbar-right {
        flex-wrap: wrap !important;
        justify-content: center;
        gap: 6px;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .sd-QuickSwitcher-wrap,
    .sd-select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    .sd-btn,
    .sd-back-btn,
    .sd-score-pill {
        font-size: 12px !important;
        padding: 6px 10px !important;
        white-space: nowrap;
    }
    .sd-workspace {
        padding: 10px 8px 28px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .sheet,
    .a4-page,
    .a4-page.sd-v2 {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        padding: 12px !important;
        box-sizing: border-box;
        overflow: hidden;
    }
    .ws-header,
    .ws-title-block,
    .ws-student-box,
    .sd-v2-body,
    .sd-task,
    .sd-task-title {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    .ws-eyebrow,
    .ws-Curriculum-pill {
        flex-wrap: wrap !important;
        white-space: normal !important;
        max-width: 100%;
    }
    .sd-task-head,
    .sd-choice-row,
    .sd-v2-minihead,
    .sd-rubric-head {
        flex-wrap: wrap;
        gap: 5px;
    }
    .sd-blank.lg,
    .sd-blank.xl {
        min-width: 72px !important;
        max-width: 100%;
    }
    .quiz-grid-2, .mc-grid, .fivew-grid, .tymm-open-grid, .activity-grid-2, .activity-grid-3, .activity-grid-4,
    .sd-grid-2, .sd-grid-3, .sd-grid-4, .sd-grid-5, .sd-match-grid, .sd-work-grid, .sd-poem-verses, .sd-rubric-grid, .sd-reason-wrap {
        grid-template-columns: 1fr !important;
        flex-direction: column;
    }
    .sd-reason-wrap > div,
    .sd-reason-wrap > .sd-pic-card,
    .sd-story-box,
    .sd-poem-box {
        width: 100% !important;
        flex-direction: column;
        align-items: stretch;
        box-sizing: border-box;
    }
    .sd-story-box img,
    .sd-poem-box img {
        margin: 0 auto;
    }
    .sd-table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }
    .quiz-card.full-width, .mc-card.full-width, .tymm-open-card.full-span {
        grid-column: span 1;
    }
    .student-info-bar, .ws-brand-row {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }
}
