/* Fear of negative evaluation lesson. All rules scoped under .fne-* */

.fne-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
#scene.full .fne-sc { flex: 1; min-height: 0; padding: 0 18px; box-sizing: border-box; }

/* bubbles */
.fne-b { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; animation: fne-in .35s ease-out both; }
.fne-b span { display: block; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.3; }
.fne-av { flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--raised); }
.fne-them { align-self: flex-start; }
.fne-them span { background: var(--raised); color: var(--text); border-bottom-left-radius: 6px; }
.fne-me { align-self: flex-end; }
.fne-me span { background: var(--violet); color: #fff; border-bottom-right-radius: 6px; }
.fne-think { align-self: flex-end; flex-direction: column; align-items: flex-end; gap: 2px; }
.fne-think small { font-size: 12px; font-weight: 700; color: var(--streak); padding-right: 6px; }
.fne-think span { background: transparent; border: 2px dashed rgba(251, 150, 121, .7); color: var(--streak); font-style: italic; }
@keyframes fne-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* the party chat scrolls its oldest lines off the top */
.fne-chat { width: 100%; max-width: 380px; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; padding-bottom: 6px; }

/* Maya alone */
.fne-solo { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 8px; }
.fne-solo > img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; align-self: center; margin-bottom: 4px; }
.fne-warm .fne-them span { transition: background .5s, color .5s, box-shadow .5s; }
.fne-warm.on .fne-them span { background: rgba(252, 192, 80, .16); box-shadow: inset 0 0 0 2px var(--gold); }

/* worries turning over */
.fne-flips { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 8px; }
.fne-flip { position: relative; display: block; width: 100%; min-height: 66px; padding: 0; border: 0; background: none; color: inherit; text-align: left; perspective: 600px; cursor: pointer; }
.fne-f { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 14px; border-radius: 16px; backface-visibility: hidden; transition: transform .5s ease; }
.fne-f small { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.fne-f span { font-size: 15px; line-height: 1.3; }
.fne-front { border: 2px dashed rgba(251, 150, 121, .7); color: var(--streak); }
.fne-front span { font-style: italic; }
.fne-back { background: rgba(252, 192, 80, .12); border: 2px solid var(--gold); color: var(--text); transform: rotateX(180deg); }
.fne-back small { color: var(--gold); }
.fne-flip.on .fne-front { transform: rotateX(-180deg); }
.fne-flip.on .fne-back { transform: rotateX(0deg); }
.fne-score { width: 100%; max-width: 360px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.fne-score.on { opacity: 1; transform: none; }
.fne-score div { padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); text-align: center; }
.fne-score small { display: block; font-size: 12px; color: var(--dim); font-weight: 700; }
.fne-score b { font: 700 17px var(--serif); }
.fne-score .fne-her { border-color: var(--gold); }
.fne-score .fne-her b { color: var(--gold); }

/* the study */
.fne-lab { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fne-pair { display: flex; align-items: center; gap: 10px; }
.fne-pair i { width: 34px; height: 34px; border-radius: 50%; background: var(--violet-bright); }
.fne-pair i:last-child { background: var(--streak); }
.fne-pair em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--dim); padding: 4px 10px; border-radius: 999px; border: 2px solid var(--line-strong); }
.fne-qs { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.fne-qs span { display: block; padding: 8px 12px; border-radius: 12px; background: var(--surface); font-size: 14px; text-align: center; }
.fne-stack { width: 100%; display: grid; }
.fne-stack > * { grid-area: 1 / 1; }
.fne-qs { transition: opacity .4s; }
.fne-lab.on .fne-qs { opacity: 0; }
.fne-bars { width: 100%; display: flex; flex-direction: column; gap: 8px; opacity: 0; transition: opacity .4s .2s; }
.fne-lab.on .fne-bars { opacity: 1; }
.fne-bar small { display: block; font-size: 12px; font-weight: 700; color: var(--dim); margin-bottom: 3px; }
.fne-bar p { margin: 0; height: 12px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.fne-bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1s ease-out; }
.fne-g { background: var(--streak); }
.fne-r { background: var(--gold); }
.fne-lab.on .fne-g { width: 52%; }
.fne-lab.on .fne-r { width: 74%; }
.fne-bars em { font-style: normal; font-size: 12px; color: var(--faint); text-align: center; }

/* where the guesses landed */
.fne-real { display: flex; align-items: center; gap: 10px; width: 100%; }
.fne-real i { flex: none; width: 40px; border-top: 3px dashed var(--gold); }
.fne-real span { font-size: 13px; font-weight: 700; color: var(--gold); line-height: 1.25; }
.fne-guess { position: relative; width: 100%; }
.fne-line { position: absolute; z-index: 2; left: -4px; right: -4px; bottom: 110px; border-top: 3px dashed var(--gold); pointer-events: none; }
.fne-gbars { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fne-gbars .choice { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 150px; padding: 8px 6px; }
.fne-gbars .fne-gb { display: block; width: 46px; border-radius: 8px 8px 3px 3px; background: rgba(169, 155, 255, .35); border: 2px dashed var(--violet-bright); }
.fne-gbars .choice span { font-size: 14px; font-weight: 700; }
.fne-you { align-self: flex-end; font-size: 12px; font-weight: 700; color: var(--dim); margin-bottom: -4px; }

/* the group chat */
.fne-group { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 8px; }
.fne-gh { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px 6px; border-bottom: 1px solid var(--line); }
.fne-gh b { font-size: 15px; }
.fne-gh small { font-size: 12px; color: var(--dim); }
.fne-seen { align-self: flex-end; font-size: 12px; color: var(--dim); margin-top: -4px; }
.fne-thinks { width: 100%; margin-top: 6px; }
.fne-thinks .choices { gap: 8px; }
.fne-thinks .choice { border-style: dashed; font-style: italic; min-height: 46px; padding-top: 8px; padding-bottom: 8px; }

@media (max-height: 700px) {
  .fne-b span { font-size: 14px; padding: 7px 11px; }
  .fne-chat { gap: 6px; }
  .fne-solo > img { width: 64px; height: 64px; }
  .fne-flip { min-height: 56px; }
  .fne-f span { font-size: 14px; }
  .fne-qs span { padding: 6px 10px; }
}
