/* ==========================================================================
   Book-Mall Design Tokens & Shared UI Primitives (도서출판 현동 공식 컬러 시스템)
   Main Point: #391802 | Dark Accent: #2e1201 | Page Background: #f6f3ea (SH2013A)
   ========================================================================== */

:root {
  /* Brand Color Scale (도서출판 현동 로고 밤색 & SH2013A 미색 기준) */
  --color-brand-50:  #f6f3ea; /* SH2013A 전체 페이지 미색 배경 */
  --color-brand-100: #efeae0; /* 4:5 사진 틀 / 소프트 서피스 */
  --color-brand-200: #e8ded7; /* 공식 구분선 · 보더 */
  --color-brand-300: #d5c7bc; /* 보조 입력창 보더 */
  --color-brand-400: #9a887d; /* 서브 아이콘 · 톤 다운 브라운 */
  --color-brand-500: #391802; /* MAIN BRAND COLOR (한글 로고 짙은 밤색) */
  --color-brand-600: #2e1201; /* DARK ACCENT (영문 로고 딥 밤색 · Hover) */
  --color-brand-700: #4e2810; /* 밝은 배경 위 강조 텍스트 · 링크 */
  --color-brand-800: #391802; /* 관리기 사이드바 · 제목 · 진한 포인트 */
  --color-brand-900: #1c1613; /* 다크 서피스 · 먹빛 브라운 잉크 */

  /* Surfaces & Borders */
  --color-bg:            #f6f3ea;
  --color-surface:       #fcfbf7;
  --color-surface-soft:  #efeae0;
  --color-border:        #e8ded7;
  --color-border-strong: #d2c3b7;

  /* Client v9 Editorial Accent & Mat Tokens */
  --color-accent-olive:   #64764c; /* v8/v9 활성 GNB 메뉴 · 할인가 강조 */
  --color-editorial-warm: #ebe5d9; /* v4/v6 브랜드 선언문 섹션 배경 */
  --color-cover-mat:      #e9e4db; /* v3/v6 도서 표지 사진 틀 배경 */
  --color-price-regular:  #8c867e; /* v8 정가 취소선 텍스트 */
  --color-line:           #d9d2c7; /* v9 얇은 헤어라인 보더 */
  --color-ink:            #302e29; /* v9 본문/제목 먹빛 잉크 */
  --color-eyebrow:        #776452; /* v9 상단 영문 소제목(eyebrow) */
  --color-input-paper:    #fffdf8; /* v9 입력창 미색 배경 */
  --color-table-head:     #f0ece4; /* v9 게시판·테이블 헤더 */
  --color-table-hover:    #efebe3; /* v9 게시판·테이블 호버 */

  /* Typography Colors (미색 배경 위 눈부심 없는 인쇄 먹빛 다크 브라운) */
  --color-text-primary:   #302e29;
  --color-text-secondary: #655a53;
  --color-text-muted:     #817a70;

  /* Semantic Status Colors */
  --color-seal:         #391802;
  --color-seal-soft:    #efeae0;
  --color-success:      #3d6b50;
  --color-success-soft: #eaf4ee;
  --color-warning:      #9c6626;
  --color-warning-soft: #fcf4e8;
  --color-danger:       #a63d35;
  --color-danger-soft:  #faedec;
  --color-info:         #64764c;
  --color-info-soft:    #eef1ea;

  /* Typography Families (v9 문학·출판 명조 디스플레이 + 정갈한 한국어 고딕) */
  --font-display:   "Noto Serif KR", "Batang", "AppleMyungjo", Georgia, serif;
  --font-editorial: "Noto Serif KR", "Batang", "AppleMyungjo", Georgia, serif;
  --font-serif:     var(--font-editorial);
  --font-sans:      "Apple SD Gothic Neo", "Noto Sans KR", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;

  /* Layout & Radius (좌우 가변 여백 포함 실 컨텐츠 폭 1160px — Client v9 기준 통일) */
  --gutter-inline: clamp(28px, 4vw, 52px);
  --container-max: calc(1160px + (var(--gutter-inline) * 2));
  --radius-sm:     2px;
  --radius-md:     2px;
  --radius-lg:     4px;
  --shadow-sm:     none;
  --shadow-md:     0 10px 28px rgba(48, 46, 41, 0.08);
  --shadow-lg:     0 16px 40px rgba(48, 46, 41, 0.14);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background-color: var(--color-bg);
  letter-spacing: -0.035em;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

textarea {
  resize: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-brand-600);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

/* ==========================================================================
   Client Preview Mode Switcher Bar (화면 미리보기 전환 바 - 레거시 호환 1줄 고정)
   ========================================================================== */
.demo-switcher-bar {
  background: var(--color-brand-900);
  color: #f4f2ed;
  font-size: 0.76rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 120;
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  overflow: hidden;
}

.demo-switcher-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 16px;
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.demo-switcher-inner::-webkit-scrollbar {
  display: none;
}

.demo-switcher-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #dfdcd3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.demo-switcher-badge > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

@media (max-width: 960px) {
  .demo-switcher-badge {
    display: none !important;
  }
}

.demo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-brand-500);
  box-shadow: 0 0 0 3px rgba(57, 24, 2, 0.28);
  flex-shrink: 0;
  animation: demoDotPulse 2.4s ease-in-out infinite;
}

