:root {
  --text: #111;
  --muted: #616670;
  --line: #dadde3;
  --soft: #f6f7f9;
  --accent: #ffc400;
  --red: #f20d23;
  --blue: #008be8;
  --green: #05b853;
  --orange: #ff8a00;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #f5f5f5;
  font-family: Arial, "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.35;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.site-header {
  background: #fff;
  border-bottom: 1px solid #d7d7d7;
}

.header-inner,
.category-inner,
.page {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.contact-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.contact-icon {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.brand-logo {
  width: auto;
  height: 64px;
  display: block;
  object-fit: contain;
}

.clock {
  justify-self: end;
  display: grid;
  gap: 2px;
  text-align: right;
  font-style: normal;
  font-weight: 900;
}

.clock span { font-size: 18px; }

.category-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f1f1f1;
  border-bottom: 1px solid #cfd2d7;
}

.category-inner {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow-x: auto;
}

.category-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #111;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.category-tab.is-active { color: var(--blue); }

.page { padding: 18px 0 28px; }

.notice-strip,
.search-panel,
.quick-links {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.notice-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 76px;
  color: #ff9a00;
  font-size: 23px;
  font-weight: 900;
  text-align: center;
}

.notice-icon {
  width: auto;
  height: 34px;
  object-fit: contain;
}

.notice-strip a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #178be8;
  font-size: 18px;
}

.notice-strip a img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.primary-address {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 900;
}

.primary-address img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.primary-address span { color: #333; }
.primary-address strong { color: #168de5; }

.search-box {
  width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box span {
  flex: 0 0 auto;
  color: #4c5360;
  font-size: 13px;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #cfd2d7;
  border-radius: 4px;
  background: #fff;
}

.quick-links {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 12px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 900;
}

.quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-links img {
  width: auto;
  height: 30px;
  display: block;
  object-fit: contain;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.summary-row article {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.summary-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.summary-row strong {
  color: #111;
  font-size: 24px;
  line-height: 1;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

.link-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.card-head {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.card-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 900;
}

.card-title span:first-child {
  flex: 0 0 auto;
  font-size: 25px;
}

.card-title span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hand-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.rank-list {
  display: grid;
  gap: 9px;
  padding: 14px 16px 18px;
  margin: 0;
  list-style: none;
}

.rank-list a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 24px;
  font-weight: 900;
}

.rank-image {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.site-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rank-list li:nth-child(3n + 1) .site-name { color: var(--red); }
.rank-list li:nth-child(3n + 2) .site-name { color: var(--blue); }
.rank-list li:nth-child(3n) .site-name { color: var(--green); }

.empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.site-footer {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 22px 16px 34px;
  color: #777;
  text-align: center;
  font-size: 13px;
}

.site-footer strong { color: #111; }

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 48px;
  height: 34px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: #111;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 1120px) {
  .link-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .header-inner {
    min-height: 94px;
    grid-template-columns: 1fr 1fr;
  }

  .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .contact-link { grid-row: 2; }
  .clock { grid-row: 2; }
  .link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .header-inner,
  .category-inner,
  .page {
    width: min(100% - 20px, 1200px);
  }

  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  body { font-size: 14px; }
  .brand strong { font-size: 29px; }
  .brand-mark { width: 48px; height: 30px; font-size: 12px; }
  .contact-link { font-size: 13px; }
  .brand-logo { height: 56px; }
  .clock strong { font-size: 13px; }
  .clock span { font-size: 16px; }
  .notice-strip { font-size: 19px; }
  .notice-strip a { font-size: 16px; }
  .summary-row,
  .link-grid { grid-template-columns: 1fr; }
}
