/* SwiftGigs app screens — layout from Morolake's design (sg-design-original.pdf).
 * Colours come ONLY from qg-tokens.css (load it first). This file is layout + type.
 * Every screen is a phone-width column, centred on desktop.
 */
*{margin:0;padding:0;box-sizing:border-box;}
html,body{background:var(--bg);color:var(--text);}
body.sg-app{font-family:'DM Sans',system-ui,sans-serif;font-size:15px;line-height:1.4;-webkit-font-smoothing:antialiased;}
a{color:inherit;text-decoration:none;}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer;}
svg.i{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;}
[hidden]{display:none !important;}

/* ── App column ── */
.sg-screen{max-width:480px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column;background:var(--bg);position:relative;}
.sg-body{flex:1;padding:0 20px 24px;}
.sg-screen.has-tabs .sg-body{padding-bottom:96px;}
.sg-screen.has-actionbar .sg-body{padding-bottom:110px;}

/* ── Beta strip ── */
.sg-beta{display:flex;align-items:flex-start;gap:10px;padding:11px 20px;background:var(--surface-alt);font-size:13px;line-height:1.45;color:var(--text);}
.sg-beta svg.i{width:16px;height:16px;color:var(--teal);margin-top:1px;}
.sg-beta-text{flex:1;}
.sg-beta a{color:var(--teal);font-weight:600;white-space:nowrap;}
.sg-beta .sg-x{color:var(--text-muted);}

/* ── Headers ── */
.sg-home-head{display:flex;align-items:center;justify-content:space-between;padding:20px 20px 8px;}
.sg-wm-row{display:flex;align-items:center;gap:8px;min-width:0;flex:1;}
.sg-wm-row .sg-h1{min-width:0;}
.sg-wordmark{font-family:'Playfair Display',Georgia,serif;font-style:italic;font-weight:700;font-size:25px;line-height:1.1;
  font-variant-ligatures:none;font-feature-settings:"liga" 0,"clig" 0,"dlig" 0;
  background:var(--grad-wordmark);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;}
@supports not ((-webkit-background-clip:text) or (background-clip:text)){.sg-wordmark{color:var(--primary);-webkit-text-fill-color:var(--primary);}}
.sg-city{font-size:13px;color:var(--text-muted);margin-top:3px;}
/* Option A from the mode mockup: one tiny pill, one word. Never both. */
.sg-mode-tag{--m:var(--primary);display:inline-flex;align-items:center;gap:4px;padding:3px 8px 3px 6px;border-radius:100px;
  font-size:11px;font-weight:600;line-height:1.3;letter-spacing:.01em;white-space:nowrap;flex-shrink:0;
  background:rgba(107,63,160,.13);color:var(--primary);
  background:color-mix(in srgb,var(--m) 13%,transparent);color:color-mix(in srgb,var(--m) 72%,var(--text));
  pointer-events:none;user-select:none;-webkit-user-select:none;cursor:default;}
html[data-qg-mode="worker"] .sg-mode-tag,
.sg-mode-tag[data-mode="tasker"]{--m:var(--teal);background:rgba(20,184,166,.13);color:var(--teal);
  background:color-mix(in srgb,var(--m) 13%,transparent);color:color-mix(in srgb,var(--m) 72%,var(--text));}
.sg-mode-tag svg.i{width:12px;height:12px;stroke-width:2;color:var(--m);}
.sg-mode-tag .sg-mode-ic-tasker,
.sg-mode-tag .sg-mode-lab-tasker{display:none !important;}
html[data-qg-mode="worker"] .sg-mode-tag .sg-mode-ic-poster,
html[data-qg-mode="worker"] .sg-mode-tag .sg-mode-lab-poster,
.sg-mode-tag[data-mode="tasker"] .sg-mode-ic-poster,
.sg-mode-tag[data-mode="tasker"] .sg-mode-lab-poster{display:none !important;}
html[data-qg-mode="worker"] .sg-mode-tag .sg-mode-ic-tasker,
html[data-qg-mode="worker"] .sg-mode-tag .sg-mode-lab-tasker,
.sg-mode-tag[data-mode="tasker"] .sg-mode-ic-tasker,
.sg-mode-tag[data-mode="tasker"] .sg-mode-lab-tasker{display:inline-flex !important;}
.sg-mode-head{display:flex;justify-content:flex-end;padding-top:18px;}
.sg-round{width:44px;height:44px;border-radius:50%;background:var(--surface-alt);color:var(--primary);display:inline-flex;align-items:center;justify-content:center;position:relative;}
html[data-qg-mode="worker"] .sg-round{color:var(--teal);}
.sg-topbar{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 10px;min-height:68px;}
.sg-sq{width:42px;height:42px;border-radius:12px;background:var(--surface-alt);color:var(--text);display:inline-flex;align-items:center;justify-content:center;position:relative;}
.sg-sq.teal{color:var(--teal);}
.sg-sq.purple{color:var(--primary);}
.sg-badge{position:absolute;top:-6px;right:-6px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--teal);color:var(--teal-text);font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;border:2px solid var(--bg);}

