:root {
  --isd-tv-ink: #17352a;
  --isd-tv-green: #1f5b43;
  --isd-tv-green-2: #2d7658;
  --isd-tv-cream: #f7f1e7;
  --isd-tv-paper: #fffdf9;
  --isd-tv-gold: #d77b37;
  --isd-tv-line: #e2d8ca;
  --isd-tv-muted: #68756f;
}

.isd-tv-shelf {
  max-width: 1180px;
  margin: 0 auto 54px;
  padding: 42px 24px 46px;
  border: 1px solid var(--isd-tv-line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 8%, rgba(215, 123, 55, .13), transparent 30%),
    linear-gradient(145deg, #fffdf9 0%, #f6f0e7 100%);
  box-shadow: 0 24px 70px rgba(36, 57, 47, .10);
  color: var(--isd-tv-ink);
}

.isd-tv-shelf * { box-sizing: border-box; }

.isd-tv-shelf__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.isd-tv-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--isd-tv-gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.isd-tv-shelf h2 {
  margin: 0;
  color: var(--isd-tv-ink);
  font-size: clamp(27px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.12;
}

.isd-tv-shelf__head p {
  margin: 11px 0 0;
  color: var(--isd-tv-muted);
  font-size: 15px;
}

.isd-tv-member-note {
  min-width: 270px;
  padding: 15px 18px;
  border: 1px solid rgba(31, 91, 67, .15);
  border-radius: 16px;
  background: rgba(255, 255, 255, .76);
}

.isd-tv-member-note strong,
.isd-tv-member-note span { display: block; }
.isd-tv-member-note strong { color: var(--isd-tv-green); font-size: 14px; }
.isd-tv-member-note span { margin-top: 4px; color: var(--isd-tv-muted); font-size: 12px; }

.isd-tv-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.isd-tv-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(23, 53, 42, .13);
  border-radius: 20px;
  background: var(--isd-tv-paper);
  box-shadow: 0 12px 28px rgba(36, 57, 47, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.isd-tv-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(36, 57, 47, .14);
}

.isd-tv-card__cover {
  position: relative;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: linear-gradient(150deg, #1f5b43, #17352a) center / cover no-repeat;
  color: rgba(255, 255, 255, .85);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .12em;
}

.isd-tv-card__cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 25%;
  background: linear-gradient(transparent, rgba(8, 20, 15, .33));
  pointer-events: none;
}

.isd-tv-card__level {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  background: rgba(18, 45, 34, .76);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  backdrop-filter: blur(6px);
}

.isd-tv-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.isd-tv-card__eyebrow {
  color: var(--isd-tv-gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.isd-tv-card h3 {
  margin: 5px 0 8px;
  color: var(--isd-tv-ink);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1.35;
}

.isd-tv-card__body > p {
  min-height: 48px;
  margin: 0 0 13px;
  color: var(--isd-tv-muted);
  font-size: 12px;
  line-height: 1.55;
}

.isd-tv-card dl { margin: auto 0 14px; }
.isd-tv-card dl > div {
  display: grid;
  grid-template-columns: 55px 1fr;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px dashed #e6ded3;
  font-size: 11px;
}
.isd-tv-card dt { color: #829088; font-weight: 700; }
.isd-tv-card dd { margin: 0; color: #374a41; font-weight: 800; text-align: right; }

.isd-tv-card__button {
  width: 100%;
  min-height: 43px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--isd-tv-green), var(--isd-tv-green-2));
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(31, 91, 67, .18);
}

.isd-tv-card__button:hover,
.isd-tv-card__button:focus-visible { filter: brightness(1.08); }
.isd-tv-card__button.is-disabled { display: grid; place-items: center; background: #e7e2da; color: #8b8a84; box-shadow: none; }

.isd-tv-reader {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: #101713;
  color: #fff;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

.isd-tv-reader.is-open { display: grid; }
.isd-tv-reader * { box-sizing: border-box; }

.isd-tv-reader__bar,
.isd-tv-reader__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  background: rgba(13, 25, 19, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .11);
}

.isd-tv-reader__bar strong {
  max-width: min(60vw, 760px);
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.isd-tv-tools { display: flex; gap: 6px; }
.isd-tv-tool,
.isd-tv-reader__nav button {
  min-width: 42px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.isd-tv-tool:hover,
.isd-tv-reader__nav button:hover { background: rgba(255, 255, 255, .17); }
.isd-tv-tool:disabled,
.isd-tv-reader__nav button:disabled { cursor: not-allowed; opacity: .36; }

.isd-tv-reader__stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  display: grid;
  place-items: center;
  scrollbar-width: thin;
  background:
    radial-gradient(circle at 50% 20%, rgba(83, 122, 100, .26), transparent 45%),
    #101713;
}

.isd-tv-pagewrap {
  position: relative;
  width: min(100%, 880px);
  line-height: 0;
  transform-origin: 50% 0;
  transition: transform .14s ease;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, .45));
}

.isd-tv-page {
  display: block;
  width: 100%;
  max-height: calc(100vh - 165px);
  object-fit: contain;
  background: #fff;
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
}

.isd-tv-watermarks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  line-height: 1.2;
}

.isd-tv-watermarks span {
  position: absolute;
  color: rgba(54, 75, 65, .16);
  font-size: clamp(10px, 1.4vw, 16px);
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-28deg);
  text-shadow: 0 1px rgba(255, 255, 255, .25);
}

.isd-tv-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(20, 29, 24, .80);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}
.isd-tv-loading[hidden] { display: none; }

.isd-tv-limit-notice {
  padding: 11px 18px;
  border-top: 1px solid rgba(215, 123, 55, .42);
  background: #fff3df;
  color: #6a421e;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.isd-tv-reader__nav {
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, .11);
  border-bottom: 0;
}
.isd-tv-reader__nav span { min-width: 105px; text-align: center; font-variant-numeric: tabular-nums; }
.isd-tv-reader__nav button { min-width: 92px; }

