/* ===== Boot overlay (first visit) ===== */
.boot-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--t-bg); color: var(--t-fg);
  /* ASCII-only content — stick to true Latin monospaces, don't let CJK subs in */
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 13px; line-height: 1.55;
  font-variant-ligatures: none;
  font-feature-settings: "tnum" 1;
  padding: 28px 32px;
  overflow: hidden;
  transition: opacity 0.45s ease-out;
  animation: boot-fade-in 0.2s ease-out;
}
.boot-overlay.fading { opacity: 0; pointer-events: none; }
@keyframes boot-fade-in { from { opacity: 0; } to { opacity: 1; } }
.boot-log {
  white-space: pre; margin: 0; padding: 0;
  color: var(--t-fg);
  font-family: inherit;
}
.boot-cursor {
  display: inline-block;
  width: 0.6em; height: 1em;
  background: var(--t-accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: boot-blink 0.6s steps(2, end) infinite;
}
@keyframes boot-blink { 50% { opacity: 0; } }
.boot-skip {
  position: absolute; bottom: 20px; right: 28px;
  color: var(--t-muted); font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase;
  font-family: inherit;
}
@media (max-width: 720px) {
  .boot-overlay { font-size: 10px; padding: 18px 14px; line-height: 1.45; }
  .boot-skip { font-size: 9px; }
}

/* ===== Root / layout ===== */
html, body, #root { margin: 0; padding: 0; height: 100%; background: var(--t-bg, #0c0c0d); color: var(--t-fg, #e6e6e3); overflow: hidden; }
* { box-sizing: border-box; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11", "tnum";
  transition: background 0.35s ease, color 0.35s ease;
}
::selection { background: var(--t-cyan); color: var(--t-bg); }

/* ===== Custom cursor trail ===== */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--t-accent); border-radius: 50%; }
.cursor-ring {
  width: 28px; height: 28px; border: 1px solid var(--t-accent); border-radius: 50%;
  opacity: 0.5; transition: transform 0.12s ease-out, width 0.15s, height 0.15s;
  mix-blend-mode: difference;
}
@media (max-width: 720px), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ===== Terminal shell — viewport-locked ===== */
.term-shell {
  height: 100dvh; display: grid; grid-template-rows: 36px minmax(0,1fr) auto;
  background: var(--t-bg); color: var(--t-fg); cursor: text;
  font-family: "JetBrains Mono", "Nanum Gothic Coding", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-ligatures: none;
  font-feature-settings: "tnum" 1;
  overflow: hidden;
}
.term-bottom {
  border-top: 1px solid var(--t-border);
  background: linear-gradient(to top, var(--t-bg) 85%, transparent);
  padding: 8px 28px 0;
}
.t-prompt-line.sticky { padding: 4px 0; }
.term-title {
  display: flex; align-items: center; gap: 8px;
  background: var(--t-titlebar); border-bottom: 1px solid var(--t-border);
  padding: 0 12px; font-size: 12px; color: var(--t-muted);
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.r { background: #ff5f57; } .term-dot.y { background: #febc2e; } .term-dot.g { background: #28c840; }
.term-title-name { flex: 1; text-align: center; }
.term-title-actions { display: flex; gap: 6px; align-items: center; }
.lang-seg { display: inline-flex; border: 1px solid var(--t-border); border-radius: 3px; overflow: hidden; }
.lang-btn { background: transparent; border: none; color: var(--t-muted); padding: 3px 8px; font: inherit; font-size: 11px; cursor: pointer; }
.lang-btn.on { background: var(--t-accent); color: var(--t-bg); }
.lang-btn:not(.on):hover { color: var(--t-fg); background: var(--t-chipHover); }
.term-easy {
  background: transparent; border: 1px solid var(--t-border); color: var(--t-fg);
  padding: 3px 10px; font: inherit; font-size: 11px; border-radius: 3px; cursor: pointer;
}
.term-easy:hover { background: var(--t-chipHover); border-color: var(--t-accent); color: var(--t-accent); }

.term-body {
  overflow-y: auto; padding: 22px 28px 12px;
  font-size: 14px; line-height: 1.7;
  scroll-behavior: smooth;
  display: flex; flex-direction: column;
}
.term-body-inner { margin-top: auto; }
.term-body::-webkit-scrollbar { width: 8px; }
.term-body::-webkit-scrollbar-thumb { background: var(--t-border); border-radius: 4px; }

.term-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 18px; font-size: 11px; color: var(--t-muted);
  border-top: 1px solid var(--t-border); background: var(--t-titlebar);
}

/* ===== Banner ===== */
.term-banner { margin-bottom: 18px; }
.term-banner-head {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
  overflow: hidden;
}
.term-banner-logo {
  white-space: pre; line-height: 1.02; font-size: 20px;
  font-family: inherit; margin: 0; padding: 0;
  color: var(--t-accent);
  user-select: none;
  letter-spacing: 0;
  flex-shrink: 0;
  text-rendering: geometricPrecision;
  font-kerning: none;
  font-variant-ligatures: none;
  text-shadow:
    0 0 2px color-mix(in oklab, var(--t-accent) 60%, transparent),
    0 0 20px color-mix(in oklab, var(--t-accent) 28%, transparent);
}
.term-banner-logo::-webkit-scrollbar { height: 0; display: none; }
.term-banner-anim {
  white-space: pre; line-height: 1.02; font-size: 12px;
  font-family: inherit; margin: 0 0 0 auto; padding: 0;
  color: var(--t-cyan);
  user-select: none;
  letter-spacing: 0;
  flex-shrink: 0;
  /* Reserve space so the first frame doesn't collapse the row */
  min-width: 30ch;
  min-height: calc(13 * 1.02em);
}
.term-banner-anim.anim-lorenz {
  color: var(--t-magenta, #f0abfc);
  text-shadow:
    0 0 3px color-mix(in oklab, var(--t-magenta, #f0abfc) 55%, transparent),
    0 0 12px color-mix(in oklab, var(--t-magenta, #f0abfc) 22%, transparent);
}
.term-banner-anim.anim-donut {
  color: var(--t-green);
  text-shadow:
    0 0 3px color-mix(in oklab, var(--t-green) 55%, transparent),
    0 0 12px color-mix(in oklab, var(--t-green) 22%, transparent);
}
.term-banner-anim.anim-starfield {
  color: var(--t-yellow);
  text-shadow:
    0 0 2px color-mix(in oklab, var(--t-yellow) 65%, transparent),
    0 0 14px color-mix(in oklab, var(--t-yellow) 25%, transparent);
}
.term-banner-anim.anim-cube {
  color: var(--t-red);
  text-shadow:
    0 0 3px color-mix(in oklab, var(--t-red) 55%, transparent),
    0 0 12px color-mix(in oklab, var(--t-red) 20%, transparent);
}
@media (max-width: 960px) {
  .term-banner-anim { display: none; }
  .term-banner-logo { font-size: 14px; }
}
.term-banner-meta {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 4px 10px;
  padding: 6px 0;
  border-top: 1px dashed var(--t-border);
  border-bottom: 1px dashed var(--t-border);
  font-size: 12px; color: var(--t-muted);
}
.term-banner-meta .tbm-tag {
  color: var(--t-bg); background: var(--t-accent);
  padding: 1px 6px; border-radius: 2px;
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
}
.term-banner-meta .tbm-name { color: var(--t-fg); font-weight: 600; font-size: 13px; }
.term-banner-meta .tbm-alt { color: var(--t-cyan); }
.term-banner-meta .tbm-sep { color: var(--t-faint); margin: 0 2px; }
.term-banner-meta .tbm-online { margin-left: auto; color: var(--t-green); }
@media (max-width: 720px) {
  .term-banner-head {
    margin-bottom: 8px;
    overflow: visible;
    gap: 10px;
  }
  /* 35-char ANSI Shadow logo — size so it fits narrow viewports */
  .term-banner-logo { font-size: 12px; line-height: 1.02; }
  .term-banner-meta { font-size: 11px; gap: 4px 8px; }
  .term-banner-meta .tbm-name { font-size: 12px; }
  .term-banner-meta .tbm-online { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 400px) {
  .term-banner-logo { font-size: 10px; }
}
@media (max-width: 340px) {
  .term-banner-logo { font-size: 9px; }
}

/* ===== Chat messages ===== */
.chat-msg { display: flex; gap: 10px; margin: 3px 0; padding: 2px 0; animation: fadein 0.25s ease-out; }
.chat-who { color: var(--t-muted); min-width: 80px; font-size: 12px; }
.chat-msg.chat-user .chat-who { color: var(--t-yellow); }
.chat-msg.chat-bot .chat-who { color: var(--t-green); }
.chat-body { color: var(--t-fg); flex: 1; white-space: pre-wrap; word-break: break-word; }
.chat-pending { color: var(--t-muted); animation: blink 1s infinite; }
.chat-img {
  max-width: 320px; max-height: 240px;
  display: block; margin-top: 4px;
  border: 1px solid var(--t-border); border-radius: 3px;
  cursor: pointer;
}
.chat-audio { max-width: 320px; height: 32px; margin-top: 2px; }
.chat-file-link { color: var(--t-cyan); text-decoration: underline; text-underline-offset: 3px; }
.chat-file-link:hover { color: var(--t-accent); }
.term-banner-mono { color: var(--t-muted); font-size: 11px; letter-spacing: 1.2px; }
.term-banner-row { display: flex; align-items: baseline; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.term-banner-ko { font-size: 36px; font-weight: 700; letter-spacing: -1px; color: var(--t-fg); }
.term-banner-en { font-size: 18px; color: var(--t-cyan); }
.term-banner-online { font-size: 11px; color: var(--t-muted); margin-left: auto; }
.term-banner-sub { color: var(--t-muted); font-size: 13px; margin-top: 2px; }

/* ===== Prompt line ===== */
.t-prompt-line { margin: 2px 0; white-space: pre-wrap; word-break: break-word; }
.t-user { color: var(--t-green); }
.t-sep { color: var(--t-muted); }
.t-path { color: var(--t-cyan); }
.t-caret { color: var(--t-muted); }
.t-cmd { color: var(--t-fg); }
.t-prompt-line.active .t-caret { color: var(--t-accent); }

.t-input-wrap { position: relative; display: inline-block; min-width: 1ch; }
.t-input {
  background: transparent; border: none; outline: none;
  color: var(--t-fg); font: inherit; caret-color: var(--t-accent);
  width: 60ch; max-width: 100%;
}
.t-ghost { position: absolute; left: 0; top: 0; color: var(--t-faint); pointer-events: none; user-select: none; }
.t-ghost-caret { color: var(--t-accent); opacity: 0.6; animation: blink 1s infinite; margin-left: 1px; }
@keyframes blink { 0%,49% { opacity: 0.6 } 50%,100% { opacity: 0 } }

/* ===== Output blocks ===== */
.t-out { margin: 4px 0 10px; animation: fadein 0.35s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.t-line { color: var(--t-fg); white-space: pre; font-variant-ligatures: none; }
.t-line.dim { color: var(--t-muted); }
.t-line.warn { color: var(--t-red); }
.t-line.strong { font-weight: 600; color: var(--t-accent); }

.t-kv { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; row-gap: 2px; margin: 4px 0; }
.t-kv-row { display: contents; }
.t-kv-k { color: var(--t-cyan); }
.t-kv-v { color: var(--t-fg); }

.t-hintable { cursor: pointer; text-decoration: underline dotted var(--t-faint); text-underline-offset: 3px; }
.t-hintable:hover { color: var(--t-accent); text-decoration-color: var(--t-accent); }

.t-link { color: var(--t-cyan); text-decoration: underline; text-underline-offset: 3px; }
.t-link:hover { color: var(--t-accent); }

/* ===== Project cards (grid) ===== */
.t-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px; margin-top: 8px;
}
.t-card {
  background: var(--t-panel); border: 1px solid var(--t-border);
  padding: 12px 14px; border-radius: 2px; cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.t-card:hover {
  transform: translateY(-2px); border-color: var(--t-accent);
  background: var(--t-chipHover);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 0 0 1px var(--t-accent) inset;
}
.t-card-h { display: flex; justify-content: space-between; font-size: 11px; color: var(--t-muted); }
.t-card-slug { color: var(--t-cyan); }
.t-card-year { color: var(--t-muted); }
.t-card-title { margin-top: 4px; font-size: 15px; color: var(--t-fg); font-weight: 500; }
.t-card-sum { margin-top: 4px; color: var(--t-muted); font-size: 12px; line-height: 1.5; }
.t-card-stack { margin-top: 8px; font-size: 10px; color: var(--t-faint); letter-spacing: 0.5px; }
.t-card-cta { margin-top: 6px; font-size: 11px; color: var(--t-accent); }

/* ===== Chips / suggestions ===== */
.t-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.t-chip {
  display: inline-block; padding: 3px 10px; border: 1px solid var(--t-border);
  background: var(--t-chipBg); color: var(--t-fg); border-radius: 3px;
  font-size: 12px; cursor: pointer; transition: all 0.15s ease;
}
.t-chip:hover { border-color: var(--t-accent); color: var(--t-accent); background: var(--t-chipHover); }

.t-quick { margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.t-quick-label { font-size: 11px; color: var(--t-muted); margin-right: 4px; }
.t-chip-solid { padding: 4px 10px; }
.t-chip-ko { color: var(--t-faint); font-size: 10px; margin-left: 2px; }

/* ===== Help overlay ===== */
.help-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  animation: fadein 0.18s ease-out;
}
.help-panel {
  background: var(--t-panel); border: 1px solid var(--t-border); border-radius: 4px;
  width: min(640px, 92vw); max-height: 80vh; overflow: auto; padding: 24px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--t-border) transparent;
}
.help-panel::-webkit-scrollbar { width: 10px; }
.help-panel::-webkit-scrollbar-track { background: transparent; }
.help-panel::-webkit-scrollbar-thumb {
  background: var(--t-border);
  border: 2px solid var(--t-panel);
  border-radius: 6px;
}
.help-panel::-webkit-scrollbar-thumb:hover { background: var(--t-accent); }
.help-h { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.help-title { font-size: 18px; font-weight: 600; color: var(--t-fg); }
.help-sub { font-size: 12px; color: var(--t-muted); margin-top: 2px; }
.help-close { background: transparent; border: 1px solid var(--t-border); color: var(--t-fg); padding: 4px 10px; cursor: pointer; font: inherit; font-size: 12px; }
.help-grid { display: grid; grid-template-columns: 1fr; gap: 2px; }
.help-row {
  display: grid; grid-template-columns: 140px 1fr; gap: 14px; padding: 8px 10px;
  background: transparent; border: none; color: var(--t-fg); text-align: left; cursor: pointer;
  border-radius: 3px; font: inherit;
}
.help-row:hover { background: var(--t-chipHover); }
.help-cmd { color: var(--t-accent); font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 13px; }
.help-hint { color: var(--t-muted); font-size: 13px; }
.help-egghint {
  margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--t-border);
  font-size: 12px; color: var(--t-faint); font-style: italic; text-align: center;
  letter-spacing: 0.5px;
}

/* ---- now / calendar ---- */
.t-now { margin: 6px 0 10px; }
.t-now-h { color: var(--t-accent); font-weight: 600; margin-bottom: 6px; letter-spacing: 1px; }
.t-now-day { margin-bottom: 8px; }
.t-now-daylbl { color: var(--t-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; margin: 6px 0 2px; }
.t-now-ev { display: grid; grid-template-columns: 120px 14px 1fr auto; gap: 10px; padding: 2px 0; font-size: 14px; align-items: baseline; }
.t-now-time { color: var(--t-cyan); font-variant-numeric: tabular-nums; }
.t-now-tag { font-size: 9px; }
.t-now-title { color: var(--t-fg); }
.t-now-loc { color: var(--t-muted); font-size: 12px; }
.t-now-foot { margin-top: 8px; font-size: 12px; color: var(--t-muted); }
.t-now-hint { color: var(--t-faint); }

.matrix-canvas {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  animation: matrix-fade 3.5s ease-out forwards;
  background: #000;
}
@keyframes matrix-fade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---- easy calendar ---- */
.easy-cal { display: grid; gap: 12px; margin-top: 4px; border: 1px solid var(--t-border); border-radius: 4px; padding: 16px 20px; background: var(--t-panel); }
.easy-cal-day { display: grid; grid-template-columns: 90px 1fr; gap: 18px; padding: 8px 0; border-bottom: 1px dashed var(--t-border); }
.easy-cal-day:last-child { border-bottom: none; padding-bottom: 0; }
.easy-cal-daylbl { color: var(--t-muted); font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; padding-top: 3px; }
.easy-cal-events { display: grid; gap: 6px; }
.easy-cal-ev { display: grid; grid-template-columns: 54px 10px 1fr auto; gap: 10px; align-items: baseline; font-size: 14px; }
.easy-cal-time { font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; color: var(--t-cyan); font-size: 13px; font-variant-numeric: tabular-nums; }
.easy-cal-dot { width: 8px; height: 8px; border-radius: 50%; align-self: center; }
.easy-cal-title { color: var(--t-fg); }
.easy-cal-loc { color: var(--t-muted); font-size: 12px; }
.easy-cal-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--t-border); font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 11px; color: var(--t-muted); }
.easy-cal-empty { padding: 24px; text-align: center; border: 1px dashed var(--t-border); border-radius: 4px; background: var(--t-panel); }

/* ===== Easy mode ===== */
.easy-root {
  height: 100dvh; overflow-y: auto; background: var(--t-bg); color: var(--t-fg);
  font-family: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  font-size: 15px; letter-spacing: -0.01em;
}
.easy-top {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
  background: color-mix(in oklab, var(--t-bg) 82%, transparent);
  border-bottom: 1px solid var(--t-border);
  padding: 10px 24px; display: flex; align-items: center; justify-content: space-between;
}
.easy-crumbs { font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 12px; color: var(--t-muted); }
.easy-crumb { }
.easy-crumb-sep { margin: 0 6px; color: var(--t-faint); }
.easy-crumb-cur { color: var(--t-fg); }
.easy-top-actions { display: flex; gap: 8px; align-items: center; }
.easy-select {
  background: var(--t-chipBg); color: var(--t-fg); border: 1px solid var(--t-border);
  padding: 4px 8px; font: inherit; font-size: 12px; border-radius: 3px;
}
.easy-back {
  background: var(--t-chipBg); border: 1px solid var(--t-border); color: var(--t-fg);
  padding: 5px 12px; font: inherit; font-size: 12px; border-radius: 3px; cursor: pointer;
  font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace;
}
.easy-back:hover { border-color: var(--t-accent); color: var(--t-accent); }

.easy-doc { max-width: 780px; margin: 0 auto; padding: 0 40px 100px; }

.easy-cover {
  position: relative; height: 200px; margin: 0 -40px 32px;
  background: var(--t-panel); overflow: hidden;
  border-bottom: 1px solid var(--t-border);
}
.easy-cover-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--t-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--t-border) 1px, transparent 1px);
  background-size: 40px 40px; opacity: 0.4;
}
.easy-cover-mono {
  position: absolute; left: 24px; bottom: 18px;
  font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; color: var(--t-accent);
  font-size: 13px; letter-spacing: 1px;
}

.easy-icon { font-size: 64px; line-height: 1; margin: -12px 0 20px; color: var(--t-accent); }
.easy-title { font-size: 46px; font-weight: 800; letter-spacing: -1.5px; margin: 0 0 6px; line-height: 1.1; }
.easy-title-en { font-weight: 400; color: var(--t-muted); font-size: 22px; letter-spacing: -0.5px; }
.easy-subtitle { color: var(--t-muted); font-size: 15px; letter-spacing: -0.01em; }

.easy-props { margin: 32px 0 24px; display: grid; gap: 0; border-top: 1px solid var(--t-border); border-bottom: 1px solid var(--t-border); }
.easy-prop { display: grid; grid-template-columns: 140px 1fr; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--t-border); font-size: 14.5px; }
.easy-prop:last-child { border-bottom: none; }
.easy-prop-k { color: var(--t-muted); font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; }
.easy-prop-v { color: var(--t-fg); }
.easy-prop-v a { color: var(--t-accent); text-decoration: none; border-bottom: 1px solid var(--t-faint); transition: border-color 0.15s; }
.easy-prop-v a:hover { border-bottom-color: var(--t-accent); }

/* Easy mode: live chat FAB */
.easy-chat-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--t-panel);
  color: var(--t-fg);
  border: 1px solid var(--t-accent);
  padding: 10px 16px;
  border-radius: 4px;
  font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  box-shadow:
    0 8px 28px rgba(0,0,0,0.32),
    0 0 0 3px color-mix(in oklab, var(--t-accent) 12%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.easy-chat-fab:hover {
  transform: translateY(-2px);
  border-color: var(--t-accent);
  box-shadow:
    0 12px 32px rgba(0,0,0,0.4),
    0 0 0 3px color-mix(in oklab, var(--t-accent) 22%, transparent);
}
.easy-chat-fab:active { transform: translateY(0); }
.easy-chat-fab-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--t-green);
  box-shadow: 0 0 8px color-mix(in oklab, var(--t-green) 65%, transparent);
  animation: chat-live-pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes chat-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}
@media (max-width: 720px) {
  .easy-chat-fab { right: 12px; bottom: 12px; padding: 9px 14px; font-size: 11px; }
}

/* Easy mode: themed chat panel (uses Crisp backend under the hood) */
.easy-chat-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 70;
  display: flex; flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100dvh - 48px));
  background: var(--t-panel);
  border: 1px solid var(--t-border);
  border-radius: 4px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 0 3px color-mix(in oklab, var(--t-accent) 14%, transparent);
  font-family: "JetBrains Mono", "Nanum Gothic Coding", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  overflow: hidden;
  animation: easy-chat-in 0.2s ease-out;
}
@keyframes easy-chat-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.easy-chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--t-titlebar);
  border-bottom: 1px solid var(--t-border);
  font-size: 12px;
}
.easy-chat-head-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--t-green);
  box-shadow: 0 0 8px color-mix(in oklab, var(--t-green) 60%, transparent);
  animation: chat-live-pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