/* ── Type ── */
.sg-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.sg-h1{font-size:24px;font-weight:600;letter-spacing:-0.01em;line-height:1.2;}
.sg-h1.bold{font-weight:700;}
.sg-sub{font-size:13.5px;color:var(--text-muted);margin-top:6px;}
.sg-label{font-size:12.5px;font-weight:500;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);margin:26px 0 10px;}
.sg-h2{font-size:16px;font-weight:600;}
.sg-link{color:var(--primary);font-weight:600;font-size:14.5px;}
.sg-muted{color:var(--text-muted);}
.sg-money{color:var(--green);font-weight:700;font-variant-numeric:tabular-nums;}
.sg-x{color:var(--text-muted);display:inline-flex;}

/* ── Cards / rows ── */
.sg-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;}
.sg-isq{width:42px;height:42px;border-radius:11px;background:var(--surface-alt);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--primary);}
.sg-isq.teal{color:var(--teal);}
.sg-isq.sm{width:36px;height:36px;border-radius:10px;}
.sg-isq.lg{width:56px;height:56px;border-radius:14px;}
.sg-isq.lg svg.i{width:26px;height:26px;}
.sg-tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px;}
.sg-tile{padding:18px 16px 16px;display:flex;flex-direction:column;gap:4px;}
.sg-tile .sg-isq{margin-bottom:14px;}
.sg-tile b{font-size:15.5px;font-weight:600;}
.sg-tile > span:not(.sg-isq){font-size:13px;color:var(--text-muted);}
.sg-rowcard{display:flex;align-items:center;gap:14px;padding:16px;}
.sg-rowcard .t{flex:1;min-width:0;}
.sg-rowcard .t b{display:block;font-size:15px;font-weight:600;}
.sg-rowcard .t span{display:block;font-size:13px;color:var(--text-muted);margin-top:2px;}
.sg-rowcard .t b.sg-money{font-size:17px;}
.sg-chev{color:var(--text-muted);}
.sg-section-head{display:flex;align-items:baseline;justify-content:space-between;margin:28px 0 6px;}
.sg-list .sg-li{display:flex;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--border);}
.sg-li .t{flex:1;min-width:0;}
.sg-li .t b{display:block;font-size:14.5px;font-weight:600;}
.sg-li .t span{display:block;font-size:12.5px;color:var(--text-muted);margin-top:2px;}
.sg-li .sg-money{font-size:15px;}

/* ── Segmented, chips, pills ── */
.sg-seg-row{display:flex;gap:10px;margin-top:18px;}
.sg-seg{flex:1;display:flex;background:var(--surface-alt);border-radius:13px;padding:4px;}
.sg-seg button{flex:1;padding:9px 0;border-radius:10px;font-size:14px;font-weight:600;color:var(--text-muted);}
.sg-seg button.on{background:var(--teal);color:var(--teal-text);}
.sg-chips{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px;}
.sg-chip{padding:8px 15px;border-radius:100px;border:1px solid var(--border);background:var(--surface);font-size:13.5px;font-weight:500;color:var(--text);}
.sg-chip.teal-on{background:var(--teal);border-color:var(--teal);color:var(--teal-text);font-weight:600;}
.sg-chip.purple-on{background:var(--primary);border-color:var(--primary);color:var(--primary-text);font-weight:600;}
.sg-chip.teal-soft-on{background:var(--teal-tint);border-color:var(--teal);color:var(--text);font-weight:600;}
.sg-chips.equal{display:grid;grid-template-columns:repeat(3,1fr);}
.sg-chips.equal .sg-chip{text-align:center;padding:10px 6px;}
.sg-chips.pair{display:grid;grid-template-columns:1fr 1fr;}
.sg-chips.pair .sg-chip{text-align:center;padding:10px 6px;}
.sg-mode-block{margin:22px 0 4px;}
.sg-mode-block .sg-section-title{margin-top:0;}

/* ── Gig cards (Browse) ── */
.sg-gigs{display:flex;flex-direction:column;gap:14px;margin-top:18px;}
.sg-gig{display:flex;align-items:flex-start;gap:12px;padding:15px 16px;}
.sg-gig .t{flex:1;min-width:0;}
.sg-gig .t b{display:block;font-size:15.5px;font-weight:600;margin-top:2px;}
.sg-gig-head{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;margin-top:2px;}
.sg-gig .t .sg-gig-head b{display:inline;margin-top:0;}
.sg-applied{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:3px 8px;
  border-radius:100px;
  background:color-mix(in srgb,var(--teal) 16%,transparent);
  color:var(--teal);
  font-size:11px;
  font-weight:600;
  letter-spacing:0.02em;
  line-height:1.2;
  white-space:nowrap;
}
.sg-applied svg.i{width:12px;height:12px;}
.sg-title-row + .sg-applied{margin-top:10px;}
.sg-btn.teal.is-applied{
  background:color-mix(in srgb,var(--teal) 16%,var(--surface));
  color:var(--teal);
}
.sg-meta{display:flex;align-items:flex-start;gap:6px;font-size:12.5px;color:var(--text-muted);margin-top:6px;}
.sg-meta svg.i{width:15px;height:15px;margin-top:2px;}
.sg-gig .sg-money{font-size:18px;}

