/* JekkaGO shell: minimal, no admin sidebar (same idea as the Terminal shell). Also used by the #/apps launcher. */
body.jekkago-app { background: var(--bg, #faf9f5); color: var(--text, #111); }
.jg-shell { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: 1rem 1rem 2rem; padding-top: max(1rem, env(safe-area-inset-top)); }
.jg-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.jg-header h1 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.jg-muted { color: var(--muted, #6b7280); font-size: .85rem; }
.jg-bar { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.jg-tabs { display: flex; gap: .35rem; margin-bottom: 1rem; }
.jg-tab { flex: 1; text-align: center; padding: .55rem .75rem; border-radius: 999px; border: 1px solid var(--border, #e5e2d9); color: inherit; text-decoration: none; font-weight: 600; font-size: .9rem; }
.jg-tab[aria-selected="true"] { background: var(--chip-bg, #e8f3ec); color: var(--primary-text, #175D31); border-color: transparent; }
.jg-tab:focus-visible, .jg-app-card:focus-visible { outline: 2px solid var(--primary, #175D31); outline-offset: 1px; }
.jg-panel { border: 1px solid var(--border, #e5e2d9); border-radius: 12px; padding: 1rem; }
.jg-panel h2 { margin: 0 0 .15rem; font-size: 1rem; }
.jg-empty { margin: .9rem 0 0; color: var(--muted, #6b7280); text-align: center; }
.jg-apps { display: grid; gap: .6rem; }
.jg-app-card { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; border: 1px solid var(--border, #e5e2d9); border-radius: 12px; color: inherit; text-decoration: none; }
.jg-app-card strong { font-size: 1rem; }

.jg-card { border: 1px solid var(--border, #e5e2d9); border-radius: 10px; padding: .75rem; margin-top: .75rem; display: flex; flex-direction: column; gap: .3rem; }
.jg-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.jg-lines { font-size: .95rem; }
.jg-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.jg-pin { display: flex; flex-direction: column; gap: .3rem; margin-top: .35rem; }
.jg-sub { display: flex; gap: .35rem; margin: .75rem 0 0; }
.jg-subtab { flex: 1; padding: .4rem .6rem; border-radius: 8px; border: 1px solid var(--border, #e5e2d9); background: none; color: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; }
.jg-subtab[aria-selected="true"] { background: var(--chip-bg, #e8f3ec); color: var(--primary-text, #175D31); border-color: transparent; }

/* ---- Dispatch & Delivery (build 193): JekkaGO page, shipping and pick-up editors, guest checkout ---- */
.jg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jg-note { font-size: .85rem; margin: .25rem 0 .75rem; }
.jg-empty-line { margin: .25rem 0 0; font-size: .9rem; }
.jg-page .card { margin-top: 1rem; }
.jg-page .card:first-child { margin-top: 0; }
.jg-add-btns { display: grid; gap: .5rem; }
.jg-add-btns .btn { width: 100%; }
.jg-trow { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--border, #e5e7eb); }
.jg-trow:first-of-type { border-top: none; padding-top: .25rem; }
.jg-trow.is-off { opacity: .65; }
.jg-trow-main { min-width: 0; display: flex; flex-direction: column; gap: .1rem; overflow-wrap: anywhere; }
.jg-trow-sub { font-size: .85rem; color: var(--muted, #6b7280); }
.jg-badge { font-size: .7rem; font-weight: 600; padding: .05rem .4rem; border-radius: 999px; border: 1px solid var(--border, #e5e7eb); color: var(--muted, #6b7280); vertical-align: middle; }

.jg-scope { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
.jg-scope-opt { position: relative; display: block; cursor: pointer; }
.jg-scope-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.jg-scope-opt span { display: block; padding: .65rem .8rem; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; font-weight: 600; }
.jg-scope-opt small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted, #6b7280); }
.jg-scope-opt input:checked + span { border-color: var(--primary, #0f766e); background: var(--chip-bg, #e8f3ec); color: var(--primary-text, #175D31); }
.jg-scope-opt input:focus-visible + span { outline: 2px solid var(--primary, #0f766e); outline-offset: 2px; }

.jg-switch { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }
.jg-switch input { width: 1.15rem; height: 1.15rem; margin: 0; flex: none; accent-color: var(--primary, #0f766e); }
.jg-switch-top { margin-bottom: .5rem; }

.jg-group { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--border, #e5e7eb); }
.jg-group-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.jg-group-title { margin: 0; font-size: 1rem; }
.jg-rate { padding: .6rem; margin-bottom: .5rem; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; }
.jg-rate-fields { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: .5rem; }
.jg-rate-fields input { width: 100%; min-height: 2.5rem; padding: .45rem .6rem; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; font: inherit; background: var(--surface, #fff); color: inherit; box-sizing: border-box; }
.jg-rate-fields input:focus-visible { outline: 2px solid var(--primary, #0f766e); outline-offset: 1px; }
.jg-rate-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; }
.jg-link-danger { appearance: none; border: none; background: none; color: var(--danger, #b91c1c); font: inherit; font-size: .85rem; cursor: pointer; padding: .25rem; }
.jg-add-group { margin-top: 1rem; }
.jg-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.jg-geo { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: .75rem; margin: 0 0 1rem; }
.jg-geo legend { font-size: .9rem; font-weight: 600; padding: 0 .3rem; }
.jg-geo-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .5rem; }
.jg-geo-f span { display: block; font-size: .8rem; color: var(--muted, #6b7280); margin-bottom: .15rem; }
.jg-geo-f input { width: 100%; min-height: 2.5rem; padding: .45rem .6rem; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; font: inherit; background: var(--surface, #fff); color: inherit; box-sizing: border-box; }

/* Guest checkout: delivery choice inside the order sheet, and the catalog delivery card */
.dl-box { margin: .9rem 0 0; padding-top: .9rem; border-top: 1px solid var(--border, #e5e7eb); }
.dl-box h3 { margin: 0 0 .5rem; font-size: 1rem; }
.dl-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .6rem; }
.dl-method { position: relative; cursor: pointer; }
.dl-method input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dl-method span { display: block; padding: .6rem .7rem; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; font-weight: 600; font-size: .95rem; }
.dl-method small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted, #6b7280); }
.dl-method input:checked + span { border-color: var(--primary, #0f766e); background: var(--chip-bg, #e8f3ec); color: var(--primary-text, #175D31); }
.dl-method input:focus-visible + span { outline: 2px solid var(--primary, #0f766e); outline-offset: 2px; }
.dl-sel { width: 100%; min-height: 2.6rem; padding: .45rem .6rem; margin-bottom: .5rem; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; font: inherit; background: var(--surface, #fff); color: inherit; box-sizing: border-box; }
.dl-pickups { display: grid; gap: .4rem; margin-bottom: .4rem; }
.dl-pu { position: relative; cursor: pointer; display: block; }
.dl-pu input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dl-pu span { display: block; padding: .55rem .7rem; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; font-size: .9rem; }
.dl-pu small { display: block; color: var(--muted, #6b7280); font-size: .8rem; }
.dl-pu input:checked + span { border-color: var(--primary, #0f766e); background: var(--chip-bg, #e8f3ec); }
.dl-pu input:focus-visible + span { outline: 2px solid var(--primary, #0f766e); outline-offset: 2px; }
.dl-group { margin: .5rem 0 .2rem; font-size: .8rem; font-weight: 600; color: var(--muted, #6b7280); }
.dl-near { margin: 0 0 .5rem; }
.dl-msg { font-size: .85rem; color: var(--muted, #6b7280); margin: .2rem 0 0; }
.dl-err { font-size: .85rem; color: var(--danger, #b91c1c); margin: .4rem 0 0; }
.dl-fee-row { display: flex; justify-content: space-between; gap: .5rem; margin-top: .4rem; font-size: .95rem; }
.jg-dest { margin-top: .35rem; padding: .45rem .6rem; border-radius: 8px; background: var(--chip-bg, #e8f3ec); font-size: .9rem; overflow-wrap: anywhere; }
@media (max-width: 380px) { .jg-rate-fields { grid-template-columns: 1fr; } }

/* ---- Locations and JekkaGO terminals (build 194) ---- */
.jg-side { padding: .5rem 0; border-top: 1px solid var(--border, #e5e7eb); }
.jg-side:first-of-type { border-top: none; padding-top: 0; }
.jg-rate[data-loc] .jg-rate-foot { flex-wrap: wrap; }

/* Build 201: "How it works" block inside the terminal panel */
.jg-how { margin-top: .75rem; padding: .25rem .75rem; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; background: var(--surface-2, rgba(127,127,127,.06)); }
.jg-how .jg-side:first-child { border-top: none; }

/* ---- Sync popup and clear address labels (build 203) ---- */
.jg-kind { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b7280); margin-bottom: .1rem; }
.jg-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.45); }
.jg-modal-card { background: var(--card-bg, var(--bg, #fff)); color: inherit; border-radius: 12px; width: 100%; max-width: 30rem; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.jg-modal-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1rem .5rem; }
.jg-modal-x { background: none; border: 0; font-size: 1.6rem; line-height: 1; padding: .1rem .5rem; cursor: pointer; color: inherit; }
.jg-modal-body { padding: .25rem 1rem; overflow-y: auto; flex: 1 1 auto; }
.jg-modal-foot { padding: .75rem 1rem 1rem; margin: 0; border-top: 1px solid var(--border, #e5e7eb); }
