/* Shared styles for the single-character PropCommand explainers
   (explainer-owner.html, explainer-tradie.html). No escrow implications:
   payment is always shown as direct between owner and tradie. */
:root {
  --accent: #1a6bff;
  --accent-soft: rgba(26,107,255,.14);
  --accent-glow: rgba(26,107,255,.34);
  --text: #0d1524;
  --muted: #55627a;
  --ink-soft: rgba(13,21,36,.08);
  --card: rgba(255,255,255,.96);
  --border: rgba(0,30,120,.14);
  --stage-frame: #0b1030;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #edf2ff; --muted: #8a9dc0; --ink-soft: rgba(255,255,255,.06);
    --card: rgba(9,15,53,.9); --border: rgba(100,140,255,.18); --stage-frame: #04030f;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: transparent; }
body { font-family: var(--body); display: flex; flex-direction: column; gap: 12px; }

.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background:
    radial-gradient(900px 500px at 50% 120%, var(--accent-soft), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--stage-frame) 92%, #fff 8%), var(--stage-frame));
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(4,8,40,.55), inset 0 1px 0 rgba(255,255,255,.06);
  color: #eef3ff; font-family: var(--sans);
}
.tag {
  position: absolute; top: 14px; left: 16px; font-family: var(--sans); font-weight: 600;
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .82; color: #cfe0ff;
}

.char { position: absolute; left: 50%; top: 52%; transform: translate(-50%,-50%); width: 32%; max-width: 200px; z-index: 2; }
.char svg { width: 100%; height: auto; display: block; overflow: visible; }
@keyframes bob { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-4px) } }
.bob { animation: bob 3.4s ease-in-out infinite; }
.badge-glow { transition: filter .5s; }
.stage[data-fx~="badge"] .badge-glow { filter: drop-shadow(0 0 9px #12c85f); }

.bubble {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%) translateY(6px);
  width: 82%; max-width: 460px; background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px; padding: 11px 14px;
  font-family: var(--body); font-size: clamp(12px, 1.9vw, 16px); line-height: 1.3;
  box-shadow: 0 12px 30px -12px rgba(0,10,40,.5);
  opacity: 0; transition: opacity .45s ease, transform .45s ease; text-align: center;
}
.bubble.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.bubble b { color: var(--accent); }
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px;
  background: var(--card); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}
