/* phone.css — the in-game phone (js/phone.js). Loads last.
   A real phone layout: status bar, the open app, an icon dock. Full screen on
   a phone, a big rounded device on a desktop. Every class is ph-* so none of
   the older .phone-* rules in style/skin/modern reach in. */

:root {
  --ph-bg: #0f0d14;
  --ph-bg-2: #17141e;
  --ph-card: #1c1924;
  --ph-card-hi: #24202e;
  --ph-line: rgba(255, 255, 255, 0.07);
  --ph-line-hi: rgba(255, 255, 255, 0.14);
  --ph-ink: #f3eee4;
  --ph-dim: #a39cae;
  --ph-faint: #6f6879;
  --ph-gold: #ffc83c;
  --ph-pink: #ff2f6a;
  --ph-up: #5ef08a;
  --ph-down: #ff6b7c;
  --ph-r: 16px;
  --ph-ui: 'Barlow Semi Condensed', 'Barlow Condensed', system-ui, sans-serif;
  --ph-cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}

#phonePanel.ph-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;                    /* above the radio chip (30), camera bar (45), fishing (43) */
  background: rgba(5, 4, 8, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
body.phone-open #wwRadio { visibility: hidden; }

.ph-device {
  width: min(1120px, 94vw);
  height: min(760px, 92vh);
  display: flex;
  flex-direction: column;
  background: var(--ph-bg);
  color: var(--ph-ink);
  font-family: var(--ph-ui);
  border-radius: 30px;
  border: 1px solid var(--ph-line-hi);
  box-shadow: 0 0 0 6px #050407, 0 0 0 7px rgba(255, 200, 60, 0.18), 0 30px 90px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: ph-in 200ms cubic-bezier(.2, .9, .3, 1.1);
  text-align: left;
}
@keyframes ph-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

.ph-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- status bar ---------- */
.ph-status {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 22px;
  padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--ph-line);
  background: var(--ph-bg-2);
}
.ph-status-l { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 14px; color: var(--ph-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-status-l b { color: var(--ph-ink); font-family: var(--ph-cond); font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.ph-status-t { font-family: var(--ww-display, Anton, sans-serif); font-size: 21px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ph-ink); }
.ph-status-r { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.ph-status-r .money { font-family: var(--ph-cond); font-size: 18px; font-weight: 700; color: var(--ph-up); letter-spacing: 0.5px; }
.ph-x {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--ph-line-hi); color: var(--ph-ink);
  cursor: pointer; padding: 0;
}
.ph-x:hover { background: var(--ph-pink); border-color: var(--ph-pink); }

/* ---------- screen + views ---------- */
.ph-screen { flex: 1 1 auto; min-height: 0; position: relative; }
.ph-view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.ph-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 18px 24px;
  max-width: 760px; width: 100%; margin: 0 auto;
  scrollbar-width: thin; scrollbar-color: #3a3446 transparent;
}

/* ---------- dock ---------- */
.ph-dock {
  flex: none;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--ph-line);
  background: var(--ph-bg-2);
}
.ph-tab {
  flex: 0 1 96px;
  min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 4px 6px;
  border: 0; border-radius: 14px;
  background: transparent; color: var(--ph-faint);
  font-family: var(--ph-cond); font-weight: 700; font-size: 13px; letter-spacing: 0.6px; text-transform: uppercase;
  cursor: pointer;
  transition: color 120ms, background 120ms;
}
.ph-tab .ph-ico { width: 23px; height: 23px; }
.ph-tab:hover { color: var(--ph-ink); }
.ph-tab.active { color: var(--ph-gold); background: rgba(255, 200, 60, 0.1); }
.ph-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- shared bits ---------- */
.ph-disc {
  --c: #8b8599;
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c); color: #121016;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}
.ph-disc .ph-ico { width: 18px; height: 18px; stroke-width: 2.4; }
.ph-disc.big { width: 46px; height: 46px; }
.ph-disc.big .ph-ico { width: 24px; height: 24px; }
.ph-disc.xs { width: 20px; height: 20px; }
.ph-disc.xs .ph-ico { width: 12px; height: 12px; stroke-width: 2.8; }

