/* Priors website: in-game phone demo (Concept UI). Pairs with assets/demos/phone.js.
   The device, wallpaper, lock and home screens are always dark (it's an object in the game);
   the apps follow the site theme through the site's colour tokens. */

.phd { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.phd [hidden] { display: none !important; }
.phd button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.phd h3 { font: 700 1rem/1.2 var(--font-body); text-transform: none; letter-spacing: 0; }

/* ---------- the panel beside the phone ---------- */
.phd-side { display: grid; gap: .7rem; align-content: start; min-width: 0; }
.phd-tags { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.phd-concept {
  font: 600 .7rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  padding: .42rem .6rem; border-radius: 4px; background: var(--fg); color: var(--bg);
}
.phd-note { font-size: .9rem; color: var(--muted); max-width: 48ch; }
.phd-tries { display: grid; gap: .7rem; align-content: start; min-width: 0; }
.phd-trylist { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.phd-try {
  width: 100%; min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  text-align: left; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 8px;
  padding: .65rem .9rem; font: 500 .93rem/1.35 var(--font-body);
  transition: border-color .15s ease, transform .15s ease;
}
.phd-try:hover { border-color: var(--muted); transform: translateX(2px); }
.phd-try-go { color: var(--clay); font-weight: 700; }
.phd-reset { justify-self: start; }

@media (min-width: 860px) {
  .phd { grid-template-columns: 340px minmax(0, 1fr); grid-template-areas: "device side" "device tries"; grid-template-rows: auto 1fr; column-gap: clamp(2.5rem, 6vw, 5rem); row-gap: 1.6rem; }
  .phd-device { grid-area: device; }
  .phd-side { grid-area: side; padding-top: 2.5rem; }
  .phd-tries { grid-area: tries; max-width: 430px; }
}

/* ---------- device ---------- */
.phd-device {
  position: relative; justify-self: center; width: min(340px, 100%); height: 690px;
  padding: 10px; border-radius: 46px; background: #0b0f0d;
  box-shadow: inset 0 0 0 1.5px #2b322e, inset 0 0 0 4px #0b0f0d, inset 0 0 0 5px #1a201c,
    0 0 0 1px rgba(255,255,255,.05), 0 40px 70px -35px rgba(10, 20, 14, .65), 0 12px 24px -12px rgba(10, 20, 14, .35);
}
.phd-device:focus { outline: none; }
.phd-vol { position: absolute; left: -3px; top: 132px; width: 3px; height: 58px; border-radius: 2px 0 0 2px; background: #1f2622; box-shadow: 0 74px 0 #1f2622; }
.phd-power {
  position: absolute; right: -3px; top: 160px; width: 3px; height: 72px; padding: 0; border: 0;
  border-radius: 0 2px 2px 0; background: #1f2622;
}
.phd-power::before { content: ""; position: absolute; inset: -6px -10px -6px -6px; }
.phd-power:hover { background: #35403a; }
.phd-power:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

.phd-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 36px; isolation: isolate;
  background: #0d1420; color: #fff; font: 400 14px/1.4 var(--font-body);
}
.phd-wall { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.phd-screen :focus-visible { outline: 2px solid #ffb38a; outline-offset: 2px; border-radius: 8px; }
.phd-screen.is-app:not(.is-darkapp) :focus-visible { outline-color: var(--clay); }

/* status bar */
.phd-sb {
  position: absolute; z-index: 30; inset: 0 0 auto; height: 36px; padding: 2px 24px 0 28px;
  display: flex; align-items: center; justify-content: space-between; font: 600 13.5px/1 var(--font-body);
  color: #fff; pointer-events: none; font-variant-numeric: tabular-nums;
}
.is-app:not(.is-darkapp) .phd-sb { color: var(--fg); }
.phd-cam { position: absolute; left: 50%; top: 11px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #050706; box-shadow: inset 0 0 0 3px #111916, 0 0 0 1px rgba(255,255,255,.06); }
.phd-sb-right { display: flex; align-items: center; gap: 6px; }
.phd-bars { display: flex; align-items: flex-end; gap: 1.5px; height: 11px; }
.phd-bars i { width: 3px; background: currentColor; border-radius: 1px; }
.phd-bars i:nth-child(1) { height: 4px; } .phd-bars i:nth-child(2) { height: 6px; }
.phd-bars i:nth-child(3) { height: 8.5px; } .phd-bars i:nth-child(4) { height: 11px; opacity: .35; }
.phd-net { font-size: 11px; letter-spacing: .02em; }
.phd-batt { position: relative; width: 23px; height: 11px; border: 1.5px solid currentColor; border-radius: 3.5px; opacity: .95; }
.phd-batt::after { content: ""; position: absolute; right: -4px; top: 2.5px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor; }
.phd-batt i { position: absolute; inset: 1.5px; right: 6px; border-radius: 1.5px; background: currentColor; }

/* ---------- lock screen ---------- */
.phd-lock {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; padding: 52px 14px 16px;
  background: linear-gradient(180deg, rgba(5,8,14,.1), rgba(5,8,14,0) 40%, rgba(5,8,14,.35));
  touch-action: none; user-select: none; transition: transform .32s cubic-bezier(.2,.7,.2,1), opacity .32s ease;
}
.phd-lock.is-out { transform: translateY(-100%) !important; opacity: 0; }
.phd-lock-top { display: grid; justify-items: center; text-align: center; gap: 2px; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.phd-lock-ico { width: 16px; height: 16px; opacity: .85; margin-bottom: 4px; }
.phd-lock-time { font: 800 78px/0.95 var(--font-display); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.phd-lock-date { font-weight: 600; font-size: 15px; margin-top: 4px; }
.phd-lock-wx { font-size: 12.5px; opacity: .82; }
.phd-lock-notes { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 8px; align-content: start; overflow: auto; min-height: 0; flex: 1; scrollbar-width: none; }
.phd-notif, .phd-banner {
  width: 100%; display: grid; gap: 1px; text-align: left; color: #fff; padding: 10px 12px 11px;
  background: rgba(24, 28, 32, .58); border: 1px solid rgba(255,255,255,.12); border-radius: 18px;
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}
.phd-notif:hover { background: rgba(34, 38, 42, .68); }
/* a swipe up that starts on a notification unlocks too, so the page must not take the vertical pan */
.phd-lock-notes, .phd-notif { touch-action: none; }
.phd-n-head { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .85; margin-bottom: 3px; }
.phd-n-ico { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; flex: none; }
.phd-n-ico .phd-ico { width: 12px; height: 12px; stroke-width: 2.2; }
.phd-n-when { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; opacity: .85; }
.phd-n-title { font-weight: 650; font-size: 13.5px; }
.phd-n-body { font-size: 13px; opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.phd-unlock {
  margin-top: 12px; align-self: center; display: grid; justify-items: center; gap: 0; padding: 8px 18px;
  background: none; border: 0; color: #fff; font-size: 12.5px; font-weight: 500; opacity: .9; border-radius: 99px;
}
.phd-unlock .phd-ico { width: 22px; height: 22px; animation: phd-bob 1.8s ease-in-out infinite; }
.phd-unlock:hover { opacity: 1; background: rgba(255,255,255,.08); }
@keyframes phd-bob { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }

/* ---------- home screen ---------- */
.phd-home {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; padding: 46px 14px 30px;
  background: linear-gradient(180deg, rgba(5,8,14,.2), rgba(5,8,14,.05) 45%, rgba(5,8,14,.25));
}
.phd-widget {
  display: grid; gap: 1px; padding: 13px 16px 14px; border-radius: 22px; color: #fff;
  background: rgba(20, 24, 28, .48); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.phd-w-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.phd-w-k { font: 600 10.5px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.phd-w-v { font: 800 26px/1 var(--font-display); }
.phd-w-sub { font-size: 12.5px; opacity: .85; }
.phd-w-strong { font-weight: 600; opacity: 1; }
.phd-w-line { height: 1px; background: rgba(255,255,255,.14); margin: 8px 0 7px; }
.phd-grid, .phd-dock { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.phd-grid { margin-top: 20px; row-gap: 14px; }
.phd-dock {
  margin-top: auto; padding: 9px 6px; border-radius: 28px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.phd-dock .phd-applabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.phd-appbtn {
  width: 100%; display: grid; justify-items: center; gap: 5px; padding: 3px 0; background: none; border: 0;
  color: #fff; font-size: 11.5px; font-weight: 500; border-radius: 16px;
}
.phd-appbtn:active .phd-appico { transform: scale(.93); }
.phd-appico {
  position: relative; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.2), 0 6px 14px -6px rgba(0,0,0,.55);
  transition: transform .12s ease;
}
.phd-appico .phd-ico { width: 28px; height: 28px; stroke-width: 1.8; }
.phd-applabel { text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.phd-badge {
  position: absolute; top: -5px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  display: grid; place-items: center; background: #e5483b; color: #fff; font: 700 11px/1 var(--font-body);
  box-shadow: 0 0 0 2px rgba(0,0,0,.18);
}
/* app colours: pine, clay, ink and a little water */
.phd-ai-texts { background: linear-gradient(160deg, #46b073, #1b6b43); color: #fff; }
.phd-ai-bank { background: linear-gradient(160deg, #2f3d36, #121a16); color: #e8c27a; }
.phd-ai-phone { background: linear-gradient(160deg, #62cf93, #22844d); color: #fff; }
.phd-ai-maps { background: linear-gradient(160deg, #7cbad5, #2d6a87); color: #fff; }
.phd-ai-trader { background: linear-gradient(160deg, #f3d394, #c98b2d); color: #3a2608; }
.phd-ai-camera { background: linear-gradient(160deg, #5e6662, #262b28); color: #fff; }
.phd-ai-gallery { background: linear-gradient(160deg, #ea8455, #a8401c); color: #fff; }

/* ---------- shared bits ---------- */
.phd-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.phd-homebar { position: absolute; z-index: 45; bottom: 4px; left: 50%; width: 136px; height: 20px; margin-left: -68px; padding: 0; background: none; border: 0; display: grid; place-items: center; }
.phd-homebar span { display: block; width: 118px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.85); }
.is-app:not(.is-darkapp) .phd-homebar span { background: color-mix(in srgb, var(--fg) 75%, transparent); }
.is-locked .phd-homebar { display: none; }

.phd-banner {
  position: absolute; z-index: 40; top: 38px; left: 8px; right: 8px; width: auto;
  background: rgba(26, 30, 34, .9); box-shadow: 0 14px 30px -12px rgba(0,0,0,.6);
  transform: translateY(-140%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.phd-banner.is-in { transform: translateY(0); }

/* ---------- app views ---------- */
.phd-app { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; padding-top: 36px; background: var(--bg); color: var(--fg); }
.phd-app.is-dark { background: #0b0e0c; color: #f1f2ee; }
.phd-enter { animation: phd-in .26s cubic-bezier(.2,.8,.2,1); }
@keyframes phd-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.phd-appbar {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) 84px; align-items: center; gap: 4px;
  min-height: 48px; padding: 2px 8px 4px; border-bottom: 1px solid var(--line);
}
.is-dark .phd-appbar { border-color: rgba(255,255,255,.1); }
.phd-back {
  justify-self: start; display: inline-flex; align-items: center; gap: 0; min-height: 40px; padding: 6px 8px 6px 2px;
  background: none; border: 0; color: var(--pine); font-size: 14.5px; font-weight: 500; max-width: 100%;
}
.phd-back-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-dark .phd-back { color: #8be0ad; }
.phd .phd-title { text-align: center; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phd-title:focus { outline: none; }
.phd-bar-actions { justify-self: end; display: flex; }
.phd-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 12px 30px; overscroll-behavior: contain; scrollbar-width: thin; }
.phd-body.is-flush { padding: 0; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.phd-mono { font-family: var(--font-mono); }
.phd-strong { font-weight: 700; color: var(--fg); }
.phd-k { font: 600 10.5px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.phd-link {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; background: none; border: 0;
  color: var(--clay); font: 600 13px var(--font-body); text-decoration: underline; text-underline-offset: 3px;
}
.phd-link .phd-ico { width: 16px; height: 16px; }
.phd-primary, .phd-secondary {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; font: 700 15px var(--font-body);
  transition: filter .15s ease, transform .1s ease;
}
.phd-primary { background: var(--clay); color: var(--clay-ink); border: 0; }
.phd-primary:hover { filter: brightness(1.08); }
.phd-primary:active { transform: scale(.98); }
.phd-primary:disabled { opacity: .7; cursor: progress; }
.phd-secondary { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.phd-secondary:hover { border-color: var(--muted); }

/* ---------- Texts ---------- */
.phd-convos { list-style: none; margin: -4px 0 0; padding: 0; }
.phd-convo {
  width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 11px; align-items: center;
  padding: 11px 2px; background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; text-align: left;
}
.phd-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 15px var(--font-body); letter-spacing: .02em; }
.phd-tone-pine { background: linear-gradient(160deg, #2e8a58, #155a37); }
.phd-tone-clay { background: linear-gradient(160deg, #cf6a3e, #8e3416); }
.phd-cv-main { display: grid; gap: 1px; min-width: 0; }
.phd-cv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.phd-cv-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phd-cv-time { font-size: 12px; color: var(--muted); flex: none; }
.phd-cv-prev { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.phd-convo.is-unread .phd-cv-name { font-weight: 750; }
.phd-convo.is-unread .phd-cv-prev { color: var(--fg); }
.phd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pine); }
.phd-thread { display: flex; flex-direction: column; height: 100%; }
.phd-app-texts .phd-body:has(.phd-thread:not([hidden])) { padding-bottom: 28px; overflow: hidden; }
.phd-log { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 5px; padding: 2px 2px 10px; scrollbar-width: none; }
.phd-daystamp { align-self: center; font-size: 11.5px; color: var(--muted); margin: 2px 0 6px; }
.phd-msg { max-width: 82%; padding: 8px 12px; border-radius: 18px; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; animation: phd-pop .22s ease-out; }
.phd-msg.is-them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.phd-msg.is-me { align-self: flex-end; background: var(--sign); color: var(--sign-fg); border-bottom-right-radius: 6px; }
@keyframes phd-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.phd-typing { display: inline-flex; gap: 4px; align-items: center; align-self: flex-start; padding: 11px 13px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.phd-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: phd-dots 1.1s infinite ease-in-out; }
.phd-typing i:nth-child(2) { animation-delay: .15s; } .phd-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes phd-dots { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.phd-replies { display: grid; gap: 6px; padding-top: 9px; border-top: 1px solid var(--line); }
.phd-chip {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 40px; width: 100%;
  padding: 8px 12px; text-align: left; border-radius: 14px; font: 500 13.5px/1.3 var(--font-body);
  background: var(--surface); color: var(--fg); border: 1.5px solid color-mix(in srgb, var(--pine) 70%, var(--line));
}
.phd-chip:hover { background: color-mix(in srgb, var(--pine) 9%, var(--surface)); }
.phd-chip-ico { width: 16px; height: 16px; color: var(--pine); }
.phd-ended { text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Bank ---------- */
.phd-acct {
  position: relative; overflow: hidden; display: grid; gap: 2px; padding: 15px 16px 16px; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(224,112,63,.35), transparent 55%), linear-gradient(150deg, #1f5f3f, #0e2a1d 75%);
  box-shadow: 0 12px 24px -14px rgba(14, 42, 29, .8);
}
.phd-acct::after {
  content: ""; position: absolute; right: -8px; bottom: -6px; width: 120px; height: 60px; opacity: .22;
  background: linear-gradient(135deg, transparent 49%, #000 50%) 0 100% / 20px 30px repeat-x;
}
.phd-acct-top { display: flex; justify-content: space-between; font-size: 12.5px; opacity: .88; }
.phd-bal { font: 800 40px/1.05 var(--font-display); letter-spacing: .01em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.phd-acct-sub { font-size: 12px; opacity: .75; }
.phd-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 14px 0 6px; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); }
.phd-tab { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 600 13.5px var(--font-body); }
.phd-tab[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.phd-tabbadge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5483b; color: #fff; font-size: 11px; display: grid; place-items: center; }
.phd-txns { list-style: none; margin: 0; padding: 0; }
.phd-txns li { border-bottom: 1px solid var(--line); }
.phd-txns li.is-new { animation: phd-flash 1.8s ease-out; }
@keyframes phd-flash { 0%, 30% { background: color-mix(in srgb, var(--clay) 14%, transparent); } 100% { background: transparent; } }
.phd-tx { width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 2px; background: none; border: 0; color: inherit; text-align: left; }
.phd-tx-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--bg-2); color: var(--muted); }
.phd-tx-in { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.phd-tx-main { display: grid; min-width: 0; }
.phd-tx-who { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phd-tx-what { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phd-tx-amt { padding-right: 4px; font: 600 13px var(--font-mono); font-variant-numeric: tabular-nums; }
.phd-tx-amt.is-in { color: var(--ok); }
.phd-tx-more { font-size: 12.5px; color: var(--muted); padding: 0 4px 11px 48px; }
.phd-bill { position: relative; overflow: hidden; display: grid; gap: 11px; margin-top: 6px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.phd-bill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.phd-bill-org { font-weight: 650; font-size: 14px; line-height: 1.3; }
.phd-pill { flex: none; padding: 3px 8px; border-radius: 99px; font: 700 10.5px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.phd-pill.is-due { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.phd-pill.is-paid { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.phd-bill-no { display: grid; gap: 0; }
.phd-bill-no .phd-strong { font-size: 19px; letter-spacing: .03em; }
.phd-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13px; }
.phd-dl dt { color: var(--muted); }
.phd-dl dd { margin: 0; overflow-wrap: anywhere; }
.phd-bill-done { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ok); font-weight: 500; }
.phd-bill-done:focus { outline: none; }
.phd-bill-done .phd-ico { width: 18px; height: 18px; margin-top: 1px; stroke-width: 2.4; }
.phd-stamp {
  position: absolute; right: 16px; top: 46px; padding: 0 9px; border: 3px solid var(--ok); border-radius: 6px; color: var(--ok);
  font: 900 26px/1.15 var(--font-display); letter-spacing: .1em; transform: rotate(-12deg); opacity: .75; pointer-events: none;
  animation: phd-stamp .35s cubic-bezier(.3,1.6,.5,1);
}
@keyframes phd-stamp { from { transform: rotate(-12deg) scale(1.8); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: .75; } }
.phd-sheet { position: absolute; inset: 0; z-index: 50; display: flex; align-items: flex-end; background: rgba(5, 8, 6, .45); }
.phd-sheet-card { width: 100%; display: grid; gap: 12px; padding: 18px 16px 30px; border-radius: 24px 24px 0 0; background: var(--surface); color: var(--fg); box-shadow: 0 -10px 30px rgba(0,0,0,.25); animation: phd-up .26s cubic-bezier(.2,.8,.2,1); }
@keyframes phd-up { from { transform: translateY(100%); } to { transform: none; } }
.phd-sheet-k { font: 600 10.5px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.phd-sheet-amt { font: 800 42px/1 var(--font-display); }
.phd-sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 4px; }

/* ---------- Phone / 911 ---------- */
.phd-dialer { display: flex; flex-direction: column; gap: 8px; min-height: 100%; }
.phd-numrow { position: relative; display: flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 44px; }
.phd-num { font: 500 32px/1.2 var(--font-body); letter-spacing: .08em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phd-del { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); border-radius: 50%; }
.phd-del .phd-ico { width: 24px; height: 24px; }
.phd-dial-hint { text-align: center; font-size: 12.5px; color: var(--muted); min-height: 2.6em; padding: 0 8px; }
.phd-pad { display: grid; grid-template-columns: repeat(3, 66px); justify-content: center; gap: 10px 18px; }
.phd-key {
  width: 66px; height: 66px; border-radius: 50%; border: 0; display: grid; place-items: center; align-content: center; gap: 0;
  background: var(--bg-2); color: var(--fg); transition: background-color .1s ease;
}
.phd-key:hover { background: color-mix(in srgb, var(--fg) 10%, var(--bg-2)); }
.phd-key:active { background: color-mix(in srgb, var(--fg) 18%, var(--bg-2)); }
.phd-key-n { font: 400 26px/1.05 var(--font-body); }
.phd-key-l { font: 700 9px/1.2 var(--font-body); letter-spacing: .16em; color: var(--muted); min-height: 11px; }
.phd-callrow { display: flex; justify-content: center; padding-top: 6px; }
.phd-call { width: 66px; height: 66px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #23874f; color: #fff; box-shadow: 0 8px 18px -8px rgba(35,135,79,.8); }
.phd-call .phd-ico, .phd-end .phd-ico { fill: currentColor; stroke: none; width: 28px; height: 28px; }
.phd-call:hover { background: #1f7a47; }
.phd-quick { align-self: center; margin-top: 2px; padding: 7px 14px; border-radius: 99px; background: none; border: 1px dashed var(--line); color: var(--bad); font: 600 12.5px var(--font-body); }
.phd-quick:hover { border-color: var(--bad); }
.phd-incall {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; padding-top: 36px; color: #f1f2ee;
  background: radial-gradient(120% 60% at 50% 0%, #22362b, transparent 70%), linear-gradient(180deg, #121a16, #090c0a);
}
.phd-call-head { display: grid; justify-items: center; text-align: center; gap: 1px; padding: 10px 18px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.phd-call-no { font: 800 42px/1 var(--font-display); letter-spacing: .04em; }
.phd-call-who { font-size: 12.5px; opacity: .8; }
.phd-call-timer { font: 500 12.5px var(--font-mono); color: #8be0ad; margin-top: 3px; font-variant-numeric: tabular-nums; }
.phd-tlog { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; scrollbar-width: none; }
.phd-tl { display: grid; gap: 2px; max-width: 88%; margin: 0; padding: 8px 11px; border-radius: 14px; font-size: 13.5px; line-height: 1.35; animation: phd-pop .22s ease-out; }
.phd-tl.is-them { align-self: flex-start; background: rgba(255,255,255,.08); border-bottom-left-radius: 5px; }
.phd-tl.is-me { align-self: flex-end; background: rgba(87,199,138,.2); border-bottom-right-radius: 5px; }
.phd-tl-who { font: 600 10px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
.phd-tl .phd-typing { background: none; border: 0; padding: 4px 0; }
.phd-tl .phd-typing i { background: rgba(255,255,255,.7); }
.phd-call-choices { padding: 9px 14px 2px; border-top: 1px solid rgba(255,255,255,.08); }
.phd-call-choices:empty { display: none; }
.phd-incall .phd-chip { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(87,199,138,.65); }
.phd-incall .phd-chip:hover { background: rgba(87,199,138,.14); }
.phd-endrow { display: flex; justify-content: center; padding: 10px 0 30px; }
.phd-end { display: grid; justify-items: center; gap: 4px; background: none; border: 0; color: #f1f2ee; font-size: 12px; border-radius: 12px; }
.phd-end .phd-ico { width: 58px; height: 58px; padding: 15px; border-radius: 50%; background: #d63a2f; transform: rotate(135deg); box-shadow: 0 8px 18px -8px rgba(214,58,47,.9); }
.phd-end:hover .phd-ico { background: #c13127; }
.phd-dispatch { display: grid; gap: 4px; padding: 12px 13px; border-radius: 14px; background: rgba(87,199,138,.1); border: 1px solid rgba(87,199,138,.5); animation: phd-pop .3s ease-out; }
.phd-dispatch p { margin: 0; }
.phd-disp-k { display: flex; align-items: center; gap: 6px; color: #8be0ad; font: 700 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.phd-disp-k .phd-ico { width: 16px; height: 16px; stroke-width: 2.6; }
.phd-disp-nature { font-weight: 650; font-size: 14.5px; }
.phd-disp-loc { font-size: 13px; opacity: .85; }
.phd-units { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.phd-units li { padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.08); font-size: 12.5px; }
.phd-units b { font-family: var(--font-mono); font-weight: 600; color: #8be0ad; }
.phd-disp-no { font: 500 11.5px var(--font-mono); opacity: .7; }
.phd-disp-link { color: #ffb38a; font-weight: 600; font-size: 13px; text-underline-offset: 3px; margin-top: 2px; }

/* ---------- Maps ---------- */
.phd-map { position: absolute; inset: 0; overflow: hidden; background: #e3e8d9; touch-action: none; cursor: grab; }
.phd-map:active { cursor: grabbing; }
.phd-screen .phd-map:focus-visible { outline: none; }
.phd-map:focus-visible::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 0 3px var(--clay); }
.phd-world { position: absolute; left: 0; top: 0; will-change: transform; }
.phd-mapimg { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.phd-gps { position: absolute; width: 0; height: 0; }
.phd-gps-dot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #2f6fd6; border: 3px solid #fff; box-shadow: 0 0 0 7px rgba(47,111,214,.22), 0 2px 6px rgba(0,0,0,.35); }
.phd-gps-cone { position: absolute; left: 0; top: 0; width: 36px; height: 40px; transform-origin: 50% 100%; background: linear-gradient(to top, rgba(47,111,214,.75), rgba(47,111,214,.05)); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.phd-mappin { position: absolute; width: 36px; height: 36px; transform: translate(-50%, -96%); color: var(--clay); filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.phd-mappin .phd-ico { width: 36px; height: 36px; fill: currentColor; stroke: #fff; stroke-width: 1.4; }
.phd-mappin.is-drop { animation: phd-drop .45s cubic-bezier(.3,1.5,.5,1); }
@keyframes phd-drop { from { transform: translate(-50%, -220%); opacity: 0; } to { transform: translate(-50%, -96%); opacity: 1; } }
.phd-mtop { position: absolute; z-index: 3; top: 8px; left: 10px; right: 10px; }
.phd-search {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 14px;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 6px 16px -8px rgba(0,0,0,.35);
}
.phd-search:focus-within { border-color: var(--clay); box-shadow: 0 0 0 2px color-mix(in srgb, var(--clay) 35%, transparent), 0 6px 16px -8px rgba(0,0,0,.35); }
.phd-search .phd-ico { color: var(--muted); width: 18px; height: 18px; }
.phd-q { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; font: 400 14.5px var(--font-body); padding: 11px 0; }
.phd-q:focus, .phd-q:focus-visible { outline: none; }
.phd-q::placeholder { color: var(--muted); }
.phd-res { list-style: none; margin: 6px 0 0; padding: 4px; max-height: 300px; overflow: auto; border-radius: 14px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 12px 28px -10px rgba(0,0,0,.4); }
.phd-res-btn { width: 100%; display: grid; gap: 0; padding: 8px 10px; text-align: left; background: none; border: 0; border-radius: 10px; color: inherit; }
.phd-res-btn:hover, .phd-res-btn:focus-visible { background: var(--bg-2); }
.phd-res-name { font-weight: 600; font-size: 13.5px; }
.phd-res-addr { font-size: 12px; color: var(--muted); }
.phd-res-none { padding: 10px; font-size: 13px; color: var(--muted); }
.phd-mctrls { position: absolute; z-index: 2; right: 10px; top: 64px; display: grid; gap: 6px; }
.phd-mbtn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 4px 12px -6px rgba(0,0,0,.35); }
.phd-mbtn:disabled { opacity: .45; cursor: default; }
.phd-mbtn[aria-pressed="true"] { color: #2f6fd6; }
.phd-mcard { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 28px; padding: 10px 12px; border-radius: 16px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 10px 24px -10px rgba(0,0,0,.45); }
.phd-mc-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.phd-mc-you { justify-self: center; width: 14px; height: 14px; border-radius: 50%; background: #2f6fd6; border: 2.5px solid #fff; box-shadow: 0 0 0 5px rgba(47,111,214,.2); }
.phd-mc-pin { color: var(--clay); display: grid; place-items: center; }
.phd-mc-pin .phd-ico { width: 26px; height: 26px; fill: currentColor; stroke: var(--surface); stroke-width: 1.4; }
.phd-mc-main { display: grid; min-width: 0; }
.phd-mc-name { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phd-mc-addr { font-size: 12.5px; color: var(--muted); }
.phd-mc-x { width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); border-radius: 50%; }
.phd-mc-dist { margin: 6px 0 0 38px; font-size: 12.5px; font-weight: 600; color: var(--pine); }

/* ---------- Redwater Trader ---------- */
.phd-barbtn { display: inline-flex; align-items: center; gap: 3px; min-height: 34px; padding: 5px 12px 5px 8px; border-radius: 99px; border: 0; background: var(--clay); color: var(--clay-ink); font: 650 13px var(--font-body); }
.phd-barbtn .phd-ico { width: 17px; height: 17px; stroke-width: 2.4; }
.phd-filters { display: flex; gap: 6px; overflow-x: auto; margin: -2px -12px 10px; padding: 0 12px 2px; scrollbar-width: none; }
.phd-fchip { flex: none; min-height: 32px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 600 12.5px var(--font-body); }
.phd-fchip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.phd-ads { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.phd-ad { display: grid; gap: 2px; padding: 11px 12px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.phd-ad:focus { outline: none; }
.phd-ad.is-mine { border: 1.5px solid var(--clay); }
.phd-ad.is-new { animation: phd-flash 1.8s ease-out; }
.phd-ad p { margin: 0; }
.phd-ad-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.phd-ad-cat { font: 600 10.5px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--clay); }
.phd-ad-meta { font-size: 11.5px; color: var(--muted); text-align: right; }
.phd-ad-title { font-weight: 650; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.phd-ad-price { font-weight: 700; font-size: 14px; color: var(--pine); }
.phd-ad-body { font-size: 13px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.phd-ad-mine { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }
.phd-empty { padding: 20px 8px; text-align: center; font-size: 13px; color: var(--muted); }
.phd-form { display: grid; gap: 12px; }
.phd-form-note { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); font-size: 12.5px; color: var(--muted); }
.phd-field { display: grid; gap: 4px; }
.phd-field label { font-weight: 600; font-size: 13px; }
.phd-field input, .phd-field select, .phd-field textarea {
  width: 100%; min-height: 42px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); font: 400 14.5px/1.35 var(--font-body);
}
.phd-field textarea { resize: vertical; min-height: 74px; }
.phd-field input:focus-visible, .phd-field select:focus-visible, .phd-field textarea:focus-visible { outline: 2px solid var(--clay); outline-offset: 1px; border-radius: 10px; }
.phd-field [aria-invalid="true"] { border-color: var(--bad); }
.phd-help { font-size: 11.5px; color: var(--muted); }
.phd-err { font-size: 12px; font-weight: 600; color: var(--bad); }
.phd-form-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 2px; }

/* ---------- Camera ---------- */
.phd-vfwrap { position: relative; flex: 1; min-height: 0; background: #000; overflow: hidden; }
.phd-vf { display: block; width: 100%; height: 100%; object-fit: cover; }
.phd-vfwrap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.28) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.28) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(180deg, transparent calc(33.33% - .5px), rgba(255,255,255,.28) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.28) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}
.phd-vf-tag { position: absolute; z-index: 1; top: 10px; left: 50%; transform: translateX(-50%); padding: 3px 9px; border-radius: 99px; background: rgba(0,0,0,.45); color: rgba(255,255,255,.85); font: 600 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.phd-flash { position: absolute; inset: 0; z-index: 2; background: #fff; opacity: 0; pointer-events: none; }
.phd-flash.is-on { animation: phd-shot .45s ease-out; }
@keyframes phd-shot { 0% { opacity: .95; } 100% { opacity: 0; } }
.phd-modes { display: flex; justify-content: center; gap: 6px; padding: 10px 0 2px; }
.phd-mode { min-height: 32px; padding: 5px 14px; border-radius: 99px; border: 0; background: none; color: rgba(255,255,255,.65); font: 700 12px var(--font-body); letter-spacing: .1em; text-transform: uppercase; }
.phd-mode[aria-pressed="true"] { color: #ffb86b; background: rgba(255,255,255,.1); }
.phd-shutrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 26px 30px; }
.phd-thumb { justify-self: start; width: 48px; height: 48px; padding: 0; border-radius: 11px; border: 2px solid rgba(255,255,255,.7); background: #1b1f1d; overflow: hidden; }
.phd-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phd-shutter { width: 72px; height: 72px; padding: 5px; border-radius: 50%; border: 4px solid #fff; background: transparent; }
.phd-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .1s ease; }
.phd-shutter:active span { transform: scale(.9); }

/* ---------- Gallery ---------- */
.phd-gal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.phd-gal-btn { display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--bg-2); }
.phd-gal-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phd-gal-empty { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center; color: var(--muted); }
.phd-gal-empty .phd-ico { width: 48px; height: 48px; stroke-width: 1.4; }
.phd-gal-empty .phd-primary { width: auto; padding-inline: 22px; }
.phd-viewer { margin: 0; display: grid; gap: 8px; }
.phd-viewer img { display: block; width: 100%; border-radius: 12px; }
.phd-viewer img:focus { outline: none; }
.phd-viewer figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }

/* ---------- small screens and motion ---------- */
@media (max-width: 380px) {
  .phd-device { height: 660px; padding: 8px; border-radius: 42px; }
  .phd-screen { border-radius: 34px; }
  .phd-appico { width: 52px; height: 52px; border-radius: 15px; }
  .phd-key, .phd-call { width: 62px; height: 62px; }
  .phd-pad { grid-template-columns: repeat(3, 62px); gap: 8px 16px; }
  .phd-lock-time { font-size: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .phd *, .phd *::before, .phd *::after { animation: none !important; transition: none !important; }
}
