:root {
  --purple-950: #2e1065;
  --purple-900: #4c1d95;
  --purple-800: #5b21b6;
  --purple-700: #6d28d9;
  --purple-600: #7c3aed;
  --purple-100: #ede9fe;
  --purple-50: #f5f3ff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #d9dce3;
  --surface: #ffffff;
  --surface-2: #f7f7fb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --success: #166534;
  --success-soft: #f0fdf4;
  --warning: #92400e;
  --warning-soft: #fffbeb;
  --shadow: 0 12px 30px rgba(17, 24, 39, .08);
  --radius: 18px;
  --tap: 48px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-2);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-2); }
body { margin: 0; min-height: 100vh; background: var(--surface-2); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.splash {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
}
.splash img { width: min(420px, 76vw); height: auto; }
.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid var(--purple-100);
  border-top-color: var(--purple-700);
  border-radius: 999px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 48px);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217,220,227,.85);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { width: clamp(150px, 18vw, 220px); height: auto; object-fit: contain; }
.brand-copy { display: grid; line-height: 1.12; }
.brand-copy strong { font-size: 15px; }
.brand-copy span { color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 96px;
}
.page.narrow { width: min(760px, calc(100% - 28px)); }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.page-heading h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); letter-spacing: -.035em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); }
.heading-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.btn {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .payment-choice:focus-within {
  outline: 3px solid rgba(124,58,237,.25);
  outline-offset: 2px;
}
.btn-primary { background: var(--purple-700); color: #fff; box-shadow: 0 8px 18px rgba(109,40,217,.22); }
.btn-primary:hover { background: var(--purple-800); }
.btn-secondary { background: #fff; color: var(--purple-800); border-color: #c4b5fd; }
.btn-secondary:hover { background: var(--purple-50); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-danger { color: var(--danger); border-color: #fecaca; background: #fff; }
.btn-success { background: #166534; color: #fff; }
.btn-sm { min-height: 38px; padding: 7px 11px; border-radius: 10px; font-size: 13px; }
.btn[disabled] { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.icon { width: 19px; height: 19px; display: inline-block; flex: 0 0 auto; }
.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.action-card {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 124px;
  color: inherit;
}
.action-card:hover { border-color: #c4b5fd; box-shadow: 0 16px 40px rgba(76,29,149,.12); }
.action-card .action-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--purple-50); color: var(--purple-700); display: grid; place-items: center; }
.action-card h2 { margin: 0 0 6px; font-size: 18px; }
.action-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.action-card .arrow { color: var(--purple-700); font-size: 26px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-header {
  padding: 20px 22px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.panel-header h2 { margin: 0; font-size: 18px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.record-list { display: grid; }
.record-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) minmax(120px, .8fr) minmax(150px, 1fr) minmax(128px, .7fr) auto;
  gap: 16px;
  align-items: center;
  padding: 17px 22px;
  border-bottom: 1px solid #eceef2;
}
.record-row:last-child { border-bottom: 0; }
.record-row:hover { background: #fbfbfe; }
.record-main { min-width: 0; }
.record-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-main small, .record-cell small { color: var(--muted); display: block; margin-top: 4px; }
.record-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.pdf-download-button {
  width: 40px;
  min-width: 40px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: var(--purple-700);
  border-color: #c4b5fd;
  background: #fff;
}
.pdf-download-button:hover {
  color: var(--purple-800);
  border-color: var(--purple-500);
  background: var(--purple-50);
}
.pdf-download-button .icon { width: 20px; height: 20px; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.status-draft { color: #4b5563; background: #f3f4f6; }
.status-waiting_seller { color: var(--warning); background: var(--warning-soft); }
.status-seller_signed { color: #1d4ed8; background: #eff6ff; }
.status-finalized { color: var(--success); background: var(--success-soft); }
.empty-state { padding: 50px 24px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr);
  background: #fff;
}
.login-visual {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-content: center;
  padding: 56px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 15%, rgba(255,255,255,.19), transparent 32%),
    linear-gradient(145deg, var(--purple-950), var(--purple-700));
}
.login-visual::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 72px solid rgba(255,255,255,.055);
  right: -170px;
  bottom: -180px;
}
.login-visual img { width: min(470px, 88%); height: auto; filter: none; margin-bottom: 28px; }
.login-visual h1 { font-size: clamp(34px, 5vw, 64px); max-width: 720px; margin: 0 0 18px; letter-spacing: -.04em; line-height: .98; }
.login-visual p { margin: 0; max-width: 600px; font-size: 18px; line-height: 1.55; color: rgba(255,255,255,.82); }
.login-form-wrap { display: grid; place-items: center; padding: 32px; background: var(--surface-2); }
.login-card { width: min(430px, 100%); padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.login-card .mobile-logo { display: none; width: min(280px, 82%); height: auto; margin: 0 auto 24px; }
.login-card h2 { font-size: 28px; margin: 0 0 8px; }
.login-card > p { color: var(--muted); margin: 0 0 26px; line-height: 1.5; }

.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; grid-column: span 6; min-width: 0; }
.field.span-12 { grid-column: span 12; }
.field.span-8 { grid-column: span 8; }
.field.span-4 { grid-column: span 4; }
.field.span-3 { grid-column: span 3; }
.field label, .field .label { font-size: 13px; font-weight: 760; color: #374151; }
.field .hint { margin: -1px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.input, .textarea, .select {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid #cfd3db;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 11px 13px;
  box-shadow: 0 1px 1px rgba(0,0,0,.02);
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--purple-600); }
.input[readonly], .textarea[readonly] { background: #f3f4f6; color: #4b5563; }
.required::after { content: " *"; color: var(--danger); }

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.editor-header-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.editor-header h1 { margin: 0; font-size: clamp(23px, 3.5vw, 34px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editor-header p { margin: 5px 0 0; color: var(--muted); }
.editor-state { display: flex; align-items: center; gap: 10px; }

.public-banner {
  margin: -32px -16px 22px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: var(--purple-950);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  font-size: 14px;
}

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.editor-main { display: grid; gap: 18px; min-width: 0; }
.editor-side { position: sticky; top: 96px; display: grid; gap: 14px; }
.form-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 7px 24px rgba(17,24,39,.055);
  overflow: hidden;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #eceef2;
  background: linear-gradient(180deg, #fff, #fdfdff);
}
.section-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.section-number { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; background: var(--purple-100); color: var(--purple-800); display: grid; place-items: center; font-weight: 850; }
.section-head h2 { margin: 0; font-size: 17px; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-body { padding: 20px; }

.item-list { display: grid; gap: 16px; }
.item-card { border: 1px solid #dfe2e8; border-radius: 16px; background: #fff; overflow: hidden; }
.item-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 15px; background: var(--purple-50); border-bottom: 1px solid #e5e0f7; }
.item-card-head strong { color: var(--purple-900); }
.item-card-body { padding: 16px; }
.item-photos { margin-top: 15px; padding-top: 15px; border-top: 1px dashed #d7d9df; }
.photo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.photo-toolbar strong { font-size: 13px; }
.photo-toolbar span { font-size: 12px; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo-thumb { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f3f4f6; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 999px; background: rgba(17,24,39,.78); color: #fff; display: grid; place-items: center; }
.photo-empty { min-height: 104px; border: 1px dashed #c7cad2; border-radius: 12px; display: grid; place-items: center; text-align: center; padding: 14px; color: var(--muted); background: #fafafa; font-size: 12px; }
.file-input { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.payment-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.payment-choice { min-width: 0; }
.payment-choice input { position: absolute; opacity: 0; pointer-events: none; }
.payment-choice label {
  min-height: 64px;
  border: 1px solid #d6d9e0;
  border-radius: 13px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: .15s ease;
}
.payment-choice label::before { content: ""; width: 18px; height: 18px; border: 2px solid #9ca3af; border-radius: 5px; flex: 0 0 auto; }
.payment-choice input:checked + label { background: var(--purple-50); color: var(--purple-900); border-color: var(--purple-600); box-shadow: inset 0 0 0 1px var(--purple-600); }
.payment-choice input:checked + label::before { border-color: var(--purple-700); background: var(--purple-700); box-shadow: inset 0 0 0 4px #fff; }
.exchange-proof { margin-top: 18px; padding: 16px; border: 1px solid #f0d8a8; border-radius: 14px; background: var(--warning-soft); }
.exchange-proof h3 { margin: 0 0 5px; font-size: 15px; color: #78350f; }
.exchange-proof p { margin: 0 0 14px; color: #7c4a0b; font-size: 13px; line-height: 1.45; }

.signature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.signature-card { border: 1px solid #d8dbe2; border-radius: 14px; padding: 13px; background: #fff; }
.signature-card h3 { margin: 0 0 4px; font-size: 14px; }
.signature-card p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.signature-canvas-wrap { position: relative; border: 1px dashed #aeb3bd; border-radius: 10px; background: linear-gradient(#fff, #fdfdfd); overflow: hidden; }
.signature-canvas { width: 100%; height: 180px; display: block; touch-action: none; cursor: crosshair; }
.signature-line { position: absolute; left: 12px; right: 12px; bottom: 28px; height: 1px; background: #cfd3da; pointer-events: none; }
.signature-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

.side-card { padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 7px 24px rgba(17,24,39,.05); }
.side-card h3 { margin: 0 0 12px; font-size: 15px; }
.summary-list { display: grid; gap: 10px; }
.summary-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; font-size: 13px; }
.summary-line span:first-child { color: var(--muted); }
.summary-line strong { text-align: right; }
.progress-bar { height: 8px; border-radius: 999px; background: #eceef2; overflow: hidden; margin-bottom: 10px; }
.progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--purple-600), var(--purple-800)); width: 0; transition: width .2s ease; }
.checklist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.checklist li::before { content: "○"; color: #9ca3af; font-weight: 900; }
.checklist li.done { color: var(--success); }
.checklist li.done::before { content: "✓"; }

.validation-box { padding: 14px 16px; border: 1px solid #fecaca; border-radius: 13px; background: var(--danger-soft); color: #7f1d1d; }
.validation-box strong { display: block; margin-bottom: 7px; }
.validation-box ul { margin: 0; padding-left: 20px; line-height: 1.5; font-size: 13px; }
.success-box { padding: 15px 16px; border: 1px solid #bbf7d0; border-radius: 13px; background: var(--success-soft); color: #14532d; }
.info-box { padding: 15px 16px; border: 1px solid #bfdbfe; border-radius: 13px; background: #eff6ff; color: #1e3a8a; }

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 25;
  border-top: 1px solid rgba(217,220,227,.9);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  padding: 11px max(16px, env(safe-area-inset-right)) calc(11px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-shadow: 0 -12px 30px rgba(17,24,39,.07);
}
.sticky-actions-inner { width: min(1240px, 100%); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.save-state { color: var(--muted); font-size: 12px; }
.action-group { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(17,24,39,.57); backdrop-filter: blur(4px); }
.modal { width: min(560px, 100%); max-height: min(88vh, 760px); overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.modal-body { padding: 20px 22px; }
.modal-actions { padding: 16px 22px 22px; display: flex; justify-content: flex-end; gap: 10px; }
.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.channel-card input { position: absolute; opacity: 0; }
.channel-card label { min-height: 64px; border: 1px solid var(--line); border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 750; cursor: pointer; }
.channel-card input:checked + label { border-color: var(--purple-600); background: var(--purple-50); color: var(--purple-900); box-shadow: inset 0 0 0 1px var(--purple-600); }
.link-copy { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.link-copy input { min-width: 0; }

.toast-region { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 200; display: grid; gap: 10px; width: min(390px, calc(100% - 36px)); }
.toast { padding: 14px 16px; border-radius: 13px; background: #111827; color: #fff; box-shadow: 0 16px 45px rgba(0,0,0,.25); line-height: 1.4; animation: toast-in .18s ease-out; }
.toast.success { background: #14532d; }
.toast.error { background: #7f1d1d; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1000px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); order: -1; }
  .record-row { grid-template-columns: minmax(200px, 1.4fr) minmax(120px, .7fr) minmax(130px, .8fr) auto; }
  .record-row .record-cell.hide-tablet { display: none; }
  .payment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --radius: 16px; }
  .topbar { min-height: 64px; padding: 10px 14px; }
  .brand img { width: 122px; }
  .brand-copy { display: none; }
  .page { width: min(100% - 22px, 1240px); padding-top: 22px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; justify-content: stretch; }
  .heading-actions .btn { flex: 1; }
  .hero-actions { grid-template-columns: 1fr; }
  .action-card { min-height: 106px; padding: 17px; grid-template-columns: 46px 1fr auto; }
  .action-card .action-icon { width: 46px; height: 46px; }
  .record-row { grid-template-columns: 1fr auto; gap: 10px; padding: 15px 16px; }
  .record-row .record-cell { display: none; }
  .record-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .panel-header { padding: 17px 16px 13px; }
  .login-page { grid-template-columns: 1fr; background: var(--surface-2); }
  .login-visual { display: none; }
  .login-form-wrap { min-height: 100vh; padding: 20px; }
  .login-card { padding: 24px 20px; }
  .login-card .mobile-logo { display: block; }
  .editor-header { align-items: flex-start; }
  .editor-state { display: none; }
  .editor-side { grid-template-columns: 1fr; }
  .form-grid { gap: 13px; }
  .field, .field.span-8, .field.span-6, .field.span-4, .field.span-3 { grid-column: span 12; }
  .section-head { padding: 16px; }
  .section-body { padding: 16px; }
  .payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signature-grid { grid-template-columns: 1fr; }
  .signature-canvas { height: 170px; }
  .sticky-actions-inner { align-items: stretch; flex-direction: column; }
  .save-state { text-align: center; }
  .action-group { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-group .btn-primary:last-child { grid-column: 1 / -1; }
  .public-banner { margin-top: -22px; }
}

@media (max-width: 430px) {
  .topbar-actions .btn span.label { display: none; }
  .hero-actions { gap: 12px; }
  .action-card { grid-template-columns: 42px 1fr; }
  .action-card .arrow { display: none; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-grid { grid-template-columns: 1fr 1fr; }
  .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Photo controls: keep camera actions comfortable on narrow phones. */
.photo-empty { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .photo-toolbar { align-items: stretch; flex-direction: column; }
  .photo-toolbar .action-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .photo-toolbar .btn { min-width: 0; padding-inline: 8px; white-space: normal; line-height: 1.2; font-size: 12px; }
}
.signature-grid.single { grid-template-columns: 1fr; }


/* Logo original Hunters Quest, sans le halo clair extérieur. */
.splash img,
.brand img,
.login-visual img,
.login-card .mobile-logo {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  background: transparent !important;
}
