:root {
  color-scheme: light;
  --bg: #f2f4f6;
  --surface: #ffffff;
  --surface-alt: #f7f8f9;
  --border: #cbd2d8;
  --border-dark: #aeb8c0;
  --text: #17212b;
  --muted: #52616d;
  --blue: #075ea8;
  --blue-dark: #064b85;
  --blue-soft: #e7f2fb;
  --green: #087a3e;
  --green-bg: #e5f5eb;
  --red: #b4232d;
  --red-bg: #fde8ea;
  --amber: #8a5700;
  --amber-bg: #fff2cf;
  --gray-bg: #e9edf0;
  --radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); }
button, input, select { font: inherit; }
button { color: inherit; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }

.app-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border-dark); }
.header-main { display: flex; align-items: center; gap: 28px; min-height: 64px; max-width: 1440px; margin: 0 auto; padding: 8px 24px; }
.product-name { padding-right: 28px; border-right: 1px solid var(--border); font-size: 1.15rem; font-weight: 800; white-space: nowrap; }
.equipment-name { display: flex; align-items: baseline; gap: 10px; }
.equipment-name span { color: var(--muted); font-size: 0.85rem; }
.equipment-name strong { font-size: 1.15rem; }
.header-right { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #78b993; border-radius: 4px; color: #045f31; background: var(--green-bg); font-weight: 700; }
.live-badge.is-stopped { color: var(--amber); border-color: #d3ae61; background: var(--amber-bg); }
.live-badge.is-critical { color: var(--red); border-color: var(--red); background: var(--red-bg); }
.live-badge.is-critical .pulse-dot { background: var(--red); }
.pulse-dot, .status-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--green); }
.live-badge.is-stopped .pulse-dot, .status-dot--stopped { background: #d28700; }
.status-dot--critical { background: var(--red); }
.status-dot--ok { background: var(--green); }
.system-clock { min-width: 72px; font-size: 1rem; font-weight: 700; }
.main-nav { display: flex; max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.nav-item { min-width: 150px; min-height: 48px; padding: 10px 20px; border: 0; border-right: 1px solid var(--border); background: var(--surface); color: #384853; cursor: pointer; font-weight: 700; }
.nav-item:first-child { border-left: 1px solid var(--border); }
.nav-item:hover { background: #eef3f7; }
.nav-item.is-active { color: #ffffff; background: var(--blue); }

.main-content { width: min(1440px, 100%); margin: 0 auto; padding: 20px 24px 50px; }
.banner { display: flex; align-items: center; gap: 12px; min-height: 52px; margin-bottom: 20px; padding: 10px 14px; border: 1px solid #e0b451; border-left: 6px solid #d28a00; border-radius: var(--radius); background: var(--amber-bg); }
.banner[hidden] { display: none; }
.banner--maintenance { color: #663e00; border-color: #d49b2d; background: #fff0c2; }
.banner--critical { color: var(--red); border-color: var(--red); background: var(--red-bg); }
.banner--storage { color: #663e00; }
.banner--critical div span { color: var(--red); }
.banner-icon, .dialog-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; color: #ffffff; background: #b66a00; font-weight: 900; }
.banner--critical .banner-icon { background: var(--red); }
.banner div { display: flex; flex-wrap: wrap; gap: 5px 14px; }
.banner strong { color: #663e00; }
.banner--critical strong { color: var(--red); }
.banner span { color: #765a28; }
.text-button, .link-button { margin-left: auto; padding: 6px 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 700; text-decoration: underline; white-space: nowrap; }

.view { display: none; }
.view.is-active { display: block; }
.is-hidden-widget { display: none !important; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 54px; margin-bottom: 14px; }
.page-heading h1 { margin: 0; font-size: 1.45rem; }
.page-heading p { margin: 5px 0 0; color: var(--muted); }
.heading-link { margin: 4px 0 0; }
.period-control { display: flex; flex-wrap: wrap; align-items: center; gap: 0; border: 1px solid var(--border-dark); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.period-control > span { padding: 9px 12px; color: var(--muted); background: var(--gray-bg); font-size: 0.875rem; font-weight: 700; }
.period-button { min-width: 76px; padding: 9px 13px; border: 0; border-left: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 700; }
.period-button:hover { background: var(--blue-soft); }
.period-button.is-active { color: #ffffff; background: var(--blue); }
.custom-period-fields { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto; align-items: end; gap: 12px; margin: 0 0 16px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.custom-period-fields[hidden] { display: none; }
.history-area { margin-top: 0; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 2px solid #b7c0c7; }
.history-heading h2 { margin: 2px 0 0; font-size: 1.2rem; }

.current-status, .panel, .summary-card, .filter-panel, .table-card, .diagnostic-summary { border: 1px solid var(--border-dark); border-radius: var(--radius); background: var(--surface); }
.current-status { margin-bottom: 14px; padding: 18px; }
.section-title-row, .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-title-row h2, .panel h2 { margin: 0; font-size: 1.05rem; }
.section-title-row p, .panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.875rem; }
.panel-head .link-button { display: block; margin: 5px 0 0; padding: 0; font-size: 0.8rem; }
.updated-time { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.status-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 10px; }
.status-card { min-height: 143px; padding: 13px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface-alt); }
.status-card.is-on { border-color: #49a973; background: var(--green-bg); }
.status-card.is-off { border-color: #99a8b2; background: #f3f5f6; }
.status-card.is-unknown { color: #5e6971; border-color: #b9c0c5; background: #e7ebee; }
.channel-number { color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.status-name { margin-top: 3px; font-size: 1rem; font-weight: 800; }
.status-value { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 1.65rem; font-weight: 900; }
.status-value span { width: 15px; height: 15px; border-radius: 50%; background: #87939b; }
.is-on .status-value { color: var(--green); }
.is-on .status-value span { background: var(--green); }
.is-off .status-value { color: #3c4952; }
.is-unknown .status-value { font-size: 1.25rem; }
.status-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 0.8rem; }
.output-status { padding-top: 14px; padding-bottom: 14px; }
.output-status-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 8px; }
.output-card { display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; padding: 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-alt); }
.output-card strong { font-size: 0.84rem; }
.output-card small { grid-column: 1 / -1; color: var(--muted); font-size: 0.76rem; }
.output-card .value-pill { align-self: start; }

.dashboard-zone { padding: 18px; border: 2px solid; border-radius: 8px; }
.dashboard-zone--realtime { border-color: #4c8fc6; background: #eef6fc; box-shadow: inset 6px 0 0 var(--blue); }
.dashboard-zone--history { border-color: #8f9ca5; background: #e9edf0; box-shadow: inset 6px 0 0 #53636f; }
.current-state-area { margin-bottom: 28px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 2px solid #9fc2dd; }
.section-heading h2 { margin: 2px 0 0; font-size: 1.2rem; }
.realtime-label { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 6px 10px; border: 1px solid #78b993; border-radius: 4px; color: #045f31; background: var(--green-bg); font-size: 0.8rem; font-weight: 800; }
.realtime-label::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.current-state-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.period-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.overview-card { min-height: 152px; padding: 17px 18px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.overview-card.is-active-state { border-color: #4c8fc6; background: var(--blue-soft); }
.overview-card.is-normal-state { border-color: #6eb68d; background: var(--green-bg); }
.overview-label { color: var(--muted); font-size: 0.9rem; font-weight: 800; }
.overview-card > strong { display: block; margin-top: 12px; font-size: 1.85rem; }
.overview-card.is-active-state > strong { color: var(--blue-dark); }
.overview-card.is-normal-state > strong { color: #075d31; }
.overview-card p { margin: 9px 0 0; color: #334954; font-weight: 700; }
.overview-card small { display: block; margin-top: 9px; color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.summary-card { display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 104px; padding: 16px 18px; }
.period-summary-grid .summary-card { min-height: 116px; }
.summary-card > div:first-child span, .summary-card > div:first-child small { display: block; }
.summary-card > div:first-child span { font-weight: 800; }
.summary-card > div:first-child small { margin-top: 6px; color: var(--muted); }
.summary-value { display: flex; align-items: baseline; gap: 7px; text-align: right; }
.summary-value strong { font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.summary-value span { color: var(--muted); font-weight: 700; }
.summary-card .small-button { grid-column: 2; justify-self: end; margin-top: 7px; }
.last-event-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; margin-bottom: 14px; padding: 13px 18px; border: 1px solid var(--border-dark); border-radius: var(--radius); background: var(--surface); }
.last-event-card span, .last-event-card small { display: block; }
.last-event-card span { font-weight: 800; }
.last-event-card small { margin-top: 4px; color: var(--muted); }
.last-event-card > strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }

.dashboard-lower { display: grid; grid-template-columns: minmax(0, 2fr) minmax(330px, 0.85fr); gap: 14px; }
.dashboard-widget-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.dashboard-widget-grid > [data-size="small"] { grid-column: span 4; }
.dashboard-widget-grid > [data-size="medium"] { grid-column: span 6; }
.dashboard-widget-grid > [data-size="large"] { grid-column: span 12; }
.dashboard-widget-grid > .last-event-card { margin-bottom: 0; }
.dashboard-widget-grid > .panel,
.dashboard-widget-grid > .overview-card,
.dashboard-widget-grid > .summary-card,
.dashboard-widget-grid > .last-event-card { min-width: 0; height: 100%; }
.custom-history-widget .panel-head { margin-bottom: 12px; }
.custom-history-widget [data-history-widget-body] > small { display: block; margin-top: 10px; color: var(--muted); }
.custom-widget-value { display: flex; align-items: baseline; gap: 7px; min-height: 44px; }
.custom-widget-value strong { font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.custom-widget-value span { color: var(--muted); font-weight: 700; }
.custom-widget-empty { margin: 0; color: var(--muted); }
.custom-mini-layout { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; }
.custom-mini-label, .custom-mini-timeline { display: flex; align-items: center; height: 44px; }
.custom-mini-scroll { min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.custom-mini-scroll:focus-visible { outline: 3px solid rgba(7, 94, 168, 0.25); outline-offset: 3px; }
.custom-mini-track { position: relative; width: 100%; min-width: 0; overflow: hidden; height: 20px; border: 1px solid #c4ccd2; background: #edf0f2; }
.mini-timeline-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: var(--muted); font-size: 0.8rem; }
.mini-timeline-toolbar > div { display: flex; align-items: center; gap: 7px; }
.mini-timeline-toolbar output { min-width: 34px; text-align: center; font-weight: 800; }
.custom-mini-segment, .custom-mini-pulse { position: absolute; top: 2px; bottom: 2px; min-height: 0; padding: 0; border: 0; background: var(--blue); cursor: pointer; }
.custom-mini-unknown, .timeline-unknown { position: absolute; top: 2px; bottom: 2px; min-height: 0; padding: 0; border: 0; background: repeating-linear-gradient(135deg, #a9b4bc 0, #a9b4bc 4px, #d8dee2 4px, #d8dee2 8px); cursor: pointer; }
.custom-mini-marker, .custom-mini-unknown-marker { position: absolute; top: 2px; bottom: 2px; width: 16px; min-height: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.timeline-marker, .timeline-unknown-marker { position: absolute; top: 3px; width: 24px; height: 12px; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: transparent; cursor: pointer; }
.custom-mini-marker::after, .timeline-marker::after,
.custom-mini-unknown-marker::after, .timeline-unknown-marker::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; transform: translateX(-50%); border-radius: 2px; pointer-events: none; }
.custom-mini-marker::after, .timeline-marker::after { background: var(--blue); }
.custom-mini-unknown-marker::after, .timeline-unknown-marker::after { background: repeating-linear-gradient(135deg, #a9b4bc 0, #a9b4bc 2px, #d8dee2 2px, #d8dee2 4px); }
.custom-mini-pulse { width: 3px; transform: translateX(-1px); }
.custom-mini-segment:hover, .custom-mini-pulse:hover,
.custom-mini-segment:focus-visible, .custom-mini-pulse:focus-visible,
.custom-mini-segment.is-selected, .custom-mini-pulse.is-selected { z-index: 2; outline: 2px solid #ffffff; box-shadow: 0 0 0 4px #17212b; }
.custom-mini-marker:hover, .custom-mini-unknown-marker:hover,
.custom-mini-marker:focus-visible, .custom-mini-unknown-marker:focus-visible,
.custom-mini-marker.is-selected, .custom-mini-unknown-marker.is-selected { z-index: 2; outline: 2px solid #ffffff; box-shadow: 0 0 0 4px #17212b; }
.panel { padding: 18px; }
.timeline-zoom { display: flex; align-items: center; gap: 8px; }
.timeline-zoom .small-button { min-width: 40px; padding: 7px 10px; font-size: 1rem; }
.timeline-zoom output { min-width: 34px; text-align: center; color: var(--muted); font-size: 0.8rem; font-weight: 800; }
.timeline-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-gutter: stable; }
.timeline-scroll:focus-visible { outline: 3px solid rgba(7, 94, 168, 0.25); outline-offset: 3px; }
.timeline { margin-top: 18px; min-width: 100%; }
.timeline-axis { display: grid; grid-template-columns: 130px repeat(5, 1fr); padding-bottom: 7px; color: var(--muted); font-size: 0.75rem; }
.timeline-axis span:not(:first-child) { text-align: right; }
.timeline-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; margin: 14px 0; }
.timeline-label { display: grid; grid-template-columns: 34px 1fr; align-items: center; font-size: 0.86rem; font-weight: 700; }
.timeline-label code { color: var(--muted); font-size: 0.7rem; }
.timeline-track { position: relative; height: 20px; border: 1px solid #c4ccd2; background: repeating-linear-gradient(90deg, #edf0f2 0, #edf0f2 calc(25% - 1px), #ccd4d9 calc(25% - 1px), #ccd4d9 25%); }
.timeline-segment, .timeline-pulse { position: absolute; top: 3px; height: 12px; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: var(--blue); cursor: pointer; }
.timeline-segment.cyan, .timeline-pulse.cyan { background: var(--blue); }
.timeline-segment.red, .timeline-pulse.red { background: #c02632; }
.timeline-segment.amber, .timeline-pulse.amber { background: #d17c00; }
.timeline-segment.violet, .timeline-pulse.violet { background: #4663a6; }
.timeline-segment.green, .timeline-pulse.green { background: var(--green); }
.timeline-pulse { width: 8px; transform: translateX(-4px); }
.timeline-segment:hover, .timeline-pulse:hover,
.timeline-unknown:hover, .custom-mini-unknown:hover,
.timeline-segment:focus-visible, .timeline-pulse:focus-visible,
.timeline-unknown:focus-visible, .custom-mini-unknown:focus-visible,
.timeline-segment.is-selected, .timeline-pulse.is-selected { z-index: 2; outline: 3px solid #ffffff; box-shadow: 0 0 0 5px #17212b; }
.timeline-marker:hover, .timeline-unknown-marker:hover,
.timeline-marker:focus-visible, .timeline-unknown-marker:focus-visible,
.timeline-marker.is-selected, .timeline-unknown-marker.is-selected { z-index: 2; outline: 3px solid #ffffff; box-shadow: 0 0 0 5px #17212b; }
@media (pointer: coarse) {
  .custom-mini-marker, .custom-mini-unknown-marker { top: -2px; bottom: -2px; width: 24px; }
  .timeline-marker, .timeline-unknown-marker { top: -3px; width: 24px; height: 24px; }
}
.timeline-legend { display: flex; justify-content: space-between; margin: 16px 0 0 90px; color: var(--muted); font-size: 0.75rem; }
.timeline-help { margin: 8px 0 0 90px; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.timeline-detail { position: fixed; z-index: 60; width: min(330px, calc(100vw - 20px)); padding: 14px 16px; border: 1px solid #84939d; border-radius: var(--radius); background: #ffffff; box-shadow: 0 10px 30px rgba(20, 32, 42, 0.25); pointer-events: none; }
.timeline-detail[hidden] { display: none; }
.timeline-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.timeline-detail-head strong { font-size: 1rem; }
.timeline-detail-head code { color: var(--muted); font-size: 0.78rem; }
.timeline-detail dl { margin: 9px 0 0; }
.timeline-detail dl div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 4px 0; }
.timeline-detail dt { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.timeline-detail dd { margin: 0; font-size: 0.82rem; font-weight: 700; text-align: right; }
.timeline-detail small { display: block; margin-top: 8px; color: var(--muted); font-size: 0.72rem; text-align: right; }
.event-list { border-top: 1px solid var(--border); }
.event-item { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 49px; border-bottom: 1px solid var(--border); }
.event-time { color: var(--muted); font-size: 0.8rem; }
.event-name { overflow: hidden; font-size: 0.95rem; text-overflow: ellipsis; white-space: nowrap; }
.channel-tag { padding: 2px 5px; border: 1px solid #9aa9b3; border-radius: 3px; color: #394b57; background: #edf1f3; font-size: 0.7rem; font-weight: 800; }
.channel-tag--alarm { color: var(--red); border-color: #d7999f; background: var(--red-bg); }
.value-pill { min-width: 46px; padding: 4px 7px; border: 1px solid; border-radius: 3px; text-align: center; font-size: 0.75rem; font-weight: 900; }
.value-pill--on { color: var(--blue-dark); border-color: #79a9cf; background: var(--blue-soft); }
.value-pill--off { color: #3f4d56; border-color: #aab5bc; background: #edf0f2; }

.primary-button, .secondary-button, .danger-button { min-height: 42px; padding: 8px 15px; border: 1px solid; border-radius: 4px; cursor: pointer; font-weight: 800; }
.primary-button { color: #ffffff; border-color: var(--blue-dark); background: var(--blue); }
.primary-button:hover { background: var(--blue-dark); }
.secondary-button { color: #25333d; border-color: var(--border-dark); background: #f5f6f7; }
.secondary-button:hover { background: #e7ebee; }
.danger-button { color: #ffffff; border-color: #8f1821; background: var(--red); }
.danger-button:hover { background: #911822; }
.small-button { min-height: 32px; padding: 4px 10px; font-size: 0.8rem; }

.filter-panel { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-bottom: 14px; padding: 16px; }
label { color: #394954; font-size: 0.875rem; font-weight: 700; }
select, input { width: 100%; min-height: 42px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--border-dark); border-radius: 3px; outline: none; color: var(--text); background: #ffffff; }
select:focus, input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7, 94, 168, 0.15); }
.table-card { overflow: hidden; }
.table-summary { display: flex; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.table-summary span { color: var(--muted); }
.page-size-label { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 0.8rem; }
.page-size-label select { width: auto; min-height: 32px; margin: 0; padding: 4px 26px 4px 7px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 15px; border-bottom: 2px solid var(--border-dark); background: #e8edf1; color: #33434e; text-align: left; white-space: nowrap; }
td { padding: 12px 15px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr:nth-child(even) { background: #f7f8f9; }
td:first-child { font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.86rem; }
.kind-label { color: var(--muted); }
.sync-ok { color: var(--green); font-weight: 700; }
.sync-warning { color: var(--amber); font-weight: 700; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 14px; }
.pagination button { min-height: 34px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 3px; background: #f3f5f6; }

.settings-nav { display: flex; gap: 0; margin-bottom: 14px; border: 1px solid var(--border-dark); border-radius: 4px; overflow: hidden; background: var(--surface); }
.settings-nav button { flex: 1; min-height: 44px; border: 0; border-left: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 800; }
.settings-nav button:first-child { border-left: 0; }
.settings-nav button:hover { color: var(--blue); background: var(--blue-soft); }
.settings-nav button.is-active { color: #ffffff; background: var(--blue); }
.settings-section { display: none; scroll-margin-top: 140px; }
.settings-section.is-active-settings { display: block; }
#dashboard-settings, #output-settings { margin-bottom: 14px; }
.widget-settings-list { display: grid; gap: 16px; }
.widget-group { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.widget-group-heading { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 10px 12px; background: #e8edf1; }
.widget-group-heading strong, .widget-group-heading small { display: block; }
.widget-group-heading small { margin-top: 3px; color: var(--muted); font-size: 0.78rem; }
.widget-group-heading .primary-button { flex: none; }
.widget-group-list { background: var(--surface); }
.widget-setting-row { display: grid; grid-template-columns: 36px minmax(210px, 1fr) 112px 72px minmax(180px, auto) 104px; align-items: center; gap: 10px; min-height: 76px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.widget-setting-row:last-child { border-bottom: 0; }
.widget-setting-row.is-highlighted { outline: 3px solid rgba(7, 94, 168, 0.2); background: var(--blue-soft); }
.widget-setting-row.is-dragging { opacity: 0.45; }
.widget-setting-row.is-drag-target { box-shadow: inset 0 3px 0 var(--blue); }
.widget-setting-row strong, .widget-setting-row small { display: block; }
.widget-setting-row small { margin-top: 3px; color: var(--muted); }
.drag-handle { display: grid; place-items: center; width: 28px; height: 34px; border: 1px solid var(--border); border-radius: 3px; color: var(--muted); background: var(--gray-bg); font-weight: 900; cursor: grab; }
.size-label { color: var(--muted); font-size: 0.8rem; text-align: center; }
.widget-size { color: var(--muted); font-size: 0.75rem; }
.widget-size select { min-height: 34px; margin-top: 3px; padding: 4px 7px; font-size: 0.82rem; }
.row-move-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.widget-row-actions { display: flex; align-items: center; gap: 7px; }
.widget-setting-row .row-move-buttons,
.widget-setting-row > .widget-row-actions,
.widget-setting-row > .switch { margin-top: 17px; }
.widget-row-actions .danger-text-button { min-height: 32px; font-size: 0.8rem; }
.icon-button { min-height: 34px; padding: 3px; border: 1px solid var(--border-dark); border-radius: 3px; background: #f5f6f7; cursor: pointer; font-weight: 900; }
.icon-button:hover:not(:disabled) { color: var(--blue); background: var(--blue-soft); }
.icon-button:disabled { color: #98a3aa; cursor: default; opacity: 0.55; }
.channel-settings { display: grid; gap: 8px; }
.channel-row { display: grid; grid-template-columns: 74px minmax(160px, 1fr) 160px 104px; align-items: start; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-alt); }
.channel-identity { align-self: center; }
.channel-identity strong, .channel-identity small { display: block; }
.channel-identity strong { font-size: 0.95rem; }
.channel-identity small { margin-top: 4px; color: var(--muted); font-size: 0.78rem; }
.channel-row.is-disabled { background: #e8ecef; }
.channel-row.is-disabled label { opacity: 0.65; }
.system-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); align-items: start; gap: 14px; }
.system-settings-grid label > small { display: block; margin-top: 5px; color: var(--muted); font-size: 0.78rem; }
#shared-password-field[hidden] { display: none; }
.settings-field { display: grid; align-content: start; justify-items: start; }
.field-label { color: #394954; font-size: 0.875rem; font-weight: 700; }
.settings-aside { display: grid; align-content: start; gap: 14px; }
.compact-panel > h2 { margin: 0 0 16px; }
.help-text { margin: 12px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch-row strong, .switch-row small { display: block; }
.switch-row small { margin-top: 3px; color: var(--muted); font-size: 0.8rem; }
.switch { display: inline-flex; align-self: start; align-items: center; gap: 8px; min-width: 96px; min-height: 34px; margin-top: 6px; padding: 2px 0; border: 0; border-radius: 4px; color: #5d6870; background: transparent; cursor: pointer; font-size: 0.82rem; font-weight: 800; }
.switch::before { min-width: 3em; content: attr(data-off-label); text-align: right; }
.switch > span { position: relative; display: block; width: 46px; height: 26px; flex: none; border: 1px solid #7d8a93; border-radius: 99px; background: #aeb8bf; transition: background 140ms ease; }
.switch > span::after { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 2px rgba(0,0,0,.3); content: ""; transition: transform 140ms ease; }
.switch.is-on { color: #075d31; }
.switch.is-on::before { content: attr(data-on-label); }
.switch.is-on > span { border-color: #176a40; background: var(--green); }
.switch.is-on > span::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid rgba(7, 94, 168, 0.2); outline-offset: 2px; }
.switch:disabled { cursor: not-allowed; opacity: 0.55; }
.heartbeat-settings { display: grid; grid-template-columns: minmax(300px, 1.5fr) minmax(104px, 0.35fr) repeat(2, minmax(140px, 0.55fr)); align-items: start; gap: 16px; padding: 14px; background: var(--surface-alt); }
.heartbeat-copy { padding-top: 2px; }
.heartbeat-settings small { display: block; }
.heartbeat-settings small { margin-top: 4px; color: var(--muted); }
.output-function { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.output-function + .output-function { margin-top: 24px; }
.output-function-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 12px; background: #e8edf1; }
.output-function-head h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.rule-row { display: grid; grid-template-columns: minmax(280px, 1fr) 70px 104px 66px; align-items: center; gap: 12px; min-height: 64px; padding: 9px 12px; border-top: 1px solid var(--border); }
.rule-row strong, .rule-row small { display: block; }
.rule-row small { margin-top: 3px; color: var(--muted); }
.rule-row > .switch { margin-top: 0; }
.empty-rule-list { margin: 0; padding: 18px 12px; color: var(--muted); }
.settings-save-bar { position: sticky; bottom: 10px; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border-dark); border-radius: var(--radius); background: rgba(255, 255, 255, 0.96); box-shadow: 0 5px 18px rgba(24, 40, 52, 0.14); }
.settings-save-bar span { color: var(--muted); font-size: 0.875rem; }

.health-pill { padding: 8px 12px; border: 1px solid; border-radius: 4px; font-weight: 800; }
.health-pill.warning { color: var(--amber); border-color: #d6ad55; background: var(--amber-bg); }
.health-pill.critical { color: var(--red); border-color: var(--red); background: var(--red-bg); }
.diagnostic-summary { display: flex; gap: 16px; margin-bottom: 14px; padding: 16px; border-left: 6px solid var(--green); background: var(--green-bg); }
.diagnostic-summary strong { color: #075d31; }
.diagnostic-summary span { color: #365d47; }
.diagnostic-warning { display: flex; gap: 16px; margin-bottom: 14px; padding: 16px; border: 1px solid #d6ad55; border-left: 6px solid #d28700; border-radius: var(--radius); background: var(--amber-bg); }
#system-notices[hidden], #system-notices [hidden], .diagnostic-warning[hidden], .health-pill[hidden] { display: none; }
.diagnostic-warning strong { color: #714600; }
.diagnostic-warning span { color: #6e572d; }
.diagnostic-warning--critical { border-color: var(--red); border-left-color: var(--red); background: var(--red-bg); }
.diagnostic-warning--critical strong, .diagnostic-warning--critical span { color: var(--red); }
.diagnostic-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 14px; }
.update-panel { margin-top: 14px; }
.update-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#update-panel button:disabled { color: var(--muted); border-color: var(--border); background: var(--gray-bg); cursor: not-allowed; }
.update-versions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.update-versions > div { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-alt); }
.update-versions dt { color: var(--muted); font-size: 0.8rem; }
.update-versions dd { margin: 5px 0 0; overflow-wrap: anywhere; font-weight: 800; }
.update-status, .update-message { margin: 12px 0 0; line-height: 1.55; overflow-wrap: anywhere; }
.update-status { color: var(--muted); font-size: 0.85rem; }
.update-notes { max-height: 280px; margin: 12px 0 0; padding: 12px; overflow: auto; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-alt); white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 0.85rem; }
.health-overview { grid-row: span 2; }
.health-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 53px; border-bottom: 1px solid var(--border); }
.health-item:last-child { border-bottom: 0; }
.health-item > span { color: var(--muted); }
.health-value { display: flex; align-items: center; gap: 8px; text-align: right; }
.health-value::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.health-value.warning { color: var(--amber); }
.health-value.warning::before { background: #d28700; }
.health-value.critical { color: var(--red); }
.health-value.critical::before { background: var(--red); }
.io-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.io-cell { padding: 10px 4px; border: 1px solid var(--border); border-radius: 4px; background: #f3f5f6; text-align: center; }
.io-cell strong, .io-cell small { display: block; }
.io-cell strong { color: var(--muted); font-size: 0.75rem; }
.io-cell small { margin-top: 6px; font-size: 0.78rem; font-weight: 900; }
.io-cell.is-on { border-color: #79a9cf; background: var(--blue-soft); }
.io-cell.is-on small { color: var(--blue-dark); }
.io-cell.is-off small { color: #35434c; }
.io-cell.is-unknown { background: #e5e9ec; }
.io-cell.is-unknown small { color: #5e6971; }
.maintenance-state { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 13px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-alt); }
.safety-note { display: inline-block; margin: 0 0 12px; padding: 6px 9px; border-left: 3px solid var(--amber); color: #6c4500; background: var(--amber-bg); font-weight: 800; }
.maintenance-state strong, .maintenance-state small { display: block; }
.maintenance-state small { margin-top: 4px; color: var(--muted); font-size: 0.8rem; }
.output-tests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.test-button { min-height: 40px; border: 1px solid var(--border); border-radius: 4px; background: #e9edef; color: #78858d; font-weight: 700; }
.test-button:not(:disabled) { color: #25343d; background: #ffffff; cursor: pointer; }
.test-button.is-testing { color: #ffffff; border-color: var(--green); background: var(--green); }

dialog { width: min(520px, calc(100% - 28px)); max-height: calc(100vh - 28px); overflow: auto; padding: 0; border: 1px solid var(--border-dark); border-radius: var(--radius); color: var(--text); background: #ffffff; box-shadow: 0 20px 60px rgba(0,0,0,.28); }
dialog [hidden] { display: none; }
dialog::backdrop { background: rgba(20, 28, 34, 0.55); }
dialog form { padding: 24px; }
.dialog-icon { margin-bottom: 14px; }
dialog h2 { margin: 0; font-size: 1.2rem; }
dialog p { margin: 12px 0 22px; color: var(--muted); line-height: 1.65; white-space: pre-line; }
dialog label { display: block; margin-top: 14px; }
dialog .checkbox-label { display: flex; align-items: center; gap: 9px; }
dialog .checkbox-label input { width: 18px; min-height: 18px; margin: 0; }
.dialog-step { margin-bottom: 8px; color: var(--muted); font-size: 0.8rem; font-weight: 800; }
.widget-step { display: none; min-height: 180px; }
.widget-step.is-active { display: block; }
.widget-step #current-state-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.widget-step #current-state-options[hidden] { display: none; }
#widget-period-field[hidden] { display: none; }
.widget-step .checkbox-label { display: flex; grid-column: 1 / -1; align-items: center; gap: 9px; min-height: 38px; }
.widget-step .checkbox-label input { width: 18px; min-height: 18px; margin: 0; }
.step-help { margin: 12px 0 0; padding: 11px 12px; border-left: 4px solid #72a4ca; color: #385366; background: var(--blue-soft); font-size: 0.9rem; line-height: 1.55; }
.widget-step details { margin-top: 14px; border: 1px solid var(--border); border-radius: 4px; }
.widget-step summary { padding: 10px 12px; color: var(--blue); cursor: pointer; font-weight: 800; }
.detail-fields { display: grid; gap: 10px; padding: 0 12px 12px; }
.detail-fields > label, .detail-fields #widget-list-fields label, .detail-fields #current-state-options label { margin-top: 0; }
.detail-fields #widget-list-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-fields #widget-list-fields[hidden], .detail-fields > label[hidden], .detail-fields > div[hidden] { display: none; }
#current-state-options[hidden], #widget-count-fields[hidden], #widget-last-event-fields[hidden] { display: none !important; }
#widget-count-fields, #widget-last-event-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.channel-checks { margin: 14px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: 4px; }
.channel-checks[hidden] { display: none; }
.channel-checks legend { padding: 0 6px; color: #394954; font-size: 0.875rem; font-weight: 700; }
.channel-checks > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.channel-checks label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px; border: 1px solid var(--border); border-radius: 3px; }
.channel-checks input { width: 18px; min-height: 18px; margin: 0; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.setup-channels { margin: 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: 4px; }
.setup-channel-row { display: grid; grid-template-columns: 112px 1fr 100px; align-items: start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.setup-channel-row:last-child { border-bottom: 0; }
.setup-channel-row .switch { margin-top: 24px; }
.dialog-switch-field { margin-top: 14px; }
.form-error { margin: 14px 0 0; padding: 10px 12px; border-left: 4px solid var(--red); color: #7d1820; background: var(--red-bg); font-weight: 700; }
.form-error[hidden] { display: none; }
.split-actions { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; margin-top: 22px; }
.danger-text-button { min-height: 38px; padding: 6px 2px; border: 0; color: var(--red); background: transparent; cursor: pointer; font-weight: 800; text-decoration: underline; }
.danger-text-button[hidden] { display: none; }
.is-hidden { display: none !important; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; padding: 13px 17px; border: 1px solid #377a59; border-radius: 4px; color: #ffffff; background: #145f38; box-shadow: 0 6px 20px rgba(0,0,0,.22); font-weight: 700; opacity: 0; transform: translateY(8px); pointer-events: none; transition: 160ms ease; }
.toast.is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .status-grid { grid-template-columns: repeat(3, 1fr); }
  .current-state-grid, .period-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .output-status-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-lower, .settings-layout { grid-template-columns: 1fr; }
  .heartbeat-settings { grid-template-columns: 1fr 1fr 1fr; }
  .heartbeat-copy { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .app-header { position: static; }
  .header-main { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; min-height: 68px; padding: 8px 14px; }
  .product-name { grid-column: 1; padding-right: 0; border: 0; color: var(--muted); font-size: 0.78rem; }
  .equipment-name { display: block; grid-column: 1; grid-row: 2; }
  .equipment-name span { display: none; }
  .equipment-name strong { font-size: 1.05rem; }
  .header-right { grid-column: 2; grid-row: 1 / 3; gap: 8px; }
  .system-clock { display: block; min-width: 62px; font-size: 0.8rem; }
  .live-badge { font-size: 0.8rem; }
  .main-nav { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; }
  .nav-item { min-width: 0; min-height: 50px; padding: 8px 2px; border-top: 1px solid var(--border); font-size: 0.75rem; white-space: nowrap; }
  .main-content { padding: 14px 12px 36px; }
  .banner { align-items: flex-start; }
  .banner div { display: block; }
  .banner span { display: block; margin-top: 2px; }
  .banner .text-button { display: none; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .history-heading { align-items: flex-start; flex-wrap: wrap; }
  .period-control { width: 100%; }
  .period-control > span { display: none; }
  .period-button { flex: 1 0 25%; min-width: 0; padding: 10px 5px; }
  .custom-period-fields { grid-template-columns: 1fr 1fr; }
  .custom-period-fields button { grid-column: 1 / -1; }
  .status-grid { grid-template-columns: 1fr; }
  .current-state-grid, .period-summary-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .dashboard-lower { display: block; }
  .dashboard-lower .panel + .panel { margin-top: 14px; }
  .filter-panel { grid-template-columns: 1fr 1fr; }
  .diagnostic-grid { grid-template-columns: 1fr; }
  .health-overview { grid-row: auto; }
  .update-panel .panel-head { display: block; }
  .update-actions { margin-top: 12px; }
  .update-versions { grid-template-columns: 1fr; }
  .diagnostic-summary { display: block; }
  .diagnostic-summary span { display: block; margin-top: 5px; }
  .diagnostic-warning { display: block; }
  .diagnostic-warning span { display: block; margin-top: 5px; }
  .widget-setting-row { grid-template-columns: 32px minmax(0, 1fr) 104px; align-items: center; padding: 10px 6px; }
  .widget-setting-row > .drag-handle { grid-column: 1; grid-row: 1 / 4; }
  .widget-setting-row > div:nth-child(2) { grid-column: 2; grid-row: 1; min-width: 0; }
  .widget-setting-row .widget-size { grid-column: 2; grid-row: 2; }
  .widget-setting-row .row-move-buttons { grid-column: 3; grid-row: 2; }
  .widget-setting-row > .widget-row-actions { grid-column: 2 / 4; grid-row: 3; justify-self: start; margin-top: 0; }
  .widget-setting-row > .switch { grid-column: 3; grid-row: 1; margin-top: 0; }
  .toast { right: 12px; bottom: 12px; left: 12px; text-align: center; }
  .last-event-card { grid-template-columns: 1fr auto; }
}

@media (max-width: 500px) {
  .status-grid { grid-template-columns: 1fr; gap: 7px; }
  .output-status-grid { grid-template-columns: 1fr 1fr; }
  .status-card { min-height: 132px; padding: 11px; }
  .status-value { font-size: 1.35rem; }
  .filter-panel { grid-template-columns: 1fr; }
  .channel-row { grid-template-columns: minmax(0, 1fr) 104px; }
  .channel-row .channel-identity { grid-column: 1; grid-row: 1; }
  .channel-row .channel-use { grid-column: 2; grid-row: 1; }
  .channel-row label:nth-of-type(1) { grid-column: 1 / 3; grid-row: 2; }
  .channel-row label:nth-of-type(2) { grid-column: 1 / 3; grid-row: 3; }
  .io-grid { grid-template-columns: repeat(3, 1fr); }
  .output-tests { grid-template-columns: repeat(2, 1fr); }
  .dashboard-widget-grid > [data-size] { grid-column: span 12; }
  .timeline-axis { grid-template-columns: 120px repeat(5, 1fr); }
  .timeline-row { grid-template-columns: 120px 1fr; }
  #timeline { min-width: 100%; }
  .timeline-legend { margin-left: 74px; }
  .timeline-help { margin-left: 74px; }
  .settings-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .settings-nav button { border-top: 1px solid var(--border); }
  .heartbeat-settings { grid-template-columns: 1fr; }
  .heartbeat-settings > div { grid-column: auto; }
  .rule-row { grid-template-columns: minmax(0, 1fr) 104px; }
  .rule-row > span { grid-column: 1; }
  .rule-row > .switch, .rule-row > [data-edit-rule] { grid-column: 2; }
  .table-summary span { display: none; }
  .page-size-label { margin-left: 0; }
  .table-scroll { overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody { padding: 0 12px; }
  tbody tr {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    grid-template-areas:
      "date signal value"
      ". kind quality";
    align-items: center;
    gap: 5px 10px;
    min-height: 66px;
    margin: 0;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: #ffffff !important;
  }
  tbody tr:last-child { border-bottom: 0; }
  td { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0; border: 0; white-space: nowrap; }
  td::before { content: none; }
  td:nth-child(1) { grid-area: date; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.76rem; }
  td:nth-child(2) { grid-area: signal; overflow: hidden; }
  td:nth-child(2) strong { overflow: hidden; text-overflow: ellipsis; }
  td:nth-child(3) { grid-area: value; justify-self: end; }
  td:nth-child(4) { grid-area: kind; color: var(--muted); font-size: 0.75rem; }
  td:nth-child(5) { grid-area: quality; justify-self: end; font-size: 0.75rem; }
  .kind-label { overflow: hidden; text-overflow: ellipsis; }
  .settings-save-bar { bottom: 6px; justify-content: flex-end; }
  .settings-save-bar span { display: none; }
  .channel-checks > div, .detail-fields #widget-list-fields { grid-template-columns: 1fr; }
  .system-settings-grid, #widget-count-fields, #widget-last-event-fields { grid-template-columns: 1fr; }
  .setup-channel-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

.diagnostic-warning--attention { border-color: var(--border); border-left-color: var(--border-dark); background: var(--surface-alt); }
.diagnostic-warning--attention strong, .diagnostic-warning--attention span, .health-value.attention { color: var(--text); }
.health-value.attention::before { background: #647787; }

#notice-details-link { display: block; margin: 0 0 20px auto; }

#update-progress { display: block; width: 100%; margin: 12px 0; }
#update-progress[hidden] { display: none; }
