.tg{display:flex;flex-direction:column;gap:16px}
.tg-drop{border:2px dashed var(--line-strong);border-radius:var(--radius);padding:28px 24px;text-align:center;background:var(--grid-bg);display:flex;flex-direction:column;align-items:center;gap:8px;transition:border-color .15s,background-color .15s}
.tg-drop.tg-over{border-color:var(--primary);background:var(--primary-soft)}
.tg-drop-icon{color:var(--primary)}
.tg-drop-title{font-size:22px;font-weight:700;margin:0;color:var(--text)}
.tg-drop-sub{margin:0 0 8px;color:var(--muted);max-width:52ch;font-size:16px}
.tg-filebar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--surface);overflow-wrap:anywhere}
.tg-options{display:grid;grid-template-columns:1fr 1.4fr auto;gap:12px;align-items:end}
.tg-field{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:600;color:var(--muted)}
.tg-field select,.tg-assign select{height:44px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);color:var(--text);padding:0 12px;font:inherit;font-size:16px;font-weight:400;min-width:0;width:100%}
.tg-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border-radius:8px;font:inherit;font-size:16px;font-weight:600;cursor:pointer;border:1px solid transparent;text-decoration:none;white-space:nowrap}
.tg-btn:focus-visible,.tg-time:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.tg-btn-primary{background:var(--primary);color:#fff}
.tg-btn-primary:hover{background:var(--primary-dark)}
.tg-btn-primary:disabled{background:var(--grid-head);color:var(--muted);border-color:var(--line-strong);opacity:1;cursor:not-allowed}
.tg-btn-ghost{background:var(--surface);color:var(--text);border-color:var(--line-strong)}
.tg-btn-ghost:hover{border-color:var(--primary);color:var(--primary-dark)}
.tg-small{min-height:36px;padding:0 12px;font-size:14px}
.tg-progress{display:grid;grid-template-columns:1fr auto;gap:8px 16px;align-items:center;padding:16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.tg-bar{grid-column:1/-1;height:8px;border-radius:8px;background:var(--grid-line);overflow:hidden}
.tg-bar span{display:block;height:100%;width:2%;background:var(--primary);transition:width .3s}
.tg-status{margin:0;font-size:14px;color:var(--muted);font-family:var(--mono)}
.tg-error{margin:0;padding:12px 16px;border-radius:8px;background:#fdf1ec;color:#8a2b0c;border:1px solid #f1c3b0}
.tg-result{display:flex;flex-direction:column;gap:12px}
.tg-result audio{width:100%}
.tg-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;align-items:center}
.tg-speakers,.tg-assign,.tg-export{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tg-assign select{width:auto;height:36px;font-size:14px}
.tg-label{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.tg-muted{color:var(--muted);font-size:14px;font-weight:400}
.tg-chips{display:flex;flex-wrap:wrap;gap:8px}
.tg-chip{display:inline-flex;align-items:center;border-radius:999px;padding:2px 4px 2px 12px;border:1px solid currentColor;background:var(--surface)}
.tg-chip input{border:0;background:transparent;font:inherit;font-size:14px;font-weight:600;color:inherit;width:11ch;padding:6px 8px 6px 0}
.tg-chip input:focus{outline:none;text-decoration:underline}
.tg-spk-0{color:#0d7a5f}.tg-spk-1{color:#a34e12}.tg-spk-2{color:#5b4bb5}.tg-spk-3{color:#9c2f5a}.tg-spk-4{color:#2f6f8f}.tg-spk-5{color:#6b6a1a}
.tg-grid-wrap{border:1.5px solid var(--line-strong);border-radius:var(--radius);overflow:auto;max-height:560px;background:var(--surface)}
.tg-grid{width:100%;border-collapse:collapse;font-size:16px}
.tg-grid th{position:sticky;top:0;z-index:1;background:var(--grid-head);text-align:left;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--text);padding:9px 12px;border-bottom:1.5px solid var(--line-strong)}
.tg-grid td{border-bottom:1px solid var(--grid-line);padding:8px 12px;vertical-align:top}
.tg-grid tr:nth-child(even) td{background:var(--grid-bg)}
.tg-grid tr.tg-selected td{background:var(--primary-soft)}
.tg-grid td+td,.tg-grid th+th{border-left:1px solid var(--grid-line)}
.tg-c-sel{width:40px;text-align:center}
.tg-c-time{width:104px}
.tg-c-spk{width:160px}
.tg-c-spk select{width:100%;height:36px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);font:inherit;font-size:14px;font-weight:600;padding:0 8px;color:var(--text)}
.tg-time{font-family:var(--mono);font-size:14px;color:var(--primary-dark);background:none;border:0;padding:6px 0;cursor:pointer;text-decoration:underline;text-decoration-color:var(--line-strong);text-underline-offset:3px}
.tg-c-text div{min-height:24px;line-height:1.6;outline:none;border-radius:4px;padding:2px 4px;margin:-2px -4px}
.tg-c-text div:focus{background:#fffbea;box-shadow:0 0 0 2px var(--accent)}
.tg-export{padding-top:4px}
@media (max-width:640px){
  .tg{gap:12px}
  .tg-drop{padding:16px 14px;gap:6px}
  .tg-drop-icon{width:36px;height:36px}
  .tg-drop-title{font-size:18px}
  .tg-drop-sub{font-size:14px;margin-bottom:4px}
  .tg-options{grid-template-columns:0.85fr 1.15fr;gap:8px}
  .tg-field{font-size:13px}
  .tg-field select{height:40px;padding:0 6px;font-size:13px}
  .tg-start{grid-column:1/-1;width:100%}
  .tg-drop .tg-btn{width:100%}
  .tg-c-time{width:84px}.tg-c-spk{width:116px}
  .tg-grid{font-size:15px}
  .tg-grid td,.tg-grid th{padding:8px}
  .tg-toolbar{flex-direction:column;align-items:stretch}
}