/* Teacher Zone (/teachers/* and /chs/teachers/*) — screen preview + print sheets */

.tz-hero {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 40%),
        linear-gradient(135deg, #7c2d12 0%, #b45309 55%, #d97706 100%);
}

.tz-hero .hero-kicker { letter-spacing: 0.14em; opacity: 0.82; }
.tz-hero .hero-copy { max-width: 44rem; opacity: 0.94; }

/* ── worksheet pages (screen preview mimics paper; print = the real thing) ── */
.tz-page {
    background: #fff;
    color: #111;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    padding: 1.6rem 1.8rem;
    margin: 0 auto 1.25rem;
    max-width: 51rem;
    overflow-x: auto;
}

[data-bs-theme="dark"] .tz-page {
    border-color: #555;
}

.tz-sheet-title {
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.35rem;
}

.tz-name-date {
    font-size: 0.85rem;
    color: #333;
    text-align: right;
    margin-bottom: 0.9rem;
}

.tz-credit {
    margin-top: 1.1rem;
    font-size: 0.7rem;
    color: #888;
    text-align: center;
}

.tz-note { font-size: 0.85rem; color: #333; }

.tz-hanzi {
    font-family: "KaiTi", "STKaiti", "Kaiti SC", "Kaiti TC", "DFKai-SB", "BiauKai", "SimSun", "Songti SC", serif;
}

.tz-cols-2 { columns: 2; }
.tz-cols-3 { columns: 3; }

.tz-key-list li { margin-bottom: 0.2rem; font-size: 0.9rem; break-inside: avoid; }

/* bingo */
.tz-bingo-card { break-inside: avoid; margin-bottom: 1.4rem; }
.tz-bingo-no { font-size: 0.8rem; color: #555; margin-bottom: 0.2rem; }
.tz-bingo { border-collapse: collapse; margin: 0 auto; width: 100%; table-layout: fixed; }
.tz-bingo td {
    border: 2px solid #222;
    text-align: center;
    vertical-align: middle;
    padding: 0.3rem 0.2rem;
    height: 4.4rem;
    overflow: hidden;
}
.tz-bingo-3 td { height: 5.4rem; }
.tz-bingo .tz-bingo-w { font-size: 1.25rem; line-height: 1.15; }
.tz-bingo-3 .tz-bingo-w, .tz-bingo-4 .tz-bingo-w { font-size: 1.5rem; }
.tz-bingo .tz-bingo-s { font-size: 0.72rem; color: #444; }
.tz-bingo .tz-bingo-free { font-weight: 800; letter-spacing: 0.1em; background: #f0f0f0; }

/* word search */
.tz-ws { border-collapse: collapse; margin: 0 auto; }
.tz-ws td {
    border: 1px solid #999;
    width: 1.9rem;
    height: 1.9rem;
    text-align: center;
    vertical-align: middle;
    font-size: 1rem;
    padding: 0;
}
.tz-ws.tz-hanzi td { width: 2.1rem; height: 2.1rem; font-size: 1.15rem; }
.tz-ws .tz-ws-hit { background: #ffe9a8; font-weight: 700; }
.tz-ws-words { list-style: none; padding-left: 0; font-size: 0.85rem; }
.tz-ws-words li { break-inside: avoid; margin-bottom: 0.15rem; }

/* crossword */
.tz-cw { border-collapse: collapse; margin: 0 auto; }
.tz-cw td { width: 1.75rem; height: 1.75rem; padding: 0; text-align: center; vertical-align: middle; position: relative; font-size: 0.95rem; font-weight: 600; }
.tz-cw .tz-cw-cell { border: 1px solid #222; background: #fff; }
.tz-cw .tz-cw-void { border: 0; background: transparent; }
.tz-cw .tz-cw-num { position: absolute; top: 0; left: 1px; font-size: 0.5rem; font-weight: 400; line-height: 1; }
.tz-cw-clues { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 0.9rem; }
.tz-cw-cluecol { flex: 1 1 16rem; }
.tz-cw-cluelist { list-style: none; padding-left: 0; font-size: 0.85rem; margin-bottom: 0; }
.tz-cw-cluelist li { margin-bottom: 0.15rem; }

/* matching */
.tz-match { width: 100%; border-collapse: collapse; }
.tz-match td { padding: 0.45rem 0.3rem; font-size: 1.05rem; vertical-align: middle; }
.tz-match-left { width: 34%; }
.tz-match-left .tz-hanzi { font-size: 1.35rem; }
.tz-match-gap { width: 26%; }
.tz-match-right { width: 40%; }
.tz-match-no { color: #555; font-size: 0.85rem; }

/* foldable flashcards */
.tz-fc { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tz-fc td { border: 1.5px solid #222; height: 5.2rem; text-align: center; vertical-align: middle; padding: 0.4rem; overflow: hidden; }
.tz-fc .tz-fc-front { border-right: 2px dashed #888; font-size: 2rem; }
.tz-fc .tz-fc-s { font-size: 0.95rem; color: #333; }
.tz-fc .tz-fc-e { font-size: 1.05rem; }

/* dictation */
.tz-dict { width: 100%; border-collapse: collapse; }
.tz-dict td { padding: 0.5rem 0.35rem; vertical-align: middle; }
.tz-dict-no { width: 2.2rem; color: #555; }
.tz-dict-prompt { width: 34%; font-size: 1.05rem; }
.tz-dict-boxes { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.tz-dict-box { display: inline-block; width: 2.6rem; height: 2.6rem; border: 1.5px solid #444; background:
    linear-gradient(to right, transparent calc(50% - 0.5px), #ddd calc(50% - 0.5px), #ddd calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), #ddd calc(50% - 0.5px), #ddd calc(50% + 0.5px), transparent calc(50% + 0.5px)); }
.tz-dict-line { border-bottom: 1.5px solid #444; height: 2rem; }

/* sentence scramble */
.tz-scr-item { margin-bottom: 1.1rem; break-inside: avoid; }
.tz-scr-head { font-size: 0.95rem; margin-bottom: 0.35rem; }
.tz-scr-hint { color: #333; }
.tz-scr-tiles { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.tz-scr-tile { display: inline-flex; flex-direction: column; align-items: center; border: 1.5px solid #333; border-radius: 4px; padding: 0.25rem 0.55rem; }
.tz-scr-tile .tz-hanzi { font-size: 1.25rem; line-height: 1.2; }
.tz-scr-pinyin { font-size: 0.68rem; color: #444; }
.tz-scr-punct { justify-content: center; }

/* ── print: only the sheets, one .tz-page per paper page ── */
@media print {
    header, footer, nav, .footer, .no-print, .adsbygoogle, ins.adsbygoogle, .tz-screen-only { display: none !important; }
    main, .container, .container-fluid { margin: 0 !important; padding: 0 !important; max-width: 100% !important; width: 100% !important; }
    .row, [class*="col-"] { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; flex: none !important; display: block !important; }
    body { background: #fff !important; }
    .tz-page {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow: visible;
        page-break-after: always;
    }
    .tz-page:last-child { page-break-after: auto; }
    @page { margin: 12mm; }
}
