:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --panel: #fff9f0;
  --ink: #1f1a14;
  --accent: #d46a1f;
  --muted: #6c6156;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff7ea 0%, #f4e6d5 50%, #efe0d0 100%);
  min-height: 100vh;
  padding: 32px 16px 56px;
}

.wrap {
  width: min(880px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

header h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: 16px;
  color: var(--muted);
  margin: 8px 0 0;
}

nav {
  display: flex;
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

nav a.active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 0;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.home-page .card {
  background: var(--panel);
  border: 1px solid #f1d8bf;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.home-page .intro {
  display: grid;
  gap: 8px;
  line-height: 1.7;
}

.home-page .intro p {
  margin: 0;
}

.home-page .projects {
  display: grid;
  gap: 16px;
}

.home-page .project-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #f1d8bf;
  background: #fffdf9;
}

.home-page .project-card p {
  margin: 0;
}

.home-page .project-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.home-page .project-meta {
  color: var(--muted);
  font-size: 14px;
}

.home-page .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-page a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(212, 106, 31, 0.3);
}

.running-page .card {
  width: 100%;
  background: var(--panel);
  border: 2px solid #f1d8bf;
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.running-page .card::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(212, 106, 31, 0.25), transparent 70%);
  pointer-events: none;
}

.running-page main h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.running-page p {
  margin: 0;
  color: var(--muted);
}

.running-page .actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.running-page button {
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 20px rgba(212, 106, 31, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.running-page button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(212, 106, 31, 0.35);
}

.running-page button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.running-page .field {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.running-page .search-scope {
  display: inline-flex;
  align-items: center;
  background: #fffdf9;
  border: 1px solid #e4cdb7;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.running-page .search-scope input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.running-page .search-scope label {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.running-page .search-scope input[type="radio"]:checked + label {
  background: #ffe7cf;
  color: var(--ink);
}

.running-page input[type="text"] {
  border: 1px solid #e4cdb7;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  min-width: 220px;
  background: #fffdf9;
  color: var(--ink);
}

.running-page .status {
  margin-top: 20px;
  font-weight: 600;
}

.running-page .search-results {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #f1d8bf;
  background: #fffdf9;
}

.running-page #searchResultsList {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.running-page #searchResultsList.expanded {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.running-page .search-result-item {
  text-align: left;
  border: 1px solid #e7cfb8;
  background: #fff8ef;
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}

.running-page .search-result-item:hover {
  background: #fff3e4;
}

.running-page .search-more-btn {
  margin-top: 10px;
  border: 1px solid #e4cdb7;
  background: #fff7ec;
  color: var(--ink);
  box-shadow: none;
}

.running-page .result {
  margin-top: 20px;
  padding: 20px;
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid #f1d8bf;
  display: grid;
  gap: 10px;
}

.running-page .hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff7ec;
  border: 1px solid #f2ddc7;
}

.running-page .hero img {
  width: 64px;
  height: 64px;
}

.running-page .hero .message {
  font-size: 18px;
  font-weight: 700;
}

.running-page .label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.running-page .temp {
  font-size: 32px;
  font-weight: 700;
}

.running-page .meta {
  font-size: 14px;
  color: var(--muted);
}

.running-page .card footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}

.running-page .card footer .source-note {
  margin: 0;
}

.running-page .card footer .disclaimer {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.5;
}

.running-page .ad {
  margin-top: 8px;
  border-radius: 18px;
  border: 1px dashed #e0cbb5;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  background: #fffdf9;
}

@media (max-width: 640px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    flex-wrap: wrap;
  }

  .home-page .actions {
    width: 100%;
  }

  .home-page a.button {
    width: 100%;
  }

  .running-page .actions {
    width: 100%;
  }

  .running-page .search-results {
    width: 100%;
  }

  .running-page .search-scope {
    width: 100%;
    justify-content: space-between;
  }

  .running-page .search-scope label {
    flex: 1;
    text-align: center;
  }

  .running-page button,
  .running-page input[type="text"] {
    width: 100%;
  }

  .running-page .field {
    width: 100%;
  }

  .running-page .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
