main.wide{max-width:none}
.yg{--g-bg:#fff;--g-ink:#1d2330;--g-line:#e3e6ea;--g-head:#f5f6f8;--g-muted:#6b7280;--g-hi:#eef4ff;--g-grp:#f0f2f5;font-size:13px;color:var(--g-ink)}
.yg.dark,.yg-panel.dark,.yg-pop.dark,.yg-modal-bg.dark .yg-modal{--g-bg:#1e1f22;--g-ink:#e6e6e6;--g-line:#34363b;--g-head:#26282c;--g-muted:#9aa0a6;--g-hi:#2a3550;--g-grp:#2a2c30}
.yg.dark{background:var(--g-bg);padding:8px;border-radius:8px}
.yg-tabs{display:flex;gap:2px;overflow-x:auto;border-bottom:1px solid var(--g-line);margin-bottom:6px}
.yg-tabs button{background:transparent;border:0;border-bottom:2px solid transparent;color:var(--g-muted);padding:6px 10px;white-space:nowrap;border-radius:0}
.yg-tabs button.on{color:var(--g-ink);border-bottom-color:#2d7ff9;font-weight:600}
.yg-tb{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}
.yg-tb .tb{background:transparent;border:1px solid transparent;color:var(--g-ink);padding:4px 8px;font-size:13px;border-radius:4px;cursor:pointer}
.yg-tb .tb:hover{background:var(--g-grp)}.yg-tb .tb.act{background:#2d7ff933;border-color:#2d7ff9}
.yg-q{width:200px;padding:4px 8px;background:var(--g-bg);color:var(--g-ink);border:1px solid var(--g-line);border-radius:4px}
.yg .cnt{margin-left:auto;color:var(--g-muted)}
.yg-wrap{overflow:auto;max-height:calc(100vh - 230px);border:1px solid var(--g-line);background:var(--g-bg)}
.yg-t{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%}
.yg-t th,.yg-t td{border-right:1px solid var(--g-line);border-bottom:1px solid var(--g-line);padding:4px 7px;height:30px;max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;vertical-align:middle;background:var(--g-bg)}
.yg-t thead th{position:sticky;top:0;z-index:3;text-transform:none;letter-spacing:0;font-size:12px;color:var(--g-ink);background:var(--g-head);font-weight:600;cursor:pointer;user-select:none}
.yg-t th.sorted{color:#2d7ff9}
.yg-t .rn{position:sticky;left:0;z-index:2;width:52px;min-width:52px;color:var(--g-muted);text-align:center;background:var(--g-head)}
.yg-t thead .rn{z-index:4}
.yg-t td:nth-child(2),.yg-t th:nth-child(2){position:sticky;left:52px;z-index:2;box-shadow:2px 0 0 var(--g-line)}
.yg-t thead th:nth-child(2){z-index:4}
.yg-t tr.rec td{background:linear-gradient(var(--tint,transparent),var(--tint,transparent)),var(--g-bg)}
.yg-t tr.rec:hover td{background:var(--g-hi)}.yg-t tr.sel td{background:var(--g-hi)}
.yg-t td.editing{padding:0;overflow:visible}.yg-t td.editing input,.yg-t td.editing select,.yg-t td.editing textarea{width:100%;min-width:140px;margin:0;border:2px solid #2d7ff9;background:var(--g-bg);color:var(--g-ink)}
.yg-t td:focus{outline:2px solid #2d7ff9;outline-offset:-2px}
.yg-t .exp{display:none;padding:0 4px;border:0;background:transparent;color:#2d7ff9;cursor:pointer}
.yg-t tr.rec:hover .exp{display:inline}.yg-t tr.rec:hover .n{display:none}
.yg-t tr.gh td{background:var(--g-grp);font-size:12px;cursor:pointer}.yg-t tr.gh td.tot{font-weight:600}
.yg-t tr.sep td{height:10px;padding:0;border-right:0;background:var(--g-bg)}
.yg-t tr.newrow td{position:sticky;left:0;background:var(--g-bg)}.yg-t tr.newrow button{border:0;background:transparent;color:var(--g-muted);cursor:pointer}
.yg .num,.yg-t td.num{text-align:right;font-variant-numeric:tabular-nums}
.pill-c{display:inline-block;padding:1px 8px;border-radius:10px;color:#fff;font-size:12px;line-height:18px;margin-right:3px;text-shadow:0 0 2px #0006}
.tags{display:inline-flex;gap:2px}
.thumbs{display:inline-flex;gap:3px}
.th{padding:0;border:1px solid var(--g-line,#ddd);background:#fff;width:22px;height:26px;border-radius:2px;overflow:hidden;cursor:zoom-in;display:inline-flex;align-items:center;justify-content:center}
.th img{width:100%;height:100%;object-fit:cover}.th .fi{font-size:8px;color:#555;font-weight:700}
.yg-panel .th,.yg-card .th{width:54px;height:66px}
.yg-lb{position:fixed;inset:0;background:#000c;z-index:100;display:flex;flex-direction:column;align-items:center;padding:12px}
.lb-bar{display:flex;gap:8px;align-items:center;width:100%;max-width:1100px;color:#fff}.lb-bar a{color:#9cf}.lb-bar button{background:#333;color:#fff;border:0}
.lb-img{max-width:min(1100px,96vw);max-height:calc(100vh - 70px);object-fit:contain;margin-top:8px;background:#fff}
.lb-frame{width:min(1100px,96vw);flex:1;margin-top:8px;border:0;background:#fff}
.yg-pop{position:absolute;z-index:50;background:var(--g-bg,#fff);color:var(--g-ink,#111);border:1px solid var(--g-line,#ddd);border-radius:6px;padding:8px;box-shadow:0 6px 24px #0003;max-height:60vh;overflow:auto;min-width:220px}
.yg-pop .opt{display:block;padding:3px 0;font-weight:400}.yg-pop select{width:100%;margin:4px 0}
.row1{display:flex;gap:6px;align-items:center;justify-content:space-between;margin:4px 0}
.ms{display:flex;flex-direction:column;gap:2px;padding:6px;background:var(--g-bg);border:2px solid #2d7ff9;position:relative;z-index:5}
.yg-panel{position:fixed;top:0;right:0;bottom:0;width:min(460px,100vw);background:var(--g-bg,#fff);color:var(--g-ink,#111);border-left:1px solid var(--g-line,#ddd);z-index:60;overflow:auto;padding:12px;box-shadow:-6px 0 24px #0003;--g-bg:#fff;--g-ink:#1d2330;--g-line:#e3e6ea;--g-muted:#6b7280}
.yg-panel.dark{--g-bg:#1e1f22;--g-ink:#e6e6e6;--g-line:#34363b;--g-muted:#9aa0a6}
.yg-panel .ph{display:flex;gap:6px;align-items:center;position:sticky;top:-12px;background:var(--g-bg);padding:6px 0;z-index:2}
.yg-panel .pf{margin:8px 0}.yg-panel .pl{font-size:11px;color:var(--g-muted);text-transform:uppercase;letter-spacing:.3px}
.yg-panel .pv{min-height:26px;padding:4px 6px;border:1px solid var(--g-line);border-radius:4px;white-space:pre-wrap;word-break:break-word}
.yg-panel .pv.ed{cursor:text}.yg-panel .pv input,.yg-panel .pv select,.yg-panel .pv textarea{width:100%;background:var(--g-bg);color:var(--g-ink)}
.yg-panel .pf.hid .pl{opacity:.8}.yg-panel .up{color:#2d7ff9;cursor:pointer;font-size:12px}
.yg-modal-bg{position:fixed;inset:0;background:#0008;z-index:70;display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:4vh 10px}
.yg-modal{background:var(--card,#fff);color:var(--ink,#111);border-radius:10px;padding:16px;width:min(860px,100%);position:relative}
.yg-modal .x{position:absolute;right:10px;top:10px;border:0;background:transparent;font-size:16px}
.yg-modal-bg.dark .yg-modal{--card:#fff}
#yg-toast{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);background:#222;color:#fff;padding:8px 14px;border-radius:6px;opacity:0;transition:.2s;z-index:200}
#yg-toast.on{opacity:1}#yg-toast.bad{background:#b42318}
.yg-cards{display:none}
@media (max-width:720px){.yg-wrap{display:none}.yg-cards{display:flex;flex-direction:column;gap:8px}
 .yg-card{border:1px solid var(--g-line);border-radius:8px;padding:10px;background:var(--g-bg)}
 .yg-tb .tb{padding:4px}.yg-q{width:100%}.yg .cnt{margin-left:0}}
.lb-pv{display:flex;flex-direction:column;align-items:center;gap:8px;overflow:auto;max-height:calc(100vh - 60px)}.lb-pv .lb-img{max-height:none;max-width:min(900px,96vw)}.lb-all{background:#2d7ff9;color:#fff;border:0}
/* ---- density + layout (compact default) ---- */
.yg.compact{font-size:12px}.yg.comfy{font-size:13px}
.yg-t{table-layout:fixed}
.yg-t th,.yg-t td{max-width:none}
.yg.compact .yg-t td{height:28px;padding:2px 6px;line-height:16px}
.yg.comfy .yg-t td{height:34px;padding:4px 8px}
.yg-t thead th{white-space:normal;vertical-align:bottom;padding:4px 14px 4px 6px;line-height:1.15;height:auto;position:sticky}
.yg-t thead th .hl{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.yg-t td:nth-child(2),.yg-t th:nth-child(2){left:44px}
.yg-t .rn{width:44px;min-width:44px}
.yg-t .rz{position:absolute;right:0;top:0;bottom:0;width:7px;cursor:col-resize;z-index:5}
.yg-t .rz:hover,.yg-t .rz:active{background:#2d7ff9}
.yg.compact .pill-c{font-size:11px;line-height:16px;padding:0 6px}
.yg.compact .th{width:18px;height:22px}.yg.comfy .th{width:26px;height:32px}
.yg.compact .yg-tb{gap:2px;margin:4px 0}.yg.compact .yg-tb .tb{padding:3px 6px;font-size:12px}.yg.compact #yg-upload{padding:4px 10px;font-size:12px}
.yg.compact .yg-tabs button{padding:4px 8px;font-size:12px}
.yg.compact .yg-t tr.gh td{height:24px}.yg.compact .yg-t tr.sep td{height:6px}
.yg-wrap{max-height:calc(100vh - 200px)}
/* attach in documents cell */
.yg-t td.att{position:relative}
.att-add{position:absolute;right:3px;top:50%;transform:translateY(-50%);width:18px;height:18px;line-height:16px;text-align:center;border-radius:4px;background:#2d7ff9;color:#fff;font-weight:700;cursor:pointer;opacity:0;font-size:13px}
.yg-t tr.rec:hover .att-add,.att-add:focus-within{opacity:1}
.drop{outline:2px dashed #2d7ff9 !important;outline-offset:-3px;background:#2d7ff922 !important}
/* select editor */
.yg-t td.editing{position:relative;overflow:visible;z-index:6}
.cb{position:absolute;left:0;top:0;min-width:240px;max-width:340px;background:var(--g-bg,#fff);color:var(--g-ink,#111);border:2px solid #2d7ff9;border-radius:6px;box-shadow:0 8px 28px #0005;z-index:30;padding:6px;white-space:normal}
.yg-panel .cb{position:relative;min-width:0;max-width:none;box-shadow:none}
.cb-chips{display:flex;flex-wrap:wrap;gap:3px;margin-bottom:4px}
.cb-chip{display:inline-flex;align-items:center}.cb-x{border:0;background:transparent;color:var(--g-muted,#888);padding:0 3px;cursor:pointer;font-size:13px}
.cb-in{width:100%;box-sizing:border-box;padding:4px 6px;margin:0 0 4px;border:1px solid var(--g-line,#ccc);border-radius:4px;background:var(--g-bg,#fff);color:var(--g-ink,#111)}
.cb-list{max-height:230px;overflow:auto}
.cb-opt{display:flex;align-items:center;gap:6px;padding:3px 4px;border-radius:4px;cursor:pointer}
.cb-opt.hi,.cb-opt:hover{background:var(--g-hi,#eef4ff)}.cb-opt .ck{width:12px;color:#2d7ff9;font-weight:700}
.cb-new{color:var(--g-muted,#666)}.cb-ft{text-align:right;margin-top:4px}
/* viewer polish */
.yg-lb{opacity:0;transition:opacity .18s ease;padding:8px}
.yg-lb.on{opacity:1}
.yg-lb .lb-body{transform:scale(.97);transition:transform .18s ease;flex:1;width:100%;display:flex;justify-content:center;align-items:flex-start;overflow:hidden;margin-top:6px}
.yg-lb.on .lb-body{transform:none}
.yg-lb .lb-body.scroll{overflow:auto}
.lb-bar{flex-wrap:wrap;max-width:none;gap:6px;font-size:13px}
.lb-title{display:flex;flex-direction:column;min-width:0;max-width:34vw}.lb-title b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lb-title small{color:#bbb}
.lb-grp{display:inline-flex;align-items:center;gap:4px;background:#ffffff14;border-radius:6px;padding:2px 4px}
.lb-bar button{min-width:28px;padding:3px 8px;border-radius:5px;cursor:pointer}
.lb-imgwrap{position:relative;display:flex;justify-content:center;width:100%;min-height:120px}
.lb-img{max-width:96vw;max-height:calc(100vh - 80px);object-fit:contain;background:#fff;margin:0}
.lb-img.zoomed{max-width:none;max-height:none}
.lb-stack{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%}
.lb-page{max-width:min(1000px,96vw);background:#fff}
.lb-spin{position:absolute;top:40%;left:50%;width:34px;height:34px;margin:-17px;border:3px solid #fff4;border-top-color:#fff;border-radius:50%;animation:lbspin .8s linear infinite}
@keyframes lbspin{to{transform:rotate(360deg)}}
.lb-note{color:#ddd;text-align:center}
@media (max-width:720px){.lb-title{max-width:60vw}.lb-dl{display:none}}
/* full addresses: wrap in the row, no truncation, rows grow (also in compact) */
.yg-t td.loc{white-space:pre-line;overflow:visible;text-overflow:clip;word-break:break-word;line-height:1.3;vertical-align:top}
.yg.compact .yg-t td.loc{height:auto;max-height:none}
.yg .yg-t tr.rec{height:auto}
textarea.pop-ta{position:relative;z-index:30;width:100%;min-width:280px;min-height:110px;font:inherit;line-height:1.35;padding:6px;border:2px solid #2d7ff9;border-radius:4px;box-shadow:0 6px 18px #0005;resize:vertical;background:var(--g-bg,#fff);color:inherit}
.yg-panel textarea.pop-ta{min-width:0;position:static;box-shadow:none}
.yg-panel .pv{white-space:pre-line}
/* row selection / delete */
.yg-t .rn{width:72px;min-width:72px;white-space:nowrap}
.yg-t .rck{margin:0 4px 0 2px;vertical-align:middle;cursor:pointer}
.yg-t .more{display:none;padding:0 3px;border:0;background:transparent;color:var(--g-muted);cursor:pointer;font-weight:700}
.yg-t tr.rec:hover .more{display:inline}
.yg-t tr.rec.chk td{background:color-mix(in srgb,#2d7ff9 14%,transparent)}
.yg-selbar{display:flex;gap:8px;align-items:center;padding:6px 10px;margin:4px 0;border-radius:6px;background:#2d7ff922;border:1px solid #2d7ff966}
button.danger,.tb.danger{color:#fff;background:#d92d20;border-color:#b42318}
.rmenu{display:flex;flex-direction:column;gap:4px;min-width:220px}
.rmenu>button{text-align:left}
.rmenu .small,.muted.small{font-size:11px;margin-top:4px}
.bulk{display:flex;gap:4px;flex-wrap:wrap}
.bulk .pillbtn{border:0;background:transparent;padding:2px;cursor:pointer}
.yg-del{border-collapse:collapse;width:100%}.yg-del td,.yg-del th{padding:4px 8px;border-bottom:1px solid #8883;text-align:left}
#yg-toast button{margin-left:8px}
/* trips */
.yg-t tr.gh .ghc{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.yg-t tr.gh .ghi{display:flex;gap:8px;align-items:center}
.tbadge{font-size:11px;padding:1px 7px;border-radius:9px;background:#8884}
.tbadge.open{background:#20c93333;color:#11a828}.tbadge.ended{background:#2d7ff933;color:#2d7ff9}.tbadge.closed{background:#6664}
.yg-t tr.gh.trip-closed{opacity:.85}
.tmenu{border:0;background:transparent;cursor:pointer;font-weight:700;color:inherit;padding:0 6px}
.yg-t tr.newrow button.endtrip{margin-left:8px;font-weight:600;border:1px solid #d92d20;color:#d92d20;background:transparent}
.yg-end .endlist{max-height:46vh;overflow:auto;display:flex;flex-direction:column;gap:4px;margin:8px 0;padding:6px;border:1px solid #8884;border-radius:6px}
.yg-end input[type=text],.yg-end input[type=number]{width:100%}
.yg-end .endlist label.opt{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.yg-end .endlist input[type=checkbox]{width:auto;margin:0}
.yg-t tr.gh .ghc{text-align:left}.yg-t tr.gh .ghi{display:flex;justify-content:flex-start;max-width:100%}
