/* ── kimiK3dev — observation HUD + lore ───────────────────────────────────── */

:root {
  --bg:      #060606;
  --bg2:     #0d0d0d;
  --bg3:     #161616;
  --fg:      #e8e8e8;
  --dim:     #8f8f8f;
  --faint:   #4a4a4a;
  --accent:  #cfcfcf;
  --accent2: #ffffff;
  --cyan:    #ffffff;
  --red:     #808080;
  --line:    rgba(255,255,255,.20);
  --line2:   rgba(255,255,255,.08);
  --glow:    rgba(255,255,255,.65);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--mono); font-size: 14px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }
.dim { color: var(--dim); }
b { color: var(--fg); }
em { color: var(--accent2); font-style: normal; }

/* ambience */
.fx-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 45% 40% at 16% 35%, rgba(255,255,255,.14), transparent 65%),
    radial-gradient(ellipse 70% 50% at 70% 0%, rgba(255,255,255,.07), transparent 70%);
}

/* ── HUD ── */
.hud { position: relative; z-index: 1; height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 16px; padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.06), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-eye { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 18px rgba(255,255,255,.55); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 700; letter-spacing: 5px; font-size: 16px; text-shadow: 0 0 14px var(--glow); }
.brand-sub { font-size: 10.5px; color: var(--dim); letter-spacing: 1.2px; }
/* audiogram — pulses with each verdict's score; flares up when a coin is picked */
.audiogram { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 30px; margin-left: 28px; }
.ag-bar {
  width: 3px; min-height: 2px; border-radius: 2px; background: var(--accent); opacity: .5;
  transition: height .22s ease, background .3s ease, box-shadow .3s ease, opacity .3s ease;
  animation: ag-idle 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 90ms);
}
.audiogram.pulse .ag-bar { opacity: 1; animation: none; }
.audiogram.hit .ag-bar { background: var(--cyan); box-shadow: 0 0 8px rgba(255,255,255,.65); }
@keyframes ag-idle { 0%, 100% { height: 8%; } 50% { height: 18%; } }
.ag-label {
  position: absolute; left: 0; top: 100%; margin-top: 6px; white-space: nowrap;
  font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--cyan);
  text-shadow: 0 0 10px rgba(255,255,255,.5); opacity: 0; transition: opacity .3s ease;
}
.ag-label.show { opacity: 1; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 11px; letter-spacing: 1.4px; }
.topbar-counter { color: var(--dim); text-transform: uppercase; letter-spacing: 1.2px; }
.topbar-right a { color: var(--dim); cursor: pointer; }
.topbar-right a:hover { color: var(--accent); }
.topbar-right a#chip-voice.on { color: var(--cyan); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2.2s infinite; }
.dot.off { background: var(--faint); box-shadow: none; animation: none; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* grid */
.grid { flex: 1; display: grid; grid-template-columns: 288px 1fr 310px 300px; min-height: 0; }
.rail {
  border-right: 1px solid var(--line); padding: 18px 15px;
  display: flex; flex-direction: column; gap: 15px; overflow-y: auto;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent);
  scrollbar-width: none;
}
.rail.right { border-right: 0; border-left: 1px solid var(--line); }
.rail::-webkit-scrollbar { display: none; }

/* eye */
.eye { position: relative; display: grid; place-items: center; padding: 4px 0 8px; }
.eye img, .eye video { width: 100%; height: auto; display: block; border-radius: 0; border: 1px solid var(--line); box-shadow: 0 0 40px rgba(255,255,255,.45); }