.isd-tv-error {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 28px;
  background: rgba(13, 24, 18, .97);
  text-align: center;
  line-height: 1.55;
}
.isd-tv-error[hidden] { display: none; }
.isd-tv-error h3 { margin: 0 0 8px; color: #fff; font-size: 24px; }
.isd-tv-error p { max-width: 560px; margin: 0 auto 22px; color: #c8d4ce; }
.isd-tv-error > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.isd-tv-error a { padding: 11px 16px; border-radius: 999px; background: var(--isd-tv-green-2); color: #fff; font-weight: 900; text-decoration: none; }
.isd-tv-error a:nth-child(2) { background: var(--isd-tv-gold); }
.isd-tv-error a:nth-child(3) { background: #33443b; }

body.isd-tv-reading { overflow: hidden !important; }

@media (max-width: 1100px) {
  .isd-tv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .isd-tv-shelf { margin: 0 12px 38px; padding: 28px 16px 30px; border-radius: 23px; }
  .isd-tv-shelf__head { align-items: stretch; flex-direction: column; gap: 16px; }
  .isd-tv-member-note { min-width: 0; }
  .isd-tv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .isd-tv-card__body { padding: 13px; }
  .isd-tv-card h3 { font-size: 14px; }
  .isd-tv-card__body > p { min-height: 0; }
  .isd-tv-reader__stage { align-items: start; padding: 10px 0; }
  .isd-tv-pagewrap { width: 100%; }
  .isd-tv-page { width: 100%; max-height: none; height: auto; object-fit: contain; }
  .isd-tv-reader__bar { padding-top: max(9px, env(safe-area-inset-top)); }
  .isd-tv-tool span { display: none; }
  .isd-tv-reader__nav { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (max-width: 430px) {
  .isd-tv-grid { grid-template-columns: 1fr; }
  .isd-tv-card { display: grid; grid-template-columns: minmax(112px, 38%) 1fr; }
  .isd-tv-card__cover { height: 100%; min-height: 250px; aspect-ratio: auto; }
  .isd-tv-card dl > div { grid-template-columns: 48px 1fr; }
  .isd-tv-card__body > p { font-size: 11px; }
  .isd-tv-tools { gap: 3px; }
  .isd-tv-tool { min-width: 36px; min-height: 36px; padding: 0 8px; }
  .isd-tv-reader__bar strong { max-width: 42vw; font-size: 12px; }
  .isd-tv-reader__nav button { min-width: 76px; }
}

@media print {
  body * { visibility: hidden !important; }
  body::before {
    content: "보호된 전자책은 인쇄할 수 없습니다.";
    visibility: visible !important;
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: #fff;
    color: #111;
    font: 700 20px sans-serif;
  }
}

