:root {
  --bg: #f6f4ef; --card: #ffffff; --ink: #1f2a2e; --muted: #6b7478; --line: #e3dfd6;
  --brand: #0f766e; --brand-ink: #ffffff; --accent: #f59e0b; --error: #b42318; --ok: #15803d;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", "Noto Sans", sans-serif; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--brand); color: var(--brand-ink); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.top a { color: var(--brand-ink); text-decoration: none; }
.brand { font-size: 1.05rem; }
#nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#nav a, #nav button { color: var(--brand-ink); background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 4px 10px; font: inherit; cursor: pointer; text-decoration: none; }
#nav select { font: inherit; border-radius: 8px; padding: 3px 6px; width: auto; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.auth { max-width: 420px; margin: 10vh auto; padding: 0 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--error); }
.ok { color: var(--ok); }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
input[type=text], input[type=url], input[type=password], select, textarea {
  font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--ink); width: 100%;
}
textarea { min-height: 64px; resize: vertical; }
.btn { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 9px; padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.warn { color: var(--error); }
.btn.small { padding: 4px 9px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: default; }
.steps { counter-reset: step; }
.step > h2::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; }
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.job { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); }
.job .pic { aspect-ratio: 4/3; background: #e8e4da center/cover no-repeat; display: grid; place-items: center; font-size: 2rem; }
.job .pic img { width: 100%; height: 100%; object-fit: cover; }
.job .meta { padding: 10px 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.img { border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.img.sel { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(15,118,110,.18); }
.img .pic { position: relative; aspect-ratio: 4/3; background: #eee; }
.img .pic img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.img .badge { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.65); color: #fff; border-radius: 6px; padding: 1px 6px; font-size: .78rem; }
.img .badge.enh { left: auto; right: 6px; background: var(--accent); color: #1f2a2e; }
.img .body { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
.img .tools { display: flex; gap: 4px; flex-wrap: wrap; }
.outs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.out { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.out img, .out video { width: 100%; border-radius: 6px; background: #111; max-height: 380px; object-fit: contain; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips label.check { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: #fff; }
.progress { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #ecfdf5; border: 1px solid #a7f3d0; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #a7f3d0; border-top-color: var(--brand); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lang-block { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 12px; }
.facts { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #1f2a2e; color: #fff; padding: 10px 16px; border-radius: 10px; max-width: 90vw; z-index: 20; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .cols2 { grid-template-columns: 1fr; } .grid { grid-template-columns: repeat(2, 1fr); } }
