/* Ronnie Kim Books — v1.21 hub styles (Paper & Ink).
   Top bar, home (5 sections), book list, footer, and the 자료실 (Resources) page.
   Tokens live in style.css (:root). */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(8px);
}

.topbar-inner {
  display: flex;
  gap: 8px 32px;
  align-items: center;
  max-width: 1120px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar-brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.topbar-nav {
  display: flex;
  flex: 1;
  gap: 4px;
}

.topbar-nav a {
  position: relative;
  padding: 20px 12px;
  color: var(--ink-2);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.topbar-nav a:hover {
  color: var(--ink);
}

.topbar-nav a[aria-current="page"] {
  color: var(--ink);
}

.topbar-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  background: var(--brand);
}

.topbar-tools {
  display: flex;
  gap: 6px;
  align-items: center;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--ink-2);
}

.icon-btn:hover {
  background: var(--paper);
  color: var(--ink);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang-toggle a,
.lang-toggle button {
  padding: 5px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.lang-toggle .active,
.lang-toggle [aria-current="true"] {
  background: var(--ink);
  color: #ffffff;
}

/* ---------- section head (shared) ---------- */
.sec {
  margin: 0 0 72px;
}

.sec-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 22px;
}

.sec-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* v1.27: a short brand rule marks where each home section begins */
.home .sec > .wrap > .sec-head h2::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin: 0 0 14px;
  border-radius: 2px;
  background: var(--brand);
}

.sec-head p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}

