/* ============================================================
   TheNoun Design System — Design Tokens (Single Source of Truth)
   design.thenoun.ai/tokens.css
   이 파일 하나를 로드하면 TheNoun 룩을 얻는다.
   ============================================================ */
:root{
  /* color */
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --primary: oklch(0.55 0.18 250);
  --primary-muted: oklch(0.92 0.04 250);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --border: oklch(0.922 0 0);
  --ok: oklch(0.62 0.17 150);
  --err: oklch(0.58 0.21 25);
  --canvas: oklch(0.98 0 0);

  /* shape */
  --radius: 0.5rem;          /* card */
  --radius-btn: 6px;
  --radius-input: 7px;
  --radius-pill: 999px;

  /* motion */
  --ts: all 0.4s cubic-bezier(0.16,1,0.3,1);

  /* type */
  --font-sans: "Geist", -apple-system, "Pretendard", "맑은 고딕", sans-serif;
}

*{ margin:0; padding:0; box-sizing:border-box; font-family:var(--font-sans); }
body{ background:var(--canvas); color:var(--foreground); }
::selection{ background:var(--primary-muted); }

/* ---- core components ---- */
.tn-card{ background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:0 1px 3px rgba(0,0,0,0.05); }

.tn-btn{ display:inline-flex; align-items:center; justify-content:center; gap:0.5rem;
  padding:0.6rem 1.1rem; border-radius:var(--radius-btn); font-weight:600; font-size:0.85rem;
  cursor:pointer; transition:var(--ts); border:1px solid transparent; }
.tn-btn-primary{ background:var(--foreground); color:var(--on-foreground); }
.tn-btn-primary:hover{ background:var(--primary); transform:translateY(-1px);
  box-shadow:0 4px 12px oklch(0.55 0.18 250 / 25%); }
.tn-btn-ghost{ background:var(--card); color:var(--foreground); border-color:var(--border); }
.tn-btn-ghost:hover{ border-color:var(--primary); color:var(--primary); background:var(--primary-muted); }

.tn-chip{ display:inline-flex; align-items:center; gap:0.35rem; font-size:0.68rem; font-weight:600;
  color:var(--muted-foreground); border:1px solid var(--border); border-radius:var(--radius-pill);
  padding:2px 10px; }

.tn-input{ width:100%; border:1px solid var(--border); border-radius:var(--radius-input);
  padding:0.55rem 0.7rem; font-size:0.84rem; font-family:inherit; background:var(--card);
  color:var(--foreground); transition:var(--ts); }
.tn-input:focus{ outline:none; border-color:var(--primary); }

.tn-eyebrow{ font-size:0.78rem; font-weight:600; letter-spacing:0.05em; text-transform:uppercase;
  color:var(--muted-foreground); }
.tn-title{ font-size:2rem; font-weight:600; letter-spacing:-0.03em; }
.tn-sub{ font-size:0.93rem; color:var(--muted-foreground); line-height:1.6; }

@keyframes tn-fadeUp{ from{opacity:0; transform:translateY(14px);} to{opacity:1; transform:none;} }
.tn-fadeUp{ animation:tn-fadeUp 0.55s cubic-bezier(0.16,1,0.3,1) both; }

