/* ============ PassPic - styles.css (FreeTools Hub family) ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #1d4ed8; --purple: #7c3aed; --ink: #1e293b; --muted: #64748b;
  --line: #e2e8f0; --bg: #f8fafc; --card: #ffffff; --ok: #16a34a;
}
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

#siteHeader { background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 14px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { font-size: 2rem; }
.brand-name { font-size: 1.5rem; }
.brand-tag { opacity: .85; font-size: .9rem; }
.crumbs a { color: #fff; opacity: .9; text-decoration: none; font-size: .9rem; }
.crumbs a:hover { text-decoration: underline; }
.free-banner { text-align: center; padding: 10px 16px 16px; font-size: .85rem; opacity: .95; }

.card { background: var(--card); border-radius: 16px; padding: 28px; margin: 24px 0; box-shadow: 0 4px 24px rgba(15,23,42,.07); }
.card h2 { margin: 22px 0 10px; font-size: 1.25rem; }
.card h2:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.dropzone { border: 2px dashed #b6c2f5; border-radius: 14px; padding: 44px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; margin-top: 14px; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #eff4ff; }
.dz-icon { font-size: 2.4rem; margin-bottom: 8px; }

/* presets */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.preset { border: 2px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; font: inherit; color: inherit; }
.preset:hover { border-color: #b6c2f5; }
.preset.active { border-color: var(--blue); background: #eff4ff; }
.preset strong { display: block; font-size: .95rem; }
.preset span { font-size: .8rem; color: var(--muted); }
.req-box { background: #f1f5ff; border: 1px solid #c9d6ff; border-radius: 12px; padding: 14px 16px; margin-top: 14px; font-size: .9rem; }
.req-box p { margin-top: 4px; }

/* crop stage */
.crop-stage { margin-top: 12px; background: #0f172a; border-radius: 12px; padding: 18px; display: flex; justify-content: center; }
#cropCanvas { max-width: 100%; max-height: 62vh; width: auto; height: auto; border-radius: 6px; touch-action: none; cursor: grab; }
#cropCanvas:active { cursor: grabbing; }
.zoom-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 1.2rem; color: var(--muted); }
.zoom-row input[type="range"] { flex: 1; accent-color: var(--blue); }

.check-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; cursor: pointer; font-size: .93rem; }
.check-row input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; }

.row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: #1a45bd; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn:disabled { opacity: .55; cursor: wait; }

.gen-progress { margin-top: 14px; }
.progress-track { height: 12px; background: #eef2ff; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--blue), var(--purple)); border-radius: 999px; transition: width .25s; }
#fallbackNote { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; margin-top: 12px; }

/* result */
.result-stage { margin-top: 12px; background: #f1f5f9; border-radius: 12px; padding: 24px; display: flex; justify-content: center; }
#resultCanvas { max-width: 100%; max-height: 62vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 2px 12px rgba(15,23,42,.15); background: #fff; }

/* faq */
.faq-list { margin-top: 6px; }
.faq { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; overflow: hidden; }
.faq summary { padding: 14px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "› "; color: var(--blue); font-weight: 700; }
.faq p { padding: 0 16px 16px; color: var(--muted); font-size: .93rem; }

#siteFooter { text-align: center; padding: 26px 0 40px; color: #94a3b8; font-size: .85rem; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
  .card { padding: 20px; }
  .header-inner { flex-direction: column; gap: 8px; text-align: center; }
}
