:root {
  --bg: #04060d;
  --bg2: #070b18;
  --ink: #e8f1ff;
  --ink2: #a9b8d4;
  --ink3: #6b7a99;
  --line: rgba(160, 200, 255, .10);
  --line2: rgba(160, 200, 255, .18);
  --glass: rgba(14, 22, 44, .52);
  --glass2: rgba(20, 32, 64, .55);
  --ice: #7dd3fc;
  --frost: #a5f3fc;
  --violet: #a78bfa;
  --rose: #f0abfc;
  --mint: #6ee7b7;
  --amber: #fcd34d;
  --red: #fb7185;
  --r: 18px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --glow: 0 0 0 1px rgba(125, 211, 252, .25), 0 0 40px -6px rgba(125, 211, 252, .45);
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
svg { display: block; }

/* atmosphere */
#snow { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(80px) saturate(1.2); opacity: .55; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 28s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 55vw; height: 40vw; left: 5%; top: -5%; background: radial-gradient(circle, #1e6fff 0%, transparent 65%); }
.aurora i:nth-child(2) { width: 50vw; height: 45vw; right: 0; top: 5%; background: radial-gradient(circle, #7c3aed 0%, transparent 65%); animation-duration: 34s; animation-delay: -8s; }
.aurora i:nth-child(3) { width: 45vw; height: 35vw; left: 30%; bottom: 0; background: radial-gradient(circle, #0891b2 0%, transparent 65%); animation-duration: 40s; animation-delay: -16s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 4vh) scale(1.15); } 100% { transform: translate(-5vw, -3vh) scale(.95); } }
.grid-floor { position: fixed; left: -50%; right: -50%; bottom: -10%; height: 55vh; z-index: 0; pointer-events: none; opacity: .22;
  background-image: linear-gradient(rgba(125, 211, 252, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 211, 252, .5) 1px, transparent 1px);
  background-size: 64px 64px; transform: perspective(600px) rotateX(62deg); transform-origin: bottom;
  mask-image: linear-gradient(to top, black 0%, transparent 85%); -webkit-mask-image: linear-gradient(to top, black 0%, transparent 85%);
  animation: floor 6s linear infinite; }
@keyframes floor { to { background-position: 0 64px, 0 0; } }

.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: var(--shadow); position: relative; }
.glass::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(165, 243, 252, .35), transparent 30%, transparent 70%, rgba(167, 139, 250, .3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* login */
.login { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); padding: 40px 32px; text-align: center; }
.login-card h1 { font-family: var(--display); font-size: 28px; margin: 14px 0 4px; letter-spacing: -.02em; }
.login-card p { color: var(--ink3); margin: 0 0 24px; }
.login-card input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .35); color: var(--ink); font: inherit; margin-bottom: 12px; outline: none; }
.login-card input:focus { border-color: var(--ice); box-shadow: var(--glow); }
.login-card .btn { width: 100%; }
.err { color: var(--red); min-height: 20px; margin-top: 10px; font-size: 14px; }
.flake-logo svg, .brand svg { width: 52px; height: 52px; margin: 0 auto; fill: none; stroke: url(#none); stroke: var(--ice); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 12px rgba(125, 211, 252, .8)); animation: spin 30s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* buttons */
.btn { border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); padding: 11px 18px; border-radius: 12px; cursor: pointer; font-weight: 600; transition: .2s; }
.btn:hover { border-color: var(--ice); box-shadow: var(--glow); }
.btn.primary { background: linear-gradient(120deg, #38bdf8, #818cf8 60%, #c084fc); border: 0; color: #050816; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(251, 113, 133, .5); color: var(--red); }

/* layout */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 236px 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.rail { grid-row: 1 / span 2; margin: 16px 0 16px 16px; padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 16px; height: calc(100vh - 32px); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 26px; }
.brand svg { width: 30px; height: 30px; margin: 0; stroke-width: 5; }
.brand span { font-family: var(--display); font-weight: 700; letter-spacing: .28em; font-size: 14px; background: linear-gradient(90deg, var(--frost), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rail a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--ink2); font-weight: 600; font-size: 15px; transition: .2s; position: relative; }
.rail a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.rail a:hover { color: var(--ink); background: rgba(125, 211, 252, .06); }
.rail a.on { color: #fff; background: linear-gradient(90deg, rgba(56, 189, 248, .18), rgba(167, 139, 250, .08)); box-shadow: inset 0 0 0 1px rgba(125, 211, 252, .25); }
.rail a.on::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--ice); box-shadow: 0 0 14px var(--ice); }
.rail-foot { margin-top: auto; }
.rail-foot .btn { width: 100%; }

.topbar { display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 16px 24px 0; flex-wrap: wrap; }
.goal-chip { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-radius: 999px; }
.goal-bar { width: 140px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.goal-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ice), var(--violet), var(--rose)); box-shadow: 0 0 12px var(--ice); transition: width 1s; }
.goal-text b { font-family: var(--display); font-size: 17px; } .goal-text span { color: var(--ink3); font-size: 13px; }
.clock { color: var(--frost); font-size: 13px; letter-spacing: .06em; }
.live-chip { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: 13px; color: var(--ink2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(110, 231, 183, .7); animation: pulse 1.8s infinite; }
.dot.off { background: var(--red); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(110, 231, 183, 0); } 100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0); } }

