/* Critical visibility rule: author display styles must never override the hidden attribute. */
[hidden]{display:none!important}
.busy-overlay[hidden]{display:none!important}
:root{
  --bg:#f3f6fb;--surface:#fff;--surface-2:#eef4ff;--text:#0e203d;--muted:#66748a;
  --line:#dbe4f1;--primary:#0f5bd8;--primary-dark:#0a45aa;--success:#0b8a5a;--danger:#c53636;
  --warning:#fff4d7;--warning-line:#efcb68;--shadow:0 14px 40px rgba(19,45,82,.09);
  --radius:20px;--safe-bottom:max(18px,env(safe-area-inset-bottom));
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:"Noto Sans Gujarati","Nirmala UI","Segoe UI",system-ui,-apple-system,sans-serif;font-size:16px;line-height:1.5}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(15,91,216,.25);outline-offset:2px}
.skip-link{position:fixed;left:12px;top:-60px;z-index:100;background:#fff;padding:10px 14px;border-radius:10px;color:var(--primary)}
.skip-link:focus{top:12px}
.app-header{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px max(16px,calc((100vw - 960px)/2));background:rgba(255,255,255,.94);backdrop-filter:blur(16px);border-bottom:1px solid rgba(219,228,241,.85)}
.brand-wrap{display:flex;align-items:center;gap:11px;min-width:0}.brand-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(145deg,#0f5bd8,#0793c8);color:#fff;font-weight:900;font-size:21px;box-shadow:0 8px 20px rgba(15,91,216,.25)}
.brand-wrap h1{font-size:17px;line-height:1.15;margin:0;font-weight:850;letter-spacing:-.02em}.brand-wrap p{font-size:12px;margin:3px 0 0;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.icon-btn{width:44px;height:44px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--primary);font-weight:900;font-size:22px}
.app-shell{width:min(100%,960px);margin:0 auto;padding:18px 14px 110px}
.notice-card{display:flex;gap:7px;flex-direction:column;background:#eaf2ff;border:1px solid #cbdcff;padding:13px 15px;border-radius:16px;color:#27466f;font-size:13px}.notice-card strong{font-size:14px;color:#173962}
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0}.stats-grid article{background:#fff;border:1px solid var(--line);border-radius:15px;padding:12px 8px;text-align:center;box-shadow:0 6px 20px rgba(19,45,82,.04)}.stats-grid strong{display:block;font-size:22px;line-height:1.1;color:var(--primary)}.stats-grid span{display:block;margin-top:5px;font-size:11px;color:var(--muted);font-weight:700}
.segmented{position:sticky;top:68px;z-index:20;display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;background:#e6edf7;border:1px solid var(--line);border-radius:16px;margin:0 0 18px}.segment{min-height:44px;border:0;border-radius:12px;background:transparent;color:#56667d;font-weight:800;font-size:13px}.segment.active{background:#fff;color:var(--primary);box-shadow:0 4px 14px rgba(19,45,82,.1)}
.screen{display:none}.screen.active{display:block;animation:screenIn .22s ease-out}@keyframes screenIn{from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:none}}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:4px 2px 13px}.section-head h2{margin:1px 0 0;font-size:25px;letter-spacing:-.03em}.eyebrow{margin:0;color:var(--primary);font-size:10px;font-weight:900;letter-spacing:.12em}.text-btn{border:0;background:transparent;color:var(--primary);font-weight:800;padding:10px}
.form-card{min-width:0;margin:0 0 13px;padding:17px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 28px rgba(19,45,82,.045)}.form-card legend{padding:0 7px;font-weight:850;font-size:16px;color:#183354}.fieldset-note{margin:-3px 0 15px;color:var(--muted);font-size:13px}
.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.field{display:flex;min-width:0;flex-direction:column;gap:6px}.field.full,.location-actions.full,.check-row.full{grid-column:1/-1}.field span{font-size:13px;font-weight:800;color:#31445f}.field b{color:var(--danger)}.field small{font-size:11px;color:var(--muted)}
input,select,textarea{width:100%;min-height:48px;border:1px solid #ccd8e8;border-radius:13px;background:#fbfdff;padding:11px 13px;transition:border-color .18s,box-shadow .18s,background .18s}textarea{resize:vertical;min-height:86px}input:focus,select:focus,textarea:focus{border-color:#78a6ef;background:#fff;box-shadow:0 0 0 4px rgba(15,91,216,.09)}input.invalid,select.invalid,textarea.invalid{border-color:#da6666;background:#fffafa}
.check-row{display:flex;align-items:center;gap:10px;padding:2px 3px;font-size:13px;color:#40536e}.check-row input,.check-card input{width:21px;height:21px;min-height:auto;accent-color:var(--primary)}
.location-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.muted{color:var(--muted);font-size:12px}
.photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.photo-slot{border:1px dashed #b8c8df;border-radius:17px;padding:9px;background:#f9fbfe}.photo-preview{aspect-ratio:4/3;border-radius:12px;background:#eaf0f8;display:grid;place-items:center;overflow:hidden;color:#7b8797;font-size:12px}.photo-preview img{width:100%;height:100%;object-fit:cover}.photo-button,.remove-photo{width:100%;min-height:42px;margin-top:8px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:850}.photo-button{background:#edf4ff;color:var(--primary);border:1px solid #cfe0fb}.photo-button input,.file-label input{position:absolute;opacity:0;pointer-events:none}.remove-photo{border:0;background:#fff0f0;color:var(--danger)}
.check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.check-card{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--line);border-radius:14px;background:#fafcff}.check-card span{display:flex;flex-direction:column;line-height:1.3}.check-card b{font-size:13px}.check-card small{font-size:11px;color:var(--muted);margin-top:3px}.top-gap{margin-top:13px}
.warning-card{padding:13px 15px;margin:0 0 13px;border:1px solid var(--warning-line);background:var(--warning);border-radius:14px;color:#6b4e00;font-size:13px}
.sticky-save{position:sticky;bottom:calc(10px + env(safe-area-inset-bottom));z-index:15;display:grid;grid-template-columns:1.3fr 1fr;gap:8px;padding:8px;background:rgba(255,255,255,.93);backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:17px;box-shadow:0 12px 35px rgba(19,45,82,.16)}
.primary-btn,.secondary-btn,.danger-btn,.primary-small{min-height:48px;border-radius:13px;font-weight:850;border:1px solid transparent;padding:10px 15px}.primary-btn,.primary-small{background:var(--primary);color:#fff;box-shadow:0 8px 20px rgba(15,91,216,.2)}.primary-btn:hover,.primary-small:hover{background:var(--primary-dark)}.secondary-btn{background:#eef5ff;border-color:#cbdcf7;color:#144c99}.danger-btn{background:#fff0f0;border-color:#f0caca;color:var(--danger)}.primary-small{min-height:42px;padding:8px 14px}
.record-toolbar{display:grid;grid-template-columns:1fr 180px;gap:9px;margin-bottom:12px}.search-box{display:flex;align-items:center;gap:8px;padding:0 12px;background:#fff;border:1px solid var(--line);border-radius:14px}.search-box input{border:0;background:transparent;padding-left:0;box-shadow:none!important}.record-toolbar select{background:#fff}
.record-list{display:grid;gap:10px}.record-card{display:grid;grid-template-columns:62px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:0 7px 22px rgba(19,45,82,.045)}.record-thumb{width:62px;height:62px;border-radius:14px;background:#eaf1fb;overflow:hidden;display:grid;place-items:center;color:var(--primary);font-weight:900}.record-thumb img{width:100%;height:100%;object-fit:cover}.record-info{min-width:0}.record-info h3{font-size:15px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-info p{font-size:12px;color:var(--muted);margin:4px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-badges{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}.badge{padding:3px 7px;border-radius:999px;font-size:9px;font-weight:850;background:#eef3f9;color:#58677b}.badge.green{background:#e6f8ef;color:#08734b}.record-actions{display:flex;gap:5px}.record-actions button{width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#24415f}.record-actions .delete{color:var(--danger)}
.empty-state{text-align:center;padding:50px 20px;color:var(--muted)}.empty-state div{font-size:44px}.empty-state h3{color:var(--text);margin:8px 0 4px}.empty-state p{margin:0}
.export-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.export-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;display:flex;flex-direction:column;align-items:flex-start;box-shadow:0 8px 25px rgba(19,45,82,.045)}.export-card h3{margin:10px 0 4px}.export-card p{margin:0 0 15px;color:var(--muted);font-size:13px}.export-card button,.export-card label{margin-top:auto}.export-card small{color:var(--muted);margin-top:9px;font-size:11px}.featured-export{grid-column:1/-1;border-color:#b9d0f6;background:linear-gradient(145deg,#fff,#f0f6ff)}.export-icon{height:42px;min-width:42px;padding:0 8px;border-radius:12px;background:#e9f2ff;color:var(--primary);display:grid;place-items:center;font-size:11px;font-weight:900}.file-label{display:flex;align-items:center;justify-content:center;position:relative}.danger-zone{margin-top:17px;background:#fff;border:1px solid #ecd6d6;border-radius:18px;padding:17px}.danger-zone h3{margin:0 0 3px}.danger-zone p{font-size:13px;color:var(--muted);margin:0 0 12px}
.record-dialog{width:min(92vw,650px);max-height:88vh;border:0;border-radius:22px;padding:0;box-shadow:0 25px 80px rgba(0,20,50,.25);overflow:auto}.record-dialog::backdrop{background:rgba(6,19,38,.56);backdrop-filter:blur(3px)}.dialog-close{position:sticky;float:right;right:12px;top:12px;margin:-54px 12px 0 0;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.92);font-size:25px;box-shadow:0 5px 18px rgba(0,0,0,.15)}.dialog-gallery{display:grid;grid-template-columns:repeat(2,1fr);gap:4px;background:#e8eef6}.dialog-gallery.one{grid-template-columns:1fr}.dialog-gallery img{width:100%;height:220px;object-fit:cover}.dialog-body{padding:19px}.dialog-body h2{margin:0 45px 4px 0;font-size:23px}.dialog-body>p{margin:0;color:var(--muted)}.detail-list{margin:17px 0;display:grid;gap:9px}.detail-row{display:grid;grid-template-columns:110px 1fr;gap:10px;font-size:13px}.detail-row b{color:#4d5f78}.detail-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.detail-actions button{min-height:44px;border:1px solid var(--line);border-radius:12px;background:#fff;font-weight:800}.detail-actions .edit{background:var(--primary);color:#fff;border-color:var(--primary)}
.toast{position:fixed;left:50%;bottom:calc(22px + env(safe-area-inset-bottom));z-index:100;transform:translate(-50%,25px);opacity:0;pointer-events:none;background:#10253f;color:#fff;border-radius:12px;padding:11px 16px;font-size:13px;font-weight:700;box-shadow:0 12px 35px rgba(0,0,0,.2);transition:.22s}.toast.show{opacity:1;transform:translate(-50%,0)}
.busy-overlay{display:none!important}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:680px){
  .app-header{padding:10px 13px}.brand-wrap h1{font-size:15px}.app-shell{padding:14px 10px 105px}.segmented{top:63px}.section-head h2{font-size:22px}
  .field-grid{grid-template-columns:1fr}.field.full,.location-actions.full,.check-row.full{grid-column:auto}.check-grid{grid-template-columns:1fr 1fr}.form-card{padding:15px 13px}.record-toolbar{grid-template-columns:1fr}.record-toolbar select{min-height:44px}.export-grid{grid-template-columns:1fr}.featured-export{grid-column:auto}.record-card{grid-template-columns:54px minmax(0,1fr);gap:10px}.record-thumb{width:54px;height:54px}.record-actions{grid-column:1/-1;justify-content:flex-end;border-top:1px solid #edf1f6;padding-top:8px}.record-actions button{width:auto;min-width:70px;padding:0 10px}.dialog-gallery img{height:180px}.detail-actions{grid-template-columns:1fr 1fr}.stats-grid strong{font-size:19px}.stats-grid article{padding:10px 4px}.stats-grid span{font-size:10px}
}
@media(max-width:390px){.brand-wrap p{max-width:245px}.check-grid{grid-template-columns:1fr}.photo-grid{grid-template-columns:1fr}.sticky-save{grid-template-columns:1fr}.stats-grid{gap:5px}.segment{font-size:12px}.detail-row{grid-template-columns:90px 1fr}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}


/* v3 mobile field-collection layout */
html{font-size:16px;overscroll-behavior-y:none}
body{min-width:280px;padding-bottom:env(safe-area-inset-bottom);overflow-x:hidden}
.app-header{min-height:58px;padding:8px max(12px,calc((100vw - 720px)/2));gap:10px}
.brand-icon{width:38px;height:38px;border-radius:12px;font-size:18px}
.brand-wrap{gap:9px}.brand-wrap h1{font-size:15px}.brand-wrap p{font-size:11px;max-width:min(62vw,390px)}
.app-shell{width:min(100%,720px);padding:12px 12px calc(104px + env(safe-area-inset-bottom))}
.storage-notice{width:min(calc(100% - 24px),696px);margin:9px auto 0;min-height:36px;display:flex;align-items:center;gap:8px;padding:7px 11px;border:1px solid #cfe0f6;border-radius:12px;background:#f7fbff;color:#365270;font-size:11px;font-weight:700}
.storage-notice.ready{border-color:#c5eadb;background:#f1fbf6;color:#176345}.storage-notice.warning{border-color:#f2d390;background:#fff9e9;color:#73540b}
.storage-dot{width:8px;height:8px;flex:0 0 auto;border-radius:50%;background:#e2a11b;box-shadow:0 0 0 4px rgba(226,161,27,.11)}.storage-notice.ready .storage-dot{background:#0b9964;box-shadow:0 0 0 4px rgba(11,153,100,.11)}
.notice-card{padding:11px 13px;border-radius:14px;font-size:12px}.notice-card strong{font-size:13px}
.stats-grid{margin:10px 0;gap:6px}.stats-grid article{padding:9px 3px;border-radius:13px}.stats-grid strong{font-size:18px}.stats-grid span{font-size:9px;margin-top:3px}
.segmented{position:static;margin-bottom:13px;border-radius:14px}.segment{min-height:42px;font-size:12px}
.section-head{margin:2px 2px 10px}.section-head h2{font-size:21px}.eyebrow{font-size:9px}
.form-card{margin-bottom:10px;padding:14px 12px;border-radius:16px;box-shadow:0 5px 18px rgba(19,45,82,.035)}.form-card legend{font-size:15px}
.field-grid{grid-template-columns:1fr;gap:11px}.field.full,.location-actions.full,.check-row.full{grid-column:auto}
.field span{font-size:13px}.field small{font-size:11px}
input,select,textarea{font-size:16px!important;min-height:50px;padding:12px;border-radius:12px;background:#fff}
textarea{min-height:84px}.check-row{min-height:44px}
.photo-grid{gap:9px}.photo-slot{border-radius:14px;padding:7px}.photo-preview{border-radius:10px}.photo-button,.remove-photo{min-height:44px;font-size:12px}
.check-grid{grid-template-columns:1fr 1fr;gap:7px}.check-card{min-height:67px;padding:10px;border-radius:12px}.check-card b{font-size:12px}.check-card small{font-size:10px}
.sticky-save{position:sticky;bottom:calc(70px + env(safe-area-inset-bottom));grid-template-columns:1.15fr 1fr;padding:7px;border-radius:15px;z-index:21}.primary-btn,.secondary-btn,.danger-btn,.primary-small{min-height:48px;border-radius:12px;font-size:14px}
.record-toolbar{grid-template-columns:1fr;gap:7px}.record-card{grid-template-columns:52px minmax(0,1fr);gap:9px;padding:10px;border-radius:15px}.record-thumb{width:52px;height:52px;border-radius:12px}.record-actions{grid-column:1/-1;justify-content:stretch}.record-actions button{flex:1;min-width:0}
.export-grid{grid-template-columns:1fr;gap:9px}.featured-export{grid-column:auto}.export-card{padding:15px;border-radius:16px}
.record-dialog{width:100%;max-width:720px;max-height:88dvh;margin:auto 0 0;border-radius:22px 22px 0 0}.dialog-gallery img{height:180px}
.mobile-bottom-nav{display:none}
.operation-panel{position:fixed;left:50%;bottom:calc(76px + env(safe-area-inset-bottom));z-index:90;transform:translateX(-50%);width:min(calc(100% - 24px),420px);min-height:46px;align-items:center;justify-content:center;gap:10px;padding:10px 14px;border:1px solid #cfe0f6;border-radius:14px;background:rgba(255,255,255,.97);color:#173962;box-shadow:0 12px 34px rgba(15,40,75,.18);font-size:12px}
.operation-panel:not([hidden]){display:flex}.mini-spinner{width:18px;height:18px;border:2px solid #d6e3f6;border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite}
.toast{bottom:calc(82px + env(safe-area-inset-bottom));max-width:calc(100% - 24px);text-align:center}
@media(max-width:680px){
  .segmented{display:none}
  .mobile-bottom-nav{position:fixed;left:50%;bottom:0;z-index:70;transform:translateX(-50%);display:grid;grid-template-columns:repeat(3,1fr);width:100%;max-width:720px;min-height:64px;padding:6px 10px calc(6px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-top:1px solid var(--line);box-shadow:0 -8px 25px rgba(19,45,82,.09);backdrop-filter:blur(14px)}
  .bottom-nav-btn{min-height:50px;border:0;border-radius:12px;background:transparent;color:#67758a;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-size:19px}.bottom-nav-btn b{font-size:10px}.bottom-nav-btn.active{background:#edf4ff;color:var(--primary)}
  .app-shell{padding-left:10px;padding-right:10px}.storage-notice{width:calc(100% - 20px)}
}
@media(max-width:390px){.check-grid{grid-template-columns:1fr}.photo-grid{grid-template-columns:1fr 1fr}.sticky-save{grid-template-columns:1fr}.sticky-save .secondary-btn{min-height:44px}.brand-wrap p{max-width:60vw}}
@media(max-width:330px){.photo-grid{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,1fr)}}


/* v4 five-photo creative field workflow */
.draft-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:11px 12px;border:1px solid #bcd8fa;border-radius:14px;background:#eef7ff;color:#1b4a79}
.draft-notice div{display:flex;flex-direction:column;min-width:0}.draft-notice strong{font-size:13px}.draft-notice span{font-size:10px;color:#56718d;margin-top:2px}.draft-notice button{flex:0 0 auto;min-height:38px;border:1px solid #bed3ec;border-radius:10px;background:#fff;color:#245c94;font-size:11px;font-weight:850;padding:7px 10px}
.completion-card{margin:0 0 11px;padding:12px 13px;border:1px solid #d5e2f3;border-radius:16px;background:linear-gradient(145deg,#fff,#f5f9ff);box-shadow:0 6px 20px rgba(19,45,82,.04)}
.completion-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.completion-top>div{display:flex;min-width:0;flex-direction:column}.completion-top strong{font-size:13px;color:#173962}.completion-top span{font-size:10px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.completion-top>b{font-size:19px;color:var(--primary)}
.completion-track{height:7px;margin-top:9px;border-radius:999px;background:#e4edf8;overflow:hidden}.completion-track>span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#0f5bd8,#0aa37a);transition:width .3s ease}.completion-track>span.complete{background:linear-gradient(90deg,#0b8a5a,#14b879)}
.photo-heading-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.photo-heading-row .fieldset-note{flex:1;margin-bottom:10px}.photo-counter{flex:0 0 auto;border:1px solid #c9dcf6;border-radius:999px;background:#edf5ff;color:#1555a7;padding:4px 9px;font-size:11px;font-weight:900}
.photo-guide{display:flex;gap:5px;overflow-x:auto;padding:0 0 10px;scrollbar-width:none}.photo-guide::-webkit-scrollbar{display:none}.photo-guide span{flex:0 0 auto;padding:5px 8px;border-radius:999px;background:#f0f4f9;color:#5a6a7f;font-size:9px;font-weight:800}
.photo-preview{position:relative}.photo-preview>span:not(.photo-meta){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;padding:6px}.photo-preview>span b{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#d9e8fb;color:#1456aa;font-size:10px}
.photo-meta{position:absolute;left:5px;right:5px;bottom:5px;padding:4px 6px;border-radius:7px;background:rgba(9,28,51,.78);color:#fff;font-size:8px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;backdrop-filter:blur(5px)}
.photo-tip{margin:10px 2px 0;color:#64748a;font-size:10px}.photo-tip strong{color:#294863}
.badge.readiness{background:#e9f2ff;color:#1856a5}
@media(min-width:681px){.photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-slot:last-child:nth-child(odd){grid-column:1/-1;width:calc(50% - 5px);justify-self:center}.completion-card{position:relative;background:linear-gradient(145deg,#fff,#f5f9ff)}}
@media(max-width:330px){.photo-grid{grid-template-columns:1fr}.photo-slot:last-child:nth-child(odd){grid-column:auto;width:100%}.completion-top span{white-space:normal}.draft-notice{align-items:flex-start}}
