*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue","Hiragino Sans","Noto Sans JP",sans-serif;line-height:1.6;color:#222;background:#f5f5f5;min-height:100dvh}
button{font:inherit;cursor:pointer;touch-action:manipulation}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 20px;border:none;border-radius:8px;font-size:1rem;font-weight:600;transition:background .15s}
.btn-primary{background:#e53935;color:#fff}
.btn-primary:active{background:#c62828}
.btn-secondary{background:#43a047;color:#fff}
.btn-secondary:active{background:#2e7d32}
.btn-outline{background:transparent;border:2px solid #888;color:#444}
.btn-outline:active{background:#eee}
.btn-sm{min-height:36px;padding:4px 12px;font-size:.875rem}
#app{max-width:480px;margin:0 auto;padding:0 0 80px}
header{position:sticky;top:0;z-index:10;background:#fff;padding:12px 16px;border-bottom:1px solid #ddd}
header h1{font-size:1.1rem;font-weight:700}
.header-meta{font-size:.8rem;color:#888;margin-top:2px}
.header-actions{display:flex;gap:8px;margin-top:8px}
.incident-list{list-style:none}
.incident-item{background:#fff;margin:8px 12px;padding:12px 16px;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.08);cursor:pointer}
.incident-item:active{background:#f5f5f5}
.incident-item-header{display:flex;justify-content:space-between;align-items:flex-start}
.incident-place{font-weight:700;font-size:1rem}
.incident-distance{font-size:.8rem;color:#888}
.incident-category{margin-top:4px;font-size:.95rem}
.incident-meta{display:flex;gap:8px;margin-top:6px;font-size:.8rem;color:#888;flex-wrap:wrap}
.badge{display:inline-block;padding:2px 8px;border-radius:4px;font-size:.75rem;font-weight:600}
.badge-0{background:#e0e0e0;color:#666}
.badge-1{background:#fff3e0;color:#e65100}
.badge-2{background:#e8f5e9;color:#2e7d32}
.badge-3{background:#e3f2fd;color:#1565c0}
.badge-4{background:#fce4ec;color:#c62828}
.form-section{padding:16px}
.form-group{margin-bottom:16px}
.form-group label{display:block;font-weight:600;margin-bottom:4px;font-size:.9rem}
.form-group select,.form-group input,.form-group textarea{width:100%;padding:10px 12px;border:1px solid #ccc;border-radius:8px;font-size:1rem;min-height:44px;background:#fff;font-family:inherit}
.form-group textarea{min-height:80px;resize:vertical}
.form-actions{display:flex;gap:8px;margin-top:20px}
.form-actions .btn{flex:1}
.card{background:#fff;margin:12px;padding:16px;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.detail-row{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #eee;font-size:.9rem}
.detail-row:last-child{border-bottom:none}
.detail-label{color:#888}
.history-item{padding:8px 0;border-bottom:1px solid #eee;font-size:.85rem}
.history-item:last-child{border-bottom:none}
.empty{text-align:center;padding:40px 20px;color:#888}
.empty p{margin-top:8px;font-size:.9rem}
.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#333;color:#fff;padding:10px 20px;border-radius:8px;font-size:.9rem;z-index:100;animation:in .3s ease}
@keyframes in{from{opacity:0;transform:translateX(-50%) translateY(10px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
.spinner{width:24px;height:24px;border:3px solid #ddd;border-top-color:#e53935;border-radius:50%;animation:spin .6s linear infinite;margin:20px auto}
@keyframes spin{to{transform:rotate(360deg)}}
.back{display:inline-block;margin-bottom:12px;color:#e53935;text-decoration:none;font-size:.9rem;cursor:pointer}
.back:hover{text-decoration:underline}
@media(min-width:768px){#app{max-width:640px}}