/* ---- dark theme ---- */
:root{ --on-foreground:#fff; }
:root[data-theme="dark"]{
  --background:oklch(0.17 0 0); --foreground:oklch(0.93 0 0); --card:oklch(0.205 0 0);
  --primary:oklch(0.64 0.15 250); --primary-muted:oklch(0.30 0.05 250);
  --muted:oklch(0.25 0 0); --muted-foreground:oklch(0.63 0 0); --border:oklch(0.30 0 0);
  --canvas:oklch(0.15 0 0); --on-foreground:oklch(0.17 0 0);
  --ok:oklch(0.68 0.15 150); --err:oklch(0.64 0.19 25);
}

/* ---- v2 components ---- */
.tn-switch{position:relative;display:inline-flex;width:38px;height:22px;cursor:pointer;flex-shrink:0}
.tn-switch input{opacity:0;width:0;height:0}
.tn-switch .tr{position:absolute;inset:0;background:var(--border);border-radius:999px;transition:var(--ts)}
.tn-switch .tr::after{content:"";position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:var(--card);transition:var(--ts);box-shadow:0 1px 2px rgba(0,0,0,.18)}
.tn-switch input:checked+.tr{background:var(--foreground)}
.tn-switch input:checked+.tr::after{transform:translateX(16px)}
.tn-seg{display:inline-flex;background:var(--muted);border:1px solid var(--border);border-radius:8px;padding:3px;gap:2px}
.tn-seg button{border:0;background:transparent;padding:0.35rem 0.9rem;border-radius:6px;font-size:0.8rem;font-weight:550;color:var(--muted-foreground);cursor:pointer;transition:var(--ts);font-family:inherit}
.tn-seg button.on{background:var(--card);color:var(--foreground);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.tn-callout{border:1px solid var(--border);border-left:3px solid var(--muted-foreground);border-radius:8px;padding:0.7rem 0.9rem;font-size:0.8rem;line-height:1.6;color:var(--muted-foreground)}
.tn-callout b{color:var(--foreground)}
.tn-callout.ok{border-left-color:var(--ok)} .tn-callout.err{border-left-color:var(--err)} .tn-callout.info{border-left-color:var(--primary)}
.tn-spin{display:inline-block;width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--foreground);border-radius:50%;animation:tn-rot .7s linear infinite}
@keyframes tn-rot{to{transform:rotate(360deg)}}
.tn-skel{background:linear-gradient(90deg,var(--muted) 25%,var(--border) 50%,var(--muted) 75%);background-size:200% 100%;animation:tn-shim 1.4s infinite;border-radius:6px}
@keyframes tn-shim{to{background-position:-200% 0}}
.tn-snack{display:inline-flex;align-items:center;gap:0.8rem;background:var(--foreground);color:var(--on-foreground);border-radius:8px;padding:0.65rem 1rem;font-size:0.82rem;box-shadow:0 4px 14px rgba(0,0,0,.2)}
.tn-snack a{color:var(--primary-muted);font-weight:600;text-decoration:none;font-size:0.78rem;cursor:pointer}
.tn-table{width:100%;border-collapse:collapse;font-size:0.82rem}
.tn-table th{text-align:left;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.04em;color:var(--muted-foreground);padding:0.5rem 0.75rem;border-bottom:1px solid var(--border);font-weight:600}
.tn-table td{padding:0.55rem 0.75rem;border-bottom:1px solid var(--border)}
.tn-table tr:last-child td{border-bottom:0}
.tn-table tbody tr{transition:var(--ts)} .tn-table tbody tr:hover{background:var(--muted)}
.tn-tip{position:relative;display:inline-flex;border-bottom:1px dotted var(--muted-foreground);cursor:help}
.tn-tip::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);background:var(--foreground);color:var(--on-foreground);font-size:0.7rem;padding:4px 9px;border-radius:6px;white-space:nowrap;opacity:0;pointer-events:none;transition:var(--ts)}
.tn-tip:hover::after{opacity:1}
.tn-acc{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.tn-acc details{border-bottom:1px solid var(--border)} .tn-acc details:last-child{border-bottom:0}
.tn-acc summary{list-style:none;cursor:pointer;padding:0.75rem 1rem;font-size:0.84rem;font-weight:550;display:flex;justify-content:space-between;align-items:center;transition:var(--ts)}
.tn-acc summary::-webkit-details-marker{display:none}
.tn-acc summary::after{content:"+";color:var(--muted-foreground);font-weight:400}
.tn-acc details[open] summary::after{content:"−"}
.tn-acc summary:hover{color:var(--primary)}
.tn-acc .bd{padding:0 1rem 0.85rem;font-size:0.8rem;color:var(--muted-foreground);line-height:1.65}
.tn-list{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.tn-list .li{display:flex;align-items:center;gap:0.8rem;padding:0.75rem 1rem;border-bottom:1px solid var(--border);cursor:pointer;transition:var(--ts)}
.tn-list .li:last-child{border-bottom:0} .tn-list .li:hover{background:var(--muted)}
.tn-list .li .tt{font-size:0.84rem;font-weight:550} .tn-list .li .dd2{font-size:0.72rem;color:var(--muted-foreground);margin-top:1px}
.tn-list .li .ar{margin-left:auto;color:var(--muted-foreground);font-size:0.8rem}
.tn-avatar{width:32px;height:32px;border-radius:50%;background:var(--muted);display:inline-flex;align-items:center;justify-content:center;font-size:0.72rem;font-weight:600;color:var(--muted-foreground);overflow:hidden;flex-shrink:0}
.tn-badge{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 5px;border-radius:999px;background:var(--err);color:#fff;font-size:0.62rem;font-weight:700}
.tn-banner{display:flex;align-items:center;gap:0.7rem;background:var(--muted);border:1px solid var(--border);border-radius:8px;padding:0.6rem 1rem;font-size:0.8rem}
.tn-banner .x{margin-left:auto;cursor:pointer;color:var(--muted-foreground);font-size:0.9rem;background:none;border:0}
.tn-menu{display:inline-flex;flex-direction:column;background:var(--card);border:1px solid var(--border);border-radius:8px;padding:4px;box-shadow:0 4px 14px rgba(0,0,0,.08);min-width:150px}
.tn-menu button{border:0;background:transparent;text-align:left;padding:0.45rem 0.7rem;border-radius:6px;font-size:0.82rem;color:var(--foreground);cursor:pointer;transition:var(--ts);font-family:inherit}
.tn-menu button:hover{background:var(--primary-muted);color:var(--primary)}
.tn-menu button.danger{color:var(--err)} .tn-menu .sep{height:1px;background:var(--border);margin:4px 6px}
.tn-select{appearance:none;-webkit-appearance:none;width:100%;max-width:240px;border:1px solid var(--border);border-radius:7px;padding:0.55rem 2rem 0.55rem 0.7rem;font-size:0.84rem;font-family:inherit;background:var(--card) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="%23888" stroke-width="1.5" fill="none" stroke-linecap="round"/></svg>') no-repeat right 0.7rem center;color:var(--foreground);cursor:pointer;transition:var(--ts)}
.tn-select:focus{outline:none;border-color:var(--primary)}
.tn-dialog{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:1.4rem;max-width:340px;box-shadow:0 10px 40px rgba(0,0,0,.18)}
.tn-dialog .dt{font-size:1rem;font-weight:600;letter-spacing:-0.01em;margin-bottom:0.35rem}
.tn-dialog .dd3{font-size:0.82rem;color:var(--muted-foreground);line-height:1.6;margin-bottom:1.1rem}
.tn-dialog .row{display:flex;gap:0.5rem;justify-content:flex-end}

/* ---- v3 platform components ---- */
.tn-bub{max-width:78%;padding:0.55rem 0.85rem;border-radius:14px;font-size:0.84rem;line-height:1.55}
.tn-bub.user{background:var(--foreground);color:var(--on-foreground);border-bottom-right-radius:4px;align-self:flex-end}
.tn-bub.agent{background:var(--muted);color:var(--foreground);border-bottom-left-radius:4px;align-self:flex-start}
.tn-typing{display:inline-flex;gap:3px;padding:0.6rem 0.8rem;background:var(--muted);border-radius:14px;border-bottom-left-radius:4px;align-self:flex-start}
.tn-typing i{width:5px;height:5px;border-radius:50%;background:var(--muted-foreground);animation:tn-tp 1.2s infinite}
.tn-typing i:nth-child(2){animation-delay:.15s} .tn-typing i:nth-child(3){animation-delay:.3s}
@keyframes tn-tp{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.tn-node{width:190px;background:var(--card);border:1px solid var(--border);border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.05);position:relative;transition:var(--ts)}
.tn-node:hover{border-color:var(--primary)}
.tn-node.sel{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-muted)}
.tn-node .nh{display:flex;align-items:center;gap:0.45rem;padding:0.55rem 0.75rem;border-bottom:1px solid var(--border);font-size:0.78rem;font-weight:600}
.tn-node .nh .nd{width:8px;height:8px;border-radius:3px;background:var(--foreground);flex-shrink:0}
.tn-node .nb{padding:0.55rem 0.75rem;font-size:0.72rem;color:var(--muted-foreground);line-height:1.55}
.tn-node .pt{position:absolute;width:10px;height:10px;border-radius:50%;background:var(--card);border:1.5px solid var(--muted-foreground);top:50%;transform:translateY(-50%)}
.tn-node .pt.in{left:-5px} .tn-node .pt.out{right:-5px}
.tn-stat{padding:1.1rem 1.2rem;min-width:150px}
.tn-stat .sl{font-size:0.72rem;font-weight:600;color:var(--muted-foreground);letter-spacing:0.02em}
.tn-stat .sv{font-size:1.7rem;font-weight:650;letter-spacing:-0.03em;margin-top:0.25rem;font-variant-numeric:tabular-nums}
.tn-stat .sd{font-size:0.72rem;font-weight:600;margin-top:0.2rem}
.tn-stat .sd.up{color:var(--ok)} .tn-stat .sd.down{color:var(--err)} .tn-stat .sd.flat{color:var(--muted-foreground)}
.tn-empty{text-align:center;padding:2.5rem 1rem;color:var(--muted-foreground)}
.tn-empty .ei{width:44px;height:44px;border-radius:12px;background:var(--muted);display:inline-flex;align-items:center;justify-content:center;font-size:1.1rem;margin-bottom:0.8rem}
.tn-empty .et{font-size:0.95rem;font-weight:600;color:var(--foreground)}
.tn-empty .es{font-size:0.8rem;margin-top:0.3rem;line-height:1.6}
.tn-bc{display:flex;align-items:center;gap:0.5rem;font-size:0.84rem}
.tn-bc a{color:var(--muted-foreground);text-decoration:none;transition:var(--ts)} .tn-bc a:hover{color:var(--primary)}
.tn-bc .sep2{color:var(--border)} .tn-bc b{font-weight:600}
.tn-iconbtn{width:32px;height:32px;border:1px solid var(--border);border-radius:6px;background:var(--card);color:var(--muted-foreground);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:var(--ts);font-size:0.85rem}
.tn-iconbtn:hover{color:var(--primary);border-color:var(--primary);background:var(--primary-muted)}
.tn-pgn{display:inline-flex;gap:4px;align-items:center}
.tn-pgn button{min-width:30px;height:30px;border:1px solid var(--border);border-radius:6px;background:var(--card);font-size:0.78rem;color:var(--muted-foreground);cursor:pointer;transition:var(--ts);font-family:inherit}
.tn-pgn button:hover{border-color:var(--primary);color:var(--primary)}
.tn-pgn button.on{background:var(--foreground);color:var(--on-foreground);border-color:var(--foreground);font-weight:600}
.tn-search{position:relative;display:inline-flex;align-items:center;width:100%;max-width:280px}
.tn-search input{width:100%;border:1px solid var(--border);border-radius:8px;padding:0.5rem 3.4rem 0.5rem 2rem;font-size:0.82rem;font-family:inherit;background:var(--card);color:var(--foreground);transition:var(--ts)}
.tn-search input:focus{outline:none;border-color:var(--primary)}
.tn-search .ic{position:absolute;left:0.65rem;color:var(--muted-foreground);font-size:0.8rem}
.tn-search kbd{position:absolute;right:0.55rem;font-size:0.62rem;color:var(--muted-foreground);border:1px solid var(--border);border-radius:4px;padding:1px 5px;background:var(--muted);font-family:inherit}
.tn-tl{border-left:2px solid var(--border);margin-left:0.35rem;padding-left:1.2rem;display:flex;flex-direction:column;gap:1.1rem}
.tn-tl .te{position:relative}
.tn-tl .te::before{content:"";position:absolute;left:-1.55rem;top:0.3rem;width:8px;height:8px;border-radius:50%;background:var(--foreground)}
.tn-tl .td2{font-size:0.7rem;font-weight:600;color:var(--muted-foreground)}
.tn-tl .tt2{font-size:0.85rem;font-weight:600;margin-top:1px}
.tn-tl .ts2{font-size:0.78rem;color:var(--muted-foreground);margin-top:1px;line-height:1.55}

/* ---- v4 voice & flow ---- */
.tn-mic{width:52px;height:52px;border-radius:50%;background:var(--foreground);color:var(--on-foreground);border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:1.1rem;transition:var(--ts)}
.tn-mic:hover{background:var(--primary);transform:translateY(-1px);box-shadow:0 4px 12px oklch(0.55 0.18 250 / 25%)}
.tn-mic.end{background:var(--err)}
.tn-wave{display:inline-flex;align-items:center;gap:3px;height:26px}
.tn-wave i{width:3px;border-radius:99px;background:var(--primary);animation:tn-wv 1s ease-in-out infinite}
.tn-wave i:nth-child(1){height:8px;animation-delay:0s}.tn-wave i:nth-child(2){height:16px;animation-delay:.12s}
.tn-wave i:nth-child(3){height:24px;animation-delay:.24s}.tn-wave i:nth-child(4){height:14px;animation-delay:.36s}
.tn-wave i:nth-child(5){height:9px;animation-delay:.48s}
@keyframes tn-wv{0%,100%{transform:scaleY(.5)}50%{transform:scaleY(1)}}
.tn-wave.idle i{animation:none;height:4px;background:var(--border)}
.tn-ts{display:flex;flex-direction:column;gap:0.55rem;font-size:0.84rem;width:100%}
.tn-ts .ln{display:flex;gap:0.6rem;align-items:baseline}
.tn-ts .who{flex-shrink:0;font-size:0.64rem;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;color:var(--muted-foreground);width:52px;text-align:right}
.tn-ts .who.ai{color:var(--primary)}
.tn-ts .tx{line-height:1.6}
.tn-ts .ln.partial .tx{color:var(--muted-foreground)}
.tn-ts .ln.partial .tx::after{content:"▍";animation:tn-bl 1s step-end infinite;color:var(--primary)}
@keyframes tn-bl{50%{opacity:0}}
.snode{position:relative;width:250px;min-height:60px;background:var(--card);border:1px solid var(--border);border-radius:11px;padding:0.75rem 0.9rem;box-shadow:0 1px 3px rgba(0,0,0,.05);cursor:pointer;transition:var(--ts);display:flex;align-items:center}
.snode:hover{border-color:var(--muted-foreground);transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,.07)}
.snode.sel{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-muted),0 1px 3px rgba(0,0,0,.05)}
.snode.input{border-style:dashed;cursor:default}
.snode.input:hover{transform:none;border-color:var(--border);box-shadow:0 1px 3px rgba(0,0,0,.05)}
.snode.resolve{background:var(--foreground);border-color:var(--foreground);color:var(--on-foreground)}
.snode.resolve:hover{box-shadow:0 6px 20px oklch(0.55 0.18 250 / 25%)}
.sn-head{width:100%;display:flex;align-items:center;gap:0.6rem;min-width:0}
.sn-ic{width:34px;height:34px;border-radius:9px;background:var(--muted);color:var(--foreground);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:0.8rem}
.snode.resolve .sn-ic{background:rgba(255,255,255,.15);color:var(--on-foreground)}
.sn-meta{flex:1;min-width:0}
.sn-label{font-size:0.82rem;font-weight:600;line-height:1.25}
.sn-sub{font-size:0.66rem;color:var(--muted-foreground);margin-top:1px;font-family:ui-monospace,monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.snode.resolve .sn-sub{color:rgba(255,255,255,.65)}
.sn-type{font-size:0.6rem;font-weight:600;color:var(--muted-foreground);background:var(--muted);border-radius:999px;padding:2px 8px;flex-shrink:0}
.snode.resolve .sn-type{background:rgba(255,255,255,.16);color:rgba(255,255,255,.85)}
.sn-run{width:26px;height:26px;border-radius:7px;border:1px solid var(--border);background:var(--card);color:var(--muted-foreground);display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:var(--ts);font-size:0.6rem}
.sn-run:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-muted)}
.snode.resolve .sn-run{border-color:rgba(255,255,255,.25);color:rgba(255,255,255,.75);background:transparent}
.node-del{position:absolute;top:-7px;right:-7px;width:19px;height:19px;border-radius:50%;border:1px solid var(--border);background:var(--card);color:var(--muted-foreground);display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:var(--ts);font-size:0.62rem;z-index:4;box-shadow:0 1px 4px rgba(0,0,0,.16)}
.snode:hover .node-del{opacity:1}
.node-del:hover{border-color:var(--err);background:var(--err);color:#fff}
.sconn{width:250px;height:30px;display:flex;align-items:center;justify-content:center;position:relative}
.sconn::before{content:"";position:absolute;top:0;bottom:0;left:50%;transform:translateX(-50%);width:1.5px;background:var(--border)}
.conn-add{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:22px;height:22px;border-radius:50%;border:1px solid var(--border);background:var(--card);color:var(--muted-foreground);display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:var(--ts);font-size:0.72rem;z-index:2}
.sconn:hover .conn-add{opacity:1}
.conn-add:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-muted);transform:translate(-50%,-50%) scale(1.12)}
/* ---- v5 xApp layer ---- */
:root{--ac-accent:var(--primary)}
.ac-card{width:300px;max-width:100%;background:var(--card);border:1px solid var(--border);border-radius:12px;overflow:hidden;text-align:left;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.ac-strip{height:3px;background:var(--ac-accent)}
.ac-body{padding:0.85rem 1rem 0.6rem}
.ac-title{font-size:0.88rem;font-weight:600;letter-spacing:-0.01em}
.ac-row{display:flex;justify-content:space-between;gap:1rem;font-size:0.76rem;padding:0.35rem 0;border-bottom:1px solid var(--border)}
.ac-row:last-child{border-bottom:0}
.ac-row span{color:var(--muted-foreground)} .ac-row b{font-weight:550;text-align:right}
.ac-actions{display:flex;gap:0.5rem;padding:0.4rem 1rem 0.9rem}
.ac-actions .tn-btn{flex:1;padding:0.45rem;font-size:0.76rem}
.xapp-frame{width:230px;border:1px solid var(--border);border-radius:20px;background:var(--card);overflow:hidden;box-shadow:0 8px 28px rgba(0,0,0,.1)}
.xapp-top{display:flex;align-items:center;justify-content:space-between;padding:0.65rem 0.9rem;border-bottom:1px solid var(--border);font-size:0.74rem;font-weight:600}
.xapp-top .x{color:var(--muted-foreground);cursor:pointer;background:none;border:0;font-size:0.8rem}
.xapp-body{padding:0.9rem;display:flex;flex-direction:column;gap:0.6rem;align-items:center}
.xapp-cta{display:block;width:calc(100% - 1.8rem);margin:0.2rem 0.9rem 0.9rem;background:var(--foreground);color:var(--on-foreground);border:0;border-radius:8px;padding:0.55rem;font-size:0.76rem;font-weight:600;cursor:pointer;font-family:inherit;transition:var(--ts)}
.xapp-cta:hover{background:var(--ac-accent)}
.seatmap{display:grid;grid-template-columns:repeat(2,24px) 16px repeat(2,24px);gap:6px;justify-content:center}
.seat{width:24px;height:24px;border-radius:7px 7px 4px 4px;border:1px solid var(--border);background:var(--card);cursor:pointer;transition:var(--ts);padding:0}
.seat:hover{border-color:var(--ac-accent)}
.seat.sel{background:var(--ac-accent);border-color:var(--ac-accent)}
.seat.taken{background:var(--muted);border-color:var(--muted);cursor:not-allowed}
.seat-lg{font-size:0.62rem;color:var(--muted-foreground);display:flex;gap:0.8rem;justify-content:center}
.seat-lg i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:3px;vertical-align:-1px;font-style:normal}
.paycard{width:150px;border:1px solid var(--border);border-radius:10px;padding:0.7rem 0.8rem;cursor:pointer;transition:var(--ts);background:var(--card);text-align:left;font-family:inherit}
.paycard:hover{border-color:var(--ac-accent)}
.paycard.sel{border-color:var(--ac-accent);box-shadow:0 0 0 3px var(--primary-muted)}
.paycard .pb{font-size:0.6rem;font-weight:700;letter-spacing:0.05em;color:var(--muted-foreground);text-transform:uppercase}
.paycard .pn{font-size:0.78rem;font-weight:600;margin-top:0.45rem;font-variant-numeric:tabular-nums;letter-spacing:0.03em}
.slotrow{display:flex;gap:0.4rem;flex-wrap:wrap;justify-content:center}
.slot{border:1px solid var(--border);border-radius:7px;background:var(--card);padding:0.4rem 0.7rem;font-size:0.74rem;cursor:pointer;transition:var(--ts);font-family:inherit;font-variant-numeric:tabular-nums;color:var(--foreground)}
.slot:hover{border-color:var(--ac-accent);color:var(--ac-accent)}
.slot.sel{background:var(--foreground);color:var(--on-foreground);border-color:var(--foreground)}
.slot.off{opacity:.4;cursor:not-allowed;text-decoration:line-through}


