/* Generate Image by Vectracer.
   Palet mengikuti brand Vectracer (teal gelap, teal, mint, tinta hijau).
   Tata letak: ruang kendali teal gelap di kiri + kanvas hasil terang di kanan. */

:root{
  /* Sisi terang: palet Auto Metadata / Vectracer.com (#f5faf9, #eef8f6, #d9efec, #dbe6e3, #17302f, #647774, #137f77).
     Sisi gelap: hampir hitam #030e0d. */

  /* Pita bawah (gelap). */
  --bg:#030e0d;
  --surface:#0a1c1a;
  --ink:#ffffff;
  --ink-2:#c8ddd8;
  --muted:#8ea6a1;
  --line:#0f2523;
  --line-2:#183532;
  --brand:#137f77;
  --brand-hover:#0f6862;
  --brand-50:#061a18;
  --brand-100:#0d2a27;
  --danger:#f2a49b;
  --pill-on-bg:#137f77;
  --pill-on-ink:#ffffff;
  --focus:#ffffff;
  --tex:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M.5 0V32M0 .5H32' fill='none' stroke='%230b1d1b' stroke-width='1'/%3E%3C/svg%3E");
  --tex-light:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Ccircle cx='8.0' cy='8.0' r='1.1' fill='%23d9e6e3'/%3E%3C/svg%3E");

  /* Pita atas (cerah): warna persis Auto Metadata / Vectracer.com. */
  --con:#f5faf9;
  --con-deep:#ffffff;
  --con-line:#dbe6e3;
  --con-ink:#17302f;
  --con-muted:#647774;
  --con-sel:#137f77;
  --con-sel-strong:#0f6862;
  --con-sel-ink:#ffffff;
  --con-sel-sub:#d9efec;
  --con-mark:#137f77;
  --con-hover:#eef8f6;
  --con-danger:#c1392f;
  --con-edge:#dbe6e3;
  --go-bg:#137f77;
  --go-ink:#ffffff;
  --go-hover:#0f6862;

  --font-display:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --row:210px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%;color-scheme:dark}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:var(--font);font-size:15px;line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
[hidden],.hidden{display:none!important}
.no-page-zoom{touch-action:manipulation}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}

/* ---------- Kerangka: dua pita ---------- */
.page{display:block}
.wrap{max-width:1240px;margin:0 auto;padding:0 28px}

