/* Shared look for tool pages (/charcount/, /qr/, /imgtool/, /pdftool/, /age/, /hwp2pdf/). Loaded after /style.css; reuses its tokens. */
.tool-header { padding-top: clamp(1.5rem, 5vw, 3rem); padding-bottom: 1rem; }
.back {
  display: inline-block; padding: .6rem 0; margin-bottom: .5rem;
  color: var(--accent); font-weight: 600; font-size: .95rem;
  text-decoration: underline; text-underline-offset: 3px;
}
.back:hover { text-decoration-thickness: 2px; }
.back:focus-visible, .btn:focus-visible, .linkbtn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.tool-header h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.privacy { margin: 1rem 0 0; font-size: .85rem; color: var(--muted); }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.25rem; margin: 0 0 1rem;
}
.panel h2 { margin: 0 0 .75rem; font-size: 1.05rem; }
label, .label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .35rem; }
input[type="text"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: .55rem .7rem;
}
textarea { min-height: 12rem; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="file"] { width: 100%; font: inherit; color: var(--text); }
.field { margin: 0 0 1rem; }
.fields { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); margin-bottom: 1rem; }
.hint { margin: .35rem 0 0; font-size: .8rem; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.btn {
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
  padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
}
.btn.secondary { background: transparent; color: var(--accent); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.linkbtn {
  font: inherit; cursor: pointer; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: .3rem .65rem;
}
.linkbtn[disabled] { opacity: .4; cursor: not-allowed; }
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); margin: 0; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .75rem .9rem; }
.stat dt { font-size: .8rem; color: var(--muted); }
.stat dd { margin: .15rem 0 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.msg { margin: .75rem 0 0; color: var(--muted); font-size: .9rem; }
.msg.error { color: var(--accent); font-weight: 600; }
.result-big { font-size: 1.6rem; font-weight: 800; margin: 0; font-variant-numeric: tabular-nums; }
.result-sub { margin: .25rem 0 0; color: var(--muted); font-size: .9rem; }
.list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.list li {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem;
}
.list .name { overflow-wrap: anywhere; flex: 1 1 12rem; }
.list .meta { color: var(--muted); font-size: .85rem; }
.preview { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.checks label { font-weight: 400; display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cols { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.mt { margin-top: .75rem; }
