@charset "utf-8";

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: #111111;
  background: #ffffff;
  line-height: 1.65;
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.site-wrap {
  width: 100%;
  overflow-x: hidden;
}

/* Header */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: #f3ead6;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  z-index: 1000;
}

.header-inner {
  height: 48px;
  display: grid;
  grid-template-columns: 220px 1fr 190px;
  align-items: center;
  padding: 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 48px;
  gap: 9px;
  font-weight: 800;
  color: #4d7b3d;
  letter-spacing: -0.04em;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 25px;
}

.mark-leaf {
  position: absolute;
  top: 4px;
  width: 13px;
  height: 16px;
  border: 3px solid #7ba35c;
  background: transparent;
}

.mark-leaf.left {
  left: 1px;
  transform: rotate(-32deg);
}

.mark-leaf.right {
  right: 1px;
  transform: rotate(32deg);
}

.mark-stem {
  position: absolute;
  left: 13px;
  top: 0;
  width: 4px;
  height: 12px;
  background: #7ba35c;
}

.brand-text {
  font-size: 20px;
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 48px;
  gap: 42px;
}

.main-nav a {
  position: relative;
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #111111;
  line-height: 48px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 9px;
  width: 0;
  height: 2px;
  background: #47763e;
  transition: width 0.22s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 48px;
  gap: 12px;
}

.mini-link {
  font-size: 11px;
  font-family: Georgia, serif;
  color: #111111;
}

.icon-button,
.mobile-menu-button {
  width: 25px;
  height: 25px;
  border: 0;
  background: transparent;
  padding: 0;
}

.search-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px auto 0;
  border: 2px solid #111111;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: #111111;
  right: -7px;
  bottom: -3px;
  transform: rotate(45deg);
  transform-origin: center;
}

.mobile-menu-button {
  display: none;
  position: relative;
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #111111;
}

.mobile-nav {
  display: none;
  background: #f3ead6;
  border-top: 1px solid rgba(0, 0, 0, 0.16);
}

.mobile-nav a {
  display: block;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  font-size: 15px;
  font-weight: 700;
}

/* Search */
.search-layer {
  position: fixed;
  top: 48px;
  left: 0;
  width: 100%;
  padding: 22px 18px;
  background: #ffffff;
  border-bottom: 2px solid #111111;
  z-index: 900;
  display: none;
}

.search-layer.is-open {
  display: block;
}

.search-box {
  max-width: 850px;
  margin: 0 auto;
}

.search-box label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  border: 2px solid #111111;
}

.search-row input {
  width: 100%;
  border: 0;
  padding: 13px 15px;
  font-size: 15px;
}

.search-row button {
  border: 0;
  border-left: 2px solid #111111;
  background: #5f955b;
  color: #ffffff;
  font-weight: 800;
}

/* Hero */
.hero-section {
  position: relative;
  margin-top: 48px;
  min-height: 390px;
  background: #6aa161;
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(90deg, transparent 0 96%, rgba(31, 94, 38, 0.45) 96% 97%, transparent 97%),
    linear-gradient(0deg, transparent 0 94%, rgba(31, 94, 38, 0.36) 94% 95%, transparent 95%);
  background-size: 76px 65px;
}

.hero-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -28deg,
      transparent 0,
      transparent 55px,
      rgba(38, 91, 43, 0.25) 56px,
      transparent 59px
    );
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 40px));
  min-height: 390px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
}

.hero-text {
  padding-top: 12px;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #214b27;
  font-weight: 700;
}

.hero-text h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.16;
  letter-spacing: -0.08em;
  color: #102d18;
}

.hero-desc {
  width: min(430px, 100%);
  margin: 22px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: #17391f;
}

.hero-illust {
  position: relative;
  height: 340px;
}

.hero-illust svg {
  width: min(560px, 100%);
  height: 340px;
  display: block;
  margin: 22px auto 0;
}

.hero-lines {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}

.hero-lines span {
  width: 34px;
  height: 2px;
  background: rgba(255, 255, 255, 0.62);
}

