/* ticket.css — one layout for every ticket screen (Starlink install ticket in loreatec.html,
   IT tickets for the operator, the IT partner and the client).
   Pattern taken from the service-desk tools operators already know (Zendesk, Freshdesk,
   Jira Service Management): a header that always shows WHAT this is, its STATUS and the
   primary actions; a progress stepper; the work itself in a wide main column; the ticket's
   properties (customer, assignee, dates, money) in a side panel; destructive actions last.
   (E2E review 2026-09-24: the old ticket was one 760px column of ~20 stacked sections.) */

/* The ticket opened under its line in the request list (accordion, 2026-10-06) instead of over the page. */
tr.tk-inline-row>td{padding:0!important;white-space:normal;background:#eef4fc!important;cursor:default}
tr.tk-open-row>td{background:#dbeafe!important}
tr.tk-open-row{scroll-margin-top:72px}
/* the same under a box (the chat view's conversation card, 2026-10-08) */
.tk-inline-box{margin:-.35rem 0 .75rem}
.tk-inline-box>.tk-inline{position:static;padding:0}
div.tk-open-row{border-color:#086ad8!important;background:#eef4fc;scroll-margin-top:72px}
.tk-inline{position:sticky;left:0;box-sizing:border-box;padding:6px 4px 12px;white-space:normal;font-weight:400}
.tk-inline .tk-shell{width:auto;max-height:none;overflow:visible;border:2px solid #086ad8;border-radius:12px;box-shadow:0 6px 18px rgba(15,23,42,.12)}
.tk-inline .tk-body{overflow:visible}
.tk-overlay{position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:9998;display:flex;align-items:center;justify-content:center;padding:1rem}
.tk-shell{display:flex;flex-direction:column;background:#fff;border-radius:14px;width:min(1280px,96vw);max-height:92vh;overflow:hidden;box-shadow:0 20px 50px rgba(15,23,42,.25)}
.tk-inline{width:100%;max-height:none;box-shadow:none;border:1px solid var(--border,#e4e7ec)}
.tk-head{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;padding:14px 20px;border-bottom:1px solid var(--border,#e4e7ec);background:#fff}
.tk-title{font-size:1.05rem;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.tk-id{font-size:.75rem;font-weight:500;color:#667085;margin-inline-start:.35rem;white-space:nowrap}
.tk-meta{display:flex;gap:.35rem .8rem;flex-wrap:wrap;align-items:center;margin-top:.35rem;font-size:.8rem;color:#667085}
.tk-actions{display:flex;gap:.4rem;flex-wrap:wrap;align-items:center}
/* In the modal the body scrolls; header and stepper must never be squeezed by it. */
.tk-head,.tk-steps{flex-shrink:0}
.tk-actions .kt-btn{margin:0}

.tk-steps{display:flex;padding:10px 20px 12px;border-bottom:1px solid var(--border,#e4e7ec);background:#f9fafb;overflow-x:auto}
.tk-step{flex:1 0 82px;text-align:center;font-size:.72rem;color:#98a2b3;position:relative;padding-top:20px;white-space:nowrap}
.tk-step::before{content:"";position:absolute;top:4px;left:50%;width:12px;height:12px;border-radius:50%;background:#d0d5dd;transform:translateX(-50%);z-index:1;box-sizing:border-box;border:2px solid #fff}
.tk-step::after{content:"";position:absolute;top:9px;left:-50%;width:100%;height:2px;background:#e4e7ec}
.tk-step:first-child::after{display:none}
.tk-step.done{color:#344054}
.tk-step.done::before,.tk-step.done::after,.tk-step.cur::after{background:#12b76a}
.tk-step.cur{color:#086ad8;font-weight:700}
.tk-step.cur::before{background:#086ad8;box-shadow:0 0 0 4px rgba(8,106,216,.18)}
.tk-step.halt::before{background:#f79009;box-shadow:0 0 0 4px rgba(247,144,9,.2)}
.tk-step.halt{color:#b54708}

.tk-body{display:grid;grid-template-columns:minmax(0,1fr) 340px;overflow:auto;flex:1;min-height:0;background:#f9fafb}
.tk-main{padding:14px 18px;min-width:0}
.tk-side{padding:14px 14px 14px 0;min-width:0}
.tk-sec{background:#fff;border:1px solid var(--border,#e4e7ec);border-radius:12px;padding:12px 14px;margin-bottom:12px;min-width:0}
.tk-sec:empty{display:none}
.tk-sec > .font-semibold:first-child,.tk-sec > div:first-child > .font-semibold:first-child{margin-top:0}
.tk-sec h4,.tk-h{font-size:.82rem;font-weight:700;color:#344054;margin:0 0 .5rem}
.tk-danger{border-color:#fecaca;background:#fffafa}
.tk-nav{display:flex;gap:.35rem;flex-wrap:wrap;margin-bottom:12px}
.tk-nav button{font-size:.74rem;padding:.2rem .65rem;border:1px solid var(--border,#e4e7ec);border-radius:999px;color:#344054;background:#fff;cursor:pointer}
.tk-nav button:hover{border-color:#086ad8;color:#086ad8}
.tk-dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.3rem .8rem;font-size:.84rem;margin:0}
.tk-dl dt{color:#667085;white-space:nowrap}
.tk-dl dd{margin:0;min-width:0;overflow-wrap:anywhere}
.tk-desc{white-space:pre-wrap;font-size:.92rem;line-height:1.65}
.tk-fold{margin-top:.4rem;font-size:.8rem;color:#667085}
.tk-thread{display:flex;flex-direction:column;gap:.55rem}
.tk-msg{border:1px solid var(--border,#e4e7ec);border-radius:10px;padding:.55rem .7rem;background:#fff}
.tk-msg.me{background:#f0f7ff;border-color:#cfe3fb}
.tk-msg-h{font-size:.74rem;color:#667085;display:flex;gap:.4rem;flex-wrap:wrap;align-items:center;margin-bottom:.2rem}
.tk-msg-b{font-size:.88rem;white-space:pre-wrap;overflow-wrap:anywhere}
.tk-composer{margin-top:.6rem;background:#f4f6f9;border-radius:10px;padding:.6rem}
.tk-composer textarea{width:100%;border:1px solid var(--border,#e4e7ec);border-radius:8px;padding:.5rem;font:inherit;resize:vertical;background:#fff}
.tk-row{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.tk-spacer{margin-inline-start:auto}
.tk-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:.5rem}
.tk-kpi{border:1px solid var(--border,#e4e7ec);border-radius:10px;padding:.45rem .6rem;background:#fff}
.tk-kpi small{display:block;color:#667085;font-size:.72rem}
.tk-kpi b{font-size:.95rem}

@media (max-width:960px){
  .tk-body{grid-template-columns:1fr}
  .tk-side{padding:0 18px 14px}
}

/* Partner job list (requests.js pJobCard, 2026-10-05): one line per job, the card opens on click. */
details.pjob > summary::-webkit-details-marker { display: none; }
details.pjob > summary::before { content: "\25B8"; color: var(--muted-foreground, #64748b); font-size: .8rem; }
details.pjob[open] > summary::before { content: "\25BE"; }
@media (max-width: 520px) { details.pjob .pjob-staff { display: none; } }

/* ---- 2026-10-12 (owner: "more like the installer form … clear, easy to use and pleasing to the eye") ---- */
.tk-body{background:#f6f7fb}
.tk-sec{border:1px solid #e9ecf2;border-radius:14px;padding:14px 16px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.tk-sec > .font-semibold:first-child,.tk-sec > div:first-child > .font-semibold:first-child,.tk-sec .font-semibold.mt-3{font-size:.95rem;color:#101828;display:flex;align-items:center;gap:.4rem}
.tk-sec .text-xs.text-muted-foreground{line-height:1.5}
.tk-info{flex:none;width:18px;height:18px;border-radius:50%;border:1px solid #c7cdd8;background:#fff;color:#667085;font:600 11px/16px system-ui,sans-serif;font-style:italic;cursor:pointer;padding:0;display:inline-flex;align-items:center;justify-content:center}
.tk-info[aria-expanded="true"]{background:#086ad8;border-color:#086ad8;color:#fff}
.tk-hint{background:#f8fafc;border-radius:8px;padding:.45rem .6rem;margin:.2rem 0 .5rem}
.tk-seg{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem;margin:0 0 .6rem}
.tk-seg-l{font-size:.75rem;color:#667085;margin-right:.2rem}
.tk-seg-b{border:1px solid #d0d5dd;background:#fff;color:#344054;border-radius:999px;padding:.25rem .7rem;font-size:.8rem;cursor:pointer}
.tk-seg-b.on{background:#eff6ff;border-color:#086ad8;color:#0b4fa3;font-weight:600}
.tk-seg-b:disabled{opacity:.6;cursor:default}
.tk-fold > summary{cursor:pointer;color:#086ad8;font-weight:600;font-size:.88rem;list-style:none;display:inline-flex;align-items:center;gap:.35rem;padding:.35rem .7rem;border:1px solid #cfe0f7;border-radius:999px;background:#f5f9ff}
.tk-fold > summary::-webkit-details-marker{display:none}
.tk-fold[open] > summary{margin-bottom:.5rem}
.tk-more > summary{cursor:pointer;font-weight:600;color:#344054;list-style:none;padding:.15rem 0}
.tk-more > summary::-webkit-details-marker{display:none}
.tk-more-i{border-top:1px solid #eef0f4;padding-top:.6rem;margin-top:.6rem}
.tk-more-i > div > .font-semibold:first-child,.tk-more-i .font-semibold.mt-3{margin-top:0}
.tk-more .tk-danger{background:#fff5f5;border-radius:10px;padding:.5rem .6rem}

/* Partner Starlink page: the month calendar on top (requests.js loadPCal, 2026-10-14) — each booked visit inside its day. */
.pcal > summary::-webkit-details-marker{display:none}
.pcal > summary{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap}
.pcal > summary .kt-card-title::before{content:"\25BE";color:#64748b;font-size:.8rem;margin-inline-end:.35rem}
.pcal:not([open]) > summary .kt-card-title::before{content:"\25B8"}
.pcal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.pcal-wd{font-size:.72rem;font-weight:600;color:#667085;text-align:center;padding:.15rem 0}
.pcal-d{min-height:78px;border:1px solid #e9ecf2;border-radius:8px;padding:3px;background:#fff;min-width:0;display:flex;flex-direction:column;gap:2px}
.pcal-pad{background:#f8fafc;border-style:dashed}
.pcal-has{background:#fcfdff}
.pcal-today{outline:2px solid #086ad8;outline-offset:-2px}
.pcal-n{font-size:.75rem;font-weight:600;display:flex;justify-content:space-between;align-items:center}
.pcal-c{font-size:.65rem;font-weight:700;background:#086ad8;color:#fff;border-radius:999px;padding:0 .35rem;line-height:1.35}
.pcal-job{display:block;width:100%;text-align:left;border:0;border-left:3px solid #64748b;border-radius:4px;padding:1px 4px;font-size:.7rem;line-height:1.3;color:#101828;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcal-job:hover,.pcal-job:focus-visible{filter:brightness(.95);text-decoration:underline}
.pcal-job.urg{color:#b91c1c;font-weight:600}
.pcal-sw{display:inline-block;width:.9rem;height:.9rem;border-radius:3px;border:1px solid;border-left-width:4px;vertical-align:-2px;margin-inline-end:.3rem}
/* the agenda (2026-10-18): one line per day that has a visit — the date, then its visits side by side */
.pcal-list{display:flex;flex-direction:column;gap:4px}
.pcal-row{display:grid;grid-template-columns:7.5rem minmax(0,1fr);gap:.5rem;align-items:start;border:1px solid #e9ecf2;border-radius:8px;padding:5px 7px;background:#fff}
.pcal-row.pcal-past{background:#fafbfc}
.pcal-row.pcal-today{outline:2px solid #086ad8;outline-offset:-2px}
.pcal-date{font-size:.82rem;font-weight:600;white-space:nowrap;padding-top:2px}
.pcal-jobs{display:flex;flex-wrap:wrap;gap:4px;min-width:0}
.pcal-jobs .pcal-job{width:auto;max-width:100%;font-size:.78rem;padding:2px 7px}
.pcal-who{color:#475467;font-weight:400}
@media (max-width:560px){
  .pcal-row{grid-template-columns:1fr;gap:3px}
  .pcal-d{min-height:58px;padding:2px;border-radius:6px}
  .pcal-job{font-size:.62rem;padding:1px 2px;border-left-width:2px}
  .pcal-urg{display:none}
  .pcal .kt-card-content{padding:.6rem}
}
/* Partner Starlink page: the job map above the calendar (requests.js loadPMap, 2026-10-15) — layer chips, pins coloured by
   layer (an offer a diamond, an area ticket a small dot, a special one with its mark), a photo card on hover. */
.pmap > summary::-webkit-details-marker{display:none}
.pmap > summary{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap}
.pmap > summary .kt-card-title::before{content:"\25BE";color:#64748b;font-size:.8rem;margin-inline-end:.35rem}
.pmap:not([open]) > summary .kt-card-title::before{content:"\25B8"}
.pmap-chips{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;margin-bottom:.6rem}
.pmap-chip{display:inline-flex;align-items:center;gap:.35rem;border:1px solid #e6e9ef;border-radius:999px;padding:.28rem .7rem;font-size:.8rem;cursor:pointer;background:#fff;user-select:none;min-height:32px}
.pmap-chip:has(input:not(:checked)){opacity:.55}
.pmap-chip input{margin:0;accent-color:#086ad8}
.pmap-chip b{font-variant-numeric:tabular-nums;color:#101828}
.pmap-sw{width:.72rem;height:.72rem;border-radius:50%;display:inline-block}
.pmap-sw.area{border:1.5px solid #111827}
.pmap-el{height:420px;border:1px solid #e6e9ef;border-radius:12px;z-index:0;background:#bed2ff}
.pmap-pin{width:22px;height:22px;border-radius:50%;background:var(--c);border:2px solid #fff;box-shadow:0 1px 4px rgba(15,23,42,.45);color:#fff;
  font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;line-height:1;margin:1px}
.pmap-pin.offer{border-radius:4px;transform:rotate(45deg) scale(.88)}
.pmap-pin.offer > span{transform:rotate(-45deg)}
/* yellow, a black rim and a white halo: apart from the yellow prefectural roads of the closer zooms too */
.pmap-pin.area{width:16px;height:16px;margin:4px;border-color:#111827;box-shadow:0 0 0 2px #fff,0 1px 5px rgba(15,23,42,.55)}
.pmap-pin > span{font-size:10px}
.pmap-base{width:12px;height:12px;background:#111827;border:2px solid #fff;box-shadow:0 0 0 1px #111827}
.leaflet-tooltip.pmap-tt{padding:0;border-radius:12px;border:1px solid #e6e9ef;box-shadow:0 12px 32px rgba(15,23,42,.2);white-space:normal}
.pmap-pop .leaflet-popup-content{margin:0;width:auto!important}
.pmap-pop .leaflet-popup-content-wrapper{border-radius:12px;padding:0}
.pmap-tip{display:flex;gap:.6rem;padding:.55rem;width:290px;max-width:78vw;font-size:.78rem;line-height:1.45;color:#101828}
.pmap-tip img,.pmap-noimg{width:84px;height:84px;object-fit:cover;border-radius:8px;flex:none;background:#f1f5f9}
.pmap-noimg{display:flex;align-items:center;justify-content:center;font-size:1.3rem;color:#94a3b8}
.pmap-tx{min-width:0}
.pmap-tx b{font-size:.86rem;font-variant-numeric:tabular-nums}
.pmap-st{color:#086ad8;font-weight:600}
.pmap-why{color:#b91c1c;font-weight:600}
.pmap-flash{box-shadow:0 0 0 3px #086ad8!important;transition:box-shadow .3s}
@media (max-width:560px){
  .pmap-el{height:320px}
  .pmap .kt-card-content{padding:.6rem}
  .pmap-chip{font-size:.74rem;padding:.24rem .55rem}
}
/* エリアの案件: filters (2026-10-14) */
.ap-filters{display:flex;gap:.5rem;flex-wrap:wrap;align-items:flex-end;margin:.25rem 0 .6rem}
.ap-filters label{font-size:.72rem;color:#667085;display:flex;flex-direction:column;gap:.15rem}
.ap-filters input,.ap-filters select{border:1px solid var(--border,#e4e7ec);border-radius:8px;padding:.3rem .45rem;font:inherit;font-size:.85rem;background:#fff;color:inherit}

/* Parts chosen from pictures (stock.js picker, 2026-10-15): the row's chosen part, the grid of every part */
.stkp-row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:flex-end;margin-bottom:.6rem;padding:.55rem;border:1px solid #e9ecf2;border-radius:12px;background:#fff}
.stkp-pick{display:flex;align-items:center;gap:.6rem;width:100%;text-align:left;border:1px solid var(--border,#e4e7ec);border-radius:10px;padding:.3rem .5rem;background:#fff;cursor:pointer;min-width:0;margin-top:.15rem;color:inherit}
.stkp-pick:hover{border-color:#086ad8}
.stkp-pick[aria-expanded="true"]{border-color:#086ad8;box-shadow:0 0 0 3px rgba(8,106,216,.12)}
.stkp-pick-t{min-width:0;flex:1;display:flex;flex-direction:column;line-height:1.3}
.stkp-pick-t b{font-weight:600;font-size:.88rem;color:#101828;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stkp-pick-t small{font-size:.72rem;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stkp-chev{flex:none;color:#667085;font-size:.8rem}
.stkp-thumb{flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#f4f6f9;object-fit:contain;overflow:hidden}
.stkp-noimg{font-size:1.15rem;color:#98a2b3}
.stkp-panel{flex-basis:100%;border:1px solid #cfe0f7;background:#f8fbff;border-radius:12px;padding:.6rem}
.stkp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:.5rem;max-height:380px;overflow:auto;padding:2px}
.stkp-card{display:flex;flex-direction:column;align-items:stretch;gap:.2rem;text-align:left;border:1px solid #e4e7ec;border-radius:10px;background:#fff;padding:.4rem;cursor:pointer;color:inherit;min-width:0}
.stkp-card:hover,.stkp-card:focus-visible{border-color:#086ad8}
.stkp-card.on{border-color:#086ad8;box-shadow:inset 0 0 0 2px #086ad8}
.stkp-img{aspect-ratio:4/3;border-radius:8px;background:#f4f6f9;display:flex;align-items:center;justify-content:center;overflow:hidden}
.stkp-img .stkp-noimg{font-size:1.8rem;background:none}
.stkp-name{font-size:.8rem;font-weight:600;line-height:1.3;color:#101828;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.stkp-no{font-size:.7rem;color:#667085}
.stkp-stock{font-size:.7rem;color:#166534;font-weight:600}
.stkp-stock.none{color:#b45309}
/* Google + Yahoo! map links beside an address (requests.js mapsA, partner.html week plan; 2026-10-15) */
.maplinks{display:inline-flex;gap:.3rem;flex-wrap:wrap;vertical-align:middle;margin-inline-start:.35rem}
.maplink{display:inline-flex;align-items:center;font-size:.72rem;font-weight:600;line-height:1;padding:.28rem .5rem;border-radius:999px;border:1px solid #cfe0f7;background:#f5f9ff;color:#0b4fa3;white-space:nowrap;text-decoration:none}
.maplink:hover{background:#e8f1fd}
.maplink.y{border-color:#f7c9d2;background:#fff5f7;color:#c4002b}
.maplink.y:hover{background:#ffe9ee}

/* ==== The Starlink ticket, 2026-10-16 redesign (owner: "la información muy amontonada … se pierde mucho espacio … over the
   place y confuso"; docs/UI-TICKET-REDESIGN.md). Scoped to .tk-sl so the IT tickets that share this file do not move.
   A strip of the facts asked first, six chapters (one card each, blocks split by a rule) under a bar that marks the chapter
   in view, a white side panel; in the modal the work and the side panel scroll on their own. ==== */
.tk-overlay .tk-sl .tk-body{grid-template-columns:minmax(0,1fr) 360px;grid-template-rows:minmax(0,1fr);overflow:hidden}
.tk-overlay .tk-sl .tk-main,.tk-overlay .tk-sl .tk-side{overflow-y:auto;overscroll-behavior:contain;min-height:0}
/* no padding on top of the scrolling column: a sticky bar sticks under its padding, so the space goes on the first child */
.tk-sl .tk-main{padding:0 22px 32px}
.tk-sl .tk-main > :first-child{margin-top:18px}
.tk-sl .tk-side{padding:0;background:#fff;border-left:1px solid var(--lt-line,#e6e9ef)}
/* the side panel: sections on white, split by a rule (no cards in a card) */
.tk-sl .tk-side .tk-sec{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;margin:0!important;padding:16px 18px!important;border-bottom:1px solid var(--lt-line,#e6e9ef)!important}
.tk-sl .tk-side-b:not(:has(> .tk-sec)){display:none}
.tk-sl .tk-side .tk-sec .font-semibold.mt-3:first-child,.tk-sl .tk-side .tk-sec > div:first-child > .font-semibold.mt-3:first-child{margin-top:0}
.tk-sl .tk-side .tk-more{border:0}
/* the note to the installer: first, on blue */
.tk-sl .tk-side .tk-tnote{background:#f5f9ff!important}
.tk-note{white-space:pre-wrap;overflow-wrap:anywhere;background:#eff6ff;border-left:4px solid #086ad8;border-radius:8px;padding:.55rem .7rem;font-size:.9rem;line-height:1.6;color:#0f2c55}
.tk-sl .tk-side .tk-tnote .tk-note{background:#fff}
/* the facts strip */
.tk-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));background:#fff;border:1px solid var(--lt-line,#e6e9ef);border-radius:16px;box-shadow:0 1px 2px rgba(16,24,40,.04);margin:0 0 16px;overflow:hidden}
.tk-fact{padding:12px 16px;min-width:0;border-left:1px solid var(--lt-line,#e6e9ef);border-top:1px solid var(--lt-line,#e6e9ef);margin:-1px 0 0 -1px}
.tk-fact-l{font-size:.74rem;font-weight:600;color:var(--lt-muted,#5b6472);letter-spacing:.03em;margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-fact-v{font-size:1rem;font-weight:700;color:var(--lt-ink,#101828);line-height:1.35;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.tk-fact-v small{display:block;font-size:.78rem;font-weight:500;color:var(--lt-muted,#5b6472);margin-top:.1rem}
.tk-fact-v .tk-none,.tk-sl .tk-none{color:#98a2b3;font-weight:600}
.tk-fact-v .tk-ok{color:#0a7a3d}
.tk-sign{display:inline-block;font-size:.88rem;margin-right:.7rem;white-space:nowrap}
/* the alerts: one shape whatever their colour */
.tk-alerts > div{border-radius:12px!important;padding:.65rem .85rem!important;margin:0 0 .6rem!important;font-size:.88rem;line-height:1.55}
.tk-alerts{margin-bottom:6px}
/* the chapter bar: sticky, one row, the chapter in view marked */
.tk-sl .tk-nav{position:sticky;top:0;z-index:4;display:flex;flex-wrap:nowrap;gap:2px;overflow-x:auto;scrollbar-width:none;margin:0 -22px 14px;padding:10px 22px 8px;
  background:var(--lt-canvas,#f4f6f9);box-shadow:0 1px 0 rgba(16,24,40,.06)}
.tk-sl .tk-nav::-webkit-scrollbar{display:none}
.tk-sl .tk-nav button{flex:none;border:0;background:transparent;color:var(--lt-muted,#5b6472);font-weight:600;font-size:.84rem;padding:.42rem .8rem;border-radius:999px;cursor:pointer;white-space:nowrap}
.tk-sl .tk-nav button:hover{color:var(--lt-ink,#101828);background:#fff}
.tk-sl .tk-nav button.on{background:#fff;color:var(--lt-brand,#086ad8);box-shadow:0 1px 3px rgba(16,24,40,.12)}
/* chapters: a quiet title over one card; the blocks inside split by a rule */
.tk-ch{margin:0 0 22px;scroll-margin-top:58px}
.tk-ch:not(:has(.tk-sec:not(:empty))){display:none}
.tk-ch-t{font-size:.8rem;font-weight:700;color:#475467;letter-spacing:.05em;margin:0 0 .5rem .25rem}
.tk-ch-c{background:#fff;border:1px solid var(--lt-line,#e6e9ef);border-radius:16px;box-shadow:0 1px 2px rgba(16,24,40,.04);overflow:hidden}
.tk-sl .tk-ch-c > .tk-sec{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;margin:0!important;padding:16px 20px!important}
.tk-sl .tk-ch-c > .tk-sec:not(:empty) ~ .tk-sec:not(:empty){border-top:1px solid #eef1f5!important}
.tk-sl .tk-ch-c .font-semibold.mt-3{font-size:.95rem;font-weight:700;color:var(--lt-ink,#101828)}
.tk-sl .tk-ch-c > .tk-sec > .font-semibold.mt-3:first-child,.tk-sl .tk-ch-c > .tk-sec > div:first-child > .font-semibold.mt-3:first-child{margin-top:0}
/* label / value rows in the work column: a tidy two-column list, two lists side by side on a wide screen */
.tk-sl .tk-main .kv{display:grid;grid-template-columns:minmax(6.5em,11em) minmax(0,1fr);gap:.1rem .9rem;padding:.32rem 0;border-bottom:1px solid #f2f4f7;line-height:1.55}
.tk-sl .tk-main .kv > .text-muted-foreground:first-child{font-size:.8rem;padding-top:.08rem}
.tk-sl .tk-main .kv-v{min-width:0;overflow-wrap:anywhere}
.tk-sl .tk-main .text-sm:has(> .kv){display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));column-gap:2rem;line-height:1.55!important}
.tk-sl .tk-main .text-sm:has(> .kv:only-child){display:block}
.tk-sl .tk-main .kv:only-child{border-bottom:0}
/* a value with its 「変更」 on the right; the form under it once opened */
.tk-sl .tk-row{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.tk-ed{margin-top:.6rem;padding:.75rem;border:1px solid #d9e8fd;background:#f8fbff;border-radius:12px}
.tk-ed[hidden]{display:none!important}
/* buttons in the side panel wrap instead of running past it; pills in a table stay on one line */
.tk-sl .tk-side .kt-btn{white-space:normal;height:auto;min-height:2rem;text-align:left;line-height:1.35}
.tk-sl .kt-table .kt-badge{white-space:nowrap}
/* 日程を取り消す: a red pill like the blue 日程を変更 one, not a bare red link */
.tk-sl #odUnbook > summary{display:inline-flex;align-items:center;gap:.35rem;padding:.35rem .7rem;border:1px solid #fecaca;border-radius:999px;background:#fff5f5;list-style:none;font-size:.85rem!important}
.tk-sl #odUnbook > summary::-webkit-details-marker{display:none}
.tk-sl #odUnbook[open] > summary{margin-bottom:.4rem}
/* the chat reads like a conversation box inside its card */
.tk-sl #tkChat > .text-sm[style*="max-height:280px"]{max-height:420px!important;background:#fcfdfe}
/* a ticket open under its list line: the page scrolls, the bar is not sticky */
.tk-inline .tk-sl .tk-nav{position:static;margin:0 0 14px;padding:0;background:none;backdrop-filter:none}
.tk-inline .tk-sl .tk-side{border-left:1px solid var(--lt-line,#e6e9ef)}

@media (max-width:960px){
  .tk-overlay .tk-sl .tk-body{display:flex;flex-direction:column;overflow-y:auto}
  .tk-overlay .tk-sl .tk-main,.tk-overlay .tk-sl .tk-side{overflow:visible}
  /* each part keeps its whole height in the one scrolling column (min-height:0 above let the work column shrink under the rest) */
  .tk-sl .tk-main,.tk-sl .tk-side-a,.tk-sl .tk-side-b{flex:none;min-height:auto!important}
  /* a phone / narrow window: the note and the customer first, then the work, then the rest of the side */
  .tk-sl .tk-side{display:contents}
  .tk-sl .tk-side-a{order:-1;background:#fff;border-bottom:1px solid var(--lt-line,#e6e9ef)}
  .tk-sl .tk-side-b{order:1;background:#fff;border-top:1px solid var(--lt-line,#e6e9ef)}
  .tk-sl .tk-nav{top:0}
  .tk-inline .tk-sl .tk-body{display:flex;flex-direction:column}
}
@media (max-width:640px){
  .tk-sl .tk-main{padding:0 10px 20px!important}
  .tk-sl .tk-main > :first-child{margin-top:12px}
  .tk-sl .tk-nav{margin:0 -10px 12px;padding:8px 10px}
  .tk-sl .tk-ch-c > .tk-sec{padding:14px!important}
  .tk-sl .tk-side .tk-sec{padding:14px!important}
  .tk-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tk-fact{padding:10px 12px}
  .tk-sl .tk-main .kv{grid-template-columns:minmax(0,1fr);gap:0}
}