.ph-h {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 2px 8px;
  font-family: var(--ph-cond); font-weight: 700; font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ph-faint);
}
.ph-h:first-child { margin-top: 4px; }
.ph-link { background: none; border: 0; color: var(--ph-gold); font: inherit; letter-spacing: 1px; cursor: pointer; padding: 0; }

.ph-row-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ph-row-txt b { font-family: var(--ph-cond); font-size: 18px; font-weight: 700; letter-spacing: 0.4px; color: var(--ph-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-row-txt small { font-size: 14px; color: var(--ph-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-row-txt small em { color: var(--ph-gold); font-style: normal; }

.ph-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 16px; border-radius: 999px;
  background: var(--ph-card-hi); color: var(--ph-ink); border: 1px solid var(--ph-line-hi);
  font-family: var(--ph-cond); font-weight: 700; font-size: 16px; letter-spacing: 0.8px; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: transform 80ms, filter 120ms;
}
.ph-btn .ph-ico { width: 17px; height: 17px; }
.ph-btn:hover:not(:disabled) { filter: brightness(1.15); }
.ph-btn:active:not(:disabled) { transform: scale(0.97); }
.ph-btn.primary { background: var(--ph-gold); color: #1a1003; border-color: var(--ph-gold); }
.ph-btn.ghost { background: transparent; }
.ph-btn.sm { height: 34px; padding: 0 13px; font-size: 14px; }
.ph-btn.wide { width: 100%; margin-top: 12px; }
.ph-btn:disabled { opacity: 0.45; cursor: default; }

.ph-pill {
  flex: none;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(94, 240, 138, 0.12); color: var(--ph-up);
  font-family: var(--ph-cond); font-weight: 700; font-size: 16px; letter-spacing: 0.5px; white-space: nowrap;
}
.ph-pill.broke { background: rgba(255, 107, 124, 0.12); color: var(--ph-down); }
.ph-pill.free { background: rgba(92, 200, 255, 0.14); color: #7fd4ff; }
.ph-pill.none { background: rgba(255, 255, 255, 0.05); color: var(--ph-faint); }

.ph-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--ph-r);
  background: linear-gradient(135deg, #241d2c, #1a1622);
  border: 1px solid var(--ph-line);
}
.ph-hero > span:not(.ph-disc):not(.ph-pill) { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ph-hero b { font-family: var(--ph-cond); font-size: 21px; font-weight: 700; letter-spacing: 0.5px; }
.ph-hero small { font-size: 14px; color: var(--ph-dim); }

.ph-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ph-hero + .ph-stats { margin-top: 10px; }
.ph-scroll > .ph-stats:first-child { margin-top: 0; }
.ph-stats > div {
  display: flex; flex-direction: column; gap: 2px;
  padding: 13px 14px; border-radius: var(--ph-r);
  background: var(--ph-card); border: 1px solid var(--ph-line);
}
.ph-stats small { font-family: var(--ph-cond); font-weight: 700; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ph-faint); }
.ph-stats b { font-family: var(--ph-cond); font-size: 26px; font-weight: 700; letter-spacing: 0.3px; }
.ph-stats em { font-style: normal; font-size: 13px; color: var(--ph-dim); }
.ph-stats .up, .ph-stats .money { color: var(--ph-up); }
.ph-stats .down { color: var(--ph-down); }

.ph-row, .ph-offer, .ph-quote, .ph-job, .ph-set {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; margin-bottom: 7px;
  border-radius: 14px; border: 1px solid var(--ph-line);
  background: var(--ph-card); color: var(--ph-ink);
  font: inherit; text-align: left;
}
button.ph-row, button.ph-offer { cursor: pointer; transition: background 100ms, border-color 100ms; }
button.ph-row:hover:not(:disabled), button.ph-offer:hover:not(:disabled) { background: var(--ph-card-hi); border-color: rgba(255, 200, 60, 0.35); }
button.ph-row:disabled { opacity: 0.55; cursor: default; }

.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ph-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 14px; border-radius: 14px; border: 1px solid var(--ph-line);
  background: linear-gradient(160deg, #221d2b, #1a1721); color: var(--ph-ink);
  font: inherit; text-align: left; cursor: pointer;
}
.ph-tile b { font-family: var(--ph-cond); font-size: 18px; font-weight: 700; letter-spacing: 0.4px; }
.ph-tile:hover:not(:disabled) { border-color: rgba(255, 200, 60, 0.35); }
.ph-tile:disabled { opacity: 0.55; cursor: default; }

.ph-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.ph-tags i {
  font-style: normal; font-family: var(--ph-cond); font-weight: 700; font-size: 12px; letter-spacing: 0.8px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--ph-dim);
}
.ph-tags i.warn { background: rgba(255, 107, 124, 0.13); color: var(--ph-down); }
.ph-pay { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; font-family: var(--ph-cond); font-size: 21px; font-weight: 700; color: var(--ph-up); }
.ph-pay small { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--ph-gold); color: #1a1003; }

.ph-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ph-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb454, var(--ph-gold)); transition: width 300ms; }
.ph-bar.thin { height: 5px; width: 100%; }
.ph-bar.low i { background: var(--ph-down); }
.ph-prog-l { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; color: var(--ph-dim); }
.ph-prog-l b { color: var(--ph-ink); font-family: var(--ph-cond); font-size: 16px; }
.ph-card-block { margin-top: 10px; padding: 14px; border-radius: var(--ph-r); background: var(--ph-card); border: 1px solid var(--ph-line); }
.ph-steps { margin: 14px 0 0; padding-left: 22px; color: var(--ph-dim); font-size: 15px; line-height: 1.5; }
.ph-steps li { margin-bottom: 6px; }
.ph-steps b { color: var(--ph-ink); }

.ph-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px 16px; text-align: center; color: var(--ph-dim); font-size: 15px;
}
.ph-empty .ph-ico { width: 30px; height: 30px; color: var(--ph-faint); }
.ph-empty b { color: var(--ph-ink); font-family: var(--ph-cond); font-size: 18px; }
.ph-empty.small { padding: 14px; border-radius: 14px; border: 1px dashed var(--ph-line-hi); }

