/* ============ Status Maker — component styles ============ */
:root{
  --brand:#6366f1;
  --brand-400:#818cf8;
  --brand-600:#4f46e5;
  --ink-950:#0b0d11;
  --ink-900:#0f1115;
  --ink-850:#13161c;
  --ink-800:#171a21;
  --ink-700:#1e222b;
  --ink-600:#2a303c;
  --ink-500:#3a4250;
}
*{ -webkit-tap-highlight-color: transparent; }
html,body{ margin:0; padding:0; }
body{ font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

/* scrollbars */
.panel-body::-webkit-scrollbar, .layers-list::-webkit-scrollbar, .modal-body::-webkit-scrollbar{ width:10px; }
.panel-body::-webkit-scrollbar-thumb, .layers-list::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb{
  background:#2a303c; border-radius:10px; border:3px solid transparent; background-clip:padding-box;
}
.panel-body::-webkit-scrollbar-track{ background:transparent; }

/* logo */
.logo-mark{
  width:32px;height:32px;border-radius:9px;display:grid;place-items:center;font-weight:800;font-size:13px;color:#fff;
  background:linear-gradient(135deg,#6366f1,#ec4899); box-shadow:0 4px 14px rgba(99,102,241,.4);
}
.brand-logo{ width:34px; height:34px; border-radius:9px; object-fit:contain; background:#13161c; box-shadow:0 4px 14px rgba(0,0,0,.4); }

/* hero / welcome splash */
.hero{
  position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:24px;
  background:radial-gradient(circle at 50% 0%, #1b1f2b, #0b0d11 68%); overflow:hidden;
  transition:opacity .4s ease, visibility .4s ease;
}
.hero.hide{ opacity:0; visibility:hidden; pointer-events:none; }
.hero-glow{ position:absolute; width:620px;height:620px; border-radius:50%; filter:blur(90px); opacity:.45;
  background:radial-gradient(circle,#6366f1, transparent 60%); top:-160px; }
.hero-inner{ position:relative; text-align:center; max-width:560px; display:flex; flex-direction:column; align-items:center; gap:16px; }
.hero-logo{ width:min(240px,52vw); height:auto; filter:drop-shadow(0 16px 40px rgba(0,0,0,.5)); animation:floaty 4s ease-in-out infinite; }
@keyframes floaty{ 0%,100%{ transform:translateY(0) } 50%{ transform:translateY(-10px) } }
.hero-title{ font-size:clamp(34px,7vw,54px); font-weight:800; letter-spacing:-.02em; line-height:1; }
.hero-title span{ background:linear-gradient(135deg,#818cf8,#ec4899); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero-sub{ color:#94a3b8; font-size:clamp(13px,3.4vw,15px); line-height:1.6; max-width:440px; }
.hero-chips{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.hero-chips span{ font-size:11px; font-weight:600; color:#c7d2fe; background:rgba(99,102,241,.14); border:1px solid rgba(99,102,241,.35); padding:6px 12px; border-radius:999px; }
.hero-cta{ height:50px; padding:0 34px; font-size:15px; border-radius:14px; margin-top:6px; }
.hero-note{ font-size:11.5px; color:#64748b; }

/* topbar */
.topbar{ background:rgba(15,17,21,.92); backdrop-filter:blur(12px); border-bottom:1px solid var(--ink-600); }

/* buttons */
.icon-btn{
  min-width:36px;height:36px;padding:0 8px;border-radius:9px;display:inline-grid;place-items:center;
  color:#cbd5e1;font-size:16px;line-height:1;background:transparent;border:1px solid transparent;cursor:pointer;
  transition:.15s background,.15s color,.15s border-color; touch-action:manipulation;
}
.icon-btn:hover{ background:var(--ink-700); color:#fff; }
.icon-btn:active{ transform:scale(.95); }
.icon-btn.sm{ min-width:28px;height:28px;font-size:13px; }
.icon-btn.active{ background:var(--brand); color:#fff; }
.btn-brand{
  height:38px;padding:0 14px;border-radius:10px;font-weight:600;font-size:13px;color:#fff;cursor:pointer;border:0;
  background:linear-gradient(135deg,#6366f1,#8b5cf6); box-shadow:0 4px 14px rgba(99,102,241,.35); transition:.15s;
}
.btn-brand:hover{ filter:brightness(1.08); }
.btn-brand:active{ transform:scale(.97); }
.btn-ghost{
  height:34px;padding:0 12px;border-radius:9px;font-weight:500;font-size:12.5px;color:#cbd5e1;cursor:pointer;
  background:var(--ink-700); border:1px solid var(--ink-600); transition:.15s;
}
.btn-ghost:hover{ background:var(--ink-600); color:#fff; }
.tbtn{
  flex:1;height:32px;border-radius:8px;font-size:12.5px;color:#cbd5e1;background:var(--ink-700);border:1px solid var(--ink-600);
  cursor:pointer;padding:0 6px;transition:.15s;white-space:nowrap;
}
.tbtn:hover{ background:var(--ink-600); color:#fff; }
.tbtn.active{ background:var(--brand); border-color:var(--brand); color:#fff; }

/* fields */
.field{
  background:var(--ink-900); border:1px solid var(--ink-600); border-radius:8px; color:#e2e8f0;
  padding:8px 10px; font-size:13px; outline:none; width:100%;
}
.field:focus{ border-color:var(--brand); }
select.field{ appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%2394a3b8' stroke-width='1.6' fill='none'/></svg>"); background-repeat:no-repeat; background-position:right 8px center; padding-right:26px; }
.mini-field{ display:flex; flex-direction:column; gap:5px; font-size:11.5px; color:#94a3b8; font-weight:500; }
.mini-field select, .mini-field input[type=color]{ margin-top:2px; }
input[type=range]{ -webkit-appearance:none; appearance:none; height:5px; border-radius:5px; background:var(--ink-600); outline:none; width:100%; margin-top:4px; }
input[type=range]::-webkit-slider-thumb{ -webkit-appearance:none; width:16px;height:16px;border-radius:50%; background:var(--brand-400); cursor:pointer; border:2px solid #0f1115; box-shadow:0 0 0 1px var(--brand-600); }
input[type=color]{ width:100%; height:34px; border:1px solid var(--ink-600); border-radius:8px; background:var(--ink-900); cursor:pointer; padding:2px; }
.check{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:#cbd5e1; }
.check input{ width:16px;height:16px; accent-color:var(--brand); }
.hint{ font-size:11.5px; color:#64748b; line-height:1.5; }

/* panels */
.side-panel{ background:var(--ink-850); }
.left-panel{ width:280px; border-right:1px solid var(--ink-600); }
.right-panel{ width:288px; border-left:1px solid var(--ink-600); }
.panel-head{ height:48px; display:flex; align-items:center; justify-content:space-between; padding:0 14px; border-bottom:1px solid var(--ink-600); }
.panel-title{ font-size:13px; font-weight:600; color:#e2e8f0; letter-spacing:.02em; }
.panel-body{ flex:1; overflow-y:auto; overflow-x:hidden; padding:14px; }
.sec-title{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:#64748b; margin:0 0 8px; }

/* rail */
.rail-btn{ width:56px;padding:8px 0;border-radius:10px;display:flex;flex-direction:column;align-items:center;gap:3px;color:#94a3b8;background:transparent;border:0;cursor:pointer;transition:.15s; }
.rail-btn span{ font-size:19px; line-height:1; }
.rail-btn em{ font-size:10px; font-style:normal; }
.rail-btn:hover{ background:var(--ink-700); color:#fff; }
.rail-btn.active{ background:rgba(99,102,241,.16); color:#c7d2fe; }

/* workspace */
.workspace{
  position:relative; display:grid; place-items:center; overflow:auto; padding:24px;
  background:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(circle at 50% 0%, #14171e, #0b0d11 70%);
}
#canvas-wrap{ margin:auto; position:relative; box-shadow:0 10px 40px rgba(0,0,0,.55); border-radius:3px; }
#canvas-wrap .canvas-container{ transform-origin:top left; }
.canvas-container{ background:#fff; }

/* floating actions (mobile) */
.float-actions{
  position:absolute; left:50%; transform:translateX(-50%); bottom:14px; display:flex; gap:6px; padding:6px;
  background:rgba(19,22,28,.96); border:1px solid var(--ink-600); border-radius:14px; box-shadow:0 10px 30px rgba(0,0,0,.5); z-index:30;
}
.float-actions .icon-btn{ min-width:40px;height:40px;font-size:17px; }

/* layers */
.layers-list{ display:flex; flex-direction:column; gap:4px; }
.layer-row{ display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:8px; border:1px solid transparent; cursor:pointer; font-size:12.5px; color:#cbd5e1; }
.layer-row:hover{ background:var(--ink-700); }
.layer-row.active{ background:rgba(99,102,241,.16); border-color:rgba(99,102,241,.5); color:#e0e7ff; }
.layer-row .licon{ width:20px;text-align:center;opacity:.8; }
.layer-row .lname{ flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.layer-row .lbtn{ opacity:.6; font-size:13px; }
.layer-row .lbtn:hover{ opacity:1; color:#fff; }

/* shapes / swatches */
.shape-btn{ aspect-ratio:1; border-radius:9px; background:var(--ink-700); border:1px solid var(--ink-600); display:grid; place-items:center; cursor:pointer; transition:.15s; }
.shape-btn:hover{ background:var(--ink-600); }
.shape-btn svg{ width:24px;height:24px; fill:#cbd5e1; }
.swatch{ aspect-ratio:1; border-radius:7px; border:1px solid rgba(255,255,255,.14); cursor:pointer; }
.swatch:hover{ outline:2px solid var(--brand-400); outline-offset:1px; }
.grad-swatch{ height:40px; border-radius:9px; cursor:pointer; border:1px solid rgba(255,255,255,.14); }
.pat-swatch{ aspect-ratio:1; border-radius:9px; cursor:pointer; border:1px solid rgba(255,255,255,.14); background-size:cover; }
.emoji-btn{ aspect-ratio:1; border-radius:8px; display:grid; place-items:center; cursor:pointer; font-size:20px; transition:.15s; }
.emoji-btn:hover{ background:var(--ink-600); transform:scale(1.1); }

/* text add buttons */
.text-add{ width:100%; text-align:left; padding:10px 12px; border-radius:10px; background:var(--ink-700); border:1px solid var(--ink-600); color:#e2e8f0; cursor:pointer; display:flex; flex-direction:column; gap:2px; }
.text-add:hover{ background:var(--ink-600); }
.text-add b{ font-size:17px; }
.text-add span{ font-size:11px; color:#94a3b8; }
.text-add small{ font-size:13px; }

/* templates */
.tpl-card{ border-radius:10px; overflow:hidden; border:1px solid var(--ink-600); cursor:pointer; background:var(--ink-700); transition:.15s; }
.tpl-card:hover{ border-color:var(--brand); transform:translateY(-2px); }
.tpl-thumb{ width:100%; aspect-ratio:9/16; display:grid; place-items:center; color:#fff; font-weight:800; text-align:center; font-size:13px; padding:8px; }
.tpl-name{ font-size:10.5px; color:#94a3b8; padding:5px 7px; }

/* mobile tabs */
.mobile-tabs{
  display:flex; height:60px; background:rgba(15,17,21,.96); backdrop-filter:blur(12px); border-top:1px solid var(--ink-600);
  padding-bottom:env(safe-area-inset-bottom);
}
.mtab{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; background:none; border:0; color:#94a3b8; font-size:10px; cursor:pointer; }
.mtab span{ font-size:19px; }
.mtab.active{ color:#c7d2fe; }

/* backdrop + sheets */
.backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:45; }
.sheet-close{ min-width:32px;height:32px;border-radius:8px;background:transparent;border:0;color:#94a3b8;font-size:15px;cursor:pointer; }
.sheet-close:hover{ background:var(--ink-700); color:#fff; }

/* modal */
.modal{ position:fixed; inset:0; z-index:60; display:grid; place-items:center; background:rgba(0,0,0,.6); padding:16px; }
.modal-card{ width:min(420px,100%); background:var(--ink-850); border:1px solid var(--ink-600); border-radius:16px; overflow:hidden; box-shadow:0 24px 70px rgba(0,0,0,.6); }
.modal-head{ height:52px; display:flex; align-items:center; justify-content:space-between; padding:0 16px; border-bottom:1px solid var(--ink-600); }
.modal-head h3{ font-size:14px; font-weight:600; }
.modal-body{ padding:16px; }
.modal-foot{ display:flex; justify-content:flex-end; gap:8px; padding:12px 16px; border-top:1px solid var(--ink-600); }

/* toast */
.toast{
  position:fixed; left:50%; bottom:80px; transform:translate(-50%,20px); z-index:80;
  background:#1e222b; border:1px solid var(--ink-600); color:#e2e8f0; padding:10px 16px; border-radius:12px;
  font-size:13px; opacity:0; pointer-events:none; transition:.25s; box-shadow:0 10px 30px rgba(0,0,0,.5); max-width:90vw; text-align:center;
}
.toast.show{ opacity:1; transform:translate(-50%,0); }

/* prop rows */
.prop-row{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.prop-chip{ display:flex; align-items:center; gap:6px; }
.prop-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }

/* ============ MOBILE (bottom sheets) ============ */
@media (max-width: 767px){
  .side-panel{
    position:fixed; left:0; right:0; bottom:0; top:auto; width:100% !important; max-height:76dvh; height:auto;
    border-radius:18px 18px 0 0; border:1px solid var(--ink-600); z-index:50; transform:translateY(105%);
    transition:transform .28s cubic-bezier(.4,0,.2,1); padding-bottom:env(safe-area-inset-bottom);
    box-shadow:0 -14px 40px rgba(0,0,0,.55);
  }
  .side-panel.open{ transform:translateY(0); }
  .panel-body{ max-height:60dvh; }
  .right-panel{ border-left:1px solid var(--ink-600); }
  .workspace{ padding:12px; }
  .modal{ place-items:end center; }
}
@media (min-width:768px){
  .side-panel{ transition:none; }
  .side-panel.collapsed{ display:none; }
}
