:root{
  /* Light graphite product theme */
  --bg:#eef2f7;
  --bg2:#f7f9fc;

  --text:#0b1020;
  --muted:#5b657a;

  --card: rgba(255,255,255,.72);
  --card2: rgba(255,255,255,.86);
  --border: rgba(15, 25, 45, .08);

  --p1:#60a5fa;   /* blue */
  --p2:#34d399;   /* green/teal */
  --p3:#a78bfa;   /* violet */

  --radius:26px;

  --shadowA: 0 22px 55px rgba(10, 14, 25, .12);
  --shadowB: 0 10px 25px rgba(10, 14, 25, .10);

  --ring: 0 0 0 6px rgba(96,165,250,.18);
}

*{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(900px 480px at 18% 10%, rgba(96,165,250,.20), transparent 60%),
    radial-gradient(900px 520px at 82% 18%, rgba(52,211,153,.18), transparent 60%),
    radial-gradient(900px 540px at 50% 92%, rgba(167,139,250,.16), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  overflow-x:hidden;
}

.bg{position:fixed; inset:0; pointer-events:none; z-index:-5}
.bgGlow{
  position:absolute; inset:-140px;
  background:
    radial-gradient(600px 420px at 20% 15%, rgba(96,165,250,.22), transparent 60%),
    radial-gradient(700px 520px at 80% 20%, rgba(52,211,153,.18), transparent 62%),
    radial-gradient(750px 560px at 50% 100%, rgba(167,139,250,.16), transparent 65%);
  filter: blur(1px);
  opacity:.95;
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe{
  0%,100%{transform:translate3d(0,0,0) scale(1)}
  50%{transform:translate3d(0,-10px,0) scale(1.02)}
}
.bgNoise{
  position:absolute; inset:0;
  opacity:.16;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.nav{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background: rgba(255,255,255,.55);
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand{display:flex; gap:10px; align-items:center; text-decoration:none; color:var(--text)}
.brandMark{
  width:38px; height:38px; border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(96,165,250,.95), rgba(52,211,153,.92));
  color:#071022;
  font-weight:950;
  box-shadow: 0 14px 28px rgba(96,165,250,.16);
}
.brandText{display:flex; flex-direction:column; line-height:1}
.brandName{font-weight:900; letter-spacing:.2px}
.brandTag{font-size:12px; color:var(--muted); margin-top:2px}

.menuBtn{
  width:44px; height:40px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.65);
  box-shadow: var(--shadowB);
}
.menuBtn span{
  display:block; height:2px; margin:6px 12px; border-radius:9px;
  background: rgba(10,14,25,.55);
}

.wrap{width:min(1120px, 92vw); margin:0 auto; padding: 28px 0 70px;}
.hero{padding: 18px 0 10px;}
.pill{
  display:inline-flex;
  padding: 8px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.62);
  border:1px solid var(--border);
  color: rgba(10,14,25,.60);
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
h1{
  margin:16px 0 10px;
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing:-.03em;
  line-height:1.02;
}
.grad{
  background: linear-gradient(135deg, var(--p1), var(--p2), var(--p3));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.sub{margin: 0; color:var(--muted); max-width: 680px}

/* TOOL */
.toolCard{
  margin-top: 18px;
  border-radius: var(--radius);
  background: var(--card);
  border:1px solid var(--border);
  box-shadow: var(--shadowA);
  padding: 16px;
  backdrop-filter: blur(16px);
}
.toolTop{display:flex; justify-content:space-between; align-items:center; gap:12px}
.toolTitle{font-weight:950; letter-spacing:.2px}
.toolMeta{font-size:12px; color:var(--muted)}
.toolBadge{
  padding:8px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.80);
  border:1px solid var(--border);
  color: rgba(10,14,25,.7);
  font-weight:800;
}

.inputShell{
  margin-top: 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.70);
  border:1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  overflow:hidden;
}
textarea{
  width:100%;
  min-height: 150px;
  border:0;
  outline: none;
  resize: vertical;
  padding: 14px 14px 10px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
textarea:focus{box-shadow: var(--ring)}
.inputHint{
  padding: 0 14px 12px;
  font-size:12px;
  color: rgba(10,14,25,.55);
}

.toolActions{display:flex; gap:12px; margin-top: 12px; flex-wrap:wrap}
.btnPrimary{
  flex: 1 1 260px;
  height: 50px;
  border-radius: 18px;
  border:1px solid rgba(10,14,25,.08);
  background: linear-gradient(135deg, rgba(96,165,250,.92), rgba(52,211,153,.92));
  color:#071022;
  font-weight:950;
  cursor:pointer;
  box-shadow: 0 14px 26px rgba(52,211,153,.18);
  display:flex; align-items:center; justify-content:center; gap:10px;
  transition: transform .18s ease;
}
.btnPrimary:active{transform: translateY(1px)}
.btnGhost{
  flex: 0 0 170px;
  height: 50px;
  border-radius: 18px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  color: rgba(10,14,25,.85);
  font-weight:850;
  cursor:pointer;
  box-shadow: var(--shadowB);
}
.btnGhost:hover{background: rgba(255,255,255,.88)}

.microRow{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  margin-top: 12px;
  color: rgba(10,14,25,.62);
  font-size:12px;
}
.dot{width:7px;height:7px;border-radius:99px; background: var(--p2); box-shadow: 0 0 18px rgba(52,211,153,.35)}
.sep{opacity:.4}

/* VISUAL STRIP */
.visualStrip{
  margin-top: 16px;
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow: var(--shadowA);
  background: rgba(255,255,255,.70);
  position:relative;
  min-height: 190px;
}
.visualMedia{
  position:absolute; inset:0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.02);
  transition: opacity .6s ease;
}
.visualOverlay{
  position:relative;
  padding: 18px;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.75));
}
.visualTitle{font-weight:950; letter-spacing:-.02em}
.visualSub{color: rgba(10,14,25,.62); font-size:13px; margin-top:4px}
.visualDots{
  position:absolute; right:14px; bottom:14px;
  display:flex; gap:6px;
}
.vd{
  width:8px;height:8px;border-radius:99px;
  background: rgba(10,14,25,.18);
}
.vd.on{background: rgba(10,14,25,.46)}