.ph-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 200, 60, 0.06); color: var(--ph-dim); font-size: 14px; line-height: 1.4; }
.ph-note .ph-ico { color: var(--ph-gold); width: 18px; height: 18px; margin-top: 1px; }
.ph-note b { color: var(--ph-ink); }

/* ---------- MAPS ---------- */
.ph-maps { flex-direction: row; }
.ph-side {
  flex: 0 0 340px;
  display: flex; flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--ph-line);
  background: var(--ph-bg);
}
.ph-searchbar {
  flex: none;
  position: relative;
  display: flex; align-items: center;
  margin: 12px 12px 8px;
  height: 46px; border-radius: 999px;
  background: var(--ph-card-hi); border: 1px solid var(--ph-line-hi);
}
.ph-searchbar:focus-within { border-color: var(--ph-gold); }
.ph-search-ico { display: grid; place-items: center; width: 42px; color: var(--ph-dim); }
.ph-back { display: none; }
.ph-search {
  flex: 1; min-width: 0; height: 100%;
  background: transparent; border: 0; outline: 0; color: var(--ph-ink);
  font-family: var(--ph-ui); font-size: 17px; font-weight: 500;
  padding-right: 16px;
}
.ph-search::placeholder { color: var(--ph-faint); }
.ph-chips { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; flex: none; }
.ph-chips::-webkit-scrollbar { display: none; }
.ph-chip {
  flex: none; height: 32px; padding: 0 13px; border-radius: 999px;
  background: var(--ph-card); border: 1px solid var(--ph-line-hi); color: var(--ph-dim);
  font-family: var(--ph-cond); font-weight: 700; font-size: 14px; letter-spacing: 0.6px; cursor: pointer;
}
.ph-chip.on { background: var(--ph-gold); border-color: var(--ph-gold); color: #1a1003; }
.ph-list-head { padding: 2px 16px 4px; font-size: 13px; color: var(--ph-faint); flex: none; }
.ph-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 8px 14px; scrollbar-width: thin; scrollbar-color: #3a3446 transparent; }
.ph-list .ph-h { margin: 12px 8px 6px; }
.ph-place {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 9px 8px; border: 0; border-radius: 12px;
  background: transparent; color: var(--ph-ink); text-align: left; font: inherit; cursor: pointer;
}
.ph-place:hover { background: var(--ph-card); }
.ph-place.on { background: rgba(255, 210, 60, 0.12); }
.ph-place-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.ph-place-txt b { font-family: var(--ph-cond); font-size: 17px; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-place-txt small { font-size: 13px; color: var(--ph-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-place-d { flex: none; font-family: var(--ph-cond); font-size: 14px; color: var(--ph-faint); }

.ph-mapwrap { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; background: #0b0a10; }
.ph-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.ph-map.dragging { cursor: grabbing; }
.ph-ctrls {
  position: absolute; right: 12px; top: 12px;
  display: flex; flex-direction: column; gap: 1px;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.ph-ctrls button {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(28, 25, 36, 0.94); color: var(--ph-ink); border: 0; cursor: pointer; padding: 0;
}
.ph-ctrls button:hover { background: #2c2737; }
.ph-ctrls button.on { color: #6dff8e; }
.ph-legend {
  position: absolute; right: 66px; top: 12px; width: 230px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(20, 18, 26, 0.96); border: 1px solid var(--ph-line-hi);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 14px; color: var(--ph-ink);
  display: flex; flex-direction: column; gap: 6px;
  max-height: calc(100% - 24px); overflow-y: auto;
}
.ph-legend > div { display: flex; align-items: center; gap: 9px; }
.ph-legend p { margin: 6px 0 0; font-size: 13px; color: var(--ph-dim); line-height: 1.4; }
.ph-legend-h { font-family: var(--ph-cond); font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; font-size: 12px; color: var(--ph-faint); }
.ph-sw { width: 20px; height: 20px; border-radius: 50%; flex: none; display: inline-block; }
.ph-sw.you { background: #6dff8e; box-shadow: 0 0 0 3px #fff inset; }
.ph-sw.route { height: 6px; border-radius: 3px; background: #ffd23c; }
.ph-sw.players { width: 12px; height: 12px; margin: 0 4px; background: #ff5c8a; border: 2px solid #fff; }
.ph-sw.exit { height: 14px; border-radius: 7px; border: 2px solid #ff8c2a; background: #1a0d04; }
.ph-sw.mission { background: #ff4d5e; }

.ph-card {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 18px;
  background: rgba(24, 21, 30, 0.97); border: 1px solid var(--ph-line-hi);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  animation: ph-card-in 160ms ease-out;
}
@keyframes ph-card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ph-card:not(.hint) { padding-right: 42px; }
.ph-card.hint { padding: 10px 14px; }
.ph-card-txt { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.ph-card.hint .ph-card-txt { padding-right: 0; }
.ph-card-txt b { font-family: var(--ph-cond); font-size: 20px; font-weight: 700; letter-spacing: 0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-card-txt small { font-size: 14px; color: var(--ph-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-card-txt em { font-style: normal; font-family: var(--ph-cond); font-size: 15px; font-weight: 700; color: var(--ph-gold); margin-top: 2px; }
.ph-card-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.ph-card-acts .ph-btn { height: 38px; font-size: 15px; }
.ph-card-x {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  background: transparent; border: 0; color: var(--ph-faint); cursor: pointer;
}
.ph-card-x .ph-ico { width: 16px; height: 16px; }
.ph-card-x:hover { color: var(--ph-ink); }

/* ---------- STOCKS ---------- */
.ph-quote { gap: 12px; }
.ph-tick {
  flex: none; width: 58px; padding: 7px 0; border-radius: 10px; text-align: center;
  font-family: var(--ph-cond); font-weight: 700; font-size: 15px; letter-spacing: 1px;
  background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.ph-spark { flex: 0 0 84px; height: 30px; }
.ph-spark polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ph-spark.up polyline { stroke: var(--ph-up); }
.ph-spark.down polyline { stroke: var(--ph-down); }
.ph-px { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 76px; }
.ph-px b { font-family: var(--ph-cond); font-size: 18px; font-weight: 700; }
.ph-px i { font-style: normal; font-family: var(--ph-cond); font-weight: 700; font-size: 13px; padding: 1px 7px; border-radius: 6px; }
.ph-px i.up { background: rgba(94, 240, 138, 0.13); color: var(--ph-up); }
.ph-px i.down { background: rgba(255, 107, 124, 0.13); color: var(--ph-down); }

/* ---------- BAG ---------- */
.ph-item {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  padding: 13px; border-radius: 14px; background: var(--ph-card); border: 1px solid var(--ph-line);
}
.ph-item.on { border-color: rgba(255, 200, 60, 0.5); }
.ph-item b { font-family: var(--ph-cond); font-size: 18px; font-weight: 700; }
.ph-item small { font-size: 14px; color: var(--ph-dim); }

/* ---------- CAREER ---------- */
.ph-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-box { padding: 16px; border-radius: var(--ph-r); background: linear-gradient(160deg, #221d2b, #1a1721); border: 1px solid var(--ph-line); display: flex; flex-direction: column; }
.ph-box > small { font-family: var(--ph-cond); font-weight: 700; font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ph-faint); }
.ph-box h3 { margin: 2px 0 12px; font-family: var(--ph-cond); font-size: 25px; font-weight: 700; letter-spacing: 0.4px; color: var(--ph-ink); }
.ph-box p { margin: 10px 0 0; font-size: 15px; color: var(--ph-dim); line-height: 1.4; }
.ph-box p.live { color: var(--ph-up); }
.ph-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ph-mini { display: flex; justify-content: space-between; margin-top: auto; padding-top: 12px; font-size: 14px; color: var(--ph-dim); }
.ph-mini b { color: var(--ph-up); font-family: var(--ph-cond); font-size: 16px; }
.ph-job.locked .ph-row-txt b, .ph-job.locked .ph-rate { color: var(--ph-faint); }
.ph-job.on { border-color: rgba(255, 200, 60, 0.5); background: rgba(255, 200, 60, 0.06); }
.ph-rate { flex: none; font-family: var(--ph-cond); font-weight: 700; font-size: 19px; color: var(--ph-up); }
.ph-rate small { font-size: 13px; color: var(--ph-dim); }

/* ---------- SETTINGS ---------- */
.ph-set { justify-content: space-between; }
.ph-set.wide { flex-wrap: wrap; }
.ph-set .ph-row-txt small { white-space: normal; }
.ph-switch {
  flex: none; width: 52px; height: 30px; border-radius: 99px; padding: 3px;
  background: #3a3446; border: 0; cursor: pointer; transition: background 140ms;
}
.ph-switch i { display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 140ms; }
.ph-switch.on { background: var(--ph-up); }
.ph-switch.on i { transform: translateX(22px); }
.ph-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 12px; background: #120f17; }
.ph-seg button {
  border: 0; border-radius: 9px; padding: 8px 12px; cursor: pointer;
  background: transparent; color: var(--ph-dim);
  font-family: var(--ph-cond); font-weight: 700; font-size: 14px; letter-spacing: 0.5px;
}
.ph-seg button.on { background: var(--ph-gold); color: #1a1003; }
.ph-range { flex: 0 1 180px; accent-color: var(--ph-gold); }
.ph-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.ph-keys > div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--ph-card); font-size: 15px; color: var(--ph-dim); }
.ph-keys kbd, .ph-keys > div > b {
  font-family: var(--ph-cond); font-weight: 700; font-size: 14px; color: var(--ph-gold);
  padding: 3px 8px; border-radius: 7px; background: rgba(255, 200, 60, 0.1); border: 1px solid rgba(255, 200, 60, 0.3);
  white-space: nowrap;
}

/* ================= phone-sized screens ================= */
@media (max-width: 760px), (max-height: 520px) {
  .ph-device { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; border: 0; box-shadow: none; animation-duration: 150ms; }
  .ph-status { padding-left: 14px; padding-right: 10px; grid-template-columns: 1fr auto auto; }
  .ph-status-l span { display: none; }
  .ph-status-t { font-size: 18px; }
  .ph-x { width: 34px; height: 34px; }
  .ph-dock { justify-content: space-between; gap: 0; padding: 4px 4px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .ph-tab { flex: 1 1 0; font-size: 11px; letter-spacing: 0.2px; padding: 6px 0 4px; border-radius: 10px; }
  .ph-tab .ph-ico { width: 22px; height: 22px; }
  .ph-scroll { padding: 12px 12px 20px; }
  .ph-duo { grid-template-columns: 1fr; }
  .ph-spark { flex-basis: 54px; }
  .ph-tick { width: 52px; font-size: 14px; }
  .ph-px { min-width: 64px; }
  .ph-row-txt b { font-size: 17px; }
  .ph-grid { grid-template-columns: 1fr 1fr; }
}
/* Upright phone: the map is the whole screen; search floats on top and the
   list opens over the map like a real maps app. */
@media (max-width: 760px) {
  .ph-side {
    position: absolute; left: 0; right: 0; top: 0; z-index: 3;
    flex: none; border: 0; background: transparent;
    pointer-events: none;
  }
  .ph-side > * { pointer-events: auto; }
  .ph-searchbar { margin: 10px 10px 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); background: rgba(36, 32, 46, 0.97); }
  .ph-chips { padding: 0 10px 6px; }
  .ph-chip { background: rgba(28, 25, 36, 0.95); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4); }
  .ph-list-head, .ph-list { display: none; }
  .ph-maps.listing .ph-side { bottom: 0; background: var(--ph-bg); }
  .ph-maps.listing .ph-list-head { display: block; }
  .ph-maps.listing .ph-list { display: block; }
  .ph-maps.listing .ph-back { display: grid; place-items: center; width: 42px; height: 42px; background: none; border: 0; color: var(--ph-ink); padding: 0; cursor: pointer; }
  .ph-maps.listing .ph-search-ico { display: none; }
  .ph-ctrls { top: 106px; right: 10px; }
  .ph-ctrls button { width: 42px; height: 42px; }
  .ph-legend { top: 106px; right: 60px; width: min(240px, calc(100% - 80px)); }
  .ph-card { left: 8px; right: 8px; bottom: 8px; padding: 12px; }
  .ph-card:not(.hint) { padding-right: 40px; }
  .ph-card-acts .ph-btn { padding: 0 12px; }
}
/* Sideways phone: a slimmer list beside the map. */
@media (min-width: 761px) and (max-height: 520px) {
  .ph-side { flex-basis: 270px; }
  .ph-status { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: 6px; }
  .ph-dock { padding-top: 2px; }
  .ph-tab { flex-direction: row; justify-content: center; gap: 6px; font-size: 12px; padding: 6px 0; }
  .ph-tab .ph-ico { width: 18px; height: 18px; }
  .ph-card { flex-wrap: nowrap; }
  .ph-card-acts { flex-direction: row; }
}
/* Short screens (a phone on its side): map buttons in a row along the top,
   and the place card puts its buttons under the name instead of beside it. */
@media (max-height: 520px) {
  .ph-ctrls { flex-direction: row; top: 8px; right: 8px; }
  .ph-ctrls button { width: 38px; height: 38px; }
  .ph-legend { top: 54px; right: 8px; max-height: calc(100% - 64px); }
  .ph-card { flex-wrap: wrap; left: 8px; right: 8px; bottom: 8px; padding: 10px 40px 10px 12px; gap: 8px 10px; }
  .ph-card.hint { padding: 8px 12px; }
  .ph-card .ph-disc.big { width: 38px; height: 38px; }
  .ph-card-acts { flex-direction: row; width: 100%; }
  .ph-card-acts .ph-btn { flex: 1; height: 34px; }
  .ph-card-txt b { font-size: 18px; }
}
@media (max-width: 760px) {
  .ph-card { flex-wrap: wrap; }
  .ph-card-acts { flex-direction: row; width: 100%; }
  .ph-card-acts .ph-btn { flex: 1; }
}

/* ---------- FREIGHT: how it works, what you need, where to get it ---------- */
.fr-how { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fr-how li { position: relative; padding: 10px 10px 10px 40px; border-radius: 14px; background: var(--ph-card); border: 1px solid var(--ph-line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fr-how li > span { position: absolute; left: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ph-gold); color: #1a1003; font-family: var(--ph-cond); font-weight: 700; font-size: 13px; }
.fr-how b { font-family: var(--ph-cond); font-size: 15px; letter-spacing: 0.3px; color: var(--ph-ink); }
.fr-how small { font-size: 12.5px; line-height: 1.3; color: var(--ph-dim); }
.fr-ride { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--ph-card); border: 1px solid var(--ph-line); }
.fr-ride > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fr-ride small { font-family: var(--ph-cond); font-weight: 700; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ph-faint); }
.fr-ride b { font-family: var(--ph-cond); font-size: 24px; }
.fr-ride em { font-style: normal; font-size: 13px; color: var(--ph-dim); }
.fr-pin { flex: none; min-height: 40px; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255, 200, 60, 0.45); background: rgba(255, 200, 60, 0.1); color: var(--ph-gold); font: 700 13px/1.1 var(--ph-cond); letter-spacing: 0.6px; cursor: pointer; white-space: nowrap; }
.fr-pin:hover { background: rgba(255, 200, 60, 0.2); }
.fr-pin.big { min-height: 46px; font-size: 15px; padding: 10px 16px; }
.fr-offer { margin-bottom: 9px; padding: 12px 13px; border-radius: 16px; border: 1px solid var(--ph-line); background: var(--ph-card); }
.fr-offer.ready { border-color: rgba(120, 230, 150, 0.35); }
.fr-top { display: flex; align-items: center; gap: 12px; }
.fr-top .ph-row-txt { flex: 1; min-width: 0; }
.fr-pay { flex: none; font-family: var(--ph-cond); font-size: 22px; font-weight: 700; color: var(--ph-up); }
.ph-tags i.ok { background: rgba(120, 230, 150, 0.14); color: var(--ph-up); }
.fr-need { display: flex; align-items: center; gap: 10px; margin-top: 9px; padding: 9px 10px; border-radius: 12px; background: rgba(255, 107, 124, 0.07); color: var(--ph-dim); font-size: 13.5px; line-height: 1.35; }
.fr-need > span { flex: 1; min-width: 0; }
.fr-take { width: 100%; margin-top: 10px; min-height: 48px; border: 0; border-radius: 12px; background: var(--ph-gold); color: #1a1003; font: 700 16px/1 var(--ph-cond); letter-spacing: 1px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.fr-take small { font: 600 11.5px/1 var(--ph-sans, system-ui); letter-spacing: 0.3px; opacity: 0.75; text-transform: none; }
.fr-offer:not(.ready) .fr-take { background: rgba(255, 255, 255, 0.08); color: var(--ph-ink); }
.fr-next { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 200, 60, 0.08); border: 1px solid rgba(255, 200, 60, 0.3); color: var(--ph-dim); font-size: 14.5px; line-height: 1.4; }
.fr-next b { color: var(--ph-ink); }
.fr-toast { position: sticky; bottom: 8px; margin: 10px auto 0; width: max-content; max-width: 100%; padding: 9px 14px; border-radius: 999px; background: #1d2a1f; border: 1px solid rgba(120, 230, 150, 0.4); color: #c9ffd4; font-size: 13.5px; opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
.fr-toast.on { opacity: 1; transform: none; }
.fr-toast.bad { background: #2a1d20; border-color: rgba(255, 107, 124, 0.4); color: #ffc2c8; }
@media (max-width: 560px) {
  /* three compact chips in a row: the steps, not an essay */
  .fr-how { gap: 6px; }
  .fr-how li { padding: 30px 6px 8px; align-items: center; text-align: center; }
  .fr-how li > span { left: 50%; top: 6px; transform: translateX(-50%); width: 20px; height: 20px; font-size: 12px; }
  .fr-how b { font-size: 13px; line-height: 1.15; }
  .fr-how small { display: none; }
  .fr-need, .fr-next { flex-direction: column; align-items: stretch; }
  .fr-need .fr-pin, .fr-next .fr-pin { width: 100%; }
}
