/* ===== PASSPORT PHOTO MAKER ===== */
.pp-root {
  --accent: #6557ff; --accent2: #aa3fff; --bg: #f5f7ff; --surface2: #eef0fb; --border: #dde4f5; --border2: #c4cee8;
  --text: #1b1d2c; --muted: #667089; --act: rgba(101, 87, 255, 0.1); --ok: #059669; --bad: #dc2626;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--text); background: #fff;
  max-width: 1120px; margin: 0 auto 56px; border-radius: 18px; border: 1.5px solid var(--border);
  box-shadow: 0 4px 24px rgba(27, 29, 44, 0.1); position: relative; overflow: hidden;
}
.pp-root::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; z-index: 5; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.pp-root.is-drop { outline: 3px dashed var(--accent); outline-offset: -8px; }
.pp-root *, .pp-root *::before, .pp-root *::after { box-sizing: border-box; }
.pp-root button, .pp-root input, .pp-root select { font-family: inherit; }
.pp-root [hidden] { display: none !important; }
.pp-root button:focus-visible, .pp-root input:focus-visible, .pp-root select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pp-app { display: grid; grid-template-columns: 1fr; }
.pp-stage-col { padding: 16px; background: var(--bg); min-width: 0; display: flex; flex-direction: column; align-items: center; }
.pp-panel { padding: 16px 16px 22px; border-top: 1.5px solid var(--border); min-width: 0; }
@media (min-width: 900px) {
  .pp-app { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
  .pp-stage-col { position: sticky; top: 0; padding: 26px; }
  .pp-panel { border-top: 0; border-left: 1.5px solid var(--border); }
}
.pp-stage-wrap { width: 100%; display: flex; justify-content: center; }
.pp-stage { position: relative; line-height: 0; touch-action: none; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 10px 30px rgba(27, 29, 44, .2); background: #fff; overflow: hidden; }
.has-photo .pp-stage { cursor: grab; }
.pp-stage.is-drag { cursor: grabbing; }
.pp-stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 62vh; }
@media (min-width: 900px) { .pp-stage canvas { max-height: 560px; } }
.pp-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; text-align: center; line-height: 1.4; background: rgba(255,255,255,.94); color: var(--muted); }
.pp-empty svg { color: var(--accent); }
.pp-empty b { font-size: 17px; color: var(--text); }
.pp-empty span { font-size: 13px; max-width: 260px; }
.pp-empty-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.pp-link { border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; margin-top: 2px; }
.pp-busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; line-height: 1.4; background: rgba(15, 17, 30, .74); color: #fff; font-size: 14px; font-weight: 600; }
.pp-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: ppspin .9s linear infinite; }
@keyframes ppspin { to { transform: rotate(360deg); } }
.pp-under { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; max-width: 560px; margin-top: 12px; flex-wrap: wrap; }
.pp-nudge { display: flex; gap: 4px; }
.pp-icon { width: 36px; height: 36px; border-radius: 9px; border: 1.5px solid var(--border); background: #fff; font-size: 16px; cursor: pointer; color: var(--text); }
.pp-icon:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pp-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; max-width: 520px; }
.pp-msg { margin: 8px auto 0; border-radius: 10px; background: #1b1d2c; color: #fff; font-size: 13px; font-weight: 600; height: 0; overflow: hidden; opacity: 0; padding: 0 14px; transition: opacity .2s; max-width: 520px; }
.pp-msg.is-on { opacity: 1; height: auto; padding: 9px 14px; }

.pp-step { padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1.5px solid var(--border); }
.pp-step:last-of-type { border-bottom: 0; margin-bottom: 4px; }
.pp-step-h { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.pp-num { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: 13px; }
.pp-root[data-step='1'] .pp-step:not(:first-child) { opacity: .55; }
.pp-select { width: 100%; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--text); background: #fff; }
.pp-spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.pp-spec div { background: var(--bg); border-radius: 10px; padding: 8px 9px; }
.pp-spec dt { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
.pp-spec dd { margin: 0; font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.pp-rules { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: #3b4256; }
.pp-f { display: block; margin-bottom: 12px; }
.pp-f > span { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.pp-f > span output { color: var(--muted); font-weight: 600; }
.pp-f input[type='range'] { width: 100%; accent-color: var(--accent); height: 26px; margin: 0; }
.pp-sws { display: flex; gap: 8px; }
.pp-sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--border2); cursor: pointer; padding: 0; }
.pp-sw.is-on { box-shadow: 0 0 0 2.5px var(--accent); }
.pp-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.pp-btn { padding: 9px 13px; border-radius: 10px; border: 1.5px solid var(--border); background: #fff; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; }
.pp-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pp-btn-main { padding: 11px 18px; border: 0; border-radius: 11px; background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; font-size: 14.5px; font-weight: 700; cursor: pointer; box-shadow: 0 5px 16px rgba(101, 87, 255, .32); }
.pp-btn-main:hover:not(:disabled) { filter: brightness(1.06); }
.pp-root button:disabled { opacity: .45; cursor: default; box-shadow: none; }
.pp-wide { width: 100%; }
.pp-mt { margin-top: 12px; }
.pp-checks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.pp-checks li { font-size: 13px; line-height: 1.4; padding: 8px 10px 8px 32px; border-radius: 9px; position: relative; background: var(--bg); }
.pp-checks li::before { position: absolute; left: 10px; top: 8px; font-weight: 800; }
.pp-checks .is-ok { background: #ecfdf5; } .pp-checks .is-ok::before { content: '\2713'; color: var(--ok); }
.pp-checks .is-bad { background: #fef2f2; } .pp-checks .is-bad::before { content: '!'; color: var(--bad); left: 13px; }
.pp-checks .is-info::before { content: 'i'; color: var(--accent); left: 13px; font-style: italic; }
.pp-chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pp-chk input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.pp-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 6px 0 0; }
.pp-disclaimer { background: #fffbeb; color: #8a6116; border-radius: 10px; padding: 10px 12px; }
.pp-privacy { margin: 0; padding: 12px 16px; text-align: center; font-size: 12.5px; color: var(--muted); background: var(--bg); border-top: 1.5px solid var(--border); }
@media (max-width: 575px) {
  .pp-root { border-radius: 14px; margin-inline: 8px; }
  .pp-stage-col, .pp-panel { padding: 12px; }
  .pp-spec { grid-template-columns: 1fr 1fr; }
  .pp-row .pp-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .pp-spin { animation-duration: 3s; } }

/* download in the top bar */
.pp-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; max-width: 560px; margin-bottom: 12px; flex-wrap: wrap; }
.pp-bar-info { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pp-bar-right { display: flex; gap: 8px; align-items: center; }
.pp-bar .pp-btn-main { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; }
@media (max-width: 575px) {
  .pp-bar { flex-direction: column; align-items: stretch; }
  .pp-bar-right > * { flex: 1; justify-content: center; }
}
