.tl-directory,.tl-workspace,.tl-editor{margin:0 auto 3rem}
.tl-directory{max-width:1380px}
.tl-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:18px}
.tl-card{max-width:420px;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:white}
.tl-card a{display:block}.tl-card:hover,.tl-card:focus-within{border-color:#91999d}
.tl-cover{position:relative;background:#24252a;aspect-ratio:16/9}
.tl-cover img{width:100%;height:100%;object-fit:cover;display:block}
.tl-cover span{position:absolute;right:9px;bottom:9px;padding:2px 7px;border-radius:4px;background:#14151bde;color:white;font-size:12px;font-weight:600}
.tl-card-body{padding:14px 16px}.tl-card-body h2{font-size:20px;line-height:1.2;margin:4px 0 8px}.tl-card-body p,.tl-card-body small{margin:0;color:var(--muted)}
.tl-controls,.tl-row-actions,.tl-add,.tl-fields,.tl-swatches{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tl-toolbar .button-group a{display:flex;align-items:center;min-height:38px;padding:8px 13px;margin-left:-1px;border:1px solid var(--line);background:white;color:#59636b;font-size:14px;line-height:1.4}
.tl-toolbar .button-group a:first-child{margin-left:0;border-radius:2px 0 0 2px}
.tl-toolbar .button-group a:last-child{border-radius:0 2px 2px 0}
.tl-toolbar .button-group a:hover{background:#effbf8}
.tl-toolbar .button-group a.active{position:relative;background:var(--accent);border-color:var(--accent);color:#17483f;font-weight:600}
.tl-toolbar .button-group a:focus-visible{z-index:1}
@media(max-width:680px){
 .tl-toolbar .button-group a{min-height:39px;padding:8px 11px;font-size:13px}
 .tl-toolbar .search{flex-basis:100%}
}
.tl-workspace{max-width:1080px;--tile:clamp(49px,5.1vw,65px)}
.tl-back{display:inline-block;font-weight:600;color:var(--muted);font-size:13px;margin:0 0 12px}
.tl-related{margin-left:14px;color:var(--accent-dark)}
.tl-intro{border-bottom:1px solid var(--line);padding-bottom:16px;margin-bottom:16px}
.tl-intro h1,.tl-editor h1{font-size:clamp(25px,3.7vw,40px);line-height:1.12;letter-spacing:-.035em;margin:0 0 8px;overflow-wrap:anywhere}
.tl-intro p{color:#4d555c;line-height:1.45;margin:0 0 5px;white-space:pre-line;overflow-wrap:anywhere}
.tl-intro small,.tl-hint,#tl-progress,.tl-editor small{font-size:13px;color:var(--muted)}
.tl-editions{margin-top:8px;font-size:13px}
.tl-editions summary{cursor:pointer;font-weight:600}
.tl-editions ul{display:flex;flex-wrap:wrap;gap:6px 16px;margin:6px 0 0;padding:0;list-style:none}
.tl-editions a{text-decoration:underline}
.tl-board-head,.tl-tray-head,.tl-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tl-board-head{margin-bottom:8px;flex-wrap:wrap}.tl-workspace h2,.tl-editor h2{font-size:20px;line-height:1.2;margin:0;letter-spacing:-.025em}
.tl-board-head h2{margin-right:auto}
.tl-preset{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600}
.tl-preset .field{width:auto;padding:5px 8px;font-weight:400}
#tl-board{--tier-row-min:80px}
#tl-rows{overflow:hidden;border:2px solid #191a1e;border-radius:8px}
.tl-row{display:grid;grid-template-columns:clamp(52px,8vw,93px) minmax(0,1fr) 36px;min-height:var(--tier-row-min,var(--tile));border-bottom:2px solid #121316}
.tl-row:last-child{border:0}
.tl-row button,.tl-tile{border-radius:0}
.tl-label{border:0;border-right:2px solid #15161b;font-size:clamp(17px,2.3vw,25px);font-weight:700;line-height:1.1;word-break:break-word;padding:4px}
.tl-label.tl-label-text{font-size:clamp(12px,1.45vw,16px);line-height:1.15}
.tl-items,#tl-pool{display:flex;align-content:flex-start;align-items:flex-start;flex-wrap:wrap;min-width:0}
#tl-board .tl-items{align-content:center}
.tl-settings{border:0;border-left:1px solid #ffffff19;color:#d3d4d9;background:#12131665;font-size:19px;padding:0}
.tl-settings:hover{background:#0007;color:white}.tl-row.tl-over,.tl-selecting .tl-label:focus-visible,#tl-pool.tl-over{outline:3px solid #55d4bd;outline-offset:-3px}
.tl-workspace button:focus-visible{outline-offset:-3px}
.tl-tile{width:var(--tile,58px);height:var(--tile,58px);position:relative;padding:0;display:block;flex:none;overflow:hidden;cursor:grab;border:0;background:#36373d;color:white;-webkit-touch-callout:none;user-select:none}
.tl-tile img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.tl-tile span{position:absolute;bottom:0;left:0;right:0;background:#111a;color:#fff;padding:2px;font:600 10px/1.2 Arial,sans-serif;overflow-wrap:anywhere;opacity:0}
.tl-tile:hover span,.tl-tile:focus-visible span,.tl-tile[aria-pressed=true] span{opacity:1}
.tl-tile[aria-pressed=true]::after{position:absolute;inset:0;border:3px solid white;box-shadow:inset 0 0 0 2px #146859;content:''}
.tl-dragging{opacity:.4}.tl-ghost{position:fixed!important;z-index:10000;pointer-events:none;transform:translate(-50%,-66%);box-shadow:0 5px 18px #0007;opacity:.85}
#tl-pool-section{margin:20px 0}
.tl-tray-head{flex-wrap:wrap}
#tl-find{width:min(100%,260px);height:36px;margin:8px 0 4px;padding:6px 10px;border:1px solid var(--line);border-radius:5px}
#tl-count,#tl-size{font-size:.78em;color:var(--muted);margin-left:3px;font-weight:500}
.tl-hint{margin:3px 0 10px}
#tl-pool{min-height:calc(var(--tile) + 12px);gap:3px;padding:6px;background:#f2f3f4;border:1px solid var(--line);border-radius:7px}
#tl-pool .tl-tile{border-radius:3px}
#tl-pool[data-empty]:not([data-empty=""])::before{content:attr(data-empty);padding:12px;color:var(--muted)}
.tl-controls>button,.tl-row-actions button,.tl-dialog-head button,.tl-entry button,.tl-controls>label,.tl-add button,#tl-return,#tl-pin,#tl-tray-toggle{padding:7px 12px;background:white;border:1px solid #d4d8da;color:#34393e;border-radius:5px;font-size:14px;font-weight:600;line-height:1.4}
.tl-controls>button.btn,.tl-editor .btn,.tl-directory .btn:not(.secondary){background:#202226;border-color:#202226;color:white}
.tl-controls>label{display:inline-flex;gap:6px;align-items:center}
.tl-controls input[type=color]{width:24px;height:19px;border:0;padding:0;background:none}
#tl-message{min-height:1.5em;margin:8px 0;color:var(--muted)}
.tl-editor,#tl-settings{max-width:780px}.tl-editor form{display:grid;gap:14px}
.tl-editor h1{margin:10px 0 20px}.tl-editor label,#tl-settings label{display:grid;gap:4px;font-size:14px;font-weight:600}
.tl-editor .field,#tl-settings .field{margin:0;width:100%}.tl-fields>*{flex:1;min-width:140px}
.tl-editor h2{margin-top:8px}.tl-editor p{margin:0}.tl-editor details{border-block:1px solid var(--line);padding:10px 0}
.tl-editor summary{cursor:pointer}.tl-editor details p{padding-block:8px}
#tl-entries{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,155px),1fr));gap:10px}
.tl-entry{display:grid;min-width:0;gap:8px;align-content:start;padding:9px;border:1px solid var(--line);border-radius:8px;background:white}
.tl-entry img{width:100%;aspect-ratio:4/3;object-fit:contain;background:#f1f3f4;border-radius:4px;color:var(--muted)}
.tl-entry[data-hidden=true]{background:#f6f7f8}
.tl-entry[data-hidden=true] img{opacity:.6}
.tl-entry-toolbar,.tl-entry-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.tl-editor .tl-entry-toolbar label,.tl-editor .tl-image-actions label{display:flex;align-items:center;gap:5px}
.tl-entry-hidden{font-size:11px;color:var(--muted)}
.tl-entry-grip{margin-left:auto;cursor:grab;font-size:17px;line-height:1;color:var(--muted)}
.tl-entry button{padding:4px 6px;font-size:12px;min-height:30px}
.tl-entry .field{padding:5px 7px;font-size:13px}
#tl-settings{width:min(370px,95vw);margin:auto;padding:20px;border:1px solid #ccc;border-radius:10px;color:var(--ink)}
#tl-settings::backdrop,#tl-result::backdrop{background:#15172280}#tl-settings form{display:grid;gap:14px}
.tl-dialog-head button{font-size:20px;padding:1px 9px}.tl-swatches button{width:25px;height:25px;border:1px solid #0004;border-radius:50%}
.tl-row-actions{display:grid;grid-template-columns:1fr 1fr}
#tl-result{width:min(680px,calc(100% - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:clamp(14px,3vw,24px);overflow:auto;border:1px solid var(--line);border-radius:12px;color:var(--ink)}
#tl-result-count,#tl-result-status{margin:4px 0 10px;color:var(--muted);font-size:13px}
#tl-result-status:empty{margin:0}
#tl-result-preview{max-height:min(46dvh,430px);overflow:auto;margin-bottom:14px;border:1px solid #191a1e;border-radius:7px;--preview-tile:clamp(30px,8vw,44px)}
.tl-result-row{display:grid;grid-template-columns:clamp(62px,18%,100px) minmax(0,1fr);min-height:var(--preview-tile);border-bottom:1px solid #121316}
.tl-result-row:last-child{border:0}
.tl-result-row strong{display:grid;place-items:center;padding:5px;text-align:center;overflow-wrap:anywhere;font-size:13px;line-height:1.2}
.tl-result-items{display:flex;flex-wrap:wrap;align-content:center;min-width:0}
.tl-result-items img{width:var(--preview-tile);height:var(--preview-tile);object-fit:cover}
#tl-result .tl-controls>button{min-height:40px}
.tl-result-community{margin-top:14px;padding-top:12px;border-top:1px solid var(--line);display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap}
.tl-result-community a,#tl-board-mode a{text-decoration:underline;color:var(--accent-dark)}
#tl-board-mode{margin:0 0 12px;padding:8px 12px;border:1px solid var(--line);border-radius:6px;font-size:14px}
#tl-board-mode p{display:inline;margin:0 8px 0 0}
#tl-board-mode .tl-controls{margin-top:6px}
#tl-board[data-mode=shared] :is(.tl-preset,#tl-pool-section,.tl-board-controls>:not([data-action=result])){display:none}
#tl-board[data-mode=shared] .tl-row{grid-template-columns:clamp(52px,8vw,93px) minmax(0,1fr)}
#tl-board[data-mode=shared] .tl-label{display:grid;place-items:center;text-align:center}
#tl-board[data-mode=shared] .tl-tile{opacity:1}
#tl-quick-place{display:none}
.tl-present header,.tl-present footer,.tl-present .tl-back,.tl-present #tl-pool-section,.tl-present .tl-settings,.tl-present #tl-progress,.tl-present #tl-message,.tl-present .tl-preset,.tl-present .tl-controls>:not([data-action=present]),.tl-present .admin-tools{display:none}
.tl-present #tl-board-mode{display:none}
.tl-present .tl-row{grid-template-columns:clamp(56px,8vw,93px) 1fr}.tl-present .tl-controls{margin-top:12px}
.tl-workspace [hidden],.tl-editor [hidden]{display:none!important}
@media(max-width:620px){
 .tl-workspace{--tile:clamp(42px,11vw,56px)}.tl-row{grid-template-columns:52px minmax(0,1fr) 30px}
 #tl-board{--tier-row-min:clamp(56px,16vw,72px)}
 .tl-intro{margin-bottom:12px;padding-bottom:12px}.tl-intro p{font-size:14px}
 .tl-workspace h2{font-size:18px}
 .tl-preset{flex-basis:100%}.tl-preset .field{min-height:38px}
 .tl-controls>button,.tl-controls>label{min-height:40px}
 .tl-entry button{min-height:36px}
 .tl-directory .page-head{align-items:flex-start;gap:12px;flex-wrap:wrap}.tl-cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,175px),1fr))}
}
#tl-rows+.tl-controls{margin-top:10px}
#tl-message:empty{min-height:0;margin:0}
.tl-more{position:relative}.tl-more summary,.tl-controls>a{padding:7px 10px;font-size:14px;text-decoration:underline;cursor:pointer}
.tl-more[open]{z-index:6}
.tl-more>.tl-controls{position:absolute;left:0;top:100%;width:min(250px,80vw);z-index:2;padding:12px;background:white;border:1px solid var(--line);border-radius:7px;box-shadow:0 4px 15px #18191e1a}
.tl-tray-head #tl-pin{margin-left:auto}.tl-pinned:not(.tl-present):has(#tl-board:not([data-mode=shared])){padding-bottom:clamp(145px,35vh,245px)}
.tl-pinned.tl-tray-collapsed:not(.tl-present):has(#tl-board:not([data-mode=shared])){padding-bottom:calc(58px + env(safe-area-inset-bottom))}
.tl-pinned #tl-pool-section{position:fixed;z-index:5;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,1080px);margin:0;padding:9px 12px max(8px,env(safe-area-inset-bottom));background:#fff;box-shadow:0 -3px 16px #10131a24}
.tl-pinned #tl-pool{max-height:min(23vh,165px);overflow:auto;overscroll-behavior:contain}
.tl-pinned .tl-hint{display:none}
.tl-community #tl-rows{background:#24252a}.tl-community .tl-row{grid-template-columns:70px 1fr}
.tl-community .tl-label{display:grid;place-items:center;color:#191a1e}
.tl-community h2{margin:18px 0 6px}.tl-community li a{text-decoration:underline}
@media(max-width:620px){
 html:has(body.tl-pinned:not(.tl-present) #tl-board:not([data-mode=shared])){overflow:hidden}
 body.tl-pinned:not(.tl-present):has(#tl-board:not([data-mode=shared])){height:calc(100dvh - var(--tl-tray-height,0px));overflow-y:auto;overscroll-behavior:contain;padding-bottom:0}
 .tl-more>.tl-controls{position:static;width:100%}.tl-more[open]{width:100%}
 .tl-tray-head{justify-content:flex-start;gap:6px}
 #tl-pin,#tl-tray-toggle,#tl-return{padding:6px 9px;font-size:13px;min-height:34px}
 .tl-pinned #tl-find{width:100%;margin:6px 0}
 .tl-pinned #tl-pool{max-height:min(calc(var(--tile) * 2 + 17px),21dvh)}
 #tl-quick-place{display:flex;gap:4px;overflow-x:auto;padding:2px 2px 6px}
 #tl-quick-place button{flex:1 0 auto;min-width:42px;min-height:42px;border:1px solid #0002;border-radius:4px;padding:4px 8px;font-weight:700}
 #tl-result .tl-controls>button{flex:1 1 auto}
 #tl-result .tl-controls>button.btn{flex-basis:100%}
}
