.tms{--tms-border:rgba(127,127,127,.24);--tms-bg:var(--surface,#fff);--tms-soft:rgba(127,127,127,.07);display:grid;gap:16px}.tms *{box-sizing:border-box}.tms-card,.tms-toolbar-card{background:var(--tms-bg);border:1px solid var(--tms-border);border-radius:18px;padding:16px;box-shadow:0 10px 28px rgba(0,0,0,.045)}.tms-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(285px,.75fr);gap:16px;align-items:stretch}.tms-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.tms-head h2{font-size:1.05rem;margin:0}.tms-badge{font-size:.72rem;font-weight:800;letter-spacing:.08em;padding:5px 8px;border:1px solid var(--tms-border);border-radius:999px;opacity:.75}.tms-editor-shell{width:100%;min-height:560px;border:1px solid var(--tms-border);border-radius:12px;overflow:hidden;background:#fff}.tms-editor-shell>div{width:100%;height:560px}.tms-load-row>label{display:block;font-weight:700;margin-bottom:7px}.tms-inline{display:flex;gap:8px;align-items:stretch}.tms-inline input{min-width:0;flex:1;border:1px solid var(--tms-border);border-radius:10px;padding:11px 12px;font:inherit;background:var(--tms-bg);color:inherit}.tms-btn{border:0;border-radius:10px;padding:10px 13px;font:inherit;font-weight:750;cursor:pointer;background:var(--accent,#6d5dfc);color:#fff;white-space:nowrap}.tms-btn.secondary{background:var(--tms-soft);color:inherit;border:1px solid var(--tms-border)}.tms-btn:disabled{opacity:.5;cursor:not-allowed}.tms-examples{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:10px;font-size:.88rem}.tms-examples button{background:var(--tms-soft);color:inherit;border:1px solid var(--tms-border);border-radius:999px;padding:6px 9px;cursor:pointer}.tms-output-card{display:flex;flex-direction:column;min-height:100%}.tms-output-card textarea{width:100%;min-height:165px;resize:vertical;border:1px solid var(--tms-border);border-radius:12px;padding:12px;font:500 .93rem/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:var(--tms-soft);color:inherit;word-break:break-all}.tms-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.tms-status{margin-top:14px;padding:10px 11px;border-radius:10px;background:var(--tms-soft);font-size:.88rem;line-height:1.4}.tms-privacy{margin:auto 0 0;padding-top:18px;font-size:.8rem;opacity:.72}.tms-live-dot{width:10px;height:10px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.14)}@media(max-width:900px){.tms-grid{grid-template-columns:1fr}.tms-editor-shell,.tms-editor-shell>div{min-height:520px;height:520px}.tms-output-card textarea{min-height:120px}}@media(max-width:640px){.tms-card,.tms-toolbar-card{padding:12px;border-radius:14px}.tms-inline{flex-wrap:wrap}.tms-inline input{flex:1 1 100%}.tms-inline .tms-btn{flex:1}.tms-editor-shell,.tms-editor-shell>div{min-height:470px;height:470px}.tms-actions .tms-btn{flex:1}}
/* Molecule Sketcher repair, 2026-10-01 */
.tms-grid>*{min-width:0}.tms-editor-shell{min-width:0}.tms-reading{pointer-events:none;opacity:.7}.tms-export-note{font-size:.82rem;line-height:1.5;opacity:.8;margin:12px 0 0}.tms-elements{width:min(1040px,96vw);max-height:90vh;margin:auto;padding:20px;border:1px solid #cbd5e1;border-radius:16px;background:#fff;color:#172033;overflow:auto;box-shadow:0 20px 80px #0005}.tms-elements::backdrop{background:#10182799}.tms-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.tms-dialog-head h2{font-size:1.2rem;margin:0}.tms-elements label{display:block;margin:10px 0 6px;font-weight:650}.tms-elements input{background:#fff;color:#172033;border:1px solid #aab5c5;border-radius:8px;padding:9px;font:inherit;min-width:0}.tms-elements input[type=search]{width:100%}.tms-elements button{cursor:pointer;font:inherit;color:#172033;border:1px solid #bcc8d9;border-radius:6px;padding:7px 10px;background:#edf2f9}.tms-elements button:focus-visible,.tms-elements input:focus-visible{outline:3px solid #6757e8;outline-offset:2px}.tms-table-scroll{overflow-x:auto;margin:16px 0}.tms-element-grid{display:grid;grid-template-columns:repeat(18,minmax(34px,1fr));gap:4px;min-width:720px}.tms-element-grid .tms-element{padding:4px 1px;min-height:45px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}.tms-element small{font-size:10px;line-height:1}.tms-element strong{font-size:15px;line-height:1.3}.tms-element:hover{background:#dfe5ff}.tms-element.tms-dimmed{opacity:.22}.tms-atom-row{display:flex;gap:8px}.tms-atom-row input{flex:1}.tms-atom-row button{background:#6151dd;color:white}.tms-elements p:empty{display:none}@media(max-width:640px){.tms-elements{padding:12px}.tms-dialog-head h2{font-size:1.05rem}}

/* Explicit group picker and labelled editing commands. */
.tms-editor-actions{display:flex;gap:8px;flex-wrap:wrap}.tms-tool-hint{font-size:.82rem;line-height:1.5;margin:8px 0 12px;opacity:.85}.tms-groups-dialog{width:min(540px,94vw);max-height:85vh;max-height:85dvh}.tms-groups-dialog>p{line-height:1.5;margin:0 0 16px}.tms-group-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.tms-group-grid button{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;min-height:44px;white-space:nowrap}.tms-group-grid button:hover{background:#dfe5ff}#tmsJsme [data-tms-clear]{cursor:pointer}#tmsJsme [data-tms-clear]:focus-visible{outline:2px solid #6757e8}@media(max-width:420px){.tms-group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tms-editor-actions .tms-btn{white-space:normal;flex:1}}
