/* CSI weather: publication dialog and safety-log actions. */
.csi-share-overlay {
  position: fixed; z-index: 99999; inset: 0; display: flex;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(15,23,42,.72); backdrop-filter: blur(3px);
  overflow-y: auto; overscroll-behavior: contain;
}
.csi-share-overlay.hidden { display: none !important; }
.csi-share-box {
  box-sizing: border-box; width: min(100%, 520px); min-width: 0;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
  border-radius: 16px; background: #fff; padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  font-family: system-ui, 'Noto Sans KR', sans-serif; line-height: 1.65;
  color: #0f172a; word-break: keep-all; overflow-wrap: anywhere;
}
.csi-share-box *, .csi-share-box *::before, .csi-share-box *::after { box-sizing: border-box; }
:where(.csi-share-box) :where(button, input, select) { font: inherit; }
.csi-share-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.csi-share-head strong { flex: 1; min-width: 0; padding-block: 8px; font-size: 18px; line-height: 1.5; }
.csi-share-head button {
  flex: 0 0 44px; min-height: 44px; padding: 8px; border: 1px solid #e2e8f0;
  border-radius: 8px; background: #f1f5f9; font-size: 16px; font-weight: 700; cursor: pointer;
}
.csi-share-help, .csi-share-note { color: #526278; font-size: 13px; line-height: 1.75; }
.csi-share-help { margin: 12px 0 16px; }
.csi-share-note { margin: 8px 0 0; }
.csi-share-summary {
  padding: 16px; border: 1px solid #d9e2f7; border-radius: 12px;
  background: #f1f5ff; color: #35476f; font-size: 13px; line-height: 1.8;
  font-weight: 600; white-space: pre-line; overflow-wrap: anywhere;
}
.csi-share-label { display: block; margin: 20px 0 8px; font-weight: 700; font-size: 14px; }
.csi-share-label small { font-weight: 400; color: #526278; }
.csi-share-input {
  display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  border: 1px solid #b9c8df; border-radius: 8px; background: #fff; color: #0f172a;
  font-size: 16px; line-height: 1.5;
}
.csi-share-input:disabled { background: #f1f5f9; color: #64748b; }
#csiShareUrl { font-size: 14px; font-variant-numeric: tabular-nums; direction: ltr; }
.csi-share-primary, .csi-share-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 0; padding: 10px 16px; border-radius: 8px;
  font-size: 14px; line-height: 1.6; font-weight: 700; text-align: center;
  white-space: normal; cursor: pointer;
}
.csi-share-primary { width: 100%; margin-top: 24px; border: 1px solid #4338ca; background: #4338ca; color: #fff; }
.csi-share-primary:disabled { opacity: .6; cursor: wait; }
.csi-share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.csi-share-secondary { flex: 1 1 160px; border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; }
.csi-share-result { margin-top: 20px; padding: 16px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; }
.csi-share-result.hidden { display: none !important; }
.csi-share-result-title { margin-bottom: 12px; font-weight: 700; font-size: 15px; line-height: 1.65; }
.csi-share-message { min-height: 20px; margin: 12px 0 0; color: #0f766e; font-size: 13px; line-height: 1.75; }
.csi-share-message.error { color: #b91c1c; }
#csiWeatherShareBtn:disabled { opacity: .6; cursor: not-allowed; }
.briefing-page{margin:0;background:#f3f6fb;color:#0f172a;font-family:system-ui,'Noto Sans KR',-apple-system,sans-serif;line-height:1.55}.briefing-page *{box-sizing:border-box}.briefing-page .hidden{display:none!important}.briefing-container{width:min(100% - 24px,720px);margin:0 auto}.briefing-site-header{background:#fff;border-bottom:1px solid #e2e8f0;padding:13px 0}.branding{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{font-size:17px;font-weight:900;color:#4338ca}.brand-label{font-weight:750;font-size:12px;color:#64748b}.briefing-status{padding:22px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;margin:20px 0;color:#475569}.briefing-status.error{color:#b91c1c;background:#fef2f2;border-color:#fecaca}
.brief-hero,.brief-weather,.brief-section,.brief-decision{margin-top:14px;padding:19px;background:#fff;border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 3px 12px rgba(15,23,42,.035)}.brief-hero{margin-top:20px;border-top:4px solid #4f46e5}.brief-pill{display:inline-block;background:#eef2ff;color:#4338ca;border-radius:99px;padding:3px 10px;font-size:12px;font-weight:850}.brief-hero h1{font-size:24px;line-height:1.3;margin:12px 0 5px}.brief-address{margin:0 0 10px;color:#64748b;font-size:13px}.brief-dates{color:#64748b;font-size:12px;line-height:1.8}.brief-alert{margin-top:12px;padding:14px;border:1px solid #fcd34d;border-radius:15px;background:#fffbeb;font-size:12.5px;font-weight:650;color:#92400e}.brief-expiry-notice{margin-top:9px;padding:11px;border-radius:10px;background:#fef2f2;color:#b91c1c;font-size:12px}
.brief-weather h2,.brief-section h2,.brief-decision h2{font-size:17px;margin:0 0 12px}.brief-source{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-bottom:13px;font-size:12px;color:#475569}.brief-source strong{padding:5px 9px;background:#e0e7ff;border:1px solid #c7d2fe;border-radius:8px;color:#3730a3;white-space:nowrap}.brief-source span{font-size:11px;color:#64748b}.brief-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.brief-metrics div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;min-width:0;padding:11px 5px;text-align:center}.brief-metrics span{display:block;font-size:11px;color:#64748b}.brief-metrics strong{display:block;font-size:16px;margin-top:3px;word-break:break-word}.brief-muted{font-size:12px;color:#64748b;line-height:1.6;margin:9px 0}.brief-forecast{margin-top:10px;font-size:12px;color:#334155;line-height:1.7;background:#f8fafc;padding:10px;border-radius:9px}
.brief-decision{border-left:5px solid #94a3b8}.brief-decision-allow{border-left-color:#16a34a}.brief-decision-caution{border-left-color:#d97706}.brief-decision-restrict{border-left-color:#ea580c}.brief-decision-stop{border-left-color:#dc2626;background:#fef2f2}.brief-decision-small{font-size:11px;color:#64748b}.brief-decision h2{font-size:21px;margin:4px 0}.brief-decision p{font-size:13px;margin:0;line-height:1.6}.brief-section h3{font-size:13px;margin:15px 0 7px}.brief-summary{margin:8px 0;font-size:13px}.brief-list{margin:9px 0;padding-left:21px}.brief-list li{margin-bottom:8px;font-size:13px;line-height:1.6}.brief-tbm{white-space:pre-wrap;font-size:13px;line-height:1.9}.brief-reference{display:inline-block;border:1px solid #c7d2fe;border-radius:9px;padding:9px 12px;color:#3730a3;text-decoration:none;font-weight:800;font-size:12px}
.brief-filter{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#f8fafc;padding:10px;border-radius:12px;margin:12px 0}.brief-filter label{font-size:13px;font-weight:800;white-space:nowrap}.brief-select{min-height:43px;padding:7px 10px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;max-width:100%;font-size:13px;color:#0f172a}.brief-filter .brief-select{width:min(100%,300px)}.brief-check-item{margin:12px 0;padding:13px;border:1px solid #e2e8f0;border-radius:13px}.brief-check-head{display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:12px}.brief-check-head strong{color:#4338ca}.brief-check-severity{background:#f1f5f9;border-radius:20px;padding:2px 7px;color:#64748b;font-size:10px}.brief-check-content{font-size:13.5px;line-height:1.65;font-weight:750;margin:9px 0}.brief-check-detail,.brief-check-basis{font-size:11px;color:#64748b;margin:6px 0}.brief-check-label{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;padding-top:10px;border-top:1px solid #e2e8f0;font-weight:700;font-size:12px}.brief-check-label .brief-select{width:130px}.brief-check-footer{background:#f8fafc;padding:13px;border-radius:13px}.brief-action-button{border:0;border-radius:11px;background:#4338ca;color:#fff;font-size:13px;font-weight:800;padding:12px;width:100%;min-height:45px}.brief-expired select[data-check-id]{opacity:.5}.brief-empty{padding:18px;text-align:center;color:#64748b;font-size:12px}.briefing-footer{padding:20px 0 24px;text-align:center;font-size:11px;color:#94a3b8}
@media(max-width:640px){.briefing-container{width:calc(100% - 20px)}.brief-hero,.brief-weather,.brief-section,.brief-decision{padding:14px;border-radius:15px}.brief-hero h1{font-size:20px}.brief-list li{font-size:12.5px}.brief-metrics strong{font-size:14px}.brief-check-item{padding:11px}.brief-filter .brief-select{width:65%}.csi-share-box{padding:20px}.csi-share-row{flex-direction:row}}

/* Safety log actions keep readable labels at equal minimum heights. */
#aiResultArea > div:first-child { flex-wrap: wrap; gap: 8px; }
.csi-share-toolbar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; min-width: 0; }
.csi-share-open-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 0; padding: 10px 16px; border: 1px solid #c7d2fe;
  border-radius: 8px; background: #eef2ff; color: #4338ca;
  font-size: 14px; font-weight: 700; line-height: 1.6; white-space: normal; cursor: pointer;
}
.csi-report-preview-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; width: 100%; }
.csi-report-preview-toolbar > div:first-child { min-width: 0; flex-wrap: wrap; gap: 8px 12px; }
.csi-report-preview-actions { justify-content: flex-end; margin-left: auto; }
.csi-report-preview-actions > button {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 44px; min-width: 128px; height: auto; padding: 10px 16px;
  font-size: 14px; font-weight: 700; line-height: 1.6; white-space: normal; overflow-wrap: anywhere;
}
#csiPreviewZoom > button { min-width: 44px; min-height: 44px; padding: 8px; }
#csiPreviewZoom > span { min-width: 56px; padding: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
#csiReportExportHelp { margin: 8px 0 16px; line-height: 1.7; overflow-wrap: anywhere; }
.briefing-page button:focus-visible, .briefing-page a:focus-visible, .briefing-page input:focus-visible,
.csi-share-overlay button:focus-visible, .csi-share-overlay input:focus-visible, .csi-share-overlay select:focus-visible {
  outline: 3px solid #6366f1; outline-offset: 3px;
}
@media (max-width: 640px) {
  #reportPreview.hidden { display: none; }
  #reportPreview { flex-direction: column; align-items: stretch; }
  .csi-share-toolbar { width: 100%; }
  .csi-report-preview-actions { margin-left: 0; }
  .csi-report-preview-actions > button { flex: 1 1 128px; }
}
@media (max-width: 380px) {
  .csi-share-overlay { padding: 12px; }
  .csi-share-box { padding: 16px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .csi-share-head { gap: 12px; }
}
@media (forced-colors: active) {
  .csi-share-primary, .csi-share-secondary, .csi-share-head button, .csi-share-open-button { border: 1px solid ButtonText; }
}

@media(max-width:640px){.brief-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