/* ── Detail rows ── */
.sg-hr{height:1px;background:var(--border);margin:18px 0;}
.sg-irow{display:flex;align-items:flex-start;gap:12px;margin:12px 0;font-size:15px;}
.sg-irow svg.i{color:var(--text-muted);margin-top:1px;}
.sg-irow small{display:block;font-size:13px;color:var(--text-muted);margin-top:2px;}
.sg-desc{font-size:14.5px;line-height:1.6;margin-top:8px;}
.sg-person{display:flex;align-items:center;gap:12px;margin-top:22px;}
.sg-avatar{width:40px;height:40px;border-radius:50%;background:var(--surface-alt);color:var(--primary);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;flex-shrink:0;overflow:hidden;}
.sg-avatar img{width:100%;height:100%;object-fit:cover;}
.sg-avatar.lg{width:58px;height:58px;font-size:20px;}
.sg-person b{display:block;font-size:14.5px;font-weight:600;}
.sg-person > span:not(.sg-avatar) span{display:block;font-size:13px;color:var(--text-muted);}

/* ── Bottom action bar ── */
.sg-actionbar{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:480px;padding:14px 20px 18px;background:var(--surface);border-top:1px solid var(--border);display:flex;gap:12px;align-items:center;z-index:30;flex-wrap:wrap;}
.sg-btn{flex:1;min-height:50px;border-radius:14px;font-size:15.5px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px;}
.sg-btn.purple{background:var(--primary);color:var(--primary-text);}
.sg-btn.teal{background:var(--teal);color:var(--teal-text);}
.sg-btn.icon{flex:0 0 52px;border:1px solid var(--border);background:var(--surface);color:var(--text);}
.sg-subactions{width:100%;display:flex;justify-content:space-between;font-size:14px;color:var(--text-muted);padding:2px 4px 0;}
.sg-textlink{width:100%;text-align:center;font-size:14px;color:var(--text-muted);font-weight:500;padding-top:2px;}

/* ── Active gig ── */
.sg-chip-status{padding:7px 14px;border-radius:100px;background:var(--accent-soft, color-mix(in srgb,var(--teal) 16%,transparent));background:color-mix(in srgb,var(--teal) 16%,transparent);color:var(--teal);font-size:13px;font-weight:600;}
.sg-map{height:200px;border-radius:18px;background:var(--surface-alt);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:var(--text-muted);font-size:13px;margin-top:4px;overflow:hidden;}
.sg-map svg.i{color:var(--teal);width:24px;height:24px;}
.sg-map.is-live{display:block;padding:0;}
.sg-map.is-live .leaflet-container{width:100%;height:100%;border-radius:18px;background:var(--surface-alt);}
.sg-next{background:var(--surface-alt);border-radius:14px;padding:14px 16px;margin-top:16px;}
.sg-next small{display:block;font-size:11.5px;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;color:var(--teal);}
.sg-next b{display:block;font-size:16px;font-weight:600;margin-top:3px;}
.sg-steps{display:flex;align-items:center;gap:8px;margin-top:22px;font-size:13.5px;}
.sg-steps .s{display:flex;align-items:center;gap:7px;white-space:nowrap;color:var(--text-muted);}
.sg-steps .s.done{color:var(--text);font-weight:500;}
.sg-steps .dot{width:9px;height:9px;border-radius:50%;border:1.5px solid var(--border);}
.sg-steps .s.done .dot{background:var(--teal);border-color:var(--teal);}
.sg-steps .line{flex:1;height:1px;background:var(--border);min-width:12px;}

