.te-bd{position:fixed;inset:0;z-index:120;background:oklch(0.20 0.012 60 / .42);display:grid;place-items:center;padding:24px;animation:fadeIn .15s ease-out}
.te{width:100%;max-width:760px;max-height:min(880px,calc(100dvh - 48px));display:flex;flex-direction:column;background:var(--surface);border-radius:14px;box-shadow:0 30px 80px -20px oklch(0.20 0.012 60 / .45);overflow:hidden;animation:rise .2s ease-out}
.te-head{padding:20px 24px 0;border-bottom:1px solid var(--border-soft);display:flex;flex-direction:column;gap:14px;background:var(--surface)}
.te-id{display:flex;align-items:center;gap:14px}
.te-av{width:48px;height:48px;flex:none;border-radius:12px;display:grid;place-items:center;font-family:var(--serif);font-size:20px;color:var(--accent-deep);background:var(--accent-soft)}
.te-id-t{flex:1;min-width:0;display:flex;flex-direction:column}
.te-eyebrow{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3)}
.te-id-t h2{margin:2px 0 0;font-family:var(--serif);font-weight:400;font-size:26px;line-height:1.15;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.te-x{appearance:none;flex:none;width:40px;height:40px;border-radius:10px;border:1px solid var(--border-soft);background:var(--surface);color:var(--ink-2);display:grid;place-items:center;cursor:pointer}.te-x:hover{background:var(--surface-2);color:var(--ink)}
.te-status{display:flex;padding:3px;background:var(--surface-2);border:1px solid var(--border-soft);border-radius:10px;align-self:flex-start}
.te-status button{appearance:none;font:inherit;font-size:13.5px;border:0;background:none;padding:7px 14px;border-radius:7px;color:var(--ink-3);cursor:pointer;min-height:36px}
.te-status button.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px oklch(0.2 0.01 60 / .12);font-weight:500}
.te-status button.on.s-active{color:var(--success)}.te-status button.on.s-prospect{color:var(--accent-deep)}
.te-nav{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;margin:0 -4px}.te-nav::-webkit-scrollbar{display:none}
.te-nav button{appearance:none;font:inherit;font-size:13px;background:none;border:0;border-bottom:2px solid transparent;padding:8px 10px 10px;color:var(--ink-3);cursor:pointer;white-space:nowrap}
.te-nav button:hover{color:var(--ink);border-bottom-color:var(--border)}
.te-body{position:relative;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:8px 24px 24px;background:var(--bg)}
.te-sec{background:var(--surface);border:1px solid var(--border-soft);border-radius:10px;padding:18px;margin-top:14px;display:flex;flex-direction:column;gap:14px}
.te-sec h3{margin:0;font-family:var(--serif);font-weight:400;font-size:20px;color:var(--ink)}
.te-sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.te-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.te-grid.three{grid-template-columns:1.2fr 1.3fr 1fr}
.te-grid.four{grid-template-columns:2fr 1fr 1fr}.te-grid.four .wide{grid-column:1/-1}
.te-fld{display:flex;flex-direction:column;gap:5px;font-size:12.5px;color:var(--ink-3);min-width:0}
.te-fld.wide{grid-column:1/-1}
.te-fld>span{font-weight:500;color:var(--ink-2)}.te-fld em{color:var(--danger);font-style:normal}
.te-fld small{font-size:12px;color:var(--ink-3);line-height:1.4}
.te-fld input,.te-fld select,.te-fld textarea,.te-search{font:inherit;font-size:15px;color:var(--ink);background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:10px 12px;min-height:44px;width:100%;min-width:0}
.te-fld textarea{resize:vertical;min-height:84px}
.te-fld input:focus,.te-fld select:focus,.te-fld textarea:focus,.te-search:focus{outline:3px solid var(--accent-soft);border-color:var(--accent)}
.te-seg{display:flex;border:1px solid var(--border);border-radius:8px;overflow:hidden;min-height:44px}
.te-seg button{appearance:none;flex:1;font:inherit;font-size:14px;border:0;border-left:1px solid var(--border);background:var(--surface);color:var(--ink-3);cursor:pointer}
.te-seg button:first-child{border-left:0}.te-seg button.on{background:var(--ink);color:var(--surface)}
.te-sub{border-top:1px solid var(--border-soft);padding-top:14px;display:flex;flex-direction:column;gap:10px}
.te-sub-h{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.te-sub h4{margin:0;font-size:14px;font-weight:600;color:var(--ink)}
.te-switch{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--ink-2);cursor:pointer;user-select:none;min-height:36px}
.te-switch input{position:absolute;opacity:0;pointer-events:none}
.te-switch-t{width:34px;height:20px;border-radius:999px;background:var(--border);position:relative;transition:background .15s;flex:none}
.te-switch-t::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--surface);box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s}
.te-switch.on .te-switch-t{background:var(--success)}.te-switch.on .te-switch-t::after{transform:translateX(14px)}
.te-switch input:focus-visible+.te-switch-t{outline:3px solid var(--accent-soft)}
.te-same-note{margin:0;font-size:13.5px;color:var(--ink-2);padding:10px 12px;border-radius:8px;background:var(--success-soft)}
.te-chips{display:flex;flex-wrap:wrap;gap:8px}
.te-chip{appearance:none;font:inherit;font-size:13.5px;display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:6px 14px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--ink-2);cursor:pointer}
.te-chip:hover{border-color:var(--ink-3)}.te-chip.on{background:var(--ink);border-color:var(--ink);color:var(--surface)}
.te-pw{display:flex;border:1px solid var(--border);border-radius:8px;overflow:hidden;background:var(--surface)}
.te-pw input{border:0;border-radius:0}.te-pw input:focus{outline:none}
.te-pw button{appearance:none;font:inherit;font-size:13px;border:0;border-left:1px solid var(--border);background:var(--surface-2);color:var(--ink-2);padding:0 14px;cursor:pointer}
.te-dim{font-size:12.5px;color:var(--ink-3)}
.te-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 24px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--border-soft);background:var(--surface)}
.te-foot-r{display:flex;gap:8px}
.te-err{color:var(--danger);font-size:13px}
@media (max-width:640px){
.te-bd{padding:0;place-items:stretch}
.te{max-width:none;max-height:none;height:100dvh;border-radius:0;animation:teUp .22s ease-out}
.te-head{padding:14px 16px 0;gap:12px}
.te-id-t h2{font-size:22px}
.te-status{align-self:stretch}.te-status button{flex:1}
.te-body{padding:4px 12px 20px}
.te-sec{padding:16px 14px}
.te-grid,.te-grid.three,.te-grid.four{grid-template-columns:minmax(0,1fr)}
.te-grid.four{grid-template-columns:1fr 1fr}.te-grid.four .wide,.te-grid.four>:nth-child(2){grid-column:1/-1}
.te-fld input,.te-fld select,.te-fld textarea{font-size:16px;min-height:48px}
.te-foot{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}
.te-foot>span{display:none}.te-foot-r{flex:1}.te-foot-r .btn{flex:1;min-height:48px}
}
@keyframes teUp{from{transform:translateY(24px);opacity:0}}
