/* sultonbek.uz/lab: the site as a living system map. */
:root {
  --bg: #04070d; --panel: rgba(10, 15, 26, .92); --line: rgba(255, 255, 255, .09); --line2: rgba(255, 255, 255, .18);
  --text: #e9eef6; --soft: #c2cddd; --muted: #7f8ea4;
  --mob: #00d0d8; --be: #f2b83c; --ai: #a78bfa; --web: #3ddc97; --me: #ffffff; --net: #4f8cff;
  --ff-head: 'Space Grotesk', system-ui, sans-serif; --ff-body: 'Inter', system-ui, sans-serif; --ff-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--ff-body); -webkit-font-smoothing: antialiased; }
body { overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--mob); outline-offset: 3px; border-radius: 8px; }

#stage { position: fixed; inset: 0; cursor: grab; }
#stage.drag { cursor: grabbing; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; }
#world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
/* while moving, the map is one GPU layer (no re-rendering of every card per frame); at rest it re-renders crisp */
#world.moving { will-change: transform; }
#world.moving .nd { transition: none; }

/* ── nodes ── */
.nd {
  position: absolute; transform: translate(-50%, -50%); width: 230px; padding: 14px 16px 15px; text-align: left; border-radius: 16px;
  background: rgb(11, 17, 29); border: 1px solid var(--line); box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .9); overflow-wrap: anywhere;
  transition: border-color .3s, box-shadow .3s, opacity .6s, filter .6s; --c: var(--mob);
}
.nd::before { content: ''; position: absolute; left: 14px; right: 14px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--c), transparent); opacity: .7; }
.nd:hover, .nd.sel { border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 14%, transparent), 0 24px 60px -20px rgba(0, 0, 0, .9); }
.nd.off { opacity: .08; filter: blur(2px); }
.nd .k { display: flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.nd .k::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex: none; }
.nd .t { margin-top: 7px; font-family: var(--ff-head); font-weight: 600; font-size: 18px; letter-spacing: -.02em; line-height: 1.2; }
.nd .s { margin-top: 5px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.nd .m { margin-top: 9px; font-family: var(--ff-mono); font-size: 10.5px; color: var(--soft); opacity: .8; }
.nd.mob { --c: var(--mob); } .nd.be { --c: var(--be); } .nd.ai { --c: var(--ai); } .nd.web { --c: var(--web); } .nd.net { --c: var(--net); } .nd.me { --c: #fff; }
.nd.hub { width: 200px; background: rgb(11, 17, 29); border-style: dashed; }
.nd.hub .t { font-size: 16px; }
.nd.sm { width: 190px; }
.nd.sm .t { font-size: 15.5px; }

.nd.core { width: 320px; padding: 22px; border-radius: 22px; text-align: center; border-color: rgba(255, 255, 255, .18); background: radial-gradient(120% 90% at 50% 0%, rgba(0, 208, 216, .12), transparent 60%), rgba(11, 17, 29, .94); }
.nd.core::before { background: linear-gradient(90deg, transparent, var(--mob), var(--ai), transparent); }
.core-ph { position: relative; width: 112px; height: 112px; margin: 0 auto 14px; border-radius: 50%; padding: 3px; background: conic-gradient(from var(--a, 0deg), var(--mob), transparent 35%, var(--ai) 60%, transparent 80%, var(--mob)); animation: spin 8s linear infinite; }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }
.core-ph img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #dfe3e8; border: 4px solid var(--bg); }
.nd.core .t { font-size: 26px; font-weight: 700; letter-spacing: -.035em; }
.nd.core .s { font-size: 13.5px; color: var(--soft); }
.open { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 5px 10px; border-radius: 999px; font-family: var(--ff-mono); font-size: 10.5px; color: var(--web); border: 1px solid rgba(61, 220, 151, .35); background: rgba(61, 220, 151, .07); }
.open i { width: 6px; height: 6px; border-radius: 50%; background: var(--web); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); } }

.log { list-style: none; margin-top: 9px; display: grid; gap: 4px; font-family: var(--ff-mono); font-size: 10.5px; color: var(--soft); }
.log li { display: flex; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log b { color: var(--be); font-weight: 500; flex: none; }
.log span { color: var(--muted); flex: none; }
.dep { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 4px; }
.dep span { font-family: var(--ff-mono); font-size: 10px; padding: 3px 7px; border-radius: 6px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--soft); }