/* ── Post task wizard ── */
.sg-progress{display:flex;gap:7px;margin-top:16px;}
.sg-progress i{flex:1;height:4px;border-radius:3px;background:var(--border);}
.sg-progress i.on{background:var(--primary);}
.sg-step-label{font-size:13px;color:var(--text-muted);margin:12px 0 14px;}
.sg-choice{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:13px 14px;margin-bottom:10px;border-radius:14px;}
.sg-choice .t b{display:block;font-size:14.5px;font-weight:600;}
.sg-choice .t span{display:block;font-size:13px;color:var(--text-muted);}
.sg-choice .t{flex:1;}
.sg-choice .ck{color:var(--teal);visibility:hidden;}
.sg-choice.on{border:1.5px solid var(--teal);background:var(--teal-tint);}
.sg-choice.on .ck{visibility:visible;}
.sg-choice.on .sg-isq{background:var(--surface);color:var(--teal);}
.sg-two{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.sg-opt{padding:13px 14px;border-radius:14px;text-align:left;}
.sg-opt b{display:block;font-size:14.5px;font-weight:600;}
.sg-opt span{display:block;font-size:13px;color:var(--text-muted);}
.sg-opt.on{border:1.5px solid var(--teal);background:var(--teal-tint);}
.sg-loc{padding:14px;border-radius:14px;text-align:center;font-size:15px;font-weight:600;}
.sg-loc.on{border:1.5px solid var(--primary);color:var(--primary);}
.sg-input{display:flex;align-items:center;gap:10px;padding:15px 16px;margin-top:10px;border-radius:14px;font-size:16px;}
.sg-input input{flex:1;border:none;background:transparent;font:inherit;color:var(--text);outline:none;min-width:0;}
.sg-input .cur{color:var(--green);font-weight:700;}
.sg-input svg.i{color:var(--text-muted);}
.sg-input:focus-within{border-color:var(--accent);outline:2px solid color-mix(in srgb,var(--accent) 30%,transparent);}
.sg-loc-field{position:relative;}
.sg-input .sg-loc-pin{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 auto;padding:0;margin:0;color:var(--text-muted);border-radius:8px;
}
.sg-input .sg-loc-pin[aria-pressed="true"],
.sg-input .sg-loc-pin[aria-pressed="true"] svg.i{color:var(--teal);}
.sg-input .sg-loc-pin:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 40%,transparent);outline-offset:2px;}
.sg-suggest{
  position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:30;
  margin:0;padding:6px;list-style:none;
  background:var(--surface);border:1px solid var(--border);border-radius:14px;
  max-height:240px;overflow-y:auto;
  box-shadow:0 10px 28px color-mix(in srgb,var(--text) 14%,transparent);
}
.sg-suggest li{margin:0;}
.sg-suggest button{
  display:block;width:100%;text-align:left;
  padding:10px 12px;border-radius:10px;
  font-size:14.5px;font-weight:500;color:var(--text);
}
.sg-suggest button[aria-selected="true"],
.sg-suggest button:hover{background:var(--surface-alt);}
.sg-chip.is-icon{display:inline-flex;align-items:center;gap:6px;}
.sg-chip.is-icon svg.i{width:16px;height:16px;}
.sg-help{font-size:13px;color:var(--text-muted);margin-top:9px;line-height:1.5;}
.sg-hint{display:flex;align-items:center;gap:9px;padding:12px 14px;margin-top:12px;border-radius:12px;background:var(--teal-tint);font-size:14px;}
.sg-hint svg.i{color:var(--teal);width:17px;height:17px;}
.sg-review-row{display:flex;align-items:flex-end;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--border);}
.sg-review-row small{display:block;font-size:13px;color:var(--text-muted);}
.sg-review-row b{display:block;font-size:15px;font-weight:600;margin-top:3px;}
.sg-review-row b.sg-money{font-size:18px;}
.sg-review-row a{color:var(--primary);font-weight:600;font-size:14.5px;}
.sg-info{background:var(--surface-alt);border-radius:14px;padding:16px;margin-top:18px;font-size:14px;line-height:1.55;}
.sg-info p + p{margin-top:12px;}
.sg-info svg.i{width:15px;height:15px;color:var(--teal);vertical-align:-2px;}

/* ── Messages ── */
.sg-thread{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--border);}
.sg-thread .sg-avatar{width:46px;height:46px;font-size:15px;}
.sg-thread .t{flex:1;min-width:0;}
.sg-thread .t b{display:block;font-size:15px;font-weight:600;}
.sg-thread .t span{display:block;font-size:13px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px;}
.sg-thread .r{display:flex;flex-direction:column;align-items:flex-end;gap:8px;align-self:stretch;padding-top:4px;}
.sg-thread .time{font-size:12.5px;color:var(--text-muted);}
.sg-thread .dot{width:8px;height:8px;border-radius:50%;background:var(--primary);}
.sg-search{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:14px;margin-top:14px;}
.sg-search input{flex:1;border:none;background:transparent;font:inherit;color:var(--text);outline:none;}