/* panels */
.panel { border: 1px solid var(--line); background: var(--bg2); padding: 12px 13px; }
.panel.grow { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.panel-h {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px; text-shadow: 0 0 10px var(--glow); display: flex; justify-content: space-between;
}
.ph-note { color: var(--faint); letter-spacing: 1px; }

/* gauges */
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; }
.gauge-solo { max-width: 150px; margin: 4px auto 0; }
.gauge-solo .gv { font-size: 20px; }
.gauge-solo .gl { font-size: 9px; }
.gauge { min-width: 0; }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge .arc-bg { stroke: rgba(255,255,255,.14); }
.gauge .arc-fg { stroke: var(--accent); filter: drop-shadow(0 0 5px var(--glow)); transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); }
.gauge .gv { font-size: 13px; font-weight: 700; fill: var(--cyan); }
.gauge .gl { font-size: 7.5px; letter-spacing: .8px; fill: var(--dim); text-transform: uppercase; }
.rank-name {
  text-align: center; font-size: 11px; letter-spacing: 1.4px; color: var(--cyan);
  margin: 10px 0 14px; padding-top: 10px; border-top: 1px solid var(--line2);
  text-shadow: 0 0 10px rgba(255,255,255,.3); word-break: break-word;
}
.tel { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; padding: 3px 0; }
.tel span { color: var(--dim); }
.tel b { font-weight: 700; }
.tel b.up { color: var(--cyan); }
.tel b.down { color: var(--red); }
.ca-box { font-size: 10.5px; color: var(--cyan); word-break: break-all; line-height: 1.5; }
.cta {
  display: block; margin-top: 10px; text-align: center; font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; border: 1px solid var(--line); padding: 7px; color: var(--accent);
}
.cta:hover { box-shadow: 0 0 18px rgba(255,255,255,.28); color: var(--accent2); }
.rail-foot { margin-top: auto; font-size: 10.5px; color: var(--faint); }

/* ai scoring */
.scoring { display: flex; flex-direction: column; gap: 10px; max-height: 220px; overflow-y: auto; scrollbar-width: none; }
.scoring::-webkit-scrollbar { display: none; }
.sc-row { display: flex; flex-direction: column; gap: 4px; }
.sc-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; gap: 8px; }
.sc-name { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-name.warm { color: var(--accent); }
.sc-name.hit { color: var(--cyan); font-weight: 700; text-shadow: 0 0 10px rgba(255,255,255,.4); }
.sc-pct { font-weight: 700; color: var(--faint); flex: none; }
.sc-pct.warm { color: var(--accent); }
.sc-pct.hit { color: var(--cyan); }
.sc-bar-wrap { height: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.sc-bar { height: 100%; background: var(--faint); transition: width .5s ease; }
.sc-bar.warm { background: var(--accent); box-shadow: 0 0 8px var(--glow); }
.sc-bar.hit { background: var(--cyan); box-shadow: 0 0 10px rgba(255,255,255,.6); }

/* stream */
.stream { display: flex; flex-direction: column; min-height: 0; }
.stream-h {
  display: flex; justify-content: space-between; padding: 9px 20px;
  border-bottom: 1px solid var(--line2); font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
}
.sh-l { color: var(--accent); text-shadow: 0 0 10px var(--glow); }
.sh-r { color: var(--faint); }
.term-out { flex: 1; overflow-y: auto; padding: 18px 20px 26px; scrollbar-width: none; }
.term-out::-webkit-scrollbar { display: none; }
.ln { white-space: pre-wrap; word-break: break-word; animation: fadein .3s ease both; }
@keyframes fadein { from{opacity:0; transform:translateY(3px)} to{opacity:1; transform:none} }
.ln + .ln { margin-top: 2px; }
.ln.gap { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line2); }
.obs-avatar { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; vertical-align: -3px; margin-right: 3px; background: var(--bg3); }
.ac { color: var(--accent); }
.gold, .hl { color: var(--cyan); }
.err { color: var(--red); }
.t { color: var(--faint); }
.ln a { text-decoration: underline; text-underline-offset: 3px; }
.says { color: var(--fg); }
.says .tag { color: var(--accent); font-weight: 700; letter-spacing: 1.4px; text-shadow: 0 0 12px var(--glow); }
.obs { color: var(--cyan); font-weight: 700; letter-spacing: .8px; }
.banner { color: var(--accent); font-weight: 700; letter-spacing: 8px; font-size: 22px; text-shadow: 0 0 16px var(--glow); }

/* creations (right rail) */
.creations { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; }
.creations::-webkit-scrollbar { display: none; }
.cr {
  display: flex; gap: 10px; align-items: center; padding: 8px;
  border: 1px solid var(--line2); background: rgba(255,255,255,.03);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cr:hover { border-color: var(--line); box-shadow: 0 0 18px rgba(255,255,255,.16); transform: translateX(-2px); }
.cr img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; flex: none; background: var(--bg3); }
.cr-b { min-width: 0; flex: 1; }
.cr-t { color: var(--cyan); font-weight: 700; font-size: 12.5px; }
.cr-n { color: var(--fg); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-m { font-size: 10px; color: var(--faint); display: flex; justify-content: space-between; gap: 6px; }
.cr-m .win { color: var(--cyan); }
.cr-m .loss { color: var(--red); }
.cr-empty { color: var(--faint); font-size: 12px; padding: 14px 4px; }

/* deep analysis (far right rail) — machine-log style, same voice as the main stream */
.deep-out { overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: none; font-size: 11.5px; }
.deep-out::-webkit-scrollbar { display: none; }
.dp-row { padding: 9px 0; border-top: 1px solid var(--line2); }
.dp-row:first-child { border-top: 0; }
.dp-head { display: flex; justify-content: space-between; gap: 6px; color: var(--dim); font-size: 10px; }
.dp-metric { color: var(--accent); letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; text-shadow: 0 0 8px var(--glow); }
.dp-who { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-verdict { margin-top: 4px; color: var(--fg); line-height: 1.5; }

/* scroll hint */
.scroll-hint {
  text-align: center; padding: 9px; font-size: 10.5px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--dim); border-top: 1px solid var(--line2); animation: bob 2.6s ease-in-out infinite;
}
.scroll-hint:hover { color: var(--accent); }
@keyframes bob { 0%,100%{opacity:.55} 50%{opacity:1} }

/* ── LORE ── */
.lore { position: relative; z-index: 1; padding: 110px 28px 90px; border-top: 1px solid var(--line2); }
.lore-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 44px; }
.lore-div { display: grid; place-items: center; }
.lore-div span { width: 1px; height: 100%; background: linear-gradient(180deg, transparent, var(--line), transparent); }
.sec-k { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; text-shadow: 0 0 10px var(--glow); }
.sec-k.center { text-align: center; }
.lore h2 { font-size: 19px; letter-spacing: 2px; margin: 0 0 20px; color: var(--fg); text-shadow: 0 0 18px rgba(255,255,255,.3); }
.lore p { margin: 0 0 14px; color: #b8b8b8; }
.lore .chain { display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--line); padding-left: 14px; color: var(--fg); }
.lore .kicker { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line2); color: var(--dim); }
.lore .kicker b { color: var(--cyan); text-shadow: 0 0 12px rgba(255,255,255,.35); }

