/* Shared layout for the tool pages. Colors come from /theme.css. */
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 900px; margin: 0 auto; padding: 20px 16px 80px; }
h1 { font-size: 24px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
h1 a { color: var(--muted); text-decoration: none; font-size: 16px; font-weight: 500; }
h1 a:hover { color: var(--text); }
h2 { font-size: 16px; margin: 24px 0 10px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.privacy { font-size: 13px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row + .row { margin-top: 10px; }
label { font-size: 14px; }
select, input[type="number"], textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px;
}
textarea { width: 100%; min-height: 120px; resize: vertical; }
select:focus, input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn {
  border: 1px solid var(--accent); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; white-space: nowrap; text-decoration: none; display: inline-block;
}
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { padding: 5px 9px; font-size: 13px; }
.drop {
  display: block; border: 2px dashed var(--border); border-radius: 14px; padding: 28px 16px; text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop b { color: var(--text); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.item { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; }
.item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--bg); flex: none; }
.item .body { flex: 1; min-width: 0; }
.item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { color: var(--muted); font-size: 13px; }
.good { color: #16a34a; }
.bad { color: #dc2626; }
.warn { color: #d97706; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[data-theme="oldschool"] .btn:not(.ghost) { color: #000; }