main { padding: 20px 24px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 22px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-size: clamp(30px, 4vw, 46px); margin: 0; letter-spacing: -.03em; line-height: 1;
  background: linear-gradient(100deg, #fff 20%, var(--frost) 50%, var(--violet) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { margin: 8px 0 0; color: var(--ink3); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ice); margin-bottom: 10px; }

.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3.w211 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.g2.w21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g2.w131 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.card { padding: 20px; }
.card h3 { margin: 0 0 14px; font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--ink2); letter-spacing: .02em; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* storefront */
.hero { display: grid; grid-template-columns: 340px 1fr; gap: 16px; margin-bottom: 16px; }
.ring-card { padding: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.ring { position: relative; width: 230px; height: 230px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: rgba(255, 255, 255, .07); }
.ring .val { stroke: url(#ringGrad); stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(125, 211, 252, .8)); transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); }
.ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .center b { font-family: var(--display); font-size: 40px; letter-spacing: -.03em; }
.ring .center span { color: var(--ink3); font-size: 13px; }
.ring-card .clock-big { font-family: var(--mono); font-size: 22px; color: var(--frost); margin-top: 18px; letter-spacing: .08em; text-shadow: 0 0 18px rgba(125, 211, 252, .6); }
.ring-card .sub { color: var(--ink3); font-size: 12px; margin-top: 4px; letter-spacing: .14em; text-transform: uppercase; }
.kpi { padding: 18px 20px; overflow: hidden; }
.kpi .label { color: var(--ink3); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.kpi .value { font-family: var(--display); font-size: 32px; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; }
.kpi .hint { color: var(--ink3); font-size: 12.5px; margin-top: 4px; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--c, rgba(125, 211, 252, .25)), transparent 70%); }

.chart { width: 100%; height: 220px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel .row { display: grid; grid-template-columns: 96px 1fr 38px; align-items: center; gap: 12px; font-size: 13px; color: var(--ink2); }
.funnel .bar { height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.funnel .bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--ice), var(--violet)); }
.funnel .n { text-align: right; font-family: var(--mono); color: var(--ink); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--ink3); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-family: var(--mono); }
.scroll-x { overflow-x: auto; }

/* products */
.tabs { display: inline-flex; padding: 4px; border-radius: 14px; gap: 4px; }
.tabs button { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; cursor: pointer; color: var(--ink2); font-weight: 600; font-size: 14px; }
.tabs button.on { background: rgba(125, 211, 252, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(125, 211, 252, .3); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.pcard { cursor: pointer; perspective: 900px; }
.pcard .cover { aspect-ratio: 5 / 8; border-radius: 10px 14px 14px 10px; overflow: hidden; position: relative; background: linear-gradient(160deg, #1e293b, #0f172a);
  box-shadow: -6px 0 0 -2px rgba(255, 255, 255, .08) inset, 0 24px 50px -18px rgba(0, 0, 0, .9), 0 0 0 1px var(--line); transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s; transform-style: preserve-3d; }
.pcard:hover .cover { transform: rotateY(-14deg) rotateX(4deg) translateY(-6px); box-shadow: 0 40px 70px -20px rgba(0, 0, 0, .9), var(--glow); }
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .18) 50%, transparent 60%); transform: translateX(-100%); transition: transform .9s; }
.pcard:hover .cover::after { transform: translateX(100%); }
.pcard .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink2); }
.pcard .meta { padding: 12px 2px 0; }
.pcard .t { font-weight: 700; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--ink3); gap: 8px; }
.price { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 16px; }
.price s { color: var(--ink3); font-weight: 500; font-size: 13px; margin-left: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(125, 211, 252, .12); color: var(--frost); border: 1px solid rgba(125, 211, 252, .25); white-space: nowrap; }
.tag.violet { background: rgba(167, 139, 250, .12); color: #ddd6fe; border-color: rgba(167, 139, 250, .3); }
.tag.mint { background: rgba(110, 231, 183, .12); color: #a7f3d0; border-color: rgba(110, 231, 183, .3); }
.tag.amber { background: rgba(252, 211, 77, .12); color: #fde68a; border-color: rgba(252, 211, 77, .3); }
.tag.red { background: rgba(251, 113, 133, .12); color: #fecdd3; border-color: rgba(251, 113, 133, .3); }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }

.pipe-item { padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; cursor: pointer; transition: .2s; }
.pipe-item:hover { border-color: rgba(125, 211, 252, .35); }
.pipe-item .t { font-weight: 700; }
.pipe-item .s { color: var(--ink3); font-size: 13px; margin-top: 3px; }
.progress { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; position: relative; }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.progress i.a { background: rgba(125, 211, 252, .35); }
.progress i.b { background: linear-gradient(90deg, var(--ice), var(--violet)); box-shadow: 0 0 10px rgba(125, 211, 252, .6); }

/* winterfall */
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.team-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.team-head h2 { font-family: var(--display); margin: 0; font-size: 22px; letter-spacing: -.01em; }
.chain { display: flex; flex-direction: column; gap: 12px; position: relative; }
.chain::before { content: ''; position: absolute; left: 31px; top: 30px; bottom: 30px; width: 2px; background: linear-gradient(var(--ice), var(--violet)); opacity: .25; }
.agent { padding: 16px 18px 16px 70px; position: relative; min-height: 86px; transition: border-color .3s, box-shadow .3s; }
.agent .idx { position: absolute; left: 14px; top: 16px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; font-weight: 500; background: rgba(125, 211, 252, .08); border: 1px solid var(--line2); color: var(--frost); }
.agent.working { border-color: rgba(125, 211, 252, .4); box-shadow: var(--shadow), 0 0 40px -12px rgba(125, 211, 252, .55); }
.agent.working .idx { background: linear-gradient(135deg, #38bdf8, #a78bfa); color: #050816; border: 0; box-shadow: 0 0 20px rgba(125, 211, 252, .7); }
.agent.working .idx::after { content: ''; position: absolute; inset: -5px; border-radius: 15px; border: 1px solid rgba(125, 211, 252, .6); animation: ping 1.6s infinite; }
@keyframes ping { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }
.agent .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.agent .role { font-weight: 700; font-size: 15px; }
.agent .code { font-family: var(--mono); font-size: 11px; color: var(--ink3); letter-spacing: .1em; text-transform: uppercase; }
.agent .task { color: var(--ink2); font-size: 13.5px; margin-top: 6px; line-height: 1.45; }
.agent .stream { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; line-height: 1.55; color: #9fd8f5; max-height: 0; overflow: hidden; white-space: pre-wrap; word-break: break-word; transition: max-height .4s;
  mask-image: linear-gradient(to bottom, transparent, black 40%); -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%); }
.agent.working .stream.has { max-height: 110px; }
.caret { display: inline-block; width: 7px; height: 13px; background: var(--ice); vertical-align: -2px; animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.status { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.status.working { color: #050816; background: var(--ice); box-shadow: 0 0 14px rgba(125, 211, 252, .7); }
.status.idle { color: var(--ink3); background: rgba(255, 255, 255, .05); }
.status.waiting { color: #fde68a; background: rgba(252, 211, 77, .14); }

.kanban { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.kcol { min-height: 70px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .025); border: 1px dashed var(--line); }
.kcol h4 { margin: 0 0 8px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); font-weight: 700; display: flex; justify-content: space-between; }
.kitem { font-size: 12px; padding: 8px 9px; border-radius: 10px; background: var(--glass2); border: 1px solid var(--line); margin-bottom: 6px; line-height: 1.35; cursor: pointer; }
.kitem:hover { border-color: rgba(125, 211, 252, .4); }
.kitem .mini { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin-top: 6px; overflow: hidden; }
.kitem .mini i { display: block; height: 100%; background: var(--ice); }

.feed { display: flex; flex-direction: column; gap: 2px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.feed::-webkit-scrollbar { width: 6px; } .feed::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 6px; }
.ev { display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; animation: enter .5s cubic-bezier(.2, .8, .2, 1); }
.ev .ts { font-family: var(--mono); font-size: 11.5px; color: var(--ink3); padding-top: 2px; }
.ev .who { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ice); margin-right: 6px; }
.ev.error .who, .ev.blocked .who { color: var(--red); }
.ev.approved .who, .ev.listed .who { color: var(--mint); }
.ev.thought .who { color: var(--violet); }
@keyframes enter { from { opacity: 0; transform: translateY(-8px); background: rgba(125, 211, 252, .08); } to { opacity: 1; transform: none; background: transparent; } }

/* snowflakes */
.boss-hero { display: grid; grid-template-columns: 380px 1fr; gap: 16px; margin-bottom: 16px; }
.core-card { padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; }
.core { width: 220px; height: 220px; position: relative; margin: 6px 0 20px; }
.core .orb { position: absolute; inset: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #a5f3fc 12%, #38bdf8 32%, #6d28d9 70%, #1e1b4b 100%);
  box-shadow: 0 0 60px rgba(125, 211, 252, .7), 0 0 120px rgba(167, 139, 250, .5), inset -14px -18px 40px rgba(0, 0, 0, .5); animation: breathe 4s ease-in-out infinite; }
.core.working .orb { animation-duration: 1.6s; }
.core .ringa, .core .ringb, .core .ringc { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(125, 211, 252, .35); }
.core .ringa { animation: spin 9s linear infinite; border-top-color: var(--ice); border-right-color: transparent; }
.core .ringb { inset: 16px; animation: spin 6s linear infinite reverse; border-color: rgba(167, 139, 250, .35); border-bottom-color: var(--violet); border-left-color: transparent; }
.core .ringc { inset: -12px; border-style: dashed; border-color: rgba(165, 243, 252, .15); animation: spin 40s linear infinite; }
@keyframes breathe { 50% { transform: scale(1.07); filter: brightness(1.2); } }
.core-card h2 { font-family: var(--display); margin: 0; font-size: 26px; letter-spacing: -.02em; }
.core-card .doing { color: var(--ink2); font-size: 14px; margin-top: 8px; min-height: 40px; line-height: 1.45; }
.mind { padding: 22px; display: flex; flex-direction: column; }
.mind .stream { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #c4b5fd; white-space: pre-wrap; word-break: break-word; flex: 1; min-height: 140px; max-height: 260px; overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, black 30%); -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%); display: flex; flex-direction: column; justify-content: flex-end; }
.thought { padding: 16px 18px; border-radius: 14px; background: linear-gradient(135deg, rgba(167, 139, 250, .10), rgba(56, 189, 248, .05)); border: 1px solid rgba(167, 139, 250, .2); margin-bottom: 10px; font-size: 14.5px; line-height: 1.6; color: #e9e5ff; animation: enter .6s; }
.thought .ts { font-family: var(--mono); font-size: 11px; color: var(--ink3); margin-bottom: 6px; letter-spacing: .08em; }
.directive { display: flex; gap: 10px; margin-top: 14px; }
.directive input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .3); color: var(--ink); font: inherit; outline: none; }
.directive input:focus { border-color: var(--violet); box-shadow: 0 0 0 1px rgba(167, 139, 250, .3), 0 0 30px -6px rgba(167, 139, 250, .6); }
.list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.li { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; }
.li .ts { font-family: var(--mono); font-size: 11px; color: var(--ink3); }
.empty { color: var(--ink3); font-size: 14px; padding: 18px 4px; text-align: center; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-bg { position: absolute; inset: 0; background: rgba(2, 4, 10, .6); backdrop-filter: blur(6px); animation: fade .3s; }
.drawer-panel { position: absolute; right: 16px; top: 16px; bottom: 16px; width: min(760px, calc(100% - 32px)); overflow-y: auto; padding: 28px; animation: slide .45s cubic-bezier(.2, .8, .2, 1); background: rgba(8, 13, 28, .92); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.drawer .close { position: absolute; right: 18px; top: 18px; }
.dgrid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.dcover { width: 100%; border-radius: 10px; box-shadow: 0 30px 60px -20px #000, 0 0 0 1px var(--line); }
.drawer h2 { font-family: var(--display); font-size: 28px; margin: 0 0 6px; letter-spacing: -.02em; line-height: 1.1; }
.drawer .subt { color: var(--ink2); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.desc { color: var(--ink2); font-size: 14.5px; line-height: 1.7; }
.desc h1, .desc h2, .desc h3 { font-family: var(--display); color: var(--ink); font-size: 17px; margin: 18px 0 6px; }
.toc-list { columns: 2; column-gap: 20px; font-size: 13px; color: var(--ink2); padding-left: 18px; }
.toc-list li { margin-bottom: 4px; break-inside: avoid; }
.sec-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.sec-dots i { width: 12px; height: 12px; border-radius: 3px; background: rgba(255, 255, 255, .08); cursor: pointer; }
.sec-dots i.drafted { background: rgba(125, 211, 252, .45); }
.sec-dots i.edited { background: linear-gradient(135deg, var(--ice), var(--violet)); box-shadow: 0 0 6px rgba(125, 211, 252, .6); }
.reader { margin-top: 12px; padding: 16px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--ink2); white-space: pre-wrap; max-height: 360px; overflow-y: auto; }

/* responsive */
@media (max-width: 1200px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teams, .boss-hero, .hero { grid-template-columns: minmax(0, 1fr); }
  .g3.w211 { grid-template-columns: 1fr 1fr; } .g3.w211 > :first-child { grid-column: 1 / -1; }
  .kanban { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; padding-bottom: 84px; }
  .rail { position: fixed; z-index: 5; left: 12px; right: 12px; bottom: 12px; top: auto; height: auto; margin: 0; padding: 8px; flex-direction: row; justify-content: space-around; border-radius: 20px; }
  .rail .brand, .rail-foot { display: none; }
  .rail a { flex-direction: column; gap: 4px; padding: 8px 6px; font-size: 11px; flex: 1; text-align: center; }
  .rail a.on::before { display: none; }
  .topbar { padding: 12px 16px 0; justify-content: space-between; }
  .goal-bar { width: 70px; }
  main { padding: 16px 16px 40px; }
  .g3, .g2, .g3.w211, .g2.w21, .g2.w131 { grid-template-columns: minmax(0, 1fr); }
  .kanban { grid-template-columns: repeat(5, 140px); }
  .team-head { flex-wrap: wrap; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgrid { grid-template-columns: 1fr; }
  .dcover { max-width: 220px; }
  .toc-list { columns: 1; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .kpi .value { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.teams > *, .boss-hero > *, .hero > *, .grid > * { min-width: 0; }
.kanban { overflow-x: auto; }
.mind .stream, .thought, .li, .ev { overflow-wrap: anywhere; }