/* 3 MODES */
.modes{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
.mode{
  border-radius: var(--radius);
  background: rgba(255,255,255,.70);
  border:1px solid var(--border);
  box-shadow: var(--shadowB);
  padding: 14px;
}
.mode .n{font-weight:950; color: rgba(10,14,25,.55)}
.mode .t{font-weight:950; margin-top:6px}
.mode .d{color: var(--muted); font-size:13px; margin-top:4px}

.foot{
  margin-top: 28px;
  color: rgba(10,14,25,.55);
  text-align:center;
  font-size:12px;
}

/* OVERLAY RESULT */
.overlay{
  position:fixed; inset:0;
  display:none;
  z-index:80;
}
.overlay.on{display:block}
.overlayDim{
  position:absolute; inset:0;
  background: rgba(10,14,25,.30);
  backdrop-filter: blur(6px);
}

.drawer{
  position:absolute;
  left:50%;
  bottom:18px;
  transform: translateX(-50%) translateY(12px);
  width:min(720px, 94vw);
  border-radius: 28px;
  background: rgba(255,255,255,.82);
  border:1px solid var(--border);
  box-shadow: 0 30px 80px rgba(10,14,25,.22);
  overflow:hidden;
  opacity:0;
  transition: transform .28s ease, opacity .28s ease;
}
.overlay.on .drawer{opacity:1; transform: translateX(-50%) translateY(0)}

@media (min-width: 980px){
  .drawer{
    left:auto; right:18px; top:84px; bottom:auto;
    transform: translateX(0) translateY(12px);
    width: 440px;
    border-radius: 26px;
  }
  .overlay.on .drawer{transform: translateX(0) translateY(0)}
}

.drawerTop{
  display:flex; justify-content:space-between; align-items:center;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(10,14,25,.08);
}
.drawerTitle{font-weight:950}
.drawerMeta{font-size:12px; color: var(--muted); margin-top:2px}

.xBtn{
  width:40px;height:40px;border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  cursor:pointer;
}

.drawerBody{padding: 12px 14px 14px; max-height: 55vh; overflow:auto}
.block{
  border-radius: 18px;
  border:1px solid rgba(10,14,25,.08);
  background: rgba(255,255,255,.85);
  box-shadow: 0 10px 24px rgba(10,14,25,.08);
  padding: 12px 12px;
  margin-top: 10px;
}
.k{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color: rgba(10,14,25,.55);
  margin-bottom:6px;
}
.v{color: rgba(10,14,25,.86); font-size:14px; line-height:1.45}

.skeleton{
  background: linear-gradient(90deg,
    rgba(10,14,25,.08),
    rgba(10,14,25,.04),
    rgba(10,14,25,.08));
  background-size: 200% 100%;
  animation: sk 1.1s linear infinite;
  border-radius: 14px;
  height: 12px;
  margin-top: 10px;
}
@keyframes sk{to{background-position: -200% 0}}

.drawerBottom{
  padding: 12px 14px 14px;
  display:flex; gap:10px; flex-wrap:wrap;
  border-top: 1px solid rgba(10,14,25,.08);
}
.btnSmall{
  flex:1 1 160px;
  height:44px;
  border-radius: 16px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.80);
  cursor:pointer;
  font-weight:900;
}
.btnSmall:hover{background: rgba(255,255,255,.92)}

@media (max-width: 860px){
  .modes{grid-template-columns:1fr}
  .btnGhost{flex:1 1 200px}
}