:root{
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #121826;
  --muted: #5b6573;
  --line: rgba(15, 23, 42, .10);
  --shadow: 0 18px 45px rgba(15, 23, 42, .10);
  --radius: 18px;
  --maxw: 980px;
  --accent: #2563eb;
}

*{ box-sizing:border-box; }

html, body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(37, 99, 235, .08), transparent 60%),
    radial-gradient(1000px 600px at 80% 30%, rgba(16, 185, 129, .06), transparent 55%),
    linear-gradient(180deg, var(--bg), #ffffff);
}

.container{
  min-height:100vh;
  width:100%;
  max-width:none;
  margin:0;
  padding: 28px 32px 22px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 4px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: .2px;
}

.brandMark{
  width: 18px;
  height: 18px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(37,99,235,.25), rgba(16,185,129,.18));
  border: 1px solid var(--line);
}

.nav{
  display:flex;
  gap: 14px;
}

.nav a{
  color: var(--muted);
  text-decoration:none;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.nav a:hover{
  border-color: var(--line);
  background: rgba(255,255,255,.60);
}

.main{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
}

.panel{
  width:100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.stage{
  padding: 26px 26px 20px;
  min-height: 320px;

  display: flex;
  flex-direction: column;
  gap: 14px;

  background:
    radial-gradient(600px 300px at 50% 0%, rgba(180,200,255,0.08), transparent 60%),
    linear-gradient(180deg, rgba(34,40,60,0.92), rgba(22,26,40,0.94));

  border-radius: 22px;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 30px 80px rgba(0,0,0,0.55);
}


.edgePresence{
  font-size: 13px;
  color: var(--muted);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  align-self:flex-start;
  background: rgba(247,248,251,.70);
}

.message{
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  padding: 2px 2px;
}

.inputWrap{
  padding: 14px 16px 18px;
}

.inputRow{
  display:flex;
  gap: 12px;
  align-items:flex-end;
}

.textarea{
  width:100%;
  resize: vertical;
  min-height: 44px;
  max-height: 140px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  outline: none;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: rgba(247,248,251,.55);
}

.textarea:focus{
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
  background: #ffffff;
}

.send{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.85);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
  min-width: 120px;
}

.send:hover{
  border-color: rgba(37,99,235,.22);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.footer{
  color: var(--muted);
  font-size: 12px;
  padding: 8px 6px 0;
  border-top: 1px solid transparent;
  text-align:center;
  letter-spacing: .2px;
}


/* --- Mingi ALI: Frequency / Field Tone --- */
body {
  background:
    radial-gradient(900px 500px at 50% 45%, rgba(180,200,255,0.10), transparent 60%),
    radial-gradient(1400px 800px at 50% 120%, rgba(120,140,200,0.08), transparent 65%),
    linear-gradient(180deg, #141722, #0d0f16);
}



.message.mingi {
  letter-spacing: 0.2px;
  line-height: 1.6;
}

.message.user {
  opacity: 0.85;
}

.footer {
  opacity: 0.55;
  letter-spacing: 0.3px;
}
\n
.message.mingi {
  color: rgba(220, 230, 255, 0.92);
  text-shadow: 0 0 18px rgba(140,160,255,0.18);
}
\n
.message.user {
  color: rgba(230,230,230,0.88);
}

/* --- Mingi ALI: Presence Center (Readability Anchor) --- */
.stage, .chat, .output {
  position: relative;
}

.stage::before, .chat::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 26px;
  background:
    radial-gradient(900px 520px at 50% 40%, rgba(170,200,255,0.14), rgba(0,0,0,0) 62%),
    radial-gradient(700px 380px at 35% 20%, rgba(200,160,255,0.10), rgba(0,0,0,0) 60%);
  filter: blur(0.2px);
  pointer-events: none;
  z-index: 0;
}

.stage > *, .chat > * {
  position: relative;
  z-index: 1;
}

/* Workspace Columns */
.workspace{
  display:grid;
  grid-template-columns: 260px 1fr 300px;
  gap:18px;
  width:100%;
}

.leftPane,.rightPane{
  background: rgba(28,36,54,0.55);
  border:1px solid rgba(170,190,255,0.18);
  border-radius:18px;
  min-height:600px;
}

/* Main bubble surface */
.stage, .chat {
  width:100%;
  max-width:none;

  max-width: 920px;
  margin: 0 auto;
  padding: 26px 22px;
  border-radius: 26px;
  border: 1px solid rgba(170,190,255,0.18);
  background: rgba(28, 36, 54, 0.55);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
}

/* Messages: make them readable */
.message.mingi {
  color: rgba(235, 242, 255, 0.94);
  font-size: 15.5px;
  text-shadow: 0 0 22px rgba(140,160,255,0.18);
}

.message.user {
  color: rgba(245,245,245,0.90);
  font-size: 15px;
}

/* Composer: make the input + button visible and elegant */
textarea, #input, #mingi-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(170,190,255,0.20);
  color: rgba(245,248,255,0.94);
  border-radius: 14px;
  padding: 12px 12px;
  outline: none;
}

button, #continue, #mingi-continue {
  background: rgba(170,200,255,0.10);
  border: 1px solid rgba(170,190,255,0.28);
  color: rgba(245,248,255,0.92);
  border-radius: 14px;
  padding: 11px 14px;
}