.easy-chat-head-title {
  flex: 1; color: var(--t-fg); font-weight: 600;
  text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
}
.easy-chat-head-live {
  color: var(--t-green); font-size: 10px;
  letter-spacing: 1.4px; text-transform: uppercase;
}
.easy-chat-close {
  background: transparent; border: none; cursor: pointer;
  color: var(--t-muted); font-size: 20px; line-height: 1;
  padding: 0 4px; font-family: inherit;
  transition: color 0.15s;
}
.easy-chat-close:hover { color: var(--t-red); }

.easy-chat-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 6px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in oklab, var(--t-accent) 6%, transparent) 0%, transparent 60%),
    var(--t-bg);
}
.easy-chat-body::-webkit-scrollbar { width: 6px; }
.easy-chat-body::-webkit-scrollbar-thumb { background: var(--t-border); border-radius: 3px; }
.easy-chat-body::-webkit-scrollbar-track { background: transparent; }

.easy-chat-empty {
  color: var(--t-muted); font-size: 12px; line-height: 1.6;
  padding: 8px 2px; font-style: italic;
}
.easy-chat-msg { display: flex; max-width: 100%; }
.easy-chat-msg.role-user { justify-content: flex-end; }
.easy-chat-bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 3px;
  line-height: 1.55;
  word-wrap: break-word;
  white-space: pre-wrap;
  font-size: 13px;
}
.easy-chat-msg.role-user .easy-chat-bubble {
  background: var(--t-accent);
  color: var(--t-bg);
  border-bottom-right-radius: 0;
  box-shadow: 0 1px 0 color-mix(in oklab, var(--t-accent) 50%, transparent);
}
.easy-chat-msg.role-bot .easy-chat-bubble {
  background: var(--t-chipBg);
  color: var(--t-fg);
  border: 1px solid var(--t-border);
  border-bottom-left-radius: 0;
}
.easy-chat-msg.pending .easy-chat-bubble {
  color: var(--t-muted);
  animation: chat-live-pulse 1.3s ease-in-out infinite;
}
.easy-chat-bubble.is-image { padding: 3px; background: transparent; border: none; box-shadow: none; }
.easy-chat-msg.role-user .easy-chat-bubble.is-image { background: transparent; }
.easy-chat-img-link { display: block; text-decoration: none; line-height: 0; }
.easy-chat-img {
  max-width: 260px; max-height: 220px;
  border: 1px solid var(--t-border); border-radius: 3px;
  display: block;
}
.easy-chat-audio { width: 240px; height: 34px; }
.easy-chat-file {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: var(--t-chipBg); border: 1px solid var(--t-border);
  border-radius: 3px; text-decoration: none;
  color: var(--t-accent); font-size: 12px;
}
.easy-chat-file:hover { border-color: var(--t-accent); }
.easy-chat-file-ico { font-size: 14px; color: var(--t-accent); }
.easy-chat-file-name { color: var(--t-fg); }

