﻿/* 简洁居民端：白底、细分隔线、单一强调色。 */
.resident-body{--red:#b83d35;--red-dark:#993128;--red-soft:#fcf3f2;--ink:#303030;--muted:#888;--line:#eee;background:#f6f6f6;color:var(--ink)}
.resident-body [hidden]{display:none!important}
.mobile-header{background:#fff;color:#303030;border-bottom:1px solid #eee}
.header-inner{height:58px;max-width:720px;padding:0 18px;gap:8px}
.header-inner h1{font-size:17px;font-weight:600;letter-spacing:0}
.header-inner .icon-button.light{width:30px;color:#555}
.header-inner .icon-button.light:hover{background:#f5f5f5}
.header-spacer{width:30px;flex-shrink:0}
.resident-main,.form-page .resident-main{max-width:720px;padding:18px 16px 100px}
.directory-search{padding:0;margin:0 0 14px;background:none}
.directory-search .search-box{height:44px;padding:0 14px;background:#fff;border:1px solid #eee;border-radius:8px;gap:8px}
.directory-search input{font-size:14px}
.contact-grid{grid-template-columns:1fr;gap:12px;margin:0}
.contact-card{display:grid;grid-template-columns:88px minmax(0,1fr);gap:16px;padding:20px;border:0;border-radius:10px;min-height:0;box-shadow:none}
.contact-card>.avatar.large{width:88px;height:88px;top:0;align-self:center;border-radius:10px;font-size:26px}
.contact-card>.channel-icon{background:#f4efe6;color:#a1794a;border:0;box-shadow:none}
.contact-card>.channel-icon .icon{width:34px;height:34px;stroke-width:1.4}
.contact-info h3{font-size:16px;margin:0 0 9px;line-height:1.5}
.contact-info p,.contact-info p>a{font-size:14px}
.contact-info p{gap:12px}
.contact-info p+p{margin-top:5px}
.contact-info p>span{color:#999}
.contact-actions{grid-column:1/-1;gap:12px;margin:0;border:0;padding:0}
.contact-actions .button{min-height:40px;font-size:14px;font-weight:500;border-radius:6px;padding:8px}
.contact-actions .primary{background:var(--red);color:white}
.contact-actions .primary:hover{background:var(--red-dark)}
.contact-actions .secondary{color:#555;background:#f7f7f7;border:1px solid #eee}
.contact-actions .secondary:hover{background:#eee}
.bottom-nav{padding:8px 0 calc(8px + env(safe-area-inset-bottom));border-top:1px solid #eee;background:#fff;backdrop-filter:none;gap:0}
.bottom-nav a{max-width:270px;font-size:11px;gap:4px;color:#999}
.bottom-nav .icon{width:22px;height:22px;stroke-width:1.6}
.bottom-nav a.active{color:var(--red)}
.form-intro h2{font-size:20px;font-weight:600;margin:0 0 5px}
.form-recipient{font-size:12px;color:#888;margin:0 0 16px}
.reference-form{background:none}
.report-card{padding:0 20px;border:0;background:#fff;border-radius:0;margin:0;box-shadow:none}
.report-card:first-of-type{border-radius:10px 10px 0 0;padding-top:4px}
.report-card:last-of-type{border-radius:0 0 10px 10px;padding-bottom:6px}
.reference-row{grid-template-columns:90px minmax(0,1fr);padding:9px 0;border-bottom:1px solid #eee;min-height:59px}
.reference-row>span{font-size:15px}
.reference-row b{font-size:13px;font-weight:400;color:var(--red);margin-left:3px}
.reference-row input{text-align:right;padding:10px 0 10px 8px;border:0;border-radius:4px;box-shadow:none;font-size:15px;min-width:0;background:none}
.reference-row input::placeholder{color:#aaa}
.reference-row.category-trigger{width:100%;text-align:left;grid-template-columns:90px minmax(0,1fr);margin-bottom:0}
.category-trigger>span:first-child{white-space:nowrap}
.category-trigger>span:last-child{display:flex;align-items:center;justify-content:flex-end;gap:10px;color:#aaa}
.category-trigger em{font-style:normal;color:#666;font-size:14px}
.category-trigger em.unselected{color:#aaa}
.description-field{padding-top:18px}
.anonymous-row{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:54px;border-top:1px solid #eee;cursor:pointer;font-size:15px}
.anonymous-row input{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;clip:auto;opacity:0;cursor:pointer;z-index:1}
.switch-track{position:relative;width:44px;height:26px;border-radius:20px;background:#ccc;flex-shrink:0;transition:background .15s}
.switch-track::after{content:'';position:absolute;width:22px;height:22px;top:2px;left:2px;border-radius:50%;background:white;transition:transform .15s}
.anonymous-row input:checked+.switch-track{background:var(--red)}
.anonymous-row input:checked+.switch-track::after{transform:translateX(18px)}
.anonymous-row input:focus-visible+.switch-track{outline:2px solid var(--red);outline-offset:3px}
.anonymous-hint{font-size:11px;color:#999;padding:0 0 12px}
.reference-form:has(#anonymous:checked) .report-card:nth-of-type(2){border-radius:10px 10px 0 0}
.category-trigger .icon{width:16px;height:16px}
.description-field>label{display:block;font-size:15px;margin-bottom:10px}
.description-field textarea{display:block;border:0;background:#f7f7f7;border-radius:6px;padding:12px;min-height:135px;font-size:14px;line-height:1.8;resize:vertical}
.description-field textarea::placeholder{color:#aaa}
.description-meta{display:flex;justify-content:space-between;gap:8px;margin-top:7px;font-size:11px;color:#999}
.voice-panel{padding:18px 0 12px;border:0;border-bottom:1px solid #eee;background:none;border-radius:0;margin:0}
.voice-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.voice-heading h3{font-size:15px;font-weight:400}
.voice-heading>span{font-size:11px;color:#999}
.voice-panel .record-button{display:flex;justify-content:center;align-items:center;gap:8px;width:100%;margin:0;min-height:46px;padding:10px;background:#f5f5f5;border:1px solid #e8e8e8;color:#555;border-radius:6px;font-size:14px;font-weight:500;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.voice-panel .record-button>.icon{width:18px;height:18px}
.voice-panel .record-button.recording{background:var(--red);color:white;border-color:var(--red)}
.voice-panel .audio-preview{display:flex;align-items:center;flex-wrap:wrap;gap:5px;font-size:12px}
.voice-panel .audio-preview:not(:empty){margin-top:10px}
.voice-panel audio{width:100%;height:40px}
.reference-form .file-fallback{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin:4px 0 0;min-height:30px;color:#888;font-size:11px;cursor:pointer}
.file-fallback .icon{width:12px;height:12px}
.reference-upload{padding:16px 0;border-bottom:1px solid #eee}
.reference-upload:last-child{border:0}
.upload-heading{justify-content:space-between;font-size:15px}
.upload-heading small{font-size:11px;color:#999}
.image-upload-area{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 0}
.reference-form .upload-grid{display:contents}
.reference-form .upload-tile{display:flex;width:76px;height:76px;border:1px dashed #ddd;border-radius:6px;background:#fafafa;color:#999;font-size:11px;gap:6px;cursor:pointer}
.reference-form .upload-tile:hover{background:#f0f0f0}
.reference-form .upload-tile:focus-within,.reference-form .file-fallback:focus-within{outline:2px solid var(--red);outline-offset:3px}
.reference-form .upload-tile .icon{width:24px;height:24px;color:#999;stroke-width:1.4}
.reference-form .upload-preview{width:76px;height:76px;border-radius:6px}
.reference-form .upload-help{color:#999;font-size:10px;margin:8px 0 0}
.reference-form #video-picker{margin:12px 0 0;background:#fafafa;border:1px dashed #ddd;border-radius:6px}
.reference-form .video-preview{margin:12px 0}
.reference-form .privacy-note{display:flex;justify-content:center;gap:5px;padding:15px 0;margin:0;color:#999;font-size:11px}
.privacy-note .icon{width:14px;height:16px}
.reference-form .submit-button{min-height:48px;width:100%;border-radius:8px;background:var(--red);font-size:16px;font-weight:500;letter-spacing:2px;box-shadow:none}
.reference-form .submit-button:hover{background:var(--red-dark)}
.submit-note{margin:10px 0 0;text-align:center;font-size:11px;color:#999}
.category-sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,560px);max-width:100%;max-height:90dvh;overflow-y:auto;border:0;border-radius:14px 14px 0 0;padding:12px 20px calc(20px + env(safe-area-inset-bottom));background:#fff;color:var(--ink)}
.category-sheet::backdrop{background:#0006}
.resident-body:has(.category-sheet[open]){overflow:hidden}
.sheet-handle{height:4px;width:32px;background:#ddd;border-radius:4px;margin:0 auto 14px}
.sheet-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.sheet-heading h2{font-size:18px}
.category-sheet .category-options{display:grid;gap:0}
.category-sheet .category-options label{position:relative;display:flex;align-items:center;min-height:54px;padding:12px 4px;border-bottom:1px solid #eee;cursor:pointer}
.category-sheet .category-options input{position:absolute;opacity:0;width:1px;height:1px;min-height:0}
.category-sheet .category-options span{flex:1;padding:0;background:none;border:0;border-radius:0;color:#555;text-align:left}
.category-sheet .category-options strong{font-size:15px;font-weight:400}
.category-sheet .category-options small{display:block;font-size:12px;font-weight:400;color:#999;line-height:1.6;margin-top:4px}
.category-sheet .category-options label>.icon{width:20px;height:20px;color:transparent}
.category-sheet .category-options input:checked+span{background:none;color:var(--red);border:0}
.category-sheet .category-options label:has(:checked)>.icon{color:var(--red)}
.category-sheet .category-options label:has(input:focus-visible){outline:2px solid var(--red);outline-offset:2px}
.sheet-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}
.sheet-actions .button{min-height:44px;border-radius:6px}
.sheet-actions .secondary{background:#f3f3f3;color:#777;border:0}
.resident-body .history-card,.resident-body .detail-card,.resident-body .success-card{border:0;border-radius:10px;box-shadow:none}
.resident-body .page-intro h2{font-size:21px}
.resident-body .info-note{color:#999;padding:0 0 16px}
.resident-body .count-label,.resident-body .category-label{background:#f5f5f5;color:#888}
@media(max-width:600px){.header-inner h1{font-size:15px}.resident-main,.form-page .resident-main{padding:16px 14px 96px}.report-card{padding-right:18px;padding-left:18px}}
@media(max-width:350px){.header-inner{padding:0 12px}.header-inner h1{font-size:14px}.contact-card{padding:16px;gap:12px}.reference-row{grid-template-columns:72px minmax(0,1fr)}}