.hero-lines span:first-child {
  background: #ffffff;
}

/* Message */
.message-section {
  position: relative;
  min-height: 210px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 20px;
  border-bottom: 1px solid #e4e4e4;
}

.message-inner {
  text-align: center;
}

.message-inner h2 {
  margin: 0 0 18px;
  color: #4e8767;
  font-size: clamp(27px, 4vw, 39px);
  line-height: 1.35;
  letter-spacing: -0.08em;
}

.message-inner p {
  margin: 0;
  color: #111111;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  letter-spacing: -0.06em;
}

.side-character {
  position: absolute;
  right: 34px;
  bottom: 22px;
  width: 80px;
  height: 105px;
}

.character-head {
  position: absolute;
  top: 0;
  left: 28px;
  width: 25px;
  height: 25px;
  background: #f5c5bd;
  border: 3px solid #111111;
}

.character-head::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -6px;
  width: 23px;
  height: 14px;
  background: #111111;
}

.character-body {
  position: absolute;
  left: 18px;
  top: 30px;
  width: 45px;
  height: 42px;
  background: #b4d37a;
  border: 3px solid #111111;
}

.character-book {
  position: absolute;
  left: 25px;
  top: 47px;
  width: 33px;
  height: 21px;
  background: #ffffff;
  border: 3px solid #111111;
}

.character-text {
  position: absolute;
  left: 3px;
  bottom: 0;
  width: 76px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.07em;
}

/* Common Section */
.content-section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 90px 0;
}

.section-title {
  margin-bottom: 34px;
}

.section-title span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-family: Georgia, serif;
  letter-spacing: 0.18em;
  color: #5f955b;
  font-weight: 800;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.2;
  letter-spacing: -0.08em;
  color: #111111;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 26px;
}

.text-panel,
.keyword-panel {
  border: 2px solid #111111;
  background: #fffdf5;
  padding: 34px;
}

.text-panel h3,
.keyword-panel h3 {
  margin: 0 0 18px;
  font-size: 25px;
  line-height: 1.35;
  letter-spacing: -0.07em;
}

.text-panel p {
  margin: 0 0 14px;
  font-size: 17px;
}

.text-panel p:last-child {
  margin-bottom: 0;
}

.keyword-panel {
  background: #e8f0d4;
}

.keyword-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid #111111;
}

.keyword-panel li {
  padding: 14px 0;
  border-bottom: 2px solid #111111;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

/* Teacher */
.teacher-section {
  border-top: 1px solid #e4e4e4;
}

.teacher-box {
  display: grid;
  grid-template-columns: 350px 1fr;
  border: 2px solid #111111;
  background: #f6edd8;
}

.teacher-photo {
  position: relative;
  min-height: 390px;
  background: #5f955b;
  border-right: 2px solid #111111;
  overflow: hidden;
}

.photo-line.top {
  position: absolute;
  left: 0;
  top: 42px;
  width: 100%;
  height: 2px;
  background: rgba(0, 0, 0, 0.28);
}

.photo-face {
  position: absolute;
  left: 135px;
  top: 80px;
  width: 78px;
  height: 82px;
  background: #f4c4b7;
  border: 4px solid #111111;
}

.photo-hair {
  position: absolute;
  left: 119px;
  top: 60px;
  width: 105px;
  height: 66px;
  background: #111111;
}

.photo-body {
  position: absolute;
  left: 95px;
  top: 165px;
  width: 160px;
  height: 145px;
  background: #d8b94f;
  border: 4px solid #111111;
}

.photo-book {
  position: absolute;
  left: 74px;
  top: 235px;
  width: 205px;
  height: 80px;
  background:
    linear-gradient(90deg, #fff8dd 0 49%, #111111 49% 51%, #f4ead2 51% 100%);
  border: 4px solid #111111;
}

.teacher-info {
  padding: 42px;
}

.small-label {
  margin: 0 0 10px;
  color: #47763e;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.teacher-info h3 {
  margin: 0 0 18px;
  font-size: 33px;
  line-height: 1.25;
  letter-spacing: -0.08em;
}

.teacher-info p {
  font-size: 17px;
  margin: 0 0 26px;
}

.teacher-list {
  border-top: 2px solid #111111;
}

.teacher-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 2px solid #111111;
}

.teacher-list strong {
  font-size: 15px;
  color: #111111;
}

.teacher-list span {
  font-size: 15px;
}

/* Program */
.program-section {
  border-top: 1px solid #e4e4e4;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid #111111;
  border-left: 2px solid #111111;
}

.program-card {
  min-height: 300px;
  padding: 28px 24px;
  border-right: 2px solid #111111;
  border-bottom: 2px solid #111111;
  background: #ffffff;
  transition: background 0.2s ease;
}

.program-card:hover {
  background: #edf3df;
}

.card-number {
  margin-bottom: 24px;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 900;
  color: #5f955b;
}

.program-card h3 {
  margin: 0 0 16px;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.07em;
}

.program-card p {
  margin: 0 0 24px;
  font-size: 15px;
}

.program-card a {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid #111111;
  font-size: 14px;
  font-weight: 900;
}

/* Community */
.community-section {
  border-top: 1px solid #e4e4e4;
}

.community-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
}

