/* print page CSS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
  align-items: stretch;
}
.title-card {
  text-decoration: none;
  color: var(--cream);
  background: var(--ink-card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-s);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 486px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.title-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
.card-cover {
  position: relative;
  width: 100%;
  height: 260px;
  flex: 0 0 260px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

#printGrid .card-cover::after {
  content: "▶ View More";
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Release badge — gold for regular, rose for limited */
.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-family: var(--font-b);
}
.card-badge.limited {
  background: var(--rose);
  color: #fff;
}
/* PRINT pill top-left */
.card-edition-flag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(8, 5, 8, 0.72);
  border: 1px solid var(--border);
  color: var(--gold-lt);
  font-size: 9px;
  font-family: var(--font-b);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}
.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-genre {
  font-size: 12px;
  color: var(--rose);
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.card-format {
  font-size: 10px;
  font-family: var(--font-b);
  color: var(--muted);
  border: 1px solid var(--border-s);
  border-radius: 20px;
  padding: 2px 8px;
  margin-bottom: 6px;
  display: inline-block;
  width: fit-content;
}
.card-title {
  font-size: 15px;
  margin-bottom: 0;
  color: var(--cream);
  font-family: var(--font-b);
  font-weight: 500;
  line-height: 1.35;
  min-height: 62px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.print-card-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 42px;
  margin: 0 0 2px;
  flex-wrap: wrap;
}
.card-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 22px;
}
.card-price {
  color: var(--gold-lt);
  font-weight: 700;
  font-family: var(--font-b);
  font-size: 13px;
}
.card-price-ltd {
  color: var(--rose);
  font-weight: 600;
  font-family: var(--font-b);
  font-size: 12px;
}

.card-badge.preorder {
  background: rgba(196, 100, 122, 0.9);
  color: #fff;
  border-color: rgba(196, 100, 122, 0.55);
}

.btn-nav-cart {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: rgba(201, 160, 80, 0.08);
  border: 1px solid rgba(201, 160, 80, 0.32);
  border-radius: 6px;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-nav-cart:hover {
  transform: translateY(-1px);
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(201, 160, 80, 0.22);
}

.btn-nav-cart:active {
  transform: translateY(0);
}

.print-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.btn-print-cart,
.btn-print-now {
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  border-radius: 6px;
  font-family: var(--font-b);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn-print-cart {
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold), var(--gold-lt));
  border: 1px solid var(--gold);
  box-shadow: 0 8px 18px rgba(201, 160, 80, 0.18);
}

.btn-print-now {
  color: var(--gold);
  background: rgba(201, 160, 80, 0.11);
  border: 1px solid rgba(201, 160, 80, 0.65);
}

.btn-print-cart:hover,
.btn-print-now:hover {
  transform: translateY(-2px);
}

.btn-print-cart:hover {
  box-shadow: 0 12px 24px rgba(201, 160, 80, 0.28);
  filter: brightness(1.05);
}

.btn-print-now:hover {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 10px 22px rgba(201, 160, 80, 0.2);
}

.btn-print-cart:active,
.btn-print-now:active {
  transform: translateY(0);
}

body.light-mode .title-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
body.light-mode .title-card:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

body.light-mode .btn-nav-cart {
  background: rgba(122, 93, 34, 0.08);
  border-color: rgba(122, 93, 34, 0.24);
}

body.light-mode .btn-print-now {
  background: rgba(122, 93, 34, 0.05);
}

@media (max-width: 520px) {
  .print-card-actions {
    grid-template-columns: 1fr;
  }

  .title-card {
    min-height: 0;
  }

  .btn-nav-cart {
    width: 34px;
    height: 34px;
  }
}
/* CHIP ICON STYLE */
.ch-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: rgba(245, 237, 232, 0.8);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: background 0.2s;
  white-space: nowrap;
}
.ch-chip:hover {
  background: rgba(212, 175, 55, 0.2);
}

