:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fbfbfc;
  --text: #1f2328;
  --text-muted: #667085;
  --line: #e6e8eb;
  --line-soft: #f0f1f3;
  --green: #0f8f6f;
  --yellow: #b97812;
  --yellow-soft: #fff0bd;
  --red: #c83f32;
  --red-soft: #ffe4df;
  --unknown: #dfe3e8;
  --focus-ring: rgba(34, 197, 158, 0.32);
  --shadow: 0 1px 2px rgba(20, 24, 31, 0.05), 0 10px 28px rgba(20, 24, 31, 0.05);
  --tooltip-shadow: 0 14px 40px rgba(20, 24, 31, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
    "Malgun Gothic", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #111318;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.brand strong {
  overflow-wrap: anywhere;
  font-size: 25px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
}

.brand em {
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 520;
  line-height: 1.25;
}

.refresh-button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: #25262d;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 640;
  white-space: nowrap;
  transition: background 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.refresh-button:hover {
  background: #111318;
}

.refresh-button:active {
  transform: translateY(1px);
}

.refresh-button:disabled {
  cursor: progress;
  opacity: 0.58;
}

.refresh-button:focus-visible,
.segment-button:focus-visible,
.history-link:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.notice,
.status-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notice {
  margin-bottom: 24px;
}

.notice-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.notice.checking .notice-banner {
  background: var(--surface-soft);
}

.notice.ok .notice-banner {
  background: #ecfdf8;
}

.notice.warn .notice-banner {
  background: var(--yellow-soft);
}

.notice.down .notice-banner {
  background: var(--red-soft);
}

.state-symbol {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--unknown);
}

.notice.ok .state-symbol {
  background: var(--green);
}

.notice.warn .state-symbol {
  border-radius: 3px;
  background: var(--yellow);
  clip-path: polygon(50% 4%, 96% 92%, 4% 92%);
}

.notice.down .state-symbol {
  background: var(--red);
}

.state-symbol::after {
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  background: #ffffff;
  content: "";
}

.notice.warn .state-symbol::after {
  inset: auto;
  top: 7px;
  left: 8px;
  width: 2px;
  height: 6px;
  border-radius: 1px;
}

.notice h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.35;
  word-break: keep-all;
}

.notice-body {
  padding: 18px;
}

.notice p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 450;
  line-height: 1.6;
  word-break: keep-all;
}

.notice-meta {
  margin-top: 8px !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
}

.board-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.board-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 520;
}

.date-range span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-list {
  display: grid;
}

.service-row {
  display: grid;
  gap: 9px;
  padding: 18px;
}

.service-row + .service-row {
  border-top: 1px solid var(--line-soft);
}

.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.service-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.service-status-icon {
  position: relative;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--unknown);
}

.service-row.ok .service-status-icon {
  background: var(--green);
}

.service-row.warn .service-status-icon {
  border-radius: 3px;
  background: var(--yellow);
  clip-path: polygon(50% 4%, 96% 92%, 4% 92%);
}

.service-row.down .service-status-icon {
  background: var(--red);
}

.service-status-icon::after {
  position: absolute;
  top: 5px;
  left: 4px;
  width: 7px;
  height: 4px;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  transform: rotate(-45deg);
  content: "";
}

.service-row.warn .service-status-icon::after {
  top: 7px;
  left: 7px;
  width: 2px;
  height: 6px;
  border: 0;
  border-radius: 1px;
  background: #ffffff;
  transform: none;
}

.service-row.down .service-status-icon::after {
  top: 7px;
  left: 4px;
  width: 9px;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: #ffffff;
  transform: none;
}

.service-name {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
}

.service-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 1px solid #c7ccd3;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 740;
  line-height: 1;
}

.component-count {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.service-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg);
}

