/* The corner host and the situation he deals.
   Colours come from the tokens in styles.css so this matches the rest of the app. */

/* ---------- the host, standing in the corner ---------- */

#butler { position: fixed; right: 18px; bottom: 12px; z-index: 45; }

.butler-figure {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  line-height: 0;
  text-align: center;
  transition: transform .18s ease;
  filter: drop-shadow(0 10px 18px rgba(26,41,66,.22));
}
.butler-figure:hover { transform: translateY(-4px); }
.butler-figure:active { transform: translateY(-1px); }
.butler-figure:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 6px; border-radius: 8px; }

.butler-body { display: block; height: 200px; width: auto; }
span.butler-body { font-size: 4rem; line-height: 1; display: block; }

.butler-plate {
  display: block;
  margin-top: -10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--gold);
  font-family: var(--sans);
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(26,41,66,.22);
}
.butler-plate b { display: block; font-size: .84rem; font-weight: 700; letter-spacing: .01em; }
.butler-plate span { display: block; font-size: .6rem; color: var(--gold-soft); letter-spacing: .09em; text-transform: uppercase; margin-top: 1px; }

/* the host's passing remark, floating above the figure */
.host-bubble {
  position: absolute;
  right: 8px;
  bottom: calc(100% - 6px);
  max-width: 230px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 14px 14px 4px 14px;
  padding: 9px 13px;
  font-size: .84rem;
  line-height: 1.4;
  font-style: italic;
  box-shadow: 0 10px 24px rgba(26,41,66,.2);
  opacity: 0;
  transform: translateY(6px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.host-bubble.show { opacity: 1; transform: translateY(0) scale(1); }
.host-bubble::after {
  content: ""; position: absolute; right: 20px; bottom: -7px;
  border: 7px solid transparent; border-top-color: var(--gold); border-bottom: 0;
}

/* ---------- the situation panel ---------- */

.scene {
  position: fixed;
  right: 210px;
  bottom: 24px;
  z-index: 46;
  width: 370px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(26,41,66,.26);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.scene.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

.scene-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  position: sticky;
  top: 0;
  z-index: 1;
}
.scene-face {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy-soft);
  border: 1px solid rgba(255,255,255,.35);
  display: grid; place-items: center;
  font-size: 1.2rem;
}
.scene-who { display: flex; flex-direction: column; line-height: 1.25; flex: 1 1 auto; min-width: 0; }
.scene-who b { font-family: var(--serif); font-size: 1rem; }
.scene-who span { font-size: .74rem; color: var(--gold-soft); letter-spacing: .04em; text-transform: uppercase; }
.scene-x {
  background: none; border: 0; color: #fff; opacity: .75;
  font-size: 1.5rem; line-height: 1; padding: 0 2px; flex: none;
}
.scene-x:hover { opacity: 1; }

.scene-body { padding: 14px; }
.scene-q { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--navy); }
.scene-empty { color: var(--muted); }