/* ---- v6 payment card 3D flip (SoT: component_library_v1.html) ---- */
.xcc-wrap{width:280px;max-width:100%;perspective:900px}
.xcc-card{position:relative;width:100%;aspect-ratio:1.586;transform-style:preserve-3d;transition:transform 0.8s cubic-bezier(0.71,0.03,0.56,0.85);transform:rotateY(0deg)}
.xcc-card.flipped{transform:rotateY(180deg)}
.xcc-side{position:absolute;inset:0;border-radius:16px;overflow:hidden;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-shadow:0 18px 42px rgba(0,0,0,0.30),0 6px 16px rgba(0,0,0,0.20);display:flex;flex-direction:column}
.xcc-side::before{content:'';position:absolute;inset:0;z-index:0;background:radial-gradient(120% 90% at 12% 8%,rgba(255,255,255,0.14),transparent 46%),radial-gradient(95% 85% at 88% 94%,color-mix(in oklch,var(--ac-accent) 30%,transparent),transparent 62%),linear-gradient(135deg,oklch(0.32 0 0),oklch(0.18 0 0) 55%,oklch(0.12 0 0))}
.xcc-side::after{content:'';position:absolute;inset:0;z-index:0;background:rgba(8,6,26,0.18)}
.xcc-front{z-index:2}
.xcc-back{transform:rotateY(180deg);z-index:1}
.xcc-front-inner{position:relative;z-index:2;flex:1;min-height:0;padding:0.95rem 1.05rem;display:flex;flex-direction:column;justify-content:space-between;color:#fff}
.xcc-row{display:flex;align-items:center;justify-content:space-between}
.xcc-chip{width:38px;height:27px;border-radius:6px;position:relative;flex-shrink:0;background:linear-gradient(135deg,#f5d98b,#c79a3c);box-shadow:inset 0 0 0 1px rgba(255,255,255,0.4)}
.xcc-chip::before,.xcc-chip::after{content:'';position:absolute;left:18%;right:18%;height:1px;background:rgba(120,86,20,0.55)}
.xcc-chip::before{top:36%}.xcc-chip::after{top:64%}
.xcc-brand{font-size:0.78rem;font-weight:760;letter-spacing:-0.01em;text-shadow:0 1px 3px rgba(0,0,0,0.35)}
.xcc-number{font-family:ui-monospace,monospace;font-size:1.05rem;font-weight:600;letter-spacing:0.06em;display:flex;gap:0.55rem;text-shadow:0 2px 5px rgba(0,0,0,0.32);font-variant-numeric:tabular-nums}
.xcc-number .g.dim{color:rgba(255,255,255,0.5)}
.xcc-foot{display:flex;align-items:flex-end;justify-content:space-between;gap:0.6rem}
.xcc-cap{font-size:0.5rem;font-weight:600;letter-spacing:0.08em;opacity:0.62;text-transform:uppercase;margin-bottom:0.18rem}
.xcc-val{font-family:ui-monospace,monospace;font-size:0.74rem;font-weight:600;text-shadow:0 1px 3px rgba(0,0,0,0.3)}
.xcc-holder .xcc-val{text-transform:uppercase}
.xcc-exp{text-align:right;flex-shrink:0}
.xcc-back-inner{position:relative;z-index:2;flex:1;min-height:0;display:flex;flex-direction:column}
.xcc-band{height:17%;min-height:30px;margin-top:9%;background:rgba(6,4,20,0.82)}
.xcc-back-body{padding:0.7rem 0.85rem 0;display:flex;flex-direction:column}
.xcc-cvc-cap{font-size:0.5rem;font-weight:700;letter-spacing:0.1em;color:rgba(255,255,255,0.78);text-align:right;margin-bottom:0.3rem}
.xcc-strip{display:flex;align-items:stretch;gap:0.45rem;min-height:30px}
.xcc-sign-strip{flex:1;position:relative;background:#fff;border-radius:5px;overflow:hidden;box-shadow:0 8px 16px -8px rgba(8,12,40,0.5);background-image:repeating-linear-gradient(0deg,transparent,transparent 5px,rgba(0,0,0,0.045) 5px,rgba(0,0,0,0.045) 6px)}
.xcc-sign-strip .ssig-ph{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:0.56rem;font-style:italic;color:#c7c7c7}
.xcc-cvc-box{width:26%;min-width:56px;background:#fff;border-radius:5px;display:flex;align-items:center;justify-content:flex-end;padding:0 0.5rem;color:#20335c;font-family:ui-monospace,monospace;font-size:0.86rem;font-weight:600;letter-spacing:0.12em;box-shadow:0 8px 16px -8px rgba(8,12,40,0.5)}
.xcc-cvc-box .ph{color:#b9c1d4}
.xcc-badge{position:absolute;top:0.55rem;left:0.6rem;z-index:4;display:inline-flex;align-items:center;gap:0.28rem;font-size:0.5rem;font-weight:700;padding:0.2rem 0.46rem;border-radius:99px;background:color-mix(in oklch,#16a34a 90%,transparent);color:#fff;box-shadow:0 3px 8px rgba(0,0,0,0.22)}
.xcc-flip-hint{display:flex;align-items:center;justify-content:center;gap:0.3rem;margin-top:0.6rem;font-size:0.62rem;color:var(--muted-foreground)}
.xcc-fields{display:flex;flex-direction:column;gap:0.6rem;margin-top:0.9rem}
.xcc-numgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:0.4rem}
.xcc-in{width:100%;min-height:40px;border-radius:10px;border:1.5px solid var(--border);background:var(--card);color:var(--foreground);font-family:ui-monospace,monospace;font-size:0.84rem;font-weight:600;text-align:center;letter-spacing:0.06em;padding:0 0.4rem;transition:var(--ts);appearance:none}
.xcc-in::placeholder{color:var(--muted-foreground);font-weight:500;letter-spacing:0.16em}
.xcc-in:focus{outline:none;border-color:var(--ac-accent);box-shadow:0 0 0 3px color-mix(in oklch,var(--ac-accent) 14%,transparent)}
.xcc-in.secure{cursor:pointer;background:var(--muted);font-size:0.78rem;color:var(--muted-foreground)}