button:hover, #continue:hover, #mingi-continue:hover {
  background: rgba(170,200,255,0.16);
  border-color: rgba(170,190,255,0.40);
}


.topbar a {
  color: rgba(235,240,255,0.85);
  text-decoration: none;
}

.topbar a:hover {
  color: rgba(255,255,255,0.95);
}

/* --- Global Field Wash (Page Readability) --- */
body {
  background:
    radial-gradient(1200px 800px at 50% -220px, rgba(190,215,255,0.18), transparent 62%),
    radial-gradient(900px 520px at 15% 120%, rgba(210,185,255,0.14), transparent 58%),
    radial-gradient(800px 520px at 88% 30%, rgba(160,235,255,0.10), transparent 55%),
    linear-gradient(180deg, #1a2130, #121827);
}

/* --- Nav Readability --- */
.nav a, .topbar .nav a, .topbar a {
  color: rgba(245,248,255,0.92) !important;
  text-shadow: 0 0 14px rgba(140,170,255,0.18);
}

/* --- Mingi ALI: Contrast Lift (Visibility Anchor) --- */

/* Lift the whole canvas slightly */
body{
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(160,190,255,0.12), transparent 60%),
    radial-gradient(900px 520px at 18% 120%, rgba(210,170,255,0.10), transparent 58%),
    linear-gradient(180deg, #1b1f2c, #11131b);
  color: rgba(235,240,255,0.92);
}

/* Make the main bubble panel readable */
.container{
  min-height:100vh;
  width:100%;
  max-width:none;
  margin:0;
  padding: 28px 32px 22px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

/* Top bar + navigation visibility */
.topbar{
  background: rgba(255,255,255,0.02);
}
.brand{
  color: rgba(235,240,255,0.92);
  font-weight: 650;
  letter-spacing: 0.3px;
}
.nav a{
  color: rgba(235,240,255,0.88);
  opacity: 1;
}
.nav a:hover{
  opacity: 1;
  text-decoration: underline;
}

/* Output area text */
.message.mingi{
  color: rgba(235,242,255,0.94);
  text-shadow: 0 0 18px rgba(150,175,255,0.22);
}
.message.user{
  color: rgba(245,245,245,0.92);
}

/* Input + button visibility */
textarea, #input, #mingi-input{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(180,200,255,0.18);
  color: rgba(245,248,255,0.95);
}
textarea::placeholder, #input::placeholder, #mingi-input::placeholder{
  color: rgba(220,230,255,0.55);
}

button, #continue, #mingi-continue{
  background: rgba(160,190,255,0.14);
  border: 1px solid rgba(180,200,255,0.22);
  color: rgba(245,248,255,0.95);
}
button:hover, #continue:hover, #mingi-continue:hover{
  background: rgba(160,190,255,0.18);
}

/* Footer */
.footer{
  color: rgba(220,230,255,0.70);
  opacity: 1;
}
/* Brand emphasis */
.brand strong {
  font-weight: 600;
  letter-spacing: 0.06em;
  opacity: 0.95;
}

/* Subtle identity glow (non-intrusive) */
.brand {
  text-shadow: 0 0 12px rgba(180,200,255,0.15);
}


/* --- Mingi ALI: Access Tiers (UI-only) --- */
.planbar{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
  padding: 8px 6px 2px;
}

