* { box-sizing: border-box; }
body {
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  background: #f8f8f8;
  color: #333;
  margin: 0;
  /* 상단 70px = _nav.html의 고정(fixed) 헤더 높이만큼만 확보. 최상단 배너(.excel-banner-link)가
     gnb 바로 아래 틈 없이 붙도록 하고, 배너 자체의 margin-bottom으로 이후 콘텐츠와의 간격을 둔다. */
  /* 좌우 패딩은 body에 주지 않음: footer가 body의 직계 자식이라 좌우 패딩이 있으면 화면 끝까지 채워지지 않음.
     .container/.hero가 각자 좌우 패딩을 갖고 있으므로 이걸로 충분함 */
  padding: 70px 0 80px;
}
.excel-banner-link {
  display: block;
  width: 100%;
  margin: 0 0 32px;
}
.excel-banner-img {
  display: block;
  width: 100%;
  height: auto;
}
.container {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
h1 { margin-top: 0; }
.desc { color: #555; margin-bottom: 24px; }

.hero {
  max-width: 900px;
  margin: 8px auto 32px;
  padding: 0 20px;
  text-align: center;
}
.hero-title {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.01em;
  color: #1a1a1a;
  margin: 0 0 20px;
}
.hero-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}
.hero-tagline {
  font-family: "Black Han Sans", "Malgun Gothic", sans-serif;
  display: inline-block;
  background: #2582FA;
  color: #fff;
  font-size: 20px;
  padding: 10px 28px;
  border-radius: 999px;
  margin: 24px 0 0;
}

.form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.form-row-double { display: flex; gap: 14px; }
.form-row-double .field { flex: 1; }
.form-row-triple { display: flex; gap: 14px; }
.form-row-triple .field { flex: 1; }

.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #f4f4f4;
  border: 1.5px solid transparent;
  border-radius: 16px;
  padding: 10px 16px 11px;
  cursor: text;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #8a90a3;
  letter-spacing: -0.01em;
}
.field input {
  border: none;
  background: transparent;
  outline: none;
  padding: 0;
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}
.field input::placeholder { color: #b6bac6; font-weight: 400; }
.field:focus-within {
  background: #fff;
  border-color: #2582FA;
  box-shadow: 0 0 0 4px rgba(37, 130, 250, 0.12);
}

button {
  padding: 12px 22px;
  background: #2582FA;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.15s ease, transform 0.05s ease;
}
button:hover { background: #1e68c8; }
button:active { transform: scale(0.98); }
.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  padding: 12px 16px;
  border-radius: 0.5rem;
  margin-bottom: 16px;
}
.back { display: inline-block; margin-bottom: 20px; color: #2582FA; text-decoration: none; }
.card {
  border: none;
  border-radius: 0.5rem;
  padding: 20px;
  margin-bottom: 20px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.card h2 { margin-top: 0; font-size: 18px; }
.ai-summary-card { background: #f8f9fa; }
.ai-summary-text { line-height: 1.6; color: #333; white-space: pre-wrap; margin-bottom: 0; }
.count { font-size: 15px; }
.note { color: #dc3545; font-size: 12px; }
.form-hint { color: #999; font-size: 12px; margin: 8px 0 0; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid #eee; font-size: 14px; }
th { color: #777; font-weight: 500; }
td a { color: #222; text-decoration: none; }
td a:hover { text-decoration: underline; }
.empty { color: #888; }
.score-grid { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.score-tile {
  flex: 1;
  min-width: 120px;
  background: #f8f9fa;
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}
.score-tile-total { background: #eaf2fe; }
.score-label { font-size: 13px; color: #777; margin-bottom: 6px; }
.score-value { font-size: 28px; font-weight: 600; color: #222; }
.score-tile-total .score-value { color: #2582FA; }
.score-max { font-size: 14px; font-weight: 400; color: #999; margin-left: 2px; }
.diff-up { color: #03c75a; }
.score-coming-soon { color: #999; font-size: 13px; }
.diff-down { color: #dc3545; }
.dual-row { display: flex; gap: 20px; align-items: stretch; }
.dual-row > .card { flex: 1; min-width: 0; margin-bottom: 20px; }
.dual-row .score-grid { flex-wrap: nowrap; }
.dual-row .score-tile { min-width: 0; padding: 12px 8px; }
.news-list-card table { table-layout: fixed; }
.news-list-card .col-date { width: 100px; white-space: nowrap; }
.news-list-card .col-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .dual-row { flex-direction: column; }
  .comic-panel { flex-direction: column; }
  .speech-bubble::before, .speech-bubble::after { display: none; }
  .form-row-double { flex-direction: column; }
  .form-row-triple { flex-direction: column; }
}

.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.85);
}
.loading-overlay.is-active { display: flex; }
.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #dfe3ec;
  border-top-color: #2582FA;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-text { color: #555; font-size: 15px; font-weight: 600; margin: 0; }
.loading-subtext { color: #777; font-size: 13px; margin: 0; }
.realtime-link { color: #1a73e8; text-decoration: underline; }
@keyframes spin {
  to { transform: rotate(360deg); }
}
