/* 민세초 디자인: 학교 마크의 초록 테두리·금색 띠·다섯 색 친구를 바탕으로 한 밝은 화면 */
:root {
  color-scheme: light;
  --bg: #fffaf0;
  --surface: #fff;
  --text: #22312c;
  --muted: #6b7772;
  --line: #efe6d4;
  --accent: #00684f;
  --accent-hover: #004f3c;
  --soft: #f4faf6;
  --gold: #f5b21b;
  --pink: #f29ca8;
  --yellow: #f7b431;
  --lime: #8cc63f;
  --navy: #1d2e8c;
  --danger: #b23a3a;
  --shadow: 0 10px 28px rgb(92 70 20 / 7%);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgb(242 156 168 / 16%), transparent 22rem),
    radial-gradient(circle at 95% 12%, rgb(140 198 63 / 14%), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 900px) / 2));
  border-bottom: 3px solid var(--gold);
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--accent); font-size: 1rem; font-weight: 800; text-decoration: none; letter-spacing: -.04em; }
.school-mark { display: block; width: 48px; height: 48px; object-fit: contain; }
.catalog-link { padding: 7px 14px; border: 2px solid #e4efe9; border-radius: 999px; background: var(--soft); color: var(--accent); font-size: .82rem; font-weight: 700; text-decoration: none; }

main { width: min(100% - 40px, 760px); padding: 36px 0 56px; margin: 0 auto; }

.intro {
  position: relative;
  overflow: hidden;
  margin: 0 0 18px;
  padding: 34px 36px 38px;
  border: 4px solid var(--gold);
  border-radius: 28px;
  background: var(--accent);
  box-shadow: 0 16px 36px rgb(0 104 79 / 18%);
  color: #fff;
}
.intro-dots { position: absolute; top: 22px; right: 26px; display: flex; gap: 8px; }
.intro-dots i { display: block; width: 16px; height: 16px; border-radius: 50%; }
.intro-dots i:nth-child(1) { background: var(--pink); }
.intro-dots i:nth-child(2) { background: var(--yellow); }
.intro-dots i:nth-child(3) { background: #fff; }
.intro-dots i:nth-child(4) { background: var(--lime); }
.intro-dots i:nth-child(5) { background: #8d9ae0; }
.eyebrow { margin: 0 0 12px; color: #ffd36b; font-size: .7rem; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 800; letter-spacing: -.06em; line-height: 1.25; }
.intro-copy { max-width: 510px; margin: 13px 0 0; color: rgb(255 255 255 / 86%); font-size: .94rem; }


.panel { margin: 16px 0; padding: 26px 28px 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.section-heading { display: flex; gap: 13px; align-items: flex-start; margin: 0 0 20px; }
.step { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; font-size: .8rem; font-weight: 850; }
.step-pink { background: var(--pink); }
.step-yellow { background: var(--yellow); }
h2 { margin: 3px 0 0; font-size: 1.14rem; font-weight: 800; letter-spacing: -.04em; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: .85rem; }

.form-row { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; margin-top: 13px; }
.form-row[hidden] { display: none; }
label { color: #34443d; font-size: .88rem; font-weight: 700; }
.required { color: var(--danger); }
input, select { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid #e8e1d2; border-radius: 14px; background: #fff; color: var(--text); transition: border-color .18s ease, box-shadow .18s ease; }
input::placeholder { color: #a3aaa6; }
input:focus, select:focus { outline: 0; border-color: var(--lime); box-shadow: 0 0 0 4px rgb(140 198 63 / 20%); }
input:disabled { background: #f8f7f3; color: #8b928e; cursor: not-allowed; }

.reading-guides { margin: 0 0 18px; padding: 15px 16px; border-radius: 16px; background: #fdf3f4; }
.reading-guides > p { margin: 0; color: #7a5a5f; font-size: .82rem; }
.guide-links { display: grid; justify-items: start; gap: 8px; margin-top: 9px; }
.guide-links > a, .criteria summary { padding: 7px 13px; border: 2px solid #f6c7cd; border-radius: 999px; background: #fff; color: #9b4552; font-size: .81rem; font-weight: 750; text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.guide-links > a:hover, .criteria summary:hover { border-color: var(--pink); background: #fff7f8; }
.criteria summary { cursor: pointer; }
.criteria-content { margin-top: 10px; padding: 15px 16px; border: 1px solid #f3dde0; border-radius: 14px; background: #fff; font-size: .83rem; }
.criteria-content h3 { margin: 0 0 8px; color: var(--accent); font-size: .95rem; }
.criteria-content ol { margin: 0; padding-left: 1.4rem; }
.criteria-content > ol > li { font-weight: 700; }
.criteria-content > ol > li + li { margin-top: 7px; }
.criteria-content ol.sub { margin-top: 3px; color: var(--muted); font-weight: 400; list-style-type: hangul; }
.criteria-content ol.sub li + li { margin-top: 2px; }

.holdings-reminder { margin: 0 0 16px; padding: 10px 13px; border-left: 4px solid var(--lime); border-radius: 0 12px 12px 0; background: #f5faee; color: #4d6337; font-size: .79rem; }
.holdings-reminder a { color: var(--accent); font-weight: 750; }

.search-label { display: block; margin-bottom: 8px; }
.search-box { display: flex; gap: 9px; }
.search-box input { flex: 1; }
.btn { min-height: 48px; padding: 9px 18px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 800; transition: background .18s ease, box-shadow .18s ease, transform .18s ease; }
.btn.primary { color: #fff; background: var(--accent); box-shadow: 0 4px 0 #004332; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 #004332; transform: translateY(2px); }
.btn:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, .select-book:focus-visible, .remove-book:focus-visible { outline: 3px solid rgb(29 46 140 / 40%); outline-offset: 2px; }
.hint { margin: 7px 0; color: var(--muted); font-size: .8rem; }
.status { margin: 10px 0 0; color: var(--muted); font-size: .87rem; }
.status:empty { display: none; }
.status.error { color: var(--danger); font-weight: 700; }
.status.success { color: var(--accent); font-weight: 700; }

.results { display: grid; gap: 10px; margin-top: 13px; }
.result-card { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 2px solid #f1ebdf; border-radius: 16px; background: #fff; transition: border-color .18s ease; }
.result-card:hover { border-color: #d9eccb; }
.cover { display: block; width: 56px; height: 76px; border-radius: 8px; background: var(--soft); object-fit: cover; }
.cover-placeholder { display: grid; place-items: center; color: var(--accent); font-size: .68rem; font-weight: 700; }
.book-title { margin: 0; font-size: .88rem; font-weight: 750; line-height: 1.4; }
.book-meta { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.book-description { overflow: hidden; display: -webkit-box; margin: 6px 0 0; color: var(--muted); font-size: .73rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.select-book { min-height: 38px; padding: 6px 13px; border: 2px solid var(--lime); border-radius: 999px; background: #f5faee; color: #3f6a12; cursor: pointer; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.select-book:hover:not(:disabled) { background: #e9f4da; }
.select-book:disabled { cursor: not-allowed; opacity: .5; }

.selected-panel { margin-top: 20px; padding: 17px; border: 2px dashed #c7cdea; border-radius: 18px; background: #f6f7fd; }
.cart-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cart-heading h3 { margin: 0; color: var(--navy); font-size: .97rem; font-weight: 800; }
.cart-heading h3 span { margin-left: 5px; padding: 1px 9px; border-radius: 999px; background: var(--navy); color: #fff; font-size: .76rem; font-variant-numeric: tabular-nums; }
.cart-status { margin: 0; color: var(--muted); font-size: .77rem; }
.selected-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.cart-book { min-width: 0; padding: 11px; border: 1px solid #dfe2f3; border-radius: 14px; background: #fff; }
.cart-book .cover { width: 62px; height: 84px; margin: 0 auto 8px; }
.cart-book .book-title { overflow: hidden; display: -webkit-box; min-height: 2.8em; font-size: .78rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cart-book .book-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .68rem; }
.cart-holding { min-height: 2.5em; margin: 7px 0; color: #3d6a55; font-size: .7rem; line-height: 1.4; }
.remove-book { width: 100%; min-height: 32px; margin-top: 8px; border: 1px solid #e6e2da; border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; font-size: .73rem; }
.remove-book:hover { border-color: #e7b9b9; color: var(--danger); }

.submit-area { margin-top: 24px; text-align: center; }
.submit-button { width: min(100%, 380px); min-height: 56px; border-radius: 999px; font-size: 1rem; }
footer { margin-top: 30px; padding: 22px 0 0; border-top: 3px dotted #ecd9a8; color: #8a8f8c; text-align: center; font-size: .78rem; }

@media (max-width: 560px) {
  .topbar { height: 62px; padding: 0 14px; }
  .brand { gap: 8px; font-size: .88rem; }
  .school-mark { width: 40px; height: 40px; }
  .catalog-link { padding: 6px 10px; font-size: .72rem; }
  main { width: min(100% - 28px, 760px); padding: 22px 0 40px; }
  .intro { margin-bottom: 14px; padding: 46px 22px 28px; border-radius: 22px; }
  .intro-dots { top: 18px; right: auto; left: 22px; gap: 6px; }
  .intro-dots i { width: 12px; height: 12px; }
  .eyebrow { font-size: .6rem; }
  h1 { font-size: clamp(1.85rem, 8vw, 2.35rem); }
  .intro-copy { margin-top: 10px; font-size: .86rem; }
  .panel { margin: 12px 0; padding: 20px 16px; border-radius: 18px; }
  .section-heading { gap: 10px; margin-bottom: 17px; }
  .section-heading p { font-size: .8rem; }
  .form-row { grid-template-columns: 1fr; gap: 6px; margin-top: 12px; }
  .reading-guides { padding: 13px; }
  .guide-links > a, .criteria summary { max-width: 100%; font-size: .76rem; }
  .criteria-content { padding: 13px; font-size: .8rem; }
  .search-box { gap: 7px; }
  .search-box .btn { padding-right: 14px; padding-left: 14px; }
  .result-card { grid-template-columns: 46px minmax(0, 1fr); gap: 10px; }
  .cover { width: 46px; height: 63px; }
  .select-book { grid-column: 2; justify-self: start; }
  .cart-heading { display: block; }
  .cart-status { margin-top: 4px; }
  .selected-panel { padding: 14px; }
  .selected-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