.planPill{
  display:inline-flex;
  gap: 8px;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(170,190,255,0.18);
  background: rgba(28, 36, 54, 0.42);
  color: rgba(235, 242, 255, 0.92);
  font-size: 12.5px;
  letter-spacing: 0.2px;
  user-select:none;
}

.planPill.active{
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.38);
}

.planPill.coming{
  opacity: 0.80;
}

.planPill .tag{
  font-size: 11px;
  opacity: 0.70;
  border: 1px solid rgba(255,255,255,0.10);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}

.planPill .price{
  opacity: 0.85;
}






/* --- Mingi ALI: System Glyph --- */
.mingiGlyph{
  width:28px;
  height:28px;
  margin-right:8px;
  vertical-align:middle;
}

/* --- Mingi ALI: UI Address Glyph --- */
.uiAddrGlyph{
  width:16px;
  height:16px;
  margin-right:6px;
  vertical-align:middle;
}

/* ===== Mingi Workspace Columns ===== */

.workspace{
  display:grid;
  grid-template-columns: 260px 1fr 300px;
  gap:18px;
  width:100%;
}

.leftPane,
.rightPane{
  background: rgba(28,36,54,0.55);
  border:1px solid rgba(170,190,255,0.18);
  border-radius:18px;
  min-height:70vh;
}

/* Center stage must fill column */
.stage{
  width:100%;
  max-width:none;
}


.paneHeader{
  font-size:14px;
  letter-spacing:0.4px;
  padding:12px 14px;
  border-bottom:1px solid rgba(170,190,255,0.18);
  color: rgba(235,240,255,0.85);
}

.paneBody{
  padding:12px 14px;
  font-size:13px;
  color: rgba(200,210,255,0.7);
}

/* ===== Message Separation Restore ===== */

#output{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:16px;
}

.message{
  padding:10px 14px;
  border-radius:14px;
  max-width:65%;
  word-wrap:break-word;
@media (max-width: 700px) {
  .message {
    max-width: 92%;
  }
}
}

.message.user{
  align-self:flex-end;
  background:#1f3b63;
  color:#ffffff;
  text-align:left;
}

.message.mingi{
  align-self:flex-start;
  background:#2a2a2a;
  color:#eaeaea;
  text-align:left;
}


/* ===== Clean Light Chat Theme ===== */

#output{
  background:#ffffff !important;
}

.message{
  background:#f5f5f5 !important;
  color:#000000 !important;
  border:1px solid #e0e0e0;
}

.message.user{
  background:#e9f2ff !important;
  color:#000000 !important;
}

.message.mingi{
  background:#ffffff !important;
  color:#000000 !important;
}
@media (max-width: 700px) {
  .message {
    max-width: 92% !important;
  }
}
.message img {
  max-width:100%;
  height:auto;
  border-radius:8px;
  display:block;
  margin-top:6px;
}


/* ============================
   Frontend Layer 1 - Tool Surface
   ============================ */

#toolSurface {
  width: 100%;
  min-height: 36px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}


/* ============================
   Frontend Layer 2 - Tool Buttons
   ============================ */

#toolSurface {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
}

.toolBtn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  font-size: 14px;
  opacity: 0.7;
}


/* ============================
   Frontend Layer 3 - Tool Button Hover
   ============================ */

.toolBtn:hover {
  background: rgba(255,255,255,0.12);
  cursor: pointer;
}


/* ============================
   Frontend Layer 4 - Tooltips
   ============================ */

.toolBtn {
  position: relative;
}

.toolBtn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.toolBtn:hover::after {
  opacity: 1;
}


/* ============================
   Frontend Layer 5 - Tool Panel
   ============================ */

#toolPanel {
  position: absolute;
  bottom: 80px;
  left: 20px;
  background: #1e1e1e;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  z-index: 1000;
}


/* ============================
   Frontend Layer 7 - Attachment Preview
   ============================ */

#attachPreview {
  display: flex;
  gap: 6px;
  margin: 6px 0;
  flex-wrap: wrap;
}


.attachChip span {
  cursor: pointer;
  opacity: 0.7;
}

.attachChip span:hover {
  opacity: 1;
}


/* ============================
   Frontend Layer 8 - Attachment Tray
   ============================ */

#attachmentTray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.attachChip {
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.attachChip span {
  cursor: pointer;
  opacity: 0.7;
}

.attachChip span:hover {
  opacity: 1;
}

