/* Material 3の情報階層・面・状態表示を参照した、緊急報告用のWeb UI。 */
:root {
  --ink:#493d3b;--muted:#766763;--primary:#ad3d50;--on-primary:#fff;
  --surface:#fff;--canvas:#fbf8f4;--surface-soft:#f5ebe5;--outline:#e8ddd5;
  --safe-bg:#e5f0e8;--safe-ink:#315c43;--damage-bg:#fae9e8;--damage-ink:#813e49;
  --brand:var(--primary);--navy:var(--primary);--border:var(--outline);
  color:var(--ink);background:var(--canvas);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;
  font-synthesis:none;font-size:16px;line-height:1.6;
}
* {box-sizing:border-box}
body {margin:0}
[hidden] {display:none!important}
a {color:inherit;text-underline-offset:4px}
.symbols {position:absolute;width:0;height:0;overflow:hidden}
svg {fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
header {height:68px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 max(24px,calc((100% - 1160px)/2));border-bottom:1px solid var(--outline);background:var(--surface)}
.brand {display:inline-flex;gap:10px;align-items:center;min-height:48px;font-size:18px;font-weight:700;text-decoration:none}
.brand svg {width:27px;height:27px;color:var(--primary)}
.account-note {font-size:12px;color:var(--muted)}
main {max-width:1160px;margin:auto;padding:20px 24px 36px}
.narrow {max-width:480px;margin:36px auto}
.safety-note {font-size:12px;color:var(--muted);margin:0 0 20px;padding:0 0 0 10px;border-left:2px solid #d7ada0}
main:has(#member:not([hidden])) .safety-note {display:none}
.eyebrow {font-size:12px;font-weight:600;letter-spacing:.05em;color:var(--primary);margin:0 0 6px}
h1 {font-size:32px;font-weight:650;line-height:1.3;letter-spacing:-.025em;margin:0 0 16px}
h2 {font-size:20px;line-height:1.45;font-weight:650;margin:14px 0}
h3 {font-size:18px}
p {margin:12px 0}
.minor {font-size:12px;color:var(--muted)}
label {display:block;font-size:13px;font-weight:600;margin:16px 0 6px}
input,select,button {font:inherit}
input:not([type=checkbox]),select {display:block;min-width:0;width:100%;min-height:52px;padding:12px 14px;color:var(--ink);background:var(--surface);border:1px solid #b6a39a;border-radius:12px;font-size:16px}
button {min-height:48px;padding:11px 18px;border:1px solid var(--outline);border-radius:24px;color:var(--ink);background:var(--surface);font-size:14px;font-weight:600;cursor:pointer}
button:hover:not(:disabled) {background:#f6efea}
button:disabled {opacity:.5;cursor:default}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible,summary:focus-visible {outline:3px solid #3978a0;outline-offset:3px}
section[tabindex="-1"]:focus {outline:none}
.primary {background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.primary:hover:not(:disabled) {background:#923343}
.primary:disabled {background:#f1e9e3;border-color:#e2d6ce;color:#7a6a62;opacity:1}
.secondary {background:var(--surface)}
.text-button {border-color:transparent;background:transparent;color:var(--primary);padding:11px 12px}
.panel {border:1px solid var(--outline);border-radius:24px;padding:12px 24px 24px;background:var(--surface)}
.panel .primary {width:100%;margin-top:24px;min-height:52px}
.entry-description {color:var(--muted);font-size:14px;margin:0 0 24px}
details.help {border-top:1px solid var(--outline);padding:8px 0;margin-top:16px}
summary {min-height:48px;padding:12px 2px;cursor:pointer;font-size:13px;font-weight:600;line-height:1.7}
.preparation ol {padding-left:24px}
.preparation li {margin:10px 0}
.portal-address {padding:12px;background:var(--surface-soft);border-radius:12px;overflow-wrap:anywhere;font-size:13px}
#card-code {font-family:ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase}
.contact-guide {white-space:pre-line}
.notice {border:1px solid #bfd7c7;background:#f0f7f1;border-radius:16px;padding:12px 16px;font-size:14px;overflow-wrap:anywhere}
.notice.error {border-color:#c99284;background:#fff2eb;color:#873f2f}
.notice.success {border-color:#a9cdb4;background:#ecf6ee;color:#24563c}
/* 本人画面は「選ぶ→送信中→受付完了」の3状態だけを見せる。 */
.report-shell {border:1px solid var(--outline);border-radius:24px;padding:28px;background:var(--surface)}
.identity {display:flex;align-items:center;gap:10px;font-size:18px;font-weight:600;margin-bottom:20px}
.identity-mark {display:grid;place-items:center;width:36px;height:36px;flex-shrink:0;border-radius:50%;background:var(--surface-soft);color:var(--primary)}
.identity-mark svg {width:22px;height:22px}
.identity > span:nth-child(2) {min-width:0;overflow-wrap:anywhere}
.report-shell h1 {font-size:28px;font-weight:700;line-height:1.4;margin:0 0 10px;letter-spacing:0}
.report-lead {font-size:17px;line-height:1.7;color:var(--ink);margin:0 0 20px}
.incident {padding:12px 14px;border-radius:12px;background:#f5efe9;margin:0 0 20px}
.badge {display:inline-flex;align-items:center;gap:4px;background:#eee5df;color:#72544c;border-radius:6px;padding:2px 8px;font-size:12px;font-weight:650}
.badge.live {background:#fff0d6;color:#805d28}
.incident h2 {font-size:16px;font-weight:600;line-height:1.5;margin:6px 0 3px;overflow-wrap:anywhere}
.incident .minor {font-size:14px;margin:0;line-height:1.6}
.report-shell .badge {font-size:14px}
.send-hint {font-size:14px;color:var(--muted);margin:0 0 14px;line-height:1.7}
.answer-grid {display:grid;grid-template-columns:1fr;gap:18px}
.answer-buttons {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}
.answer-buttons .answer {flex-direction:column;align-items:flex-start;gap:2px;min-height:88px;padding:16px 12px}
.answer-buttons .answer strong {font-size:25px;white-space:nowrap}
#open-claim {width:100%;min-height:56px;font-size:18px}
#claim h1 {font-size:27px}
#claim-message {scroll-margin-top:16px}
.answer {width:100%;display:flex;align-items:center;gap:16px;min-height:100px;padding:17px 20px;border:2px solid transparent;border-radius:16px;text-align:left;color:#fff;transition:transform .1s ease,box-shadow .1s ease}
.answer-copy {display:flex;flex-direction:column;gap:2px}
.answer strong {font-size:28px;font-weight:700;line-height:1.4;letter-spacing:.02em}
.answer-copy > span {font-size:15px;font-weight:500;line-height:1.6}
.answer.safe {background:#2d6b4f;border-color:#24583f;color:#fff;box-shadow:0 4px 0 #1d4934}
.answer.damage {background:#ad3d50;border-color:#953245;color:#fff;box-shadow:0 4px 0 #7d2839}
.answer.safe:hover:not(:disabled) {background:#265d44}
.answer.damage:hover:not(:disabled) {background:#963246}
.answer:active:not(:disabled) {transform:translateY(3px);box-shadow:0 1px 0 #493d3b}
.answer:disabled {opacity:.5}
.answer[data-sending=true] {opacity:1;outline:3px solid var(--ink);outline-offset:3px}
.answer-icon {position:relative;display:grid;place-items:center;width:46px;height:46px;flex-shrink:0;border-radius:50%;background:#ffffff24}
.answer-icon svg {width:28px;height:28px;stroke-width:3}
.answer[data-sending=true] .answer-icon svg {visibility:hidden}
.answer[data-sending=true] .answer-icon::after {content:"";position:absolute;width:24px;height:24px;border:3px solid #ffffff50;border-top-color:#fff;border-radius:50%;animation:report-spin .8s linear infinite}
@keyframes report-spin {to {transform:rotate(360deg)}}
.response-hint {font-size:14px;line-height:1.8;color:var(--muted);margin:20px 0}
.report-progress {font-size:18px;font-weight:600;color:var(--primary);padding:14px 16px;border:2px solid var(--primary);border-radius:12px;background:var(--surface);margin:20px 0}
.report-complete {border:2px solid #83ad91;border-radius:20px;padding:24px 18px;background:#f1f8f2;text-align:center}
.report-complete:focus {outline:3px solid #3978a0;outline-offset:4px}
.complete-icon {display:grid;place-items:center;width:56px;height:56px;margin:0 auto 16px;border-radius:50%;background:#2d6b4f;color:#fff}
.complete-icon svg {width:34px;height:34px;stroke-width:3}
.receipt {font-size:25px;line-height:1.5;font-weight:700;margin:0 0 12px;overflow-wrap:anywhere;color:var(--safe-ink)}
.receipt[data-state=help] {color:var(--damage-ink)}
.member-received {font-size:14px;color:var(--muted);margin:10px 0}
.member-attention {font-size:16px;line-height:1.7;color:var(--damage-ink);margin:16px 0}
.report-actions {display:grid;gap:12px;margin:24px 0}
.report-actions button {width:100%;min-height:54px;font-size:17px;border-radius:14px}
.report-actions .primary {min-height:58px;font-size:18px}
.report-shell details.help {margin-top:16px}
.report-shell details.help details.help {margin:8px 0 0;padding-left:8px}
.report-shell summary {font-size:16px;min-height:52px}
.secondary {border-color:#bfaea4;box-shadow:0 2px 0 #e2d8d1}
.secondary:active:not(:disabled) {transform:translateY(2px);box-shadow:none}
.section-head,.dialog-head {display:flex;align-items:center;justify-content:space-between;gap:16px}
.section-head h1 {font-size:29px;margin:0}
.manager-controls {display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 18px}
.manager-controls .minor {margin:0}
.actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.event-overview {display:grid;grid-template-columns:minmax(0,1fr) 180px;align-items:center;gap:24px;background:var(--surface);border:1px solid var(--outline);border-radius:24px;padding:22px 24px;margin:14px 0}
.event-overview h2 {font-size:21px;margin:9px 0 6px}
.event-overview p {font-size:12px;color:var(--muted);margin:5px 0}
#manager .attention-summary {font-size:12px;color:var(--primary);font-weight:600}
.progress-summary {padding-left:24px;border-left:1px solid var(--outline);display:flex;flex-direction:column;gap:7px}
.progress-summary strong {font-size:36px;font-weight:650;line-height:1.2;letter-spacing:-.03em;color:var(--primary)}
.progress-summary span {font-size:12px;color:var(--muted)}
progress {width:100%;height:6px;border:0;border-radius:8px;overflow:hidden;background:#eee4df;accent-color:#b9767f}
progress::-webkit-progress-bar {background:#eee4df}
progress::-webkit-progress-value {background:#b9767f}
.metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}
.metric {background:var(--surface);border:1px solid var(--outline);border-radius:20px;padding:16px 18px}
.metric-label {font-size:13px;color:var(--muted)}
.metric-value {font-size:32px;line-height:1.2;font-weight:650;margin:7px 0;font-variant-numeric:tabular-nums;letter-spacing:-.03em}
.metric .minor {font-size:12px;margin:0}
.metric.help {background:#fcf6ef;border-color:#e9d8c6}
.metric.help .metric-value {color:var(--damage-ink)}
.mobile-summary {display:none}
.workspace {display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:20px;align-items:start;margin-top:22px}
.roster-panel {min-width:0}
.filters {display:flex;gap:3px;padding:4px;background:#f0e8e2;border-radius:28px;margin-bottom:12px}
.filters button {flex:1;min-width:0;min-height:48px;border:0;border-radius:24px;background:transparent;padding:10px 8px;font-size:13px;white-space:nowrap}
.filters [aria-pressed=true] {background:var(--surface);color:var(--primary);box-shadow:0 1px 5px #183e2820}
.search-filter {margin:0 0 10px;border-bottom:1px solid var(--outline)}
.search-filter > summary {font-size:12px;color:var(--muted)}
.search-tools {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto;gap:8px;align-items:end;padding:0 0 14px}
.search-tools label {font-size:12px;margin-top:4px}
.search-tools button {padding:10px 14px}
.list-head,.person-row {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) 110px;gap:14px;align-items:center}
.list-head {font-size:11px;color:var(--muted);padding:8px 16px}
.people {background:var(--surface);border:1px solid var(--outline);border-radius:20px;overflow:hidden}
.person-row {padding:16px;border-top:1px solid var(--outline)}
.person-row:first-child {border-top:0}
.person-row.attention {background:#fdf9f4}
.person-content {min-width:0;overflow-wrap:anywhere}
.person-name {font-weight:650;font-size:15px}
.person-content p {margin:4px 0}
.person-content .minor {font-size:11px}
.person-row > button {padding:10px 12px;font-size:12px}
.row-icon {width:17px;height:17px;flex-shrink:0}
.state-label {display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;padding:4px 8px;border-radius:8px}
.state-label.pending {background:#f4eedf;color:#795a29}
.state-label.safe {background:var(--safe-bg);color:var(--safe-ink)}
.state-label.help {background:var(--damage-bg);color:var(--damage-ink)}
.attention-text,.unit-attention {font-size:11px;color:var(--damage-ink);font-weight:600}
.empty {padding:20px 16px;color:var(--muted);font-size:14px}
.pagination {display:flex;justify-content:space-between;align-items:center;gap:8px;margin:14px 0}
.pagination button {font-size:12px;padding:10px 14px}
.unit-panel {background:var(--surface);border:1px solid var(--outline);border-radius:20px;padding:18px}
.unit-panel > summary {font-size:14px;padding:0;display:list-item}
.unit-panel .minor {font-size:12px}
.unit-item {width:100%;display:flex;flex-direction:column;align-items:flex-start;text-align:left;padding:12px 0;border:0;border-top:1px solid var(--outline);border-radius:0;font-weight:400}
.unit-item strong {font-size:13px}
.unit-item .minor {margin:3px 0}
.unit-item[aria-pressed=true] {color:var(--primary);background:var(--surface-soft);border-radius:12px;padding-left:10px}
.inbox {background:var(--surface);border:1px solid var(--outline);border-radius:24px;padding:20px;margin-top:24px}
.inbox h2 {font-size:18px;margin:0}
.count-badge {font-size:12px;padding:3px 9px;background:var(--surface-soft);border-radius:16px;vertical-align:middle}
.inbox-row {display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 0;border-top:1px solid var(--outline)}
.inbox-row.attention {border-left:3px solid #bb936c;padding-left:12px}
.inbox-alert {display:flex;align-items:center;min-height:48px;padding:10px 14px;margin:12px 0;border-radius:14px;background:var(--damage-bg);color:var(--damage-ink);font-size:13px;font-weight:600;text-decoration:none}
.notification-actions {display:grid;gap:10px;margin:18px 0}
.sms-guide {font-size:13px;line-height:1.7;color:var(--muted)}
.check {display:flex;align-items:flex-start;gap:10px;font-size:13px;font-weight:400}
.check input {width:20px;height:20px;flex-shrink:0;margin-top:3px}
dialog {width:min(540px,calc(100% - 32px));max-height:90vh;overflow:auto;border:1px solid var(--outline);border-radius:28px;color:var(--ink);padding:24px;background:var(--surface);box-shadow:0 24px 80px #19392b24}
dialog::backdrop {background:#172e2c66}
.dialog-head h2 {margin:0;font-size:21px}
dialog form > .primary {margin-top:20px}
dialog form > .secondary {margin-top:12px}
dialog .text-button {white-space:nowrap}
#print-card {margin-top:18px;border:1px dashed #a1b5a7;padding:16px;text-align:center;border-radius:12px}
#print-card img {max-width:100%}
.card-secret {font-family:ui-monospace,monospace;font-size:18px;font-weight:700;overflow-wrap:anywhere}
.preview {text-align:center;color:#637367;background:#f0e8e2;padding:5px 14px;font-size:11px;line-height:1.5}
.preview a {display:inline-flex;align-items:center;min-height:32px;margin:0 5px;font-size:11px}
footer {display:flex;gap:18px;align-items:center;justify-content:center;padding:14px 16px;font-size:12px;color:var(--muted);border-top:1px solid var(--outline)}
footer a {display:inline-flex;align-items:center;min-height:48px}
@media(max-width:950px) {.workspace {grid-template-columns:1fr}.unit-panel {grid-row:1;margin-bottom:12px;padding:12px 16px}.unit-panel > summary {padding:10px 2px}.unit-panel[open] #unit-summary {max-height:280px;overflow:auto}}
@media(max-width:650px) {
  header {height:60px;padding:0 20px}.brand {font-size:17px}.account-note {font-size:10px}
  main {padding:18px 20px 28px}.narrow {margin:24px auto;max-width:440px}h1 {font-size:29px}
  .panel {padding:10px 18px 20px;border-radius:24px}
  .report-shell {margin:0 auto;padding:6px 0 0;border:0;background:transparent;border-radius:0}
  .identity {margin:0 0 18px;gap:9px}
  .report-shell h1 {font-size:28px}.report-lead {font-size:17px}
  .incident {padding:12px 14px;border-radius:12px}
  .report-shell summary {font-size:16px}
  .section-head h1 {font-size:27px}
  .manager-controls {display:block;margin:6px 0 12px}.manager-controls .actions {margin-top:9px;justify-content:space-between;gap:6px}
  .manager-controls .actions button {font-size:12px;padding:10px 14px}.manager-controls .minor {font-size:12px}
  .event-overview {grid-template-columns:1fr;padding:16px 18px;border-radius:22px;gap:12px;margin:10px 0 12px}
  .event-overview h2 {font-size:18px;margin:7px 0 5px}.event-overview p {font-size:12px}
  .progress-summary {display:grid;grid-template-columns:auto 1fr;align-items:center;gap:5px 12px;padding:10px 0 0;border-left:0;border-top:1px solid var(--outline)}
  .progress-summary strong {font-size:28px}.progress-summary progress {grid-column:1/-1}
    .metrics {grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 6px}.metric {padding:12px 16px;border-radius:18px}
  .metric-value {font-size:30px;margin:5px 0}.metric .minor {font-size:10px}
  .metric:first-child,.metric:last-child {display:none}
  .mobile-summary {display:block;font-size:12px;color:var(--muted);margin:8px 0 16px}
  .workspace {margin-top:14px;gap:0}.filters {margin-bottom:8px}.filters button {font-size:12px;padding:10px 5px}
  .search-filter > summary {font-size:12px}.search-tools {grid-template-columns:1fr 1fr;gap:8px}.search-tools button {width:100%;font-size:12px}
  .list-head {display:none}.person-row {grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:14px}
  .person-row > :nth-child(2) {grid-column:1/-1;grid-row:2}.person-row > button {grid-row:1;grid-column:2}
  .person-name {font-size:15px}.state-label {font-size:11px}.person-row .minor {font-size:12px}
  .inbox {padding:16px;border-radius:20px}.inbox h2 {font-size:16px}.inbox .section-head {display:block}.inbox-row {align-items:flex-start;flex-direction:column}
  .pagination button {padding:10px 12px}.pagination .minor {font-size:10px}
  dialog {position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:100%;max-height:90svh;border-radius:28px 28px 0 0;padding:22px 20px max(24px,env(safe-area-inset-bottom));border-bottom:0}
}
@media(prefers-reduced-motion:reduce) {.answer {transition:none}.answer[data-sending=true] .answer-icon::after {animation:none}}
@media print {
  body > *:not(main) {display:none!important}main > *:not(#card-dialog) {display:none!important}
  #card-dialog {display:block!important;position:static;width:95mm;max-height:none;margin:0;padding:0;border:0;box-shadow:none}
  #card-dialog > *:not(#print-card) {display:none!important}#print-card {margin:0}body {background:#fff}
}
