   :root{
    --gold:#e7c667; --purple:#6a0dad; --ink:#2e1a04; --parch:#f4ecd8;
    --panel:#1a1425; --frame:#caa55c; --radius:18px;
  }
  html { font-size: clamp(14px, 1.1vw + 0.6vh, 18px); }
  *{ box-sizing:border-box }
  body{
    margin:0; font-family:"Trebuchet MS",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    background:#000; color:#fff; min-height:100svh;
    display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  }

  /* Bara sus / Footer în afara camerei */
  .topbar,.footer{ width:100%; max-width:1200px; margin:8px auto 10px }
  .topbar{
    display:flex; align-items:center; justify-content:space-between;
    background:rgba(10,9,17,.6); border:1px solid rgba(255,255,255,.15);
    border-radius:12px; padding:10px 16px; backdrop-filter:blur(6px);
    box-shadow:0 0 15px rgba(231,198,103,.15);
  }
  .brand{ display:flex; gap:.6rem; align-items:center; font-weight:800 }
  .brand .dot{ width:12px; height:12px; border-radius:50%; background:var(--gold); box-shadow:0 0 10px var(--gold) }
  select{ border:1px solid #3b2c4d; background:#130f1d; color:#fff; padding:.45rem .6rem; border-radius:10px; font-weight:600 }

  /* Camera */
  .wrap{
    width:96vw; max-width:1200px; height:calc(100svh - 16px - 64px - 42px);
    min-height:520px; margin:0 auto; position:relative;
    border:5px solid var(--gold); border-radius:20px; overflow:hidden;
    background:#0a0911; box-shadow:0 0 60px 20px rgba(231,198,103,.25);
  }
  @supports (height:100dvh){ .wrap{ height:calc(100dvh - 16px - 64px - 42px) } }

  .room{ position:absolute; inset:0; display:grid; grid-template-columns:1fr; grid-template-rows:1fr auto; }
  .room-bg{ position:relative; overflow:hidden; background:url('../images/camerapovestilor4.png') center/cover no-repeat; }

  /* Actori scrollabili */
  .actors{
    background:linear-gradient(180deg, #140f1f, #0f0b18); padding:12px; display:grid;
    grid-template-columns:1fr 1fr; gap:12px; max-height:40svh; overflow-y:auto; scrollbar-width:none;
    border-top:1px solid rgba(255,255,255,.08);
  }
  @supports (max-height:100dvh){ .actors{ max-height:40dvh } }
  .actors::-webkit-scrollbar{ width:0; background:transparent }
.actor{
  background:#632410;
  border:1px solid #2f2340;
  border-radius:14px;
  padding:10px 8px;
  text-align:center;
  cursor:pointer;
  transition:.15s;
  position: relative;   /* ← necesar pentru tooltip */
  outline: none;
}

/*  
  .actor.selected{ border-color:var(--gold); box-shadow:0 0 0 2px rgba(231,198,103,.25) inset, 0 6px 16px rgba(0,0,0,.35); transform:translateY(-2px) }
*/

.actor.selected {
  border-color: #ffd86f;
  box-shadow:
    0 0 0 3px rgba(255, 216, 111, 0.5) inset,
    0 0 12px 3px rgba(255, 215, 80, 0.6),
    0 0 24px 6px rgba(255, 230, 130, 0.4);
  transform: translateY(-3px) scale(1.03);
  transition: all 0.25s ease;
}
@keyframes goldenGlow {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(255, 216, 111, 0.5) inset,
      0 0 12px 3px rgba(255, 215, 80, 0.6),
      0 0 24px 6px rgba(255, 230, 130, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(255, 230, 130, 0.6) inset,
      0 0 20px 5px rgba(255, 240, 170, 0.8),
      0 0 36px 10px rgba(255, 250, 200, 0.5);
  }
}

.actor.selected {
  animation: goldenGlow 3s ease-in-out infinite;
}

  .actor img{ width:68px; height:68px; object-fit:contain; display:block; margin:0 auto 6px }
  .actor .label{ font-weight:700; font-size:.9rem }

  /* Trăistuță + steluțe + pergament */
  .bag{
    position:absolute; left:50%; bottom:clamp(10px,2.6vh,22px); transform:translateX(-50%);
    width:clamp(110px,30vw,240px); aspect-ratio:1/1; background:url('../images/bag.png') center/contain no-repeat;
    cursor:pointer; filter:drop-shadow(0 10px 25px rgba(0,0,0,.45)); z-index:2;
  }
  .bag.bounce{ animation:bag-bounce .6s ease }
  @keyframes bag-bounce{ 0%{transform:translateX(-50%) translateY(0)}30%{transform:translateX(-50%) translateY(-12px)}60%{transform:translateX(-50%) translateY(0)}80%{transform:translateX(-50%) translateY(-5px)}100%{transform:translateX(-50%) translateY(0)} }

/* 🌟 STELUȚE COLORATE deasupra trăistuței */
.stars {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: clamp(60px, 12vh, 110px);
  transform: translateX(-50%);
  width: clamp(160px, 28vw, 240px);
  height: clamp(90px, 18vh, 160px);
  display: none;
  z-index: 3;
}

.stars.active { display: block; }

.star {
  position: absolute;
  width: 14px;
  height: 14px;
  background: transparent;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  opacity: 0;
  animation: sparkle 2.2s ease-in-out infinite;
}
.star:nth-child(1){ left:15%; background:linear-gradient(45deg,#ffd966,#fff38c); animation-delay:0s; }
.star:nth-child(2){ left:35%; background:linear-gradient(45deg,#f6b0ff,#ffe4ff); animation-delay:.25s; }
.star:nth-child(3){ left:55%; background:linear-gradient(45deg,#9fd6ff,#d8f5ff); animation-delay:.5s; }
.star:nth-child(4){ left:75%; background:linear-gradient(45deg,#a2ffb6,#e3ffe5); animation-delay:.75s; }
.star:nth-child(5){ left:90%; background:linear-gradient(45deg,#ffb6b6,#fff0f0); animation-delay:1s; }

@keyframes sparkle {
  0%   { transform: translateY(40px) scale(0.5) rotate(0deg); opacity: 0; }
  20%  { opacity: 1; }
  50%  { transform: translateY(-20px) scale(1.1) rotate(25deg); }
  80%  { opacity: 1; transform: translateY(-60px) scale(1.2) rotate(55deg); }
  100% { transform: translateY(-90px) scale(0.9) rotate(80deg); opacity: 0; }
}
  .star{ position:absolute; width:20px; height:20px; background:radial-gradient(circle at 30% 30%,#fff,#ffd45c 60%,transparent 70%); border-radius:50%; opacity:.9; animation:twirl 1.4s ease-in-out infinite }
  .star.s2{ left:20%; animation-delay:.15s } .star.s3{ left:65%; animation-delay:.3s } .star.s4{ left:40%; animation-delay:.45s } .star.s5{ left:80%; animation-delay:.6s }
  @keyframes twirl{ 0%{transform:translateY(40px) scale(.6);opacity:0}40%{opacity:1}100%{transform:translateY(-40px) scale(1.1) rotate(30deg);opacity:0} }

  .story{
    position:absolute; left:50%; bottom:clamp(14px,2.4vh,26px); transform:translateX(-50%);
    width:92%; max-height:56svh; padding:clamp(12px,2.4vw,22px);
    background:var(--parch); color:var(--ink); border:3px solid var(--frame); border-radius:16px;
    box-shadow:0 12px 30px rgba(0,0,0,.45), inset 0 0 30px rgba(139,69,19,.15); display:none; overflow:auto; line-height:1.55; z-index:4;
  }
  @supports (max-height:100dvh){ .story{ max-height:56dvh } }

.story .meta {
  position: relative;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
}
.story .meta::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, #caa55c, transparent);
  opacity: 0.8;
}

  /* Butoane plutitoare: Difuzor & Microfon */
  .floating-controls{
    position:absolute; right:10px; bottom:10px; display:flex; flex-direction:column; gap:10px; z-index:5;
  }
  .pill{
    width:42px; height:42px; border-radius:12px; border:1px solid rgba(255,255,255,.15);
    background:rgba(10,9,17,.6); display:grid; place-items:center; cursor:pointer;
    box-shadow:0 6px 18px rgba(0,0,0,.35); transition:border-color .15s, box-shadow .15s, transform .1s;
  }
  .pill:hover{ border-color:#6a5c85 } .pill:active{ transform:scale(.96) }
  .pill.active{ border-color:var(--gold); box-shadow:0 0 0 2px rgba(231,198,103,.25), 0 10px 22px rgba(0,0,0,.45) }
  .pill img{ width:22px; height:22px; display:block }

  .footer{ text-align:right; opacity:.8; font-size:.9rem; color:#ddd }

  @media (min-width:720px){
    .wrap{ height:clamp(600px,82dvh,860px) }
    .room{ grid-template-columns:1fr min(30%,340px); grid-template-rows:1fr }
    .actors{ padding:16px 18px 18px; gap:14px; max-height:none; height:100%; overflow-y:auto; border-top:none }
    .actor img{ width:72px; height:72px }
    .bag{ width:clamp(140px,22vw,260px) }
    .stars{ width:clamp(140px,18vw,220px); height:clamp(90px,12vh,150px); bottom:clamp(70px,10vh,120px) }
    .story{ width:min(720px,86%); max-height:clamp(40%,54vh,62%); padding:clamp(16px,2.2vw,26px) }
  }
  @media (min-width:1024px){ .wrap{ height:clamp(640px,78dvh,880px) } }

/* Titlul fiecărui grup de actori */
.actor-group-title {
  grid-column: 1 / -1;
  text-align: center;
  font-weight: 700;
  color: #e7c667;
  text-shadow: 0 0 6px rgba(231,198,103,0.4);
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

/* Icons created */
.icon_created {
  grid-column: 1 / -1;
  text-align: center;
  font-weight: 700;
  color: #e7c667;
  /* text-shadow: 0 0 6px rgba(231,198,103,0.4); */
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 0.70rem;
  letter-spacing: 0.5px;
}


/* Linie decorativă între grupuri */
.actor-separator {
  grid-column: 1 / -1;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e7c667, transparent);
  border-radius: 1px;
  margin: 6px 0 10px;
  opacity: 0.8;
}

.actor-separator-final {
  grid-column: 1 / -1;
  height: 2px;
  background: linear-gradient(90deg, transparent, #000000, transparent);
  border-radius: 1px;
  margin: 6px 0 10px;
  opacity: 0.8;
}

/* Tooltip auriu – sub card (nu mai e tăiat de containerul cu scroll) */
.actor::after{
  content: attr(data-hint);
  position: absolute;
  left: 50%;
  top: 100%;                 /* 👈 sub card */
  transform: translateX(-50%) translateY(8px);
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 10px;
  font-size: .85rem;
  color: #2e1a04;
  background: #fff6d9;
  border: 1px solid #e7c667;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25),
              0 0 12px rgba(231,198,103,.35) inset;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity .15s ease, transform .15s ease;
}

.actor:hover::after,
.actor:focus-within::after {
  opacity: 1;
  transform: translateX(-50%) translateY(12px);
}

/* triunghiul mic pentru balon – tot sub card */
.actor::before{
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);     /* 👈 sub card */
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff6d9;
  border-right: 1px solid #e7c667;
  border-bottom: 1px solid #e7c667;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  transition: opacity .15s ease;
}

.actor:hover::before,
.actor:focus-within::before {
  opacity: 1;
}

.help{
  display: none;
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  width:min(800px, 92%);
  top:8px;
  bottom:8px;

  padding: clamp(14px, 2.4vw, 24px);
  background: var(--parch);
  color: var(--ink);
  border: 3px solid var(--frame);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.45), inset 0 0 30px rgba(139,69,19,.15);
  z-index: 6;

  /* NU mai pune display:flex aici */
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}

/* când e deschis -> devine flex ca să funcționeze scroll-ul intern */
.help.is-open{
  display:flex;
}

/* zona scrollabilă rămâne la fel */
.help .help-content{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

@media (min-width: 720px){
  .help{ top:auto; bottom:clamp(14px, 2.4vh, 26px); max-height:60svh; }
}

.lang-switch {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lang-switch img {
  width: 30px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lang-switch img:hover {
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(231,198,103,0.6);
}

/* Footer Magic */
.footer{
  width: 100%;
  max-width: 1200px;
  margin: 10px auto 14px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  font-size: 0.9rem;
  color: #ddd;
  opacity: 0.9;
}

.footer-left{
  white-space: nowrap;
}

.footer-right{
  display: flex;
  gap: 10px;
}

.footer-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  /* font-weight: 600; */

  color: #fff;
  text-decoration: none;

  background: rgba(10,9,17,.6);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);

  transition: all 0.2s ease;
}

.footer-btn:hover{
  border-color: #e7c667;
  box-shadow: 0 0 12px rgba(231,198,103,.35);
  transform: translateY(-1px);
}

/* === HELP CTA: atrage atenția pe butonul cu ? === */

/* animații */
@keyframes helpGlow {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(231,198,103,.20),
      0 0 10px rgba(231,198,103,.25),
      0 0 22px rgba(231,198,103,.18);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(231,198,103,.35),
      0 0 18px rgba(231,198,103,.45),
      0 0 40px rgba(231,198,103,.25);
    transform: scale(1.04);
  }
}

@keyframes helpWiggle {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-6deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}

/* butonul help (puls + glow) */
#helpToggle.help-attn {
  animation: helpGlow 1.8s ease-in-out infinite;
  border-color: rgba(231,198,103,.55);
}

/* animație ușoară pe icon (ca baghetă) */
#helpToggle.help-attn img {
  transform-origin: 70% 80%;
  animation: helpWiggle 1.6s ease-in-out infinite;
}

/* respectă preferința userului pentru mai puține animații */
@media (prefers-reduced-motion: reduce) {
  #helpToggle.help-attn,
  #helpToggle.help-attn img {
    animation: none !important;
  }
}

#helpToggle {
  border-color: rgba(231,198,103,.35);
}
#helpToggle img {
  filter: drop-shadow(0 0 6px rgba(231,198,103,.35));
}