.history-value {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.service-label {
  display: none;
  margin: -2px 0 0 26px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.availability-strip {
  display: grid;
  grid-template-columns: repeat(90, minmax(2px, 1fr));
  gap: 3px;
  width: 100%;
  min-height: 19px;
}

.segment-button {
  width: 100%;
  min-width: 2px;
  height: 19px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--unknown);
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}

.segment-button:hover,
.segment-button:focus-visible {
  filter: brightness(0.94);
  transform: translateY(-1px);
}

.segment-button.ok {
  background: var(--green);
}

.segment-button.warn {
  background: var(--yellow);
}

.segment-button.down {
  background: var(--red);
}

.segment-button.checking,
.segment-button.unknown {
  background: var(--unknown);
}

.segment-tooltip {
  position: fixed;
  z-index: 30;
  width: min(286px, calc(100vw - 28px));
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--tooltip-shadow);
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.segment-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-date {
  display: block;
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 520;
}

.tooltip-events {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tooltip-events li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  align-items: start;
  color: var(--text);
  font-size: 14px;
  font-weight: 510;
}

.tooltip-event-icon {
  position: relative;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--green);
}

.tooltip-event-icon::after {
  position: absolute;
  top: 5px;
  left: 4px;
  width: 6px;
  height: 4px;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  transform: rotate(-45deg);
  content: "";
}

.tooltip-event-icon.warn {
  border-radius: 3px;
  background: var(--yellow);
  clip-path: polygon(50% 4%, 96% 92%, 4% 92%);
}

.tooltip-event-icon.warn::after,
.tooltip-event-icon.checking::after {
  top: 6px;
  left: 7px;
  width: 2px;
  height: 5px;
  border: 0;
  border-radius: 1px;
  background: #ffffff;
  transform: none;
}

.tooltip-event-icon.down {
  background: var(--red);
}

.tooltip-event-icon.down::after {
  top: 7px;
  left: 4px;
  width: 7px;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: #ffffff;
  transform: none;
}

.tooltip-event-icon.checking {
  background: var(--unknown);
}

.tooltip-event-icon.unknown {
  background: var(--unknown);
}

.tooltip-event-icon.unknown::after {
  top: 6px;
  left: 6px;
  width: 3px;
  height: 3px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  transform: none;
}

.history-action {
  display: flex;
  justify-content: center;
  padding: 24px 0 28px;
}

.history-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(20, 24, 31, 0.04);
  font-size: 14px;
  font-weight: 570;
}

.policy {
  padding: 18px 0 0;
  color: var(--text-muted);
  text-align: center;
}

.policy h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.policy p {
  max-width: 620px;
  margin: 7px auto 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 450;
  line-height: 1.6;
  word-break: keep-all;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 720px);
    padding-top: 24px;
  }

  .brand strong {
    font-size: 22px;
  }

  .refresh-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }

  .notice-banner,
  .notice-body,
  .board-head,
  .service-row {
    padding-right: 15px;
    padding-left: 15px;
  }

  .availability-strip {
    grid-template-columns: repeat(90, minmax(1px, 1fr));
    gap: 2px;
  }
}

@media (max-width: 520px) {
  .shell {
    width: calc(100% - 22px);
    padding-top: 18px;
  }

  .page-header {
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 18px;
  }

  .brand strong {
    font-size: 19px;
  }

  .brand em {
    font-size: 12px;
  }

  .refresh-button {
    min-width: 42px;
    padding: 0 10px;
    color: transparent;
    font-size: 0;
  }

  .refresh-button::before {
    color: #ffffff;
    font-size: 13px;
    content: "새로고침";
  }

  .notice h1 {
    font-size: 16px;
  }

  .notice p {
    font-size: 14px;
  }

  .board-head {
    display: grid;
    gap: 8px;
  }

  .date-range {
    font-size: 13px;
  }

  .service-head {
    display: grid;
    gap: 6px;
  }

  .service-title {
    max-width: 100%;
  }

  .service-name {
    font-size: 15px;
  }

  .component-count,
  .history-value {
    font-size: 13px;
  }

  .service-label {
    display: block;
  }

  .availability-strip {
    gap: 1px;
  }

  .segment-button {
    min-width: 1px;
    height: 18px;
  }
}
