@font-face {
  font-family: "NotoSansHindi";
  src: url("./assets/fonts/NotoSansDevanagari-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #17253d;
  --muted: #66748a;
  --line: #dce4ef;
  --blue: #1559b7;
  --blue-dark: #10458f;
  --surface: #ffffff;
  --page: #f3f6fb;
  --green: #087443;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, #e3edff, transparent 34rem), var(--page);
  color: var(--ink);
  line-height: 1.5;
}
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.shell {
  width: min(100% - 28px, 940px);
  margin: 28px auto 40px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 15px;
  background: linear-gradient(145deg, #287be0, #10458f);
  box-shadow: 0 7px 16px #1559b72e;
  color: #fff;
  font-size: 25px;
  font-weight: 850;
}
.brand-copy { min-width: 0; flex: 1; }
.brand-copy h1 { margin: 0; font-size: clamp(20px, 4vw, 27px); line-height: 1.15; letter-spacing: -.5px; }
.brand-copy p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.free-tag {
  padding: 6px 10px;
  border: 1px solid #bde6d0;
  border-radius: 999px;
  background: #e8f8ef;
  color: #08683b;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.privacy-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 15px 16px;
  border: 1px solid #b8e5ca;
  border-radius: 16px;
  background: #effbf3;
  color: #15583b;
}
.privacy-icon { font-size: 22px; line-height: 1.25; }
.privacy-note strong { display: block; margin-bottom: 2px; }
.privacy-note p { margin: 0; font-size: 13px; line-height: 1.5; }

.panel {
  margin-bottom: 18px;
  padding: clamp(17px, 4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 36px #2034540d;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 23px;
}
.eyebrow { margin: 0 0 4px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 1.2px; }
.section-heading h2 { margin: 0; font-size: clamp(19px, 4vw, 24px); letter-spacing: -.3px; }
.step-number { color: #d4deeb; font-size: 33px; font-weight: 800; line-height: 1; }

.file-drop {
  border: 1.5px dashed #9bbce9;
  border-radius: 15px;
  padding: 17px 16px 13px;
  background: #f8fbff;
  text-align: center;
  transition: border-color .2s, background .2s;
}
.file-drop:focus-within, .file-drop:hover { border-color: var(--blue); background: #f2f7ff; }
.file-drop input { display: block; width: 100%; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.file-label { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.file-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: #e5efff;
  color: var(--blue);
  font-size: 25px;
  font-weight: 750;
}
.file-label-title { font-weight: 750; }
.file-label-subtitle { color: var(--muted); font-size: 12px; }
.file-name { margin: 9px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.field-label { display: block; margin: 19px 0 7px; font-size: 13px; font-weight: 750; }
.field-label span { color: var(--muted); font-weight: 500; }
.text-input {
  display: block;
  width: 100%;
  min-height: 47px;
  padding: 11px 13px;
  border: 1px solid #cbd6e5;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.text-input:focus { border-color: #4787df; box-shadow: 0 0 0 3px #287be019; }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.format-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcff;
}
.format-row strong { font-size: 13px; }
.format-row p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 172px;
  padding: 10px 12px;
  border: 1px solid #9ab9e6;
  border-radius: 10px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 750;
}
.toggle-button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.bold-symbol { font-family: Georgia, serif; font-size: 18px; font-weight: 900; text-decoration: underline; }

.dob-panel { margin-top: 18px; padding: 14px; border: 1px solid #f0d28a; border-radius: 12px; background: #fffaf0; }

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 49px;
  margin-top: 20px;
  padding: 13px 18px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #1b68cd, #104b9c);
  box-shadow: 0 5px 12px #1559b72a;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  transition: transform .15s, box-shadow .15s;
}
.primary-button:hover:not(:disabled) { box-shadow: 0 7px 18px #1559b740; transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .7; }
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff6b;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status { min-height: 0; margin-top: 12px; white-space: pre-wrap; font-size: 13px; }
.status:empty { display: none; }
.status.error { padding: 11px 12px; border-radius: 10px; background: #fff0f0; color: #9d2222; }
.status.success { padding: 11px 12px; border-radius: 10px; background: #effbf3; color: #11683e; }
.status.info { padding: 11px 12px; border-radius: 10px; background: #eef5ff; color: #204e87; }

.results { margin-top: 20px; }
.result-note { margin: -10px 0 18px; color: var(--muted); font-size: 13px; }
.preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.preview-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcff; }
.preview-card h3 { margin: 0 0 10px; font-size: 14px; }
.preview-card img { display: block; width: 100%; border: 1px solid #d9e0e9; border-radius: 9px; background: #fff; }
.download-link { display: inline-block; margin-top: 10px; color: var(--blue); font-size: 12px; font-weight: 750; text-decoration: none; }
.download-link:hover { text-decoration: underline; }

footer { padding: 6px 4px 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.55; }
footer p { margin: 4px 0; }

@media (max-width: 600px) {
  .shell { width: min(100% - 18px, 940px); margin-top: 12px; }
  .topbar { gap: 10px; margin-bottom: 14px; }
  .brand-mark { width: 41px; height: 41px; border-radius: 12px; font-size: 22px; }
  .free-tag { padding: 5px 7px; font-size: 11px; }
  .privacy-note { padding: 12px; border-radius: 13px; }
  .panel { padding: 16px 13px; border-radius: 16px; }
  .format-row { align-items: stretch; flex-direction: column; }
  .toggle-button { width: 100%; }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-card { padding: 10px; }
}


/* ===== MANUAL PHOTO PRINT CONTROLS ===== */
.photo-settings {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcff;
}
.photo-settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}
.photo-settings-heading strong { display: block; font-size: 13px; }
.photo-settings-heading p {
  margin: 4px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
button.small-button {
  width: auto;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #cbd6e5;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.setting-control { min-width: 0; }
.setting-control + .setting-control { margin-top: 12px; }
.setting-control label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: #293a53;
  font-size: 12px;
  font-weight: 700;
}
.setting-control output { color: var(--blue); font-variant-numeric: tabular-nums; }
.setting-control input[type="range"] {
  display: block;
  width: 100%;
  margin: 0;
  accent-color: var(--blue);
}
.border-setting {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.border-setting input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}
.border-setting strong, .border-setting small { display: block; }
.border-setting strong { font-size: 12px; }
.border-setting small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.border-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: 16px;
  margin-top: 13px;
}
.border-options .setting-control + .setting-control { margin-top: 0; }
.border-options .text-input { min-height: 39px; padding: 7px 9px; font-size: 12px; }
body.dark .photo-settings { border-color: #34445d; background: rgba(22, 27, 35, .85); }
body.dark .setting-control label { color: #e2e8f0; }
body.dark .border-setting { border-color: #34445d; background: #151e2c; color: #f1f5fb; }
body.dark button.small-button { border-color: #34445d; background: #172235; color: #d9e8ff; }
@media (max-width: 560px) {
  .photo-settings { padding: 12px; }
  .photo-settings-heading { align-items: flex-start; }
  .border-options { grid-template-columns: 1fr; }
}


/* Compact settings button + responsive live photo editor */
.settings-launch {
  display:flex; align-items:center; gap:11px; width:100%; margin-top:18px;
  padding:11px 13px; border:1px solid #cad8eb; border-radius:12px;
  background:#f9fbff; color:var(--ink); text-align:left; box-shadow:none;
}
.settings-launch:hover { background:#eef5ff; box-shadow:0 3px 12px #1559b718; }
.settings-launch-icon {
  display:grid; place-items:center; width:36px; height:36px; flex:0 0 auto;
  border-radius:10px; background:#e4eeff; color:var(--blue); font-size:21px;
}
.settings-launch-copy { display:flex; min-width:0; flex:1; flex-direction:column; gap:2px; }
.settings-launch-copy strong { font-size:13px; }
.settings-launch-copy small { color:var(--muted); font-size:11px; }
.settings-launch-arrow { color:var(--blue); font-size:20px; }
.photo-settings-dialog {
  width:min(94vw,820px); max-width:820px; max-height:92dvh; padding:0; overflow:auto;
  border:1px solid #d4dfed; border-radius:18px; background:#fff; color:var(--ink);
  box-shadow:0 24px 80px #081a373d;
}
.photo-settings-dialog::backdrop { background:rgba(12,24,44,.68); backdrop-filter:blur(4px); }
.photo-dialog-card { padding:clamp(15px,3vw,24px); }
.photo-dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:17px; }
.photo-dialog-heading h2 { margin:0; font-size:clamp(20px,3vw,25px); }
.photo-dialog-heading p:not(.eyebrow) { margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.icon-close-button {
  display:grid; place-items:center; width:37px; height:37px; flex:0 0 auto; padding:0;
  border:1px solid var(--line); border-radius:10px; background:#fff; color:#334155;
  box-shadow:none; font-size:25px;
}
.photo-editor-grid { display:grid; grid-template-columns:minmax(190px,.8fr) minmax(0,1.2fr); gap:18px; align-items:stretch; }
.photo-live-panel {
  display:flex; min-width:0; flex-direction:column; align-items:center; padding:14px;
  border:1px solid var(--line); border-radius:14px; background:#f7f9fd;
}
.photo-live-stage {
  display:grid; place-items:center; width:100%; min-height:280px; flex:1; padding:12px;
  border:1px solid #e2e8f0; border-radius:10px; background-color:#fff;
  background-image:linear-gradient(45deg,#f2f4f7 25%,transparent 25%),linear-gradient(-45deg,#f2f4f7 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#f2f4f7 75%),linear-gradient(-45deg,transparent 75%,#f2f4f7 75%);
  background-size:16px 16px; background-position:0 0,0 8px,8px -8px,-8px 0;
}
.photo-live-image { display:block; max-width:min(100%,220px); max-height:370px; width:auto; height:auto; object-fit:contain; border:0; border-radius:1px; box-shadow:0 0 0 2px #111827; transition:filter .08s linear,box-shadow .08s linear; }
.photo-preview-placeholder { display:flex; max-width:220px; flex-direction:column; align-items:center; gap:9px; padding:18px 8px; color:var(--muted); text-align:center; }
.photo-preview-placeholder>span { color:#a8b8ce; font-size:42px; }
.photo-preview-placeholder strong { color:#314158; font-size:13px; }
.photo-preview-placeholder small { font-size:11px; line-height:1.5; }
.live-pill { margin-top:12px; padding:5px 9px; border:1px solid #bee8d0; border-radius:999px; background:#eaf9f0; color:#087443; font-size:10px; font-weight:800; letter-spacing:.7px; }
.live-pill span { color:#19a45b; font-size:9px; }
.photo-preview-help { margin:10px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
.photo-controls-panel { min-width:0; padding:15px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.photo-controls-panel .setting-control+.setting-control { margin-top:20px; }
.photo-controls-panel .setting-control label { display:flex; align-items:center; justify-content:space-between; gap:9px; margin-bottom:8px; color:#293a53; font-size:12px; font-weight:750; }
.photo-controls-panel .setting-control output { color:var(--blue); font-size:13px; font-variant-numeric:tabular-nums; }
.photo-controls-panel input[type=range] { display:block; width:100%; margin:0; accent-color:var(--blue); }
.range-hints { display:flex; justify-content:space-between; margin-top:3px; color:#8a96a7; font-size:10px; }
.photo-controls-panel .border-setting { margin-top:20px; }
.photo-controls-panel .border-options { margin-top:13px; }
.photo-controls-panel .border-options .text-input { min-height:40px; padding:8px 10px; }
.reset-photo-button { width:100%; margin-top:19px; padding:10px; border:1px solid #cbd6e5; border-radius:10px; background:#fff; color:var(--blue-dark); box-shadow:none; font-size:12px; font-weight:750; }
.reset-photo-button:hover { background:#f2f7ff; box-shadow:none; }
.photo-dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.photo-dialog-actions .primary-button { width:auto; min-width:150px; margin-top:0; }
.photo-dialog-actions .secondary-button { width:auto; min-width:100px; padding:12px 16px; border:1px solid #cbd6e5; border-radius:10px; background:#fff; color:var(--ink); box-shadow:none; font-size:13px; font-weight:700; }
.photo-settings-status { margin:10px 0 0; color:var(--muted); font-size:11px; }
body.dark .settings-launch { background:#151e2c; border-color:#34445d; color:#f1f5fb; }
body.dark .photo-settings-dialog { background:#101826; color:#f1f5fb; border-color:#34445d; }
body.dark .photo-dialog-heading p:not(.eyebrow) { color:#b1bdcd; }
body.dark .photo-live-panel,body.dark .photo-controls-panel { background:#151e2c; border-color:#34445d; }
body.dark .photo-controls-panel .setting-control label { color:#f1f5fb; }
body.dark .photo-dialog-actions .secondary-button,body.dark .reset-photo-button,body.dark .icon-close-button { background:#172235; color:#f1f5fb; border-color:#34445d; }
@media(max-width:620px) {
  .photo-settings-dialog { width:96vw; max-height:94dvh; }
  .photo-editor-grid { grid-template-columns:1fr; }
  .photo-live-stage { min-height:220px; }
  .photo-live-image { max-height:245px; }
  .photo-controls-panel { padding:13px; }
  .border-options { grid-template-columns:1fr; }
  .photo-dialog-actions .primary-button { flex:1; min-width:0; }
}
