/* Every selector belongs to this feature; no global gallery or modal rules. */
.tm-instruction-heading{display:flex;align-items:start;gap:12px;justify-content:space-between}.tm-instruction-heading h3{margin:0}
.tm-instruction-count{display:inline-grid;place-items:center;min-width:27px;height:27px;border-radius:50%;background:var(--paper,#f4ecdd);color:var(--muted,#64675b);font:13px/1 var(--sans,Arial)}
.tm-instruction-panel .tm-instruction-intro{font-size:var(--p3,13px);line-height:var(--lh-p3,1.5);margin:12px 0 17px;color:var(--muted,#64675b)}
.tm-instruction-grid{grid-template-columns:none;max-height:none}.tm-instruction-grid .tm-instruction-caption{-webkit-line-clamp:3;min-height:2.8em}
.tm-instruction-thumb{display:block;min-width:0;color:inherit;text-decoration:none}.tm-instruction-preview{display:grid;place-items:center;aspect-ratio:4/3;overflow:hidden;border:1px solid var(--line,#ded6c6);border-radius:7px;background:#fff}
.tm-instruction-preview img{width:100%;height:100%;object-fit:contain;transition:transform .2s}
.tm-instruction-thumb:hover .tm-instruction-preview{border-color:var(--accent,#af7e3d)}.tm-instruction-thumb:hover img{transform:scale(1.025)}
.tm-instruction-caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font:var(--p3,13px)/var(--lh-p3,1.5) var(--sans,Arial);margin-top:7px;overflow-wrap:anywhere}
.tm-instruction-thumb:focus-visible{outline:2px solid var(--accent,#af7e3d);outline-offset:3px;border-radius:7px}
.tm-instruction-dialog{width:min(1180px,calc(100% - 32px));max-height:94dvh;padding:24px;border:1px solid var(--line,#ded6c6);border-radius:12px;background:var(--surface,#fbf6ea);color:var(--ink,#171a14);overflow:auto}
.tm-instruction-dialog::backdrop{background:#101b15cc;backdrop-filter:blur(4px)}
.tm-instruction-dialog .tm-instruction-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:15px}
.tm-instruction-dialog .tm-instruction-dialog-head h2.tm-instruction-dialog-title[data-instruction-title]{font:700 25px/1.3 var(--serif,Georgia);margin:0}
.tm-instruction-dialog .tm-instruction-view{display:grid;place-items:center;min-height:240px;background:#fff;border:1px solid var(--line,#ded6c6);border-radius:8px;overflow:hidden}
.tm-instruction-dialog .tm-instruction-view img{display:block;width:auto;max-width:100%;height:auto;max-height:calc(94dvh - 230px);object-fit:contain}
.tm-instruction-dialog .tm-instruction-dialog-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}
.tm-instruction-dialog .tm-instruction-actions,.tm-instruction-dialog .tm-instruction-pager{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tm-instruction-dialog .tm-instruction-status{font-size:13px;color:var(--muted,#64675b);min-height:18px;margin:7px 0 0}
[data-tm-instruction]{scroll-margin-top:35px}
@media(max-width:700px){.tm-instruction-dialog{padding:16px}.tm-instruction-dialog .tm-instruction-dialog-head h2.tm-instruction-dialog-title[data-instruction-title]{font-size:21px}.tm-instruction-dialog .tm-instruction-dialog-foot{align-items:start;flex-direction:column}.tm-instruction-dialog .tm-instruction-view img{max-height:calc(94dvh - 290px)}.tm-instruction-dialog .button{font-size:13px;white-space:normal}}
@media(prefers-reduced-motion:reduce){.tm-instruction-preview img{transition:none}.tm-instruction-thumb:hover img{transform:none}}
@media print{.tm-instruction-panel,.tm-instruction-dialog{display:none!important}}
