/* forma-mode.css (fix-forma-field, gate rnmw-1202-forma-mode-direction; Luca picked B · Field, phone 2 Dec 17:12).
   Forma as a mode of the page, for admins: the pieces float in a field by project, like the photographs in Glance.
   Step 1 of 3: mode row, field and viewing, read only. Source: landing-hub/forma-mode.css (forma_field_fix.py). */
#fm-mode { --fm-you: #FF6A4D; --fm-work: #E9B949; --fm-ok: #5FD08A; --fm-making: #8E8A99; --fm-cream: #F4F1EE; --fm-silver: #B4B4B4;
  --fm-dim: #8E8A99; --fm-sb: env(safe-area-inset-bottom, 0px); --fm-st: env(safe-area-inset-top, 0px);
  position: fixed; inset: 0; z-index: 15; display: none; overflow: hidden; color: var(--fm-cream);
  font: 400 14px/1.4 "Space Grotesk", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
body.fm-on #fm-mode { display: block; }
/* Glance rests under the mode: its photos, ring, hint and footer step away (field.js stops drawing them) */
body.fm-on #stage, body.fm-on .lens-ring, body.fm-on .hint, body.fm-on .ft, body.fm-on .cta, body.fm-on .gr-rail,
body.fm-on .glance-rail, body.fm-on .gu-fab, body.fm-on .gc-fab { visibility: hidden !important; pointer-events: none !important; }
#fm-mode .mono { font: 400 10px/1.2 "Space Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
#fm-mode button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.fm-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab;
  background: radial-gradient(60% 45% at 30% 30%, rgba(114,124,224,.12), transparent 70%),
              radial-gradient(50% 40% at 75% 70%, rgba(229,56,43,.08), transparent 70%), rgba(10,10,10,.78); }
.fm-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.fm-cl { position: absolute; }
#fm-mode .fm-cl .fm-lbl { display: block; position: absolute; left: 0; top: -22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: calc(100% + 30px); color: var(--fm-silver); }
#fm-mode .fm-card { position: absolute; width: 112px; height: 140px; border-radius: 5px; overflow: hidden; background: #151418;
  box-shadow: 0 6px 18px rgba(0,0,0,.5); transition: opacity .25s, filter .25s; }