.easy-chat-form {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--t-border);
  background: var(--t-bg);
}
.easy-chat-input {
  flex: 1; background: transparent; border: none;
  color: var(--t-fg); font: inherit; font-size: 13px;
  outline: none;
  caret-color: var(--t-accent);
  padding: 4px 0;
}
.easy-chat-input::placeholder { color: var(--t-faint); }
.easy-chat-send {
  background: var(--t-accent); color: var(--t-bg);
  border: none; width: 30px; height: 28px;
  border-radius: 3px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700;
  transition: filter 0.15s, transform 0.15s;
}
.easy-chat-send:hover { filter: brightness(1.15); transform: translateX(1px); }
.easy-chat-send:active { transform: translateX(0); }

.easy-chat-hint {
  padding: 6px 14px; font-size: 10px; color: var(--t-muted);
  border-top: 1px solid var(--t-border);
  background: var(--t-titlebar);
  text-align: center; letter-spacing: 0.5px;
}
@media (max-width: 720px) {
  .easy-chat-panel {
    right: 12px; bottom: 12px;
    width: calc(100vw - 24px);
    height: calc(100dvh - 80px);
  }
}

/* Easy mode: scrollbar */
.easy-root::-webkit-scrollbar { width: 10px; }
.easy-root::-webkit-scrollbar-track { background: transparent; }
.easy-root::-webkit-scrollbar-thumb {
  background: var(--t-border);
  border: 2px solid var(--t-bg);
  border-radius: 6px;
}
.easy-root::-webkit-scrollbar-thumb:hover { background: var(--t-accent); }
.easy-root { scrollbar-width: thin; scrollbar-color: var(--t-border) transparent; }