/* ── WORKS ── */
.works { position: relative; z-index: 1; padding: 20px 28px 100px; max-width: 1120px; margin: 0 auto; }
.works-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { border: 1px solid var(--line); background: var(--bg2); padding: 18px 16px; }
.card .n { font-size: 10px; color: var(--faint); letter-spacing: 2px; }
.card h3 { margin: 8px 0 8px; font-size: 13px; letter-spacing: 2.5px; color: var(--accent); text-shadow: 0 0 12px var(--glow); }
.card p { margin: 0; font-size: 12.5px; color: #b0b0b0; }
.phases { list-style: none; margin: 0; padding: 0; max-width: 720px; margin-inline: auto; }
.phases li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line2); font-size: 13px; color: #b8b8b8; }
.phases i { width: 9px; height: 9px; flex: none; border: 1px solid var(--faint); border-radius: 50%; }
.phases i.ok { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px rgba(255,255,255,.6); }
.phases i.wip { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--glow); }
.sub { margin-top: -6px; margin-bottom: 18px; font-size: 12.5px; }
.center { text-align: center; }
.bounties { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; max-width: 900px; margin-inline: auto; }
.bounty { border: 1px solid var(--line); background: var(--bg2); padding: 14px; }
.bounty h4 { margin: 0 0 6px; font-size: 13px; color: var(--cyan); letter-spacing: .5px; }
.bounty p { margin: 0 0 10px; font-size: 12.5px; color: #b0b0b0; }
.bounty .rw { font-size: 11px; color: var(--accent); letter-spacing: 1px; }

.foot {
  position: relative; z-index: 1; border-top: 1px solid var(--line2);
  padding: 26px; text-align: center; font-size: 12px; color: var(--dim);
  display: flex; flex-direction: column; gap: 5px;
}

@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr; }
  .rail { display: none; }
  .hud { height: auto; }
  .term-out { height: 60vh; }
  .lore-inner { grid-template-columns: 1fr; }
  .lore-div { display: none; }
  .works-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .works-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}
