/* Technician desk — standalone chat app shell. Token-bound (tokens.css / theme.css). */

html,body.tech-app-body{height:100%}
body.tech-app-body,.tech-app{
    margin:0;overflow:hidden;background:var(--bg);color:var(--white);-webkit-text-size-adjust:100%;
    font-family:var(--font-body),system-ui,sans-serif;
    font-feature-settings:"liga" 0,"calt" 0;
    font-variant-ligatures:none;
    letter-spacing:0
}
body.tech-app-body{overflow:hidden}
.tech-app [hidden]{display:none !important}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tech-app button,.tech-app a,.tech-app input,.tech-app select,.tech-app textarea,.tech-app summary{touch-action:manipulation}

.tech-app{display:flex;flex-direction:column;height:100vh;height:100dvh;min-height:100%}

/* ---- top bar ---- */
.tech-appbar{
    flex:none;display:flex;align-items:center;gap:14px;
    padding:10px clamp(12px,2vw,20px);padding-top:calc(10px + env(safe-area-inset-top,0px));
    border-bottom:1px solid var(--gray-line);
    background:color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)
}
.tech-appbar-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:var(--white);min-width:0}
.tech-appbar-brand img{height:32px;width:auto;border-radius:8px}
.tech-appbar-name{font-size:.92rem;color:var(--gray);white-space:nowrap}
.tech-appbar-name b{color:var(--white);font-weight:600}
.tech-appbar-tabs{display:flex;gap:6px;margin-left:auto}
.tech-tab{
    min-height:38px;padding:7px 14px;border-radius:999px;border:1px solid var(--gray-line);
    background:transparent;color:var(--gray);font:inherit;font-size:.86rem;cursor:pointer;
    display:inline-flex;align-items:center;gap:6px
}
.tech-tab[aria-selected=true]{background:var(--bg-2);color:var(--white);border-color:var(--blue-a20)}
.tech-tab:hover{color:var(--white)}
.tech-tab:focus-visible,.tech-appbtn:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.tech-tab-count{font-family:var(--font-data);font-size:.66rem;padding:1px 7px;border-radius:999px;background:var(--blue-a08);color:var(--blue-light)}
.tech-appbar-actions{display:flex;gap:6px;align-items:center}
.tech-appbar-tabs+.tech-appbar-actions{margin-left:0}
.tech-appbar-actions:first-of-type{margin-left:auto}
.tech-appbtn{
    display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:7px 13px;border-radius:999px;
    border:1px solid var(--gray-line);background:var(--bg-2);color:var(--white);font:inherit;font-size:.86rem;
    text-decoration:none;cursor:pointer;white-space:nowrap
}
.tech-appbtn:hover{border-color:var(--blue-a20)}
.tech-appbtn--call{background:var(--blue);color:var(--bg);border-color:transparent;font-weight:600}
[data-theme=light] .tech-appbtn--call{color:#fff}
.tech-appbtn--call:hover{background:var(--blue-light)}
.tech-appbtn--ghost{background:transparent;color:var(--gray)}
.tech-appbtn--ghost:hover{color:var(--white)}
.tech-appbtn--icon{padding:7px 11px;font-size:1rem;line-height:1}
.tech-appbtn-icon{font-size:.95em;line-height:1}

/* ---- main ---- */
.tech-app-main{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.tech-app-main--center{align-items:center;justify-content:center;padding:24px;overflow:auto}
.tech-panel{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.tech-panel[hidden]{display:none}

/* ---- PIN gate ---- */
.tech-gate-card{
    width:100%;max-width:26rem;padding:clamp(22px,3vw,32px);border-radius:18px;
    background:var(--bg-2);border:1px solid var(--gray-line)
}
.tech-gate-card h1{margin:.25rem 0 .5rem;font-family:var(--font-display);font-size:1.5rem;color:var(--white)}
.tech-gate-card p{margin:0 0 .75rem;color:var(--gray);line-height:1.55}
.tech-eyebrow{font-family:var(--font-data);font-size:.66rem;letter-spacing:1.2px;text-transform:uppercase;color:var(--blue-light)}
.tech-label{display:block;font-size:.82rem;color:var(--gray);margin-bottom:-4px}
.tech-gate-card form{display:flex;flex-direction:column;gap:12px;margin:1rem 0}
.tech-gate-card input[type=password],.tech-gate-card input[type=text]{
    width:100%;min-height:46px;padding:12px 14px;border-radius:12px;border:1px solid var(--gray-line);
    background:var(--bg);color:var(--white);font-size:1rem;box-sizing:border-box
}
.tech-field{display:flex;flex-direction:column;gap:6px}
.tech-check{display:flex;align-items:center;gap:8px;font-size:.88rem;color:var(--gray);cursor:pointer}
.tech-check input{width:18px;height:18px;accent-color:var(--blue)}
.tech-gate-guest{margin:.25rem 0 0}
.tech-linkbtn{background:none;border:0;padding:0;color:var(--blue);font:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.tech-linkbtn:hover{color:var(--blue-light)}
.tech-gate-card input:focus{outline:2px solid var(--blue);outline-offset:2px}
.tech-gate-card .btn{justify-content:center}
.tech-gate-foot{font-size:.82rem}
.tech-gate-foot a{color:var(--blue)}
.tech-alert{padding:12px 16px;border-radius:10px;font-size:.9rem;margin:0}
.tech-alert[hidden]{display:none}
.tech-alert.is-error{border:1px solid var(--gray-line);color:var(--white);background:color-mix(in srgb, var(--ambient-violet) 12%, transparent)}

/* ---- chat column (one measure for the log and the composer) ---- */
.tech-chat-column{
    width:100%;max-width:48rem;margin:0 auto;box-sizing:border-box;
    flex:1 1 auto;min-height:0;display:flex;flex-direction:column
}
.tech-chat-log{
    flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-behavior:smooth;
    padding:20px clamp(12px,3vw,24px) 12px;
    display:flex;flex-direction:column;align-items:stretch;gap:16px;width:100%;box-sizing:border-box
}
.tech-msg{align-self:flex-start;width:auto;max-width:100%;box-sizing:border-box;padding:14px 18px;border-radius:16px;font-family:var(--font-body),system-ui,sans-serif;font-size:.95rem;line-height:1.65;overflow-wrap:anywhere}
.tech-msg--user{
    align-self:flex-end;width:fit-content;max-width:min(36rem,85%);margin-left:auto;
    background:var(--blue-a08);border:1px solid var(--blue-a20);color:var(--white);white-space:pre-wrap
}
.tech-msg--user .tech-msg-body{margin:0;max-width:none}
.tech-msg--bot{align-self:flex-start;width:100%;margin-right:auto;background:var(--bg-2);border:1px solid var(--gray-line);color:var(--gray)}
.tech-msg-body>*:first-child{margin-top:0}
.tech-msg-body>*:last-child{margin-bottom:0}
.tech-msg-body p{margin:0 0 .75rem}
.tech-msg-body strong{color:var(--white);font-weight:600}
.tech-msg-body em{color:var(--gray);opacity:.85}
.tech-msg-body .tech-h{margin:.9rem 0 .35rem;font-family:var(--font-display);font-size:1.05rem;color:var(--white)}
.tech-list{margin:0 0 .75rem;padding-left:1.25rem;display:flex;flex-direction:column;gap:.35rem}
.tech-code{font-family:var(--font-data);font-size:.85em;padding:1px 6px;border-radius:6px;background:var(--bg);border:1px solid var(--gray-line);color:var(--white)}
.tech-inline-cite,.tech-tel{color:var(--blue);text-decoration:underline;text-underline-offset:2px;text-decoration-color:var(--blue-a20)}
.tech-inline-cite:hover,.tech-tel:hover{color:var(--blue-light);text-decoration-color:currentColor}
.tech-msg-body .tech-cite-open{
    margin:0 6px 4px 0;vertical-align:middle;text-decoration:none
}
.tech-msg-body .tech-cite-open:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.tech-msg-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;font-family:var(--font-data);font-size:.66rem;letter-spacing:.8px;text-transform:uppercase;color:var(--gray);opacity:.8}
.tech-msg--user .tech-msg-meta{justify-content:flex-end}
.tech-msg-source::before{content:"·";margin-right:8px}
.tech-msg-actions{display:inline-flex;flex:0 0 auto;align-items:center;gap:2px;margin-left:auto}
.tech-msg-action,.tech-msg-copy{
    margin:0;background:transparent;border:0;color:var(--gray);font:inherit;letter-spacing:inherit;text-transform:inherit;
    cursor:pointer;padding:2px 6px;border-radius:6px
}
.tech-msg-action:hover,.tech-msg-copy:hover{color:var(--blue-light)}
.tech-msg-action:focus-visible,.tech-msg-copy:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

/* typing */
.tech-msg--typing{display:flex;align-items:center;gap:12px;color:var(--gray)}
.tech-typing{display:inline-flex;gap:4px}
.tech-typing i{width:6px;height:6px;border-radius:50%;background:var(--blue);opacity:.35;animation:tech-blink 1.2s infinite}
.tech-typing i:nth-child(2){animation-delay:.2s}
.tech-typing i:nth-child(3){animation-delay:.4s}
.tech-typing-label{font-size:.85rem}
@keyframes tech-blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
@media (prefers-reduced-motion:reduce){.tech-typing i{animation:none;opacity:.7}.tech-chat-log{scroll-behavior:auto}}

/* sources */
.tech-cite{margin-top:12px;padding-top:10px;border-top:1px solid var(--gray-line)}
.tech-cite-label{cursor:pointer;list-style:none;font-family:var(--font-data);font-size:.66rem;letter-spacing:1.1px;text-transform:uppercase;color:var(--gray)}
.tech-cite-label::-webkit-details-marker{display:none}
.tech-cite-label::before{content:"▸";display:inline-block;margin-right:6px;transition:transform .15s}
.tech-cite[open] .tech-cite-label::before{transform:rotate(90deg)}
.tech-cite-list{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.tech-cite-item{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:12px;background:var(--bg);border:1px solid var(--gray-line)}
.tech-cite-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 14rem}
.tech-cite-title{color:var(--white);font-weight:600;font-size:.9rem}
.tech-cite-hint{font-size:.8rem;color:var(--gray)}
.tech-cite-hint b{color:var(--blue-light);font-weight:600}
.tech-cite-file{font-family:var(--font-data);font-size:.66rem;color:var(--gray);opacity:.7}
.tech-cite-actions{display:flex;flex-wrap:wrap;gap:8px}
.tech-cite-open,.tech-cite-download{
    display:inline-flex;align-items:center;min-height:34px;padding:6px 12px;border-radius:999px;
    border:1px solid var(--blue-a20);font-size:.82rem;text-decoration:none
}
.tech-cite-open{background:color-mix(in srgb, var(--blue) 12%, transparent);color:var(--blue-light)}
.tech-cite-download{background:var(--bg-2);color:var(--gray)}
.tech-cite a:focus-visible,.tech-inline-cite:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

/* ---- composer zone (pinned bottom, ChatGPT style) ---- */
.tech-composer-zone{
    flex:none;padding:8px clamp(12px,3vw,24px) calc(10px + env(safe-area-inset-bottom,0px));
    background:linear-gradient(to bottom, transparent, var(--bg) 30%)
}
.tech-composer-inner{width:100%;max-width:none;margin:0}
.tech-composer{display:flex;flex-direction:column;gap:6px}
.tech-composer-row{
    display:flex;gap:8px;align-items:flex-end;padding:8px 8px 8px 14px;border-radius:22px;
    border:1px solid var(--gray-line);background:var(--bg-2);box-shadow:0 8px 30px rgba(0,0,0,.08)
}
.tech-composer-row:focus-within{border-color:var(--blue-a20)}
.tech-composer textarea{
    flex:1 1 auto;width:100%;min-height:36px;max-height:220px;padding:8px 0;border:0;
    background:transparent;color:var(--white);font:inherit;font-size:1rem;line-height:1.45;resize:none;overflow-y:hidden;outline:none
}
.tech-composer textarea:disabled{opacity:.6}
.tech-composer-clear{
    flex:none;width:36px;height:36px;border-radius:50%;border:0;background:transparent;color:var(--gray);
    font-size:.85rem;cursor:pointer
}
.tech-composer-clear:hover{color:var(--white);background:var(--bg)}
.tech-send{
    flex:none;width:40px;height:40px;border-radius:50%;border:0;background:var(--white);color:var(--bg);
    font-size:1.15rem;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center
}
.tech-send:hover{background:var(--blue-light);color:var(--bg)}
.tech-send:disabled{opacity:.4;cursor:progress}
.tech-composer-hint{margin:6px 4px 0;font-size:.72rem;color:var(--gray);opacity:.85;text-align:center}
.tech-composer-hint kbd{font-family:var(--font-data);font-size:.66rem;padding:1px 6px;border-radius:5px;border:1px solid var(--gray-line);background:var(--bg-2);color:var(--white)}

/* ---- library ---- */
.tech-panel--library{overflow-y:auto;overscroll-behavior:contain}
.tech-lib-inner{max-width:48rem;margin:0 auto;padding:20px clamp(12px,3vw,24px) 32px;width:100%;box-sizing:border-box}
.tech-lib-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 1.25rem}
.tech-lib-tools input,.tech-lib-tools select{
    min-height:44px;padding:10px 12px;border-radius:12px;border:1px solid var(--gray-line);
    background:var(--bg-2);color:var(--white);font:inherit
}
.tech-lib-tools input{flex:1 1 16rem}
.tech-lib-count{font-family:var(--font-data);font-size:.68rem;letter-spacing:1px;text-transform:uppercase;color:var(--gray)}
.tech-lib-list{display:flex;flex-direction:column;gap:12px}
.tech-lib-item{padding:clamp(18px,2.5vw,24px);border-radius:16px;background:var(--bg-2);border:1px solid var(--gray-line)}
.tech-lib-item-head{display:flex;justify-content:space-between;gap:8px;margin:0 0 .5rem;font-family:var(--font-data);font-size:.66rem;letter-spacing:1.1px;text-transform:uppercase;color:var(--gray)}
.tech-lib-cat{color:var(--blue-light)}
.tech-lib-item h3{margin:0 0 .35rem;font-family:var(--font-display);color:var(--white);font-size:1.12rem}
.tech-lib-item p{margin:0 0 .6rem;color:var(--gray);font-size:.92rem;line-height:1.55}
.tech-lib-use{font-size:.86rem}
.tech-lib-use strong{color:var(--white);font-weight:600}
.tech-lib-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:.5rem}
.tech-empty{padding:24px;border:1px dashed var(--gray-line);border-radius:16px;color:var(--gray)}

/* ---- phones ---- */
@media (max-width:720px){
    /* one-row app bar: logo · Chat|Library · call · lock · theme (logo already links home) */
    .tech-appbar{gap:8px;padding:8px 10px;padding-top:calc(8px + env(safe-area-inset-top,0px))}
    .tech-appbar-brand img{height:30px}
    .tech-appbar-name{display:none}
    .tech-appbar-tabs{flex:1 1 auto;margin-left:0;justify-content:center;gap:0;padding:3px;border-radius:999px;background:var(--bg-2);border:1px solid var(--gray-line)}
    .tech-appbar-tabs .tech-tab{flex:1 1 0;justify-content:center;min-height:32px;padding:5px 10px;border:0;font-size:.82rem}
    .tech-appbar-tabs .tech-tab[aria-selected=true]{background:var(--bg);box-shadow:0 1px 3px rgba(0,0,0,.12)}
    .tech-tab-count{display:none}
    .tech-appbar-actions{margin-left:0;gap:4px}
    .tech-appbar-actions:first-of-type{margin-left:auto}
    .tech-appbtn{min-height:36px;min-width:36px;padding:6px 9px;justify-content:center;gap:0}
    .tech-appbtn span:not(.tech-appbtn-icon){display:none}
    .tech-appbtn-icon{font-size:1.05rem}
    .tech-appbtn--site{display:none}
    .tech-appbtn--icon{padding:6px 9px}

    /* chat column */
    .tech-chat-log{padding:12px 10px 8px;gap:10px}
    .tech-msg{padding:11px 13px;border-radius:14px;font-size:.92rem;line-height:1.5}
    .tech-msg--user{max-width:85%}
    .tech-msg-body p{margin:0 0 .55rem}
    .tech-msg-body .tech-h{margin:.7rem 0 .25rem;font-size:1rem}
    .tech-list{padding-left:1.1rem;gap:.25rem}
    .tech-msg-meta{margin-top:8px;gap:8px}

    /* sources: full-width rows, big tap targets */
    .tech-cite{margin-top:10px;padding-top:8px}
    .tech-cite-list{gap:8px}
    .tech-cite-item{flex-direction:column;align-items:stretch;gap:8px;padding:10px}
    .tech-cite-main{flex:1 1 auto}
    .tech-cite-file{display:none}
    .tech-cite-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
    .tech-cite-actions>a{justify-content:center;min-height:40px;text-align:center}
    .tech-cite-actions>a:only-child{grid-column:1 / -1}
    .tech-cite-actions>a:nth-child(3){grid-column:1 / -1}

    /* composer: compact, keyboard-safe */
    .tech-composer-zone{padding:6px 10px calc(8px + env(safe-area-inset-bottom,0px))}
    .tech-composer-row{padding:6px 6px 6px 12px;border-radius:20px;box-shadow:none}
    .tech-composer textarea{font-size:16px;min-height:34px;max-height:140px;padding:7px 0} /* 16px stops iOS zoom-on-focus */
    .tech-composer-clear{width:32px;height:32px}
    .tech-send{width:38px;height:38px}
    .tech-composer-hint{font-size:.66rem;margin-top:4px;line-height:1.35}
    .tech-hint-keys{display:none}

    /* library */
    .tech-lib-inner{padding:12px 10px 24px}
    .tech-lib-tools{gap:8px;margin-bottom:.9rem}
    .tech-lib-tools input{flex:1 1 100%;font-size:16px}
    .tech-lib-tools select{flex:1 1 auto;font-size:16px}
    .tech-lib-count{flex:0 0 auto}
    .tech-lib-list{gap:10px}
    .tech-lib-item{padding:14px;border-radius:14px}
    .tech-lib-item h3{font-size:1.02rem}
    .tech-lib-item p{font-size:.88rem;line-height:1.5}
    .tech-lib-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
    .tech-lib-actions .btn{justify-content:center;min-height:42px;padding:8px 10px;font-size:.84rem}
    .tech-lib-actions .btn:nth-child(3){grid-column:1 / -1}

    /* PIN gate: top-aligned so the field stays put when the keyboard opens */
    .tech-app-main--center{justify-content:flex-start;padding:28px 12px 16px}
    .tech-gate-card{padding:20px 16px;border-radius:16px}
    .tech-gate-card input[type=password]{font-size:16px}
}

/* tiny phones */
@media (max-width:380px){
    .tech-appbar{gap:6px;padding-left:8px;padding-right:8px}
    .tech-appbar-tabs .tech-tab{padding:5px 8px;font-size:.78rem}
    .tech-appbtn{min-width:34px;padding:6px 7px}
}

/* short landscape phones: give the log the room */
@media (max-height:480px) and (max-width:900px){
    .tech-composer-hint{display:none}
    .tech-chat-log{padding-top:8px}
}

/* ---- context chips + picker ---- */
.tech-context{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.tech-chip{
    display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 10px;border-radius:999px;
    border:1px dashed var(--gray-line);background:transparent;color:var(--gray);font:inherit;font-size:.78rem;cursor:pointer;text-transform:capitalize
}
.tech-chip.is-set{border-style:solid;border-color:var(--blue-a20);background:var(--blue-a08);color:var(--white);text-transform:none}
.tech-chip-x{font-size:1rem;line-height:1;opacity:.7}
.tech-picker{margin:0 0 8px;padding:12px;border-radius:14px;border:1px solid var(--gray-line);background:var(--bg-2);display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.tech-picker[hidden]{display:none}
.tech-picker-label{flex:1 1 100%;margin:0;font-size:.88rem;color:var(--white)}
.tech-picker-opt,.tech-card-opt{
    min-height:38px;padding:6px 12px;border-radius:999px;border:1px solid var(--gray-line);
    background:var(--bg);color:var(--white);font:inherit;cursor:pointer
}
.tech-picker-opt:hover,.tech-card-opt:hover{border-color:var(--blue-a20)}
.tech-picker-input,.tech-card-input{
    min-height:40px;padding:8px 12px;border-radius:10px;border:1px solid var(--gray-line);
    background:var(--bg);color:var(--white);font:inherit;flex:1 1 10rem
}

/* ---- cards + banners + cursor ---- */
.tech-card{margin-top:10px;padding:12px;border-radius:12px;border:1px solid var(--blue-a20);background:color-mix(in srgb, var(--blue) 8%, transparent);display:flex;flex-wrap:wrap;gap:8px}
.tech-card-label{flex:1 1 100%;margin:0;color:var(--white);font-weight:600}
.tech-card-value{flex:1 1 100%;margin:0;color:var(--gray);font-size:.9rem}
.tech-banner{padding:8px 10px;border-radius:10px;margin:0 0 .75rem}
.tech-banner--general{background:color-mix(in srgb, var(--ambient-violet) 14%, transparent);color:var(--white)}
.tech-banner--offline{background:var(--bg);border:1px solid var(--gray-line);color:var(--gray);font-style:italic}
.tech-cursor{display:inline-block;width:8px;height:1.05em;margin-left:2px;background:var(--blue);vertical-align:text-bottom;animation:tech-blink 1s steps(2) infinite}

/* ---- composer tools ---- */
.tech-composer-tools{display:flex;align-items:center;gap:4px;flex:none}
.tech-tool{
    width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:var(--gray);cursor:pointer;
    display:inline-flex;align-items:center;justify-content:center
}
.tech-tool:hover,.tech-tool[aria-pressed=true]{color:var(--blue-light);background:var(--bg)}
.tech-svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tech-send-stop{display:none;width:12px;height:12px;background:var(--bg);border-radius:2px}
.is-pending .tech-send-go{display:none}
.is-pending .tech-send-stop{display:block}
.is-pending .tech-send{background:var(--gray);color:var(--bg);cursor:pointer;opacity:1}
.tech-composer-status{margin:4px 8px 0;font-size:.78rem;color:var(--blue-light)}
.tech-composer-status[hidden]{display:none}

/* ---- history drawer ---- */
.tech-drawer-backdrop[hidden],.tech-drawer[hidden]{display:none !important}
.tech-drawer-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:40}
.tech-drawer{
    position:fixed;top:0;right:0;height:100%;width:min(22rem,100%);z-index:41;
    background:var(--bg-2);border-left:1px solid var(--gray-line);display:flex;flex-direction:column;
    padding:calc(12px + env(safe-area-inset-top,0px)) 14px calc(12px + env(safe-area-inset-bottom,0px))
}
.tech-drawer-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.tech-drawer-head h2{flex:1;margin:0;font-size:1.05rem}
.tech-drawer-who{margin:0 0 8px;font-size:.8rem;color:var(--gray)}
.tech-drawer input[type=search]{
    min-height:40px;margin-bottom:10px;padding:8px 12px;border-radius:10px;border:1px solid var(--gray-line);
    background:var(--bg);color:var(--white);font:inherit
}
.tech-drawer-list{overflow:auto;display:flex;flex-direction:column;gap:8px}
.tech-hist-item{padding:10px 12px;border-radius:12px;border:1px solid var(--gray-line);background:var(--bg)}
.tech-hist-open{display:block;width:100%;text-align:left;background:none;border:0;color:var(--white);font:inherit;font-weight:600;cursor:pointer}
.tech-hist-meta{display:block;font-size:.72rem;color:var(--gray);margin:4px 0}

/* ---- library pills ---- */
.tech-lib-pills{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.tech-lib-pill{
    min-height:32px;padding:4px 10px;border-radius:999px;border:1px solid var(--gray-line);
    background:transparent;color:var(--gray);font:inherit;font-size:.78rem;cursor:pointer
}
.tech-lib-pill.is-on{background:var(--blue-a08);border-color:var(--blue-a20);color:var(--white)}
.tech-lib-brand{color:var(--gray)}

@media (max-width:720px){
    .tech-gate-card input[type=text]{font-size:16px}
    .tech-drawer{width:100%}
    .tech-chip{min-height:36px}
    .tech-card-opt,.tech-picker-opt{min-height:42px;flex:1 1 calc(50% - 8px)}
}
