/* ============================================================================
   Tessera Design System — tessera.css
   "Mosaic Workbench" · 모든 mockup이 이 파일을 <link> 한다.
   토큰/컴포넌트 정의는 tessera-design-system.md 참조.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* ----------------------------------------------------------------- T-* tokens */
:root {
  /* T-color */
  --grout:#0D0F14; --tile:#161A22; --tile-raise:#1E232E;
  --line:#2A3140; --line-soft:#222836;
  --ink:#E7EBF2; --muted:#99A1B3; --faint:#636C80;
  /* T-identity */
  --id-term:#56D3A6; --id-edit:#7CA2F8; --id-web:#E2A75A; --id-claude:#D88C6E;
  /* T-semantic */
  --brand:#6D8BFF; --ok:#56D3A6; --warn:#E2A75A; --danger:#F0766B; --route:#B98BF0;
  /* T-type */
  --font-ui:"IBM Plex Sans",system-ui,-apple-system,sans-serif;
  --font-mono:"IBM Plex Mono",ui-monospace,"SF Mono",Menlo,monospace;
  /* T-radius / elevation */
  --r-tile:6px; --r-card:10px; --r-chip:6px;
  --shadow-dialog:0 24px 60px -12px rgba(0,0,0,.66), 0 0 0 1px rgba(0,0,0,.4);
  --shadow-toast:0 12px 30px -8px rgba(0,0,0,.6);
  --gutter:6px;
}

/* --------------------------------------------------------------------- reset */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:var(--font-ui); color:var(--ink);
  background:
    radial-gradient(1200px 700px at 80% -10%, #1a2030 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 110%, #16131f 0%, transparent 55%),
    #0a0b10;
  -webkit-font-smoothing:antialiased; font-size:13px; line-height:1.45;
  display:flex; align-items:center; justify-content:center; padding:28px;
}
:focus-visible{outline:2px solid var(--brand); outline-offset:2px; border-radius:4px}