@keyframes demoDotPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(57, 24, 2, 0.22);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(57, 24, 2, 0.42);
    transform: scale(1.12);
  }
}

.demo-switcher-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
  white-space: nowrap !important;
}

.demo-switch-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.74rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dfdcd3;
  background: transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  min-height: 24px;
  white-space: nowrap !important;
}

.demo-switch-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.demo-switch-link.is-active {
  background: var(--color-brand-500);
  border-color: var(--color-brand-500);
  color: #ffffff;
}

/* ==========================================================================
   Shared Brand Identity (Herbal Medicine + Classic Book Emblem), Cards & Helpers
   ========================================================================== */
.brand-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 2px 6px rgba(44, 41, 37, 0.12);
}

.admin-brand-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.auth-card-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
  box-shadow: 0 4px 12px rgba(44, 41, 37, 0.14);
}

.footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-seal-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--color-brand-800);
  color: #ffffff;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.04em;
  border: 1px solid var(--color-brand-600);
  flex-shrink: 0;
}

.panel-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin-bottom: 22px;
  box-shadow: none;
}

.discount-pct {
  color: var(--color-seal);
  font-weight: 700;
  margin-right: 4px;
}

/* ==========================================================================
   Shared Form Controls (쇼핑몰 · 로그인 · 회원가입 · 관리기 전 화면 공통)
   ========================================================================== */
.form-field {
  margin-bottom: 20px;
  min-width: 0;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-field > label,
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 10px;
  color: var(--color-ink);
  letter-spacing: -0.03em;
}

.form-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.form-input,
.toolbar-select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  height: 46px;
  padding: 0 15px;
  border: 1px solid var(--color-line);
  border-radius: 0;
  background-color: var(--color-input-paper);
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

input.form-input,
textarea.form-input {
  display: block;
}

.form-input::placeholder {
  color: #a39c90;
}

.form-input:hover,
.toolbar-select:hover {
  border-color: var(--color-brand-500);
}

.form-input:focus,
.toolbar-select:focus {
  outline: none;
  border-color: var(--color-brand-500);
  box-shadow: 0 0 0 3px rgba(57, 24, 2, 0.16);
}

.form-input:disabled,
.form-input[readonly] {
  background-color: #f3efe6;
  color: var(--color-text-secondary);
  cursor: default;
}

.form-input[readonly]:hover,
.form-input[readonly]:focus {
  border-color: var(--color-line);
  box-shadow: none;
}

select.form-input,
.toolbar-select {
  cursor: pointer;
}

.toolbar-select {
  width: auto;
  min-width: 136px;
  height: 44px;
  min-height: 44px;
  font-size: 0.86rem;
}

textarea.form-input {
  height: auto;
  min-height: 112px;
  padding: 15px 16px;
  line-height: 1.8;
  resize: none;
}

.form-input-sm {
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.85rem;
}

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

.form-grid-2 > .form-field,
.form-grid-3 > .form-field {
  margin-bottom: 14px;
}

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

.inline-input-group {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.inline-input-group .form-input {
  flex: 1 1 180px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--color-text-primary);
  cursor: pointer;
  user-select: none;
}

/* Toggle Switch (배너 · 팝업 · 공지 노출 ON/OFF) */
.switch-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  user-select: none;
  flex-shrink: 0;
}

