.tool-page { max-width: 880px; margin: 26px auto 50px; font-family: "Segoe UI", system-ui, -apple-system, sans-serif; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.tool-head h1 { font: 700 38px/1.15 "Segoe UI", system-ui, sans-serif; margin: 8px 0 8px; }
.tool-head .lead { margin: 0 0 18px; font-size: 18px; }
.tool-app { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: 0 2px 10px rgba(17, 42, 70, .06); font-size: 16px; line-height: 1.5; }
.tool-app h2 { font: 700 20px/1.3 "Segoe UI", system-ui, sans-serif; margin: 0 0 10px; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; color: var(--muted); margin: 12px 4px 0; }
.privacy-note svg { flex: none; margin-top: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 34px 18px; border: 2px dashed #9db6cf; border-radius: 10px; background: #f5f9fd; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.over, .dropzone:focus-within { background: #e9f2fb; border-color: var(--accent); }
.dropzone strong { display: inline-block; background: var(--accent); color: #fff; padding: 11px 22px; border-radius: 8px; font-size: 17px; }
.dz-icon { font-size: 26px; color: var(--accent); line-height: 1; }
.dz-or { color: var(--muted); font-size: 14px; }
.dz-hint { color: var(--muted); font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 15px "Segoe UI", system-ui, sans-serif; padding: 9px 16px; border-radius: 8px; border: 1px solid #c4d3e2; background: #fff; color: var(--accent); cursor: pointer; text-decoration: none; }
.btn:hover { background: #f0f6fc; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #164b7b; }
.btn-ghost { border-color: transparent; }
.btn-small { padding: 4px 9px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }

.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 16px 0 4px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.field-label { font-weight: 600; }
.field-help { color: var(--muted); font-size: 13px; }
.field input[type=text], .field input[type=number], .field input[type=url], .field input[type=email], .field input[type=tel], .field input[type=password], .field select, .tool-app textarea {
  font: 15px "Segoe UI", system-ui, sans-serif; padding: 8px 10px; border: 1px solid #c4d0dc; border-radius: 7px; background: #fff; color: var(--ink); width: 100%; }
.check { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.tool-app textarea { min-height: 220px; resize: vertical; line-height: 1.55; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #c4d0dc; border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 13px; font: 600 14px "Segoe UI", system-ui, sans-serif; cursor: pointer; color: var(--ink); border-right: 1px solid #e3e9ef; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed=true] { background: var(--accent); color: #fff; }

.file-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.file-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list small, .result small { color: var(--muted); }
.file-list .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: #fff; }

.tool-status { margin: 12px 0 0; padding: 9px 12px; border-radius: 7px; background: #eef4fa; font-size: 15px; }
.tool-status[data-kind=error] { background: #fdecea; color: #8c1d18; }
.tool-status[data-kind=warn] { background: #fff4e0; color: #7a4b00; }
.tool-status[data-kind=ok] { background: #e7f5ea; color: #1e5b2b; }
.tool-progress { width: 100%; height: 10px; margin-top: 12px; accent-color: var(--accent); }

.result { margin-top: 18px; padding: 16px 18px; border: 2px solid #4c9a5e; border-radius: 10px; background: #f3fbf5; }
.result-title { color: #1e5b2b; }
.result-note { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.result-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.result-list li { display: flex; align-items: center; gap: 10px; }
.result-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.result-thumb { width: 54px; height: 54px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 4px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 14px; }
.thumbs figure { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.thumbs .frame { height: 150px; display: flex; align-items: center; justify-content: center; background: #f2f5f8; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.thumbs canvas, .thumbs img { max-width: 92%; max-height: 92%; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: transform .2s; background: #fff; }
.thumbs figure.selected .frame { outline: 3px solid var(--accent); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: #f5f9fd; border: 1px solid #dbe6f1; border-radius: 8px; padding: 10px 12px; }
.stat b { display: block; font-size: 24px; line-height: 1.2; color: var(--ink); }
.stat span { font-size: 13px; color: var(--muted); }

.wave { width: 100%; height: 140px; display: block; background: #0f2236; border-radius: 8px; cursor: pointer; touch-action: none; }
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.mono { font-family: Consolas, "Cascadia Mono", Menlo, monospace; }
.out-box { white-space: pre-wrap; background: #f7f9fb; border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 360px; overflow: auto; font-size: 15px; }
.qr-preview { display: flex; justify-content: center; padding: 16px; background: #f5f7f9; border-radius: 8px; margin-top: 14px; }
.qr-preview img, .qr-preview canvas { max-width: 100%; height: auto; image-rendering: pixelated; }
.pw-out { display: flex; gap: 8px; align-items: stretch; }
.pw-out input { flex: 1; min-width: 0; font: 20px Consolas, "Cascadia Mono", Menlo, monospace !important; padding: 10px 12px !important; }
.pw-out .btn { flex: none; }
@media (max-width: 480px) { .pw-out input { font-size: 16px !important; padding: 8px !important; } }
.meter { height: 8px; border-radius: 4px; background: #e6ebf0; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

.tool-article { max-width: 760px; margin: 34px 0 0; }
.tool-article h2 { margin-top: 34px; }
.tool-article ol.steps { padding-left: 22px; }
.tool-article ol.steps li { margin-bottom: 6px; }
.faq details { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px 16px; margin: 10px 0; }
.faq summary { cursor: pointer; font: 600 17px "Segoe UI", system-ui, sans-serif; }
.faq details p { margin: 8px 0 2px; font-size: 16.5px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 16px 0 34px; }
.tool-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-family: "Segoe UI", system-ui, sans-serif; transition: border-color .15s, box-shadow .15s; }
.tool-card:hover { border-color: var(--accent); box-shadow: 0 3px 12px rgba(17, 42, 70, .1); }
.tool-card .badge { flex: none; width: 46px; height: 46px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font: 700 12px "Segoe UI", system-ui, sans-serif; color: #fff; background: var(--accent); letter-spacing: .02em; }
.tool-card .badge.pdf { background: #c0392b; }
.tool-card .badge.image { background: #2e7d4f; }
.tool-card .badge.audio { background: #7b3fa0; }
.tool-card .badge.text { background: #1d5c96; }
.tool-card strong { display: block; font-size: 16px; }
.tool-card span.desc { display: block; font-size: 14px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.tools-cat h2 { font: 700 26px/1.3 "Segoe UI", system-ui, sans-serif; margin: 30px 0 4px; scroll-margin-top: 20px; }
.tools-cat p { margin: 0; color: var(--muted); font-size: 16px; }
.home-tools h2 { font: 700 26px/1.3 "Segoe UI", system-ui, sans-serif; margin: 30px 0 0; }

@media (max-width: 600px) {
  .tool-head h1 { font-size: 29px; }
  .tool-app { padding: 16px; }
  .range-row { grid-template-columns: 1fr; }
}
