/* Additions for the working prototype (on top of the mockup design system in styles.css). */
button.quest-card, button.refund-banner, button.read-panel, button.skill-check-cta, button.upload, button.nudge-banner, button.map-pin, button.shop-item {
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
button.map-pin { width: auto; }
button.quest-card { margin-bottom: 8px; }
button.tab { background: none; border: 0; cursor: pointer; }
button.check-mark { border: 0; cursor: pointer; padding: 0; }
.check-row.off { opacity: 0.55; }
.check-row.off .check-mark { background: transparent; border: 1px solid var(--line-strong); }
.check-mark.warn { background: var(--danger-dim); color: var(--danger); }
.check-list.compact .check-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.check-list.compact { margin-bottom: 8px; }
.right { margin-left: auto; }
.tiny { font-size: 11px; }
.tiny-p { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.b { font-weight: 700; }
.center { text-align: center; }
.gold { color: var(--gold-2) !important; font-weight: 700; }
.muted.empty { text-align: center; padding: 24px 8px; font-size: 13px; }
.chips.wrap { padding: 0; overflow: visible; flex-wrap: wrap; }
.task-suggest { margin: 4px 0; }
.task-suggest .chip { font-size: 11px; padding: 6px 10px; }
.check-row.adding { gap: 6px; }
.check-row .min-input { width: 56px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; color: var(--text); }
.sub-lab { margin-top: 2px; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; }
.ico.flip { transform: rotate(180deg); display: inline-block; vertical-align: middle; }
.cam-thumbs .thumb.sample { opacity: 0.6; border-style: dashed; }
.kicker-gold { position: relative; letter-spacing: 0.14em; text-transform: uppercase; font-size: 11px; font-weight: 700; color: var(--gold); }
.ops-kicker.gold { color: var(--gold-2); }
.rv-head { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 2px; }
.built-on.note { margin-top: 16px; letter-spacing: 0.08em; text-transform: none; font-size: 11px; line-height: 1.4; }
textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); font: inherit; resize: none; }
.btn[disabled], .btn:disabled { opacity: 0.5; cursor: not-allowed; }
label.btn { cursor: pointer; }
.shop-item[disabled] { opacity: 0.6; }
.shop-thumb.big { width: 72px; height: 72px; margin: 0 auto 8px; display: grid; place-items: center; }

.dual-range { position: relative; height: 28px; }
.dual-range input[type="range"] { position: absolute; inset: 0; width: 100%; pointer-events: none; background: none; -webkit-appearance: none; appearance: none; }
.dual-range input[type="range"]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); border: 2px solid #fff3; }
.dual-range input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: rgba(196,176,255,0.18); border-radius: 6px; }
.dual-range input[type="range"] + input[type="range"]::-webkit-slider-runnable-track { background: transparent; }

.nudge-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 12px;
  border-radius: 16px; background: rgba(245,197,66,0.1); border: 1px solid var(--line-strong);
}
.nudge-banner .rb-k { color: var(--gold); }
.nudge-banner > span { font-size: 12px; font-weight: 800; color: var(--gold-2); white-space: nowrap; }
.nudge-card { margin: 4px 0 12px; padding: 14px; border-radius: 16px; background: linear-gradient(180deg, rgba(245,197,66,0.14), rgba(245,197,66,0.04)); border: 1px solid var(--line-strong); }
.nudge-card h4 { display: flex; align-items: center; gap: 6px; color: var(--gold-2); font-size: 14px; margin-bottom: 4px; }
.nudge-card p { font-size: 12px; color: var(--text-2); line-height: 1.4; margin-bottom: 10px; }

.menu-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.menu-list button { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-weight: 700; font-size: 13px; text-align: left; }
.menu-list button .ico { color: var(--gold); }

