:root {
  --navy: #1d1d1b;
  --navy-2: #2b2b28;
  --blue: #aa8e00;
  --amber: #ffd500;
  --amber-dark: #8a7300;
  --paper: #ffffff;
  --bg: #f2f2ef;
  --ink: #1d1d1b;
  --muted: #686862;
  --line: #d8d8d2;
  --danger: #b42318;
  --shadow: 0 12px 32px rgba(29, 29, 27, .08);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
body { margin: 0; min-width: 320px; }
[hidden] { display: none !important; }

.login-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; overflow-y: auto; background: linear-gradient(140deg, #111 0%, #252522 68%, #3a3210 100%); }
.login-card { width: min(440px, 100%); padding: 34px; border-top: 7px solid var(--amber); border-radius: 18px; background: white; box-shadow: 0 28px 80px rgba(0, 0, 0, .35); }
.login-logo { display: block; width: 126px; height: 92px; margin: 0 auto 20px; object-fit: contain; }
.login-card h1 { margin: 5px 0 10px; color: var(--ink); font-size: 1.55rem; letter-spacing: -.025em; }
.login-copy { margin: 0 0 22px; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.login-button { min-height: 52px; border: 0; border-radius: 10px; color: var(--ink); background: var(--amber); font: inherit; font-weight: 850; cursor: pointer; }
.login-button:hover { background: #f0c900; }
.prototype-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; line-height: 1.5; }

.topbar {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px max(24px, calc((100vw - 840px) / 2));
  color: var(--ink);
  background: white;
  border-bottom: 6px solid var(--amber);
  box-shadow: 0 5px 24px rgba(29, 29, 27, .12);
}
.header-logo { width: 74px; height: 66px; object-fit: contain; flex: 0 0 auto; }
.eyebrow { margin: 0 0 2px; color: var(--amber-dark); font-size: .76rem; font-weight: 850; letter-spacing: .16em; }
.topbar h1 { margin: 0; font-size: clamp(1.45rem, 4vw, 2rem); letter-spacing: -.025em; }
.account-area { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.privacy-badge { padding: 9px 13px; border: 1px solid rgba(29,29,27,.16); border-radius: 999px; color: #53534f; font-size: .82rem; white-space: nowrap; }
.lock { color: var(--amber-dark); font-size: .6rem; vertical-align: 2px; margin-right: 5px; }
.account-button { min-height: 38px; padding: 8px 13px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); background: white; font: inherit; font-size: .82rem; font-weight: 750; cursor: pointer; }
.account-button:hover { background: #f4f4f0; }

main { width: min(840px, calc(100% - 32px)); margin: 28px auto 56px; }
form { display: grid; gap: 18px; }
.card { background: var(--paper); border: 1px solid rgba(29, 29, 27, .09); border-radius: 18px; padding: clamp(20px, 4vw, 30px); box-shadow: var(--shadow); }
.intro-card { border-top: 4px solid var(--amber); }
.section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
.step { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; color: var(--ink); background: #fff3a8; font-size: .8rem; font-weight: 900; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: 1.18rem; letter-spacing: -.01em; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .91rem; line-height: 1.45; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; color: #41413d; font-size: .92rem; font-weight: 700; }
.field b { color: var(--danger); }
input[type="text"], input[type="date"], textarea { width: 100%; border: 1px solid #c9c9c3; border-radius: 10px; background: #fbfbf9; color: var(--ink); font: inherit; font-size: 1rem; padding: 13px 14px; outline: none; transition: border .18s, box-shadow .18s, background .18s; }
input:focus, textarea:focus { border-color: var(--amber-dark); background: white; box-shadow: 0 0 0 4px rgba(255, 213, 0, .22); }
input[readonly] { color: #4d4d48; background: #eeeeea; cursor: default; }
textarea { resize: vertical; min-height: 132px; line-height: 1.55; }
.field small { justify-self: end; color: var(--muted); font-weight: 500; }

.check-list { display: grid; gap: 10px; }
.check-row { display: flex; align-items: center; gap: 13px; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 1rem; font-weight: 650; transition: border .16s, background .16s; }
.check-row:hover { border-color: #9bb1be; background: #f7fafb; }
.check-row:has(input:checked) { border-color: #c2a300; background: #fff9d8; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.custom-check { width: 24px; height: 24px; border: 2px solid #9aacb8; border-radius: 7px; display: grid; place-items: center; flex: 0 0 auto; }
.check-row input:focus-visible + .custom-check { outline: 3px solid rgba(255,213,0,.32); outline-offset: 2px; }
.check-row input:checked + .custom-check { border-color: var(--navy); background: var(--navy); }
.check-row input:checked + .custom-check::after { content: ""; width: 10px; height: 5px; border-left: 2px solid white; border-bottom: 2px solid white; transform: translateY(-1px) rotate(-45deg); }

.photo-picker { min-height: 112px; border: 2px dashed #b6c6cf; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 20px; cursor: pointer; text-align: left; background: #f9fbfc; transition: .16s; }
.photo-picker:hover { border-color: var(--amber-dark); background: #fffbed; }
.photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.camera-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink); background: #fff2a3; font-size: 1.3rem; }
.photo-picker strong, .photo-picker small { display: block; }
.photo-picker small { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.photo-item { position: relative; min-width: 0; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #dbe4e9; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.remove-photo { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(11,35,65,.88); color: white; cursor: pointer; font-size: 1.15rem; }

.form-error { padding: 14px 16px; border: 1px solid #f0a49e; border-radius: 12px; color: #842018; background: #fff3f2; font-weight: 650; }
.submit-button { width: 100%; min-height: 76px; display: flex; justify-content: center; align-items: center; gap: 14px; border: 0; border-radius: 15px; color: var(--ink); background: linear-gradient(135deg, #ffe34f, var(--amber)); box-shadow: 0 10px 24px rgba(152, 128, 0, .22); cursor: pointer; font: inherit; padding: 15px 24px; transition: transform .16s, box-shadow .16s; }
.submit-button:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(198, 127, 0, .28); }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { opacity: .65; cursor: wait; transform: none; }
.button-icon { font-size: 1.6rem; font-weight: 800; }
.submit-button strong, .submit-button small { display: block; }
.submit-button strong { font-size: 1.05rem; }
.submit-button small { margin-top: 2px; opacity: .72; font-size: .78rem; }
.privacy-note { margin: -4px auto 0; max-width: 650px; text-align: center; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; transform: translateX(-50%); padding: 13px 18px; border-radius: 999px; color: white; background: var(--navy); box-shadow: 0 10px 30px rgba(0,0,0,.2); font-weight: 700; }

.location-block { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 18px; }
.gps-button { min-height: 48px; padding: 12px 16px; border: 1px solid var(--ink); border-radius: 10px; color: var(--ink); background: white; font: inherit; font-weight: 750; cursor: pointer; white-space: nowrap; }
.gps-button:hover { background: #fff9d8; }
.gps-button:disabled { opacity: .6; cursor: wait; }
.location-status { min-height: 20px; margin: 8px 0 0; color: var(--muted); font-size: .82rem; }

@media (max-width: 640px) {
  .topbar { min-height: 94px; padding: 18px 20px; gap: 12px; }
  .header-logo { width: 58px; height: 52px; }
  .privacy-badge { display: none; }
  .account-button { padding-inline: 10px; }
  main { width: min(100% - 22px, 840px); margin-top: 16px; }
  .card { border-radius: 15px; padding: 20px 17px; }
  .field-grid { grid-template-columns: 1fr; }
  .location-block { grid-template-columns: 1fr; }
  .gps-button { width: 100%; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { margin-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
