/* Attach */
.kat-root{position:fixed;inset:0;z-index:2147483100;display:none}
.kat-root.is-open{display:block}
.kat-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);opacity:0;transition:opacity .22s}
.kat-sheet{position:absolute;left:0;right:0;bottom:0;margin:0 auto;max-width:560px;height:min(74dvh,660px);background:var(--card,#fff);color:var(--text,#1c1c1e);border-radius:28px 28px 0 0;transform:translateY(100%);transition:transform .26s cubic-bezier(.2,.8,.2,1);display:flex;flex-direction:column;overflow:hidden;direction:rtl;box-shadow:0 -8px 40px rgba(0,0,0,.28)}
.kat-root.is-shown .kat-backdrop{opacity:1}
.kat-root.is-shown .kat-sheet{transform:translateY(0)}
.kat-sheet.is-drag{transition:none}
.kat-handle{flex:0 0 auto;padding:12px 0 8px;touch-action:none;cursor:grab}
.kat-handle i{display:block;width:42px;height:5px;border-radius:3px;background:var(--border,#d1d1d6);margin:0 auto}
.kat-body{flex:1;min-height:0;overflow-y:auto;padding:4px 8px calc(112px + env(safe-area-inset-bottom,0px));-webkit-overflow-scrolling:touch}
.kat-panel{display:none}
.kat-panel.is-active{display:block}
.kat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
.kat-tile{aspect-ratio:1;border:0;border-radius:14px;background:color-mix(in srgb,var(--text,#1c1c1e) 8%,var(--card,#fff));color:var(--text,#1c1c1e);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;padding:8px;text-align:center}
.kat-tile svg{width:34px;height:34px;fill:none;stroke:var(--p,#007aff);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.kat-tile:active,.kat-tab:active,.kat-action:active{transform:scale(.96)}
.kat-hero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px;padding:26px 18px}
.kat-hero-ic{width:76px;height:76px;border-radius:50%;background:color-mix(in srgb,var(--p,#007aff) 14%,transparent);color:var(--p,#007aff);display:flex;align-items:center;justify-content:center}
.kat-hero-ic svg{width:36px;height:36px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.kat-hero h3{margin:0;font-size:17px}
.kat-hero p{margin:0;font-size:13px;color:var(--sub,#8e8e93);line-height:1.8;max-width:320px}
.kat-action{border:0;border-radius:16px;background:var(--p,#007aff);color:#fff;font:inherit;font-size:14px;font-weight:800;padding:13px 22px;min-width:200px;cursor:pointer}
.kat-action[disabled]{opacity:.55;cursor:default}
.kat-action.is-alt{background:color-mix(in srgb,var(--text,#1c1c1e) 10%,var(--card,#fff));color:var(--text,#1c1c1e)}
.kat-status{min-height:20px;font-size:12.5px;color:var(--sub,#8e8e93)}
.kat-status.is-error{color:var(--red,#ff3b30)}
.kat-form{display:flex;flex-direction:column;gap:10px;width:100%;max-width:340px}
.kat-form label{font-size:12.5px;font-weight:700;text-align:right;color:var(--sub,#8e8e93)}
.kat-form input{width:100%;box-sizing:border-box;height:46px;border-radius:14px;border:1px solid var(--border,#e7e7eb);background:color-mix(in srgb,var(--text,#1c1c1e) 8%,var(--card,#fff));color:var(--text,#1c1c1e);padding:0 14px;font:inherit;font-size:15px;margin:0}
.kat-tabs{position:absolute;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));display:flex;gap:2px;padding:6px;border-radius:34px;background:color-mix(in srgb,var(--card,#fff) 86%,transparent);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 8px 28px rgba(0,0,0,.24),0 0 0 1px var(--border,#e7e7eb);overflow-x:auto;scrollbar-width:none;z-index:2}
.kat-tabs::-webkit-scrollbar{display:none}
.kat-tab{flex:1 0 auto;min-width:66px;border:0;background:none;color:var(--text,#1c1c1e);border-radius:28px;padding:8px 10px 7px;display:flex;flex-direction:column;align-items:center;gap:4px;font:inherit;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}
.kat-tab svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.kat-tab[aria-selected="true"]{background:color-mix(in srgb,var(--p,#007aff) 16%,transparent);color:var(--p,#007aff)}
.kat-tab:focus-visible,.kat-tile:focus-visible,.kat-action:focus-visible{outline:2px solid var(--p,#007aff);outline-offset:2px}
#dm-attach-btn{flex-shrink:0;width:40px;height:40px;border-radius:50%;border:0;background:var(--bg);display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--p);padding:0}
@media (prefers-reduced-motion:reduce){.kat-sheet,.kat-backdrop{transition:none}}
/* Map */
.krm{position:relative;overflow:hidden;background:#e8e6df;touch-action:none;user-select:none;-webkit-user-select:none;direction:ltr;cursor:grab}
.krm-tiles,.krm-over{position:absolute;inset:0;pointer-events:none}
.krm-tile{position:absolute;left:0;top:0;max-width:none;opacity:0;transition:opacity .18s;pointer-events:none;will-change:transform}
.krm-tile.is-ready{opacity:1}
.krm-over>*{position:absolute;left:0;top:0;will-change:transform}
.krm-attr{position:absolute;left:6px;bottom:4px;font-size:10px;color:#333;background:rgba(255,255,255,.7);padding:1px 5px;border-radius:6px;pointer-events:none;z-index:2}
.krm-pin{width:0;height:0}
.krm-pin svg{max-width:none;stroke:none;position:absolute;left:-14px;top:-40px;width:28px;height:40px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.35))}
.krm-dot{width:0;height:0}
.krm-dot::after{content:"";position:absolute;left:-8px;top:-8px;width:16px;height:16px;border-radius:50%;background:#4285f4;border:3px solid #fff;box-sizing:border-box;box-shadow:0 1px 4px rgba(0,0,0,.35)}
.krm-acc{border-radius:50%;background:rgba(66,133,244,.16);border:1px solid rgba(66,133,244,.5);box-sizing:border-box}
.krm-btn{position:absolute;width:44px;height:44px;border-radius:50%;border:0;background:#fff;color:#1a73e8;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(0,0,0,.28);cursor:pointer;padding:0;z-index:3}
.krm-btn svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.krm-btn:active{transform:scale(.94)}
.kat-loc{display:flex;flex-direction:column;gap:12px;padding:0 4px}
.kat-map{height:230px;margin:0 -8px;border-radius:0}
.kat-map-layers{right:12px;top:12px}
.kat-map-locate{right:12px;bottom:12px}
.kat-centerpin{position:absolute;left:50%;top:50%;width:0;height:0;pointer-events:none;z-index:2}
.kat-centerpin svg{max-width:none;stroke:none;position:absolute;left:-14px;top:-40px;width:28px;height:40px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.35))}
.kat-loc-card{background:color-mix(in srgb,var(--text,#1c1c1e) 6%,var(--card,#fff));border-radius:18px;padding:6px 8px;display:flex;flex-direction:column}
.kat-loc-title{font-size:13px;font-weight:800;color:var(--p,#007aff);padding:10px 10px 4px;text-align:right}
.kat-row{display:flex;align-items:center;gap:14px;border:0;background:none;font:inherit;color:inherit;text-align:right;padding:10px;border-radius:14px;cursor:pointer;width:100%;direction:rtl}
.kat-row:active{background:color-mix(in srgb,var(--text,#1c1c1e) 8%,transparent)}
.kat-row[disabled]{opacity:.55;cursor:default}
.kat-row-ic{flex:0 0 50px;width:50px;height:50px;border-radius:50%;background:#4a9cf6;color:#fff;display:flex;align-items:center;justify-content:center}
.kat-row.is-pick .kat-row-ic{background:#34c759}
.kat-row-ic svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kat-row-tx{display:flex;flex-direction:column;gap:3px;min-width:0}
.kat-row-tx b{font-size:15px;color:var(--p,#007aff)}
.kat-row.is-pick .kat-row-tx b{color:#34c759}
.kat-row-tx small{font-size:12.5px;color:var(--sub,#8e8e93);line-height:1.6}
.kat-loc .kat-status{text-align:center}
/* Message card */
.krloc-card{position:relative;width:236px;max-width:100%;height:150px;border-radius:12px;overflow:hidden;background:#ebe9e2;cursor:pointer;direction:ltr;margin:1px 0 2px;-webkit-tap-highlight-color:transparent}
.krloc-card .krm-tile{pointer-events:none}
.krloc-card-pin{position:absolute;left:50%;top:50%;width:0;height:0}
.krloc-card-pin svg{max-width:none;stroke:none;position:absolute;left:-14px;top:-40px;width:28px;height:40px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.35))}
.dm-bubble:has(.krloc-card){padding:5px!important;white-space:normal}
/* Viewer */
.krloc-view{position:fixed;inset:0;z-index:2147483200;background:#fff;color:#1c1c1e;display:flex;flex-direction:column;direction:rtl}
.krloc-view[hidden]{display:none}
.krloc-head{flex:0 0 auto;display:flex;align-items:center;gap:14px;padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px;background:#fff;border-bottom:1px solid #e7e7eb;z-index:4}
.krloc-head h2{margin:0;font-size:18px;font-weight:800}
.krloc-back{width:42px;height:42px;border-radius:50%;border:0;background:none;color:#1c1c1e;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.krloc-back svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transform:scaleX(-1)}
.krloc-map{flex:1;min-height:0}
.krloc-open{direction:rtl;unicode-bidi:plaintext;position:absolute;left:50%;top:16px;transform:translateX(-50%);border:0;border-radius:24px;background:#fff;color:#1a73e8;font:inherit;font-size:15px;font-weight:700;padding:13px 26px;box-shadow:0 2px 8px rgba(0,0,0,.25);cursor:pointer;z-index:3;white-space:nowrap}
.krloc-layers{right:14px;top:16px}
.krloc-locate{right:14px;bottom:16px}
.krloc-foot{flex:0 0 auto;background:#fff;border-radius:24px 24px 0 0;margin-top:-22px;position:relative;z-index:5;padding:22px 18px calc(18px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:18px;box-shadow:0 -4px 16px rgba(0,0,0,.08)}
.krloc-who{display:flex;align-items:center;gap:12px}
.krloc-who b{display:block;font-size:17px}
.krloc-who small{display:block;font-size:14px;color:#8e8e93;margin-top:2px}
.krloc-av{width:52px;height:52px;border-radius:50%;overflow:hidden;background:#e7e7eb;color:#8e8e93;display:flex;align-items:center;justify-content:center;flex:0 0 52px}
.krloc-av img{width:100%;height:100%;object-fit:cover}
.krloc-av svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.krloc-route{border:0;border-radius:26px;background:#2196f3;color:#fff;font:inherit;font-size:16px;font-weight:800;padding:15px;cursor:pointer;width:100%}
.krloc-route:active{transform:scale(.98)}
