:root{
  --ink:#0D1512; --ink-soft:#182420; --ink-line:#1E2E28; --ink-line-soft:#20302A;
  --emerald:#10B981; --emerald-deep:#059669;
  --text-light:#F1EEE7; --text-dim:#93A39B; --danger:#E15B4D; --amber:#E8B25C;
  --chk1:#1a2420; --chk2:#0f1915;
}
*{ box-sizing:border-box; }
[hidden]{ display:none !important; }
html,body{ margin:0; padding:0; }
body{
  background:var(--ink); color:var(--text-light); font-family:'Inter',sans-serif;
  min-height:100vh; padding-bottom:40px;
}

/* ---- Topbar + hint (sama dengan tool lain) ---- */
.topbar{
  display:flex; align-items:center; gap:12px; padding:16px 20px;
  border-bottom:1px solid var(--ink-line);
}
.back-btn{
  width:34px; height:34px; border-radius:10px; background:var(--ink-soft);
  border:1px solid var(--ink-line); color:var(--text-light);
  display:flex; align-items:center; justify-content:center; text-decoration:none; flex-shrink:0;
}
.back-btn svg{ width:18px; height:18px; }
.topbar-brand{
  display:flex; align-items:center; gap:10px;
  font-family:'Space Grotesk',sans-serif; font-size:17px; font-weight:700; letter-spacing:0.02em;
}
.topbar-icon{
  width:30px; height:30px; border-radius:9px; background:var(--emerald);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.topbar-icon svg{ width:16px; height:16px; color:var(--ink); }

.hint-bar{
  display:flex; align-items:center; gap:8px; color:var(--text-dim); font-size:12.5px;
  padding:12px 20px; border-bottom:1px solid var(--ink-line);
}
.hint-icon{ display:flex; flex-shrink:0; }
.hint-icon svg{ width:15px; height:15px; }

.content{ max-width:520px; margin:0 auto; padding:20px; }

/* ---- Dropzone ---- */
.dropzone{
  border:2px dashed var(--ink-line-soft); border-radius:18px; padding:44px 20px;
  display:flex; flex-direction:column; align-items:center; text-align:center; gap:6px;
  cursor:pointer; transition:border-color 0.15s ease, background 0.15s ease;
}
.dropzone:active, .dropzone.dragover{ border-color:var(--emerald); background:rgba(16,185,129,0.05); }
.dropzone-icon{
  width:52px; height:52px; border-radius:14px; background:var(--ink-soft);
  display:flex; align-items:center; justify-content:center; color:var(--emerald); margin-bottom:6px;
}
.dropzone-icon svg{ width:26px; height:26px; }
.dropzone-title{ font-weight:600; font-size:15px; }
.dropzone-sub{ color:var(--text-dim); font-size:12.5px; }

/* ---- Progress + error ---- */
#prog{ margin-top:16px; }
#bar{ height:8px; border-radius:99px; background:var(--ink-soft); border:1px solid var(--ink-line); overflow:hidden; margin-bottom:8px; }
#bar i{ display:block; height:100%; width:0; background:var(--emerald); transition:width .15s ease; }
#ptxt{ font-size:12.5px; color:var(--text-dim); }
.alert{
  display:flex; align-items:flex-start; gap:8px; margin-top:16px; padding:12px 14px; border-radius:12px;
  color:var(--danger); background:rgba(225,91,77,0.08); border:1px solid rgba(225,91,77,0.3);
  font-size:13px; overflow-wrap:anywhere;
}

/* ---- Langkah ---- */
.steps{ list-style:none; padding:0; margin:26px 0 0; display:grid; gap:12px; }
.steps li{ display:flex; gap:12px; align-items:flex-start; font-size:14px; color:var(--text-dim); line-height:1.45; }
.steps .num{
  flex:none; width:28px; height:28px; border-radius:50%; background:var(--ink-soft);
  border:1px solid var(--ink-line); color:var(--emerald);
  display:grid; place-items:center; font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:13px;
}
.privacy{ margin:18px 0 0; font-size:12.5px; color:var(--text-dim); opacity:.85; }

/* ---- Tombol ---- */
.btn{
  font-family:'Inter',sans-serif; font-weight:600; font-size:14px; border:0; border-radius:12px;
  padding:11px 18px; background:var(--emerald-deep); color:#fff; cursor:pointer; min-height:44px;
  transition:transform 0.1s ease, opacity 0.15s ease;
}
.btn:active{ transform:scale(0.98); }
.btn.ghost{ background:transparent; color:var(--emerald); box-shadow:inset 0 0 0 1.5px var(--emerald-deep); }
.btn.sm{ padding:7px 14px; min-height:36px; font-size:13px; }
.btn:focus-visible,.tab:focus-visible{ outline:3px solid var(--emerald); outline-offset:2px; }

/* ---- Hero hasil ---- */
.hero{ display:flex; gap:14px; align-items:center; }
.poster{
  flex:none; width:96px; height:96px; border-radius:20px; object-fit:cover;
  background:repeating-conic-gradient(var(--chk1) 0 25%, var(--chk2) 0 50%) 0 0/16px 16px;
  border:1px solid var(--ink-line);
}
.hero-body{ min-width:0; }
.hero h2{
  font-family:'Space Grotesk',sans-serif; font-size:19px; line-height:1.2; font-weight:700;
  margin:0 0 4px; overflow-wrap:anywhere;
}
.hero p{ margin:0 0 10px; color:var(--text-dim); font-size:12.5px; line-height:1.4; }
.acts{ display:flex; flex-wrap:wrap; gap:8px; }

/* ---- Tab ---- */
.tabs{ display:flex; gap:6px; overflow-x:auto; margin:22px -20px 0; padding:0 20px 2px; scrollbar-width:none; }
.tabs::-webkit-scrollbar{ display:none; }
.tab{
  flex:none; font-family:'Inter',sans-serif; font-size:13px; font-weight:600; border:1px solid var(--ink-line);
  background:var(--ink-soft); color:var(--text-dim); padding:9px 15px; border-radius:999px; cursor:pointer; min-height:40px;
  transition:background .15s ease, color .15s ease;
}
.tab[aria-selected="true"]{ background:var(--emerald-deep); border-color:var(--emerald-deep); color:#fff; }
.help{ color:var(--text-dim); font-size:12.5px; line-height:1.45; margin:14px 0 4px; }

/* ---- Kartu / grid ---- */
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; margin-top:10px; }
.tile,.row,.fcard{ background:var(--ink-soft); border:1px solid var(--ink-line); border-radius:16px; overflow:hidden; }
.th{
  aspect-ratio:1; display:grid; place-items:center;
  background:repeating-conic-gradient(var(--chk1) 0 25%, var(--chk2) 0 50%) 0 0/16px 16px;
}
.th img{ max-width:100%; max-height:100%; display:block; }
.tb{ padding:10px 12px 12px; }
.tb b,.row b,.fcard b{ display:block; overflow-wrap:anywhere; font-weight:600; font-size:13.5px; }
.meta{ color:var(--text-dim); font-size:12px; overflow-wrap:anywhere; margin-top:2px; }
.chip{
  display:inline-block; background:var(--ink); border:1px solid var(--ink-line); color:var(--text-light);
  border-radius:999px; padding:2px 10px; font-size:11.5px; margin:6px 6px 0 0;
}
.chip.w{ background:rgba(232,178,92,0.1); border-color:rgba(232,178,92,0.3); color:var(--amber); }
.tb .btn{ margin-top:10px; width:100%; }

.list{ display:grid; gap:10px; margin-top:10px; }
.row{ display:flex; gap:12px; padding:10px; }
.row > div:last-child{ min-width:0; }
.rth{
  flex:none; width:56px; height:56px; border-radius:12px; display:grid; place-items:center;
  background:repeating-conic-gradient(var(--chk1) 0 25%, var(--chk2) 0 50%) 0 0/12px 12px;
  overflow:hidden; color:var(--text-dim); font-weight:700;
}
.rth img{ width:100%; height:100%; object-fit:contain; }
.rth.txt{ background:var(--ink); border:1px solid var(--ink-line); color:var(--emerald); font-family:'Space Grotesk',sans-serif; font-size:1.05rem; }
.rth.shp{ background:var(--ink-line); }

.fcard{ padding:14px; margin-top:10px; }
.fprev{
  background:var(--ink); border:1px solid var(--ink-line); border-radius:12px;
  padding:14px; margin:10px 0; overflow-x:auto; white-space:nowrap;
}
.fprev .big{ font-size:2.2rem; line-height:1.2; }
.fprev .sm{ font-size:1.05rem; color:var(--text-dim); }
.fcard .btn{ margin-top:12px; }

/* ---- Kanvas ---- */
.kv{ background:var(--ink-soft); border:1px solid var(--ink-line); border-radius:16px; margin:10px 0 0; padding:0; }
.kv div{ display:flex; justify-content:space-between; gap:16px; padding:12px 14px; border-top:1px solid var(--ink-line); font-size:13.5px; }
.kv div:first-child{ border-top:0; }
.kv dt{ color:var(--text-dim); }
.kv dd{ margin:0; text-align:right; overflow-wrap:anywhere; }
.sw{
  display:inline-block; width:20px; height:20px; border-radius:6px; border:1px solid var(--ink-line-soft);
  vertical-align:middle; margin-left:3px;
}

.note{ margin:28px 0 0; font-size:12px; line-height:1.5; color:var(--text-dim); opacity:.85; }

/* ---- Toast ---- */
.toast{
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(12px);
  background:var(--ink-soft); border:1px solid var(--ink-line); color:var(--text-light);
  padding:11px 18px; border-radius:12px; font-size:13.5px; max-width:calc(100% - 32px);
  display:flex; align-items:center; gap:8px; opacity:0; pointer-events:none;
  transition:opacity 0.2s ease, transform 0.2s ease; box-shadow:0 12px 28px -10px rgba(0,0,0,0.5);
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.toast svg{ width:17px; height:17px; color:#5FD98A; flex-shrink:0; }
#toastMsg{ overflow-wrap:anywhere; }

/* ---- Pratinjau desain ---- */
.seg{ display:flex; gap:6px; flex-wrap:wrap; margin:12px 0 4px; }
.seg .tab{ min-height:36px; padding:7px 13px; font-size:12.5px; }
.pv-stage{
  margin-top:10px; border:1px solid var(--ink-line); border-radius:16px; overflow:hidden;
  background:repeating-conic-gradient(var(--chk1) 0 25%, var(--chk2) 0 50%) 0 0/16px 16px;
}
.pv-canvas{ display:block; width:100%; height:auto; }
.pv-acts{ margin-top:12px; }
.pv-cap{ margin-top:18px; }
.pv-thumb{
  display:block; width:132px; max-width:50%; height:auto; margin-top:8px; border-radius:12px;
  border:1px solid var(--ink-line); background:var(--ink-soft);
}
