:root {
  --bg: #f7f7f5; --surface: #ffffff; --ink: #1b1d21; --muted: #5f6570; --line: #e3e3de;
  --accent: #1f6feb; --accent-ink: #ffffff; --accent-soft: #e8f0fe; --ok: #1a7f37;
  --radius: 14px; --max: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111317; --surface: #1a1d23; --ink: #e9eaec; --muted: #9aa1ab; --line: #2b2f37;
    --accent: #4c8dff; --accent-soft: #1b2a45; --ok: #4ac26b; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.logo { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
nav.top { display: flex; gap: 18px; font-size: 15px; }
nav.top a { color: var(--muted); text-decoration: none; }
nav.top a:hover { color: var(--ink); }
@media (max-width: 640px) { nav.top a.hide-sm { display: none; } }

.hero { padding: 36px 0 12px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.5vw, 42px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 640px; font-size: 18px; }

.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 22px 0; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.drop, .drop-inner { display: block; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 34px 16px; text-align: center; cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-inner strong { display: block; font-size: 19px; margin-bottom: 4px; }
.drop-inner small { color: var(--muted); display: block; }
.drop .count { display: block; margin-top: 8px; color: var(--ok); font-weight: 600; min-height: 1.4em; }
.drop input { display: none; }
.pick { display: inline-block; margin-top: 12px; background: var(--accent); color: var(--accent-ink); padding: 11px 22px; border-radius: 10px; font-weight: 600; }

.opts { display: flex; flex-wrap: wrap; gap: 14px 18px; margin: 18px 0 6px; align-items: end; }
.opts label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 4px; }
.opts input[type=number], .opts select { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-width: 110px; }
.opts input[type=color] { width: 46px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn, button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer; background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-block; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }
.results { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.results li { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.results img, .results .thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.results .meta { flex: 1; min-width: 0; }
.results strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results small { color: var(--muted); font-size: 13px; }
.privacy { font-size: 13px; color: var(--muted); margin: 12px 0 0; text-align: center; }

.ad { margin: 20px auto; min-height: 100px; text-align: center; }
.content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
article h2 { font-size: 24px; margin: 34px 0 10px; letter-spacing: -.01em; }
article h3 { font-size: 18px; margin: 20px 0 6px; }
article p, article li { color: var(--ink); }
article ol, article ul { padding-left: 22px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 10px 0; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
th { background: var(--surface); }
.table-scroll { overflow-x: auto; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0; background: var(--surface); }
summary { cursor: pointer; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--ink); font-size: 14px; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { display: block; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--accent); }
.card strong { display: block; margin-bottom: 4px; }
.card small { color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); padding-top: 14px; }
.crumbs a { color: var(--muted); }
footer.site { margin-top: 60px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; background: var(--surface); }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
footer.site h4 { margin: 0 0 8px; color: var(--ink); font-size: 14px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 4px 0; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--ink); }
@media (max-width: 640px) {
  .opts { display: grid; grid-template-columns: 1fr 1fr; }
  .opts input[type=number], .opts select { min-width: 0; width: 100%; }
}