.scene-opts { display: grid; gap: 8px; margin-top: 12px; }
.scene-opt {
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.45;
  transition: border-color .15s ease, background .15s ease;
}
.scene-opt:hover:not(.done) { border-color: var(--gold); background: #fff; }
.scene-opt.done { cursor: default; opacity: .72; }
.scene-opt.is-right { background: var(--green-soft); border-color: var(--green); opacity: 1; }
.scene-opt.is-wrong { background: var(--red-soft); border-color: var(--red); opacity: 1; }

.scene-verdict {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: .92rem;
  line-height: 1.5;
  border: 1px solid var(--line);
}
.scene-verdict b { font-family: var(--serif); }
.scene-verdict.good { background: var(--green-soft); border-color: var(--green); }
.scene-verdict.bad { background: var(--gold-soft); border-color: var(--gold); }

.scene-src { margin-top: 8px; font-size: .78rem; color: var(--muted); letter-spacing: .02em; }

.scene-lock { margin-top: 8px; font-size: .8rem; color: var(--muted); }
.scene-link {
  background: none; border: 0; padding: 0;
  color: var(--gold-text); font-weight: 600; text-decoration: underline;
  font-size: inherit;
}

.scene-foot { margin-top: 12px; }
.scene-next {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: .9rem;
}
.scene-next:hover { background: var(--navy-deep); }

/* ---------- narrow screens: the panel sits above the host ---------- */

@media (max-width: 760px) {
  #butler { right: 10px; }
  .butler-body { height: 132px; }
  span.butler-body { font-size: 3rem; }
  .butler-plate { font-size: .66rem; padding: 3px 10px; }
  .scene {
    right: 12px; left: 12px; width: auto;
    bottom: 178px;
    max-height: calc(100vh - 208px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene, .butler-figure { transition: none; }
}

@media print { #butler, .scene { display: none !important; } }


/* ---------- a word before the situation ---------- */
.scene-hi { font-size: .82rem; color: var(--gold-text); font-weight: 600; margin-bottom: 6px; }

/* ---------- wardrobe: host portraits, roles, accessory art, gender switch ---------- */
img.wico { display: block; margin: 0 auto; }
img.wico.host-face { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--navy-soft); border: 1px solid var(--line); }
img.wico.acc-art { width: 84px; height: 84px; object-fit: contain; }
.wrole { font-size: .72rem; color: var(--gold-text); letter-spacing: .05em; text-transform: uppercase; margin-top: 2px; }
img.wpreview-ico { height: 235px; width: auto; display: block; }
.jnode img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.jnode.cur { overflow: hidden; padding: 0; }

.gender-toggle { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.gender-toggle .gt {
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 18px; font-size: .82rem; font-weight: 600; font-family: var(--sans);
}
.gender-toggle .gt.on { background: var(--navy); color: #fff; }
.gender-toggle .gt:not(.on):hover { color: var(--navy); }

@media (max-width: 760px) {
  .butler-plate b { font-size: .74rem; }
  .butler-plate span { font-size: .55rem; }
  .host-bubble { max-width: 62vw; font-size: .8rem; }
}

/* ---------- landing-page teaser: attention pulse + sign-up CTA ---------- */
.butler-figure.entice { animation: host-entice 2.8s ease-in-out infinite; }
@keyframes host-entice {
  0%, 92%, 100% { transform: translateY(0); }
  4% { transform: translateY(-9px); }
  8% { transform: translateY(0); }
  12% { transform: translateY(-5px); }
  16% { transform: translateY(0); }
}
.butler-figure.entice .butler-plate {
  box-shadow: 0 0 0 0 rgba(201,161,95,.55);
  animation: host-glow 2.8s ease-in-out infinite;
}
@keyframes host-glow {
  0%, 100% { box-shadow: 0 4px 10px rgba(26,41,66,.22), 0 0 0 0 rgba(201,161,95,.5); }
  50% { box-shadow: 0 4px 10px rgba(26,41,66,.22), 0 0 0 8px rgba(201,161,95,0); }
}

.scene-cta {
  margin-top: 12px;
  padding: 12px 13px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
}
.scene-cta p { font-size: .88rem; line-height: 1.45; margin: 0 0 10px; color: #f4eddc; }
.scene-cta p b { color: var(--gold-soft); }
.scene-cta-row { display: flex; gap: 8px; flex-wrap: wrap; }
.scene-next, .scene-ghost, .scene-again {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: .9rem;
  font-family: var(--sans);
  cursor: pointer;
}
.scene-cta .scene-next { flex: 1 1 auto; background: var(--gold); color: var(--navy-deep); border: 1px solid var(--gold); }
.scene-cta .scene-next:hover { background: var(--gold-strong); }
.scene-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.scene-ghost:hover { border-color: #fff; }
.scene-again { width: 100%; background: transparent; color: var(--navy); border: 1px solid var(--line); }
.scene-again:hover { border-color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .butler-figure.entice { animation: none; }
  .butler-figure.entice .butler-plate { animation: none; }
}