/* ── Profile ── */
.sg-profile-head{display:flex;align-items:center;gap:16px;padding-top:26px;}
.sg-mode-head + .sg-profile-head{padding-top:14px;}
.sg-profile-head b{display:block;font-size:18px;font-weight:700;}
.sg-profile-head > span > span{display:block;font-size:13px;color:var(--text-muted);margin-top:2px;}
.sg-profile-head a{display:inline-block;color:var(--primary);font-weight:600;font-size:14px;margin-top:4px;}
.sg-section-title{font-size:16px;font-weight:600;margin:28px 0 4px;}
.sg-act{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--border);}
.sg-act:last-child{border-bottom:none;}
.sg-act > span:first-child{min-width:0;flex:1;}
.sg-act b{display:block;font-size:14.5px;font-weight:500;color:var(--text);overflow-wrap:anywhere;}
.sg-act > span:first-child > span{display:block;font-size:13px;color:var(--text-muted);margin-top:2px;}
.sg-set{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--border);font-size:15px;width:100%;text-align:left;}
.sg-logout{display:block;padding:14px 0;font-size:15px;color:var(--text-muted);}
.sg-foot{margin-top:26px;padding:18px;border-radius:18px;background:var(--surface-alt);}
.sg-foot-brand{display:flex;align-items:center;gap:12px;}
.sg-appicon{width:38px;height:38px;border-radius:10px;background:var(--grad-wordmark);color:var(--primary-text);display:inline-flex;align-items:center;justify-content:center;}
.sg-foot-brand .sg-wordmark{font-size:19px;}
.sg-foot-brand > span:last-child > span:last-child{display:block;font-size:12.5px;color:var(--text-muted);}
.sg-foot-brand .sg-wordmark{display:block;}
.sg-foot-links{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:16px;}
.sg-foot-links a{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 4px;border-radius:12px;background:var(--surface);border:1px solid var(--border);font-size:14px;font-weight:500;}
.sg-foot-links svg.i{width:15px;height:15px;}

/* ── Bottom tabs ── */
.sg-tabs{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:480px;display:flex;justify-content:space-around;padding:10px 6px 16px;background:var(--surface);border-top:1px solid var(--border);z-index:30;}
.sg-tabs a{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:12px;color:var(--text-muted);min-width:64px;}
.sg-tabs a svg.i{width:23px;height:23px;}
.sg-tabs a.on{color:var(--primary);font-weight:600;}

/* ── Home greeting block ── */
.sg-greet{margin-top:14px;}
.sg-quip{font-size:14px;color:var(--text-muted);margin-top:4px;}
.sg-streak{display:inline-flex;align-items:center;gap:6px;margin-top:10px;padding:6px 12px 6px 10px;border-radius:100px;
  background:var(--attention-soft);color:var(--text);font-size:13px;}
.sg-streak svg.i{width:15px;height:15px;color:var(--attention);}
.sg-streak b{font-weight:700;}
.sg-streak-sub{color:var(--text-muted);}

/* ── Sheets and sub-views ──
   Where a feature has no place on a screen it moves into one of these, opened
   from a control that is in the design. Nothing is deleted. */
.sg-sheet{position:fixed;inset:0;z-index:60;display:none;}
.sg-sheet.open{display:block;}
.sg-sheet-scrim{position:absolute;inset:0;background:rgba(0,0,0,.5);}
.sg-sheet-panel{position:absolute;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:480px;max-height:88vh;overflow-y:auto;background:var(--surface);border-top-left-radius:20px;border-top-right-radius:20px;border:1px solid var(--border);border-bottom:none;padding:0 20px calc(20px + env(safe-area-inset-bottom));}
.sg-sheet-panel.full{top:0;bottom:0;max-height:none;border-radius:0;border:none;}
.sg-sheet-grip{width:38px;height:4px;border-radius:2px;background:var(--border);margin:10px auto 4px;}
.sg-sheet-head{position:sticky;top:0;background:var(--surface);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0 14px;z-index:1;}
.sg-sheet-head h2{font-size:19px;font-weight:700;color:var(--text);}
.sg-sheet-sec{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);margin:18px 0 8px;}

/* Menu rows, used by the person button and the settings sub-views. */
.sg-menu-row{display:flex;align-items:center;gap:12px;width:100%;padding:13px 0;border-bottom:1px solid var(--border);background:none;font-size:15px;color:var(--text);text-align:left;}
.sg-menu-row:last-child{border-bottom:none;}
.sg-menu-row svg.i{width:20px;height:20px;color:var(--text-muted);flex-shrink:0;}
.sg-menu-row .t{flex:1;min-width:0;}
.sg-menu-row .t b{display:block;font-size:14.5px;font-weight:600;margin-bottom:2px;}
.sg-menu-row .t small{display:block;font-size:13px;color:var(--text-muted);margin-top:2px;}
.sg-menu-row.is-unread .t{font-weight:500;}
.sg-menu-row .sg-chev{margin-left:auto;}
.sg-menu-row .count{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--primary);color:var(--primary-text);font-size:12px;font-weight:700;display:grid;place-items:center;}
/* ── Empty, error, skeleton and spinner ──
   Drawn by qg-states.js, which replaces the qg-brand-init.js versions on the
   rebuilt pages. */
