.face-expression-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; }
.face-expression-heading label { margin: 0; }
.face-studio {
  color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 24px;
  padding: 0; width: min(940px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  box-shadow: 0 32px 120px #0008; overflow: hidden; font-family: inherit;
}
.face-studio[open] { display: flex; flex-direction: column; }
.face-studio::backdrop { background: #090713b8; backdrop-filter: blur(9px); }
.face-studio [hidden] { display: none !important; }
.face-studio button, .face-studio input, .face-studio select { font: inherit; }
.face-studio button { cursor: pointer; }
.face-studio button:disabled { cursor: default; }
.face-studio :focus-visible { outline: 3px solid #a39aff; outline-offset: 3px; }
.fs-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 25px 28px 20px; border-bottom: 1px solid var(--border); }
.fs-eyebrow { color: #a79bff; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.fs-header h2 { font-size: 25px; letter-spacing: -.7px; margin: 8px 0 5px; }
.fs-header p { margin: 0; color: var(--muted); font-size: 12px; }
.fs-close { border-radius: 50%; width: 34px; height: 34px; padding: 0; flex: 0 0 auto; }
.fs-body { min-height: 0; overflow-y: auto; padding: 22px 28px 18px; scrollbar-width: thin; }
.fs-workspace { display: grid; grid-template-columns: 1.08fr 1fr; gap: 26px; align-items: start; }
.fs-preview { position: relative; overflow: hidden; border-radius: 20px; color: #f6f2ff; background: radial-gradient(ellipse at 50% 40%, #f0f4ef 0%, #d8e8e5 60%, #c4dad7 100%); border: 1px solid #9dbab8; }
.fs-preview::before { content: ''; position: absolute; inset: 55px 45px 83px; border: 1px solid #72989533; border-radius: 50%; pointer-events: none; }
.fs-preview-top { position: absolute; z-index: 1; top: 15px; left: 15px; right: 15px; display: flex; align-items: center; justify-content: space-between; }
.fs-badge { font-size: 10px; border: 1px solid #72989555; border-radius: 20px; padding: 7px 10px; background: #ffffffb8; color: #49615f; }
.fs-badge.fs-tracked { color: #226346; border-color: #518d6d66; }
.fs-mirror { color: #526e6b; font-size: 8px; letter-spacing: 1.4px; }
.face-studio .fs-center-head { color: #365f59; background: #ffffffb8; border: 1px solid #72989555; border-radius: 20px; padding: 7px 10px; font-size: 10px; }
.face-studio .fs-center-head:disabled { opacity: .5; }
.fs-preview canvas { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; margin-top: 6px; }
.fs-preview-bottom { position: relative; background: linear-gradient(0deg, #211a30, #211a30ed); padding: 13px 16px 15px; text-align: center; border-top: 1px solid #b8a3dc22; }
#fs-preview-hint { color: #c1b4d3; font-size: 11px; }
.fs-result { margin: 10px auto 0; display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 12px; }
#fs-live-emoji { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; font-size: 28px; border-radius: 14px; background: #ffffff0d; transition: background .2s, box-shadow .2s; }
#fs-live-emoji.fs-matched { background: #7062be70; box-shadow: 0 0 0 2px #ad9cff, 0 0 24px #9a77f54d; }
.fs-countdown { position: absolute; left: 50%; top: 43%; transform: translate(-50%, -50%); border-radius: 24px; min-width: 95px; padding: 12px 22px; background: #1c153ad9; backdrop-filter: blur(4px); font-size: 42px; font-weight: 800; text-align: center; color: white; box-shadow: 0 10px 40px #0005; white-space: nowrap; }
.fs-controls { min-width: 0; }
.fs-step { display: flex; gap: 12px; padding: 0 0 19px; }
.fs-step:last-of-type { padding-bottom: 0; }
.fs-step-number { display: flex; flex: 0 0 27px; height: 27px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); font-size: 11px; font-weight: 700; }
.fs-done .fs-step-number { background: #7770da22; border-color: #8b80eb66; color: #a99fff; }
.fs-step-content { flex: 1; min-width: 0; }
.fs-step h3 { margin: 4px 0 8px; font-size: 14px; letter-spacing: -.2px; }
.fs-step p { margin: 0 0 11px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.fs-identity { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
#fs-emoji { display: flex; align-items: center; justify-content: center; position: relative; width: 64px; height: 64px; flex: 0 0 64px; font-size: 36px; background: var(--panel-2); border: 1px solid #8b80eb77; border-radius: 18px; }
#fs-emoji::after { content: '+'; position: absolute; bottom: -3px; right: -3px; border-radius: 50%; background: #7a6cdb; border: 2px solid var(--panel); color: white; width: 20px; height: 20px; line-height: 16px; font-size: 15px; }
.fs-identity label { color: var(--muted); font-size: 10px; flex: 1; min-width: 0; }
.fs-identity input { width: 100%; display: block; padding: 10px 11px; background: var(--input-bg); color: var(--text); border: 1px solid var(--border); border-radius: 9px; margin-top: 6px; font-size: 12px; }
#fs-picker { margin-top: 12px; }
#fs-picker .emoji-picker-full { position: static; width: 100%; min-width: 0; }
#fs-picker .emoji-picker-grid { max-height: 200px; }
.face-studio .fs-wide { width: 100%; padding: 11px 12px; margin: 0; border-radius: 10px; font-size: 12px; }
.face-studio .primary-btn { background: linear-gradient(110deg, #8170e7, #6759ce); border: 1px solid #9a8bee55; color: #fff; box-shadow: 0 3px 10px #57449122; }
.fs-review { margin: 17px 0 0 39px; padding: 13px; background: #8a7ed510; border: 1px solid #8a7ed538; border-radius: 12px; }
.fs-review-title { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.fs-review-title .fs-check { font-size: 17px; color: var(--ok); }
.fs-review p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 7px 0 10px; }
.fs-review #fs-conflict:empty { display: none; }
.fs-review #fs-conflict { color: var(--text); margin-bottom: 0; }
.fs-strictness { display: flex; justify-content: space-between; font-size: 11px; }
.fs-strictness output { font-variant-numeric: tabular-nums; color: #a99fff; }
#fs-threshold { width: 100%; margin: 9px 0 5px; accent-color: #9584ed; }
.fs-range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.fs-feedback { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 0; }
.fs-feedback p { flex: 1; font-size: 12px; color: var(--muted); margin: 0; line-height: 1.5; }
.fs-feedback p.fs-error { color: var(--accent); }
.fs-signals { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--input-bg); }
.fs-signals-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.fs-signals-heading h3 { margin: 0; font-size: 13px; }
.fs-signals-heading h3 span { margin-left: 8px; color: var(--muted); font-size: 10px; font-weight: 400; }
.fs-signals-heading p { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 6px 0 0; }
.fs-filter-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
#fs-filter { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 7px; padding: 6px; font-size: 11px; max-width: 150px; }
.fs-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; row-gap: 12px; max-height: 160px; overflow: auto; padding-right: 10px; scrollbar-width: thin; }
.fs-active-signals { color: var(--text); font-size: 10px; line-height: 1.6; margin: 0 0 14px; text-transform: capitalize; }
.fs-signal { min-width: 0; display: grid; grid-template-columns: 1fr auto; column-gap: 8px; row-gap: 5px; }
.fs-signal-name { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.fs-signal output { font-size: 10px; font-variant-numeric: tabular-nums; color: var(--muted); }
.fs-signal-track { grid-column: 1 / -1; position: relative; height: 4px; background: var(--border); border-radius: 4px; }
.fs-signal-track i { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; border-radius: inherit; background: #9381d8; }
.fs-signal-track b { position: absolute; top: -2px; width: 2px; height: 8px; border-radius: 2px; background: var(--text); }
.fs-defining .fs-signal-name { color: var(--text); }
.fs-defining .fs-signal-track i { background: #75c3a2; }
.fs-signal-note { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 13px 0 0; }
.fs-footer { padding: 16px 28px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fs-footer > div:first-child { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; line-height: 1.5; max-width: 300px; }
.fs-footer .material-icon { font-size: 14px; }
.fs-footer svg { flex-shrink: 0; }
.fs-footer-actions { display: flex; gap: 8px; align-items: center; }
.fs-footer-actions button { width: auto; margin: 0; padding: 10px 15px; border-radius: 9px; font-size: 12px; white-space: nowrap; }
#fs-delete { color: var(--accent); }
@media (max-width: 680px) {
  .face-studio { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  .fs-header { padding: 18px; }
  .fs-header h2 { font-size: 21px; }
  .fs-body { padding: 16px; }
  .fs-workspace { grid-template-columns: 1fr; gap: 20px; }
  .fs-preview { max-width: 360px; width: 100%; margin: auto; }
  .fs-preview canvas { max-height: 290px; object-fit: contain; }
  .fs-values { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .fs-signals-heading { align-items: flex-start; flex-direction: column; }
  .fs-footer { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .fs-footer-actions { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { #fs-live-emoji { transition: none; } }