.sec-head .more {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sec-head .more:hover {
  color: var(--brand);
}

/* ---------- ① featured ----------
   v1.27: the featured area is its own full-width white band, closed by a hairline, so it reads as a separate
   stage from the paper-coloured sections below it. The cover panel keeps its warm tone against the white. */
.feature {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.feature + .sec {
  padding-top: 64px;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: center;
}

.feature-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.feature-eyebrow .pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  letter-spacing: 0.04em;
}

.feature .feature-title {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.03em;
  word-break: keep-all;
}

.feature .lead {
  max-width: 560px;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  word-break: keep-all;
}

.feature .desc {
  max-width: 560px;
  margin: 0 0 28px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}

.feature-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.feature-art {
  position: relative;
  display: grid;
  place-items: center;
  padding: 34px 0;
  border-radius: 20px;
  background: #EFEAE0;
}

.feature-art img {
  display: block;
  width: 232px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 24px 40px rgba(27, 26, 23, 0.22), 0 2px 6px rgba(27, 26, 23, 0.12);
}

.feature-viewport {
  overflow: hidden;
}

.feature-track {
  display: flex;
  transition: transform 1s cubic-bezier(0.45, 0, 0.25, 1); /* SLIDE_MS = 1 s */
  will-change: transform;
}

.feature-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.feature-pager {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 28px;
  color: var(--ink-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.feature-pager[hidden] {
  display: none;
}

.feature-pager span {
  min-width: 40px;
  text-align: center;
}

.feature-pager button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.feature-pager button:hover {
  border-color: var(--ink);
}

/* ---------- book card (home row + list grid) ---------- */
.book-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
}

.bcard {
  display: block;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.bcard-cover {
  position: relative;
  display: block;
  aspect-ratio: 420 / 622;
  margin-bottom: 14px;
  border-radius: 6px;
  background: #EFEAE0;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(27, 26, 23, 0.14), 0 1px 3px rgba(27, 26, 23, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bcard-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bcard:hover .bcard-cover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(27, 26, 23, 0.18), 0 2px 4px rgba(27, 26, 23, 0.1);
}

.bcard-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  vertical-align: 1px;
}

.bcard-badge.is-new {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.bcard-title {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bcard:hover .bcard-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bcard-meta {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
}

/* formats under a cover: 종이책 (green) / 전자책 (amber) — text 6.98 : 1 and 6.65 : 1 on their tints */
.fmt-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.fmt {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.fmt-paper {
  background: #E6F2EC;
  color: #1F5A4A;
}

.fmt-ebook {
  background: #F6EEDC;
  color: #6B4E1F;
}

.lrow .fmt-pills {
  margin: 0 0 10px;
}

/* ---------- ③ series band (the one dark area) ---------- */
.series-band {
  margin: 0 0 72px;
  padding: 56px 0 60px;
  background: var(--night);
  color: #ffffff;
}

.series-band .sec-head h2 {
  color: #ffffff;
}

.series-band .sec-head p {
  color: #C9CDD4;
}

.series-band .sec-head .more {
  color: #E5E7EB;
}

.series-band .sec-head .more:hover {
  color: #ffffff;
}

.series-eyebrow {
  margin: 0 0 8px;
  color: #9CA3AF;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.series-tracks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 0 0 30px;
  color: #C9CDD4;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.series-tracks b {
  margin-right: 8px;
  color: #ffffff;
}

.series-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.series-row .bcard {
  color: #ffffff;
}

.series-row .bcard-cover {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

.series-code {
  display: block;
  margin: 0 0 4px;
  padding-top: 8px;
  border-top: 3px solid var(--sc, #9CA3AF);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.series-row .bcard-title {
  color: #E5E7EB;
  font-size: 14px;
  font-weight: 500;
}

.series-row .bcard-meta {
  color: #9CA3AF;
}

/* ---------- ④ categories (bento) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, auto);
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tile:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.tile.is-wide {
  grid-row: span 2;
}

.tile h3 {
  margin: 0 0 2px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.tile .count {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.tile-covers {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.tile-covers img {
  width: 54px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(27, 26, 23, 0.16);
}

.tile.is-wide .tile-covers img {
  width: calc((100% - 20px) / 3);
  max-width: 118px;
}

.tile.is-all {
  justify-content: center;
  background: var(--paper);
  border-style: dashed;
}

.tile.is-all h3 {
  color: var(--brand);
}

/* ---------- ⑤ resources strip ---------- */
.res-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.res-strip > div {
  min-width: 0;
}

.res-strip h2 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.res-strip > div > p {
  margin: 0 0 18px;
  color: var(--ink-2);
}

.res-search {
  display: flex;
  gap: 8px;
}

.res-search input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.res-search input:focus {
  border-color: var(--brand);
  background: var(--surface);
  outline: none;
}

.res-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.res-list-title {
  margin: 0 0 8px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.res-list li + li {
  border-top: 1px solid var(--line);
}

.res-list a {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 2px;
  color: var(--ink);
  text-decoration: none;
}

.res-list a:hover .res-name {
  color: var(--brand);
}

.res-code {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.res-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.res-kinds {
  color: var(--ink-3);
  font-size: 13px;
  white-space: nowrap;
}

.res-more {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}

/* ---------- footer ---------- */
.site-foot {
  margin-top: 88px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.foot-brand strong {
  display: block;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 16px;
}

.foot-brand p {
  margin: 0;
  max-width: 380px;
}

.foot-col h3 {
  margin: 0 0 10px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.foot-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-col li {
  margin: 0 0 8px;
}

.foot-col a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-2);
  text-decoration: none;
}

.foot-col a:hover {
  color: var(--ink);
}

.foot-col svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.foot-copy {
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

.foot-copy p {
  margin: 0 0 4px;
}

/* ---------- book list page (/ko/books/) ---------- */
.page-head {
  padding: 40px 0 8px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 36px;
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 0;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 26px 0 20px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.cat-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.cat-cell small {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.cat-cell:hover {
  background: var(--paper);
}

.cat-cell[aria-pressed="true"] {
  box-shadow: inset 3px 0 0 var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
}

.cat-cell[aria-pressed="true"] small {
  color: var(--brand);
}

.list-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.list-tools input[type="search"] {
  flex: 1 1 240px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.list-tools select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.seg button {
  height: 40px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.seg button:last-child {
  border-right: 0;
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: #ffffff;
}

.seg svg {
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.list-count {
  margin: 0 0 22px;
  color: var(--ink-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 28px;
}

.list-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lrow {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.lrow .bcard-cover {
  margin: 0;
}

.lrow h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.lrow h3 a {
  color: var(--ink);
  text-decoration: none;
}

.lrow h3 a:hover {
  color: var(--brand);
}

.lrow .lmeta {
  margin: 0 0 8px;
  color: var(--ink-3);
  font-size: 13px;
}

.lrow .ldesc {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.badges a,
.badges span {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.badges a {
  border-color: var(--brand);
  color: var(--brand);
}

.badges a:hover {
  background: var(--brand-tint);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 44px 0 0;
}

.pager button {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.pager button[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.pager button:disabled {
  color: var(--ink-3);
  cursor: default;
}

.list-empty {
  padding: 48px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- shared buttons ---------- */
.dl-btn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--brand);
  border-radius: 9px;
  background: var(--brand);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.dl-btn:hover,
.dl-btn:focus-visible {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
}

.dl-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dl-btn small {
  color: #D6DDF0;
  font-size: 12px;
  font-weight: 700;
}

.dl-btn.is-outline {
  border: 1px solid var(--brand);
  background: var(--surface);
  color: var(--brand);
}

.dl-btn.is-outline small {
  color: #6b7280;
}

.dl-btn.is-outline:hover {
  background: var(--brand-tint);
}

.dl-pending {
  display: inline-block;
  padding: 6px 10px;
  border: 1px dashed #d1d5db;
  border-radius: 9px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

/* ---------- Download Center page ---------- */
.dl-hero {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 40px 24px 34px;
}

.dl-hero-inner {
  max-width: 1072px;
  margin: 0 auto;
}

.dl-kicker {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.dl-hero h1 {
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.dl-hero .dl-lead {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 17px;
}

.dl-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  color: var(--ink-2);
  font-size: 14px;
  list-style: none;
}

.dl-stats strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.dl-main {
  max-width: 1120px;
  margin: 34px auto 0;
  padding: 0 24px;
}

.dl-howto {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.dl-howto li {
  position: relative;
  padding: 16px 16px 16px 58px;
  border: 1px solid #E5E0D6;
  border-radius: 14px;
  background: #ffffff;
  counter-increment: step;
}

.dl-howto li::before {
  content: counter(step);
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
}

.dl-howto strong {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
}

.dl-howto span {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.dl-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: 0 0 24px;
}

.dl-search {
  flex: 1 1 260px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  font-size: 15px;
}

.dl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dl-filter {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.dl-filter:hover {
  border-color: var(--ink);
}

.dl-filter[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.dl-group {
  margin: 0 0 40px;
}

.dl-group > h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.dl-group > p {
  margin: 0 0 16px;
  color: #4b5563;
}

.dl-table {
  border: 1px solid #E5E0D6;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.dl-head,
.dl-row {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) repeat(3, minmax(0, 1fr));
  gap: 0 16px;
  align-items: center;
  padding: 16px 20px;
}

.dl-head {
  padding-top: 11px;
  padding-bottom: 11px;
  background: #F1EEE7;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dl-row {
  position: relative;
  border-top: 1px solid #E5E0D6;
  scroll-margin-top: 20px;
}

.dl-row::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--accent, transparent);
}

.dl-row.is-target {
  background: #fffbeb;
  box-shadow: inset 0 0 0 2px #f59e0b;
}

.dl-row.is-muted .dl-item img {
  opacity: 0.85;
}

.dl-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
}

.dl-item img {
  width: 64px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.14);
}

.dl-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #F1EEE7;
  color: #374151;
}

.dl-icon svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dl-code {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 4px;
}

.dl-code .code {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent, var(--ink));
  color: #1f1300;
  font-size: 12px;
  font-weight: 800;
}

.dl-code .cap {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.dl-status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.dl-status.is-available {
  background: #dcfce7;
  color: #166534;
}

.dl-status.is-coming {
  background: #fef3c7;
  color: #92400e;
}

.dl-status.is-planned {
  background: #e0e7ff;
  color: #3730a3;
}

.dl-item h3 {
  margin: 0 0 2px;
  font-size: 16px;
  line-height: 1.45;
}

.dl-item .dl-robot {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}

.dl-item .dl-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.dl-item .dl-links a {
  color: var(--brand);
  text-decoration: none;
}

.dl-item .dl-links a:hover {
  text-decoration: underline;
}

.dl-file {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.dl-file.is-span {
  grid-column: span 3;
}

.dl-file-label {
  display: none;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.dl-file small.dl-note {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}

.dl-extras {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-left: 78px;
}

.dl-extras a {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.dl-extras a:hover {
  text-decoration: underline;
}

.dl-empty {
  padding: 28px;
  border: 1px solid #E5E0D6;
  border-radius: 14px;
  background: #FAF8F4;
  color: #374151;
  font-weight: 800;
  text-align: center;
}

.dl-panel {
  margin: 0 0 32px;
  padding: 22px 24px;
  border: 1px solid #E5E0D6;
  border-radius: 14px;
  background: #ffffff;
}

.dl-panel h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.dl-panel p,
.dl-panel li {
  color: #374151;
}

.dl-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.dl-hash-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 13px;
}

.dl-hash-table th,
.dl-hash-table td {
  padding: 8px 10px;
  border-top: 1px solid #E5E0D6;
  text-align: left;
  vertical-align: top;
}

.dl-hash-table code {
  font-size: 12px;
  word-break: break-all;
}

.dl-hash-table td:nth-child(2) {
  white-space: nowrap;
}

/* ---------- footer channels on the download center (same look as home) ---------- */
.dl-page .site-footer {
  margin-top: 40px;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .book-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .book-row .bcard:nth-child(5) {
    display: none;
  }

  .series-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 32px;
  }

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

@media (max-width: 900px) {
  .dl-howto {
    grid-template-columns: 1fr;
  }

  .dl-head {
    display: none;
  }

  .dl-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .dl-item {
    grid-column: 1 / -1;
  }

  .dl-file-label {
    display: block;
  }

  .dl-file.is-span .dl-file-label {
    display: none;
  }

  .dl-extras {
    padding-left: 0;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
  }

  .feature .feature-title {
    font-size: 36px;
  }

  .res-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

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

@media (max-width: 700px) {
  .wrap {
    padding: 0 18px;
  }

  .topbar-inner {
    flex-wrap: wrap;
    gap: 0 12px;
    min-height: 0;
    padding: 10px 18px 0;
  }

  .topbar-brand {
    flex: 1;
    font-size: 17px;
  }

  .topbar-nav {
    order: 3;
    flex-basis: 100%;
    margin: 0 -12px;
  }

  .topbar-nav a {
    padding: 12px 12px 13px;
    font-size: 15px;
  }

  .feature {
    padding: 32px 0 32px;
  }

  .feature + .sec {
    padding-top: 44px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .feature-art {
    order: -1;
    padding: 26px 0;
  }

  .feature-art img {
    width: 170px;
  }

  .feature .feature-title {
    font-size: 28px;
  }

  .feature .lead {
    font-size: 17px;
  }

  .feature-pager {
    margin-top: 20px;
  }

  .sec {
    margin-bottom: 56px;
  }

  .sec-head h2,
  .res-strip h2 {
    font-size: 22px;
  }

  .book-row,
  .series-row {
    display: flex;
    gap: 16px;
    margin: 0 -18px;
    padding: 0 18px 6px;
    overflow-x: auto;
    scroll-padding: 0 18px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .book-row::-webkit-scrollbar,
  .series-row::-webkit-scrollbar {
    display: none;
  }

  .book-row .bcard,
  .series-row .bcard {
    flex: 0 0 40%;
    scroll-snap-align: start;
  }

  .book-row .bcard:nth-child(5) {
    display: block;
  }

  .series-band {
    padding: 40px 0 44px;
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 12px;
  }

  .tile {
    padding: 16px;
  }

  .tile.is-wide {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .tile.is-wide .tile-covers img {
    width: 64px;
    max-width: none;
  }

  .tile h3 {
    font-size: 17px;
  }

  .res-strip {
    padding: 22px 18px;
  }

  .res-list a {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .res-kinds {
    grid-column: 2;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .foot-brand {
    grid-column: 1 / -1;
  }

  .page-head h1,
  .dl-hero h1 {
    font-size: 28px;
  }

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

  .list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }

  .lrow {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 16px;
  }

  .lrow .ldesc {
    display: none;
  }

  .dl-row {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .dl-file {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
  }

  .dl-file-label {
    flex-basis: 100%;
  }

  .dl-hash-table td:nth-child(2) {
    white-space: normal;
  }
}

/* ---------- 1:1 문의 (contact) ---------- */
.pre-check {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 28px;
}

.pre-card {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.pre-card:hover {
  border-color: var(--ink);
}

.pre-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.pre-card strong::after {
  content: " →";
  color: var(--brand);
}

.pre-card span {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.contact-form {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.contact-form[hidden],
.contact-aside[hidden] {
  display: none;
}

.form-notice {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

.form-notice.is-info {
  background: var(--brand-tint);
  color: var(--brand);
}

.form-notice.is-error {
  background: #FDECEC;
  color: var(--alert);
}

.field {
  margin: 0 0 18px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.field-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field label,
.env legend {
  display: block;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.field label b,
.check b,
.req-note b {
  color: var(--alert);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.field textarea {
  min-height: 0;
  line-height: 1.6;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  background: var(--surface);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.field [aria-invalid="true"] {
  border-color: var(--alert);
}

.hint {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}

.err {
  margin: 6px 0 0;
  color: var(--alert);
  font-size: 13px;
  font-weight: 600;
}

.env {
  margin: 0 0 18px;
  padding: 16px 16px 0;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #FAF8F4;
}

.env[hidden] {
  display: none;
}

.env legend {
  padding: 0 6px;
}

.env legend span {
  color: var(--ink-3);
  font-weight: 500;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  margin: 4px 0 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--paper);
  font-size: 14px;
}

.consent-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.consent ul {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--ink-2);
  line-height: 1.7;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 600;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--brand);
}

.check a {
  margin-left: 6px;
  color: var(--brand);
  font-weight: 600;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.submit-row .btn:disabled {
  border-color: var(--line);
  background: var(--line);
  color: var(--ink-3);
  cursor: not-allowed;
}

.req-note {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

.contact-aside {
  position: sticky;
  top: 84px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.contact-aside h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.contact-aside ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}

.contact-aside li + li {
  margin-top: 6px;
}

.sent {
  max-width: 640px;
  padding: 32px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand);
  border-radius: 18px;
  background: var(--surface);
}

.sent:focus {
  outline: none;
}

.sent h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.sent p {
  color: var(--ink-2);
}

.sent dl {
  margin: 16px 0 22px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
}

.sent dt {
  color: var(--ink-3);
  font-size: 13px;
}

.sent dd {
  margin: 2px 0 0;
  font-weight: 600;
}

/* ---------- privacy policy ---------- */
.policy {
  max-width: 820px;
}

.policy-sec {
  margin: 0 0 22px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.policy-sec h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.policy-sec p,
.policy-sec li {
  color: var(--ink-2);
  line-height: 1.75;
}

.policy-sec p {
  margin: 0;
}

.policy-sec ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.policy-sec a,
.foot-copy a {
  color: inherit;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-aside {
    position: static;
  }
}

@media (max-width: 700px) {
  .pre-check {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 20px 16px;
  }

  .field-row,
  .field-row.three {
    grid-template-columns: 1fr;
  }

  .sent {
    padding: 22px 18px;
  }
}