.notice-board,
.contact-box {
  border: 2px solid #111111;
  background: #fffdf5;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 2px solid #111111;
  background: #e8f0d4;
}

.board-head h3,
.contact-box h3 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.07em;
}

.board-head a {
  font-size: 13px;
  font-weight: 900;
  border-bottom: 2px solid #111111;
}

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notice-list li {
  border-bottom: 2px solid #111111;
}

.notice-list li:last-child {
  border-bottom: 0;
}

.notice-list a {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 20px;
  padding: 21px 28px;
}

.notice-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.notice-date {
  font-size: 13px;
  color: #555555;
  text-align: right;
}

.contact-box {
  padding: 28px;
  background: #f6edd8;
}

.contact-box p {
  margin: 14px 0 22px;
  font-size: 15px;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 2px solid #111111;
  background: #ffffff;
  padding: 12px;
  font-size: 14px;
}

.contact-form textarea {
  height: 115px;
  resize: vertical;
}

.contact-form button {
  height: 48px;
  border: 2px solid #111111;
  background: #5f955b;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

/* Footer */
.footer {
  background: #111111;
  color: #ffffff;
  padding: 42px 0;
}

.footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  letter-spacing: -0.06em;
}

.footer p {
  margin: 0 0 5px;
  font-size: 13px;
  color: #d9d9d9;
}

.footer-info {
  text-align: right;
}

/* Top Button */
.top-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  display: none;
  align-items: center;
  justify-content: center;
  background: #f3ead6;
  border: 2px solid #111111;
  font-size: 12px;
  font-weight: 900;
  z-index: 900;
}

.top-button.is-visible {
  display: flex;
}

/* Responsive */
@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: 180px 1fr 140px;
  }

  .main-nav {
    gap: 24px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 48px 0 26px;
  }

  .hero-illust {
    height: 300px;
  }

  .hero-illust svg {
    height: 300px;
  }

  .about-grid,
  .teacher-box,
  .community-layout {
    grid-template-columns: 1fr;
  }

  .teacher-photo {
    border-right: 0;
    border-bottom: 2px solid #111111;
  }

  .program-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .side-character {
    display: none;
  }
}