/* hop labels shown while the intro packet travels */
.hop { position: absolute; transform: translate(-50%, -100%); padding: 4px 8px; border-radius: 6px; font-family: var(--ff-mono); font-size: 11px; white-space: nowrap; color: #031014; background: var(--net); opacity: 0; transition: opacity .3s, transform .4s var(--ease); pointer-events: none; }
.hop.on { opacity: 1; transform: translate(-50%, calc(-100% - 8px)); }

/* ── HUD ── */
.hud { position: fixed; z-index: 20; pointer-events: none; }
/* only real controls catch the finger; text and gaps let drags through to the map */
.hud * { pointer-events: none; }
.hud a, .hud button, .hud canvas { pointer-events: auto; }
.hero.min a, .hero.min button { pointer-events: none; }
.top { left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(14px, 3vw, 28px); }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-family: var(--ff-head); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.logo i { font-style: normal; color: var(--mob); }
.brand small { font-family: var(--ff-mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.chips { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 10px; font-family: var(--ff-mono); font-size: 11.5px; color: var(--soft); background: rgba(10, 15, 26, .7); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color .2s, color .2s; }
.chip:hover { border-color: var(--line2); color: var(--text); }
.chip.hire { color: #031014; background: var(--mob); border-color: var(--mob); font-weight: 600; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--web); }

.hero { left: clamp(14px, 3vw, 28px); bottom: clamp(14px, 3vw, 28px); width: min(470px, calc(100vw - 28px)); padding: 20px 22px; border-radius: 20px; background: rgba(8, 12, 21, .82); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.hero.on { opacity: 1; transform: none; }
.hero.min { opacity: 0; transform: translateY(16px); pointer-events: none; }
.hero h1 { font-family: var(--ff-head); font-weight: 700; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.035em; line-height: 1.05; }
.hero p { margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--soft); }
.hero p b { color: var(--text); font-weight: 600; }
.hero .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; font-family: var(--ff-head); font-weight: 600; font-size: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.btn:hover { border-color: var(--line2); transform: translateY(-1px); }
.btn.pri { background: var(--mob); color: #031014; border-color: var(--mob); }
.hero::before { content: ''; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--mob), var(--ai), transparent); opacity: .7; }
.hint { margin-top: 12px; font-family: var(--ff-mono); font-size: 11px; color: var(--muted); }

.tools { right: clamp(14px, 3vw, 28px); bottom: clamp(14px, 3vw, 28px); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.zoom { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: rgba(10, 15, 26, .75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.zoom button { width: 38px; height: 36px; font-family: var(--ff-mono); font-size: 15px; color: var(--soft); }
.zoom button + button { border-top: 1px solid var(--line); }
.zoom button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
#mini { width: 180px; height: 116px; border-radius: 12px; border: 1px solid var(--line); background: rgba(10, 15, 26, .75); }
.jump { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px; border-radius: 12px; font-family: var(--ff-mono); font-size: 12.5px; background: rgba(10, 15, 26, .85); border: 1px solid var(--line2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.jump kbd { font: inherit; font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line2); color: var(--muted); }

/* tour launcher: Jarvis waits in the corner where the tour's orb appears */
@property --la { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.launch { position: relative; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 10px 0 9px; border-radius: 999px; text-align: left;
  background: linear-gradient(rgb(9, 14, 24), rgb(9, 14, 24)) padding-box, conic-gradient(from var(--la), var(--mob), var(--ai), rgba(255, 255, 255, .08) 45%, rgba(255, 255, 255, .08) 75%, var(--mob)) border-box;
  border: 1px solid transparent; box-shadow: 0 14px 44px -16px rgba(0, 208, 216, .55);
  opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .3s; animation: lspin 6s linear infinite; }
body.ready .launch { opacity: 1; transform: none; }
body.ready .launch:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -14px rgba(0, 208, 216, .8); }
@keyframes lspin { to { --la: 360deg; } }
.l-orb { position: relative; flex: none; width: 40px; height: 40px; }
.l-orb img { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 2px #04070d, 0 0 18px 2px rgba(0, 208, 216, .5); }
.l-orb::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--mob); animation: lping 2.6s var(--ease) infinite; }
@keyframes lping { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
.l-txt { display: grid; gap: 2px; }
.l-txt b { font-family: var(--ff-head); font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.l-txt small { font-family: var(--ff-mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.l-go { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; padding-left: 2px; font-size: 11px; color: #031014; background: var(--mob); transition: transform .25s var(--ease); }
.launch:hover .l-go { transform: scale(1.1); }
.l-tip { position: absolute; right: 6px; bottom: calc(100% + 12px); padding: 10px 14px; border-radius: 14px 14px 4px 14px; white-space: nowrap; font-family: var(--ff-head); font-size: 14px; color: var(--text);
  background: rgb(8, 13, 23); border: 1px solid rgba(0, 208, 216, .35); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(8px) scale(.96); transform-origin: bottom right; transition: opacity .35s, transform .45s var(--ease); pointer-events: none; }
.launch.tip .l-tip { opacity: 1; transform: none; }
.launch.tip .l-go { animation: lnudge 1.1s var(--ease) 4; }
@keyframes lnudge { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 208, 216, .6); } 50% { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(0, 208, 216, 0); } }

.skip { position: fixed; z-index: 30; right: clamp(14px, 3vw, 28px); top: 66px; font-family: var(--ff-mono); font-size: 11.5px; color: var(--muted); padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(10, 15, 26, .7); transition: opacity .4s; }
.skip.gone { opacity: 0; pointer-events: none; }
.term { position: fixed; z-index: 25; left: clamp(14px, 3vw, 28px); top: 70px; max-width: calc(100vw - 28px); padding: 10px 14px; border-radius: 12px; background: rgba(4, 7, 13, .82); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-family: var(--ff-mono); font-size: 12.5px; line-height: 1.8; color: var(--soft); pointer-events: none; transition: opacity .6s; }
.term:empty { display: none; }
.term b { color: var(--net); font-weight: 500; }
.term .ok { color: var(--web); }
.term.gone { opacity: 0; }

/* ── detail panel ── */
.panel { position: fixed; z-index: 40; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); display: flex; flex-direction: column; border-radius: 20px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transform: translateX(calc(100% + 24px)); transition: transform .5s var(--ease); user-select: text; -webkit-user-select: text; touch-action: pan-y; --c: var(--mob); }
.panel.on { transform: none; }
.p-head { position: relative; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.p-head::before { content: ''; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px; background: linear-gradient(90deg, var(--c), transparent); }
.p-k { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.p-t { margin-top: 8px; font-family: var(--ff-head); font-weight: 600; font-size: 26px; letter-spacing: -.025em; line-height: 1.15; padding-right: 36px; }
.p-sub { margin-top: 6px; font-size: 14px; color: var(--muted); }
.p-x { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 10px; font-size: 18px; color: var(--muted); }
.p-x:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.p-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; overscroll-behavior: contain; }
.p-body p { font-size: 14.5px; line-height: 1.6; color: var(--soft); }
.p-body p + p { margin-top: 10px; }
.p-body h3 { margin: 22px 0 10px; font-family: var(--ff-mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.p-body h3:first-child { margin-top: 0; }
.p-body ul { list-style: none; display: grid; gap: 9px; }
.p-body li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.5; color: var(--soft); }
.p-body li::before { content: ''; position: absolute; left: 0; top: .62em; width: 8px; height: 2px; border-radius: 2px; background: var(--c); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-family: var(--ff-mono); font-size: 11.5px; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 9%, transparent); border: 1px solid color-mix(in srgb, var(--c) 26%, transparent); color: var(--soft); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.links a, .links button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 11px; font-size: 13.5px; font-weight: 600; border: 1px solid var(--line2); transition: border-color .2s, background .2s; }
.links a:hover, .links button:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.links a.pri { background: var(--c); color: #031014; border-color: var(--c); }
.job + .job { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.job-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.job-h b { font-family: var(--ff-head); font-size: 17px; font-weight: 600; }
.job-h span { font-family: var(--ff-mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.job-r { margin: 2px 0 10px; font-size: 13.5px; color: var(--c); }
.mail { font-family: var(--ff-head); font-weight: 600; font-size: 20px; word-break: break-all; }

/* ── drill-down: child tiles of the focused tile ── */
#world.focusing .nd:not(.focus):not(.kid) { opacity: .16; filter: saturate(.4); }
.nd.focus { z-index: 3; border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 40px -6px color-mix(in srgb, var(--c) 60%, transparent); }
.nd.focus::after { content: ''; position: absolute; inset: -7px; border-radius: inherit; border: 1px solid var(--c); opacity: 0; animation: ring 2.2s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { opacity: .7; inset: -3px; } 100% { opacity: 0; inset: -16px; } }
.nd.kid { z-index: 2; width: 240px; padding: 12px 14px 13px; border-radius: 14px; background: rgb(12, 18, 31); border-color: color-mix(in srgb, var(--c) 30%, transparent); transition: width .35s var(--ease), border-color .25s, box-shadow .25s; will-change: transform, opacity; }
.nd.kid .t { font-size: 15px; }
.nd.kid .s { font-size: 12px; }
.nd.kid .d { display: none; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; color: var(--soft); }
.nd.kid.xp { width: 290px; border-color: var(--c); z-index: 4; }
.nd.kid.xp .d { display: block; animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }
.nd.kid .row { display: flex; gap: 11px; align-items: flex-start; }
.nd.kid .txt { min-width: 0; flex: 1; }
.nd.kid .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; margin-top: 1px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); background: #fff; }
.nd.kid .ic.gh { padding: 7px; background: #0d1117; color: #e6edf3; }
.badge-n { position: absolute; right: 10px; top: 10px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 6px; font-family: var(--ff-mono); font-size: 11px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); }
.nd.kid .txt { padding-right: 26px; }
.nd.kid .s { overflow-wrap: anywhere; }
.nd.kid.t-group { border-style: solid; border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.nd.kid.t-group::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -5px; height: 5px; border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); border-top: 0; border-radius: 0 0 10px 10px; }
.nd.kid.t-link .t, .nd.kid.t-jump .t { color: var(--c); }
.nd.kid.t-link:hover, .nd.kid.t-jump:hover, .nd.kid.t-group:hover { background: color-mix(in srgb, var(--c) 10%, rgb(12, 18, 31)); }
.nd.kid.xp .badge-n.more { transform: rotate(45deg); }
.bars { margin-top: 10px; display: grid; gap: 6px; }
.bars div { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 10.5px; color: var(--soft); }
.bars i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 50%, transparent)); }
.nd.kid.focus { box-shadow: 0 0 0 1px var(--c), 0 0 40px -6px color-mix(in srgb, var(--c) 60%, transparent); }

/* breadcrumb: where you are in the map */
.crumbs { position: fixed; z-index: 21; left: 50%; top: 16px; transform: translate(-50%, -8px); max-width: min(620px, calc(100vw - 420px)); display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: rgba(10, 15, 26, .9); border: 1px solid var(--line); font-family: var(--ff-mono); font-size: 11.5px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.crumbs.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.crumbs button { color: var(--muted); padding: 4px 2px; }
.crumbs button:hover { color: var(--text); }
.crumbs i { font-style: normal; color: var(--line2); }
.crumbs span { color: var(--text); }
@media (max-width: 760px) { .crumbs { top: 56px; left: 10px; right: 10px; transform: translateY(-8px); max-width: none; } .crumbs.on { transform: none; } }
@media (max-width: 760px) { .nd.kid { width: 216px; } .nd.kid.xp { width: 228px; } }

/* language switcher */
.chip.lng { padding: 0 3px; gap: 2px; }
.lng button { height: 26px; padding: 0 7px; border-radius: 7px; font-family: var(--ff-mono); font-size: 11px; color: var(--muted); }
.lng button.on { background: var(--mob); color: #031014; font-weight: 600; }
@media (max-width: 760px) { .chip.lng button { padding: 0 6px; } #tclock { display: none; } .chip .dot { display: none; } .chips > .chip:first-child { display: none; } }

/* ── guided tour: the Jarvis orb on the right, his words in a bubble ── */
.tour { position: fixed; z-index: 35; right: clamp(14px, 3vw, 28px); bottom: clamp(14px, 3vw, 28px); display: flex; align-items: flex-end; gap: 14px; pointer-events: none; opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .5s var(--ease); }
.tour.on { opacity: 1; transform: none; }
.tour.on > * { pointer-events: auto; }
.t-bubble { position: relative; width: min(420px, calc(100vw - 130px)); margin-bottom: 18px; padding: 14px 16px 10px; border-radius: 18px 18px 6px 18px;
  background: linear-gradient(160deg, rgba(0, 208, 216, .10), rgba(123, 108, 246, .06) 60%, transparent), rgb(8, 13, 23);
  border: 1px solid rgba(0, 208, 216, .35); box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 30px -12px rgba(0, 208, 216, .7); overflow: hidden; }
.t-bubble::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--mob), var(--ai), transparent); animation: scan 3s linear infinite; }
@keyframes scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.t-bubble::after { content: ''; position: absolute; right: -7px; bottom: 16px; width: 12px; height: 12px; transform: rotate(45deg); background: rgb(8, 13, 23); border-right: 1px solid rgba(0, 208, 216, .35); border-top: 1px solid rgba(0, 208, 216, .35); }
.tour-text { min-height: 3em; font-family: var(--ff-head); font-size: 16px; line-height: 1.5; color: var(--text); white-space: pre-line; }
.tour.playing .tour-text::after { content: '▍'; margin-left: 2px; color: var(--mob); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.t-nav { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.t-nav button { width: 30px; height: 26px; border-radius: 8px; font-size: 16px; color: var(--soft); border: 1px solid var(--line); transition: border-color .2s, color .2s, background .2s; }
.t-nav button:hover { color: var(--text); border-color: var(--mob); background: rgba(0, 208, 216, .08); }
.tour-step { font-family: var(--ff-mono); font-size: 11px; color: var(--muted); min-width: 44px; text-align: center; }
.tour.paused .tour-step::after { content: ' · ❚❚'; color: var(--be); }
.t-done { display: none; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tour.done .t-done { display: flex; animation: rise .5s var(--ease); }
.tour.done .t-nav { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.t-cta { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 600; border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); transition: border-color .2s, background .2s; }
.t-cta:hover { border-color: var(--mob); background: rgba(0, 208, 216, .08); }
.t-cta.pri { background: var(--web); color: #031014; border-color: var(--web); }

.t-orb { position: relative; flex: none; width: 104px; height: 104px; }
.t-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.t-ring circle { fill: none; stroke-width: 4; stroke-linecap: round; stroke: rgba(255, 255, 255, .12); cursor: pointer; transition: stroke .3s; pointer-events: stroke; }
.t-ring circle.done { stroke: var(--mob); }
.t-ring circle.now { stroke: var(--ai); animation: segpulse 1.2s ease-in-out infinite; }
.t-ring circle:hover { stroke: #fff; }
@keyframes segpulse { 50% { stroke-opacity: .45; } }
.tour.done .t-ring circle { stroke: var(--web); }
.t-core { position: absolute; inset: 14px; border-radius: 50%; display: grid; place-items: center; transition: transform .25s var(--ease); --lvl: 0; }
.t-core img { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 2px #04070d, 0 0 calc(18px + var(--lvl) * 40px) calc(3px + var(--lvl) * 12px) rgba(0, 208, 216, calc(.45 + var(--lvl) * .4)); transform: scale(calc(1 + var(--lvl) * .08)); transition: box-shadow .08s, transform .08s; }
.tour.playing:not(.voiced) .t-core img { animation: breathe2 1.8s ease-in-out infinite; }
@keyframes breathe2 { 50% { box-shadow: 0 0 0 2px #04070d, 0 0 30px 8px rgba(0, 208, 216, .6); } }
.t-core:hover { transform: scale(1.05); }
.t-ico { position: absolute; inset: 0; display: none; place-items: center; border-radius: 50%; font-size: 20px; color: #fff; background: rgba(4, 7, 13, .55); }
.tour.paused .i-play, .tour.done .i-ok { display: grid; }
.tour.done .i-ok { background: rgba(61, 220, 151, .78); color: #031014; font-size: 30px; font-weight: 700; }
.t-core:hover .i-pause { display: grid; }
.tour.paused .t-core:hover .i-pause, .tour.done .t-core:hover .i-pause { display: none; }
.t-sat { position: absolute; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: rgb(12, 18, 31); border: 1px solid var(--line2); color: var(--soft); transition: border-color .2s, color .2s, transform .2s var(--ease); }
.t-sat:hover { border-color: var(--mob); color: var(--text); transform: scale(1.1); }
.sat-voice { left: -6px; top: -6px; }
.sat-x { right: -6px; top: -6px; }
.t-sat.on { border-color: var(--mob); background: rgba(0, 208, 216, .18); }
body.touring .tools { opacity: 0; pointer-events: none; }

/* ending: "200 OK" */
.stamp { position: fixed; z-index: 45; left: 50%; top: 22%; transform: translate(-50%, -50%) scale(.6) rotate(-8deg); opacity: 0; pointer-events: none; display: grid; justify-items: center; gap: 4px; padding: 16px 26px; border-radius: 18px; border: 2px solid var(--web); color: var(--web); background: rgba(4, 7, 13, .85); box-shadow: 0 0 60px -10px rgba(61, 220, 151, .8); }
.stamp b { font-family: var(--ff-mono); font-size: clamp(26px, 4vw, 40px); letter-spacing: .04em; }
.stamp span { font-family: var(--ff-head); font-size: 15px; color: var(--text); }
.stamp.on { animation: stamp 2.8s var(--ease) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.8) rotate(-8deg); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(.95) rotate(-4deg); } 18% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1) rotate(-4deg); } }
.shock { position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 3px solid var(--web); pointer-events: none; animation: shock 1.4s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes shock { from { transform: scale(.3); opacity: 1; } to { transform: scale(18); opacity: 0; } }
.confetti { position: fixed; z-index: 44; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; }
.nd.win { border-color: var(--web) !important; box-shadow: 0 0 0 1px var(--web), 0 0 60px -4px rgba(61, 220, 151, .7) !important; }
@media (max-width: 760px) {
  .tour { left: 10px; right: 10px; bottom: 10px; gap: 8px; }
  .t-bubble { flex: 1; width: auto; margin-bottom: 12px; padding: 12px 13px 8px; }
  .tour-text { font-size: 14px; min-height: 4.4em; }
  .t-orb { width: 84px; height: 84px; }
  .t-core { inset: 11px; }
}

/* ── command palette ── */
.pal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: start center; padding: 14vh 14px 14px; background: rgba(2, 4, 8, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.pal.on { opacity: 1; visibility: visible; }
.pal-box { width: min(520px, 100%); border-radius: 18px; overflow: hidden; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); }
.pal-q { width: 100%; height: 54px; padding: 0 18px; font: inherit; font-family: var(--ff-mono); font-size: 14px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); outline: none; }
.pal-list { list-style: none; max-height: 52vh; overflow-y: auto; padding: 6px; }
.pal-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; text-align: left; font-size: 14.5px; }
.pal-list button.sel, .pal-list button:hover { background: rgba(255, 255, 255, .06); }
.pal-list i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pal-list small { margin-left: auto; font-family: var(--ff-mono); font-size: 11px; color: var(--muted); }

@media (max-width: 760px) {
  .brand small, .zoom, #mini, .chip.cls { display: none; }
  .top { padding: 12px 14px; }
  .chip { height: 32px; padding: 0 10px; font-size: 11px; }
  .hero { left: 10px; right: 10px; bottom: 78px; width: auto; padding: 14px 16px; border-radius: 18px; }
  .hero h1 { font-size: 23px; }
  .hero p { margin-top: 6px; font-size: 13px; line-height: 1.5; }
  .hero .row { margin-top: 12px; flex-wrap: nowrap; }
  .hero .btn { height: 36px; padding: 0 14px; font-size: 13px; }
  .hero .hint { display: none; }
  .tools { left: 10px; right: 10px; bottom: 12px; flex-direction: row; align-items: center; }
  .jump { flex: 1; justify-content: center; height: 54px; border-radius: 999px; }
  .launch { height: 54px; }
  .l-txt small { display: none; }
  .l-tip { display: none; }
  .jump kbd { display: none; }
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82svh; border-radius: 22px 22px 0 0; transform: translateY(105%); padding-bottom: env(safe-area-inset-bottom); }
  .p-t { font-size: 23px; }
  .term { top: 58px; left: 10px; right: 10px; font-size: 11px; }
  .skip { top: auto; bottom: 70px; right: 10px; }
}
/* phones: no live blur behind HUD over a moving canvas, lighter card shadows */
@media (max-width: 760px), (pointer: coarse) {
  .chip, .hero, .zoom, .jump, .skip, .term, .panel, .pal { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .chip, .jump, .skip { background: rgba(10, 15, 26, .94); }
  .hero, .term { background: rgba(8, 12, 21, .96); }
  .panel, .pal-box { background: rgb(10, 15, 26); }
  .pal { background: rgba(2, 4, 8, .75); }
  .nd { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