/* =========================================================== C-window (frame) */
.win{
  width:min(1120px,100%); height:min(720px,calc(100vh - 56px));
  background:var(--grout); border-radius:var(--r-card);
  border:1px solid var(--line); box-shadow:var(--shadow-dialog);
  display:flex; flex-direction:column; overflow:hidden; position:relative;
}
.win--restart{height:min(560px,calc(100vh - 56px)); width:min(720px,100%)}
.titlebar{
  height:38px; flex:0 0 38px; background:var(--tile-raise);
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; gap:12px; padding:0 12px;
}
.lights{display:flex; gap:8px; align-items:center}
.lights i{width:12px; height:12px; border-radius:50%; display:block}
.lights i:nth-child(1){background:#F0766B}
.lights i:nth-child(2){background:#E2B25A}
.lights i:nth-child(3){background:#56D3A6}
.titlebar .ws{font-weight:600; font-size:13px; letter-spacing:.1px}
.titlebar .ws .dir{color:var(--faint); font-weight:400; font-family:var(--font-mono); font-size:12px; margin-left:8px}
.titlebar .right{margin-left:auto; display:flex; align-items:center; gap:8px}

/* workspace surface = grout, tiles float on it */
.surface{flex:1 1 auto; padding:var(--gutter); display:flex; gap:var(--gutter); min-height:0; position:relative}
.col{display:flex; flex-direction:column; gap:var(--gutter); flex:1 1 0; min-width:0; min-height:0}
.row{display:flex; gap:var(--gutter); flex:1 1 0; min-height:0; min-width:0}

/* ============================================================= C-pane (tile) */
.pane{
  flex:1 1 0; min-width:0; min-height:0; background:var(--tile);
  border:1px solid var(--line-soft); border-radius:var(--r-tile);
  display:flex; flex-direction:column; overflow:hidden; position:relative;
}
.pane::before{content:""; position:absolute; top:0; left:0; right:0; height:2px; background:var(--stripe,transparent); z-index:3}
.pane[data-kind=term]{--stripe:var(--id-term)}
.pane[data-kind=edit]{--stripe:var(--id-edit)}
.pane[data-kind=web]{--stripe:var(--id-web)}
.pane[data-kind=claude]{--stripe:var(--id-claude)}
.pane.focused{border-color:var(--line)}
.pane.focused::after{content:""; position:absolute; inset:0; border:1px solid color-mix(in srgb,var(--stripe) 55%, transparent); border-radius:var(--r-tile); pointer-events:none; z-index:2}
.pane.dim{filter:saturate(.5) brightness(.72)}

/* ----------------------------------------------------------- C-tabbar / C-tab */
.tabbar{height:30px; flex:0 0 30px; background:var(--tile-raise); border-bottom:1px solid var(--line-soft);
  display:flex; align-items:stretch; gap:2px; padding:0 4px; overflow:hidden}
.tab{display:flex; align-items:center; gap:6px; padding:0 9px; font-size:12px; font-weight:500;
  color:var(--muted); border-radius:6px 6px 0 0; align-self:flex-end; height:24px; white-space:nowrap; position:relative}
.tab .dot{width:6px; height:6px; border-radius:50%; background:var(--faint); flex:0 0 6px}
.tab[data-kind=term] .dot{background:var(--id-term)} .tab[data-kind=edit] .dot{background:var(--id-edit)}
.tab[data-kind=web] .dot{background:var(--id-web)} .tab[data-kind=claude] .dot{background:var(--id-claude)}
.tab.active{color:var(--ink); background:var(--tile)}
.tab:not(.active) .dot{opacity:.5}
.tab .x{color:var(--faint); font-size:13px; margin-left:2px; line-height:1}
.tab.drag{background:color-mix(in srgb,var(--brand) 18%, var(--tile)); color:var(--ink); box-shadow:0 8px 18px -6px rgba(0,0,0,.6); transform:translateY(-1px) rotate(-1deg); border:1px solid color-mix(in srgb,var(--brand) 50%,transparent)}
.tabbar .add{margin-left:2px; color:var(--faint); font-size:15px; align-self:center; padding:0 6px}
.tabbar .spacer{flex:1}
.tabbar .crumb{align-self:center; font-family:var(--font-mono); font-size:11px; color:var(--faint); padding-right:8px; overflow:hidden; text-overflow:ellipsis}

/* pane body */
.body{flex:1 1 auto; min-height:0; overflow:hidden; position:relative}

/* ============================================================ C-terminal */
.term{height:100%; background:#0B0D12; font-family:var(--font-mono); font-size:12.5px; line-height:1.55;
  color:#c7cedd; padding:10px 12px; overflow:hidden}
.term .o{white-space:pre-wrap; color:#aeb6c8}
.term .ok{color:var(--ok)} .term .warn{color:var(--warn)} .term .err{color:var(--danger)}
.term .dim{color:var(--faint)} .term .acc{color:var(--id-term)} .term .route{color:var(--route)}
.term .ps{color:var(--id-term); font-weight:500}
.term .ps.cont{color:var(--route)}
.term .path{color:#7e88a0}
.cursor{display:inline-block; width:7px; height:15px; background:var(--id-term); vertical-align:-3px; animation:blink 1.1s steps(1) infinite}
.term.cont .cursor{background:var(--route)}

/* ============================================================ C-editor */
.editor{height:100%; display:flex; flex-direction:column; background:#10131A}
.editor .gut-wrap{flex:1; display:flex; font-family:var(--font-mono); font-size:12.5px; line-height:1.65; overflow:hidden}
.editor .gutter{flex:0 0 38px; text-align:right; color:var(--faint); padding:10px 8px 10px 0; user-select:none; background:#0e1118}
.editor .code{flex:1; padding:10px 12px; white-space:pre; color:#c7cedd; overflow:hidden}
.code .kw{color:#c792ea} .code .fn{color:var(--id-edit)} .code .str{color:var(--ok)}
.code .num{color:var(--id-web)} .code .cm{color:var(--faint)} .code .ty{color:#7fd3c1}
.code .modified{background:linear-gradient(90deg, color-mix(in srgb,var(--warn) 14%,transparent), transparent)}
.caret{display:inline-block; width:2px; height:16px; background:var(--id-edit); vertical-align:-3px; animation:blink 1.1s steps(1) infinite}

/* ============================================================ C-browser */
.browser{height:100%; display:flex; flex-direction:column; background:#0F1218}
.bchrome{flex:0 0 auto; background:var(--tile-raise); border-bottom:1px solid var(--line-soft)}
.btabs{display:flex; gap:2px; padding:5px 6px 0}
.btab{font-size:11px; color:var(--muted); background:var(--tile); padding:4px 9px; border-radius:6px 6px 0 0; display:flex; gap:6px; align-items:center; max-width:160px; overflow:hidden; white-space:nowrap}
.btab.active{color:var(--ink); background:#0F1218; border:1px solid var(--line-soft); border-bottom:none}
.btab .fav{width:10px;height:10px;border-radius:2px;background:var(--id-web);flex:0 0 10px;opacity:.8}
.btab .fav.idp{background:var(--route)}
.baddr{display:flex; align-items:center; gap:8px; padding:6px 8px}
.baddr .nav{color:var(--faint); font-family:var(--font-mono); font-size:13px}
.url{flex:1; background:#0B0D12; border:1px solid var(--line-soft); border-radius:999px; padding:5px 12px;
  font-family:var(--font-mono); font-size:11.5px; color:var(--muted); display:flex; align-items:center; gap:8px; overflow:hidden; white-space:nowrap}
.url .lock{color:var(--ok); font-size:11px}
.url .host{color:var(--ink)} .url .rest{color:var(--faint)}
.bview{flex:1; overflow:hidden; padding:16px; position:relative}

/* simplified rendered page bits used inside .bview */
.page-bar{height:34px; border-radius:6px; background:linear-gradient(90deg,#171b24,#12151c); margin-bottom:12px; display:flex; align-items:center; padding:0 12px; gap:10px}
.page-bar .b-logo{width:18px;height:18px;border-radius:5px;background:var(--route)}
.skline{height:9px; border-radius:5px; background:#1b202b}
.idp-card{max-width:340px; margin:6px auto 0; background:var(--tile); border:1px solid var(--line); border-radius:var(--r-card); padding:22px 22px 20px}
.idp-card .idp-logo{width:30px;height:30px;border-radius:8px;background:var(--route); display:flex;align-items:center;justify-content:center;font-weight:600;color:#fff;font-size:15px;margin-bottom:14px}
.idp-card h4{font-size:15px; font-weight:600; margin-bottom:4px}
.idp-card p{font-size:12px; color:var(--muted); margin-bottom:16px}
.idp-acct{display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:8px; padding:10px 12px; margin-bottom:10px}
.idp-acct .av{width:26px;height:26px;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--id-claude));flex:0 0 26px}
.idp-acct .who{font-size:12px} .idp-acct .who b{display:block;font-weight:600} .idp-acct .who span{color:var(--faint)}
.idp-acct .chev{margin-left:auto;color:var(--faint)}

/* ============================================================ C-claude (GUI) */
.claude{height:100%; display:flex; flex-direction:column; background:#10121A}
.claude .turns{flex:1; overflow:hidden; padding:12px 12px 4px; display:flex; flex-direction:column; gap:12px}
.turn{display:flex; gap:9px; font-size:12.5px; line-height:1.5}
.turn .av{width:20px;height:20px;border-radius:5px;flex:0 0 20px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600}
.turn.user .av{background:var(--tile-raise); color:var(--muted)}
.turn.asst .av{background:color-mix(in srgb,var(--id-claude) 22%,var(--tile)); color:var(--id-claude)}
.turn .msg{color:var(--ink)} .turn .msg .mono{font-family:var(--font-mono); font-size:11.5px; color:var(--muted)}
.turn.user .msg{color:var(--muted)}
.run{display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--id-claude); font-family:var(--font-mono)}
.spinner{width:11px;height:11px;border-radius:50%;border:2px solid color-mix(in srgb,var(--id-claude) 30%,transparent); border-top-color:var(--id-claude); animation:spin .8s linear infinite}
.claude .composer{flex:0 0 auto; margin:6px 10px 10px; border:1px solid var(--line); border-radius:8px; background:var(--tile-raise); padding:8px 10px; color:var(--faint); font-size:12px; display:flex; align-items:center; gap:8px}
.claude .composer .send{margin-left:auto; width:20px;height:20px;border-radius:5px;background:color-mix(in srgb,var(--id-claude) 26%,var(--tile)); display:flex;align-items:center;justify-content:center;color:var(--id-claude)}

/* ============================================================ C-statusbar */
.statusbar{height:26px; flex:0 0 26px; background:var(--tile-raise); border-top:1px solid var(--line);
  display:flex; align-items:stretch; font-family:var(--font-mono); font-size:11px; color:var(--muted)}
.statusbar .seg{display:flex; align-items:center; gap:7px; padding:0 11px}
.statusbar .seg.ws{color:var(--ink); font-weight:500}
.statusbar .seg.host{background:color-mix(in srgb,var(--id-term) 16%,transparent); color:var(--id-term)}
.statusbar .seg.cont{background:color-mix(in srgb,var(--route) 18%,transparent); color:var(--route)}
.statusbar .seg.warnbg{background:color-mix(in srgb,var(--warn) 18%,transparent); color:var(--warn)}
.statusbar .seg.dangerbg{background:color-mix(in srgb,var(--danger) 20%,transparent); color:var(--danger)}
.statusbar .spacer{flex:1}
.statusbar .seg.keys{color:var(--faint)}
.statusbar .seg.keys b{color:var(--muted); font-weight:500}
.statusbar .clock{color:var(--faint); padding-right:12px; display:flex; align-items:center}

/* ============================================================ C-mark */
.mark{display:inline-grid; grid-template-columns:1fr 1fr; gap:1.5px; width:13px; height:13px; flex:0 0 13px}
.mark i{background:var(--faint); border-radius:1.5px; display:block}
.mark i:nth-child(2){background:var(--brand)}
.mark.lg{width:22px; height:22px; gap:2.5px}
.mark.lg i{border-radius:2.5px}

/* ============================================================ C-badge */
.badge{display:inline-flex; align-items:center; gap:5px; font-family:var(--font-mono); font-size:10.5px; font-weight:500;
  padding:2px 8px; border-radius:999px; border:1px solid var(--line); color:var(--muted)}
.badge .led{width:6px;height:6px;border-radius:50%;background:var(--faint)}
.badge.host{color:var(--id-term); border-color:color-mix(in srgb,var(--id-term) 40%,transparent)}
.badge.host .led{background:var(--id-term)}
.badge.cont{color:var(--route); border-color:color-mix(in srgb,var(--route) 40%,transparent)}
.badge.cont .led{background:var(--route)}
.badge.live .led{background:var(--ok); animation:pulse 1.8s ease-in-out infinite}
.badge.live{color:var(--ok); border-color:color-mix(in srgb,var(--ok) 40%,transparent)}
.badge.ro{color:var(--warn); border-color:color-mix(in srgb,var(--warn) 40%,transparent)}
.badge.ro .led{background:var(--warn)}
.badge.down{color:var(--danger); border-color:color-mix(in srgb,var(--danger) 40%,transparent)}
.badge.down .led{background:var(--danger)}

/* ============================================================ C-keycap */
.kc{display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px;
  font-family:var(--font-mono); font-size:11px; color:var(--ink); background:#222a37;
  border:1px solid var(--line); border-bottom-width:2px; border-radius:5px; box-shadow:0 1px 0 rgba(0,0,0,.4)}
.kcrow{display:inline-flex; align-items:center; gap:4px}
.kcrow .plus{color:var(--faint); font-size:11px}

/* ============================================================ scrim + C-dialog */
.scrim{position:absolute; inset:0; background:rgba(7,8,12,.62); backdrop-filter:blur(2px);
  display:flex; align-items:center; justify-content:center; z-index:30}
.dialog{width:min(440px,90%); background:var(--tile-raise); border:1px solid var(--line);
  border-radius:var(--r-card); box-shadow:var(--shadow-dialog); overflow:hidden}
.dialog .dhead{display:flex; align-items:center; gap:9px; padding:14px 16px; border-bottom:1px solid var(--line-soft)}
.dialog .dhead h3{font-size:15px; font-weight:600}
.dialog .dbody{padding:16px; display:flex; flex-direction:column; gap:13px}
.dialog .dfoot{display:flex; align-items:center; gap:8px; padding:12px 16px; border-top:1px solid var(--line-soft); background:var(--tile)}
.dialog .dfoot .spacer{flex:1}

/* ---------------------------------------------------------------- C-field */
.field{display:flex; flex-direction:column; gap:5px}
.field > label{font-size:11.5px; color:var(--muted); font-weight:500}
.input{display:flex; align-items:center; gap:8px; background:#0F1218; border:1px solid var(--line);
  border-radius:8px; padding:8px 10px; font-size:12.5px; color:var(--ink)}
.input.mono{font-family:var(--font-mono); font-size:12px}
.input .ph{color:var(--faint)}
.input .ic{color:var(--faint)}
.input.focus{border-color:var(--brand); box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 22%,transparent)}
.input .pick{margin-left:auto; color:var(--brand); font-size:11.5px; font-weight:500}
.hint{font-size:11px; color:var(--faint)}

/* mounts / list rows inside dialog */
.rows{display:flex; flex-direction:column; gap:6px}
.mrow{display:flex; align-items:center; gap:8px; font-family:var(--font-mono); font-size:11.5px; color:var(--muted);
  background:#0F1218; border:1px solid var(--line-soft); border-radius:7px; padding:6px 9px}
.mrow .arrow{color:var(--faint)} .mrow .ro-tag{margin-left:auto; color:var(--faint); font-size:10px}
.addrow{font-size:11.5px; color:var(--brand); font-weight:500; display:inline-flex; align-items:center; gap:5px}

/* ---------------------------------------------------------- C-segmented */
.segmented{display:inline-flex; background:#0F1218; border:1px solid var(--line); border-radius:8px; padding:3px; gap:3px}
.segmented .seg{display:flex; align-items:center; gap:7px; padding:6px 13px; border-radius:6px; font-size:12px; color:var(--muted); font-weight:500}
.segmented .seg .sdot{width:7px;height:7px;border-radius:50%;background:var(--faint)}
.segmented .seg.on{background:var(--tile-raise); color:var(--ink); box-shadow:0 1px 0 rgba(0,0,0,.4)}
.segmented .seg.on.host .sdot{background:var(--id-term)}
.segmented .seg.on.cont .sdot{background:var(--route)}

/* ---------------------------------------------------------------- buttons */
.btn{font-family:var(--font-ui); font-size:12.5px; font-weight:600; padding:8px 15px; border-radius:8px;
  border:1px solid var(--line); color:var(--ink); background:var(--tile); display:inline-flex; align-items:center; gap:7px}
.btn.primary{background:var(--brand); border-color:transparent; color:#0b0e1a}
.btn.ghost{background:transparent; color:var(--muted)}
.btn.danger{background:color-mix(in srgb,var(--danger) 90%,#000); border-color:transparent; color:#1a0c0c}
.btn.sm{padding:5px 10px; font-size:11.5px}

/* ============================================================ C-toast
   타이틀바 상태 칩 — 타이틀바 우측 클러스터의 `.titlebar-status` 슬롯(배지 좌측)에
   잠깐 나타난다. pane 그리드 밖(헤더)에 살아서 콘텐츠를 가리지 않는다.
   긴 설명은 title 속성(hover tooltip)으로, 짧은 제목(.tt)만 인라인.
   `:empty`는 빈 슬롯이 flex gap을 만들지 않게 한다. */
.titlebar-status{display:flex; align-items:center; gap:8px; min-width:0}
.titlebar-status:empty{display:none}
.toast{display:inline-flex; align-items:center; gap:7px; height:24px; padding:0 11px;
  max-width:420px; min-width:0; border-radius:999px; white-space:nowrap; overflow:hidden;
  border:1px solid color-mix(in srgb,var(--brand) 42%,transparent);
  background:color-mix(in srgb,var(--brand) 14%,transparent);
  animation:toast-in .18s ease-out}
.toast.route{border-color:color-mix(in srgb,var(--route) 42%,transparent); background:color-mix(in srgb,var(--route) 14%,transparent)}
.toast.ok{border-color:color-mix(in srgb,var(--ok) 42%,transparent); background:color-mix(in srgb,var(--ok) 14%,transparent)}
.toast.warn{border-color:color-mix(in srgb,var(--warn) 42%,transparent); background:color-mix(in srgb,var(--warn) 14%,transparent)}
.toast.danger{border-color:color-mix(in srgb,var(--danger) 42%,transparent); background:color-mix(in srgb,var(--danger) 14%,transparent)}
.toast .ti{flex:0 0 auto; font-size:11px; color:var(--brand)}
.toast.route .ti{color:var(--route)} .toast.ok .ti{color:var(--ok)} .toast.warn .ti{color:var(--warn)} .toast.danger .ti{color:var(--danger)}
.toast .tt{font-size:11.5px; font-weight:600; color:var(--ink)}
.toast .td{font-size:11px; color:var(--muted); min-width:0; overflow:hidden; text-overflow:ellipsis}
.toast .td .mono{font-family:var(--font-mono); font-size:10.5px}

/* ============================================================ C-banner */
.banner{display:flex; align-items:center; gap:10px; padding:8px 12px; font-size:12px;
  border-bottom:1px solid var(--line-soft); background:var(--tile-raise)}
.banner .bi{flex:0 0 14px}
.banner.warn{background:color-mix(in srgb,var(--warn) 12%,var(--tile-raise)); color:var(--warn)} .banner.warn .bi{color:var(--warn)}
.banner.danger{background:color-mix(in srgb,var(--danger) 12%,var(--tile-raise)); color:var(--danger)} .banner.danger .bi{color:var(--danger)}
.banner.info{color:var(--brand)} .banner.info .bi{color:var(--brand)}
.banner.ok{background:color-mix(in srgb,var(--ok) 12%,var(--tile-raise)); color:var(--ok)} .banner.ok .bi{color:var(--ok)}
.banner .bmsg{color:var(--ink)} .banner.danger .bmsg, .banner.warn .bmsg{color:var(--ink)}
.banner .bact{margin-left:auto; display:flex; gap:6px}

/* ============================================================ C-palette */
.palette{width:min(520px,92%); background:var(--tile-raise); border:1px solid var(--line); border-radius:var(--r-card); box-shadow:var(--shadow-dialog); overflow:hidden}
.palette .psearch{display:flex; align-items:center; gap:9px; padding:13px 15px; border-bottom:1px solid var(--line-soft); font-size:14px}
.palette .psearch .pq{color:var(--ink)} .palette .psearch .pcaret{width:2px;height:17px;background:var(--brand);display:inline-block;animation:blink 1.1s steps(1) infinite;vertical-align:-3px}
.palette .pres{padding:6px}
.pitem{display:flex; align-items:center; gap:10px; padding:8px 11px; border-radius:7px; font-size:12.5px; color:var(--muted)}
.pitem .pdot{width:6px;height:6px;border-radius:50%;background:var(--faint)}
.pitem.sel{background:color-mix(in srgb,var(--brand) 16%,var(--tile)); color:var(--ink)}
.pitem .pk{margin-left:auto}

/* ============================================================ C-backend-panel */
.bepanel{width:min(420px,90%); background:var(--tile-raise); border:1px solid var(--line); border-radius:var(--r-card); box-shadow:var(--shadow-dialog); overflow:hidden}
.bepanel .behead{padding:13px 15px; border-bottom:1px solid var(--line-soft); display:flex; align-items:center; gap:9px}
.bepanel .behead h3{font-size:14px; font-weight:600}
.bepanel .bebody{padding:14px 15px; display:flex; flex-direction:column; gap:12px}
.metric{display:flex; align-items:center; justify-content:space-between; font-size:12px}
.metric .mlabel{color:var(--muted)} .metric .mval{font-family:var(--font-mono); color:var(--ink)}
.gauge{height:6px; border-radius:4px; background:#0F1218; overflow:hidden; margin-top:5px}
.gauge > i{display:block; height:100%; background:linear-gradient(90deg,var(--ok),var(--id-edit)); border-radius:4px}
.belife{display:flex; gap:8px}

/* ============================================================ C-flowmap (J3) */
.flowmap{display:flex; align-items:center; gap:10px; font-family:var(--font-mono); font-size:11px; padding:12px;
  background:#0F1218; border:1px solid var(--line-soft); border-radius:9px}
.fnode{flex:1; text-align:center; padding:10px 8px; border-radius:8px; border:1px solid var(--line); color:var(--muted)}
.fnode.host{border-color:color-mix(in srgb,var(--id-term) 40%,transparent); color:var(--id-term)}
.fnode.cont{border-color:color-mix(in srgb,var(--route) 40%,transparent); color:var(--route)}
.fnode b{display:block; color:var(--ink); font-size:12px; margin-bottom:3px}
.farrow{flex:0 0 auto; color:var(--route); text-align:center; font-size:10px; min-width:64px}
.farrow .ln{color:var(--route)}

/* ============================================================ C-conflict (J4) */
.conflict{display:flex; flex-direction:column; gap:8px}
.crow{border:1px solid var(--line-soft); border-radius:8px; overflow:hidden}
.crow .ctop{display:flex; align-items:center; gap:8px; padding:8px 11px; font-family:var(--font-mono); font-size:11.5px; background:#0F1218}
.crow .ctop .cfile{color:var(--ink)} .crow .ctop .ctag{margin-left:auto; color:var(--warn); font-size:10.5px}
.crow .cchoose{display:flex; gap:6px; padding:8px 11px}
.choice{flex:1; border:1px solid var(--line); border-radius:7px; padding:7px 9px; font-size:11px; color:var(--muted)}
.choice b{display:block; color:var(--ink); font-size:11.5px; margin-bottom:2px; font-weight:600}
.choice.pick{border-color:var(--brand); background:color-mix(in srgb,var(--brand) 12%,transparent)}

/* splash (J4-S4) */
.splash{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; padding:24px}
.splash .stitle{font-size:15px; font-weight:600}
.splash .ssub{font-size:12px; color:var(--muted); text-align:center; max-width:360px}
.restore-list{width:min(420px,100%); display:flex; flex-direction:column; gap:7px}
.rl-row{display:flex; align-items:center; gap:9px; font-size:12px; background:var(--tile); border:1px solid var(--line-soft); border-radius:8px; padding:9px 11px}
.rl-row .rl-ic{width:7px;height:7px;border-radius:50%}
.rl-row .rl-st{margin-left:auto; font-family:var(--font-mono); font-size:11px; color:var(--faint)}
.rl-row.done .rl-st{color:var(--ok)} .rl-row.run .rl-st{color:var(--id-edit)} .rl-row.wait .rl-st{color:var(--faint)}
.bar{height:4px;border-radius:3px;background:#0F1218;overflow:hidden;width:min(420px,100%)}
.bar > i{display:block;height:100%;background:linear-gradient(90deg,var(--brand),var(--ok));border-radius:3px}
.shimmer{position:relative; overflow:hidden}
.shimmer::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(109,139,255,.08),transparent);animation:shimmer 1.8s linear infinite}

/* drop target overlay (J1-S5) */
.drop-zone{position:absolute; inset:6px; border:2px dashed color-mix(in srgb,var(--brand) 60%,transparent);
  border-radius:var(--r-tile); background:color-mix(in srgb,var(--brand) 9%,transparent); z-index:5;
  display:flex; align-items:center; justify-content:center; color:var(--brand); font-size:12px; font-weight:600; gap:7px}

/* small helpers */
.muted{color:var(--muted)} .faint{color:var(--faint)} .mono{font-family:var(--font-mono)}
.ok{color:var(--ok)} .warn{color:var(--warn)} .danger{color:var(--danger)} .route{color:var(--route)} .brand{color:var(--brand)}
.row-gap{display:flex; gap:8px; align-items:center} .col-gap{display:flex;flex-direction:column;gap:8px}

/* ---------------------------------------------------------------- keyframes */
@keyframes blink{0%,49%{opacity:1}50%,100%{opacity:0}}
@keyframes toast-in{from{opacity:0; transform:translateY(-8px)}to{opacity:1; transform:translateY(0)}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.82)}}
@keyframes shimmer{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
@media (prefers-reduced-motion: reduce){
  *{animation:none !important}
  .cursor,.caret,.pcaret{opacity:1}
}

/* ---------------------------------------------------------------- responsive */
@media (max-width:760px){
  body{padding:10px; align-items:flex-start}
  .win{height:calc(100vh - 20px)}
  .surface{flex-direction:column}
  .row{flex-direction:column}
  .titlebar .ws .dir{display:none}
  .statusbar .seg.keys{display:none}
}

/* ============================================================================
   MOCKUP 프레젠테이션 크롬 — 제품 UI가 아님 (문서용 화면 라벨)
   각 mockup HTML 상단에서 화면 ID/단계/시각화 대상을 표기하기 위한 래퍼.
   ============================================================================ */
.shell{display:flex; flex-direction:column; align-items:center; gap:14px; width:100%}
.caption{width:min(1120px,100%); display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:0 2px}
.caption .cid{font-family:var(--font-mono); font-size:12px; font-weight:600; color:var(--brand);
  border:1px solid color-mix(in srgb,var(--brand) 40%,transparent); border-radius:6px; padding:2px 8px}
.caption .ctitle{font-size:13px; font-weight:600; color:var(--ink)}
.caption .cmeta{margin-left:auto; display:flex; gap:8px; flex-wrap:wrap}
.caption .cmeta span{font-family:var(--font-mono); font-size:10.5px; color:var(--faint);
  border:1px solid var(--line-soft); border-radius:999px; padding:2px 8px}
.caption .cmeta span b{color:var(--muted); font-weight:500}
@media (max-width:760px){ .caption .cmeta{margin-left:0; width:100%} }

/* ============================== C-workspace-rail / P-workspace-rail (J1) */
/* 단일 창 좌측의 workspace 목록/스위처 + 활성 workspace 표면을 나란히 배치.
   .win 안에서 .titlebar 와 .statusbar 사이를 .winmain 이 채우고, 그 안에 레일+표면. (mockup: M-J1-S8) */
.winmain{display:flex; flex:1 1 auto; min-height:0}
.wsrail{flex:0 0 184px; min-width:0; background:var(--grout); border-right:1px solid var(--line);
  display:flex; flex-direction:column; padding:8px 8px 10px}
.wsrail-head{font-family:var(--font-mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--faint); padding:4px 8px 9px}
.wsitem{display:flex; align-items:center; gap:9px; padding:8px 9px; margin-bottom:3px; border-radius:7px;
  cursor:pointer; color:var(--muted); border:1px solid transparent; text-align:left; width:100%; font-size:12.5px}
.wsitem:hover{background:var(--tile); color:var(--ink)}
.wsitem.active{background:color-mix(in srgb,var(--brand) 16%,var(--tile)); color:var(--ink);
  border-color:color-mix(in srgb,var(--brand) 45%,transparent)}
.wsitem .wsdot{width:7px; height:7px; border-radius:50%; flex:0 0 7px; background:var(--faint)}
.wsitem .wsdot.cont{background:var(--route)} .wsitem .wsdot.host{background:var(--id-term)}
.wsitem .wsname{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500}
.wsitem .wskey{font-family:var(--font-mono); font-size:10px; color:var(--faint); flex:0 0 auto}
.wsitem.active .wskey{color:color-mix(in srgb,var(--brand) 78%,var(--ink))}
.wsrail-spacer{flex:1}
.wsnew{display:flex; align-items:center; gap:8px; padding:8px 9px; border-radius:7px; cursor:pointer;
  color:var(--faint); border:1px dashed var(--line); background:transparent; font-size:12px; width:100%; text-align:left}
.wsnew:hover{color:var(--ink); border-color:var(--muted)}
@media (max-width:760px){ .wsrail{flex-basis:140px} }
