/* 画像かんたんツール：お金の書類ツールの style.css を土台に、配色と部品を追加する */
:root {
  --accent: #0284c7;
  --accent-2: #10b981;
  --accent-soft: #e0f2fe;
  --grad: linear-gradient(135deg, #0284c7 0%, #06b6d4 45%, #10b981 100%);
}
@media (prefers-color-scheme: dark) {
  :root { --accent: #38bdf8; --accent-2: #6ee7b7; --accent-soft: #0c2a3a; }
}
.brand-mark { box-shadow: 0 4px 12px rgba(2, 132, 199, .35); }
.hero::before {
  background:
    radial-gradient(40% 50% at 20% 40%, rgba(6, 182, 212, .16), transparent 70%),
    radial-gradient(35% 45% at 80% 30%, rgba(16, 185, 129, .16), transparent 70%);
}

.pdf-main { max-width: 1000px; margin: 0 auto; padding: 8px 16px 24px; }
.pdf-main > .tool-cards { margin: 8px 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

.dropzone {
  border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--panel)); padding: 32px 16px; text-align: center; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon {
  width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 16px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 1.8rem; font-weight: 800; box-shadow: 0 6px 16px rgba(2, 132, 199, .3);
}
.drop-title { margin: 0; font-weight: 800; font-size: 1.05rem; }
.drop-sub { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }

.btn {
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; border-radius: 999px; padding: 12px 24px; min-height: 46px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 6px 18px rgba(2, 132, 199, .3); }
.btn.primary:hover { color: #fff; filter: brightness(1.05); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.actions-row .primary { flex: 1 1 220px; }

.icon-btn {
  font: inherit; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); cursor: pointer; font-weight: 700;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.del:hover { border-color: var(--ng); color: var(--ng); }

.filelist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.file-item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center;
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel-2);
}
.file-no { grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: .85rem; }
.file-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { grid-column: 2; color: var(--muted); font-size: .8rem; }
.file-btns { grid-column: 3; grid-row: 1 / span 2; display: flex; gap: 4px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 16px; }
.thumb {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px;
  border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); text-decoration: none; color: var(--text);
}
.thumb img, .thumb canvas { max-width: 100%; max-height: 170px; object-fit: contain; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); transition: transform .2s; }
.thumb-img { height: 170px; display: grid; place-items: center; width: 100%; overflow: hidden; }
.thumb-no { position: absolute; top: 6px; left: 6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; background: var(--grad); color: #fff; font-size: .78rem; font-weight: 800; display: grid; place-items: center; }
.thumb-btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.thumb-btns .icon-btn { width: 32px; height: 32px; }
.thumb-dl { font-size: .8rem; font-weight: 700; color: var(--accent); }
.thumb.deleted { opacity: .4; }
.thumb.deleted .thumb-img { outline: 3px solid var(--ng); outline-offset: -3px; }

.options { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 16px; }
.options label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); flex: 1 1 200px; }
.options select, .options input {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--panel-2); border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 9px 12px; min-height: 44px;
}
.options select:focus, .options input:focus { outline: none; border-color: var(--accent); background: var(--panel); }

.hint { margin: 14px 0 0; font-size: .85rem; color: var(--muted); }
.status { margin: 16px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--panel-2); font-size: .9rem; font-weight: 600; }
.status.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.status.ng { color: var(--ng); background: color-mix(in srgb, var(--ng) 10%, var(--panel)); }
.results { margin-top: 12px; display: grid; gap: 8px; }
.result-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--accent-soft); }
.result-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.result-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-info span { font-size: .8rem; color: var(--muted); }
.options select, .options input { font-weight: 400; }
/* 証明写真 */
.crop-area { margin-top: 16px; }
.stage-wrap { display: grid; place-items: center; padding: 16px; margin-top: 12px; border-radius: var(--radius-sm); background: repeating-conic-gradient(var(--panel-2) 0% 25%, var(--panel) 0% 50%) 50% / 20px 20px; }
.stage { touch-action: none; cursor: grab; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); background: #fff; }
.stage:active { cursor: grabbing; }
.options input[type=range] { padding: 0; min-height: 44px; accent-color: var(--accent); background: transparent; }
.form-embed { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.form-embed iframe { display: block; width: 100%; height: 1300px; border: 0; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-top: 16px; }
.breadcrumb a { color: var(--muted); }
.options label.wide { flex-basis: 100%; }