.sg-state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:40px 16px;}
.sg-state.is-compact{padding:22px 16px;}
.sg-state-icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:var(--surface-alt);color:var(--text-muted);margin-bottom:4px;}
.sg-state-icon svg.i{width:24px;height:24px;}
/* Not --accent: that is role-coloured, so an error would turn teal for a
   tasker and purple for a poster. Offline is a warning, a failure is not. */
.sg-state.is-error .sg-state-icon{color:var(--danger);background:var(--danger-soft);}
.sg-state.is-offline .sg-state-icon{color:var(--attention);background:var(--attention-soft);}
.sg-state-title{font-size:16px;font-weight:600;color:var(--text);}
.sg-state-sub{font-size:14px;color:var(--text-muted);max-width:30ch;}
.sg-state-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:10px;}
.sg-state-actions .sg-btn{width:auto;flex:0 0 auto;white-space:nowrap;padding-left:20px;padding-right:20px;}
.sg-btn-quiet{background:var(--surface-alt);color:var(--text);border:1px solid var(--border);}

.sg-skel{display:flex;flex-direction:column;gap:2px;}
.sg-skel-row{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--border);}
.sg-skel-sq{width:40px;height:40px;border-radius:12px;background:var(--surface-alt);flex-shrink:0;}
.sg-skel-lines{flex:1;display:flex;flex-direction:column;gap:7px;}
.sg-skel-line{height:10px;border-radius:5px;background:var(--surface-alt);}
.sg-skel-line.w80{width:80%;}
.sg-skel-line.w60{width:60%;}
.sg-skel-line.w40{width:40%;}
.sg-skel-sq,.sg-skel-line{animation:sg-pulse 1.4s ease-in-out infinite;}
@keyframes sg-pulse{0%,100%{opacity:1;}50%{opacity:.45;}}

.sg-inline-load{display:inline-flex;align-items:center;gap:9px;font-size:14px;color:var(--text-muted);}
div.sg-inline-load{display:flex;justify-content:center;padding:22px 0;}
.sg-spinner{width:16px;height:16px;border-radius:50%;border:2px solid var(--border);border-top-color:var(--primary);animation:sg-spin .7s linear infinite;flex-shrink:0;}
.sg-spinner.is-lg{width:24px;height:24px;border-width:3px;}
@keyframes sg-spin{to{transform:rotate(360deg);}}

@media (prefers-reduced-motion: reduce){
  .sg-skel-sq,.sg-skel-line,.sg-spinner{animation:none;}
}

/* ── Toast ─────────────────────────────────────────────────────────────── */
/* Sits above .sg-sheet (z-index 60) so a confirmation stays readable while a
   sheet is still closing. */
.sg-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom));z-index:70;width:calc(100% - 40px);max-width:440px;padding:13px 16px;border-radius:14px;background:var(--surface);border:1px solid var(--border);box-shadow:0 10px 30px rgba(0,0,0,.28);font-size:14px;color:var(--text);}
.sg-toast.is-ok{border-color:var(--green);}
.sg-toast.is-error{border-color:var(--danger);}

/* ── Multi-line field ──────────────────────────────────────────────────── */
/* .sg-input is a flex row built for a single input; a textarea needs the row
   to grow and the caret to start at the top. */
.sg-input.is-area,.sg-input:has(textarea){align-items:flex-start;}
.sg-input textarea{flex:1;border:none;background:transparent;font:inherit;color:var(--text);outline:none;resize:vertical;min-height:88px;line-height:1.5;}

/* ── Horizontal chip rail ──────────────────────────────────────────────── */
/* The date strip on Post task is 14 chips; wrapping them would push the rest
   of the step off screen, so that one row scrolls instead. */
.sg-chips.scroll{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px;margin-left:-20px;margin-right:-20px;padding-left:20px;padding-right:20px;}
.sg-chips.scroll::-webkit-scrollbar{display:none;}
.sg-chips.scroll .sg-chip{flex:0 0 auto;}
.sg-chip.purple-soft-on{background:var(--primary-tint, color-mix(in srgb,var(--primary) 14%,transparent));border-color:var(--primary);color:var(--text);font-weight:600;}
.sg-chip.is-day{display:flex;flex-direction:column;align-items:center;gap:1px;min-width:58px;padding:9px 10px;line-height:1.25;}
.sg-chip.is-day b{font-size:16px;font-weight:700;}
.sg-chip.is-day span{font-size:11px;color:var(--text-muted);}
.sg-chip.is-day.purple-on span{color:inherit;opacity:.85;}

/* ── Photo slots ───────────────────────────────────────────────────────── */
.sg-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:10px;}
.sg-photo{position:relative;aspect-ratio:1;border-radius:14px;border:1px dashed var(--border);background:var(--surface-alt);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-size:12px;color:var(--text-muted);overflow:hidden;}
.sg-photo svg.i{width:22px;height:22px;}
.sg-photo.is-filled{border-style:solid;padding:0;}
.sg-photo img{width:100%;height:100%;object-fit:cover;}
/* Deliberately not tokenised: this badge sits on a black scrim over the user's
   own photo, so it must stay white in both themes. */