/* ---------- Header: kapsul hijau tua (#0a4a45) seperti Auto Metadata, tab tool dalam wadah ---------- */
.hd{
  position:relative;
  display:flex;align-items:center;justify-content:space-between;gap:22px;
  height:68px;margin:0 0 32px;padding:0 14px 0 20px;
  background:#0a4a45;border:1px solid #0a4a45;border-radius:999px;color:#ffffff;
}
.hd-brand{display:flex;align-items:center;gap:11px;flex:none;text-decoration:none;color:#ffffff}
.hd-logo{width:36px;height:36px;border-radius:10px;display:block;flex:none}
.hd-name{display:flex;flex-direction:column;line-height:1.15}
.hd-name b{font-size:16px;font-weight:800;letter-spacing:-.01em;white-space:nowrap}
.hd-name small{font-size:11.5px;font-weight:500;color:rgba(255,255,255,.72);white-space:nowrap}
.hd-tabs{display:flex;gap:4px;padding:5px;background:rgba(255,255,255,.09);border-radius:999px;min-width:0}
.hd-tabs a,.hd-tabs span{
  padding:8px 14px;border-radius:999px;
  font-size:13.5px;font-weight:600;color:rgba(255,255,255,.9);text-decoration:none;white-space:nowrap;
}
.hd-tabs a:hover{background:rgba(255,255,255,.15);color:#ffffff}
.hd-tabs span.on{background:#137f77;color:#ffffff}
.hd-right{display:flex;align-items:center;gap:8px;flex:none;justify-content:flex-end}
.hd-balance{
  display:flex;align-items:center;gap:7px;height:40px;padding:0 14px;
  border-radius:999px;background:rgba(255,255,255,.11);color:rgba(255,255,255,.82);
  font-size:13px;font-weight:600;white-space:nowrap;cursor:default;
}
.hd-balance svg{color:#7fd9cd;flex:none}
.hd-balance b{font-size:15px;font-weight:800;color:#ffffff;font-variant-numeric:tabular-nums}
.hd-account{position:relative;outline-offset:3px;flex:none}
.hd-avatar{
  width:40px;height:40px;display:grid;place-items:center;border-radius:50%;
  background:#ffffff;color:#0a4a45;font-size:14.5px;font-weight:800;cursor:pointer;
}
.hd-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.hd-email-panel{
  display:none;position:absolute;right:0;top:calc(100% + 12px);z-index:5;
  min-width:200px;padding:8px;border:1px solid #dbe6e3;border-radius:12px;
  background:#ffffff;box-shadow:0 12px 28px -12px rgba(3,14,13,.35);
}
.hd-account:hover .hd-email-panel,
.hd-account:focus-within .hd-email-panel,
.hd-account.open .hd-email-panel{display:block}
.hd-email-addr{
  display:block;padding:6px 8px 10px;color:#17302f;font-size:13px;font-weight:600;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid #eef8f6;margin-bottom:6px;
}
.hd-logout-btn{
  display:block;width:100%;padding:8px 10px;border:0;border-radius:8px;
  background:transparent;color:#c1392f;font-size:13.5px;font-weight:700;text-align:left;cursor:pointer;
}
.hd-logout-btn:hover{background:#fdecea}
.hd-login{
  display:inline-flex;align-items:center;gap:7px;flex:none;height:40px;padding:0 18px;border-radius:999px;
  background:#ffffff;color:#0a4a45;font-size:13.5px;font-weight:700;text-decoration:none;white-space:nowrap;
}
.hd-login:hover{background:#d9efec}
.hd-menu{display:none;position:relative}
.hd-menu summary{
  list-style:none;cursor:pointer;width:40px;height:40px;display:grid;place-items:center;
  border-radius:50%;color:#ffffff;
}
.hd-menu summary::-webkit-details-marker{display:none}
.hd-menu summary:hover,.hd-menu[open] summary{background:rgba(255,255,255,.15);color:#ffffff}
.hd-menu-panel{
  position:absolute;right:-56px;top:calc(100% + 12px);z-index:70;width:min(300px,calc(100vw - 32px));
  padding:8px;background:#fff;border:1px solid #dbe6e3;border-radius:18px;
}
.hd-menu-lbl{padding:8px 12px 4px;font-size:11px;font-weight:700;color:#647774;letter-spacing:.06em;text-transform:uppercase}
.hd-menu-panel a,.hd-menu-panel .now{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;text-decoration:none;color:#17302f}
.hd-menu-panel a:hover{background:#eef8f6}
.hd-menu-panel .ti{width:36px;height:36px;border-radius:10px;background:#d9efec;color:#0f6862;display:grid;place-items:center;flex:none}
.hd-menu-panel .tx{display:flex;flex-direction:column;line-height:1.25;flex:1;min-width:0}
.hd-menu-panel .tx b{font-size:14px;font-weight:700}
.hd-menu-panel .tx small{font-size:12px;color:#647774}
.hd-menu-panel .now{background:#eef8f6}
.hd-menu-panel .now .ti{background:#137f77;color:#fff}
.hd-menu-panel .ck{color:#137f77;display:grid;place-items:center}

/* ---------- Pita atas (cerah): prompt + pengaturan ---------- */
.studio{
  background-color:var(--con);background-image:var(--tex-light);background-size:16px 16px;color:var(--con-ink);color-scheme:light;
  border-bottom:1px solid var(--con-edge);
  padding:22px 0 34px;
}
.studio :focus-visible{outline-color:var(--con-mark)}
.composer{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:stretch}
.prompt-head{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin-bottom:10px}
.prompt-head h2{margin:0;font-size:20px;font-weight:800;letter-spacing:-.01em}
.prompt-head label{cursor:pointer}
.prompt-links{margin-left:auto;display:flex;align-items:center;gap:18px}
.tabs{display:inline-flex;padding:2px;border:1px solid var(--con-line);border-radius:9px;background:#fff}
.tabs button{padding:5px 13px;border:0;border-radius:7px;background:transparent;font-size:12.5px;font-weight:700;color:var(--con-muted)}
.tabs button[aria-pressed="true"]{background:var(--con-sel);color:var(--con-sel-ink)}
.tabs-light{border-color:var(--line-2);background:transparent}
.tabs-light button:hover{color:var(--ink)}
.tabs-light button{display:grid;place-items:center;width:38px;height:32px;padding:0;color:var(--muted)}
.tabs-light button[aria-pressed="true"]{background:#0f2b28;color:var(--ink);box-shadow:inset 0 0 0 1px #1f5a54}
.link-on-dark{
  padding:3px 0;border:0;background:none;
  color:var(--con-mark);font-size:13px;font-weight:700;
  text-decoration:underline;text-underline-offset:3px;
}
.link-on-dark:hover:not(:disabled){color:#0f6862}
.link-on-dark:disabled{opacity:.5;cursor:not-allowed}
.ref-wrap{display:inline-flex}
#promptInput{
  width:100%;min-height:172px;padding:16px 18px;
  background:#fff;border:1px solid var(--con-line);border-radius:10px;
  color:var(--con-ink);font-size:15.5px;line-height:1.6;resize:vertical;
}
#promptInput::placeholder{color:var(--con-muted)}
#promptInput:focus{outline:none;border-color:var(--con-mark);box-shadow:inset 0 0 0 1px var(--con-mark)}
#promptInput:disabled,#promptInput.is-locked{background:var(--con-hover);color:var(--con-muted);cursor:not-allowed;resize:none}
.ref-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.ref-list:empty{display:none}
.gi-ref{position:relative;width:50px;height:50px;border-radius:8px;overflow:hidden;border:1px solid var(--con-line)}
.gi-ref img{width:100%;height:100%;object-fit:cover;display:block}
.gi-ref button{position:absolute;top:2px;right:2px;width:18px;height:18px;padding:0;border:0;border-radius:50%;background:rgba(4,30,28,.85);color:#fff;font-size:12px;line-height:18px}

/* Blok Generate: teal tua sebagai jangkar visual */
.go-card{
  height:100%;display:flex;flex-direction:column;justify-content:space-between;gap:16px;
  padding:22px;color:#fff;border-radius:10px;
  background:#137f77;
}
.summary{display:flex;flex-direction:column;gap:2px}
.go-notice{
  order:-1;padding:9px 12px;border-radius:8px;
  background:rgba(0,0,0,.22);color:#ffe3df;
  font-size:13px;font-weight:600;line-height:1.4;
}
.summary b{font-size:19px;font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.summary span{font-size:13px;color:#d9efec}
.summary span.over{color:#ffc2b8;font-weight:700}
.go{
  height:58px;display:flex;align-items:center;justify-content:center;gap:10px;
  border:0;border-radius:8px;background:#ffffff;color:#0a4a45;
  font-size:17px;font-weight:800;letter-spacing:-.01em;
}
.go:hover:not(:disabled){background:#d9efec}
.go:disabled{opacity:.6;cursor:not-allowed}
.go.go-cancel{background:#ffffff;color:#c1392f}
.go.go-cancel:hover:not(:disabled){background:#ffe3df}
.go-tip{margin:0;text-align:center;font-size:12px;color:#d9efec}

/* Pengaturan mendatar */
.setup{margin-top:26px;padding-top:22px;border-top:1px solid var(--con-line);display:flex;flex-direction:column;gap:22px}
.setup-label{display:block;margin-bottom:9px;font-size:13px;font-weight:700;color:var(--con-muted)}
.setup-row{display:flex;flex-wrap:wrap;gap:22px 46px;align-items:flex-start}
.models{display:flex;flex-wrap:wrap;gap:8px}
.model{
  display:inline-flex;align-items:baseline;gap:10px;
  padding:9px 15px;border:1px solid var(--con-line);border-radius:8px;
  background:#fff;color:var(--con-ink);text-align:left;
}
.model i{display:none}
.model-name{font-weight:700;font-size:14px}
.model-cost{font-size:12px;color:var(--con-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.model:hover{border-color:var(--con-mark)}
.model[aria-checked="true"]{background:var(--con-sel);border-color:var(--con-sel);color:var(--con-sel-ink)}
.model[aria-checked="true"] .model-cost{color:var(--con-sel-sub)}
.ratio-grid{display:flex;flex-wrap:wrap;gap:8px}
.ratio{
  width:68px;height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  border:1px solid var(--con-line);border-radius:8px;background:#fff;
  color:var(--con-muted);font-size:12.5px;font-weight:700;
}
.ratio i{display:block;border:2px solid currentColor;border-radius:3px}
.ratio:hover{border-color:var(--con-mark);color:var(--con-ink)}
.ratio[aria-checked="true"]{background:var(--con-sel);border-color:var(--con-sel);color:var(--con-sel-ink)}
.segc{display:flex;flex-wrap:wrap;gap:6px}
.segc button{
  display:flex;flex-direction:column;align-items:center;gap:1px;
  padding:8px 16px;border:1px solid var(--con-line);border-radius:8px;background:#fff;
  color:var(--con-ink);font-size:13.5px;font-weight:700;
}
.segc small{font-size:11.5px;font-weight:600;color:var(--con-muted)}
.segc button:hover{border-color:var(--con-mark)}
.segc button[aria-checked="true"]{background:var(--con-sel);border-color:var(--con-sel);color:var(--con-sel-ink)}
.segc button[aria-checked="true"] small{color:var(--con-sel-sub)}
#styleSelect{
  min-width:230px;height:42px;padding:0 36px 0 13px;
  background-color:#fff;border:1px solid var(--con-line);border-radius:8px;
  color:var(--con-ink);font-size:14.5px;font-weight:600;
  -webkit-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1.5 1.5l4.5 4.5 4.5-4.5' fill='none' stroke='%23647774' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 13px center;cursor:pointer;
}
#styleSelect:focus{outline:none;border-color:var(--con-mark)}
#styleSelect option{color:#17302f;background:#fff}
.stepper{display:inline-flex;align-items:center;border:1px solid var(--con-line);border-radius:8px;background:#fff;overflow:hidden}
.stepper button{width:40px;height:40px;border:0;background:transparent;color:var(--con-ink);font-size:19px;line-height:1}
.stepper button:hover:not(:disabled){background:var(--con-hover)}
.stepper button:disabled{opacity:.35;cursor:not-allowed}
.stepper output{min-width:38px;text-align:center;font-size:16px;font-weight:800;font-variant-numeric:tabular-nums}

/* ---------- Pita bawah (gelap): hasil ---------- */
.results{background-color:var(--bg);background-image:var(--tex);background-size:32px 32px;color:var(--ink);padding:36px 0 50px;min-height:60vh}
.muted{color:var(--muted)}

/* ---------- Kanvas ---------- */
.results-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:18px 24px;flex-wrap:wrap;
  margin:6px 0 30px;padding-bottom:22px;border-bottom:1px solid var(--line);
}
.results-title h1{margin:0;font-family:var(--font-display);font-weight:700;font-size:40px;line-height:1.05;letter-spacing:-.02em;color:var(--ink)}
.stats{display:flex;flex-wrap:wrap;gap:6px 32px;margin:16px 0 0}
.stats div{display:flex;align-items:baseline;gap:7px}
.stats dd{margin:0;font-family:var(--font-display);font-weight:600;font-size:26px;line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--ink)}
.stats dt{font-size:14px;color:var(--muted)}
.stats .bad dd{color:var(--danger)}
.stats .zero dd{color:#5d7873;opacity:1}
.results-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.btn-dark{
  height:36px;padding:0 15px;border:0;border-radius:10px;
  background:var(--pill-on-bg);color:var(--pill-on-ink);font-size:13.5px;font-weight:700;
}
.btn-dark:hover:not(:disabled){background:#178f86}
.btn-dark:disabled{opacity:.4;cursor:not-allowed}
.link-btn{padding:6px 10px;border:0;border-radius:8px;background:transparent;font-size:14px;font-weight:600;color:var(--ink-2)}
.link-btn:hover:not(:disabled){background:var(--brand-100);color:var(--ink)}
.link-btn:disabled{color:var(--muted);opacity:.55;cursor:not-allowed}
.icon-btn{width:36px;height:36px;padding:0;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:var(--ink-2)}
.icon-btn:hover{background:var(--brand-100);color:var(--ink)}

.notice{margin:0 0 18px;padding:11px 16px;border-radius:10px;background:var(--brand-100);color:var(--ink);font-size:14px}
.notice.error{background:var(--surface);box-shadow:inset 0 0 0 1px var(--danger);color:var(--danger)}
.login-hint{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;
  margin:0 0 20px;padding:14px 18px;border-radius:12px;
  background:var(--surface);border:1px solid var(--line);
}
.login-hint p{margin:0;font-size:14.5px}

.batch{margin:0 0 38px}
.batch-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 14px;margin:0 0 14px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.batch-head h3{margin:0;font-family:var(--font-display);font-weight:700;font-size:19px;letter-spacing:-.015em;color:var(--ink)}
.batch-meta{font-size:13.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.batch-head .link-btn{margin-left:auto;color:#86cfc5;text-decoration:none}
.batch-head .link-btn:hover{background:transparent;color:#b5e6df;text-decoration:underline;text-underline-offset:3px}

/* Baris rata tinggi: lebar tiap frame proporsional dengan rasionya. */
.flow{display:flex;flex-wrap:wrap;gap:6px}
.flow::after{content:"";flex-grow:1000000}
.frame{
  position:relative;
  flex:calc(var(--ar) * 100) 1 calc(var(--ar) * var(--row));
  min-width:0;border-radius:12px;overflow:hidden;
  background:var(--brand-100);
}
.sizer{display:block;padding-bottom:calc(100% / var(--ar))}
.frame-body{position:absolute;inset:0}
.frame-img{display:block;width:100%;height:100%}
.frame-img img{width:100%;height:100%;object-fit:cover;display:block}
.frame-more{position:absolute;right:8px;top:8px;padding:1px 8px;border-radius:5px;background:rgba(6,30,28,.65);color:#fff;font-size:12px;font-weight:600}
.frame-state{position:absolute;inset:0;display:grid;place-items:center;padding:14px 14px 20px;text-align:center}
.frame-msg{font-size:13.5px;line-height:1.45;max-width:90%;color:var(--ink-2);font-weight:500}
.frame-pct{font-family:var(--font-display);font-variant-numeric:tabular-nums}
.prog{position:absolute;left:0;right:0;bottom:0;height:5px;background:rgba(255,255,255,.14)}
.prog i{display:block;height:100%;background:var(--brand);transition:width .6s ease}
.frame[data-status="processing"]{background:var(--brand-50)}
.frame[data-wait="1"]{background:color-mix(in srgb,var(--muted) 10%,var(--surface))}
.frame[data-wait="1"] .frame-msg{color:var(--muted)}
.frame[data-status="failed"]{background:var(--surface);box-shadow:inset 0 0 0 1px rgba(242,164,155,.38)}
.frame[data-status="failed"] .frame-msg{color:var(--danger)}

.frame-info{position:absolute;left:0;right:0;bottom:0;z-index:3;padding:30px 10px 9px}
.frame[data-status="success"] .frame-info{background:rgba(1,8,7,.9);color:#ffffff;padding:9px 12px 10px}
.frame-cap{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:500;line-height:1.3}
.frame-cap svg{flex:none;opacity:.9}
.frame-cap span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.frame[data-status="failed"] .frame-cap,.frame[data-wait="1"] .frame-cap{display:none}
.frame[data-status="failed"] .frame-info,.frame[data-wait="1"] .frame-info{padding-top:0}
.frame-actions{display:none;flex-wrap:wrap;gap:6px;margin-top:7px}
.frame:hover .frame-actions,.frame:focus-within .frame-actions,
.frame[data-status="failed"] .frame-actions,.frame[data-wait="1"] .frame-actions{display:flex}
@media (hover:none){.frame-actions{display:flex}}
.frame-actions a,.frame-actions button{
  padding:4px 10px;border:1px solid rgba(23,48,47,.22);border-radius:6px;
  background:#ffffff;color:#030e0d;
  font-size:12.5px;font-weight:600;text-decoration:none;
}
.frame-actions a:hover,.frame-actions button:hover{background:#d9efec}

/* ---------- Daftar ---------- */
.qlist{border-top:1px solid var(--line)}
.qhead,.qrow{display:grid;grid-template-columns:30px 52px minmax(0,1fr) 150px minmax(120px,auto);gap:14px;align-items:center;padding:10px 6px}
.qhead{font-size:12.5px;font-weight:600;color:var(--muted)}
.qrow{border-top:1px solid var(--line);font-size:14px}
.qrow:hover{background:var(--brand-50)}
.qnum{color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.qthumb{width:52px;height:52px;border-radius:6px;overflow:hidden;background:var(--brand-100);display:grid;place-items:center;color:var(--muted)}
.qthumb img{width:100%;height:100%;object-fit:cover;display:block}
.qprompt b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:500}
.qprompt small{display:block;color:var(--muted);font-size:12.5px}
.qstatus{display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.qstatus small{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.qactions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.qactions a,.qactions button{
  padding:4px 10px;border:1px solid var(--line-2);border-radius:6px;
  background:var(--surface);color:var(--ink);
  font-size:12px;font-weight:600;text-decoration:none;
}
.qactions a:hover,.qactions button:hover{border-color:var(--ink-2)}
.chip{display:inline-block;padding:2px 9px;border-radius:5px;font-size:12px;font-weight:600;white-space:nowrap;background:var(--brand-100);color:var(--ink)}
.chip.busy{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 1px var(--brand)}
.chip.wait{background:color-mix(in srgb,var(--muted) 14%,var(--surface));color:var(--muted)}
.chip.bad{background:color-mix(in srgb,var(--danger) 12%,var(--surface));color:var(--danger)}

/* ---------- Kosong ---------- */
.empty{max-width:640px;padding-top:6px}
.empty h2{margin:0 0 8px;font-family:var(--font-display);font-weight:800;font-size:30px;letter-spacing:-.035em}
.empty p{margin:0 0 20px;color:var(--muted);font-size:15.5px;line-height:1.6}
.examples{display:flex;flex-direction:column;gap:8px}
.example{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 16px;text-align:left;
  background:var(--surface);border:1px solid var(--line);border-radius:10px;
  font-size:14.5px;
}
.example .use{flex:none;font-size:13px;font-weight:600;color:var(--ink-2)}
.example:hover{border-color:var(--ink-2)}
.fine{margin:16px 0 0;font-size:12.5px;color:var(--muted)}
.foot{margin-top:44px;font-size:12.5px;color:var(--muted)}
.foot a{color:inherit}


/* ---------- Layar kecil ---------- */
@media (max-width:980px){
  :root{--row:140px}
  .hd{height:auto;flex-wrap:wrap;gap:10px 12px;padding:10px 12px 10px 16px;border-radius:30px;margin-bottom:24px}
  .hd-brand{order:1}
  .hd-right{order:2;margin-left:auto}
  .hd-tabs{order:3;width:100%;overflow-x:auto;scrollbar-width:none}
  .hd-tabs::-webkit-scrollbar{display:none}
  .hd-balance-label{display:none}
  .composer{grid-template-columns:1fr}
  .go-card{flex-direction:row;align-items:center;flex-wrap:wrap}
  .go{flex:1;min-width:180px}
  .go-tip{display:none}
  .results-title h1{font-size:36px}
  .qhead{display:none}
  .qrow{grid-template-columns:48px minmax(0,1fr);gap:8px 12px}
  .qnum{display:none}
  .qthumb{width:48px;height:48px}
  .qstatus,.qactions{grid-column:2;flex-direction:row;align-items:center;justify-content:flex-start}
}
@media (max-width:640px){
  .hd-logo{width:32px;height:32px}
  .hd-brand{gap:9px}
  .hd-name b{font-size:14px}
  .hd-name small{font-size:11px}
  .hd-right{gap:4px}
  .hd-balance{padding:0 12px}
  .hd-balance svg,.hd-balance-unit{display:none}
  .wrap{padding:0 16px}
  .studio{padding:22px 0 26px}
  .prompt-links{margin-left:0}
  .setup-row{gap:20px 26px}
}
@media (max-width:340px){
  .hd{padding:7px 7px 7px 10px;gap:6px}
  .hd-logo{width:26px;height:26px}
  .hd-brand{gap:6px}
  .hd-name b{font-size:12.5px}
  .hd-name small{font-size:10px}
  .hd-balance{padding:0 9px;height:34px;font-size:12px}
  .hd-menu summary,.hd-avatar{width:34px;height:34px}
  .hd-right{gap:0}
}
@media (prefers-reduced-motion:reduce){
  .prog i,.go{transition:none}
}


/* ---------- Pita hasil: perapian (satu bahasa desain: sudut 12–14px, tinggi kontrol 42px, garis --line-2) ---------- */

/* ringkasan status sebagai satu bar bersekat */
.stats{display:inline-flex;flex-wrap:nowrap;gap:0;margin:20px 0 0;border:1px solid var(--line-2);border-radius:14px;background:rgba(255,255,255,.03);overflow:hidden}
.stats div{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:104px;padding:12px 22px 11px;border-left:1px solid var(--line)}
.stats div:first-child{border-left:0}
.stats dd{order:1;font-size:26px;line-height:1}
.stats dt{order:2;display:flex;align-items:center;gap:7px;font-size:12.5px;line-height:1;color:var(--muted)}
.stats dt::before{content:"";width:7px;height:7px;border-radius:50%;background:#8ea6a1;flex:none}
.stats div:nth-child(1) dt::before{background:#3fbfb2}
.stats div:nth-child(2) dt::before{background:#9fe6dc}
.stats div:nth-child(3) dt::before{background:#8ea6a1}
.stats .bad dt::before{background:#f2a49b}

/* deretan tombol: tinggi dan sudut seragam */
.results-actions{gap:10px}
.tabs-light{height:42px;padding:3px;border-radius:12px;border:1px solid var(--line-2);background:transparent}
.tabs-light button{width:40px;height:34px;border-radius:9px}
.btn-dark{height:42px;padding:0 20px;border-radius:12px;font-size:14px;background:#137f77;color:#ffffff;display:inline-flex;align-items:center;gap:9px}
.btn-dark::before{content:"";width:17px;height:17px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7.5 10.5L12 15l4.5-4.5M5 19h14'/%3E%3C/svg%3E") center/contain no-repeat;flex:none}
.btn-dark:hover:not(:disabled){background:#178f86}
.results-actions .link-btn{height:42px;padding:0 18px;border:1px solid var(--line-2);border-radius:12px;font-size:14px;color:var(--ink-2)}
.results-actions .link-btn:hover:not(:disabled){background:rgba(255,255,255,.05);border-color:var(--ink-2);color:var(--ink)}
.icon-btn{width:42px;height:42px;border:1px solid var(--line-2);border-radius:12px}
.icon-btn:hover:not(:disabled){background:rgba(255,255,255,.05);border-color:var(--ink-2)}

/* kepala batch */
.batch-head{align-items:center;gap:6px 14px;margin:0 0 16px;padding-bottom:14px}
.batch-head h3{font-size:18px}
.batch-head .link-btn{margin-left:auto;height:34px;padding:0 14px;border:1px solid var(--line-2);border-radius:10px;font-size:13px;font-weight:600;color:#9fe6dc;display:inline-flex;align-items:center;gap:7px}
.batch-head .link-btn::before{content:"";width:15px;height:15px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fe6dc' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7.5 10.5L12 15l4.5-4.5M5 19h14'/%3E%3C/svg%3E") center/contain no-repeat;flex:none}
.batch-head .link-btn:hover{background:rgba(159,230,220,.08);border-color:#9fe6dc;color:#c9f2ec;text-decoration:none}

/* kartu */
.flow{gap:8px}
.frame{border-radius:14px}
.frame[data-status="success"]{outline:2px solid transparent;outline-offset:-2px}
.frame[data-status="success"]:hover,.frame[data-status="success"]:focus-within{outline-color:#137f77}
.frame[data-status="success"] .frame-info{padding:10px 13px 11px}

/* kartu berstatus: ikon + pesan tertata, tombol di tengah bawah */
.frame-state{padding:14px 16px 20px}
.frame[data-status="failed"] .frame-state,.frame[data-wait="1"] .frame-state{padding-bottom:58px}
.frame-msg{font-size:13.5px;line-height:1.5;max-width:92%}
.frame[data-status="failed"] .frame-msg::before,
.frame[data-wait="1"] .frame-msg::before,
.frame[data-status="processing"] .frame-msg::before{content:"";display:block;width:30px;height:30px;margin:0 auto 10px;background-position:center;background-repeat:no-repeat;background-size:contain}
.frame[data-status="failed"] .frame-msg::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2a49b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E")}
.frame[data-status="processing"] .frame-msg::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235fd0c4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9' stroke-opacity='.22'/%3E%3Cpath d='M21 12a9 9 0 0 0-9-9'/%3E%3C/svg%3E");animation:gi-spin 1s linear infinite}
@keyframes gi-spin{to{transform:rotate(360deg)}}
.frame[data-wait="1"][data-status] .frame-msg::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ea6a1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");animation:none}
.frame[data-status="failed"]{box-shadow:inset 0 0 0 1px rgba(242,164,155,.3)}
.frame[data-status="failed"] .frame-msg{color:var(--ink-2)}
.frame[data-status="failed"] .frame-info,.frame[data-wait="1"] .frame-info{padding:0 12px 14px}
.frame[data-status="failed"] .frame-actions,.frame[data-wait="1"] .frame-actions{justify-content:center;margin-top:0}
.frame-actions a,.frame-actions button{padding:6px 13px;border-radius:8px;font-size:12.5px}
.frame[data-status="failed"] .frame-actions button:first-child{background:#137f77;border-color:#137f77;color:#ffffff}
.frame[data-status="failed"] .frame-actions button:first-child:hover{background:#178f86}

/* tampilan daftar */
.qlist{border:1px solid var(--line-2);border-radius:14px;overflow:hidden;background:rgba(255,255,255,.02)}
.qhead,.qrow{grid-template-columns:34px 56px minmax(0,1fr) 170px 390px;gap:16px}
.qactions{justify-content:flex-end}
.qhead>*:last-child{text-align:right}
@media (max-width:1180px){
  .qhead{display:none}
  .qrow{grid-template-columns:48px minmax(0,1fr);gap:8px 12px}
  .qnum{display:none}
  .qthumb{width:48px;height:48px}
  .qstatus,.qactions{grid-column:2;flex-direction:row;align-items:center;justify-content:flex-start}
}
.qhead{padding:12px 16px;background:rgba(255,255,255,.04)}
.qrow{padding:12px 16px}
.qthumb{border-radius:9px}
.qactions a,.qactions button{border-radius:8px;padding:5px 12px}
.chip{border-radius:999px;padding:3px 11px}

/* keadaan kosong */
.empty{max-width:none;padding:34px 36px 36px;border:1px dashed var(--line-2);border-radius:20px;background:rgba(255,255,255,.02)}
.empty h2{font-size:26px;font-weight:700;letter-spacing:-.02em}
.empty p{max-width:620px;margin-bottom:22px}
.examples{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:10px}
.example{border-radius:12px;padding:15px 18px;background:var(--surface);border:1px solid var(--line-2)}
.example:hover{border-color:#137f77}
.example .use{color:#9fe6dc}

/* catatan kaki */
.results-foot{display:flex;align-items:center;justify-content:space-between;gap:10px 20px;flex-wrap:wrap;margin-top:44px;padding-top:18px;border-top:1px solid var(--line)}
.results-foot .fine,.results-foot .foot{margin:0}
.results-foot .fine{display:flex;align-items:center;gap:8px}
.results-foot .fine:empty{display:none}
.results-foot .fine::before{content:"";width:16px;height:16px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ea6a1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5h.01'/%3E%3C/svg%3E") center/contain no-repeat;flex:none}

@media (prefers-reduced-motion:reduce){.frame[data-status="processing"] .frame-msg::before{animation:none}}

/* ---------- Ponsel (≤640px): tata letak khusus ---------- */
@media (max-width:640px){
  /* header: satu baris, tool masuk menu */
  .hd{padding:9px 10px 9px 14px;gap:8px;border-radius:999px;margin-bottom:20px;flex-wrap:nowrap}
  .hd-tabs{display:none}
  .hd-menu{display:block}
  .hd-brand{gap:9px;min-width:0;flex:0 1 auto}
  .hd-name{min-width:0}
  .hd-name b,.hd-name small{overflow:hidden;text-overflow:ellipsis}
  .hd-name b{overflow:hidden;text-overflow:ellipsis}
  .hd-right{margin-left:auto;gap:2px}
  .hd-balance{padding:0 12px;height:38px}
  .hd-menu summary,.hd-avatar,.hd-login{height:38px}
  .hd-menu summary,.hd-avatar{width:38px}

  /* prompt: judul + mode di satu baris, tautan di bawahnya */
  .prompt-head{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px 10px;margin-bottom:10px}
  .prompt-links{grid-column:1 / -1;margin-left:0;gap:18px}
  #promptInput{min-height:150px;font-size:16px}

  /* tombol Generate menempel di dasar layar */
  .go-col{position:fixed;left:0;right:0;bottom:0;z-index:60;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));background:#ffffff;border-top:1px solid #dbe6e3}
  .go-card{flex-direction:row;flex-wrap:nowrap;align-items:center;gap:12px;height:auto;padding:0;background:transparent;border-radius:0;color:#17302f}
  .summary{flex:1;min-width:0}
  .summary b{font-size:15px;color:#17302f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .summary span{font-size:12px;color:#647774;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .summary span.over{color:#c1392f}
  .go{flex:none;min-width:148px;height:48px;background:#137f77;color:#ffffff;font-size:16px}
  .go:hover:not(:disabled){background:#0f6862}
  .go:disabled{opacity:.45}
  .go-tip{display:none}
  .results{padding-bottom:120px}

  /* pengaturan: model geser ke samping, rasio 5 kolom, sisanya penuh */
  .composer{gap:0}
  .setup{margin-top:20px;padding-top:18px;gap:18px}
  .models{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .model{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;padding:11px 14px;border-radius:14px;text-align:left}
  .model-name{font-size:14px;line-height:1.25}
  .model-cost{font-size:12px}
  .models .model:last-child:nth-child(odd){grid-column:1 / -1}
  .setup-row{display:grid;grid-template-columns:1fr;gap:18px}
  .ratio-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
  .ratio{width:auto;min-width:0;padding:0}
  .segc{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
  #styleSelect{width:100%;min-width:0}
  .setup-group .stepper{width:100%;justify-content:space-between}
  .stepper output{flex:1}

  /* hasil */
  .results-head{flex-direction:column;align-items:stretch;gap:14px}
  .results-actions{flex-wrap:wrap;gap:8px}
    .results-title h1{font-size:34px}
  .stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%}
  .stats div{min-width:0;padding:11px 10px 10px}
  .stats dd{font-size:22px}
  .stats dt{font-size:11.5px;gap:5px}
  .results-actions{display:flex;flex-wrap:wrap;gap:8px}
  .btn-dark{order:-1;flex:1 1 100%;justify-content:center;white-space:nowrap;height:46px;font-size:14.5px}
  .results-actions .link-btn{flex:1}
  .empty{padding:24px 20px 26px}
  .examples{grid-template-columns:1fr}
}

/* ---------- Banner "masih dalam pembangunan" ---------- */
.uc-banner{
  position:relative;margin:0 0 26px;overflow:hidden;
  background:#ffffff;border:1px solid #dbe6e3;border-radius:20px;
}
.uc-banner.hidden{display:none}
.uc-tape{height:10px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='10'%3E%3Crect width='28' height='10' fill='%23fbbf24'/%3E%3Cpath d='M0 10 L10 0 H17 L7 10 Z M14 10 L24 0 H31 L21 10 Z' fill='%2317302f'/%3E%3C/svg%3E") repeat-x;background-size:28px 10px;animation:uc-tape 1.6s linear infinite}
.uc-body{display:flex;align-items:center;gap:26px;padding:16px 60px 18px 16px}
.uc-art-wrap{flex:none;width:400px;max-width:46%}
.uc-art{display:block;width:100%;height:auto}
.uc-text{min-width:0;flex:1}
.uc-badge{
  display:inline-flex;align-items:center;gap:7px;margin-bottom:8px;padding:4px 11px;border-radius:999px;
  background:#fef3c7;color:#92400e;font-size:12px;font-weight:800;letter-spacing:.02em;
}
.uc-dot{width:7px;height:7px;border-radius:50%;background:#f59e0b;animation:uc-blink 1.2s steps(1) infinite}
.uc-text h2{margin:0 0 6px;font-size:21px;font-weight:800;color:#17302f;letter-spacing:-.015em;line-height:1.25}
.uc-text p{margin:0;font-size:14px;line-height:1.6;color:#647774;max-width:520px}
.uc-progress{
  margin:14px 0 0;height:8px;max-width:420px;border-radius:999px;background:#e3f1ee;overflow:hidden;
}
.uc-progress span{
  display:block;width:62%;height:100%;border-radius:999px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Crect width='20' height='10' fill='%23137f77'/%3E%3Cpath d='M0 10 L10 0 H15 L5 10 Z M10 10 L20 0 H25 L15 10 Z' fill='%231e9a90'/%3E%3C/svg%3E") repeat-x;background-size:20px 10px;animation:uc-stripes .9s linear infinite;
}
.uc-close{
  position:absolute;top:20px;right:12px;width:34px;height:34px;
  border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#647774;
  font-size:22px;line-height:1;cursor:pointer;z-index:2;
}
.uc-close:hover{background:#eef8f6;color:#17302f}

/* animasi adegan */
.uc-arm{transform-origin:95px 100px;animation:uc-swing 1.1s ease-in-out infinite}
.uc-spark{opacity:0;transform-origin:150px 106px;animation:uc-spark 1.1s ease-out infinite}
.uc-brick{transform-origin:165px 118px;animation:uc-bump 1.1s ease-out infinite}
.uc-load{transform-origin:248px 36px;animation:uc-sway 3.2s ease-in-out infinite}
.uc-blink{animation:uc-blink 1.2s steps(1) infinite}
.uc-blink-b{animation-delay:.6s}
.uc-cloud-a{animation:uc-drift 14s ease-in-out infinite alternate}
.uc-cloud-b{animation:uc-drift 18s ease-in-out infinite alternate-reverse}

@keyframes uc-swing{0%{transform:rotate(-38deg)}42%{transform:rotate(2deg)}50%{transform:rotate(0)}100%{transform:rotate(-38deg)}}
@keyframes uc-spark{0%,40%{opacity:0;transform:scale(.4)}46%{opacity:1;transform:scale(1)}70%,100%{opacity:0;transform:scale(1.5)}}
@keyframes uc-bump{0%,40%{transform:translateY(0)}46%{transform:translateY(1.5px)}60%,100%{transform:translateY(0)}}
@keyframes uc-sway{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(4deg)}}
@keyframes uc-blink{0%{opacity:1}50%{opacity:.2}}
@keyframes uc-drift{from{transform:translateX(0)}to{transform:translateX(34px)}}
@keyframes uc-tape{from{background-position:0 0}to{background-position:28px 0}}
@keyframes uc-stripes{from{background-position:0 0}to{background-position:20px 0}}
@keyframes uc-rotate{to{transform:rotate(360deg)}}

@media (prefers-reduced-motion:reduce){
  .uc-arm,.uc-spark,.uc-brick,.uc-load,.uc-blink,.uc-cloud,.uc-tape,.uc-progress span,.uc-dot,}
@media (max-width:900px){
  .uc-body{flex-direction:column;align-items:stretch;gap:12px;padding:12px 16px 18px}
  .uc-art-wrap{width:100%;max-width:440px;align-self:center}
  .uc-close{top:16px}
}
@media (max-width:640px){
  .uc-text h2{font-size:17px}
  .uc-text p{font-size:13.5px}
}