.easy-callout {
  background: var(--t-panel); border-left: 3px solid var(--t-accent);
  padding: 18px 22px; margin: 28px 0; border-radius: 2px;
}
.easy-callout-b { font-size: 15.5px; line-height: 1.75; letter-spacing: -0.01em; }
.easy-dim { color: var(--t-muted); }

.easy-h2 { margin: 56px 0 16px; font-size: 24px; font-weight: 700; letter-spacing: -0.6px; display: flex; align-items: baseline; gap: 10px; }
.easy-h2::before { content: ""; display: inline-block; width: 14px; height: 2px; background: var(--t-accent); margin-right: 2px; transform: translateY(-4px); }
.easy-h-en { color: var(--t-muted); font-weight: 400; font-size: 13px; font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; letter-spacing: 0; }

.easy-research { display: grid; gap: 8px; }
.easy-research-item {
  display: grid; grid-template-columns: 70px 1fr; gap: 18px; align-items: start;
  padding: 16px 18px; border: 1px solid var(--t-border); border-radius: 3px;
  background: var(--t-panel);
  transition: border-color 0.2s, transform 0.2s;
}
.easy-research-item:hover { border-color: var(--t-accent); transform: translateX(2px); }
.easy-r-title { font-weight: 600; margin-bottom: 4px; font-size: 15px; letter-spacing: -0.01em; }
.easy-r-blurb { color: var(--t-muted); font-size: 14px; line-height: 1.55; }