.switch-wrap.switch-only {
  gap: 0;
  width: 44px;
  height: 24px;
  justify-content: flex-end;
}

.switch-pill {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-brand-300);
  transition: background-color 0.18s ease;
  flex-shrink: 0;
}

.switch-pill::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease;
}

.switch-wrap > input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.switch-pill.is-on,
.switch-wrap > input[type="checkbox"]:checked + .switch-pill {
  background: var(--color-brand-500);
}

.switch-pill.is-on::after,
.switch-wrap > input[type="checkbox"]:checked + .switch-pill::after {
  transform: translateX(20px);
}

/* ==========================================================================
   Shared Buttons, Chips & Badges (#391802 / #2E1201 / #F6F3EA Brand System)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.025em;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  box-shadow: none;
}

.btn:active:not(:disabled) {
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background-color: var(--color-brand-500);
  border-color: var(--color-brand-500);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-brand-600);
  border-color: var(--color-brand-600);
}

.btn-dark {
  background-color: var(--color-brand-800);
  border-color: var(--color-brand-800);
  color: #ffffff;
}

.btn-dark:hover:not(:disabled) {
  background-color: var(--color-brand-900);
  border-color: var(--color-brand-900);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-line);
  color: var(--color-ink);
}

.btn-outline:hover:not(:disabled) {
  border-color: #b8ae9f;
  background-color: #e9e3d8;
  color: var(--color-ink);
}

.btn-soft {
  background-color: var(--color-brand-100);
  border-color: var(--color-brand-200);
  color: var(--color-brand-800);
}

.btn-soft:hover:not(:disabled) {
  background-color: var(--color-brand-200);
}

.btn-danger-outline {
  background-color: var(--color-surface);
  border-color: rgba(166, 61, 53, 0.35);
  color: var(--color-danger);
}

.btn-danger-outline:hover:not(:disabled) {
  background-color: var(--color-danger-soft);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  min-height: 36px;
  border-radius: 2px;
  border: 1px solid var(--color-line);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
}

.chip-btn:hover {
  border-color: var(--color-eyebrow);
  color: var(--color-ink);
  background: var(--color-editorial-warm);
}

.chip-btn.is-active {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-brand-50);
  font-weight: 500;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
}

.badge-brand {
  background: var(--color-table-head);
  color: var(--color-ink);
  border: 1px solid var(--color-line);
}

.badge-best {
  background: #ede7dc;
  color: #391802;
  border: 1px solid #bfae99;
  font-weight: 600;
}

.badge-new,
.badge-sale {
  background: transparent;
  color: #675344;
  border: 1px solid #ad9b87;
}

.badge-seal {
  background: var(--color-seal-soft);
  color: var(--color-seal);
  border: 1px solid rgba(57, 24, 2, 0.28);
}

.badge-success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.badge-danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.badge-info {
  background: var(--color-info-soft);
  color: var(--color-info);
}

/* ==========================================================================
   Traditional Korean Medicine Book Cover Artwork (3:4 Aspect Ratio)
   ========================================================================== */
.book-cover-art {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 4px 8px 8px 4px;
  overflow: hidden;
  border: 1px solid rgba(70, 66, 59, 0.22);
  box-shadow:
    inset 5px 0 10px rgba(44, 41, 37, 0.14),
    3px 5px 14px rgba(44, 41, 37, 0.13);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12% 11%;
  user-select: none;
  background: linear-gradient(145deg, #ede6d6 0%, #dfd4be 52%, #d2c4a8 100%);
  color: #2c2925;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.book-cover-art::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -130%;
  width: 65%;
  height: 160%;
  background: linear-gradient(
    105deg,
    rgba(255, 252, 245, 0) 0%,
    rgba(255, 252, 245, 0.34) 50%,
    rgba(255, 252, 245, 0) 100%
  );
  transform: skewX(-18deg);
  z-index: 7;
  pointer-events: none;
  transition: left 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

*:hover > .book-cover-art,
.book-cover-art:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow:
    inset 5px 0 10px rgba(44, 41, 37, 0.16),
    7px 14px 24px rgba(44, 41, 37, 0.2);
}

*:hover > .book-cover-art::after,
.book-cover-art:hover::after {
  left: 155%;
}

.book-cover-art::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: rgba(44, 41, 37, 0.16);
  z-index: 3;
}

