/* The showcase: a schematic Mac (menu bar with the notch, a dock of a few standard apps) where Refo works next to
   the tools of each trade. Recognisable rather than exact: only what tells the story. Designed at 1180 × 740 and
   scaled to fit. */
.mac-fit { position: relative; z-index: 3; margin: 26px auto 0; max-width: 1180px; }
.mac {
  position: relative; width: 1180px; height: 740px; border-radius: 22px 22px 0 0; overflow: hidden; transform-origin: 0 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 30px 80px rgba(60,60,140,.25); user-select: none;
  background: #cdd3ea;
}
.mac .wall { position: absolute; inset: 0; opacity: .9; }
.mac img { -webkit-user-drag: none; }
/* The menu bar is exactly as tall as the notch, as on a MacBook with one. */
.menubar { position: absolute; z-index: 30; inset: 0 0 auto 0; height: 32px; display: flex; align-items: center; gap: 18px; padding: 0 14px;
  font-size: 13px; color: #111; background: rgba(255,255,255,.45); backdrop-filter: blur(20px); }
.menubar span { font-weight: 500; }
.menubar b { font-weight: 700; }
.menubar .right { margin-left: auto; font-variant-numeric: tabular-nums; }

[hidden]:not(.win):not(.viewer):not(.spaces-screen):not(.lock-sheet) { display: none !important; }

/* Windows */
.win { position: absolute; z-index: 10; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 24px 60px rgba(30,30,80,.28);
  transition: left .55s cubic-bezier(.2,.8,.2,1), top .55s cubic-bezier(.2,.8,.2,1), width .55s cubic-bezier(.2,.8,.2,1), height .55s cubic-bezier(.2,.8,.2,1), opacity .35s, transform .35s; }
.win[hidden] { display: block; opacity: 0; transform: scale(.96) translateY(10px); pointer-events: none; }
.win.front { z-index: 12; }
.lights3 { display: flex; gap: 7px; }
.lights3 i { width: 11px; height: 11px; border-radius: 50%; } .lights3 i:nth-child(1) { background: #ff5f57; } .lights3 i:nth-child(2) { background: #febc2e; } .lights3 i:nth-child(3) { background: #28c840; }
.tbar { height: 40px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid #eee; font-size: 12px; color: #444; background: #fafafa; }
.dark .tbar { background: #1f1f1f; border-color: #2c2c2c; color: #bbb; }
.url { flex: 1; max-width: 340px; margin: 0 auto; height: 26px; border-radius: 8px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #555; }

/* Browser: Pinterest-like board and a studio site */
.pins { padding: 12px; column-count: 4; column-gap: 10px; }
.pins img { width: 100%; border-radius: 12px; margin: 0 0 10px; display: block; cursor: grab; }
.site { padding: 16px; display: grid; gap: 10px; }
.site .blk { border-radius: 18px; padding: 14px; transition: box-shadow .2s, background .2s; }
.site .blk.hl { box-shadow: 0 0 0 2px #1f6fff; background: rgba(31,111,255,.05); }
.site .labels { display: flex; gap: 6px; align-items: center; font: 11px ui-monospace, Menlo, monospace; }
.site .labels span { padding: 6px 10px; border-radius: 999px; background: #f2f2f2; }
.site .labels i { margin-left: auto; font-style: normal; padding: 6px 12px; border-radius: 999px; background: #000; color: #fff; }
.site h3 { margin: 14px 0 12px; font-size: 30px; line-height: 1.02; letter-spacing: -.04em; font-weight: 700; }
.site .ver { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; background: #f2f2f2; font-size: 12px; text-align: center; }
.site .ver span { padding: 8px; border-radius: 999px; color: #666; } .site .ver .on { background: #fff; color: #161616; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.site .ctx { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .site .ctx > div { border-radius: 16px; background: #f4f4f4; padding: 12px; font-size: 11px; }
.site .ctx b { font-size: 14px; } .site .ctx p { margin: 6px 0 0; color: #666; line-height: 1.4; }
/* The saved block: big numbers on soft cards; it lives on in Refo, so it reacts there too */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6em; font-size: var(--fs, 10px); }
.stats .st { border-radius: 1.8em; background: #f4f4f4; padding: 1.4em 1.4em 1.2em; transition: transform .25s cubic-bezier(.2,.8,.2,1), background .25s; cursor: default; }
.stats .st:hover, .stats .st.hov { transform: translateY(-.4em); background: #ececf2; }
.stats b { display: block; font-size: 4.2em; line-height: 1; letter-spacing: -.05em; font-weight: 600; }
.stats span { display: block; margin-top: .6em; font-size: 1.3em; color: #666; }
.keys { position: absolute; z-index: 40; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; gap: 6px; opacity: 0; transition: opacity .25s; }
.keys.on { opacity: 1; }
.keys span { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; background: rgba(20,20,20,.85); color: #fff; display: grid; place-items: center; font-size: 16px; }

/* Refo — measured from the real classic window (points at 1×), drawn at full size inside .ui and scaled down
   as one piece, so every proportion matches the app. */
.mac { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
.refo { background: #fff; }
.refo .ui { position: absolute; left: 0; top: 0; width: calc(100% / var(--k)); height: calc(100% / var(--k)); transform: scale(var(--k)); transform-origin: 0 0; --k: .66; --rail: 56px; --side: 240px; color: #161616; }
.win:not(.front) .lights3 i { background: #dcdcdc !important; }
/* The window row, to the point (RefoMainTitleBar): lights 20 in · arrows two 28-buttons from x 86 · the list toggle
   at edge − 37 · the divider on the list's hairline · the magnifier 8 after it · «+» 32, 8 from the right. */
.rtop { position: absolute; inset: 0 0 auto 0; height: 48px; display: block; padding: 0; border: 0; background: #fff; font-size: 13px; }
.rtop .lights3 { position: absolute; left: 21px; top: 18px; gap: 8px; }
.rtop .lights3 i { width: 12px; height: 12px; }
.rtop .nav2 { position: absolute; left: 86px; top: 10px; display: flex; gap: 0; color: #444; }
.rtop .nav2 svg { width: 28px; height: 28px; padding: 6px; box-sizing: border-box; }
.rtop .nav2 svg + svg { color: #c4c4c4; }
.rtop .side-t { position: absolute; left: calc(var(--rail) + var(--side) - 37px); top: 10px; width: 28px; height: 28px; display: grid; place-items: center; color: #444; }
.rtop .vsep { position: absolute; left: calc(var(--rail) + var(--side) - 1px); top: 14px; width: 1px; height: 20px; background: #e6e6e6; }
.rtop .plus { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 8px; background: #161616; color: #fff; display: grid; place-items: center; }
.rtop .rsearchbtn { position: absolute; left: calc(var(--rail) + var(--side) + 8px); top: 10px; width: 28px; height: 28px; display: grid; place-items: center; color: #6e6e6e; cursor: pointer; }
.rtop .rsearchbtn > span { grid-area: 1 / 1; display: grid; transition: opacity .2s, transform .2s; }
.rtop .rsearchbtn .c { opacity: 0; transform: rotate(-45deg) scale(.6); }
.refo.searching .rsearchbtn .s { opacity: 0; transform: scale(.6); } .refo.searching .rsearchbtn .c { opacity: 1; transform: none; }
.rtop .crumbs { position: absolute; left: calc(var(--rail) + var(--side) + 40px); top: 0; height: 48px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: #6e6e6e; white-space: nowrap; transition: opacity .2s; }
.rtop .crumbs b { color: #161616; font-weight: 500; } .rtop .crumbs svg { color: #b0b0b0; }
.rtop .rfield { position: absolute; left: calc(var(--rail) + var(--side) + 40px); right: 56px; top: 0; height: 48px; display: flex; align-items: center; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.rtop .rfield .ph { color: #8a8a8a; position: absolute; } .rtop .rfield .caret { width: 1.5px; height: 16px; background: #161616; margin-left: 1px; animation: blink 1s steps(1) infinite; }
.refo.searching .crumbs { opacity: 0; } .refo.searching .rfield { opacity: 1; pointer-events: auto; }
.rtop .vcrumbs { position: absolute; left: calc(var(--rail) + var(--side) + 12px); top: 0; height: 48px; align-items: center; display: none; gap: 12px; font-size: 13px; white-space: nowrap; } .rtop .vcrumbs b { font-weight: 500; } .rtop .vcrumbs span { color: #8a8a8a; }
.rtop .vclose { position: absolute; right: 10px; top: 6px; width: 36px; height: 36px; place-items: center; display: none; color: #444; }
.refo.viewing .ui { --side: 272px; }
.refo.viewing .crumbs, .refo.viewing .rfield, .refo.viewing .rsearchbtn, .refo.viewing .plus { display: none; }
.refo.viewing .vcrumbs { display: flex; } .refo.viewing .vclose { display: grid; }
.rail { position: absolute; left: 0; top: 48px; bottom: 0; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 10px; background: #fff; }
.rail button { appearance: none; border: 0; width: 36px; height: 36px; border-radius: 12px; background: none; display: grid; place-items: center; cursor: pointer; color: #3a3a3a; }
.rail button.on { background: #161616; color: #fff; }
.rail button { transition: background .25s, color .25s; }
.rail hr { width: 20px; border: 0; border-top: 1px solid #e3e3e3; margin: 4px 0; }
.rail .ava { margin-top: auto; margin-bottom: 14px; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #e9d7c7 0 22%, #2b2320 23% 100%); }
.rpanel { position: absolute; left: 56px; top: 48px; right: 0; bottom: 0; display: grid; grid-template-columns: var(--side) 1fr; border: 1px solid #e6e6e6; border-right: 0; border-bottom: 0; border-top-left-radius: 20px; overflow: hidden; background: #fff; }
.rside { border-right: 1px solid #ececec; font-size: 14px; display: flex; flex-direction: column; }
.rhead { height: 56px; box-sizing: border-box; display: flex; align-items: center; padding: 0 16px 0 18px; border-bottom: 1px solid #ececec; }
.rhead .logo { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: calc(100% - 64px); font-weight: 600; font-size: 17px; letter-spacing: -.03em; cursor: pointer; border-radius: 8px; padding: 4px; margin-left: -4px; }
.rhead .logo:hover { background: #f2f2f2; }
.rhead .logo svg { flex: none; }
/* A space's name takes «Refo»'s place; long names end in «…» instead of running under the tools. */
.rhead .logo .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rhead .tools { margin-left: auto; display: flex; gap: 16px; color: #444; }
.rhead .bell { position: relative; display: grid; } .rhead .bell::after { content: ""; position: absolute; right: -1px; top: -1px; width: 5px; height: 5px; border-radius: 50%; background: #161616; box-shadow: 0 0 0 1.5px #fff; }
.rside .r { height: 34px; margin: 0 10px 6px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 20px; border-radius: 14px; color: #3a3a3a; white-space: nowrap; }
.rside .r svg { color: #555; flex: none; }
.rside .r.all { margin-top: 12px; padding-left: 16px; }
.rside .r.on { background: #ececec; color: #161616; font-weight: 600; }
.rside .r.on svg { color: #161616; }
.rside .cap { display: flex; align-items: center; gap: 6px; color: #555; padding: 10px 16px 10px 26px; }
.rside .cap .add { margin-left: auto; display: grid; }
.rmain { position: relative; overflow: hidden; }
.rchips { display: flex; gap: 8px; padding: 12px 14px 10px 16px; align-items: center; }
.rchips .c { height: 32px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px #e6e6e6; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.rchips .c svg { color: #666; }
.rtools { margin-left: auto; display: flex; gap: 8px; }
.seg2 { display: flex; padding: 2px; border-radius: 999px; box-shadow: inset 0 0 0 1px #e6e6e6; }
.seg2 b { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; color: #555; }
.seg2 b:first-child { background: #ececec; color: #161616; }
.rgrid { padding: 0 16px 16px; column-count: var(--cols, 4); column-gap: 12px; }
.rgrid .t { position: relative; margin: 0 0 12px; border-radius: 14px; overflow: hidden; break-inside: avoid; background: #f3f3f3; transition: opacity .3s, box-shadow .3s; }
.rgrid .t img, .rgrid .t video { width: 100%; display: block; }
.rgrid .t.dim { opacity: .15; }
.rgrid .t.fresh { box-shadow: 0 0 0 3px #1f6fff; }
.rgrid .t .tag { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.92); }
/* One ref — the viewer and «Разбор» alike (as RefoObjectShell): details | the picture | the object's rail */
.viewer { position: absolute; inset: 48px 0 0 56px; z-index: 5; display: grid; grid-template-columns: 272px 1fr 56px; background: #fff; border: 1px solid #e6e6e6; border-right: 0; border-bottom: 0; border-top-left-radius: 20px; overflow: hidden; transition: opacity .3s; font-size: 13px; }
.viewer[hidden] { display: grid; opacity: 0; pointer-events: none; }
.vinfo { border-right: 1px solid #ececec; display: flex; flex-direction: column; min-height: 0; }
.vhead { height: 56px; box-sizing: border-box; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 20px; border-bottom: 1px solid #ececec; }
.vhead b { font-size: 17px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vhead small { font-size: 11px; font-weight: 600; color: #6e6e6e; background: #f0f0f0; padding: 3px 7px; border-radius: 6px; }
.vbody { flex: 1 1 auto; min-height: 0; padding: 6px 16px 0; display: flex; flex-direction: column; overflow: hidden; }
.vbody > * { flex: none; }
.vbody label { font-size: 14px; font-weight: 600; margin: 16px 12px 10px; }
.vbody .field { height: 40px; border-radius: 999px; box-shadow: inset 0 0 0 1px #e6e6e6; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: #222; white-space: nowrap; overflow: hidden; }
.vbody .field svg { color: #666; flex: none; width: 16px; height: 16px; } .vbody .field span:not(.dn) { overflow: hidden; text-overflow: ellipsis; } .vbody .field .dn { margin-left: auto; display: grid; color: #777; }
.tagbox { border-radius: 18px; box-shadow: inset 0 0 0 1px #e6e6e6; overflow: hidden; }
.tagin { height: 42px; display: flex; align-items: center; padding: 0 14px 0 16px; border-bottom: 1px solid #ececec; cursor: text; }
.tagin #v-tagq { flex: 1; } .tagin .aiic { color: #777; display: grid; }
.ph { color: #9a9a9a; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; min-height: 52px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 12px; border-radius: 999px; background: #f1f1f1; font-size: 13px; }
.chip svg { color: #555; }
.chip.pop { animation: pop .38s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { from { opacity: 0; transform: scale(.6); filter: blur(4px); } }
.note { min-height: 120px; border-radius: 18px; box-shadow: inset 0 0 0 1px #e6e6e6; padding: 14px 14px; line-height: 1.45; color: #222; }
.copyp { margin-top: 8px; border: 0; border-radius: 999px; background: #161616; color: #fff; font: inherit; font-size: 12px; padding: 5px 12px; cursor: pointer; }
/* Words come up out of a blur one by one — dictation, the agent's note */
.w { display: inline-block; opacity: 0; transform: translateY(.5em); filter: blur(5px); transition: opacity .45s ease, transform .5s cubic-bezier(.2,.8,.2,1), filter .45s ease; }
.w.in { opacity: 1; transform: none; filter: none; }
/* The agent, connected (as RefoAgentPanel): the thread above a hairline, the field below — model, mic, send.
   While it thinks, a dispersed rainbow runs along the rim and «Смотрю реф…» shimmers in the thread. */
.agent { position: relative; flex: none; margin: 12px 16px 16px; border-radius: 24px; background: #f7f7f7; box-shadow: inset 0 0 0 1px #ebebeb; }
.agent .rim { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; padding: 1.5px;
  background: conic-gradient(from var(--a, 0deg), #669eff, #b380ff, #ff80bf, #ffb866, #8ce6f2, #669eff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.agent .rim::after { content: ""; position: absolute; inset: -6px; border-radius: 30px; background: inherit; filter: blur(10px); opacity: .5; z-index: -1; }
.agent.thinking .rim { opacity: 1; animation: rim 2.4s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes rim { to { --a: 360deg; } }
/* The thread hugs its messages and stops at 220 (scrolls in the app; here the latest stays in view). */
.thread { display: none; flex-direction: column; justify-content: flex-end; max-height: 220px; overflow: hidden; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #ebebeb; font-size: 13px; line-height: 1.4; }
.agent.has-thread .thread { display: flex; }
.bubble.me { align-self: flex-end; max-width: 88%; padding: 8px 12px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px #ebebeb; animation: pop .35s cubic-bezier(.2,.9,.3,1.2); }
.shim { background: linear-gradient(90deg, rgba(110,110,110,.55) 0%, #161616 50%, rgba(110,110,110,.55) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.change { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #ebebeb; font-size: 12px; }
.change svg { color: #8a8a8a; flex: none; } .change span { flex: 1; }
.change b { font-weight: 500; height: 24px; padding: 0 12px; border-radius: 999px; background: #ececec; display: grid; place-items: center; }
.composer { padding: 16px; }
.atext { min-height: 36px; font-size: 13px; line-height: 1.4; color: #161616; }
.arow { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.arow .model { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 999px; background: #ececec; font-size: 13px; }
.arow .model svg { color: #8a8a8a; }
.arow .mic { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; color: #161616; border-radius: 12px; cursor: pointer; transition: background .2s, color .2s; }
.arow .mic.on { background: #161616; color: #fff; }
.asend { width: 32px; height: 32px; border-radius: 12px; background: #ececec; color: #9a9a9a; display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.agent.ready .asend { background: #161616; color: #fff; }
/* The stage and Удалить / Оставить — the buttons never leave while refs change */
.vstage { position: relative; min-width: 0; display: flex; flex-direction: column; padding: 16px 16px 0; }
.vpic, .vmodel, .vlive { flex: 1; min-height: 0; display: grid; place-items: center; }
.vpic img { max-width: 100%; max-height: 100%; border-radius: 16px; box-shadow: 0 0 0 1px #ececec; }
.vmodel model-viewer, .bl-model model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.vstage.snap { padding-top: 64px; }
.vlive { --fs: 13px; align-content: center; padding: 0 12px; }
.vlive .stats { width: 100%; }
.vacts { flex: none; height: 52px; display: flex; justify-content: center; align-items: center; gap: 18px; font-size: 13px; color: #444; }
.vacts[hidden] { display: flex; visibility: hidden; }
.vacts button { appearance: none; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.vacts button:hover { background: #f2f2f2; }
.vseg { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; padding: 2px; border-radius: 999px; box-shadow: inset 0 0 0 1px #e6e6e6; z-index: 2; }
.vseg[hidden] { display: none; }
.vseg button { appearance: none; border: 0; background: none; font: inherit; font-size: 13px; height: 32px; padding: 0 16px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: #8a8a8a; }
.vseg button.on { background: #ececec; color: #161616; font-weight: 500; }
.orail { position: relative; border-left: 1px solid #ececec; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 10px; }
.orail button { appearance: none; border: 0; width: 36px; height: 36px; border-radius: 12px; background: none; display: grid; place-items: center; cursor: pointer; color: #444; }
.orail button:hover { background: #f2f2f2; }
.orail hr { width: 20px; border: 0; border-top: 1px solid #e3e3e3; margin: 2px 0; }
.orail .bottom { margin-top: auto; margin-bottom: 12px; }
.orail .tipc { position: absolute; right: 52px; top: 18px; white-space: nowrap; font-size: 12px; padding: 6px 10px; border-radius: 8px; background: #161616; color: #fff; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.orail .tipc.on { opacity: 1; transform: none; }
/* Spaces: the deep blue field with tilted cards, as in the app */
.spaces-screen { position: absolute; inset: 48px 0 0 0; z-index: 6; background: radial-gradient(60% 70% at 50% 55%, #3f63d4, #142468 80%); transition: opacity .35s; overflow: hidden; }
.spaces-screen[hidden] { display: block; opacity: 0; pointer-events: none; }
.spaces-screen .star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .5; }
.scard { position: absolute; width: 220px; height: 220px; border-radius: 36px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 18px 40px rgba(0,0,0,.35); transform: perspective(600px) rotateX(10deg) rotateY(-12deg); cursor: pointer; transition: transform .3s; }
.scard:hover { transform: perspective(600px) rotateX(4deg) rotateY(-4deg) scale(1.04); }
.scard img { width: 100%; height: 100%; object-fit: cover; }
.scard b { position: absolute; left: 16px; bottom: 34px; color: #fff; font-size: 17px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.scard small { position: absolute; left: 16px; bottom: 15px; color: rgba(255,255,255,.85); font-size: 13px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.scard .lk { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; }
.lock-sheet { position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 440px; padding: 32px; border-radius: 28px; background: #fff; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); transition: opacity .3s, transform .3s; }
.lock-sheet[hidden] { display: block; opacity: 0; transform: translate(-50%, -46%); pointer-events: none; }
.lock-sheet b { display: block; font-size: 19px; margin: 10px 0 4px; }
.lock-sheet small { color: #777; font-size: 14px; }
.cells { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.cells i { width: 56px; height: 64px; border-radius: 16px; box-shadow: inset 0 0 0 1px #e8e8e8; display: grid; place-items: center; }
.cells i.cur { box-shadow: inset 0 0 0 2px #161616; }
.cells i.f::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #161616; }
.cells.ok i { box-shadow: inset 0 0 0 1px #28c840; }

/* Editor (DaVinci-like) */
.editor { background: #1b1b1d; color: #ddd; display: grid; grid-template-rows: 40px minmax(0, 1fr) 150px; }
.editor .mon { display: grid; place-items: center; padding: 12px; min-height: 0; overflow: hidden; }
.editor .mon video, .editor .mon img { max-height: 100%; max-width: 100%; border-radius: 4px; }
.timeline { border-top: 1px solid #2c2c2e; padding: 12px; display: grid; gap: 8px; align-content: start; position: relative; }
.track { height: 34px; border-radius: 6px; background: #252528; position: relative; display: flex; gap: 4px; padding: 3px; }
.track .clip { height: 100%; border-radius: 4px; background: #3f6fd6; width: 120px; overflow: hidden; display: flex; align-items: center; padding: 0 6px; font-size: 10px; color: #fff; }
.track .clip.a { background: #2f9e6e; width: 200px; }
.track .clip.new { background: #c7682f; width: 0; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.playhead { position: absolute; top: 4px; bottom: 4px; left: 210px; width: 2px; background: #ff4d4d; }
/* Blender */
.blender3d { background: #2a2a2a; color: #ccc; }
.blender3d .vp { position: absolute; inset: 40px 0 0 180px; background-image: linear-gradient(#363636 1px, transparent 1px), linear-gradient(90deg, #363636 1px, transparent 1px); background-size: 28px 28px; }
.bl-side { position: absolute; left: 0; top: 40px; bottom: 0; width: 180px; border-right: 1px solid #1d1d1d; background: #303030; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.bl-side span { padding: 4px 8px; border-radius: 6px; } .bl-side span:last-child:not(.dim) { background: #2f5ea8; color: #fff; } .bl-side .dim { color: #666; }
.bl-model { position: absolute; inset: 6% 18%; }
.bl-model model-viewer.in { animation: land .6s cubic-bezier(.2,.8,.2,1); }
@keyframes land { from { opacity: 0; transform: scale(.7); } }
.blender3d .cube.gone { opacity: 0; transition: opacity .3s; }
.blender3d .axis { position: absolute; left: 0; right: 0; top: 60%; height: 2px; background: #a8434a; opacity: .7; }
.blender3d .axis.y { left: 46%; right: auto; top: 40px; bottom: 0; width: 2px; height: auto; background: #6b9b39; }
.blender3d .ref { position: absolute; left: 50%; top: 52%; width: 220px; transform: translate(-50%,-50%) perspective(500px) rotateY(-24deg); border-radius: 4px; opacity: 0; transition: opacity .4s, transform .5s; }
.blender3d .ref.on { opacity: .95; }
.blender3d .cube { position: absolute; left: 28%; top: 54%; width: 60px; height: 60px; background: #8a8a8a; transform: rotate(45deg) skew(10deg, 10deg); opacity: .8; }
/* IDE */
.ide { background: #1e1e1e; color: #d4d4d4; display: grid; grid-template-columns: 150px 1fr 320px; grid-template-rows: 40px minmax(0, 1fr); }
/* The agent panel of the IDE (Cursor / Claude Code style): the thread, then the field with @Refo. */
.ide-agent { border-left: 1px solid #2b2b2b; background: #191919; display: flex; flex-direction: column; min-height: 0; font-size: 12px; line-height: 1.45; }
.ia-head { height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid #2b2b2b; color: #ddd; font-weight: 600; }
.ia-head small { color: #777; font-weight: 400; margin-left: 4px; }
.ia-thread { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 12px 14px; }
.ia-thread .bubble.me { align-self: flex-end; max-width: 90%; padding: 8px 10px; border-radius: 12px; background: #2a2a2a; box-shadow: none; color: #eee; }
.ia-thread .reply { color: #cfcfcf; }
.ia-thread .shim { background: linear-gradient(90deg, #777 0%, #fff 50%, #777 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.4s linear infinite; }
.ia-thread .change { background: #232323; box-shadow: inset 0 0 0 1px #333; color: #ddd; }
.ia-thread .change b { background: #333; color: #eee; }
.ia-box { margin: 10px; border-radius: 14px; background: #232323; box-shadow: inset 0 0 0 1px #333; padding: 10px 10px 8px 12px; cursor: text; }
.ia-q { min-height: 36px; color: #eee; } .ia-q .ph { color: #777; }
/* @Refo in the IDE: one small white plate, the same in the field and in the sent bubble, sitting on the text line. */
.ia-q, .ia-thread .bubble.me { line-height: 18px; }
.ide-agent .mention { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px 0 5px; margin-right: 4px; border-radius: 6px; vertical-align: top;
  background: #fff; color: #161616; font-size: 11px; font-weight: 600; line-height: 18px; animation: none; }
.ide-agent .mention svg { width: 10px; height: 10px; }
.ia-row { display: flex; align-items: center; margin-top: 6px; color: #888; }
.ia-send { margin-left: auto; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: #333; color: #888; cursor: pointer; transition: background .2s, color .2s; }
.ia-send.on { background: #fff; color: #161616; }
.ide .tbar { grid-column: 1 / -1; }
.ide .tree { background: #181818; padding: 10px; font-size: 11px; color: #9a9a9a; line-height: 2; }
.ide .tree b { color: #ddd; font-weight: 500; }
.ide .code { padding: 12px 14px; font: 11px/1.7 ui-monospace, Menlo, monospace; white-space: pre; overflow: hidden; min-width: 0; }
.ide .code .t { color: #569cd6; } .ide .code .a { color: #ce9178; } .ide .code .k { color: #c586c0; }
.ide .code .pasted { background: rgba(31,111,255,.18); transition: background 1.2s; }
/* Node generator (ComfyUI-like) */
.nodes { background: #222; color: #ddd; background-image: radial-gradient(#333 1px, transparent 1px); background-size: 18px 18px; }
.node { position: absolute; width: 190px; border-radius: 10px; background: #353535; box-shadow: 0 6px 20px rgba(0,0,0,.4); font-size: 11px; overflow: hidden; }
.node h5 { margin: 0; padding: 6px 10px; font-size: 11px; background: #2d4a3a; color: #e8e8e8; }
.node.k h5 { background: #4a3a5a; } .node.o h5 { background: #3a465a; }
.node p { margin: 0; padding: 8px 10px; color: #cfcfcf; line-height: 1.4; }
.node img { display: block; width: 100%; cursor: grab; }
.wires { position: absolute; inset: 0; pointer-events: none; }

/* Dock */
.dock { position: absolute; z-index: 30; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 8px; padding: 8px; border-radius: 20px;
  background: rgba(255,255,255,.4); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.dock i { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; position: relative; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.dock i.run::after { content: ""; position: absolute; bottom: -6px; width: 4px; height: 4px; border-radius: 50%; background: rgba(0,0,0,.55); }
.dock i img { width: 26px; height: 26px; }
.dock .sep { width: 1px; background: rgba(0,0,0,.15); margin: 4px 2px; }

/* The island in the menu bar's notch */
.notch { position: absolute; z-index: 35; top: 0; left: 50%; transform: translateX(-50%); width: 200px; height: 32px; background: #000; border-radius: 0 0 14px 14px;
  transition: width .38s cubic-bezier(.2,.8,.2,1), height .38s cubic-bezier(.2,.8,.2,1), border-radius .38s, box-shadow .3s; overflow: hidden; color: #fff; }
.notch.ready { width: 240px; box-shadow: 0 0 0 3px rgba(31,111,255,.6), 0 10px 30px rgba(31,111,255,.4); }
/* Concentric corners: the picture sits 16 from the bottom and the side, so the notch rounds at 9 + 16 = 25. */
.notch.open { width: 340px; height: 82px; border-radius: 0 0 25px 25px; }
.notch.tray { width: 420px; height: 116px; border-radius: 0 0 28px 28px; }
.notch .saved, .notch .shelf { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 34px 16px 16px; opacity: 0; transition: opacity .2s; }
.notch.open .saved { opacity: 1; transition-delay: .12s; }
.notch.tray .shelf { opacity: 1; transition-delay: .12s; padding-top: 38px; }
.notch .saved img { width: 44px; height: 32px; border-radius: 9px; object-fit: cover; }
.notch .saved b { font-size: 13px; display: block; } .notch .saved span { font-size: 11px; color: rgba(255,255,255,.6); }
.notch .saved .ok { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; background: #28c840; display: grid; place-items: center; }
.notch .shelf img { width: 88px; height: 62px; border-radius: 9px; object-fit: cover; cursor: grab; }
.notch .shelf small { position: absolute; top: 9px; left: 16px; font-size: 11px; color: rgba(255,255,255,.6); }

/* The scripted pointer and its taps */
.cursor { position: absolute; z-index: 60; left: 0; top: 0; width: 22px; height: 22px; pointer-events: none; transition: opacity .3s; will-change: transform; }
.cursor.hide { opacity: 0; }
.tap { position: absolute; z-index: 59; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(31,111,255,.25); box-shadow: 0 0 0 2px rgba(31,111,255,.6); pointer-events: none; animation: tap .5s ease-out forwards; }
@keyframes tap { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.ghost { position: absolute; z-index: 58; width: 120px; border-radius: 10px; overflow: hidden; pointer-events: none; box-shadow: 0 18px 40px rgba(0,0,0,.3); transition: opacity .25s, transform .25s; }
.ghost img { width: 100%; display: block; }
.ghost.in { transform: scale(.2); opacity: 0; }
/* Hints in the visitor's hands: the next target glows, a faint pointer shows the move, a line says what it does */
.hint-ring { position: absolute; z-index: 57; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 2px rgba(31,111,255,.9), 0 0 0 7px rgba(31,111,255,.18); animation: hpulse 1.4s ease-in-out infinite; }
.hint-ring.to { box-shadow: none; outline: 2px dashed rgba(31,111,255,.85); outline-offset: 0; background: rgba(31,111,255,.08); animation: none; }
@keyframes hpulse { 50% { box-shadow: 0 0 0 2px rgba(31,111,255,.9), 0 0 0 12px rgba(31,111,255,.06); } }
.hint-hand { position: absolute; z-index: 62; left: 0; top: 0; pointer-events: none; transform-origin: 0 0; opacity: 0; }
.hint-hand svg { display: block; }
.hint-thumb { position: absolute; left: 10px; top: 14px; width: 64px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.25); display: none; }
.hint-hand.drag .hint-thumb { display: block; }
.hint-hand.click { animation: hclick 1.9s ease-in-out infinite; }
.hint-hand.drag { animation: hdrag 2.4s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes hclick {
  0% { transform: translate(calc(var(--bx) + 60px), calc(var(--by) + 70px)); opacity: 0; }
  20% { opacity: .55; }
  50% { transform: translate(var(--bx), var(--by)); opacity: .55; }
  58% { transform: translate(var(--bx), var(--by)) scale(.82); }
  68% { transform: translate(var(--bx), var(--by)) scale(1); opacity: .55; }
  100% { transform: translate(var(--bx), var(--by)); opacity: 0; }
}
@keyframes hdrag {
  0% { transform: translate(var(--ax), var(--ay)); opacity: 0; }
  12% { transform: translate(var(--ax), var(--ay)); opacity: .55; }
  22% { transform: translate(var(--ax), var(--ay)) scale(.92); opacity: .55; }
  72% { transform: translate(var(--bx), var(--by)) scale(.92); opacity: .55; }
  90%, 100% { transform: translate(var(--bx), var(--by)); opacity: 0; }
}
.hint-tip { position: absolute; z-index: 63; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 9px 16px; border-radius: 999px;
  background: rgba(22,22,22,.88); color: #fff; font-size: 14px; white-space: nowrap; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: left .3s, top .3s; }
.hint-tip b { font-weight: 600; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.mac.manual .site .blk { cursor: pointer; }
.mac.manual .site .blk:hover { box-shadow: 0 0 0 2px #1f6fff; background: rgba(31,111,255,.05); }
.mac.manual .cells, .mac.manual .rsearch { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .hint-ring, .hint-hand { animation: none; } .hint-hand { opacity: .55; transform: translate(var(--bx), var(--by)); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes sway { from { transform: perspective(600px) rotateY(-24deg); } to { transform: perspective(600px) rotateY(24deg); } }
@media (prefers-reduced-motion: reduce) { .vstage .model { animation: none; } }

/* The island, open (RefoIsland): 780 wide with concave ears, bottom radius 32, padding 18 — search row 36, folder
   chips 28, the strip of 176 × 132 cards. Built at full size and scaled to the mini screen as one piece. */
.notch { --is: .6; }
.notch .ipanel { position: absolute; left: 0; top: 32px; width: calc(780px * var(--is)); opacity: 0; pointer-events: none; transition: opacity .2s; }
.notch.panel { width: calc(780px * var(--is)); height: calc(32px + 256px * var(--is)); border-radius: 0 0 calc(32px * var(--is)) calc(32px * var(--is)); overflow: visible; }
.notch.panel .ipanel { opacity: 1; pointer-events: auto; transition: opacity .25s .3s; }
.notch.panel::before, .notch.panel::after { content: ""; position: absolute; top: 0; width: 10px; height: 10px; }
.notch.panel::before { left: -10px; background: radial-gradient(circle at 0 100%, transparent 9.5px, #000 10px); }
.notch.panel::after { right: -10px; background: radial-gradient(circle at 100% 100%, transparent 9.5px, #000 10px); }
.iin { width: 748px; margin-left: calc(16px * var(--is)); transform: scale(var(--is)); transform-origin: 0 0; padding: 18px; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; color: #fff; font-size: 13px; }
.irow { display: flex; gap: 8px; align-items: center; }
.ifield { flex: 1; height: 36px; border-radius: 999px; background: rgba(255,255,255,.06); display: flex; align-items: center; gap: 8px; padding: 0 4px 0 14px; cursor: text; }
.ifield > svg { color: rgba(255,255,255,.5); flex: none; }
.ifield.focus { box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.ifield .iq { flex: 1; white-space: nowrap; } .ifield .ph { color: rgba(255,255,255,.4); }
.iopen, .ib { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.ib { width: 36px; height: 36px; }
.iopen svg { width: 14px; height: 14px; }
.ichips { display: flex; gap: 6px; }
.ichips span { height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.08); display: grid; place-items: center; font-size: 12px; font-weight: 500; }
.ichips span.on { background: #fff; color: #111; }
.istrip { display: flex; gap: 8px; height: 132px; overflow: hidden; margin: 0 -18px; padding: 0 18px; }
.icard { position: relative; flex: none; width: 176px; height: 132px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.06); cursor: grab;
  transition: width .45s cubic-bezier(.2,.8,.2,1), margin .45s cubic-bezier(.2,.8,.2,1), opacity .3s ease, transform .45s cubic-bezier(.2,.8,.2,1); }
.icard.out { width: 0; margin-left: -8px; opacity: 0; transform: scale(.92); pointer-events: none; }
.icard img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.icard .pl { position: absolute; left: 6px; bottom: 6px; display: grid; }
.istrip .none { margin: auto; color: rgba(255,255,255,.45); font-size: 12px; }
.hint-tip.nudge { animation: nudge .4s ease; }
@keyframes nudge { 20%, 60% { transform: translateX(calc(-50% - 6px)); } 40%, 80% { transform: translateX(calc(-50% + 6px)); } }

.thread > * { flex: none; }
