:root {
  --bg: #f3f1ea;
  --card: #ffffff;
  --ink: #1d2a22;
  --muted: #6b7569;
  --line: #e3dfd3;
  --brand: #143823;
  --brand2: #1f5434;
  --gold: #d9a441;
  --ok: #1f8a4c;
  --bad: #c0392b;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--brand2); }
h1 { font-size: 1.4rem; margin: 0 0 12px; }
h2 { font-size: 1.05rem; margin: 0 0 4px; line-height: 1.3; }
main { max-width: 720px; margin: 0 auto; padding: 12px; }
main.narrow { max-width: 520px; }
.muted { color: var(--muted); }
.count { margin: 4px 2px 10px; font-size: .9rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: var(--brand); color: #fff; padding: 10px 12px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.top-in { max-width: 720px; margin: 0 auto; display: flex; gap: 8px; align-items: center; }
.brand { color: #fff; font-weight: 700; text-decoration: none; flex: 1; font-size: 1.1rem; }
.search { max-width: 720px; margin: 10px auto 0; position: relative; }
.search input { width: 100%; padding: 11px 40px 11px 14px; border-radius: 999px; border: 0; font-size: 16px; }
.search .clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); text-decoration: none; color: var(--muted); font-size: 1.5rem; padding: 0 10px; }

/* Card */
.card { background: var(--card); border-radius: var(--r); border: 1px solid var(--line); }
.pad { padding: 18px; }
.item { padding: 14px; margin-bottom: 14px; }
.item-head { display: flex; gap: 12px; }
.thumb { flex: 0 0 96px; height: 96px; border-radius: 10px; overflow: hidden; background: #eee; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.none { display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--muted); text-align: center; }
.meta { flex: 1; min-width: 0; }
.seller { font-size: .9rem; color: var(--brand2); font-weight: 600; }
.kw { font-size: .8rem; color: var(--muted); }
.edit { font-size: .85rem; display: inline-block; margin-top: 4px; }
.block { margin-top: 12px; }
.caption { white-space: normal; background: #faf8f2; border-radius: 10px; padding: 10px 12px; font-size: .95rem; }
.caption.clamp { max-height: 7.5em; overflow: hidden; position: relative; }
.caption.can-expand { cursor: pointer; }
.caption.can-expand.clamp::after { content: "ketuk untuk lihat semua ▾"; position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 6px; font-size: .8rem; color: var(--brand2); background: linear-gradient(transparent, #faf8f2 55%); }
.tags { margin-top: 8px; font-size: .85rem; color: #2b6cb0; word-break: break-word; }

/* Buttons */
.btn { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 10px 14px; font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; -webkit-tap-highlight-color: transparent; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1d1a10; }
.btn.ghost { background: transparent; }
.top .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.btn.sm { padding: 6px 10px; font-size: .85rem; }
.btn.big { width: 100%; padding: 14px; font-size: 1.05rem; }
.btn.danger { background: #fff; border-color: var(--bad); color: var(--bad); width: 100%; }
.btn.copy.main { background: var(--brand); color: #fff; border-color: var(--brand); flex: 1 1 100%; padding: 13px; font-size: 1rem; }
.btn.copy.done, .btn.copy.main.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.copyrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.copyrow .btn:not(.main) { flex: 1; }

.linkrow { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px; border-radius: 10px; }
.linkrow .lbl { flex: 1; font-weight: 700; font-size: .9rem; }
.linkrow.shopee { background: #fff1ec; } .linkrow.shopee .lbl { color: #ee4d2d; }
.linkrow.tokped { background: #ecf8ef; } .linkrow.tokped .lbl { color: #03ac0e; }
.linkrow.tiktok { background: #f0f0f3; } .linkrow.tiktok .lbl { color: #111; }

/* Form */
.form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.form label small { font-weight: 400; color: var(--muted); }
.form input:not([type=checkbox]):not([type=file]), .form textarea {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; background: #fffefb;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.photo { margin-bottom: 14px; }
.photo .lbl { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.photo img { display: block; max-width: 200px; max-height: 200px; border-radius: 10px; margin-bottom: 8px; object-fit: cover; }
.form .check { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 8px 0 0; }
.del { margin-top: 16px; }

.notice { background: #e7f5ec; border: 1px solid #bfe3cc; color: #145a32; padding: 10px 14px; border-radius: 10px; }
.err { background: #fdecea; border: 1px solid #f5c6c0; color: var(--bad); padding: 10px 14px; border-radius: 10px; }
.ok { color: var(--ok); font-weight: 700; }
.empty { text-align: center; color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 16px 0 30px; }
code { background: #f1eee4; padding: 1px 5px; border-radius: 4px; }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); background: #1d2a22; color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); }
