.tm-search-form { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; padding:8px 0; }
.tm-search-filter { display:flex; flex-direction:column; gap:5px; min-width:0; }
.tm-search-filter label { font-size:12px; line-height:1.4; color:#656565; }
.tm-search-form input[type=search] { flex:1 1 260px; width:auto; min-width:0; padding:9px; font-size:14px; }
.tm-search-form select { max-width:100%; padding:7px; font-size:13px; }
.tm-search-form .tm-first-only { display:inline-flex; align-items:center; gap:5px; margin:0; padding:8px 0; font-size:13px; line-height:1.5; }
.tm-first-only input { margin:0; }
.tm-results { list-style:none; margin:0; padding:0; }
.tm-result { padding:18px 20px; margin-bottom:10px; }
.tm-result h3 { border:0; margin:0 0 8px; padding:0; text-transform:none; font-size:17px; }
.tm-result-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; font-size:12px; color:#656565; margin:0 0 10px; }
.tm-result-meta > a, .tm-author-name { color:inherit; text-decoration:underline; text-underline-offset:3px; }
.tm-author { position:relative; display:inline-flex; align-items:center; gap:2px; }
.tm-author-toggle { display:none; border:0; padding:4px; background:transparent; color:inherit; cursor:pointer; font-size:14px; line-height:1; }
.tm-author-ready .tm-author-toggle { display:inline-flex; }
.tm-author-toggle:focus-visible { outline:2px solid #6d5833; outline-offset:2px; }
.tm-author-card { position:absolute; top:100%; left:0; z-index:20; width:276px; max-width:calc(100vw - 32px); padding:16px; box-sizing:border-box; background:#fffdf8; border:1px solid #b6aa96; border-radius:6px; box-shadow:0 6px 22px #0003; color:#49443b; line-height:1.6; }
.tm-author-card[hidden] { display:none; }
.tm-author-summary { display:flex; align-items:center; gap:12px; }
.tm-author-avatar { display:flex; justify-content:center; align-items:center; flex:0 0 56px; min-height:56px; font-size:32px; }
.tm-author-avatar img { max-width:56px; max-height:64px; width:auto; height:auto; }
.tm-author-avatar .icon { font-size:32px; }
.tm-author-card-name { display:block; overflow-wrap:anywhere; font-weight:bold; font-size:14px; }
.tm-author-stat { display:block; font-size:11px; }
.tm-author-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; }
.tm-author-actions .button { padding:6px 12px; }
.tm-result-excerpt { margin:0; line-height:1.8; overflow-wrap:anywhere; }
.tm-result-images { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.tm-result-images a { display:flex; align-items:center; justify-content:center; width:108px; height:82px; padding:4px; box-sizing:border-box; border:1px solid #c9c2b4; border-radius:4px; background:#fff; }
.tm-result-images a:hover, .tm-result-images a:focus { border-color:#6d5833; outline:2px solid #6d5833; outline-offset:1px; }
.tm-result-images img { display:block; max-width:100%; max-height:100%; width:auto; height:auto; }
.tm-result-links { display:flex; flex-wrap:wrap; gap:18px; margin-top:12px; font-size:12px; }
.tm-result-count { display:flex; justify-content:space-between; padding:5px; }
.tm-pages { margin:12px 0 16px; }
.tm-pages ul { display:flex; flex-wrap:wrap; gap:6px; align-items:center; list-style:none; margin:0; padding:0; }
.tm-pages .button { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-width:34px; min-height:34px; padding:5px 9px; }
.tm-pages .tm-page-current { background:#f8f6ee; border:2px solid #6d5833; color:#5d492c; font-weight:bold; cursor:default; box-shadow:none; text-shadow:none; }
.tm-page-ellipsis { padding:0 3px; }
.tm-link-broken { display:inline-block; font-size:11px; color:#8b2e24; background:#fff0ed; border:1px solid #e7c9c3; padding:1px 5px; border-radius:3px; vertical-align:baseline; }
.tm-author-materials { margin-top:8px; }
.postprofile .tm-author-materials { display:block; margin-top:12px; }
.postprofile .tm-materials-button { display:inline-flex; align-items:center; gap:5px; padding:7px 11px; font-size:13px; line-height:1.5; white-space:nowrap; }
.tm-topic-section { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; clear:both; margin:18px 0 10px; }
.tm-topic-section h2 { margin:0; padding:0; font-size:18px; }
.tm-topic-section h2 span { margin-left:12px; font-size:13px; font-weight:normal; color:#656565; }
.tm-topic-section-actions { display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
.tm-replies-section { padding-top:18px; margin-top:24px; border-top:1px solid #b6aa96; scroll-margin-top:16px; }
.tm-original-jump { font-size:13px; }
.tm-header-scope { max-width:160px; height:28px; vertical-align:middle; }
.tm-attachment-image { max-width:100%; height:auto; }
.postbody img.tm-topic-image-default { max-width:min(100%, 320px); max-height:220px; width:auto; height:auto; object-fit:contain; }
.postbody img.tm-topic-image-default.tm-image-expanded { max-width:100%; max-height:none; }
.nojs .postbody img.tm-topic-image-default { max-width:100%; max-height:none; }
.tm-image-frame { position:relative; display:inline-block; max-width:100%; vertical-align:top; margin:4px 8px 8px 0; line-height:0; }
.tm-image-frame > a { display:inline-block; max-width:100%; }
.tm-image-frame:focus-visible { outline:2px solid #6d5833; outline-offset:3px; }
.tm-image-frame img { transition:filter .15s; }
.tm-image-actions { position:absolute; inset:0; display:flex; flex-wrap:wrap; justify-content:center; align-content:center; align-items:center; gap:8px; padding:8px; box-sizing:border-box; opacity:0; pointer-events:none; font-size:12px; line-height:1.5; }
.tm-image-actions .button { background:#fffdf8; color:#493a23; border:1px solid #8b7959; text-shadow:none; box-shadow:0 2px 8px #0003; text-decoration:none; }
.tm-image-frame:hover img, .tm-image-frame:focus-visible img, .tm-image-frame:has(:focus-visible) img { filter:brightness(.76); }
.tm-image-frame:hover .tm-image-actions, .tm-image-frame:focus-visible .tm-image-actions, .tm-image-frame:has(:focus-visible) .tm-image-actions { opacity:1; }
.tm-image-frame:hover .tm-image-actions > *, .tm-image-frame:focus-visible .tm-image-actions > *, .tm-image-frame:has(:focus-visible) .tm-image-actions > * { pointer-events:auto; }
.postbody .content .tm-inline-image { display:inline-block; max-width:100%; vertical-align:top; margin:4px 12px 8px 0; }
.postbody dl.tm-image-file { display:inline-block; max-width:100%; vertical-align:top; }
.tm-result-images[hidden], .tm-result-images a[hidden] { display:none; }
@media (hover:none) {
    .tm-image-frame .tm-image-actions { opacity:1; inset:auto 0 0; padding:5px; background:#0005; }
    .tm-image-frame .tm-image-actions > * { pointer-events:auto; }
}
.tm-image-actions .button { padding:4px 10px; font-size:12px; }
@media print {
    .tm-image-actions { display:none; }
    .postbody img.tm-topic-image-default { max-width:100%; max-height:none; }
}
@media(max-width:600px) {
    .tm-search-form input[type=search] { flex-basis:100%; }
    .tm-search-form > select, .tm-search-filter { flex:1 1 110px; width:100%; }
    .tm-search-filter select { flex:none; width:100%; }
    .tm-search-form .tm-scope-filter { flex-basis:100%; }
    .tm-search-form .tm-first-only { flex-basis:100%; }
    .tm-result { padding:14px; }
    .tm-result h3 { font-size:15px; }
}

.postbody .tm-image-attachments { display:flex; flex-wrap:wrap; gap:8px 16px; float:none; }
.postbody .tm-image-attachments > dt { flex-basis:100%; }
.postbody .tm-image-attachments > dd { clear:none; max-width:100%; }
.postbody .tm-image-file dd { max-width:320px; overflow-wrap:anywhere; font-size:11px; }
@media print {
    .tm-image-frame img { filter:none; }
    .postbody .tm-inline-image, .postbody dl.tm-image-file { display:block; }
}
