@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg:#2d1a3d;
  --bg-deep:#1c092d;
  --win:#3e2356;
  --ink:#ffffff;
  --muted:#cbb8d8;
  --ok:#3dba7a;
  --no:#c45c4a;
  --line:#ffffff;
  --tile:#3e2356;
  --gold:#e4b42a;
  --link:#d4b8f0;
  --font: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
body { margin:0; font: 16px/1.45 var(--font); background:var(--bg); color:var(--ink); overflow-x: hidden; }
html { overflow-x: hidden; }
main { max-width: 64rem; margin: 1rem auto; padding: 0 1rem 2rem; }
body.desktop main { max-width: none; margin: 0; padding: 0; }
h1 { font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.35rem; }
#enrollNum { font-size: 1.85rem; letter-spacing: 0.01em; margin: 0 0 0.45rem; font-weight: 700; line-height: 1.15; }
nav { margin: 0 0 1rem; }
.card { border:1px solid var(--line); border-radius: 0; padding: 1rem 1.1rem; margin: 1rem 0; background:var(--tile); max-width: 100%; overflow-x: hidden; }
.card pre { white-space: pre-wrap; margin: 0.4rem 0 0; font: 13px/1.4 ui-monospace, monospace; }
.row { display:flex; gap:0.6rem; flex-wrap:wrap; margin: 0.8rem 0 0; }
button, .file, .win-btn {
  background: var(--bg-deep); color: var(--ink); border: 1px solid var(--line);
  border-radius: 0; padding: 0.28rem 0.7rem; cursor: pointer; font: 600 0.8rem/1.2 var(--font);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), transform 0.12s var(--ease);
}
button:hover, .file:hover, .win-btn:hover { background: var(--win); }
button:active, .file:active, .win-btn:active { transform: translateY(1px); }
button:focus-visible, .file:focus-visible, .win-btn:focus-visible, input:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}
button:disabled { opacity:0.5; cursor:wait; }
[hidden] { display: none !important; }
.muted { color:var(--muted); font-size: 0.92rem; }
#enrollHint, #say, #act {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  margin: 0.35rem 0;
}
#say { font-size: 1.2rem; letter-spacing: -0.02em; font-weight: 700; }
#status { font-size: 0.95rem; color: var(--ink); }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap:0.75rem; margin-top:0.35rem; }
.tile { border:1px solid var(--line); border-radius:0; padding:0.85rem 0.9rem; }
.tile h3 { margin:0 0 0.25rem; font-size:0.95rem; font-weight:600; }
.tile .stack { color:var(--muted); font-size:0.78rem; min-height:2.3em; }
.pill { display:inline-block; margin-top:0.5rem; font-size:0.75rem; padding:0.12rem 0.45rem; border-radius:0; background:#2a2b30; }
.pill.ok { background:var(--ok); color:#062; }
.pill.no { background:var(--no); color:#fff; }
.lights { display:flex; gap:0.45rem; flex-wrap:wrap; align-items:center; }
.lights.busy {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  margin-top: 0.4rem;
  padding: 0.5rem 0.55rem 0.45rem;
  border: 1px solid #fff;
  background: var(--bg-deep);
}
.bit { width:1.35rem; height:1.35rem; border-radius:0; background:#2a2b30; display:grid; place-items:center; font-size:0.62rem; color:#bbb; }
.bit.on, .lane.is-on .bit { background:var(--ok); color:#062; }
.bit.off, .lane.is-off .bit { background:var(--no); color:#fff; }
.lane.is-run .bit { background: #3e2356; color: #fff; border: 1px solid #fff; }
.lane {
  display: grid;
  grid-template-columns: 1.35rem 1fr auto;
  gap: 0.55rem;
  align-items: center;
}
.lights:not(.busy) .lane { display: block; }
.lane-track {
  height: 7px;
  background: #16071f;
  border: 1px solid #5a3a70;
  overflow: hidden;
}
.lane-track i {
  display: block;
  height: 100%;
  width: 0;
  background: #cbb8d8;
}
.lane.is-run .lane-track i {
  background: linear-gradient(90deg, #6a4a80 0%, #d8c6e8 72%, #fff 100%);
}
.lane.is-on .lane-track i { background: var(--ok); }
.lane.is-off .lane-track i { background: var(--no); }
.lane-name {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 3.2rem;
  text-align: right;
}
a { color: var(--link); }
video { width:100%; max-height:14rem; background:#000; border-radius:0; margin-top:0.5rem; }
video.mirror { transform: scaleX(-1); }
#stage {
  position: relative;
  overflow: hidden;
  margin-top: 0.6rem;
  height: min(72vh, 38rem);
  border-radius: 0;
  background: #000;
}
#stage video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}
#guide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  display: grid;
  place-items: center;
}
#guide .oval {
  height: 82%;
  width: auto;
  max-width: 70%;
  aspect-ratio: 417 / 535;
  border: 3px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 200vmax rgba(0,0,0,0.48);
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
#guide.ok .oval { border-color: var(--ok); }
.thumbs { display:flex; gap:0.4rem; flex-wrap:wrap; margin-top:0.5rem; }
.thumbs img { width:4.2rem; height:4.2rem; object-fit:cover; border-radius:0; border:1px solid var(--line); transform: scaleX(-1); }
#err { color:var(--no); font-size:0.9rem; min-height:1.2em; }
#script { white-space: pre-wrap; font-size: 1.1rem; line-height: 1.45; margin: 0.6rem 0; }
#stage.short { --h: min(34vh, 17rem); height: var(--h); width: calc(var(--h) * 16 / 9); max-width: 100%; margin-left: auto; margin-right: auto; }
#takePlay { display:block; width:auto; max-width:100%; max-height: min(44vh, 22rem); margin:0.6rem auto 0; background:#000; }
#recDeck { margin-top:0.8rem; padding:0.85rem; border:1px solid var(--line); border-radius:0; background:#101117; }
#recDeck .rec-top { display:flex; align-items:center; gap:0.6rem; }
.rec-dot { width:0.7rem; height:0.7rem; border-radius:0; background:var(--no); box-shadow:0 0 0 0 rgba(196,92,74,0.7); animation: recpulse 1.2s infinite; }
@keyframes recpulse {
  0% { box-shadow:0 0 0 0 rgba(196,92,74,0.55); }
  70% { box-shadow:0 0 0 10px rgba(196,92,74,0); }
  100% { box-shadow:0 0 0 0 rgba(196,92,74,0); }
}
#recTime { font: 15px/1 ui-monospace, monospace; }
#recWave { display:block; width:100%; height:56px; margin-top:0.65rem; background:#0c0d10; border-radius:0; }
#voicePlay { width:100%; margin-top:0.6rem; }
input[type=text] { background:var(--bg-deep); color:var(--ink); border:1px solid var(--line); border-radius:0; padding:0.45rem 0.8rem; font: 1rem var(--font); }

.desktop { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.bg-aberration {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.grain-layer { z-index: 1; position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.grain-film {
  position: absolute; inset: 0;
  display: block;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 512px 512px;
  opacity: 0.28;
}
.bg-face .grain-film { opacity: 0.32; }
.bg-tile {
  position: absolute;
  width: 94px;
  height: 43px;
  object-fit: contain;
  filter: url(#umbra-chroma) brightness(0.55) saturate(0.4) hue-rotate(255deg);
  opacity: 0.11;
}
.bg-subtle .bg-tile { opacity: 0.08; }
.bg-subtle .bg-tile {
  animation: tile-breathe 48s ease-in-out infinite alternate;
}
.bg-face .bg-tile {
  opacity: 0.16;
  animation: tile-drift 40s ease-in-out infinite alternate;
}
@keyframes tile-breathe {
  0% { opacity: 0.06; }
  100% { opacity: 0.11; }
}
@keyframes tile-drift {
  0% { transform: translate(0, 0); opacity: 0.1; }
  50% { transform: translate(6px, -4px); opacity: 0.18; }
  100% { transform: translate(-5px, 5px); opacity: 0.12; }
}

.topbar {
  position: relative; z-index: 5; flex: 0 0 56px;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 1rem; background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.45rem; color: var(--ink); text-decoration: none; }
.brand img { width: 56px; height: 26px; object-fit: contain; display: block; }
.top-actions { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
.top-actions .win-btn { min-width: 5rem; height: 30px; font-size: 0.8rem; padding: 0 0.85rem; }
.who { font-size: 0.82rem; letter-spacing: 0.04em; color: var(--muted); }
.privacy-hud {
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  background: var(--bg-deep);
}
.privacy-hud b { color: var(--ink); font-weight: 700; }
.msg-compose {
  display: flex; gap: 0.4rem; padding: 0.6rem 0.7rem;
  border-top: 1px solid var(--line); background: var(--bg-deep);
}
.msg-compose input {
  flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line);
  background: var(--win); color: var(--ink); font: inherit; padding: 0 0.55rem;
}
.msg-compose button {
  height: 32px; border: 1px solid var(--line); background: var(--win);
  color: var(--ink); font: inherit; padding: 0 0.75rem; cursor: pointer;
}

.shell { position: relative; z-index: 2; display: flex; flex: 1; min-height: 0; }
.rail {
  width: 168px; flex: 0 0 168px; background: var(--bg-deep);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
}
.rail[aria-hidden="true"] { display: none; }
.rail button, .rail a.rail-item {
  height: 36px; border: 0; border-bottom: 1px solid var(--line);
  background: var(--bg-deep); color: var(--ink); font: 500 0.82rem/1 var(--font);
  text-align: left; padding: 0 0.85rem; width: 100%; text-decoration: none;
  display: flex; align-items: center; cursor: pointer;
  transition: background 0.16s var(--ease);
}
.rail button:hover, .rail a.rail-item:hover,
.rail button.is-open, .rail a.rail-item.is-open { background: var(--win); }

.desk { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }

.win {
  position: absolute;
  background: var(--win);
  border: 1px solid var(--line);
  min-width: 240px;
  min-height: 140px;
  display: flex; flex-direction: column;
  box-sizing: border-box;
  box-shadow: 0 16px 44px rgba(0,0,0,0.32);
  transform-origin: top center;
}
.win[hidden] { display: none !important; }
.win.is-front { box-shadow: 0 22px 58px rgba(0,0,0,0.42); }
.win.is-min { height: auto !important; min-height: 0; }
.win.is-min .win-body,
.win.is-min .win-edge,
.win.is-min .face-view,
.win.is-min .face-foot,
.win.is-min .face-meta,
.win.is-min #script,
.win.is-min #recDeck,
.win.is-min #voiceDone,
.win.is-min #voicePlay,
.win.is-min .thumbs { display: none; }
.win.is-entering { animation: win-enter 0.42s var(--ease) both; }
.win.is-leaving { animation: win-leave 0.22s ease-in both; pointer-events: none; }
.win.is-minning { animation: win-min 0.2s ease-in both; pointer-events: none; }
.win.is-restoring { animation: win-enter 0.36s var(--ease) both; }
@keyframes win-enter {
  from { opacity: 0; transform: translateY(16px) scale(0.975); }
  to { opacity: 1; transform: none; }
}
@keyframes win-leave {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(10px) scale(0.985); }
}
@keyframes win-min {
  from { opacity: 1; transform: none; }
  to { opacity: 0.55; transform: scaleY(0.18); }
}
.win-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.2rem 0.45rem; cursor: grab; user-select: none;
  border-bottom: 1px solid var(--line); min-height: 32px; flex: 0 0 auto;
}
.win.is-front .win-bar { background: rgba(28, 9, 45, 0.28); }
.win-bar h2 { margin: 0; font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.win-chrome { display: flex; gap: 0.25rem; }
.win-chrome button,
.win-chrome .face-x {
  width: 24px; height: 24px; padding: 0; background: var(--win);
  font-size: 0.75rem; font-weight: 700;
}
.win-chrome button:hover,
.win-chrome .face-x:hover { background: var(--bg-deep); }
.win { overflow-x: hidden; overflow-y: hidden; }
* {
  scrollbar-width: thin;
  scrollbar-color: #7a5a94 var(--bg-deep);
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: var(--bg-deep); }
*::-webkit-scrollbar-thumb {
  background: #7a5a94;
  border: 2px solid var(--bg-deep);
  border-radius: 0;
}
*::-webkit-scrollbar-thumb:hover { background: #9a78b4; }
*::-webkit-scrollbar-corner { background: transparent; }
.win-body {
  padding: 0.9rem 1rem 1.05rem;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  max-width: 100%;
}
.win-resize {
  position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; z-index: 4;
  cursor: nwse-resize; background:
    linear-gradient(135deg, transparent 50%, #fff 50%, #fff 58%, transparent 58%, transparent 72%, #fff 72%, #fff 80%, transparent 80%);
}
.win-edge { position: absolute; z-index: 4; }
.win-edge-n { top: 0; left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.win-edge-s { bottom: 0; left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.win-edge-e { top: 8px; right: 0; bottom: 8px; width: 6px; cursor: ew-resize; }
.win-edge-w { top: 8px; left: 0; bottom: 8px; width: 6px; cursor: ew-resize; }
.win-edge-ne { top: 0; right: 0; width: 10px; height: 10px; cursor: nesw-resize; }
.win-edge-nw { top: 0; left: 0; width: 10px; height: 10px; cursor: nwse-resize; }
.win-edge-se { bottom: 0; right: 0; width: 12px; height: 12px; cursor: nwse-resize; }
.win-edge-sw { bottom: 0; left: 0; width: 10px; height: 10px; cursor: nesw-resize; }
.cta {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  margin-top: 1.15rem;
  font-size: 0.88rem;
  text-align: center;
  justify-content: center;
  align-items: center;
  background: var(--bg-deep);
}
.cta:hover { background: #16071f; }
.tag { background: var(--bg-deep); border: 1px solid var(--line); padding: 0.28rem 0.6rem; font-size: 0.78rem; }
.tag-hot { background: #16071f; }
.win-copy { font-size: 0.95rem; margin: 0 0 0.75rem; }
.win-copy p { margin: 0 0 0.28rem; }
.win-kicker { color: var(--muted); font-size: 0.88rem; font-weight: 500; }
.win-hero { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin: 0.4rem 0 0.25rem; }
.win-aside { color: var(--muted); font-size: 0.9rem; }
.checks { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin: 0.55rem 0 0.15rem; }
.checks ul { margin: 0; padding-left: 1.2rem; font-size: 0.9rem; }
.check-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.msg-row {
  border: 1px solid var(--line); border-left: 0; border-right: 0;
  padding: 0.8rem 0.95rem; font-size: 0.9rem;
  transition: background 0.16s var(--ease);
}
.msg-row:hover { background: rgba(28, 9, 45, 0.35); }
.msg-row:first-child { border-top: 0; }
.msg-handle { font-weight: 700; }
.msg-meta { color: var(--muted); font-size: 0.75rem; margin-top: 0.15rem; }
.msg-list { display: flex; height: 100%; min-height: 0; }
.msg-col { flex: 1; overflow-y: auto; min-height: 0; }
.desk-h {
  margin: 1rem 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.desk-h:first-child { margin-top: 0; }
.desk-empty {
  border: 1px solid var(--line);
  padding: 0.8rem 0.85rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--bg-deep);
}
.auc-row, .mkt-item {
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  margin: 0 0 0.5rem;
  background: var(--bg-deep);
  transition: background 0.16s var(--ease);
}
.auc-row:hover, .mkt-item:hover { background: #2a1638; }
.auc-row h4, .mkt-item h4 {
  margin: 0 0 0.2rem;
  font-size: 0.88rem;
  font-weight: 700;
}
.auc-row p, .mkt-item p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.win[data-win-preset="welcome"] .win-body,
.win[data-win-preset="note"] .win-body {
  display: flex;
  flex-direction: column;
}
.win[data-win-preset="face"] .win-body {
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.7rem 0.65rem;
}
.win[data-win-preset="face"] .face-actions { flex: 0 0 auto; }
.face-stage {
  position: relative;
  border: 1px solid var(--line);
  width: 93.4375%;
  max-width: none;
  height: auto;
  aspect-ratio: 1196 / 574;
  margin: 0 auto;
  background: var(--win);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.face-stage #stage { height: 100%; margin: 0; width: 100%; max-height: none; }
.face-stage #stage:not([hidden]) { position: relative; z-index: 1; }
.oval-asset {
  width: calc(417 / 1196 * 100%);
  height: calc(535 / 574 * 100%);
  aspect-ratio: 417 / 535;
  object-fit: fill;
  display: block;
}
#act, #say, .win-copy, .face-actions { overflow-wrap: break-word; word-break: break-word; max-width: 100%; }
.face-actions { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; margin-top: 0.8rem; flex-wrap: wrap; }
.face-actions .row { margin: 0; }

@media (max-width: 640px) {
  .rail { width: 100%; flex: none; flex-direction: row; overflow-x: hidden; overflow-y: hidden; }
  .rail button, .rail a.rail-item { border-right: 1px solid var(--line); border-bottom: 0; width: auto; }
}

body.face-page { height: 100vh; }
body.face-page .face-desk {
  position: relative;
  z-index: 2;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}
.win.face-wire {
  display: flex;
  flex-direction: column;
  background: #3e2356;
  overflow: hidden;
}
.face-wire-bar {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px 0 16px;
}
.face-wire-bar h2 { font-size: 1.05rem; font-weight: 700; }
.face-wire .win-chrome { gap: 6px; }
.face-wire .win-chrome button,
.face-wire .win-chrome .face-x {
  width: 26px;
  height: 26px;
  padding: 0;
  background: #3e2356;
  font-size: 13px;
  font-weight: 700;
}
.face-view {
  position: relative;
  flex: 1 1 auto;
  margin: 10px 22px 8px;
  border: 1px solid #fff;
  background: #3e2356;
  min-height: 0;
  max-width: 100%;
  max-height: 80vh;
  aspect-ratio: 1196 / 574;
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: max-height 0.55s var(--ease),
              max-width 0.55s var(--ease),
              margin 0.55s var(--ease);
}
.face-view.short {
  flex: 0 1 auto;
  aspect-ratio: 16 / 9;
  max-height: 34vh;
}
.face-view.rest {
  flex: 0 0 auto;
  aspect-ratio: 1196 / 574;
  max-height: 11.5rem;
  max-width: 28rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.face-view #takePlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  object-fit: contain;
  background: #000;
  z-index: 2;
}
.face-view video,
.face-view #cam,
.face-view #camPreview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  object-fit: cover;
  background: #3e2356;
}
.face-view #guide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.face-view #guide .oval {
  height: 93%;
  width: auto;
  max-width: 35%;
  aspect-ratio: 417 / 535;
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: none;
  background: transparent;
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.face-view #guide.ok .oval {
  border-color: var(--ok);
  box-shadow: 0 0 0 1px var(--ok), 0 0 22px rgba(61, 186, 122, 0.28);
  animation: oval-lock 2.2s ease-in-out infinite;
}
@keyframes oval-lock {
  0%, 100% { box-shadow: 0 0 0 1px var(--ok), 0 0 14px rgba(61, 186, 122, 0.18); }
  50% { box-shadow: 0 0 0 2px var(--ok), 0 0 28px rgba(61, 186, 122, 0.34); }
}
.face-view .oval-asset {
  position: relative;
  z-index: 0;
  width: auto;
  height: 93%;
  max-height: 93%;
  max-width: 35%;
  aspect-ratio: 417 / 535;
  object-fit: fill;
}
.face-page #act,
.face-page #say,
.face-page #enrollHint,
.face-page #status,
.face-page #err,
.face-page #enrollCounts,
.face-page #rosterLine {
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  min-height: 0;
}
.face-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.1rem;
  padding: 10px 22px 16px;
}
.face-foot #act,
.face-foot #enrollHint {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.4;
  max-width: 62%;
  flex: 1 1 auto;
  min-width: 0;
}
.face-foot #say {
  font-size: 1.12rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.08rem;
  width: fit-content;
  letter-spacing: -0.02em;
}
.face-btns {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
}
.face-btns input[type=text] {
  height: 34px;
  width: 10rem;
  padding: 0 0.55rem;
  font-size: 0.82rem;
}
.face-btns button,
.face-btns .file {
  background: #1c092d;
  min-width: 110px;
  height: 34px;
  padding: 0 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.face-btns #rec { min-width: 84px; }
.win.face-wire > .lights,
.win.face-wire > #err,
.win.face-wire > #status,
.win.face-wire > #rosterLine,
.win.face-wire > #enrollCounts { display: none !important; }
.face-meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 22px 10px;
}
.face-meta #err,
.face-meta #status,
.face-meta #enrollCounts,
.face-meta #rosterLine,
.face-meta .lights {
  display: block !important;
  font-size: 13px;
}
.face-meta .lights { display: flex !important; margin-top: 0.2rem; }
.seal-viz {
  margin-top: 0.4rem;
  border: 1px solid transparent;
  background: var(--bg-deep);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  position: relative;
  pointer-events: none;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s ease,
              padding 0.35s ease,
              border-color 0.35s ease;
}
.seal-viz.is-on {
  max-height: 8.8rem;
  opacity: 1;
  padding: 0.45rem 0.55rem 0.4rem;
  border-color: #fff;
}
.fhe-pair {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 4px 0.45rem;
  align-items: center;
}
.fhe-lab {
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.fhe-pair .ut-cipher[data-fhe="eval"] span {
  border-color: #6a4a80;
}
.fhe-pair .ut-cipher[data-fhe="eval"] span.on {
  background: #2a1638;
  color: #fff;
  border-color: #fff;
}
.seal-viz::after {
  content: "";
  position: absolute;
  left: -20%;
  top: 0;
  width: 16%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: ut-scan 4.4s linear infinite;
  pointer-events: none;
}
.seal-kicker {
  margin: 0 0 0.3rem;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.seal-viz .ut-cipher {
  grid-template-columns: repeat(16, 1fr);
  gap: 1px;
}
.seal-viz .ut-cipher span {
  height: 12px;
  font-size: 8px;
  color: #7e9e93;
  background: #16071f;
  border-color: #2a1638;
}
.seal-viz .ut-cipher span.on {
  background: #3e2356;
  color: #d8c6e8;
  border-color: #6a4a80;
}
.seal-viz .ut-wave {
  height: 20px;
  margin: 0.3rem 0 0;
  gap: 2px;
}
.seal-viz .ut-wave i {
  opacity: 0.55;
  background: #cbb8d8;
}
.face-page #script {
  flex: 0 0 auto;
  font-size: 0.92rem;
  line-height: 1.5;
  max-height: 7.2rem;
  overflow-y: auto;
  margin: 10px 22px 0;
  padding: 0.7rem 0.8rem;
  background: var(--bg-deep);
}
.face-page #recDeck {
  flex: 0 0 auto;
  margin: 8px 22px 0;
  padding: 0.55rem 0.7rem;
  background: var(--bg-deep);
}
.face-page #voiceDone,
.face-page #voicePlay { margin: 0 22px 8px; }
.face-page .thumbs { margin: 0 22px 8px; }
.face-page .thumbs img { width: 2.8rem; height: 2.8rem; }

.ut-lead {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.45;
}
.ut-viz {
  border: 1px solid #fff;
  background: var(--bg-deep);
  padding: 0.7rem 0.65rem 0.55rem;
  margin: 0 0 0.75rem;
  position: relative;
  overflow: hidden;
}
.ut-viz::after {
  content: "";
  position: absolute;
  left: -20%;
  top: 0;
  width: 18%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  animation: ut-scan 4.4s linear infinite;
  pointer-events: none;
}
@keyframes ut-scan {
  from { transform: translateX(0); }
  to { transform: translateX(700%); }
}
.ut-flow {
  display: grid;
  grid-template-columns: 1fr 10px 1fr 10px 1fr 10px 1fr;
  gap: 0.25rem;
  align-items: stretch;
  margin-bottom: 0.55rem;
}
.ut-box {
  border: 1px solid #fff;
  background: #3e2356;
  padding: 0.5rem 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
.ut-box span {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.62rem;
  margin-top: 0.15rem;
}
.ut-box-hot {
  box-shadow: 2px 0 0 #ff4d6d, -2px 0 0 #3ad7ff;
}
.ut-pipe {
  align-self: center;
  height: 2px;
  background: #fff;
  position: relative;
}
.ut-pipe::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: rotate(45deg);
}
.ut-cipher {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 2px;
  font: 10px/1.1 ui-monospace, monospace;
}
.ut-cipher span {
  display: grid;
  place-items: center;
  height: 16px;
  background: #1c092d;
  color: #9ad7c2;
  border: 1px solid #3e2356;
}
.ut-cipher span.on {
  background: #3e2356;
  color: #fff;
  border-color: #fff;
}
.ut-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 42px;
  margin: 0.55rem 0 0;
}
.ut-wave i {
  display: block;
  flex: 1;
  background: #fff;
  min-height: 4px;
  animation: ut-bar 1.1s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  transform-origin: bottom;
}
@keyframes ut-bar {
  0%, 100% { height: 18%; }
  50% { height: var(--h, 70%); }
}
.ut-cards {
  display: grid;
  gap: 0.55rem;
}
.ut-card {
  border: 1px solid #fff;
  background: var(--bg-deep);
  padding: 0.7rem 0.8rem;
}
.ut-card h3 {
  margin: 0 0 0.28rem;
  font-size: 0.86rem;
  font-weight: 700;
}
.ut-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink);
  line-height: 1.45;
}
.ut-card code {
  font: 0.84em/1.3 ui-monospace, monospace;
}
.note-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.85rem; }
.lane-track i { transition: width 0.14s linear; }

@media (prefers-reduced-motion: reduce) {
  .win.is-entering,
  .win.is-leaving,
  .win.is-minning,
  .win.is-restoring,
  .bg-tile,
  .face-view #guide.ok .oval,
  .ut-viz::after,
  .seal-viz::after,
  .ut-wave i,
  .rec-dot { animation: none !important; }
}