@media (max-width: 720px) {
  .top-header {
    height: 52px;
  }

  .header-inner {
    height: 52px;
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }

  .brand {
    height: 52px;
  }

  .main-nav {
    display: none;
  }

  .mini-link {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .search-layer {
    top: 52px;
  }

  .hero-section {
    margin-top: 52px;
  }

  .hero-inner {
    width: calc(100% - 28px);
  }

  .hero-desc {
    font-size: 15px;
  }

  .message-section {
    padding: 44px 16px;
  }

  .content-section {
    width: calc(100% - 28px);
    padding: 64px 0;
  }

  .text-panel,
  .keyword-panel,
  .teacher-info,
  .contact-box {
    padding: 24px;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .notice-list a {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .notice-date {
    text-align: left;
  }

  .footer-inner {
    width: calc(100% - 28px);
    display: block;
  }

  .footer-info {
    margin-top: 24px;
    text-align: left;
  }

  .search-row {
    grid-template-columns: 1fr 70px;
  }
}

@media (max-width: 460px) {
  .brand-text {
    font-size: 18px;
  }

  .hero-text h1 {
    font-size: 34px;
  }

  .hero-illust {
    height: 250px;
  }

  .hero-illust svg {
    height: 250px;
  }

  .message-inner h2 {
    font-size: 27px;
  }

  .message-inner p {
    font-size: 18px;
  }

  .teacher-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Single File Page Routing */
.route-page {
  display: none;
}

.route-page.is-current {
  display: block;
}

.main-nav a.is-active::after {
  width: 100%;
}

.mobile-nav a.is-active {
  background: #e8f0d4;
}

/* Sub Page Visual */
.route-page:not([data-page="home"]) {
  padding-top: 48px;
}

.page-visual {
  position: relative;
  min-height: 260px;
  background: #6aa161;
  overflow: hidden;
  border-bottom: 2px solid #111111;
}

.page-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(90deg, transparent 0 96%, rgba(31, 94, 38, 0.45) 96% 97%, transparent 97%),
    linear-gradient(0deg, transparent 0 94%, rgba(31, 94, 38, 0.36) 94% 95%, transparent 95%);
  background-size: 76px 65px;
}

.page-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -28deg,
      transparent 0,
      transparent 55px,
      rgba(38, 91, 43, 0.25) 56px,
      transparent 59px
    );
}

.page-visual-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 40px));
  min-height: 260px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-visual-inner span {
  display: block;
  margin-bottom: 12px;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #214b27;
}

.page-visual-inner h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.08em;
  color: #102d18;
}

.page-visual-inner p {
  width: min(620px, 100%);
  margin: 20px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: #17391f;
  letter-spacing: -0.05em;
}

/* Home Link Section */
.home-link-section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 2px solid #111111;
  border-top: 2px solid #111111;
}

.home-link-section a {
  min-height: 190px;
  padding: 26px;
  border-right: 2px solid #111111;
  border-bottom: 2px solid #111111;
  background: #fffdf5;
  transition: background 0.2s ease;
}

.home-link-section a:hover {
  background: #e8f0d4;
}

.home-link-section strong {
  display: block;
  margin-bottom: 18px;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.07em;
}

.home-link-section span {
  display: block;
  font-size: 15px;
  color: #222222;
}

@media (max-width: 980px) {
  .home-link-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .route-page:not([data-page="home"]) {
    padding-top: 52px;
  }

  .page-visual-inner {
    width: calc(100% - 28px);
  }

  .home-link-section {
    width: calc(100% - 28px);
    grid-template-columns: 1fr;
    padding: 56px 0;
  }
}

/* Picture Book Page */
.book-section {
  padding-top: 80px;
}

.book-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  border-top: 2px solid #111111;
  border-bottom: 2px solid #111111;
  padding: 18px 0;
}

