:root {
  --green: #03c75a;
  --green-dark: #02a84c;
  --text: #222;
  --muted: #767678;
  --line: #e3e5e8;
  --bg: #f5f6f7;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p, h2 { margin: 0; }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1130px;
  margin: 0 auto;
  padding: 0 16px;
}

/* header */
.header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 28px;
}
.logo {
  color: var(--green);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.search {
  display: flex;
  flex: 0 1 620px;
  min-width: 0;
  height: 56px;
  border: 2px solid var(--green);
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
}
.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 24px;
  font-size: 18px;
  font-family: inherit;
  background: transparent;
}
.search-btn {
  width: 60px;
  border: 0;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-btn:hover { background: var(--green-dark); }

/* services */
.services { margin-top: 20px; }
.service-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 4px;
}
.service-list a {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  gap: 6px;
  font-size: 13px;
}
.svc-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: border-color .15s;
}
.service-list a:hover .svc-icon { border-color: var(--green); }

/* layout */
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 40px;
}
.col-main, .col-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 18px; }
.more { color: var(--muted); font-size: 13px; }

/* news */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--muted);
}
.tab.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.news-list li { border-top: 1px solid #f0f1f3; }
.news-list li:first-child { border-top: 0; }
.news-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.news-list a:hover .headline { text-decoration: underline; }
.headline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.press { color: var(--muted); font-size: 12px; flex-shrink: 0; }

/* shopping */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.thumb {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  margin-bottom: 8px;
}
.p-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-price { font-size: 13px; }
.p-price b { font-size: 15px; }
.product:hover .p-name { text-decoration: underline; }

/* login */
.login { background: #f8f9fa; }
.login-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.login-btn {
  display: block;
  text-align: center;
  background: var(--green);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 14px 0;
  border-radius: 8px;
}
.login-btn:hover { background: var(--green-dark); }
.login-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.login-links span { color: var(--line); }

/* clock */
.clock { text-align: center; }
.clock-date { color: var(--muted); font-size: 13px; }
.clock-time { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; }

/* weather */
.weather-top { display: flex; align-items: center; gap: 12px; }
.weather-icon { font-size: 44px; }
.weather-temp { font-size: 28px; font-weight: 700; }
.weather-desc { font-size: 13px; color: var(--muted); }
.weather-loc { margin-top: 8px; font-size: 13px; }
.weather-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f1f3;
  font-size: 13px;
  color: var(--muted);
}
.weather-meta b { color: var(--text); }
.weather-meta .good { color: #2b7fff; }

/* footer */
.footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: #555;
}
.copyright { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* responsive */
@media (max-width: 1023px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .col-side { order: -1; }
}

@media (max-width: 600px) {
  .header-inner { flex-direction: column; gap: 14px; padding-top: 24px; padding-bottom: 20px; }
  .logo { font-size: 30px; }
  .search { flex: none; width: 100%; height: 50px; }
  .search-input { font-size: 16px; padding: 0 18px; }
  .service-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .service-list a { width: auto; font-size: 12px; }
  .svc-icon { width: 44px; height: 44px; font-size: 22px; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { padding: 16px; }
}
