/* siapupload — identitas: "map berkas" (kertas krem, tinta navy, stempel oranye) */
:root {
  --ink: #142036; --ink-2: #3b4a63; --muted: #66748b;
  --paper: #f7f3ea; --card: #fffdf8; --line: #e4dccb; --line-2: #d6ccb6;
  --accent: #e8572a; --accent-d: #c2410c; --accent-soft: #fde6dc;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --err: #b91c1c; --err-soft: #fee2e2;
  --tab: #f1c453;
  --r: 14px; --r-sm: 9px;
  --shadow: 0 1px 0 rgba(20, 32, 54, .06), 0 8px 24px -12px rgba(20, 32, 54, .18);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
[data-theme=dark] {
  --ink: #eef1f7; --ink-2: #c6cedd; --muted: #96a2b8;
  --paper: #10141d; --card: #171d29; --line: #273042; --line-2: #34405a;
  --accent: #ff7a4d; --accent-d: #ff9a73; --accent-soft: #3a2119;
  --ok: #4ade80; --ok-soft: #10301d; --warn: #fbbf24; --warn-soft: #33270b; --err: #f87171; --err-soft: #3b1414;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--paper); }
img, canvas, svg { max-width: 100%; }
a { color: var(--accent-d); text-underline-offset: 2px; }
[data-theme=dark] a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.22; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 5.4vw, 2.5rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.25rem, 3.6vw, 1.6rem); margin: 2em 0 .6em; }
h3 { font-size: 1.08rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 9; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header */
.site-h { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-h .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 800 1.22rem/1 var(--display); letter-spacing: -.02em; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo b { color: var(--accent); font-weight: 800; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { background: var(--accent-soft); color: var(--ink); }
.nav .hide-m { display: none; }
@media (min-width: 760px) { .nav .hide-m { display: inline-block; } }
.icon-btn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 1rem; cursor: pointer; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--err); }

/* hero beranda */
.hero { padding: 28px 0 8px; }
.hero .eyebrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: .85rem; color: var(--accent-d); background: var(--accent-soft); padding: 5px 10px; border-radius: 999px; }
[data-theme=dark] .hero .eyebrow { color: var(--accent); }
.hero h1 { font-size: clamp(1.9rem, 6.6vw, 3.1rem); max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--accent); position: relative; white-space: nowrap; }
.hero p.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 60ch; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.quick a { text-decoration: none; font-weight: 700; color: var(--ink); background: var(--card); border: 1.5px solid var(--line-2); border-radius: 999px; padding: 8px 14px; font-size: .95rem; }
.quick a:hover { border-color: var(--accent); }
.quick a small { color: var(--muted); font-weight: 600; }

/* kartu tool berbentuk map berkas */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 12px 0; }
.folder { position: relative; display: block; padding: 18px 18px 16px; margin-top: 12px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 4px var(--r) var(--r) var(--r); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.folder::before { content: ""; position: absolute; left: -1px; top: -12px; width: 42%; height: 13px; background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 12px 0 0; }
.folder:hover { transform: translateY(-2px); border-color: var(--accent); }
.folder .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-d); font-weight: 800; font-size: .78rem; margin-bottom: 8px; }
[data-theme=dark] .folder .ico { color: var(--accent); }
.folder h3 { margin: 0 0 4px; font-size: 1.08rem; }
.folder p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.45; }
.folder .sizes-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.folder .sizes-mini span { font: 700 .75rem/1 var(--font); padding: 5px 7px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); }
.section-title { display: flex; align-items: baseline; gap: 10px; }
.section-title small { color: var(--muted); font-weight: 600; }

