/* MaGrouper live demo. The stage is drawn at 1280 x 720 and scaled to fit. */

.demo { position: relative; border-radius: 18px; background: #0b0f1a; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.08); }
.demo-chrome { border-radius: 18px 18px 0 0; position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #111726; color: #cbd5e1; font-size: 13px; }
.demo-logo { border-radius: 4px; flex: none; }
.demo-info { position: relative; display: inline-flex; }
.demo-info-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.07); color: #e2e8f0; font: italic 700 13px Georgia, "Times New Roman", serif; cursor: help; display: flex; align-items: center; justify-content: center; }
.demo-info-btn:hover, .demo-info.open .demo-info-btn { background: rgba(255,255,255,.16); }
.demo-info-tip { position: absolute; top: calc(100% + 10px); right: -8px; z-index: 50; width: 280px; padding: 12px 14px; border-radius: 10px; background: #fff; color: #0f172a; font-size: 13px; line-height: 1.5; box-shadow: 0 14px 40px rgba(0,0,0,.4); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s; }
.demo-info-tip::before { content: ""; position: absolute; top: -6px; right: 16px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }
.demo-info.open .demo-info-tip, .demo-info-btn:focus-visible + .demo-info-tip { opacity: 1; transform: none; pointer-events: auto; }
/* hover only where there is a real pointer: a tap leaves :hover stuck on, so a second tap could not close it */
@media (hover: hover) { .demo-info:hover .demo-info-tip { opacity: 1; transform: none; pointer-events: auto; } }
.demo-label { margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-chrome .sp { flex: 1; }
.demo-btn { font: inherit; font-size: 12.5px; color: #e2e8f0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 5px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .15s; }
.demo-btn:hover { background: rgba(255,255,255,.14); }
.demo-btn.fs { background: #4f46e5; border-color: #6366f1; color: #fff; }
.demo-btn.fs:hover { background: #6366f1; }
.demo-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.demo-btn.play svg { fill: currentColor; stroke: none; }
.demo-btn.play.on { background: rgba(251,191,36,.16); border-color: rgba(251,191,36,.45); color: #fde68a; }
.demo-viewport { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0 0 18px 18px; background: #05070d; }
.demo.is-fs .demo-chrome, .demo.pseudo-fs .demo-chrome, .demo.is-fs .demo-viewport, .demo.pseudo-fs .demo-viewport { border-radius: 0; }
.demo.is-fs, .demo.pseudo-fs { border-radius: 0; display: flex; flex-direction: column; width: 100vw; height: 100vh; }
.demo.pseudo-fs { position: fixed; inset: 0; z-index: 1000; height: 100dvh; }
.demo.is-fs .demo-viewport, .demo.pseudo-fs .demo-viewport { aspect-ratio: auto; flex: 1; }
html.demo-lock, html.demo-lock body { overflow: hidden; }

.stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 13px; color: #f1f5f9; outline: none; cursor: default; }
.stage button { font: inherit; color: inherit; cursor: pointer; }
.stage input, .stage textarea, .stage select { font: inherit; user-select: text; -webkit-user-select: text; }
.stage svg { display: block; }
.stage .sp { flex: 1; }

.wallpaper { position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 50% 108%, rgba(56,189,248,.55), transparent 60%),
    radial-gradient(40% 50% at 30% 92%, rgba(99,102,241,.55), transparent 70%),
    radial-gradient(45% 55% at 72% 88%, rgba(14,165,233,.45), transparent 70%),
    radial-gradient(80% 60% at 50% 0%, #1e2a5a, transparent 70%),
    linear-gradient(180deg, #0f1733, #0b1a3a 55%, #10275a); }

/* icons */
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.25); }
img.ico { box-shadow: none; object-fit: contain; }
.ico svg { width: 62%; height: 62%; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gi { display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative; }
.gi-grid { display: grid; grid-template-columns: repeat(2, auto); align-content: center; justify-content: center; }
.gi-text { display: inline-flex; align-items: center; justify-content: center; border-radius: 24%; font-weight: 800; color: #fff; letter-spacing: -.02em; line-height: 1; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); overflow: hidden; }
.gi-img { border-radius: 24%; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.gi-gt { flex-direction: column; justify-content: center; gap: 4%; }
.gi-label { font-weight: 700; line-height: 1; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: clip; color: #fff; }
.dsg { position: relative; display: inline-block; overflow: hidden; flex: none; vertical-align: middle; }
.dsg-bg { position: absolute; inset: 0; }
.dl { position: absolute; display: flex; align-items: center; justify-content: center; transform-origin: 50% 50%; }
.dl svg { width: 100%; height: 100%; display: block; }
.dl-text { white-space: nowrap; text-align: center; }

/* desktop icons */
.desk { position: absolute; display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.desk-ico { width: 84px; padding: 6px 4px; border-radius: 6px; border: 1px solid transparent; background: none; display: flex; flex-direction: column; align-items: center; gap: 5px; text-shadow: 0 1px 3px rgba(0,0,0,.7); font-size: 12px; }
.desk-ico:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.14); }

/* windows */
.win-layer { position: absolute; inset: 0; }
.win { position: absolute; display: flex; flex-direction: column; background: #1f1f23; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.35); overflow: hidden; transition: opacity .16s; }
.win.active { border-color: rgba(255,255,255,.18); }
.win.max { border-radius: 0; }
.win.min { display: none; }
.win.opening { animation: winIn .2s cubic-bezier(.2,.8,.2,1); }
@keyframes winIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }
.win-bar { height: 34px; flex: none; display: flex; align-items: center; gap: 8px; padding-left: 10px; background: #2a2a30; font-size: 12px; color: #cbd5e1; }
.win.active .win-bar { background: #2d2d35; color: #fff; }
.win-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-btns { display: flex; height: 100%; }
.win-btns button { width: 44px; height: 100%; background: none; border: 0; display: flex; align-items: center; justify-content: center; }
.win-btns button:hover { background: rgba(255,255,255,.1); }
.win-btns .wb-close:hover { background: #c42b1c; }
.win-btns svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.win-body { flex: 1; position: relative; overflow: hidden; min-height: 0; }
.stage.peeking .win { opacity: 0; }
.stage.peeking .win.peek-target { opacity: 1; display: flex; box-shadow: 0 0 0 2px rgba(99,102,241,.9), 0 24px 70px rgba(0,0,0,.6); }
.stage.peeking .wallpaper { filter: brightness(.6); }
.wallpaper { transition: filter .2s; }

/* app contents */
.app-menu { display: flex; gap: 16px; padding: 6px 12px; font-size: 12px; color: #cbd5e1; background: #26262c; }
.np { position: absolute; inset: 30px 0 0 0; width: 100%; height: calc(100% - 30px); background: #1c1c20; color: #e5e7eb; border: 0; resize: none; padding: 12px 14px; font-family: Consolas, "Cascadia Mono", monospace !important; font-size: 13.5px; line-height: 1.5; outline: none; }
.calc { display: flex; flex-direction: column; height: 100%; padding: 10px; gap: 8px; background: #202024; }
.calc-d { text-align: right; padding: 10px 6px; }
.calc-d small { display: block; min-height: 16px; color: #94a3b8; font-size: 12px; }
.calc-d b { display: block; font-size: 38px; font-weight: 600; overflow: hidden; }
.calc-k { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.calc-k button { border: 0; border-radius: 6px; background: #3a3a40; font-size: 17px; }
.calc-k button:hover { background: #45454c; }
.calc-k .op { background: #2f2f35; color: #93c5fd; }
.calc-k .eq { background: #4f46e5; color: #fff; }
.calc-k .eq:hover { background: #6366f1; }
.paint-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #26262c; }
.paint-bar .sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); padding: 0; }
.paint-bar .sw.on { border-color: #fff; transform: scale(1.15); }
.paint-bar input { width: 90px; margin-left: 8px; }
.paint-clear { margin-left: auto; background: #3a3a40; border: 0; border-radius: 6px; padding: 4px 10px; }
.win-body canvas { display: block; width: 100%; height: calc(100% - 34px); background: #fff; touch-action: none; cursor: crosshair; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; height: 100%; }
.photos span { border-radius: 6px; }
.clk { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(160deg, #134e4a, #1f1f23); }
.clk b { font-size: 46px; font-weight: 300; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.clk span { color: #99f6e4; }
.music { height: 100%; display: flex; flex-direction: column; background: linear-gradient(180deg, #3b1d0e, #1f1f23 60%); }
.mu-now { display: flex; align-items: center; gap: 14px; padding: 16px; }
.mu-art { width: 64px; height: 64px; border-radius: 8px; background: linear-gradient(135deg, #fb923c, #db2777); flex: none; }
.mu-now b { display: block; font-size: 15px; }
.mu-now small { color: #fdba74; }
.mu-play { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fb923c; color: #111; font-size: 14px; }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 16px; margin-top: 6px; }
.eq i { width: 3px; height: 4px; background: #fb923c; border-radius: 2px; }
.music.playing .eq i { animation: eq .8s ease-in-out infinite alternate; }
.music.playing .eq i:nth-child(2) { animation-delay: .2s; } .music.playing .eq i:nth-child(3) { animation-delay: .4s; }
.music.playing .eq i:nth-child(4) { animation-delay: .1s; } .music.playing .eq i:nth-child(5) { animation-delay: .3s; }
@keyframes eq { to { height: 16px; } }
.music ol { margin: 0; padding: 0 10px; list-style: none; }
.music li { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.music li:hover { background: rgba(255,255,255,.06); }
.music li small, .music li em { color: #94a3b8; font-style: normal; }
.term { height: 100%; background: #0c0c0c; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; padding: 10px 12px; display: flex; flex-direction: column; }
.term-out { flex: 1; overflow: auto; line-height: 1.55; color: #d4d4d4; }
.term-out b { color: #4ade80; }
.term-out .dim { color: #60a5fa; }
.term-in { display: flex; gap: 6px; color: #60a5fa; }
.term-in input { flex: 1; background: none; border: 0; outline: none; color: #fff; font-family: inherit !important; }
.brw { height: 100%; display: flex; flex-direction: column; background: #f8fafc; color: #0f172a; }
.brw-bar { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: #e2e8f0; color: #475569; }
.brw-url { flex: 1; background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12px; }
.brw-page { padding: 22px 26px; }
.brw-page h2 { margin: 0 0 4px; font-size: 24px; }
.brw-page p { margin: 0 0 16px; color: #64748b; }
.brw-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.brw-cards span { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.1); padding: 0 0 10px; font-weight: 600; overflow: hidden; }
.brw-cards i { display: block; height: 90px; margin-bottom: 8px; }
.brw-cards span { padding-left: 0; }
.mail { padding: 6px; }
.mail-row { display: flex; gap: 10px; padding: 9px 10px; border-radius: 6px; }
.mail-row:hover { background: rgba(255,255,255,.05); }
.mail-row.unread b { color: #93c5fd; }
.mail-av { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.mail-row div { display: flex; flex-direction: column; min-width: 0; }
.mail-row small { color: #94a3b8; }
.wx { height: 100%; padding: 18px; background: linear-gradient(160deg, #0369a1, #1f1f23); }
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-now b { font-size: 54px; font-weight: 300; }
.wx-now small { color: #bae6fd; }
.wx-days { display: flex; justify-content: space-between; margin-top: 18px; }
.wx-days span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.wx-days i { font-style: normal; font-size: 20px; }
.tv { height: 100%; background: radial-gradient(90% 70% at 80% 0%, var(--a), #0b0b10 70%); padding: 12px 16px; }
.tv-top { display: flex; gap: 18px; align-items: center; font-size: 12px; color: #cbd5e1; }
.tv-top b { font-size: 16px; color: #fff; margin-right: 10px; }
.tv-hero { margin: 26px 0 22px; }
.tv-hero small { color: var(--b); text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
.tv-hero b { display: block; font-size: 28px; margin: 4px 0 10px; }
.tv-hero button { background: #fff; color: #111; border: 0; border-radius: 6px; padding: 6px 14px; font-weight: 600; }
.tv-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tv-row span { aspect-ratio: 2 / 3; border-radius: 6px; display: flex; align-items: flex-end; padding: 6px; }
.tv-row em { font-style: normal; font-size: 10.5px; font-weight: 600; }
.sheet { padding: 10px; }
.sheet table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.sheet th, .sheet td { border: 1px solid #3a3a40; padding: 6px 8px; text-align: right; }
.sheet th { background: #14532d; color: #dcfce7; }
.sheet td:first-child { text-align: left; color: #cbd5e1; }
.sheet .neg { color: #f87171; }
.exp { height: 100%; display: flex; flex-direction: column; }
.exp-bar { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: #26262c; color: #94a3b8; }
.exp-path { flex: 1; background: #1c1c20; border-radius: 4px; padding: 3px 10px; color: #e2e8f0; font-size: 12px; }
.exp-main { flex: 1; display: flex; min-height: 0; }
.exp-side { width: 120px; padding: 8px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid rgba(255,255,255,.06); color: #cbd5e1; font-size: 12px; }
.exp-side span { padding: 5px 8px; border-radius: 4px; }
.exp-side .on { background: rgba(255,255,255,.08); }
.exp-list { flex: 1; padding: 6px; overflow: auto; }
.exp-row { display: grid; grid-template-columns: 22px 1fr 70px; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; }
.exp-row[data-item] { cursor: grab; }
.exp-row:hover { background: rgba(255,255,255,.06); }
.exp-row small { color: #94a3b8; }
.exp-tip { padding: 7px 12px; font-size: 11.5px; color: #a5b4fc; background: rgba(99,102,241,.12); }
[data-item].sel { background: rgba(99,102,241,.35) !important; box-shadow: inset 0 0 0 1px rgba(165,180,252,.7); }
.dragging { opacity: .35; }

/* taskbar */
.taskbar { position: absolute; z-index: 5000; display: flex; align-items: center; background: rgba(28,30,40,.82); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); border: 0 solid rgba(255,255,255,.08); transition: box-shadow .15s, background .15s; }
.taskbar.edge-bottom { left: 0; right: 0; bottom: 0; height: 48px; border-top-width: 1px; }
.taskbar.edge-top { left: 0; right: 0; top: 0; height: 48px; border-bottom-width: 1px; }
.taskbar.edge-left { left: 0; top: 0; bottom: 0; width: 48px; flex-direction: column; border-right-width: 1px; }
.taskbar.edge-right { right: 0; top: 0; bottom: 0; width: 48px; flex-direction: column; border-left-width: 1px; }
.tb-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; }
.edge-left .tb-main, .edge-right .tb-main { flex-direction: column; justify-content: flex-start; padding-top: 6px; }
.tb-btn { position: relative; width: 42px; height: 40px; border-radius: 6px; border: 0; background: none; display: flex; align-items: center; justify-content: center; transition: background .12s; }
.tb-btn:hover, .tb-btn.open { background: rgba(255,255,255,.1); }
.tb-start svg { width: 24px; height: 24px; }
.tb-dot { position: absolute; bottom: 2px; left: 50%; width: 6px; height: 3px; margin-left: -3px; border-radius: 2px; background: #94a3b8; opacity: 0; transition: all .15s; }
.edge-top .tb-dot { bottom: auto; top: 2px; }
.edge-left .tb-dot { left: 2px; top: 50%; bottom: auto; width: 3px; height: 6px; margin: -3px 0 0; }
.edge-right .tb-dot { left: auto; right: 2px; top: 50%; bottom: auto; width: 3px; height: 6px; margin: -3px 0 0; }
.tb-btn.running .tb-dot { opacity: 1; }
.tb-btn.focused .tb-dot, .tb-btn.open .tb-dot { opacity: 1; background: #60a5fa; width: 16px; margin-left: -8px; }
.edge-left .tb-btn.focused .tb-dot, .edge-right .tb-btn.focused .tb-dot, .edge-left .tb-btn.open .tb-dot, .edge-right .tb-btn.open .tb-dot { width: 3px; height: 16px; margin: -8px 0 0; }
.tb-btn.just-pinned { animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 0% { transform: scale(.3); } 100% { transform: scale(1); } }
.tb-tray { display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 11.5px; color: #e2e8f0; }
.edge-left .tb-tray, .edge-right .tb-tray { flex-direction: column; padding: 10px 0; gap: 8px; }
.tb-sys { display: flex; gap: 8px; }
.edge-left .tb-sys, .edge-right .tb-sys { flex-direction: column; }
.tb-sys svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.tb-clock { text-align: right; line-height: 1.3; }
.tb-clock small { display: block; font-size: 11px; }
.edge-left .tb-clock, .edge-right .tb-clock { text-align: center; font-size: 10px; }
.edge-left .tb-clock small, .edge-right .tb-clock small { display: none; }
.taskbar.drop-wait { box-shadow: inset 0 0 0 2px rgba(129,140,248,.6); }
.taskbar.drop-hot { background: rgba(79,70,229,.55); box-shadow: inset 0 0 0 2px #a5b4fc; }

/* start menu */
.fly-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6000; }
.fly-layer > * { pointer-events: auto; }
.startmenu { position: absolute; width: 440px; height: 400px; padding: 16px; border-radius: 10px; background: rgba(32,34,44,.94); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 60px rgba(0,0,0,.5); display: flex; flex-direction: column; animation: flyIn .18s ease-out; }
.sm-search { background: #15161c; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: #fff; padding: 7px 14px; outline: none; }
.sm-h { margin: 14px 4px 8px; font-weight: 600; }
.sm-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; align-content: start; }
.sm-app { border: 0; background: none; border-radius: 6px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; }
.sm-app:hover { background: rgba(255,255,255,.08); }
.sm-foot { color: #94a3b8; font-size: 11.5px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); }

/* flyout */
.flyout { position: absolute; border-radius: 10px; background: rgba(36,38,50,.94); backdrop-filter: blur(30px) saturate(1.3); -webkit-backdrop-filter: blur(30px) saturate(1.3); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.flyout.appear { animation: flyIn .18s cubic-bezier(.2,.8,.2,1); }
@keyframes flyIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.flyout.light { background: rgba(246,247,251,.96); color: #0f172a; border-color: rgba(0,0,0,.08); }
.flyout.editing { box-shadow: 0 0 0 2px #818cf8, 0 16px 50px rgba(0,0,0,.5); }
.fly-head { position: absolute; height: 36px; border-radius: 10px; background: rgba(36,38,50,.94); backdrop-filter: blur(30px) saturate(1.3); -webkit-backdrop-filter: blur(30px) saturate(1.3); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.fly-head.appear { animation: flyIn .18s cubic-bezier(.2,.8,.2,1); }
.fly-head.light { background: rgba(246,247,251,.96); color: #0f172a; border-color: rgba(0,0,0,.08); }
.fly-head.editing { box-shadow: 0 0 0 2px #818cf8, 0 16px 50px rgba(0,0,0,.5); }
.fly-bar { height: 36px; display: flex; align-items: center; gap: 2px; padding: 0 6px 0 12px; font-size: 12px; }
.fly-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fly-dim { margin-left: 8px; white-space: nowrap; padding: 1px 7px; border-radius: 999px; background: rgba(129,140,248,.25); font-size: 11px; font-variant-numeric: tabular-nums; }
.fx { width: 28px; height: 26px; border: 0; background: none; border-radius: 5px; display: flex; align-items: center; justify-content: center; opacity: .8; }
.fx:hover { background: rgba(127,127,127,.2); opacity: 1; }
.fx svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fly-done { border: 0; background: #4f46e5; color: #fff !important; border-radius: 5px; padding: 3px 12px; font-weight: 600; }
.fly-grid { display: grid; }
.fly-grid.scroll { overflow: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; overscroll-behavior: contain; }
.fly-grid.sy { overflow-y: auto; }
.fly-grid.sx { overflow-x: auto; }
.flyout.light .fly-grid.scroll { scrollbar-color: rgba(0,0,0,.3) transparent; }
.fly-ebar { position: absolute; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; border-radius: 10px; font-size: 12px; white-space: nowrap; background: rgba(36,38,50,.96); color: #f1f5f9; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 2px #818cf8, 0 10px 30px rgba(0,0,0,.45); }
.fly-ebar.light { background: rgba(246,247,251,.97); color: #0f172a; border-color: rgba(0,0,0,.08); }
.fly-ebar .fly-dim { margin-left: 0; }
.ft { position: relative; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; transition: background .1s; }
.ft:hover { background: rgba(127,127,127,.18); }
.editing .ft { cursor: grab; }
.ft-name { font-size: 11px; max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-run { position: absolute; top: 5px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.fly-empty { padding: 14px; color: #94a3b8; white-space: nowrap; }
.fh { position: absolute; background: none; z-index: 2; }
.fh::after { content: ""; position: absolute; border-radius: 4px; background: #818cf8; box-shadow: 0 0 0 3px rgba(129,140,248,.3); }
.fh-r, .fh-l { top: 0; bottom: 0; width: 16px; cursor: ew-resize; }
.fh-r { right: -9px; } .fh-l { left: -9px; }
.fh-r::after, .fh-l::after { left: 5px; top: 50%; width: 6px; height: 46px; margin-top: -23px; }
.fh-t, .fh-b { left: 0; right: 0; height: 16px; cursor: ns-resize; }
.fh-t { top: -9px; } .fh-b { bottom: -9px; }
.fh-t::after, .fh-b::after { top: 5px; left: 50%; height: 6px; width: 46px; margin-left: -23px; }
.fh:hover::after { background: #a5b4fc; }

/* preview */
.pv { position: absolute; padding: 6px 8px 8px; border-radius: 9px; background: rgba(36,38,50,.96); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 14px 40px rgba(0,0,0,.5); animation: flyIn .14s ease-out; cursor: pointer; }
.pv.light { background: rgba(246,247,251,.97); color: #0f172a; }
.pv-head { display: flex; align-items: center; gap: 7px; height: 26px; font-size: 11.5px; }
.pv-head > span:not(.ico) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-x { width: 22px; height: 22px; border: 0; border-radius: 4px; background: none; display: flex; align-items: center; justify-content: center; }
.pv-x:hover { background: #c42b1c; color: #fff; }
.pv-x svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.pv-thumb { position: relative; overflow: hidden; border-radius: 4px; }
.pv-clone { pointer-events: none; box-shadow: none !important; animation: none !important; display: flex !important; opacity: 1 !important; }

/* drag */
.ghost { position: absolute; z-index: 9000; pointer-events: none; display: flex; align-items: flex-start; filter: drop-shadow(0 8px 16px rgba(0,0,0,.5)); }
.ghost-stack { display: flex; }
.ghost-stack > * + * { margin-left: -22px; }
.ghost b { margin-left: -8px; margin-top: -6px; background: #4f46e5; border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.caret { position: absolute; z-index: 8999; pointer-events: none; background: #818cf8; border-radius: 2px; box-shadow: 0 0 8px #818cf8; display: none; }
.drop-hot { box-shadow: inset 0 0 0 2px #818cf8 !important; background: rgba(99,102,241,.14) !important; }
.stage.is-dragging, .stage.is-dragging * { cursor: grabbing !important; }

/* MaGrouper window */
.mgr { display: flex; background: #1b1b1f; height: 100%; font-size: 12.5px; }
.m-side { width: 186px; flex: none; background: #202024; display: flex; flex-direction: column; padding: 10px 8px; gap: 1px; overflow: auto; }
.m-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin: 10px 8px 4px; }
.m-nav { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: none; border-radius: 6px; padding: 6px 8px; color: #e2e8f0; position: relative; }
.m-nav span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-nav:hover { background: rgba(255,255,255,.06); }
.m-nav.on { background: rgba(255,255,255,.09); }
.m-nav.on::before { content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px; border-radius: 2px; background: #818cf8; }
.m-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.m-glist { display: flex; flex-direction: column; gap: 1px; }
.m-main { flex: 1; overflow: auto; padding: 16px 18px; min-width: 0; }
.m-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.m-hint { color: #94a3b8; font-size: 11.5px; }
.m-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; height: calc(100% - 38px); }
.m-lib, .m-groups { min-height: 0; overflow: auto; }
.m-lib { background: #222227; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.m-tabs { display: flex; gap: 4px; }
.m-tabs button, .seg button { border: 0; background: rgba(255,255,255,.06); border-radius: 6px; padding: 5px 9px; font-size: 11.5px; }
.m-tabs button.on, .seg button.on { background: #4f46e5; color: #fff; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 4px; align-content: start; }
/* The tabs and the hint stay put; only the list of apps or files scrolls, as in the app */
.mgr .m-lib { overflow: hidden; }
.mgr .m-lib > .lib-grid, .mgr .m-lib > .lib-list { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.lt { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px; border-radius: 7px; cursor: grab; font-size: 11px; text-align: center; }
.lt:hover { background: rgba(255,255,255,.06); }
.fm-path { font-size: 11.5px; color: #cbd5e1; background: #1b1b1f; border-radius: 5px; padding: 4px 8px; }
.lib-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: grab; }
.lib-row small { margin-left: auto; color: #94a3b8; }
.lib-row:hover { background: rgba(255,255,255,.06); }
.m-groups { display: flex; flex-direction: column; gap: 8px; }
.gcard { background: #222227; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 9px; transition: background .12s; }
.gc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.gc-head small { color: #94a3b8; }
.pill { font-size: 10px; padding: 1px 7px; border-radius: 999px; background: rgba(74,222,128,.15); color: #86efac; }
.lnk { border: 0; background: none; color: #a5b4fc !important; padding: 3px 6px; border-radius: 5px; font-size: 12px; cursor: pointer; }
.lnk:hover { background: rgba(165,180,252,.12); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; min-height: 28px; border-radius: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 4px 3px 5px; border-radius: 6px; background: rgba(255,255,255,.07); font-size: 11.5px; cursor: grab; }
.chips.big .chip { padding: 5px 6px 5px 7px; }
.chip-x { border: 0; background: none; color: #94a3b8 !important; width: 16px; height: 16px; border-radius: 4px; padding: 0; line-height: 1; font-size: 13px; }
.chip-x:hover { background: rgba(255,255,255,.12); color: #fff !important; }
.gcard.new { border: 1.5px dashed rgba(165,180,252,.45); background: rgba(99,102,241,.07); display: flex; flex-direction: column; align-items: center; padding: 16px; gap: 3px; color: #c7d2fe; }
.gcard.new small { color: #94a3b8; }
.gp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mgr .gp-name { background: transparent; border: 1px solid transparent; border-radius: 6px; color: #fff; font-size: 19px; font-weight: 600; padding: 3px 8px; width: 260px; outline: none; }
.gp-name:hover, .gp-name:focus { border-color: rgba(255,255,255,.18); background: #222227; }
.gp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { background: #222227; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 11px 12px; margin-bottom: 10px; }
.gp-grid .card { margin: 0; }
.card.wide { grid-column: 1 / -1; }
.card h4 { margin: 0 0 9px; font-size: 12.5px; font-weight: 600; }
.pin-row { display: flex; align-items: center; gap: 12px; }
.pin-row p { margin: 0; color: #cbd5e1; }
.pin-drag { padding: 6px; border-radius: 10px; background: rgba(99,102,241,.15); border: 1.5px dashed #818cf8; cursor: grab; display: inline-flex; animation: nudge 2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }
.pinned-ok { color: #86efac; font-weight: 600; margin-bottom: 4px; }
.icon-opts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 8px; }
.icon-opts button { border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); border-radius: 7px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; }
.icon-opts button.on { border-color: #818cf8; background: rgba(99,102,241,.18); }
.pic-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.pic { width: 30px; height: 30px; border-radius: 7px; border: 1px solid rgba(255,255,255,.2); background-size: cover; padding: 0; }
.btn-accent { border: 0; background: #4f46e5; color: #fff !important; border-radius: 6px; padding: 6px 12px; font-weight: 600; font-size: 12px; }
.btn-accent:hover { background: #6366f1; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.set-row > span { color: #cbd5e1; }
.seg { display: inline-flex; gap: 2px; background: rgba(0,0,0,.2); padding: 2px; border-radius: 8px; }
.seg button { background: none; }
.upd { display: flex; align-items: center; gap: 12px; }
.upd b { font-size: 22px; font-weight: 600; }
.upd .m-hint { flex: 1; }
.edge-opts { display: flex; gap: 8px; margin-bottom: 6px; }
.edge-opts button { border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); border-radius: 8px; padding: 6px 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; }
.edge-opts button.on { border-color: #818cf8; background: rgba(99,102,241,.18); }
.edge-pic { position: relative; width: 52px; height: 32px; border-radius: 4px; background: #3b4a7a; }
.edge-pic i { position: absolute; background: #c7d2fe; }
.e-bottom i { left: 0; right: 0; bottom: 0; height: 6px; } .e-top i { left: 0; right: 0; top: 0; height: 6px; }
.e-left i { top: 0; bottom: 0; left: 0; width: 6px; } .e-right i { top: 0; bottom: 0; right: 0; width: 6px; }
.toggle { width: 40px; height: 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: none; position: relative; flex: none; }
.toggle i { position: absolute; top: 4px; left: 4px; width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; transition: left .15s; }
.toggle.on { background: #4f46e5; border-color: #4f46e5; }
.toggle.on i { left: 22px; background: #fff; }

/* icon designer */
.dz { height: 100%; display: flex; flex-direction: column; }
.dz-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dz-top b { font-size: 16px; }
.dz-body { flex: 1; display: flex; gap: 12px; min-height: 0; }
.dz-rail { width: 106px; flex: none; display: flex; flex-direction: column; gap: 5px; }
.dz-rail > button { border: 0; background: rgba(255,255,255,.07); border-radius: 6px; padding: 6px; font-weight: 600; }
.dz-rail > button:hover, .dz-shapes button:hover, .dz-apps button:hover { background: rgba(255,255,255,.13); }
.dz-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin: 6px 0 3px; }
.dz-h small { text-transform: none; letter-spacing: 0; margin-left: 4px; }
.dz-shapes, .dz-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dz-shapes button, .dz-apps button { border: 0; background: rgba(255,255,255,.07); border-radius: 6px; height: 30px; display: flex; align-items: center; justify-content: center; padding: 0; }
.dz-shapes svg { width: 16px; height: 16px; fill: #fbbf24; }
.dz-center { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dz-canvas { position: relative; flex: none; border-radius: 6px; cursor: default;
  background-color: #2a2a30; background-image: linear-gradient(45deg, #34343b 25%, transparent 25%, transparent 75%, #34343b 75%), linear-gradient(45deg, #34343b 25%, transparent 25%, transparent 75%, #34343b 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.dz-canvas .dl { cursor: move; }
.dz-canvas .dl.sel { outline: 1px dashed rgba(165,180,252,.6); }
.dz-ov { position: absolute; inset: 0; pointer-events: none; }
.dz-box { position: absolute; border: 1.5px solid #818cf8; transform-origin: 50% 50%; }
.dz-hd { position: absolute; width: 11px; height: 11px; background: #fff; border: 2px solid #6366f1; border-radius: 3px; pointer-events: auto; }
.dz-hd.nw { left: -6px; top: -6px; cursor: nwse-resize; } .dz-hd.ne { right: -6px; top: -6px; cursor: nesw-resize; }
.dz-hd.sw { left: -6px; bottom: -6px; cursor: nesw-resize; } .dz-hd.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.dz-hd.rot { left: 50%; top: -24px; margin-left: -6px; border-radius: 50%; cursor: grab; }
.dz-hd.rot::after { content: ""; position: absolute; left: 50%; top: 9px; width: 1.5px; height: 12px; background: #818cf8; margin-left: -1px; }
.dz-sizes { display: flex; align-items: flex-end; gap: 12px; }
.dz-sizes > span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dz-sizes small { color: #94a3b8; font-size: 10px; }
.dz-onbar { background: rgba(28,30,40,.9); border-radius: 6px; padding: 5px 8px; }
.dz-tip { text-align: center; max-width: 250px; }
.dz-panel { flex: 1; min-width: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.dz-layers { display: flex; flex-direction: column; gap: 2px; max-height: 128px; overflow: auto; }
.lrow { display: flex; align-items: center; gap: 6px; padding: 3px 4px 3px 6px; border-radius: 5px; cursor: pointer; }
.lrow:hover { background: rgba(255,255,255,.05); }
.lrow.on { background: rgba(99,102,241,.3); }
.lrow > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow button { border: 0; background: none; color: #94a3b8 !important; width: 18px; height: 18px; padding: 0; border-radius: 4px; font-size: 9px; }
.lrow button:hover { background: rgba(255,255,255,.12); color: #fff !important; }
.lt-t { width: 16px; text-align: center; font-weight: 800; font-family: Georgia, serif; }
.lt-s { width: 16px; height: 16px; }
.dz-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #cbd5e1; }
.dz-row input[type=range] { width: 100px; }
.dz-row input[type=color] { width: 34px; height: 22px; border: 0; padding: 0; background: none; }
.dz-row select { flex: 1; background: #26262c; color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 5px; padding: 3px; }
.dz-in { background: #26262c; color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 5px; padding: 4px 7px; outline: none; }
.dz-b { width: 28px; height: 24px; border: 0; border-radius: 5px; background: rgba(255,255,255,.08); font-weight: 800; }
.dz-b.on { background: #4f46e5; }

/* tour */
.tour { position: absolute; z-index: 8000; width: 304px; background: rgba(255,255,255,.97); color: #0f172a; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.4); font-size: 13.5px; overflow: hidden; transition: box-shadow .2s; }
.tour.min { width: auto; background: none; box-shadow: none; overflow: visible; }
.tour.ok { box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 3px #22c55e; }
.tour-head { display: flex; align-items: center; padding: 9px 10px 4px 16px; font-size: 11.5px; color: #6366f1; font-weight: 600; cursor: move; }
.tour-head button { border: 0; background: none; width: 26px; height: 22px; border-radius: 6px; color: #64748b !important; font-size: 16px; line-height: 1; }
.tour-head button:hover { background: #eef2ff; }
.tour-prog { height: 3px; margin: 0 16px; background: #e0e7ff; border-radius: 3px; overflow: hidden; }
.tour-prog i { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #22d3ee); transition: width .3s; }
.tour h3 { margin: 10px 16px 4px; font-size: 16px; }
.tour p { margin: 0 16px; line-height: 1.5; color: #334155; }
.tour-nav { display: flex; gap: 6px; padding: 12px 12px 12px 16px; }
.tour-nav button, .tour-edges button { border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 6px 12px; color: #0f172a !important; font-weight: 600; font-size: 12.5px; }
.tour-nav button:hover, .tour-edges button:hover { background: #f1f5f9; }
.tour-nav .primary { background: #4f46e5; border-color: #4f46e5; color: #fff !important; }
.tour-nav .primary:hover { background: #4338ca; }
.tour-edges { display: flex; gap: 6px; margin: 10px 16px 0; }
.tour-edges button.on { background: #eef2ff; border-color: #818cf8; }
/* Until one is picked, the edge buttons pulse in turn so it's clear they are the next thing to click */
.tour-edges.pulse button:not(.on) { animation: edgePulse 1.6s ease-in-out infinite; }
.tour-edges.pulse button:nth-child(2) { animation-delay: .2s; }
.tour-edges.pulse button:nth-child(3) { animation-delay: .4s; }
.tour-edges.pulse button:nth-child(4) { animation-delay: .6s; }
.stage.edge-hint::after { content: ""; position: absolute; inset: 0; z-index: 7000; pointer-events: none; animation: edgeGlow 1.6s ease-in-out infinite; }
@keyframes edgeGlow { 0%, 100% { box-shadow: inset 0 0 0 2px rgba(251,191,36,.25), inset 0 0 18px rgba(251,191,36,.12); } 50% { box-shadow: inset 0 0 0 3px rgba(251,191,36,.8), inset 0 0 34px rgba(251,191,36,.35); } }
@keyframes edgePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); border-color: #e2e8f0; } 40% { box-shadow: 0 0 0 4px rgba(251,191,36,.45); border-color: #f59e0b; } }
@media (prefers-reduced-motion: reduce) { .tour-edges.pulse button:not(.on) { animation: none; border-color: #f59e0b; } }
.tour-pill { border: 0; background: #4f46e5; color: #fff !important; border-radius: 999px; padding: 8px 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.tour-ring { position: absolute; z-index: 7999; pointer-events: none; border-radius: 10px; border: 2px solid #fbbf24; box-shadow: 0 0 0 4px rgba(251,191,36,.25), 0 0 24px rgba(251,191,36,.5); display: none; animation: ring 1.6s ease-in-out infinite; transition: left .2s, top .2s, width .2s, height .2s; }
@keyframes ring { 50% { box-shadow: 0 0 0 9px rgba(251,191,36,.08), 0 0 30px rgba(251,191,36,.6); } }

.toast { position: absolute; left: 50%; bottom: 66px; transform: translate(-50%, 10px); z-index: 9500; background: rgba(15,23,42,.92); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 12.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.stage[data-side="bottom"] .toast { bottom: 66px; }
.stage[data-side="top"] .toast { bottom: 18px; }

@media (prefers-reduced-motion: reduce) {
  .stage *, .stage { animation: none !important; transition: none !important; }
}

.gp-title { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pill.off { background: rgba(251,191,36,.15); color: #fcd34d; margin-left: 8px; }
.gp-title .pill { margin-left: 8px; }
.mgr { position: relative; }
.pin-modal-back { position: absolute; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 5; }
.pin-modal { width: 270px; background: #26262c; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.5); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 18px 18px; text-align: center; animation: flyIn .18s ease-out; }
.pm-bar { align-self: stretch; display: flex; align-items: center; justify-content: space-between; margin: 0 -18px; padding: 6px 6px 6px 14px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #cbd5e1; }
.pm-bar button { border: 0; background: none; width: 26px; height: 24px; border-radius: 5px; font-size: 16px; }
.pm-bar button:hover { background: #c42b1c; }
.pin-modal small { color: #94a3b8; font-size: 11px; }
.gp-act { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; max-width: 250px; text-align: right; }
.gp-act small { color: #94a3b8; font-size: 10px; line-height: 1.3; }
.pm-old { display: inline-flex; padding: 6px; border-radius: 10px; background: rgba(255,255,255,.06); opacity: .8; }
.pm-ok { color: #86efac; font-size: 12px; font-weight: 600; }
.pin-modal .btn-accent { margin-top: 2px; }
.mgr .gc-name { flex: 0 1 auto; min-width: 40px; width: 14ch; background: transparent; border: 1px solid transparent; border-radius: 5px; color: inherit; font-family: inherit; font-weight: 700; font-size: 12px; padding: 2px 5px; margin-left: -3px; field-sizing: content; max-width: 160px; }
.mgr .gc-name:hover { border-color: rgba(255,255,255,.18); }
.mgr .gc-name:focus { outline: none; border-color: #818cf8; background: rgba(0,0,0,.25); }
.gc-head .btn-accent { padding: 4px 10px; font-size: 11px; }
.add-row { margin-top: 8px; }
.add-pick { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.07); padding-top: 9px; }
.mgr .add-search { width: 100%; box-sizing: border-box; background: #18181c; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; color: #e5e7eb; font: inherit; font-size: 12px; padding: 6px 9px; }
.mgr .add-search:focus { outline: none; border-color: #818cf8; }
.add-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 7px; max-height: 138px; overflow: auto; }
.add-item { display: flex; align-items: center; gap: 7px; background: #2a2a30; border: 1px solid transparent; border-radius: 6px; color: #e5e7eb; font: inherit; font-size: 11.5px; padding: 5px 7px; text-align: left; cursor: pointer; }
.add-item > span:not(.ico) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-item small { color: #94a3b8; font-size: 10px; }
.add-item b { color: #a5b4fc; font-size: 13px; }
.add-item:hover, .add-item.marked { border-color: #818cf8; background: rgba(99,102,241,.16); }
.ghost.ghost-pin { opacity: .9; }

/* The pretend pointer that plays the tour */
.ap-cursor { position: absolute; left: 0; top: 0; z-index: 9800; width: 22px; height: 22px; pointer-events: none; opacity: 0; transition: opacity .3s; filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }
.ap-cursor.on { opacity: 1; }
.ap-cursor svg { width: 22px; height: 22px; fill: #fff; stroke: #111827; stroke-width: 1.4; stroke-linejoin: round; position: relative; }
.ap-cursor::before { content: ""; position: absolute; left: -10px; top: -12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(251,191,36,.6); opacity: 0; transform: scale(.3); }
.ap-cursor.press::before { animation: apPress .45s ease-out; }
@keyframes apPress { 0% { opacity: .95; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.5); } }
.tour-ap { margin: 8px 16px 0; padding: 6px 10px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 12.5px; }

/* The hidden tour, waiting in the top bar */
.demo-btn.tour-mini[hidden] { display: none; }
.demo-btn.tour-mini { background: #4f46e5; border-color: #6366f1; color: #fff; }
.demo-btn.tour-mini:hover { background: #6366f1; }
.demo-btn.tour-mini svg { fill: none; }
.demo-btn.tour-mini.land { animation: tmLand .7s ease-out; }
@keyframes tmLand { 0% { box-shadow: 0 0 0 0 rgba(129,140,248,.9); } 100% { box-shadow: 0 0 0 12px rgba(129,140,248,0); } }
.tour-fly { position: absolute; z-index: 60; background: rgba(255,255,255,.97); box-shadow: 0 20px 60px rgba(0,0,0,.45); transform-origin: 0 0; pointer-events: none; }

/* A short label pointing at what to do next */
.tour-hint { position: absolute; z-index: 8001; display: none; pointer-events: none; padding: 6px 11px; border-radius: 8px; background: #fbbf24; color: #1f2937; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.35); transform: translate(-50%, -100%); animation: hintBob 1.6s ease-in-out infinite; }
.tour-hint.below { transform: translate(-50%, 0); }
.tour-hint::after { content: ""; position: absolute; left: 50%; width: 10px; height: 10px; margin-left: -5px; background: #fbbf24; transform: rotate(45deg); bottom: -5px; }
.tour-hint.below::after { bottom: auto; top: -5px; }
.tour-hint.right { transform: translate(0, -50%); }
.tour-hint.left { transform: translate(-100%, -50%); }
.tour-hint.right::after, .tour-hint.left::after { left: auto; bottom: auto; top: 50%; margin: -5px 0 0; }
.tour-hint.right::after { left: -5px; }
.tour-hint.left::after { right: -5px; }
@keyframes hintBob { 50% { margin-top: -3px; } }

/* "Drag it across", as in the app: a bracket round the groups and a pill riding its top edge */
.m-split { position: relative; }
.drag-nudge { position: absolute; grid-column: 2; grid-row: 1; inset: 0; pointer-events: none; display: none; z-index: 3; }
.drag-nudge.on { display: block; }
.dn-bracket { position: absolute; inset: -6px -3px 2px -6px; border: 2px solid #5f9be3; border-radius: 12px; background: rgba(76,141,217,.07); animation: dnFade .16s ease-out, dnBreathe 1.9s ease-in-out .16s infinite; }
@keyframes dnFade { from { opacity: 0; } }
@keyframes dnBreathe { 50% { opacity: .62; } }
.dn-pill { position: absolute; left: 0; right: 0; top: -22px; display: flex; justify-content: center; }
.dn-in { display: inline-flex; align-items: center; gap: 0; padding: 6px 6px 7px 15px; border-radius: 18px; background: #5f9be3; color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.45); animation: dnLean 1.9s cubic-bezier(.25,.1,.25,1) infinite; white-space: nowrap; }
@keyframes dnLean { 0% { transform: translateX(0); } 22% { transform: translateX(8px); } 55%, 100% { transform: translateX(0); } }
.dn-chev { display: inline-flex; gap: 2px; margin-left: 8px; }
.dn-chev svg { width: 5px; height: 9px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.dn-x { pointer-events: auto; width: 18px; height: 18px; margin-left: 9px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.dn-x:hover { background: rgba(255,255,255,.36); }
.dn-x svg { width: 8px; height: 8px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }

/* The open group under the icon size setting */
.size-prev-wrap { margin: 2px 0 9px; display: flex; flex-direction: column; gap: 5px; }
.size-prev { align-self: flex-start; max-width: 100%; overflow: hidden; border-radius: 10px; background: rgba(36,38,50,.94); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.4); padding: 0 10px 10px; }
.size-prev.light { background: rgba(246,247,251,.96); color: #0f172a; border-color: rgba(0,0,0,.08); }
.sp-name { height: 30px; display: flex; align-items: center; font-size: 12px; padding-left: 2px; }
.sp-grid { display: flex; gap: 4px; }
.sp-t { flex: none; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.size-prev.anim .sp-t, .size-prev.anim .sp-t .ico { transition: width .32s cubic-bezier(.2,.8,.2,1), height .32s cubic-bezier(.2,.8,.2,1), border-radius .32s; }
@media (prefers-reduced-motion: reduce) { .dn-in, .dn-bracket, .tour-hint { animation: none; } }

@media (max-width: 400px) {
  .demo-btn.play span { display: none; }
  .demo-btn.tour-mini .tm-w { display: none; }
}

/* A phone held upright: the info note spans the top bar instead of hanging off the left edge */
@media (max-width: 600px) {
  .demo-info { position: static; }
  .demo-info-tip { left: 10px; right: 10px; width: auto; top: calc(100% + 6px); }
  .demo-info-tip::before { display: none; }
}

/* The chooser at the start: take the tour yourself, or watch it play */
.pick-back { position: absolute; inset: 0; z-index: 8600; display: flex; align-items: center; justify-content: center; background: rgba(5,8,20,.35); animation: pickIn .2s ease-out; }
.pick-back[hidden] { display: none; }
.pick { position: relative; width: 520px; max-width: calc(100% - 40px); padding: 26px 26px 18px; border-radius: 18px; background: rgba(255,255,255,.98); color: #0f172a; box-shadow: 0 30px 80px rgba(0,0,0,.5); text-align: center; }
.pick h3 { margin: 0 0 6px; font-size: 22px; }
.pick > p { margin: 0 0 18px; color: #475569; font-size: 14px; }
.pick-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: #64748b !important; font-size: 20px; line-height: 1; cursor: pointer; }
.pick-x:hover { background: #f1f5f9; }
.pick-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 14px 16px; border: 1.5px solid #e2e8f0; border-radius: 14px; background: #fff; color: #0f172a !important; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; font: inherit; }
.pick-opt:hover, .pick-opt:focus-visible { border-color: #6366f1; box-shadow: 0 8px 24px rgba(79,70,229,.18); transform: translateY(-2px); outline: none; }
.pick-opt b { font-size: 16px; }
.pick-opt small { color: #64748b; font-size: 12.5px; line-height: 1.45; }
.pick-ico { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #eef2ff; margin-bottom: 4px; }
.pick-opt[data-pick="watch"] .pick-ico { background: #4f46e5; }
.pick-ico svg { width: 22px; height: 22px; fill: #4f46e5; }
.pick-opt[data-pick="watch"] .pick-ico svg { fill: #fff; }
.pick-skip { margin-top: 14px; border: 0; background: none; color: #4f46e5 !important; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.pick-skip:hover { background: #eef2ff; }
@keyframes pickIn { from { opacity: 0; } }
