/* Lehrer-Bereich – nur Ergänzungen zum Design-System (css/style.css). */
[hidden] { display: none !important; }

.page--lehrer {
  --l-line: var(--line, rgba(80, 60, 40, .14));
  --l-soft: var(--surface-soft, #f7efe3);
  --l-card: var(--surface, #fffdf9);
  --l-err: var(--rose-deep, #a9494e);
  --l-err-bg: var(--rose-soft, #f9e3e2);
  --l-ok: var(--sage-deep, #4f7d48);
  --l-ok-bg: var(--sage-soft, #e6efdf);
  --l-warn: var(--honey-deep, #8a6a14);
  --l-warn-bg: var(--honey-soft, #fbf1d3);
}
.page--lehrer .container { max-width: 1200px; }
.brand__sub { font-weight: 400; font-size: .8em; }
.who { font-size: .9rem; max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .who, .brand__sub { display: none !important; } }

.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.text-err { color: var(--l-err); }
.text-warn { color: var(--l-warn); }
.hint { background: var(--l-warn-bg); border-radius: 12px; padding: .6rem .8rem; font-size: .92rem; margin: 0; display: block; }
.form-error { color: var(--l-err); background: var(--l-err-bg); border-radius: 12px; padding: .6rem .8rem; margin: 0; }
.row--end { justify-content: flex-end; }
.row--wrap { flex-wrap: wrap; }
.linkbtn {
  background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(0, 0, 0, .25); text-underline-offset: 3px; text-align: left;
}
.linkbtn:hover, .linkbtn:focus-visible { text-decoration-color: currentColor; }

/* ---------- Login ---------- */
.login { max-width: 460px; margin: 2rem auto; display: grid; gap: 1rem; }
.login__card .btn { width: 100%; }

/* ---------- Kopf ---------- */
.greeting { margin: 0 0 .75rem; }
.greeting .bubble__text { font-size: 1rem; }
.greeting .mascot { align-items: center; }
.tabs { flex-wrap: wrap; margin-bottom: 1rem; }
.tabpanel { padding-bottom: 3rem; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .5rem 0 1rem; }
.toolbar .spacer, .row .spacer { flex: 1 1 auto; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip--static { cursor: default; pointer-events: none; }
.seg { display: flex; gap: .4rem; }
.page--lehrer .field.field--inline { display: flex; flex-direction: row; align-items: center; gap: .5rem; margin: 0; }
.field--inline > span { white-space: nowrap; font-weight: 600; }
.field--inline .input, .field--inline .select { width: auto; min-width: 0; }
.input--search { max-width: 280px; }
.section-title { font-size: 1.2rem; margin: 1.5rem 0 .6rem; }
.legend { margin-top: .8rem; }
.empty__icon { font-size: 2.5rem; margin: 0 0 .3rem; line-height: 1; }
.empty { text-align: center; }

/* ---------- Avatare ---------- */
.avatar {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; font-size: 1.6rem; line-height: 1;
  border-radius: 50%; background: var(--l-soft); border: 1px solid var(--l-line); flex: none;
}
.avatar--sm { width: 1.9rem; height: 1.9rem; font-size: 1.15rem; }
.avatar--lg { width: 3.6rem; height: 3.6rem; font-size: 2.3rem; }

/* ---------- Übersicht ---------- */
.weeknav { display: flex; align-items: center; gap: .4rem; }
.weeknav__label { text-align: center; line-height: 1.2; min-width: 9rem; font-size: .95rem; }

.student-cards { align-items: stretch; }
.sc { display: flex; flex-direction: column; gap: .5rem; }
.sc__head { display: flex; align-items: center; gap: .6rem; }
.sc__name { font-size: 1.1rem; flex: 1; }
.sc__now { margin: 0; font-size: .95rem; }
.sc__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: auto; text-align: center; }
.sc__stats > div { display: flex; flex-direction: column; background: var(--l-soft); border-radius: 12px; padding: .4rem .2rem; font-size: .78rem; line-height: 1.2; }
.sc__num { font-size: 1.35rem; font-weight: 700; color: inherit; }
.sc__num small { font-size: .8rem; font-weight: 400; opacity: .7; }
.sc__num.text-err { color: var(--l-err); }

.mx-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; border: 1px solid var(--l-line); background: var(--l-soft); }
.mx { border-collapse: separate; border-spacing: 0; width: 100%; min-width: max-content; margin: 0; }
.mx th, .mx td { padding: .45rem; border-bottom: 1px solid var(--l-line); vertical-align: top; text-align: left; }
.mx tbody tr:last-child > * { border-bottom: 0; }
.table.mx th { text-transform: none; letter-spacing: 0; font-size: .9rem; color: inherit; }
.mx__task { width: 175px; min-width: 175px; max-width: 175px; white-space: normal !important; line-height: 1.3; vertical-align: bottom !important; }
.table.mx tbody tr td { background: transparent; }
.mx__corner, .mx__student { position: sticky; left: 0; background: var(--l-card); z-index: 1; white-space: nowrap; }
.mx__student { font-weight: 600; vertical-align: middle; }
.mx__cell--late { background: var(--l-err-bg); }
.mx__btn {
  display: flex; flex-direction: column; gap: .3rem; width: 100%; min-height: 48px; text-align: left;
  background: var(--l-card); border: 1px solid var(--l-line); border-radius: 12px;
  padding: .45rem .55rem; font: inherit; font-size: .85rem; color: inherit; cursor: pointer;
}
.mx__btn:hover, .mx__btn:focus-visible { border-color: currentColor; }
.mx__btn--faint { opacity: .55; min-height: 0; }
.mx__btn .badge { align-self: flex-start; }
.mx__btn .progress, .mx__btn .progress__bar { display: block; }
.mx__btn .progress { width: 100%; height: 10px; }
.mx__meta { display: flex; justify-content: space-between; gap: .5rem; }
.mx__err { color: var(--l-err); font-weight: 700; }
.mx__due { font-size: .78rem; opacity: .85; }
.mx__due--late { color: var(--l-err); font-weight: 700; opacity: 1; }
.mx__cell--none { vertical-align: middle; text-align: center; }

/* Detail einer Zuweisung */
.detail__head { display: flex; gap: .8rem; align-items: center; padding-right: 3rem; }
.detail__head .card__title { margin: 0; }
.detail__head p { margin: .1rem 0 0; }
.detail__facts { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; }
.detail__actions { border-top: 1px solid var(--l-line); padding-top: .8rem; align-items: center; gap: .6rem; }
.table-wrap { overflow-x: auto; }
.answers { width: 100%; }
.answers td, .answers th { padding: .45rem .5rem; vertical-align: top; }
.table.answers tbody tr.ans--wrong td { background: var(--l-err-bg); }
.table.answers tbody tr.ans--retry td { background: var(--l-warn-bg); }
.try { display: inline-block; padding: .05rem .45rem; border-radius: 8px; font-weight: 600; margin: .1rem 0; }
.try--wrong { background: var(--l-err-bg); color: var(--l-err); text-decoration: line-through; text-decoration-thickness: 1px; }
.try--ok { background: var(--l-ok-bg); color: var(--l-ok); }

/* ---------- Aufgaben-Liste ---------- */
.list { display: flex; flex-direction: column; gap: .6rem; }
.list__item { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; padding: .8rem 1rem; }
.task-row__icon, .doc-row__icon { font-size: 1.9rem; line-height: 1; flex: none; width: 2.4rem; text-align: center; }
.task-row__main, .doc-row__main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.task-row__title, .doc-row__title { font-weight: 700; font-size: 1.08rem; }
.task-row__meta { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; font-size: .88rem; }
.task-row__meta .chip { min-height: 0; padding: .1rem .6rem; font-size: .82rem; }
.task-row__who { display: flex; flex-wrap: wrap; gap: .3rem; }
.mini { font-size: .8rem; border-radius: 999px; padding: .05rem .5rem; background: var(--l-soft); border: 1px solid var(--l-line); }
.mini--erledigt { background: var(--l-ok-bg); }
.mini--begonnen { background: var(--l-warn-bg); }
.task-row__actions, .doc-row__actions, .student__actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Modal ---------- */
.lehrer-modal {
  position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-start; justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) .75rem 1rem; overflow-y: auto; background: rgba(40, 30, 20, .45);
}
.lehrer-modal .modal__box { position: relative; width: min(560px, 100%); margin: auto 0; max-height: none; }
.lehrer-modal .modal__box--wide { width: min(1120px, 100%); }
.modal__close { position: absolute; top: .6rem; right: .6rem; z-index: 2; }
body.has-modal { overflow: hidden; }
.confirm__text { font-size: 1.1rem; margin: .5rem 2.5rem .5rem 0; }

/* ---------- Editor ---------- */
.editor .card__title { padding-right: 3rem; }
.editor__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.editor__pair { gap: .8rem; }
.editor__pair > .field { flex: 1 1 200px; margin: 0; }
.page--lehrer .field > span:first-child { font-weight: 700; font-size: .95rem; }
.field--inline > span:first-child { white-space: nowrap; }
.textarea--code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; line-height: 1.45; min-height: 12rem; }
.editor__preview { position: sticky; top: 0; }
.editor__previewlabel { font-weight: 700; margin: 0 0 .4rem; }
@media (max-width: 860px) {
  .editor__cols { grid-template-columns: 1fr; }
  .editor__preview { position: static; }
}

.pv__status { border-radius: 12px; padding: .5rem .8rem; margin-bottom: .6rem; background: var(--l-soft); font-weight: 600; }
.pv__status--ok { background: var(--l-ok-bg); color: var(--l-ok); }
.pv__status--warn { background: var(--l-warn-bg); color: var(--l-warn); }
.pv__problems { margin: .3rem 0 0; padding-left: 1.2rem; font-weight: 400; font-size: .9rem; }
.pv__screen {
  border: 2px dashed var(--l-line); border-radius: 18px; padding: .9rem; background: var(--l-card);
  max-height: 62vh; overflow-y: auto; display: flex; flex-direction: column; gap: .7rem;
}
.pv__title { font-weight: 700; font-size: 1.1rem; margin: 0; }
.pv__intro { margin: 0; }
.pv__item { border-bottom: 1px solid var(--l-line); padding-bottom: .6rem; }
.pv__item:last-child { border-bottom: 0; }
.pv__q { margin: 0 0 .4rem; line-height: 1.9; }
.pv__opts { display: flex; flex-wrap: wrap; gap: .4rem; }
.pv__opts .option { min-height: 40px; padding: .3rem .8rem; cursor: default; width: auto; display: inline-flex; align-items: center; gap: .3rem; }
.pv__right { outline: 2px dashed var(--l-ok); outline-offset: 1px; }
.pv__tick { color: var(--l-ok); font-weight: 700; }
.pv__gap { display: inline-block; min-width: 4em; padding: 0 .5em; border-bottom: 2px solid currentColor; color: var(--l-ok); font-weight: 600; line-height: 1.5; }
.pv__cards { display: flex; flex-wrap: wrap; gap: .4rem; }
.pv__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; }
.pv__group { border: 2px solid var(--l-line); border-radius: 14px; padding: .5rem; min-height: 4rem; display: flex; flex-direction: column; gap: .2rem; }
.pv__type { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; background: var(--l-soft); border-radius: 10px; padding: .4rem .7rem; letter-spacing: .05em; }
.pv__steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
.pv__circle { color: var(--l-ok); font-weight: 700; }

/* Zuweisen */
.assign { margin-top: 1.2rem; padding: 1rem; border-radius: 18px; border: 1px solid var(--l-line); }
.assign__title { margin: 0 0 .6rem; }
.assign__tools { align-items: center; gap: .6rem; }
.assign__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .5rem; margin-top: .6rem; }
.assign__row { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 12px; border: 1px solid var(--l-line); background: var(--l-card); }
.assign__row--on { border-color: var(--l-ok); background: var(--l-ok-bg); }
.assign__row .check { flex: 1; display: flex; align-items: center; gap: .45rem; min-height: 44px; cursor: pointer; margin: 0; }
.assign__row .check input { width: 1.4rem; height: 1.4rem; flex: none; }
.input--date { width: auto; max-width: 10.5rem; padding-left: .4rem; padding-right: .4rem; }
.input--date:disabled { opacity: .35; }
.editor__foot { margin-top: 1rem; align-items: center; gap: .6rem; }

/* Vorlagen */
.vlist { display: flex; flex-direction: column; gap: .5rem; max-height: 60vh; overflow-y: auto; }
.vlist__item { display: flex; gap: .8rem; align-items: center; padding: .7rem .9rem; }
.vlist__instr { opacity: .8; margin-top: .2rem; }

/* ---------- Schüler ---------- */
.students { align-items: stretch; }
.student { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.student__main { flex: 1 1 120px; display: flex; flex-direction: column; min-width: 0; }
.student__name { font-size: 1.15rem; }
.student__actions { flex-basis: 100%; }

.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .4rem; }
.emoji-grid--code { grid-template-columns: repeat(6, 1fr); }
.emoji-btn {
  min-height: 52px; font-size: 1.8rem; line-height: 1; border-radius: 14px; border: 2px solid var(--l-line);
  background: var(--l-card); cursor: pointer; padding: .2rem;
}
.emoji-btn:active { transform: scale(.94); }
.emoji-btn--on { border-color: var(--l-ok); background: var(--l-ok-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--l-ok) 25%, transparent); }
.code-picker { display: flex; flex-direction: column; gap: .6rem; }
.code-slots { display: flex; gap: .6rem; justify-content: center; }
.code-slot {
  width: 4rem; height: 4rem; border-radius: 16px; border: 3px dashed var(--l-line); display: grid; place-items: center;
  font-size: 2.4rem; background: var(--l-card);
}
.code-slot--filled { border-style: solid; border-color: var(--l-ok); }

.codeonce__card {
  display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.2rem; border-radius: 20px;
  background: var(--l-soft); border: 2px solid var(--l-line);
}
.codeonce__name { font-size: 1.5rem; }
.codeonce__code { display: flex; gap: .8rem; font-size: 4rem; line-height: 1.1; }
.codeonce__code span { background: var(--l-card); border-radius: 18px; padding: .2rem .5rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }

/* ---------- Dokumente ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center;
  padding: 1.4rem 1rem; border: 3px dashed var(--l-line); border-radius: 20px; cursor: pointer; min-height: 120px;
  transition: background .15s, border-color .15s;
}
.dropzone__icon { font-size: 2.2rem; line-height: 1; }
.dropzone--over, .dropzone:focus-visible { border-color: var(--l-ok); background: var(--l-ok-bg); outline: none; }
.staged { margin-top: 1rem; }
.staged__list { display: flex; flex-direction: column; gap: .4rem; }
.staged__row { display: flex; align-items: center; gap: .6rem; }
.staged__title { flex: 1; margin: 0; }
.docgroup .section-title { margin-top: 1.2rem; }
.doc-row__main .muted { word-break: break-word; }

/* ---------- Drucken: Login-Karte ---------- */
#print-area { display: none; }
@media print {
  body.printing-card > *:not(#print-area) { display: none !important; }
  body.printing-card #print-area { display: block !important; }
  body.printing-card { background: #fff !important; }
}
.login-card {
  width: 85mm; margin: 10mm auto; padding: 8mm; border: 2px dashed #999; border-radius: 6mm; text-align: center;
  font-family: system-ui, sans-serif; color: #222; display: flex; flex-direction: column; gap: 2.5mm; break-inside: avoid;
}
.login-card__brand { font-weight: 700; font-size: 14pt; }
.login-card__avatar { font-size: 40pt; line-height: 1; }
.login-card__name { font-size: 22pt; font-weight: 700; }
.login-card__label { font-size: 11pt; }
.login-card__code { display: flex; justify-content: center; gap: 4mm; font-size: 34pt; line-height: 1.1; }
.login-card__code span { border: 1px solid #ccc; border-radius: 4mm; padding: 1mm 2mm; }
.login-card__url { font-size: 9pt; word-break: break-all; }
.login-card__tip { font-size: 8.5pt; color: #555; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .toolbar { gap: .5rem; }
  .input--search { max-width: none; flex: 1 1 100%; }
  .weeknav__label { min-width: 7rem; }
  .detail__actions .spacer { display: none; }
}
.assign__all { display: flex; gap: .3rem; }
.table.mx { overflow: visible; border: 0; border-radius: 0; background: transparent; }
.student__actions { gap: .25rem; } .student__actions .btn { padding-left: .75rem; padding-right: .75rem; }

/* ---------- Dokumente: Ordner-Baum, Filter, Zusatzinfos ---------- */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1rem; }
.docs__tree { display: flex; flex-direction: column; gap: .15rem; padding: .6rem; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; }
.tree__item { display: flex; align-items: center; gap: .4rem; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px;
  padding: .55rem .7rem; font: inherit; font-weight: 600; color: inherit; cursor: pointer; min-height: 44px; }
.tree__item:hover { background: color-mix(in srgb, var(--l-ok-bg, #e6efdf) 70%, transparent); }
.tree__item--on { background: var(--l-ok-bg, #e6efdf); color: var(--l-ok, #4f7d48); }
.tree__item--sub { font-weight: 500; padding-left: 1.6rem; font-size: .95rem; }
.tree__n { margin-left: auto; font-size: .8rem; opacity: .65; font-weight: 600; }
.tree__sep { height: 1px; background: var(--line, #ebe0d1); margin: .35rem .3rem; }
.docs__search .input { width: 100%; font-size: 1.05rem; }
.docs__filters { gap: .5rem; }
.select--small { min-height: 42px; padding-top: .35rem; padding-bottom: .35rem; font-size: .92rem; width: auto; }
.docs__count { margin: 0; }
.doc-row__badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .15rem; }
.doc-row__badges .badge { font-size: .76rem; }
.badge--cycle { background: var(--sky-soft, #e0eef7); }
.badge--foerder { background: var(--rose-soft, #f9e3e2); }
.tag { border: 0; background: var(--honey-soft, #fbf1d3); border-radius: 999px; padding: .1rem .55rem; font: inherit; font-size: .76rem; cursor: pointer; color: inherit; }
.tag:hover { filter: brightness(.95); }
.doc-row__note { opacity: .8; }
.doc-fav { font-size: 1.15rem; }
.doc-fav--on { color: #c99a1a; }
.metaform__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: .75rem; }
.metaform .chips { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (max-width: 820px) {
  .docs { grid-template-columns: 1fr; }
  .docs__tree { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .tree__item { width: auto; }
  .tree__item--sub { padding-left: .7rem; }
  .tree__sep { display: none; }
}
.docs__search .input.input--search { width: 100%; max-width: none; flex: 1 1 auto; }

.not-teacher { border: 2px solid var(--peach, #f4a261); background: var(--peach-soft, #fde8d7); margin-bottom: 1rem; }
.not-teacher__sql { white-space: pre-wrap; word-break: break-all; background: #fffdf9; border-radius: 10px; padding: .75rem 1rem; font-size: .9rem; margin: 0; user-select: all; }

.mission-setup__row { align-items: center; gap: .6rem; }
.mission-setup__name { min-width: 7rem; }

/* ---------- Digitales Lehrerheft ---------- */
.heft h3 { margin: 0 0 .4rem; font-size: 1.02rem; }
.heft__lead { font-size: 1.05rem; margin: 0; }
.heft__tabs { flex-wrap: wrap; }
.heft__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: .8rem; }
.heft__list { margin: 0; padding-left: 1.1rem; }
.heft__list li { margin: .2rem 0; }
.heft__table td, .heft__table th { vertical-align: top; text-align: left; }
.heft__code { font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.heft__vault { margin: 0; font-size: 1.15rem; background: #fdf3d4; border: 2px solid #f0bf2c; border-radius: 14px; padding: .5rem 1rem; width: max-content; max-width: 100%; }
.heft__tanne { border-left: 5px solid #3f8f4a; }
.heft__schnee { border-left: 5px solid #3f7fb8; }
.heft__hint { margin: 0; background: #e1eef8; border-radius: 12px; padding: .6rem .9rem; }
.heft__pvrow { gap: .5rem; align-items: center; }
.heft__scroll { overflow-x: auto; }
.heft__ablauf th:nth-child(3), .heft__ablauf th:nth-child(4) { min-width: 9rem; }
.heft__solutions summary { cursor: pointer; padding: .2rem 0; }
.heft__solutions[open] summary { margin-bottom: .6rem; }
.heft .check { display: flex; gap: .5rem; align-items: flex-start; margin: .25rem 0; }
@media print {
  body.printing-heft > *:not(.lehrer-modal) { display: none !important; }
  body.printing-heft .lehrer-modal { position: static; background: none; padding: 0; }
  body.printing-heft .modal__box { box-shadow: none; max-width: none; max-height: none; overflow: visible; }
  body.printing-heft .no-print, body.printing-heft .modal__close, body.printing-heft .heft__pvrow { display: none !important; }
}

/* Bildimpuls im Editor / Vorschau / Detail */
.ed-bild { border-top: 1px dashed var(--line, #ebe0d1); padding-top: .8rem; }
.ed-bild__prev { max-width: 220px; max-height: 220px; border-radius: 12px; border: 1px solid var(--line, #ebe0d1); margin-top: .4rem; }
.pv__img { display: block; max-width: 100%; max-height: 260px; margin: 0 auto .6rem; border-radius: 10px; }
.try--open { background: #eef5f9; border-radius: 8px; padding: .15rem .5rem; white-space: pre-wrap; display: inline-block; }
.detail__lehrer { background: #fdf3d4; border: 1.5px solid #f0bf2c; border-radius: 12px; padding: .6rem .9rem; white-space: pre-wrap; }

.tview__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 800px) { .tview__cols { grid-template-columns: 1fr; } }
.tview__img { width: 100%; border-radius: 12px; border: 1px solid var(--line, #ebe0d1); background: #fff; }
.tview h3 { margin: 0 0 .4rem; font-size: 1rem; }
.tview__lightbox { position: fixed; inset: 0; z-index: 2000; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; }
.tview__lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; }