#fm-mode .fm-card.reel { height: 199px; }
.fm-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; display: block; }
.fm-card .k { position: absolute; right: 5px; bottom: 5px; padding: 3px 5px; border-radius: 3px; background: rgba(10,10,10,.7); color: var(--fm-cream); font-size: 8px !important; }
.fm-card .dot { position: absolute; left: 7px; top: 7px; width: 9px; height: 9px; box-shadow: 0 0 0 2px rgba(10,10,10,.7); }
.fm-card.dim { opacity: .16; filter: grayscale(1); }
#fm-mode .fm-dot, .fm-lb .fm-dot, #fm-mode .fm-card .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fm-making); flex: none; }
.fm-card .dot { width: 9px; height: 9px; }
#fm-mode .fm-dot.you, .fm-lb .fm-dot.you, #fm-mode .fm-card .dot.you { background: var(--fm-you); box-shadow: 0 0 8px rgba(255,106,77,.7); }
#fm-mode .fm-dot.working, .fm-lb .fm-dot.working, #fm-mode .fm-card .dot.working { background: var(--fm-work); }
#fm-mode .fm-dot.approved, .fm-lb .fm-dot.approved, #fm-mode .fm-card .dot.approved { background: var(--fm-ok); }
.fm-key { position: absolute; z-index: 2; left: 10px; bottom: calc(14px + var(--fm-sb)); display: grid; gap: 2px; padding: 8px 4px; border-radius: 12px;
  background: rgba(14,13,20,.72); box-shadow: 0 0 0 1px rgba(244,241,238,.12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#fm-mode .fm-key button { display: flex; align-items: center; gap: 8px; padding: 7px 10px; min-height: 30px; color: #CFCBD6; text-align: left; }
#fm-mode .fm-key button.off { opacity: .4; }
.fm-key button b { font-weight: 400; color: var(--fm-dim); margin-left: auto; padding-left: 10px; }
.fm-hint { position: absolute; left: 0; right: 0; top: calc(64px + var(--fm-st)); margin: 0; text-align: center; color: var(--fm-dim); pointer-events: none; transition: opacity .4s; }
#fm-mode .fm-fit { position: absolute; z-index: 2; right: 26px; bottom: calc(96px + var(--fm-sb)); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(244,241,238,.3); background: rgba(14,13,20,.72); font-size: 9px; }
.fm-snap { position: absolute; left: 14px; bottom: calc(160px + var(--fm-sb)); max-width: 200px; margin: 0; text-align: left; color: var(--fm-dim); font-size: 8.5px !important; pointer-events: none; }
/* the mode row in the header: Forma is the mode you are in */
.hd nav a.ms-tool[data-tool="forma"] .fm-n { display: inline-block; min-width: 16px; margin-left: 6px; padding: 2px 4px; border-radius: 999px; background: #FF6A4D;
  color: #14110F; font: 400 9px/1.2 "Space Mono", monospace; text-align: center; letter-spacing: 0; vertical-align: 1px; }
@media (min-width: 721px) { .hd nav a.ms-tool[aria-current="page"] { color: var(--cream, #F4F1EE) !important; opacity: 1 !important; } }
/* the opened piece: Glance's own lightbox, read only in this step */
.fm-lb { position: fixed; inset: 0; z-index: 60; background: rgba(6,6,9,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity .22s; color: #F4F1EE;
  font: 400 14px/1.4 "Space Grotesk", system-ui, sans-serif; }
.fm-lb.on { opacity: 1; pointer-events: auto; }
.fm-lb button, .fm-lb a { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.fm-lb .mono { font: 400 10px/1.2 "Space Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
.fm-lb .top { flex: none; display: flex; align-items: flex-start; gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 6px; }
.fm-lb .top > div { flex: 1; min-width: 0; }
.fm-lb h2 { margin: 0 0 4px; font: 500 16px/1.2 "Space Grotesk", sans-serif; overflow-wrap: anywhere; }
.fm-lb .st { display: flex; align-items: center; gap: 7px; color: #B4B4B4; }
.fm-lb .meta { margin-top: 4px; color: #8E8A99; }
.fm-lb .x { flex: none; padding: 11px 14px !important; min-height: 40px; border-radius: 999px; border: 1px solid rgba(244,241,238,.3) !important; }
.fm-lb .stage { flex: 1; min-height: 0; padding: 4px 10px; }
.fm-media { position: relative; width: 100%; height: 100%; }
.fm-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; height: 100%; width: 100%; }
.fm-cards::-webkit-scrollbar { display: none; }
.fm-cards .card { position: relative; flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; height: 100%; }
.fm-cards .ph { position: relative; max-width: 100%; max-height: 100%; display: grid; place-items: center; height: 100%; }
.fm-cards img, .fm-cards video { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 6px; background: #151418; display: block; }
.fm-media .count { position: absolute; top: 10px; right: 10px; padding: 5px 8px; border-radius: 999px; background: rgba(10,10,10,.66); }
.fm-media .dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.fm-media .dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(244,241,238,.35); }
.fm-media .dots i.on { background: #F4F1EE; }
.fm-media .play { position: absolute !important; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(10,10,10,.55) !important; box-shadow: 0 0 0 1px rgba(244,241,238,.4); display: grid; place-items: center; }
.fm-media .play::after { content: ""; border-left: 18px solid #F4F1EE; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
.fm-media .tl { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(10,10,10,.7); }
.fm-media .tl input { flex: 1; accent-color: #F4F1EE; min-width: 0; }
.fm-media .tl .pp { min-height: 32px; padding: 0 4px !important; }
.fm-lb .tools { flex: none; display: flex; gap: 6px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
.fm-lb .btn { flex: 1; min-height: 48px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(244,241,238,.24) !important;
  padding: 0 8px !important; font: 400 10.5px/1.2 "Space Mono", monospace; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.fm-lb .btn.nv { flex: 0 0 44px; font-size: 18px; }
.fm-lb .ro { flex: none; margin: 0; padding: 0 14px; color: #8E8A99; text-align: center; }
@media (max-width: 350px) { .fm-lb .tools { gap: 4px; padding-left: 8px; padding-right: 8px; } .fm-lb .btn { font-size: 9.5px; letter-spacing: 0; } }
@media (min-width: 721px) { .fm-lb .stage { padding: 4px 22vw; } .fm-lb .tools { padding-left: 22vw; padding-right: 22vw; } }
@media (prefers-reduced-motion: reduce) { .fm-lb, .fm-card { transition: none; } }