.book-toolbar p {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.book-toolbar button,
.book-form button {
  border: 2px solid #111111;
  background: #5f955b;
  color: #ffffff;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 900;
}

.book-admin-panel {
  display: none;
  margin-bottom: 36px;
  border: 2px solid #111111;
  background: #f6edd8;
  padding: 28px;
}

.book-admin-panel.is-open {
  display: block;
}

.book-admin-panel h3 {
  margin: 0 0 8px;
  font-size: 25px;
  letter-spacing: -0.07em;
}

.admin-desc {
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 700;
}

.book-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.book-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.book-form label:nth-child(3),
.book-form label:nth-child(4),
.book-form label:nth-child(5) {
  grid-column: 1 / -1;
}

.book-form input,
.book-form textarea {
  width: 100%;
  border: 2px solid #111111;
  background: #ffffff;
  padding: 12px;
  font-size: 14px;
}

.book-form textarea {
  min-height: 140px;
  resize: vertical;
}

.book-form button {
  grid-column: 1 / -1;
  height: 50px;
}

.book-form-message {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 900;
}

.book-form-message.is-success {
  color: #386b35;
}

.book-form-message.is-error {
  color: #b32222;
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.book-card {
  border: 1px solid #111111;
  background: #ffffff;
  overflow: hidden;
}

.book-card-button {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: #111111;
}

.book-frame {
  position: relative;
  aspect-ratio: 1 / 1.18;
  background: #f3ead6;
  border-bottom: 1px solid #111111;
  overflow: hidden;
}

.book-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.book-frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(17, 17, 17, 0.28);
  pointer-events: none;
}

.book-info {
  padding: 14px 13px 16px;
  min-height: 118px;
}

.book-info h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.06em;
}

.book-info p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #333333;
}

.book-more {
  display: inline-block;
  font-size: 12px;
  color: #555555;
}

.book-empty {
  grid-column: 1 / -1;
  border: 2px solid #111111;
  background: #fffdf5;
  padding: 34px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

/* Book Modal */
.book-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.book-modal.is-open {
  display: block;
}

.book-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.book-modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(920px, calc(100% - 36px));
  max-height: calc(100vh - 70px);
  transform: translate(-50%, -50%);
  background: #fffdf5;
  border: 2px solid #111111;
  overflow: auto;
}

.book-modal-close {
  position: absolute;
  right: 0;
  top: 0;
  width: 46px;
  height: 46px;
  border: 0;
  border-left: 2px solid #111111;
  border-bottom: 2px solid #111111;
  background: #f3ead6;
  color: #111111;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  z-index: 2;
}

.book-modal-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
}

.book-modal-image {
  background: #e8f0d4;
  border-right: 2px solid #111111;
  min-height: 460px;
}

.book-modal-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.book-modal-content {
  padding: 54px 38px 38px;
}

.book-modal-content span {
  display: block;
  margin-bottom: 12px;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #5f955b;
}

.book-modal-content h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.25;
  letter-spacing: -0.08em;
}

.book-modal-summary {
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 2px solid #111111;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.book-modal-detail {
  white-space: pre-line;
  font-size: 16px;
  line-height: 1.8;
}