.book-cover-art[data-theme="sumuk-gold"] {
  background: linear-gradient(155deg, #e7dcc4 0%, #d8c8a6 55%, #c7b38b 100%);
  color: #2c2925;
}

.book-cover-art[data-theme="sumuk-gold"] .book-cover-center {
  background: linear-gradient(180deg, #2f2c28 0%, #23211e 100%);
  color: #f6f2e9;
  margin: auto -14%;
  padding: 9px 14%;
  border-top: 1px solid rgba(185, 164, 122, 0.65);
  border-bottom: 1px solid rgba(185, 164, 122, 0.65);
}

.book-cover-art[data-theme="hanji-taupe"] {
  background: linear-gradient(155deg, #efeae0 0%, #e0d9cb 55%, #cfc6b5 100%);
  color: #2c2925;
}

.book-cover-art[data-theme="royal-classic"] {
  background: linear-gradient(160deg, #3e3a34 0%, #2c2925 60%, #1f1d1a 100%);
  color: #f3ede0;
}

.book-cover-art[data-theme="sage-paper"] {
  background: linear-gradient(155deg, #eaede6 0%, #d6dcd0 55%, #bfc8b8 100%);
  color: #283029;
}

.book-cover-art[data-theme="ochre-silk"] {
  background: linear-gradient(155deg, #efe4cf 0%, #decba8 58%, #cbb389 100%);
  color: #362c1e;
}

.book-cover-hanja-watermark {
  position: absolute;
  right: 7%;
  top: 8%;
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.16;
  pointer-events: none;
  z-index: 1;
}

.book-cover-top {
  position: relative;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.book-cover-center {
  position: relative;
  z-index: 2;
  margin: auto 0;
}

.book-cover-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.92rem, 1.3vw, 1.2rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.book-cover-sub {
  margin-top: 5px;
  font-size: 0.7rem;
  line-height: 1.35;
  opacity: 0.9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.book-cover-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 1px 4px;
  border: 1px solid #a83c32;
  color: #b84237;
  background: rgba(184, 66, 55, 0.08);
  font-family: var(--font-serif);
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 2px;
  line-height: 1.1;
}

.book-cover-art[data-theme="sumuk-gold"] .book-cover-seal,
.book-cover-art[data-theme="royal-classic"] .book-cover-seal {
  color: #e06d62;
  border-color: #d45d52;
  background: rgba(212, 93, 82, 0.14);
}

.book-cover-bottom {
  position: relative;
  z-index: 2;
  font-size: 0.66rem;
  opacity: 0.8;
  border-top: 1px solid currentColor;
  padding-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.book-set-ribbon {
  position: absolute;
  top: 8px;
  left: 0;
  z-index: 6;
  background: var(--color-brand-500);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px 2px 10px;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.book-cover-art .book-real-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 4;
  background: #efeae0;
}

.hyundong-cover-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 0.77;
  background: var(--color-cover-mat, #e9e4db);
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.22s ease;
}

.hyundong-cover-frame .book-set-ribbon {
  display: none !important;
}

.hyundong-cover-frame .book-cover-art {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #efeae0;
  padding: 12% 10%;
}

.hyundong-cover-frame .book-cover-art.has-real-photo {
  padding: 0;
}

.hyundong-cover-frame .book-cover-art::before,
.hyundong-cover-frame .book-cover-art::after {
  display: none;
}

.hyundong-cover-frame .book-cover-art .book-real-img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  background: #dfd7ca;
  transition: transform 0.28s ease;
}

.hyundong-cover-frame:hover .book-cover-art,
*:hover > .hyundong-cover-frame .book-cover-art {
  transform: none;
  box-shadow: none;
}

.hyundong-cover-frame:hover .book-cover-art .book-real-img,
.hyundong-book-card:hover .hyundong-cover-frame .book-real-img,
.home-shelf-card:hover .hyundong-cover-frame .book-real-img {
  transform: scale(1.03);
}

.hyundong-cover-frame:hover,
.hyundong-book-card:hover .hyundong-cover-frame,
.home-shelf-card:hover .hyundong-cover-frame {
  transform: translateY(-4px);
}

@media (max-width: 767px) {
  .hyundong-cover-frame {
    padding: 0;
  }
}

.book-cover-art.has-real-photo .book-cover-hanja-watermark,
.book-cover-art.has-real-photo .book-cover-top,
.book-cover-art.has-real-photo .book-cover-center,
.book-cover-art.has-real-photo .book-cover-bottom {
  visibility: hidden;
}

/* ==========================================================================
   Rich Book Introduction Content (Shared by Web Editor & Storefront Detail)
   ========================================================================== */
.rich-book-content {
  font-size: 0.95rem;
  line-height: 1.82;
  color: var(--color-text-primary);
  word-break: keep-all;
}

.rich-book-content h2 {
  font-family: var(--font-serif);
  font-size: 1.24rem;
  color: var(--color-brand-900);
  margin: 20px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-strong);
}

.rich-book-content h2:first-child,
.rich-book-content h3:first-child {
  margin-top: 0;
}

.rich-book-content h3 {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  color: var(--color-brand-800);
  margin: 16px 0 8px;
}

.rich-book-content p {
  margin: 0 0 12px;
}

.rich-book-content blockquote {
  margin: 14px 0;
  padding: 14px 18px;
  background: var(--color-brand-50);
  border-left: 4px solid var(--color-brand-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-brand-900);
  font-family: var(--font-serif);
}

.rich-book-content ul,
.rich-book-content ol {
  margin: 8px 0 14px;
  padding-left: 22px;
}

.rich-book-content li {
  margin-bottom: 5px;
}

.rich-book-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 18px 0;
}

.rich-book-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.88rem;
}

.rich-book-content th,
.rich-book-content td {
  border: 1px solid var(--color-border-strong);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.rich-book-content th {
  background: var(--color-brand-50);
  color: var(--color-brand-900);
  font-weight: 700;
  width: 28%;
}

.rich-book-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin: 10px 0;
}

/* ==========================================================================
   Toast Notification & Modal / Sheet Base
   ========================================================================== */
.toast-container {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
}

.toast-item {
  background: var(--color-brand-900);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
  border-left: 4px solid var(--color-brand-500);
  animation: toastIn 0.22s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 24, 0.56);
  backdrop-filter: blur(2px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.is-open {
  display: flex;
  animation: modalBackdropIn 0.22s ease both;
}

.modal-backdrop.is-open .modal-panel {
  animation: modalPopIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes modalBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-panel {
  background: var(--color-surface);
  width: 100%;
  max-width: 840px;
  max-height: min(92vh, 92dvh);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.modal-panel.modal-sm {
  max-width: 520px;
}

.modal-header,
.modal-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--color-brand-50);
}

.modal-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
}

.modal-close,
.modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer,
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.postcode-result-item {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.postcode-result-item:hover {
  border-color: var(--color-brand-500);
  background: var(--color-brand-50);
}

/* Responsive Shared Form & Modal Adjustments */
@media (max-width: 1023px) {
  .btn-sm {
    min-height: 40px;
  }

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

@media (max-width: 767px), (hover: none) and (pointer: coarse) {
  /* Prevent mobile & unfolded foldable touch auto-zoom on input focus */
  .form-input,
  .toolbar-select,
  .store-search-select,
  .store-search-input,
  .admin-stock-mini-input,
  .wysiwyg-select,
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

@media (max-height: 520px) {
  .modal-backdrop {
    padding: 8px;
  }
  .modal-panel,
  .modal-panel.modal-sm {
    max-height: min(94vh, 94dvh);
  }
  .modal-header,
  .modal-head {
    padding: 10px 14px;
  }
  .modal-body {
    padding: 12px 14px;
  }
  .modal-footer {
    padding: 8px 14px;
  }
}

@media (max-width: 767px) {

  .panel-card {
    padding: 16px;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .inline-input-group {
    flex-wrap: wrap;
  }

  .inline-input-group .btn {
    flex: 1 1 auto;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-panel,
  .modal-panel.modal-sm {
    max-width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .modal-footer .btn {
    flex: 1;
  }

  .modal-backdrop.is-open .modal-panel {
    animation: modalSheetUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

@keyframes modalSheetUp {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Shared Dynamic Motion, Scroll-Reveal & Micro-Interaction Utilities
   ========================================================================== */
@keyframes viewFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-enter-anim {
  animation: viewFadeSlideIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reveal-on-scroll {
  opacity: 1;
  transform: none;
  transition: none;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: none;
}

@keyframes badgePopBounce {
  0%   { transform: scale(1); }
  38%  { transform: scale(1.38); }
  72%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.badge-pop {
  animation: badgePopBounce 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}
