/* Profile overview and editor are separate, single-column tasks. */
#profile .member-card{max-width:560px;margin:0 auto 18px;box-sizing:border-box}
#profile:has(#memberEditor:not([hidden])) .member-heading,
#profile:has(#memberEditor:not([hidden]))>#closeProfile{display:none}
#profile #memberForm .vehicle-fields{grid-template-columns:minmax(0,1fr);gap:14px}
#profile #memberForm label{display:grid;gap:8px;min-width:0}
#profile #memberForm input:not([type=file]){width:100%;box-sizing:border-box;min-height:46px}
#memberNicknameHint{order:2;margin:0;font-size:12px;line-height:1.5}
#profile .member-photo-preview{margin:14px 0;align-items:center;gap:12px}
#profile .member-photo-preview img{flex:none}
#memberPhotoInput{width:100%;min-width:0;max-width:100%;box-sizing:border-box;font:inherit;font-size:12px}
#memberPhotoInput::file-selector-button{max-width:100%;margin-right:8px;padding:10px;border:1px solid #3dbd9a60;border-radius:10px;background:#213438;color:#edf9f4;font:inherit}
#profile .member-password{margin:18px 0 0;gap:14px}
#profile .member-password small{font-size:12px;line-height:1.5}
#memberStatus:empty,#emailRecoveryStatus:empty{display:none}
#profile #memberForm .vehicle-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:18px}
#profile #memberForm .vehicle-actions button{width:100%;min-width:0;white-space:normal}
#profile .member-recovery{border-top:1px solid #2b4447;padding-top:16px;margin-top:20px}
#profile .member-recovery summary{cursor:pointer;color:#bfd2c7;font-size:14px;line-height:1.4;padding:6px 0}
#profile .member-recovery .vehicle-help{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#profileOverview{max-width:560px;margin:auto}
#profileOverview .profile-stat{gap:16px;min-width:0}
#profileOverview .profile-stat>b{flex:none}
#logoutConfirm{box-sizing:border-box;width:calc(100% - 32px);max-width:420px;max-height:calc(100dvh - 48px);overflow:auto;margin:auto;padding:24px;border:1px solid #3dbd9a80;border-radius:22px;background:#102322;color:#edf9f4;box-shadow:0 18px 65px #0009}
#logoutConfirm[hidden]{display:none!important}
#logoutConfirm::backdrop{background:#040c0cbb;backdrop-filter:blur(4px)}
#logoutConfirm h2{font-size:22px;line-height:1.3;margin:0 0 14px}
#logoutConfirm p{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
#logoutConfirm .logout-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:22px}
#logoutConfirm button{width:100%;min-height:48px;white-space:normal;font:700 16px/1.4 system-ui}
#logoutConfirm #logoutStatus:empty{display:none}
/* Top-layer dialogs use viewport dimensions, while the page itself is zoomed. */
.a11y-zoomed #logoutConfirm{width:calc(100vw / 1.5 - 24px);max-height:calc(100dvh / 1.5 - 24px);padding:18px}
#set{scroll-padding-block:20px;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
#settingsAutoDriveSection{box-sizing:border-box;border:1px solid #2b4447;border-radius:18px;padding:16px;margin-top:18px;background:#15282c}
#settingsAutoDriveSection .auto-drive-row{display:grid;grid-template-columns:minmax(0,1fr) 52px;gap:14px;align-items:center}
#settingsAutoDriveSection h3{margin:0 0 6px;font-size:16px;line-height:1.35;overflow-wrap:anywhere}
#settingsAutoDriveSection p{margin:0;color:var(--mut);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#autoDriveStatus:not(:empty){padding-top:12px}
#autoDriveToggle{display:grid;place-items:center;box-sizing:border-box;width:52px!important;min-width:52px;max-width:52px;height:44px;min-height:44px;padding:0;border:0;background:transparent;box-shadow:none}
#autoDriveToggle .switch-track{display:block;width:52px;height:32px;padding:3px;box-sizing:border-box;background:#52605d;border-radius:20px}
#autoDriveToggle .switch-thumb{display:block;width:26px;height:26px;background:#fff;border-radius:50%;box-shadow:0 1px 4px #0005;transition:transform .15s}
#autoDriveToggle[aria-checked=true] .switch-track{background:#3dbd9a}
#autoDriveToggle[aria-checked=true] .switch-thumb{transform:translateX(20px)}
body:has(#set[style*="block"]) :is(.sync-note,.vodila-trip-notice,.leaflet-control-container){visibility:hidden}
#memberEditor,#memberForm,#profile .member-password{min-width:0;max-width:100%;box-sizing:border-box}
#profile .member-password legend{max-width:100%;white-space:normal;overflow-wrap:anywhere}
/* Settings explanations: ordinary readable paragraphs, consistent disclosures. */
#set .district-help{padding:0;margin:10px 0;border:1px solid #304845;border-radius:14px;background:#142925;overflow:hidden}
#set .district-toggle{display:flex;align-items:center;gap:12px;padding:15px 16px;min-height:48px;box-sizing:border-box;cursor:pointer;list-style:none}
#set .district-toggle::-webkit-details-marker{display:none}
#set .district-toggle::after{content:'+';margin-left:auto;flex:none;font:500 22px/1 system-ui;color:#a8c9bd}
#set .district-help[open]>.district-toggle::after{content:'−'}
#set .district-toggle h3{margin:0;font:600 16px/1.4 system-ui,-apple-system,sans-serif;color:#e2eee8;letter-spacing:normal;text-transform:none}
#set .district-help p{margin:0;padding:0 16px 16px;font:400 15px/1.65 system-ui,-apple-system,sans-serif;color:#bfd2ca;letter-spacing:normal;text-align:start;overflow-wrap:break-word}
#set .district-help p+p{padding-top:0}
#settingsAutoDriveSection p{font-size:14px;line-height:1.55}
#emailRecoveryHint{white-space:pre-line}
#emailRecoveryForm .vehicle-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
#emailRecoveryForm button,#changeRecoveryEmail{min-height:44px;white-space:normal}
#emailRecoveryInput[aria-invalid=true]{border-color:#ff596c;box-shadow:0 0 0 1px #ff596c,0 0 12px #ff596c66}
.vehicle-guide{display:flex;align-items:center;gap:12px;padding:12px 0;margin-bottom:14px;font:500 14px/1.5 system-ui;color:#bcd3c8}
.vehicle-guide span{flex:1;min-width:0}.vehicle-guide button{min-height:44px;flex:none}
#vehicleForm :is(label,fieldset)[data-guide-state]{border-radius:12px;outline:1px solid transparent;outline-offset:-1px;transition:outline-color .25s,box-shadow .25s}
#vehicleForm :is(label,fieldset)[data-guide-state=done]{outline-color:#3dbd9a;animation:vehicle-done 1.2s ease-out 1}
#vehicleForm :is(label,fieldset)[data-guide-state=missing]{outline-color:#ff596c}
#vehicleForm .guide-active[data-guide-state=missing]{animation:vehicle-missing 1.8s ease-in-out 2}
#vehicleForm .guide-active[data-guide-state=ready]{outline-color:#3dbd9a;box-shadow:0 0 12px #3dbd9a45}
#vehicleForm input[aria-invalid=true],#vehicleForm select[aria-invalid=true]{border-color:#ff596c}
@keyframes vehicle-done{0%,100%{box-shadow:none}50%{box-shadow:0 0 16px #3dbd9a88}}
@keyframes vehicle-missing{0%,100%{box-shadow:none}50%{box-shadow:0 0 16px #ff596c77}}
@media(prefers-reduced-motion:reduce){#vehicleForm [data-guide-state]{animation:none!important;transition:none!important}}
@media(max-width:450px){#vehicleForm .vehicle-fields{grid-template-columns:minmax(0,1fr)}#vehicleForm .body-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}
#vehicleForm,#vehicleForm :is(input,select,fieldset,button){box-sizing:border-box;min-width:0;max-width:100%}
#vehicleForm :is(h3,label,legend,small,p,.vehicle-conversion){overflow-wrap:anywhere}
#vehicleForm button{white-space:normal}
@media(max-width:450px){#vehicleForm .vehicle-actions{display:grid;grid-template-columns:minmax(0,1fr)}#vehicleForm .vehicle-guide{flex-wrap:wrap}#vehicleForm .vehicle-guide span{flex-basis:100%}}
#vehicleForm .body-picker span{max-width:100%;overflow-wrap:anywhere}

#set .district-toggle::before{content:none}
#vehicleForm select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#vehicleForm :is(label,fieldset){box-sizing:border-box;padding:6px}
#vehicleForm select{appearance:none;-webkit-appearance:none;padding-right:32px;background:#0f2023 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23b5ccc7' stroke-width='1.7'/%3E%3C/svg%3E") no-repeat right 10px center}
#set{scroll-padding-top:calc(84px + env(safe-area-inset-top,0px))}

#set .road-help-icon{display:inline-flex;vertical-align:middle;width:1.55em;height:1.55em;box-sizing:border-box;padding:.16em;margin-right:.35em;border:1px solid #9b4a45;border-radius:.4em;background:#2d2022;color:#ef7770}
#set .road-help-icon svg{display:block;width:100%;height:100%}
