.tm-tools-hub{max-width:820px;margin:0 auto}
.tm-tools-nav{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px;position:sticky;top:84px;background:var(--color-bg);padding:8px 0;z-index:5}
.tm-tools-nav a{background:var(--color-surface);border:1px solid var(--color-border);border-radius:20px;padding:6px 14px;font-size:12.5px}
.tm-tool-block{margin-bottom:36px;scroll-margin-top:150px}
.tm-tool-block h2{margin-bottom:12px;font-size:18px}
.tm-toolbox{background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;padding:18px}
.tm-tool-desc,.tm-tool-note{color:var(--color-text-light);font-size:13px;margin-bottom:10px}
.tm-toolbox textarea,.tm-toolbox input[type=text],.tm-toolbox input[type=number],.tm-toolbox input[type=date]{width:100%;border:1px solid var(--color-border);border-radius:8px;padding:9px 12px;background:var(--color-bg);color:var(--color-text);font-family:inherit}
.tm-tool-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}

/* speed test */
.tm-speed-result{margin-top:16px;text-align:center}
.tm-speed-gauge{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:140px;height:140px;border-radius:50%;background:conic-gradient(var(--color-primary) 0%,var(--color-border) 0%);transition:background 1s}
.tm-speed-gauge b{font-size:30px}
.tm-speed-gauge span{font-size:11px;color:var(--color-text-light)}
.tm-speed-note{margin-top:10px;font-size:12.5px;color:var(--color-text-light)}

/* my ip */
.tm-ip-box{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.tm-ip-box>div{background:var(--color-bg);border:1px solid var(--color-border);border-radius:10px;padding:12px 14px}
.tm-ip-box span{display:block;font-size:11.5px;color:var(--color-text-light);margin-bottom:4px}
.tm-ip-box b{font-size:15px}

/* converter */
.tm-tabs{display:flex;gap:6px;margin-bottom:14px;flex-wrap:wrap}
.tm-tabs button{background:var(--color-bg);border:1px solid var(--color-border);border-radius:20px;padding:6px 14px;font-size:12.5px}
.tm-tabs button.is-active{background:var(--color-primary);color:#fff;border-color:var(--color-primary)}
.tm-conv-row{display:flex;gap:8px}
.tm-conv-row select{border:1px solid var(--color-border);border-radius:8px;padding:9px;background:var(--color-bg);color:var(--color-text)}
.tm-conv-out{margin-top:12px;font-size:14px;background:var(--color-bg);border:1px dashed var(--color-border);border-radius:8px;padding:12px;min-height:1.6em}

/* json / base64 */
.tm-json-out{margin-top:10px;background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;padding:12px;max-height:320px;overflow:auto;font-size:12.5px;white-space:pre-wrap;word-break:break-all}
.tm-json-msg,.tm-b64-msg{font-size:12px;margin-top:6px;min-height:1em}
.tm-json-msg.is-err,.tm-b64-msg.is-err{color:#dc2626}

/* password */
.tm-pw-row{display:flex;align-items:center;gap:10px;margin-bottom:8px;font-size:13px}
.tm-pw-row input[type=range]{flex:1}
.tm-pw-opts{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-bottom:10px;font-size:12.5px}
.tm-pw-check{margin-top:18px;border-top:1px dashed var(--color-border);padding-top:14px}
.tm-pw-check label{display:block;font-size:12.5px;margin-bottom:6px;color:var(--color-text-light)}
.tm-pw-meter{height:6px;border-radius:4px;background:var(--color-border);margin-top:8px;overflow:hidden}
.tm-pw-meter span{display:block;height:100%;width:0;transition:width .2s,background .2s}
.tm-pw-check small{display:block;margin-top:6px;font-size:11.5px;color:var(--color-text-light)}

/* qr */
.tm-qr-out{margin-top:14px;display:flex;flex-direction:column;align-items:center;gap:10px}
.tm-qr-out canvas{border-radius:8px;background:#fff;padding:8px}

/* bookmarks page */
.tm-bookmarks{max-width:760px;margin:0 auto}
.tm-bm-empty{color:var(--color-text-light);text-align:center;padding:30px 0}
.tm-bm-list{display:flex;flex-direction:column;gap:2px}
.tm-bm-item{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--color-border)}
.tm-bm-item img{width:80px;height:56px;object-fit:cover;border-radius:8px;flex:0 0 auto}
.tm-bm-item h4{font-size:14px;margin-bottom:4px}
.tm-bm-item time{font-size:11.5px;color:var(--color-text-light)}
.tm-bm-remove{margin-inline-start:auto;color:#dc2626;font-size:12px;flex:0 0 auto}

@media (max-width:640px){
	.tm-ip-box{grid-template-columns:1fr}
	.tm-pw-opts{grid-template-columns:1fr 1fr}
}

/* --- Isolate tools from .tm-single-content styles (links, h2, lists) --- */
.tm-tools-hub{min-width:0}
.tm-single-content .tm-tools-nav a{color:var(--color-text);text-decoration:none}
.tm-single-content .tm-tools-nav a:hover{color:var(--color-primary)}
.tm-single-content .tm-tool-block h2{border:0;padding:0;margin:0 0 12px;font-size:18px}
.tm-single-content .tm-toolbox .tm-btn{color:#fff;text-decoration:none}
.tm-single-content .tm-toolbox .tm-btn-ghost{color:var(--color-primary)}
.tm-toolbox{min-width:0;overflow:hidden}
.tm-toolbox input,.tm-toolbox select,.tm-toolbox textarea{max-width:100%;min-width:0}
.tm-conv-row{flex-wrap:wrap}
.tm-conv-row>input,.tm-conv-row>select{flex:1 1 120px}
.tm-toolbox textarea{display:block;resize:vertical}
.tm-tabs button,.tm-toolbox .tm-btn{cursor:pointer}
.tm-qr-out canvas{max-width:100%;height:auto}
:root[data-theme="dark"] .tm-toolbox{background:var(--color-surface);border-color:var(--color-border)}