.easy-bullets { margin: 8px 0 0; padding-left: 22px; }
.easy-bullets li { margin: 8px 0; line-height: 1.65; font-size: 15px; }

.easy-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.easy-proj {
  display: block; text-decoration: none; color: inherit;
  background: var(--t-panel); border: 1px solid var(--t-border);
  padding: 16px; border-radius: 3px; transition: all 0.2s ease;
  position: relative;
}
.easy-proj:hover {
  transform: translateY(-2px); border-color: var(--t-accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.easy-proj-title { font-weight: 600; font-size: 16px; margin-top: 8px; letter-spacing: -0.015em; }
.easy-proj-sum { color: var(--t-muted); font-size: 13.5px; margin-top: 6px; line-height: 1.55; min-height: 44px; }
.easy-tag {
  display: inline-block; padding: 2px 6px; background: var(--t-accent); color: var(--t-bg);
  font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 11px; font-weight: 600;
  border-radius: 2px; height: fit-content; letter-spacing: 1px;
}
.easy-r-title { font-weight: 600; margin-bottom: 3px; }
.easy-r-blurb { color: var(--t-muted); font-size: 13.5px; }

.easy-bullets { margin: 0; padding-left: 20px; }
.easy-bullets li { margin: 6px 0; line-height: 1.6; }

.easy-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.easy-proj {
  display: block; text-decoration: none; color: inherit;
  background: var(--t-panel); border: 1px solid var(--t-border);
  padding: 14px; border-radius: 3px; transition: all 0.2s ease;
  position: relative;
}
.easy-proj:hover {
  transform: translateY(-2px); border-color: var(--t-accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.easy-proj-h { display: flex; justify-content: space-between; font-size: 11px; font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; }
.easy-proj-slug { color: var(--t-cyan); }
.easy-proj-year { color: var(--t-muted); }
.easy-proj-title { font-weight: 600; font-size: 16px; margin-top: 6px; }
.easy-proj-sum { color: var(--t-muted); font-size: 13px; margin-top: 4px; line-height: 1.5; min-height: 40px; }
.easy-proj-stack { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.easy-pill {
  display: inline-block; padding: 1px 7px; background: var(--t-chipBg);
  border: 1px solid var(--t-border); color: var(--t-muted);
  border-radius: 2px; font-size: 10px; font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace;
  letter-spacing: 0.3px;
}
.easy-proj-feat {
  position: absolute; top: 10px; right: 10px; font-size: 10px; color: var(--t-yellow);
  font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace;
}

.easy-pubs { display: grid; gap: 4px; }
.easy-pub {
  display: grid; grid-template-columns: 60px 100px 1fr auto; gap: 14px;
  padding: 10px 0; border-bottom: 1px dashed var(--t-border);
  font-size: 14px; align-items: baseline;
}
.easy-pub-y { font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; color: var(--t-muted); font-size: 12px; }
.easy-pub-v { color: var(--t-cyan); font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 12px; }
.easy-pub-r { color: var(--t-muted); font-size: 12px; }

.easy-exp { display: grid; gap: 10px; }
.easy-exp-row { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--t-border); }
.easy-exp-when { color: var(--t-muted); font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 12px; }
.easy-exp-what { font-weight: 600; }

.easy-skills { display: grid; gap: 14px; }
.easy-skill-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.easy-skill-label { color: var(--t-muted); font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.easy-skill-pills { display: flex; flex-wrap: wrap; gap: 6px; }

.easy-foot {
  margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--t-border);
  display: flex; justify-content: space-between; font-size: 12px; color: var(--t-muted);
  font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace;
}
.easy-foot a { color: var(--t-accent); text-decoration: none; }

/* ===== Tweaks panel ===== */
.tweaks {
  position: fixed; right: 16px; bottom: 16px; z-index: 500;
  background: var(--t-panel); border: 1px solid var(--t-border); border-radius: 4px;
  padding: 12px 14px; width: 260px; font-family: "JetBrains Mono", "Nanum Gothic Coding", monospace; font-size: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.tweaks h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--t-muted); }
.tweaks-row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0; }
.tweaks select, .tweaks button {
  background: var(--t-chipBg); color: var(--t-fg); border: 1px solid var(--t-border);
  padding: 3px 8px; font: inherit; font-size: 11px; border-radius: 2px; cursor: pointer;
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .term-body { padding: 14px 14px 6px; font-size: 13px; }
  /* allow long output lines to wrap instead of clipping off-screen */
  .t-line { white-space: pre-wrap; overflow-wrap: break-word; }
  .t-prompt-line { white-space: pre-wrap; overflow-wrap: break-word; }
  .term-bottom { padding: 6px 14px 0; }
  .term-status { font-size: 10px; padding: 0 10px; }
  .term-title-name { display: none; }
  .t-grid { grid-template-columns: 1fr; }
  .t-input { width: 100%; }
  .t-quick { gap: 4px; }
  .t-chip, .t-chip-solid { padding: 3px 8px; font-size: 11px; }
  .term-easy { font-size: 10px; padding: 3px 8px; }
  .easy-doc { padding: 0 18px 60px; }
  .easy-title { font-size: 30px; }
  .easy-title-en { font-size: 18px; display: block; }
  .easy-prop { grid-template-columns: 88px 1fr; font-size: 13px; gap: 6px; }
  .easy-skill-row, .easy-exp-row { grid-template-columns: 1fr; gap: 4px; }
  .easy-pub { grid-template-columns: 1fr; gap: 2px; }
  .easy-cover { margin: 0 -18px 20px; height: 140px; }
  .easy-callout { padding: 14px 16px; }
  .easy-h2 { margin: 36px 0 12px; font-size: 20px; }
  .easy-research-item { grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 14px; }
  .tweaks { left: 8px; right: 8px; bottom: 8px; width: auto; }
  .help-panel { padding: 18px; }
  .help-row { grid-template-columns: 100px 1fr; gap: 10px; padding: 6px 4px; }
  .help-cmd { font-size: 12px; }
  .help-hint { font-size: 12px; }
}