/* Sign in */
.signin { justify-content: space-between; background: radial-gradient(420px 360px at 50% 20%, rgba(109,63,224,0.45), transparent 70%), radial-gradient(300px 240px at 80% 70%, rgba(245,197,66,0.14), transparent 70%); }
.signin-hero { padding: 72px 28px 0; text-align: center; }
.signin-crest { width: 112px; height: 112px; margin: 0 auto 16px; filter: drop-shadow(0 12px 32px rgba(245,197,66,0.35)); }
.signin-word { font-family: var(--font-display); color: var(--gold-2); letter-spacing: 0.08em; font-size: 26px; font-weight: 800; }
.signin h1 { font-size: 22px; margin: 18px 0 8px; }
.signin p { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.signin-note { font-size: 11px; text-align: center; margin: 10px 0 4px; }

/* Mock Pi wallet */
.wallet-card { text-align: center; }
.wallet-head { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; color: var(--purple); letter-spacing: 0.04em; font-size: 13px; }
.pi-glyph { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #8B5CF6, #5B2FC9); color: #fff; font-weight: 800; }
.wallet-card .pi-big { font-family: var(--font-display); font-size: 40px; color: var(--gold-2); font-weight: 800; margin: 4px 0; }
.wallet-memo { text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 12px; margin: 12px 0 16px; }
.wallet-memo span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 2px; }
.wallet-mock { font-size: 10px; margin-top: 10px; }
.spinner { width: 36px; height: 36px; margin: 16px auto; border-radius: 50%; border: 3px solid rgba(196,176,255,0.2); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Demo bar above the phone (not part of the app) */
.dev-bar { gap: 8px; }
.dev-actions { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dev-actions button { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); color: var(--text-2); font-size: 11px; }
.dev-actions button:hover { color: var(--gold-2); border-color: var(--line-strong); }

/* Phone fills the screen on real mobile / Pi Browser */
@media (max-width: 430px) {
  body.solo { padding: 0; }
  .dev-bar { display: none; }
  .phone { width: 100vw; height: 100dvh; border-radius: 0; padding: 0; box-shadow: none; }
  .phone-screen { width: 100vw; height: 100dvh; border-radius: 0; }
  .phone .status { display: none; }
  /* The fake Dynamic Island lives in the bezel. Hide it when the bezel is gone,
     otherwise the black pill covers the header title (FIND WORK). */
  .phone::after { display: none; }
}

/* Free-plan "Powered by Netlify" badge is a 64px iframe fixed to the bottom-right (visible pill ~48px).
   Can't be turned off on the Free plan; lift the chrome so the tab bar stays clear. */
html.has-nf-badge .phone-screen { padding-bottom: 72px; }

/* File inputs must not use `hidden`/`display:none` — that blocks the picker on some Android and Pi Browser builds. */
.sr-file {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
label.shutter, label.gallery-btn, label.icon-btn, label.btn { cursor: pointer; }
.cam-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center; padding: 24px; color: var(--text-2); z-index: 2; pointer-events: none;
}
.cam-empty p { font-size: 14px; font-weight: 600; max-width: 16em; text-shadow: 0 1px 8px #000; }
.sample-row { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 0 0 4px; }
.sample-row .lab { flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-2); }
.demo-kicker { color: var(--text-3) !important; font-weight: 600; }
.lang-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-picker .cat-opt { flex: 1 1 40%; min-width: 120px; text-align: center; }

/* Leaflet map (Find → Map). Attribution stays visible and is text-only (no outside link). */
.map-wrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.map-leaflet { width: 100%; height: 100%; background: #1A1028; }
.map-leaflet .leaflet-container { width: 100%; height: 100%; background: #1A1028; font: inherit; }
.map-leaflet .leaflet-control-attribution {
  background: rgba(18,8,24,0.82); color: var(--text-3); font-size: 10px; padding: 2px 8px;
  margin: 0 8px 8px; border-radius: 8px; max-width: calc(100% - 16px);
}
.map-search-area {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 500;
  height: 32px; padding: 0 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--bg-3); color: var(--gold-2); border: 1px solid var(--line-strong);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35); white-space: nowrap;
}
.pg-pin { position: relative; transform: translate(-50%, -100%); text-align: center; }
.pg-pin .bubble {
  display: inline-block; padding: 4px 8px; border-radius: 10px; font-size: 11px; font-weight: 800;
  background: #1A1028; color: var(--gold-2); border: 1px solid var(--line-strong);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4); white-space: nowrap;
}
.pg-pin .needle { width: 0; height: 0; margin: 0 auto; border: 6px solid transparent; border-top-color: var(--gold); }
.leaflet-popup-content-wrapper, .pg-mini {
  background: var(--bg-solid); color: var(--text); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 0;
}
.leaflet-popup-content { margin: 0; }
.leaflet-popup-tip { background: var(--bg-solid); }
.pg-mini { display: block; width: 200px; padding: 10px 12px; text-align: left; cursor: pointer; background: none; border: 0; color: inherit; font: inherit; }
.pg-mini .t { font-weight: 700; font-size: 13px; line-height: 1.3; margin-bottom: 4px; }
.pg-mini .meta { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.mini-brand { min-width: 0; flex: 1 1 auto; }
.mini-brand .name { text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.quota-left { margin: 8px 16px 0; font-size: 12px; color: var(--text-2); }
.quota-left.out { color: var(--danger, #b42318); font-weight: 600; }
.quota-banner { margin: 10px 16px; padding: 12px; border-radius: 12px; background: #fff6e8; border: 1px solid var(--gold-2, #d4a017); }
.quota-banner p { margin: 0 0 8px; font-size: 13px; }
.quota-pending { color: var(--text-2); font-size: 12px !important; }
.quota-form label { display: block; font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.quota-form textarea { width: 100%; border-radius: 8px; padding: 8px; margin-bottom: 8px; font: inherit; }
.admin-req { padding: 12px 0; border-bottom: 1px solid var(--line, #eee); }
.admin-req .meta { font-size: 12px; color: var(--text-2); margin: 0 0 6px; }
.admin-req .reason { margin: 0 0 8px; font-size: 14px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Optional live camera (getUserMedia) overlay */
.live-cam { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; }
.live-cam video { flex: 1; width: 100%; min-height: 0; object-fit: cover; }
.live-cam-bar { display: flex; align-items: center; justify-content: space-around; padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); }
.live-cam-bar .shutter[disabled] { opacity: .4; }
.cam-alt { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.cam-alt label, .cam-alt button { font-size: 13px; }

/* Real file input laid over each camera/gallery control (see FileButton.tsx). */
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn-input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  opacity: 0; cursor: pointer; font-size: 200px; z-index: 2; border: 0;
}
.file-btn-input::-webkit-file-upload-button { cursor: pointer; }
/* Empty viewfinder: the whole black area above the dock opens the camera. Hint sits high so it never meets the dock. */
.cam-empty.file-btn {
  position: absolute; inset: 0; z-index: 4; display: block; pointer-events: auto; padding: 0; overflow: hidden;
}
/* Hint lives in the dock's normal flow, so it can never overlap the quota line or the note. */
.cam-hint { margin: 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--text-2); text-shadow: 0 1px 8px #000; }
/* Free-plan Netlify badge (64px, bottom-right) would cover the flip-camera button; lift the camera dock above it. */
html.has-nf-badge .cam-dock { bottom: 76px; }
.sample-row .thumb { flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border-radius: 10px; overflow: hidden; border: 1.5px solid rgba(255,255,255,0.25); background: #1A1028; }
.sample-row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-diag { font-size: 10px; color: var(--text-3); word-break: break-all; margin: 0; }

/* In-viewfinder live camera (useLiveCam) */
.cam-live { object-fit: cover; background: #000; }
.cam-live.mirror { transform: scaleX(-1); }
.cam-live.pending { opacity: 0.4; }
.cam-empty.cam-tap { position: absolute; inset: 0; z-index: 4; display: block; pointer-events: auto; background: transparent; border: 0; cursor: pointer; }
.cam-controls .shutter[disabled] { opacity: 0.45; }
