:root{
  --bg:#050814;
  --card:#0b1020;
  --card2:#0f1526;
  --text:#f7fafc;
  --muted:#a0aec0;
  --accent:#4fd1c5;
  --border:rgba(255,255,255,.08);
  --shadow:0 20px 50px rgba(0,0,0,.65);
  --radius:18px;
  --mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  --ui:system-ui,-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
}

.header{
  align-items: flex-start;
}

.header-actions{
  position: relative;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
}

.header-actions-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.header-symbol {
  width: 22px; height: 22px; border-radius: 50%;
  object-fit: cover; display: inline-block;
  vertical-align: middle; opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(79, 209, 197, 0.25));
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:active {
  color: var(--accent);
}

footer a {
  color: var(--accent);
  opacity: 0.9;
}

footer a:hover {
  opacity: 1;
}

*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:var(--ui);
  background:radial-gradient(circle at top,#111827 0,#050814 55%,#020309 100%);
  color:var(--text);
  min-height:100vh;
}
.page{max-width:1160px;margin:0 auto;padding:34px 18px 60px}
.header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.brand-kicker{font-size:11px;letter-spacing:.26em;text-transform:uppercase;color:var(--accent);opacity:.95}
.brand-title{font-size:22px;font-weight:700;margin-top:8px;color:#e5e7eb}
.brand-sub{margin-top:10px;color:var(--muted);font-size:13px;line-height:1.6;max-width:720px}
.muted{opacity:.85}
.btn{
  border:1px solid rgba(79,209,197,.35);
  background:rgba(15,23,42,.65);
  color:#e5e7eb;
  border-radius:999px;
  padding:10px 14px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  cursor:pointer;
  transition:transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  text-align: center;
}
.btn:hover{transform:translateY(-1px);border-color:rgba(79,209,197,.8);box-shadow:var(--shadow)}
.btnPrimary{background:rgba(79,209,197,.12);border-color:rgba(45,212,191,.9);color:#e0fdf7}

.grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:18px}
@media(max-width:980px){.grid{grid-template-columns:1fr}.header{flex-direction:column}.header-actions{justify-content:flex-start}}

.panel{
  background:radial-gradient(circle at top left, rgba(79,209,197,.12), transparent 55%),
            radial-gradient(circle at bottom, rgba(37,99,235,.12), transparent 52%),
            linear-gradient(145deg,#050816,#020309);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
}
.panelCanvas{background:radial-gradient(circle at top, rgba(56,189,248,.16), transparent 55%),
            linear-gradient(145deg,#050814,#020309);}
.panel-title{font-size:14px;letter-spacing:.12em;text-transform:uppercase;color:#cbd5f5}
.panel-sub{margin-top:8px;color:var(--muted);font-size:12px;line-height:1.55}

textarea{
  margin-top:12px;
  width:100%;
  height:auto;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(2,3,9,.55);
  color:var(--text);
  padding:12px;
  font-family:var(--mono);
  font-size:12.5px;
  line-height:1.55;
  outline:none;
}
textarea:focus{border-color:rgba(79,209,197,.65);box-shadow:0 0 0 3px rgba(79,209,197,.08)}
.row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.pill{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:999px;
  border:1px solid rgba(148,163,184,.25);
  background:rgba(15,23,42,.65);
  font-size:12px;color:#e5e7eb;
}
.pill input[type="range"]{width:140px}
.pill input[type="number"]{width:70px}
.pillVal{font-family:var(--mono);opacity:.9}
.mono{font-family:var(--mono);color:#e5e7eb}

.custom-slot { min-width: 210px; }
.custom-slot[aria-hidden="true"] { pointer-events: none; }

.canvasWrap{
  position:relative;
  margin-top:12px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08)
}

canvas{
  display:block;
  width:100%;
  height:auto;
  background:#000
}

/* Base HUD */
.hud{
  position:absolute;
  left:12px;
  z-index:5;
  pointer-events:none;
  max-width:480px;
}

.hudRow{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

/* Pin top/bottom */
.hudTop{ top:10px; }
.hudBottom{ bottom:10px; }

#memTag{ opacity:0.9; }

.hudBottom .hudRow { justify-content: flex-start; }

.tag{
  font-size:11px;letter-spacing:.08em;text-transform:none;
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.35);
  backdrop-filter:blur(10px);
}

.hero-mark{
  position: absolute;
  right: 0;
  top: 54px;
  width: 180px;
  height: 180px;
  border-radius: 14px;
  opacity: 0.95;
  pointer-events: none;
  filter: drop-shadow(0 0 24px rgba(79, 209, 197, 0.18));
}

@media (max-width: 900px) {
  .hero-mark { display: none; }
}

#chatInput{
  min-height: 180px;
  height: 225px;
  resize: vertical;
}

.captureBar{
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.captureSub{
  font-size: 12px;
  color: rgba(160,174,192,.92);
}

.shareRow{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.shareBtn{
  border:1px solid rgba(79,209,197,.25);
  background:rgba(15,23,42,.55);
  color:#e5e7eb;
  border-radius:999px;
  padding:8px 12px;
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  cursor:pointer;
  opacity: 1;
}

.shareBtn:disabled{
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.fineprint{margin-top:12px;font-size:12px;line-height:1.6;color:rgba(160,174,192,.92)}
.hint{margin-top:12px;font-size:12px;color:rgba(160,174,192,.92);line-height:1.55}
.footer{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:18px;color:#6b7280;font-size:11px;border-top:1px solid rgba(15,23,42,.9);padding-top:12px}