/* breadcrumb & kepala halaman tool */
.crumbs { font-size: .88rem; color: var(--muted); padding-top: 16px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--accent-d); }
.tool-head .lead { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 10px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.badges span { font-size: .8rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.badges span::before { content: "✓ "; color: var(--ok); }

/* panel tool */
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; position: relative; }
@media (min-width: 700px) { .tool { padding: 22px; } }
.tool.busy .go, .tool.busy .drop { pointer-events: none; opacity: .6; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 170px; padding: 20px; border: 2px dashed var(--line-2); border-radius: var(--r); background: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--line) 35%, transparent) 14px 15px), var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.is-over { border-color: var(--accent); background-color: var(--accent-soft); }
.drop svg { width: 44px; height: 44px; color: var(--accent); }
.drop strong { font-size: 1.1rem; }
.drop .btn { pointer-events: none; }
.drop small { color: var(--muted); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.opts { display: grid; gap: 14px; margin-top: 16px; }
.opt-label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.opt-label small { font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips button { min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--paper); color: var(--ink); font: 700 .95rem var(--font); cursor: pointer; }
.chips button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips button .sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(0,0,0,.2); }
.chips input[type=number] { width: 110px; min-height: 42px; border-radius: 10px; border: 1.5px solid var(--line-2); padding: 0 10px; font: 700 .95rem var(--font); background: var(--paper); color: var(--ink); }
select, textarea, input[type=text] { width: 100%; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line-2); padding: 8px 10px; font: 500 1rem var(--font); background: var(--paper); color: var(--ink); }
textarea { min-height: 70px; resize: vertical; }
.row2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); height: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 11px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); font: 700 1rem var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); border-color: var(--accent-d); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.btn:disabled { opacity: .5; cursor: default; }
.go { width: 100%; margin-top: 16px; min-height: 52px; font-size: 1.05rem; }
.status { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: .95rem; background: var(--paper); border: 1px solid var(--line); }
.status-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.status-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.status-error { background: var(--err-soft); border-color: transparent; color: var(--err); }
.progress { margin-top: 12px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.file-info:empty { display: none; }
.file-pill { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: .93rem; }
.fp-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-size { color: var(--muted); white-space: nowrap; }
.result { display: grid; gap: 12px; margin-top: 14px; }
.result:empty { display: none; }
.result-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); }
.result-card.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.result-card.warn { border-color: var(--warn); }
.result-thumb { flex: none; width: 92px; }
.result-thumb img { width: 92px; max-height: 140px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.result-body { min-width: 0; flex: 1; }
.result-title { font-weight: 700; overflow-wrap: anywhere; font-size: .95rem; }
.result-sizes { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 4px 0; }
.sz-before { color: var(--muted); text-decoration: line-through; }
.sz-after { font: 800 1.45rem/1.1 var(--display); }
.sz-pct { font-weight: 800; color: var(--ok); }
.badge { display: inline-block; font-size: .82rem; font-weight: 800; padding: 3px 9px; border-radius: 6px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); } .badge-warn { background: var(--warn-soft); color: var(--warn); }
.result-meta { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sort-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.sort-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.sort-no { font-weight: 800; color: var(--muted); width: 22px; text-align: center; }
.sort-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sort-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.sort-ico { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; font: 800 .72rem var(--font); color: #fff; background: var(--err); flex: none; }
.sort-ico.img { background: #2563eb; }
.sort-name { min-width: 0; font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; display: flex; flex-direction: column; }
.sort-name small { color: var(--muted); font-weight: 500; }
.sort-btns { display: flex; gap: 4px; }
.thumb-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.thumb { margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); text-align: center; }
.thumb img { width: 100%; height: 150px; object-fit: contain; background: #fff; border-radius: 4px; }
.thumb figcaption { font-size: .82rem; color: var(--muted); margin: 4px 0; }

/* editor pas foto & watermark */
.editor { margin-top: 16px; }
.ed-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .ed-grid { grid-template-columns: minmax(240px, 340px) 1fr; align-items: start; } }
.stage { position: relative; width: 100%; max-width: 340px; margin-inline: auto; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; touch-action: none; cursor: grab; background: #e9e5dc; box-shadow: 0 0 0 1px var(--line-2); }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage .guide { position: absolute; inset: 0; pointer-events: none; }
.size-label { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.nudge { display: flex; justify-content: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pasfoto-out { max-height: 160px; }
.custom-color { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.custom-color input { width: 56px; height: 40px; border: 0; background: none; }
.wm-view { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.checker { background: conic-gradient(#e7e7e7 25%, #fff 0 50%, #e7e7e7 0 75%, #fff 0) 0 0 / 18px 18px; border-radius: 8px; border: 1px solid var(--line); padding: 10px; text-align: center; }
.checker canvas { max-height: 220px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; background: var(--paper); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: transparent; font: 700 .95rem var(--font); color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.pad { width: 100%; height: 220px; border-radius: 10px; border: 1.5px dashed var(--line-2); background: #fff; touch-action: none; display: block; }
.pad-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; justify-content: space-between; }

/* konten */
.content { padding-bottom: 20px; }
.content ol.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 10px; }
.content ol.steps li { counter-increment: s; position: relative; padding: 12px 14px 12px 52px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.content ol.steps li::before { content: counter(s); position: absolute; left: 12px; top: 11px; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.content table { width: 100%; border-collapse: collapse; font-size: .94rem; background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.content th, .content td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.content th { background: var(--paper); font-weight: 800; }
.content tr:last-child td { border-bottom: 0; }
.tbl { overflow-x: auto; }
.note { padding: 12px 14px; border-left: 4px solid var(--tab); background: var(--card); border-radius: 0 10px 10px 0; margin: 14px 0; font-size: .95rem; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--card); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; overflow-x: auto; font-size: .9rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 1.4rem; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 16px 14px; color: var(--ink-2); }
.related .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.color-swatches { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.color-swatches div { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); font-size: .9rem; }
.color-swatches i { display: block; height: 64px; }
.color-swatches span { display: block; padding: 8px 10px; }
.color-swatches code { font-weight: 800; }

/* iklan: tersembunyi bila kosong */
.ad-slot { margin: 22px auto; text-align: center; }
.ad-slot.is-empty, .ad-slot:empty { display: none; min-height: 0; margin: 0; }

/* footer */
.site-f { margin-top: 40px; border-top: 1px solid var(--line); background: var(--card); padding: 28px 0 40px; font-size: .93rem; color: var(--muted); }
.site-f .cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.site-f h4 { color: var(--ink); margin: 0 0 8px; font-size: .95rem; }
.site-f ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-f a { color: var(--ink-2); text-decoration: none; } .site-f a:hover { color: var(--accent-d); text-decoration: underline; }
.site-f .copy { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); }
.privacy-strip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--ink); color: var(--paper); margin: 24px 0; }
.privacy-strip svg { flex: none; width: 28px; height: 28px; color: var(--tab); }
.privacy-strip p { margin: 0; }
.privacy-strip strong { color: #fff; }
[data-theme=dark] .privacy-strip { background: #222b3c; }
.legal h2 { margin-top: 1.6em; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
