:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --ink: #151719;
  --muted: #66706f;
  --line: #ddd8ca;
  --panel: #fffdf8;
  --accent: #c1442e;
  --gold: #f1c84b;
  --green: #2f7d68;
  --blue: #376d9a;
  --shadow: 0 18px 55px rgba(34, 31, 24, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(241, 200, 75, 0.16), transparent 280px),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans KR", sans-serif;
}

button,
input {
  font: inherit;
}

.topbar,
main {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(34, 31, 24, 0.08);
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(16px);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.tab.is-active {
  border-color: #1f2424;
  background: #1f2424;
  color: #fffdf8;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 16px 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary-strip > div {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 14px 18px;
  background: var(--panel);
}

.summary-strip strong {
  font-size: 1.28rem;
}

.summary-strip span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.status {
  margin: 22px 0;
  color: var(--muted);
  font-weight: 800;
}

.status.is-hidden {
  display: none;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 42px;
}

.news-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.image-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #242827;
}

.thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 220ms ease;
}

.news-card:hover .thumb {
  transform: scale(1.035);
}

.source-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(21, 23, 25, 0.82);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 900;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.publisher,
.time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  min-height: 3.25em;
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.36;
  letter-spacing: 0;
}

.summary,
.original {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.summary {
  min-height: 4.6em;
}

.original {
  padding-top: 2px;
  color: #7d7465;
  font-size: 0.83rem;
}

.read-link {
  width: fit-content;
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.read-link:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .topbar,
  main {
    width: min(100% - 24px, 1240px);
  }

  .topbar {
    padding-top: 24px;
  }

  .controls,
  .search {
    display: grid;
  }

  .summary-strip,
  .news-grid {
    grid-template-columns: 1fr;
  }

  h2,
  .summary {
    min-height: 0;
  }
}