.ch-chip-icon {
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ch-chip-icon svg {
  width: 15px;
  height: 15px;
  stroke: #c4647a;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: 0.2s ease;
}
.ch-chip:hover .ch-chip-icon svg {
  stroke: #fff;
  transform: scale(1.05);
}

.ch-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.6);
  animation: ch-bounce 1.2s infinite ease-in-out;
  display: inline-block;
}
.ch-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.ch-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes ch-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
}

.ch-msg-user {
  max-width: 88%;
  font-size: 13px;
  line-height: 1.55;
  padding: 9px 13px;
  border-radius: 14px;
  border-bottom-right-radius: 4px;
  background: linear-gradient(135deg, #c4647a, #b84060);
  color: #fff;
  align-self: flex-end;
  word-break: break-word;
}
.ch-msg-bot {
  max-width: 95%;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 13px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: #f0e8e3;
  align-self: flex-start;
  word-break: break-word;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ch-msg-bot a {
  color: #d4af37;
  text-decoration: underline;
}

.ch-book-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 10px;
  margin-top: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none !important;
  transition: background 0.2s;
}
.ch-book-card:hover {
  background: rgba(212, 175, 55, 0.08);
}
.ch-book-cover {
  width: 52px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
}
.ch-book-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.ch-book-title {
  color: #f5ede8;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}
.ch-book-genre {
  color: rgba(212, 175, 55, 0.8);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.ch-book-price {
  color: #d4af37;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}
.ch-read-btn {
  display: inline-block;
  margin-top: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c4647a, #b84060);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.3px;
}

#ch-messages::-webkit-scrollbar {
  width: 4px;
}
#ch-messages::-webkit-scrollbar-track {
  background: transparent;
}
#ch-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

/* separate print CSS */
.title-page-wrap {
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 80px;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: clamp(16px, 3vw, 48px);
  padding-right: clamp(16px, 3vw, 48px);
}
.title-layout {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: 40px;
  align-items: start;
}
.title-cover-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 0 1px var(--border);
  margin-bottom: 20px;
}
.title-cover-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
.title-cover-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--rose);
  color: #fff;
  font-family: var(--font-b);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 3px;
  text-transform: uppercase;
}
.title-meta-box {
  background: var(--ink-card);
  border: 1px solid var(--border-s);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.title-meta-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.title-meta-label {
  font-family: var(--font-b);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.title-meta-value {
  font-family: var(--font-b);
  font-size: 13px;
  color: var(--cream-soft);
  line-height: 1.4;
}
.title-meta-value.gold {
  color: var(--gold);
}
.title-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.title-kw {
  background: var(--gold-dim);
  border: 1px solid var(--border);
  color: var(--gold-lt);
  font-family: var(--font-b);
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.06em;
}
.title-credits {
  background: var(--ink-card);
  border: 1px solid var(--border-s);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.title-credit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.credit-role {
  font-family: var(--font-b);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.credit-name {
  font-family: var(--font-s);
  font-size: 14px;
  color: var(--cream);
  font-weight: 600;
}
.volume-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.vol-tab {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--ink-card);
  border: 1px solid var(--border-s);
  border-radius: var(--r-lg);
  padding: 12px 18px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  min-width: 130px;
}
.vol-tab:hover {
  border-color: var(--gold);
}
.vol-tab.active {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.vol-tab-label {
  font-family: var(--font-b);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.vol-tab-title {
  font-family: var(--font-b);
  font-size: 13px;
  color: var(--cream);
  font-weight: 600;
}
.vol-tab-range {
  font-family: var(--font-b);
  font-size: 10px;
  color: var(--muted);
}
.vol-tab-price {
  font-family: var(--font-b);
  font-size: 11px;
  color: var(--gold-lt);
  margin-top: 2px;
}
.vol-panel {
  display: none;
}
.vol-panel.active {
  display: block;
}
.title-series-tag {
  font-family: var(--font-b);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.title-name {
  font-family: var(--font-d);
  font-size: clamp(20px, 4vw, 42px);
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 8px;
}
.title-subtitle {
  font-family: var(--font-s);
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 20px;
  font-style: italic;
}
.title-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stars {
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 2px;
}
.rating-count {
  font-family: var(--font-b);
  font-size: 12px;
  color: var(--muted);
}
.title-synopsis-label {
  font-family: var(--font-b);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.title-synopsis {
  font-family: var(--font-s);
  font-size: 16px;
  color: var(--cream-soft);
  line-height: 1.75;
  margin-bottom: 28px;
}
.buy-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.btn-buy-volume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-lt) 100%);
  color: var(--ink);
  border: none;
  border-radius: var(--r-lg);
  padding: 14px 22px;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.15s;
  text-decoration: none;
}
.btn-buy-volume:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-buy-volume.ltd {
  background: linear-gradient(135deg, var(--rose) 0%, #e0608a 100%);
}
.bonus-section {
  margin-bottom: 28px;
}
.bonus-section-label {
  font-family: var(--font-b);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.bonus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bonus-item {
  background: var(--ink-card);
  border: 1px solid var(--border-s);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bonus-name {
  font-family: var(--font-b);
  font-size: 12px;
  color: var(--cream);
  font-weight: 600;
}
.bonus-desc {
  font-family: var(--font-b);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.bonus-tag {
  display: inline-block;
  font-family: var(--font-b);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
  width: fit-content;
}
.bonus-tag.reg {
  background: rgba(100, 200, 100, 0.12);
  border: 1px solid rgba(100, 200, 100, 0.3);
  color: #7ec97e;
}
.bonus-tag.ltd {
  background: rgba(220, 80, 120, 0.12);
  border: 1px solid rgba(220, 80, 120, 0.3);
  color: #e87fa0;
}
.mini-info-card {
  background: var(--ink-card);
  border: 1px solid var(--border-s);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  margin-bottom: 16px;
}
.mini-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-s);
  font-family: var(--font-b);
  font-size: 12px;
}
.mini-info-row:last-child {
  border-bottom: none;
}
.mini-info-row .label {
  color: var(--muted);
}
.mini-info-row .value {
  color: var(--cream-soft);
  font-weight: 500;
}
.mini-info-row .value.gold {
  color: var(--gold);
}
.availability-card {
  background: var(--ink-card);
  border: 1px solid var(--border-s);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 16px;
}
.avail-title {
  font-family: var(--font-b);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.avail-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-s);
}
.print-editions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.print-edition-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.print-edition-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.print-ed-name {
  font-family: var(--font-b);
  font-size: 12px;
  color: var(--cream-soft);
}
.print-ed-vol {
  font-family: var(--font-b);
  font-size: 10px;
  color: var(--muted);
}
.btn-print-buy {
  background: none;
  border: 1px solid var(--border-s);
  color: var(--muted);
  font-family: var(--font-b);
  font-size: 10px;
  padding: 5px 10px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.btn-print-buy:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.divider-line {
  border: none;
  border-top: 1px solid var(--border-s);
  margin: 16px 0;
}
@media (max-width: 1100px) {
  .title-layout {
    grid-template-columns: 200px 1fr 240px;
    gap: 28px;
  }
}
@media (max-width: 900px) {
  .title-layout {
    grid-template-columns: 180px 1fr;
    gap: 24px;
  }
  .title-right {
    grid-column: 1 / -1;
  }
}
@media (max-width: 680px) {
  .title-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .title-left {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 14px;
    align-items: start;
  }
  .title-cover-wrap {
    margin-bottom: 0;
  }
  .bonus-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .title-left {
    grid-template-columns: 1fr;
  }
  .title-cover-wrap {
    max-width: 180px;
    margin-bottom: 14px;
  }
  .title-page-wrap {
    padding-left: 14px;
    padding-right: 14px;
    padding-top: calc(var(--nav-h) + 16px);
  }
}