.prop {
  position: absolute; left: 50%; top: 78%; transform: translate(-50%,0) scale(.9);
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: #131c3a; border: 1px solid rgba(160,190,255,.3);
  font-size: 12.5px; font-weight: 600; color: #eaf1ff; white-space: nowrap;
  opacity: 0; transition: opacity .4s, transform .4s; z-index: 5;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.7);
}
.prop.show { opacity: 1; transform: translate(-50%,0) scale(1); }
.prop .emo { font-size: 15px; }
.prop.good { background: #0e2c1f; border-color: rgba(18,200,120,.5); color: #c7f7db; }
.prop.bad  { background: #2c1420; border-color: rgba(214,69,98,.5); color: #ffcdd7; }

.buzz {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%) scale(.7); z-index: 8;
  font-family: var(--sans); font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(19px, 4vw, 38px); text-align: center; padding: 12px 26px; border-radius: 16px;
  background: rgba(9,14,40,.6); border: 1px solid rgba(150,190,255,.35);
  color: #fff; text-shadow: 0 2px 24px var(--accent-glow); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .35s, transform .5s cubic-bezier(.2,1.3,.4,1); white-space: nowrap;
}
.buzz small { display: block; font-family: var(--body); font-weight: 500; font-size: 12px; letter-spacing: 0; color: #b9cbff; margin-top: 4px; }
.buzz.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 16px 14px; display: flex; justify-content: center;
  background: linear-gradient(0deg, #050a1c 0%, #050a1c 34%, rgba(5,10,28,0) 100%);
}
.caption span {
  display: inline-block; opacity: 0; transition: opacity .4s;
  background: #0a1330; color: #ffffff;
  font-family: var(--body); font-weight: 600;
  font-size: clamp(12.5px, 2vw, 17px); line-height: 1.4;
  padding: 10px 16px; border-radius: 12px; max-width: 96%;
  border: 1px solid rgba(150,190,255,.4);
  box-shadow: 0 10px 26px -6px rgba(0,0,0,.85);
}
.caption span.show { opacity: 1; }

/* small coin used ONLY for the $5 platform fee (labelled), never job payment */
.coin {
  position: absolute; left: 50%; top: 72%; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, #f0a933); border: 2px solid #d98b1e;
  display: grid; place-items: center; font-size: 11px; color: #7a4a00; font-weight: 800; opacity: 0; z-index: 4;
}
.stage[data-fx~="fee"] .coin { animation: feepop 1.4s ease forwards; }
@keyframes feepop { 0%{ opacity:0; transform: translate(-50%,10px) scale(.6);} 30%{ opacity:1;} 100%{ opacity:1; transform: translate(-50%,0) scale(1);} }

.endcard {
  position: absolute; inset: 0; z-index: 12; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 13px; text-align: center; padding: 22px;
  background: radial-gradient(700px 400px at 50% 40%, var(--accent-soft), transparent 60%), rgba(4,7,26,.9);
  opacity: 0; pointer-events: none; transition: opacity .6s;
}
.endcard.show { opacity: 1; pointer-events: auto; }
.endcard .logo { font-family: var(--sans); font-weight: 700; font-size: clamp(24px,5vw,42px); letter-spacing: -.03em; }
.endcard .logo em { color: #7fb0ff; font-style: normal; }
.endcard .values { font-size: clamp(12px,2vw,15px); color: #c6d4ff; max-width: 34ch; }
.endcard .values b { color: #fff; font-weight: 600; }
.endcard .ctas { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.endcard .btn { font-family: var(--sans); font-weight: 600; font-size: 13px; padding: 11px 18px; border-radius: 11px; border: 1px solid rgba(150,190,255,.4); color: #eaf1ff; text-decoration: none; }
.endcard .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.aussie { font-size: 11.5px; color: #9fb2e0; letter-spacing: .05em; }

.intro {
  position: absolute; inset: 0; z-index: 11; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 22px; background: rgba(4,7,26,.5); opacity: 1; transition: opacity .6s; cursor: pointer;
}
.intro.hide { opacity: 0; pointer-events: none; }
.intro h2 { font-family: var(--sans); font-weight: 700; font-size: clamp(20px,4.6vw,38px); margin: 0; letter-spacing: -.03em; max-width: 20ch; }
.intro .playhint { display: inline-flex; align-items: center; gap: 8px; color: #b9cbff; font-size: 13px; }
.intro .pc { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; font-size: 18px; box-shadow: 0 0 40px var(--accent-glow); }

.controls { display: flex; align-items: center; gap: 12px; }
.btnc { font-family: var(--sans); font-weight: 600; font-size: 12.5px; cursor: pointer; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 9px; padding: 8px 13px; }
.btnc:hover { border-color: var(--accent); } .btnc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.track { flex: 1; height: 5px; border-radius: 999px; background: var(--ink-soft); overflow: hidden; }
.track > i { display: block; height: 100%; width: 0%; background: var(--accent); border-radius: 999px; }

@media (max-width: 600px) {
  .stage { aspect-ratio: 4 / 5; }
  .tag { font-size: 9px; top: 10px; left: 10px; }
  .bubble { top: 12%; font-size: 12px; padding: 9px 11px; width: 88%; }
  .char { top: 54%; width: 40%; }
  .prop { top: 74%; font-size: 11px; }
  .caption span { font-size: 13px; padding: 8px 12px; }
  .buzz { font-size: 21px; padding: 10px 18px; }
}
@media (prefers-reduced-motion: reduce) { .bob { animation: none; } * { transition-duration: .01ms !important; } }