/* Home card 5 columns */
.home-link-section {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1180px) {
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-link-section {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-modal-layout {
    grid-template-columns: 1fr;
  }

  .book-modal-image {
    min-height: auto;
    border-right: 0;
    border-bottom: 2px solid #111111;
  }

  .book-modal-image img {
    height: auto;
  }

  .book-form {
    grid-template-columns: 1fr;
  }

  .home-link-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .book-toolbar {
    display: block;
  }

  .book-toolbar button {
    margin-top: 14px;
    width: 100%;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-modal-content {
    padding: 54px 24px 28px;
  }
}
/* ================================
   BOOK PAGE FIX
   그림책 소개 페이지 강제 보정
================================ */

/* 그림책 페이지 전체 폭 보정 */
.book-section {
  width: min(1120px, calc(100% - 40px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: 80px !important;
}

/* 등록 영역 */
.book-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin-bottom: 24px !important;
  border-top: 2px solid #111111 !important;
  border-bottom: 2px solid #111111 !important;
  padding: 18px 0 !important;
}

.book-toolbar p {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: -0.05em !important;
}

.book-toolbar button,
.book-form button {
  border: 2px solid #111111 !important;
  background: #5f955b !important;
  color: #ffffff !important;
  padding: 12px 18px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

/* 등록 패널은 기본적으로 숨김 */
.book-admin-panel {
  display: none !important;
  margin-bottom: 36px !important;
  border: 2px solid #111111 !important;
  background: #f6edd8 !important;
  padding: 28px !important;
}

.book-admin-panel.is-open {
  display: block !important;
}

.book-admin-panel h3 {
  margin: 0 0 8px !important;
  font-size: 25px !important;
  letter-spacing: -0.07em !important;
}

.admin-desc {
  margin: 0 0 20px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* 등록 폼 */
.book-form {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
}

.book-form label {
  display: grid !important;
  gap: 7px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.book-form label:nth-child(3),
.book-form label:nth-child(4),
.book-form label:nth-child(5) {
  grid-column: 1 / -1 !important;
}

.book-form input,
.book-form textarea {
  width: 100% !important;
  max-width: 100% !important;
  border: 2px solid #111111 !important;
  background: #ffffff !important;
  padding: 12px !important;
  font-size: 14px !important;
}

.book-form textarea {
  min-height: 140px !important;
  resize: vertical !important;
}

.book-form button {
  grid-column: 1 / -1 !important;
  height: 50px !important;
}

.book-form-message {
  margin-top: 14px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.book-form-message.is-success {
  color: #386b35 !important;
}

.book-form-message.is-error {
  color: #b32222 !important;
}

/* 그림책 목록 액자형 그리드 */
.book-grid {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: start !important;
}

/* 카드 */
.book-card {
  width: 100% !important;
  min-width: 0 !important;
  border: 1px solid #111111 !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

.book-card-button {
  width: 100% !important;
  display: block !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  text-align: left !important;
  color: #111111 !important;
}

/* 액자 이미지 영역 */
.book-frame {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1.18 !important;
  background: #f3ead6 !important;
  border-bottom: 1px solid #111111 !important;
  overflow: hidden !important;
}

/* 업로드 이미지 강제 축소 */
.book-frame img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

/* 액자 안쪽 선 */
.book-frame::before {
  content: "";
  position: absolute !important;
  inset: 8px !important;
  border: 1px solid rgba(17, 17, 17, 0.28) !important;
  pointer-events: none !important;
}

/* 카드 설명 */
.book-info {
  padding: 14px 13px 16px !important;
  min-height: 118px !important;
}

.book-info h3 {
  margin: 0 0 8px !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  letter-spacing: -0.06em !important;
}

.book-info p {
  margin: 0 0 10px !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #333333 !important;
}

.book-more {
  display: inline-block !important;
  font-size: 12px !important;
  color: #555555 !important;
}

.book-empty {
  grid-column: 1 / -1 !important;
  border: 2px solid #111111 !important;
  background: #fffdf5 !important;
  padding: 34px !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

/* 모달은 기본 상태에서 무조건 숨김 */
.book-modal,
.book-modal[aria-hidden="true"] {
  display: none !important;
}

/* 열렸을 때만 보임 */
.book-modal.is-open,
.book-modal[aria-hidden="false"] {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000 !important;
}

/* 모달 배경 */
.book-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.58) !important;
}

/* 모달 박스 */
.book-modal-panel {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: min(920px, calc(100% - 36px)) !important;
  max-height: calc(100vh - 70px) !important;
  transform: translate(-50%, -50%) !important;
  background: #fffdf5 !important;
  border: 2px solid #111111 !important;
  overflow: auto !important;
}

/* 닫기 버튼 */
.book-modal-close {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  width: 46px !important;
  height: 46px !important;
  border: 0 !important;
  border-left: 2px solid #111111 !important;
  border-bottom: 2px solid #111111 !important;
  background: #f3ead6 !important;
  color: #111111 !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  z-index: 2 !important;
}

/* 모달 내부 */
.book-modal-layout {
  display: grid !important;
  grid-template-columns: 360px 1fr !important;
}

.book-modal-image {
  background: #e8f0d4 !important;
  border-right: 2px solid #111111 !important;
  min-height: 460px !important;
}

.book-modal-image img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

.book-modal-content {
  padding: 54px 38px 38px !important;
}

.book-modal-content span {
  display: block !important;
  margin-bottom: 12px !important;
  font-family: Georgia, serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em !important;
  color: #5f955b !important;
}

.book-modal-content h2 {
  margin: 0 0 16px !important;
  font-size: clamp(28px, 4vw, 42px) !important;
  line-height: 1.25 !important;
  letter-spacing: -0.08em !important;
}

.book-modal-summary {
  margin: 0 0 22px !important;
  padding-bottom: 18px !important;
  border-bottom: 2px solid #111111 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  letter-spacing: -0.05em !important;
}

.book-modal-detail {
  white-space: pre-line !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
  word-break: break-all !important;
}

/* 홈 카드 5개용 */
.home-link-section {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

/* 반응형 */
@media (max-width: 1180px) {
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .home-link-section {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .book-modal-layout {
    grid-template-columns: 1fr !important;
  }

  .book-modal-image {
    min-height: auto !important;
    border-right: 0 !important;
    border-bottom: 2px solid #111111 !important;
  }

  .book-modal-image img {
    height: auto !important;
  }

  .book-form {
    grid-template-columns: 1fr !important;
  }

  .home-link-section {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 520px) {
  .book-section {
    width: calc(100% - 28px) !important;
  }

  .book-toolbar {
    display: block !important;
  }

  .book-toolbar button {
    margin-top: 14px !important;
    width: 100% !important;
  }

  .book-grid {
    grid-template-columns: 1fr !important;
  }

  .book-modal-content {
    padding: 54px 24px 28px !important;
  }
}
/* ================================
   ADMIN LOGIN / DELETE FIX
================================ */

.login-button,
.logout-button {
  border: 0;
  background: transparent;
  padding: 0;
}

.logout-button,
.admin-status {
  display: none;
}

body.is-admin .logout-button,
body.is-admin .admin-status {
  display: inline-block;
}

body.is-admin .login-button {
  display: none;
}

.admin-status {
  font-size: 11px;
  font-weight: 900;
  color: #47763e;
}

/* 관리자만 등록 버튼 보이기 */
#bookAdminToggle {
  display: none;
}

body.is-admin #bookAdminToggle {
  display: inline-block;
}

/* 관리자만 등록 패널 사용 가능 */
.book-admin-panel {
  display: none;
}

body:not(.is-admin) .book-admin-panel {
  display: none !important;
}

/* 삭제 버튼 */
.book-delete-button {
  display: none;
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  height: 36px;
  border: 2px solid #111111;
  background: #ffffff;
  color: #b32222;
  font-size: 13px;
  font-weight: 900;
}

body.is-admin .book-delete-button {
  display: block;
}

.book-delete-button:hover {
  background: #b32222;
  color: #ffffff;
}

/* Login Modal */
.login-modal,
.login-modal[aria-hidden="true"] {
  display: none;
}

.login-modal.is-open,
.login-modal[aria-hidden="false"] {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 2100;
}

.login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.login-modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(460px, calc(100% - 36px));
  transform: translate(-50%, -50%);
  background: #fffdf5;
  border: 2px solid #111111;
}

.login-modal-close {
  position: absolute;
  right: 0;
  top: 0;
  width: 46px;
  height: 46px;
  border: 0;
  border-left: 2px solid #111111;
  border-bottom: 2px solid #111111;
  background: #f3ead6;
  color: #111111;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  z-index: 2;
}

.login-modal-content {
  padding: 54px 34px 34px;
}

.login-modal-content span {
  display: block;
  margin-bottom: 10px;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #5f955b;
}

.login-modal-content h2 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.08em;
}

.login-modal-content p {
  margin: 0 0 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.login-form input {
  width: 100%;
  border: 2px solid #111111;
  background: #ffffff;
  padding: 12px;
  font-size: 14px;
}

.login-form button {
  height: 48px;
  border: 2px solid #111111;
  background: #5f955b;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.login-message {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 900;
}

.login-message.is-error {
  color: #b32222;
}

.login-message.is-success {
  color: #386b35;
}

/* 그림책 폼 그리드 보정: 비밀번호 필드 제거 후 */
.book-form {
  grid-template-columns: 1fr 1fr !important;
}

.book-form label:nth-child(3),
.book-form label:nth-child(4) {
  grid-column: 1 / -1 !important;
}

.book-form button {
  grid-column: 1 / -1 !important;
}