.sg-photo-remove{position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;display:grid;place-items:center;}
.sg-photo-remove svg.i{width:12px;height:12px;}

/* ── Chat thread ───────────────────────────────────────────────────────── */
/* The design has no screen for an open conversation, only the inbox, so this
   is built from the same primitives: surface, border, radius and tokens. */
.sg-chat{flex:1;overflow-y:auto;padding:16px 20px 8px;display:flex;flex-direction:column;gap:3px;}
.sg-chat-date{align-self:center;margin:14px 0 8px;font-size:12px;color:var(--text-muted);}
.sg-chat-sys{align-self:center;max-width:80%;margin:8px 0;padding:7px 13px;border-radius:100px;background:var(--surface-alt);font-size:12.5px;color:var(--text-muted);text-align:center;}
.sg-row{display:flex;flex-direction:column;max-width:82%;}
.sg-row.mine{align-self:flex-end;align-items:flex-end;}
.sg-row.theirs{align-self:flex-start;align-items:flex-start;}
.sg-row.grouped{margin-top:1px;}
.sg-bubble{padding:10px 14px;border-radius:17px;font-size:14.5px;line-height:1.45;white-space:pre-wrap;word-break:break-word;}
.sg-row.theirs .sg-bubble{background:var(--surface-alt);color:var(--text);border-bottom-left-radius:6px;}
.sg-row.mine .sg-bubble{background:var(--primary);color:var(--primary-text);border-bottom-right-radius:6px;}
.sg-bubble.is-image{padding:4px;}
.sg-bubble img{display:block;max-width:220px;border-radius:13px;}
.sg-bubble-time{font-size:11px;color:var(--text-muted);margin:3px 2px 6px;}
.sg-chat-note{margin:0 20px 10px;padding:11px 14px;border-radius:12px;background:var(--surface-alt);font-size:13.5px;color:var(--text-muted);}
.sg-chat-note.is-error{background:var(--danger-soft);color:var(--danger);}
.sg-composer{display:flex;align-items:flex-end;gap:9px;padding:10px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--surface);}
.sg-composer textarea{flex:1;min-height:42px;max-height:120px;padding:10px 14px;border-radius:21px;border:1px solid var(--border);background:var(--surface-alt);font:inherit;font-size:15px;color:var(--text);outline:none;resize:none;line-height:1.4;overflow-y:hidden;scrollbar-width:none;}
.sg-composer textarea::-webkit-scrollbar{display:none;}
.sg-composer textarea:focus{border-color:var(--accent);}
.sg-composer .sg-sq{flex:0 0 42px;height:42px;}
.sg-composer #sgSend{background:var(--primary);color:var(--primary-text);}
.sg-composer #sgSend:disabled{opacity:.45;}

/* ── Sheet footer ──────────────────────────────────────────────────────── */
/* Not .sg-actionbar: that one is fixed to the viewport and centred with a
   transform, which fights a scrolling sheet panel. */
.sg-sheet-foot{display:flex;gap:10px;margin-top:24px;}

/* ── Toggle ────────────────────────────────────────────────────────────── */
.sg-switch{position:relative;flex:0 0 46px;width:46px;height:27px;border-radius:14px;background:var(--surface-alt);border:1px solid var(--border);transition:background .15s ease;}
.sg-switch::after{content:"";position:absolute;top:2px;left:2px;width:21px;height:21px;border-radius:50%;background:var(--text-muted);transition:transform .15s ease,background .15s ease;}
.sg-switch[aria-checked="true"]{background:var(--teal);border-color:var(--teal);}
.sg-switch[aria-checked="true"]::after{transform:translateX(19px);background:var(--teal-text);}
.sg-set.is-row{align-items:center;gap:14px;}
.sg-set.is-row > span:first-child{flex:1;text-align:left;}
.sg-set small{display:block;font-size:12.5px;color:var(--text-muted);margin-top:3px;font-weight:400;}

/* ── Danger row ────────────────────────────────────────────────────────── */
.sg-set.is-danger{color:var(--danger);}

/* ── Inline field error ────────────────────────────────────────────────── */
.sg-err{font-size:13px;color:var(--danger);margin-top:7px;}
.sg-input.is-invalid{border-color:var(--danger);}

/* ── Map pins ──────────────────────────────────────────────────────────── */
/* Leaflet divIcon: the price itself is the pin, as on the design's map view. */
.sg-pin{background:none;border:none;}
.sg-pin span{display:inline-block;padding:5px 10px;border-radius:100px;background:var(--teal);color:var(--teal-text);font-size:12.5px;font-weight:700;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.3);}
.leaflet-container{background:var(--surface-alt);font:inherit;}
/* OpenStreetMap ships one light style, so dark mode inverts the tiles rather
   than switching to a provider that needs an API key. The hue-rotate puts the
   colours back the right way round after the invert; markers and the
   attribution sit outside the tile pane and are left alone. */
.leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.92) contrast(.9);}
html.light .leaflet-tile-pane,html[data-qg-theme="light"] .leaflet-tile-pane,body.light .leaflet-tile-pane{filter:none;}
.leaflet-control-attribution{background:color-mix(in srgb,var(--surface) 80%,transparent);color:var(--text-muted);font-size:10px;}
.leaflet-control-attribution a{color:var(--text-muted);}
/* The gig's own pin on the Active Gig map, where there is no price to show. */
span.sg-pin{display:block;width:18px;height:18px;border-radius:50%;background:var(--teal);border:3px solid var(--surface);box-shadow:0 2px 8px rgba(0,0,0,.35);}

/* First-time Tasker / Poster enable (qg-role-switch.js overlay). */
.qg-role-opt-in-overlay{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:20px;background:var(--scrim,rgba(0,0,0,.55));backdrop-filter:blur(10px);}
.qg-role-opt-in-dialog{width:min(100%,430px);padding:24px;border:1px solid var(--border);border-radius:24px;background:var(--surface);color:var(--text);}
.qg-role-opt-in-dialog h2{margin:10px 0 8px;font:700 21px 'DM Sans',sans-serif;}
.qg-role-opt-in-dialog p{margin:0;color:var(--text-muted);font-size:13px;line-height:1.6;}
.qg-role-opt-in-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:10px;margin-top:22px;}
.qg-role-opt-in-actions button{border:1px solid var(--border);border-radius:13px;padding:11px 12px;background:var(--surface-alt);color:var(--text);font:600 12px 'DM Sans',sans-serif;cursor:pointer;}
.qg-role-opt-in-actions button.primary{border:0;color:var(--on-accent,var(--primary-text,#fff));background:var(--grad-poster,var(--primary));}
.qg-role-opt-in-actions button.primary:disabled{opacity:.45;cursor:not-allowed;}
.qg-role-opt-in-error{margin-top:12px;color:var(--danger);font-size:12px;line-height:1.45;}
.qg-role-first-enable{width:min(100%,460px);max-height:min(92vh,640px);overflow:auto;padding:26px 24px 22px;}
.qg-role-first-kicker{margin:0 0 6px!important;font:600 11px/1.2 'DM Sans',sans-serif!important;letter-spacing:.08em;text-transform:uppercase;color:var(--teal)!important;}
.qg-role-first-enable[data-enable-role="tasker"] .qg-role-opt-in-actions button.primary{background:var(--grad-tasker,var(--teal));}
.qg-role-first-enable[data-enable-role="poster"] .qg-role-first-kicker{color:var(--primary)!important;}
.qg-role-first-enable h2{margin:0 0 8px;font:700 24px/1.2 'DM Sans',sans-serif;color:var(--text);}
.qg-role-first-sub{margin:0 0 16px!important;font-size:14px!important;line-height:1.55!important;}
.qg-role-first-points{list-style:none;margin:0 0 18px;padding:0;display:grid;gap:10px;}
.qg-role-first-points li{position:relative;padding:10px 12px 10px 36px;border-radius:12px;background:var(--surface-alt);border:1px solid var(--border);color:var(--text);font:500 13px/1.45 'DM Sans',sans-serif;}
.qg-role-first-points li::before{content:'';position:absolute;left:12px;top:50%;width:8px;height:8px;border-radius:50%;transform:translateY(-50%);background:var(--teal);}
.qg-role-first-enable[data-enable-role="poster"] .qg-role-first-points li::before{background:var(--primary);}
.qg-role-first-agree{display:flex;gap:10px;align-items:flex-start;margin:0 0 4px;font:500 12.5px/1.5 'DM Sans',sans-serif;color:var(--text);cursor:pointer;}
.qg-role-first-agree input{margin-top:3px;width:16px;height:16px;flex:0 0 auto;accent-color:var(--teal);}
.qg-role-first-enable[data-enable-role="poster"] .qg-role-first-agree input{accent-color:var(--primary);}
.qg-role-first-agree a{color:var(--teal);text-decoration:underline;text-underline-offset:2px;font-weight:600;}
.qg-role-first-enable[data-enable-role="poster"] .qg-role-first-agree a{color:var(--primary);}

/* Earnings wallet on Profile. */
.sg-wallet{display:grid;gap:10px;margin-top:4px;}
.sg-wallet-fig{padding:14px 16px;}
.sg-wallet-fig small{display:block;font-size:11.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);}
.sg-wallet-fig b{display:block;margin-top:4px;font-size:26px;}
.sg-wallet-note{font-size:13.5px;line-height:1.5;color:var(--text-muted);margin:10px 0 0;}
.sg-wallet-note p{margin:0 0 6px;}
.sg-act .sg-wallet-status{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;}