.walone-ebook-viewer {
  margin: clamp(2rem, 5vw, 4rem) auto;
  padding: 0 1rem;
}

.walone-ebook-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(22, 101, 52, 0.18);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.walone-ebook-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.walone-ebook-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: #15803d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.walone-ebook-header h2 {
  margin: 0;
  color: #052e16;
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  line-height: 1.05;
}

.walone-ebook-header p {
  margin: 0.4rem 0 0;
  color: #475569;
}

.walone-ebook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.walone-ebook-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.24);
}

.walone-ebook-button:hover,
.walone-ebook-button:focus {
  background: #15803d;
  color: #fff;
}

.walone-ebook-button.secondary {
  background: #ecfdf5;
  color: #14532d;
  box-shadow: none;
}

.walone-ebook-description {
  margin: 1rem 0;
  color: #334155;
}

.walone-ebook-description p:last-child {
  margin-bottom: 0;
}

.walone-ebook-mobile-tools {
  display: none;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0;
  padding: 0.85rem;
  border: 1px solid rgba(22, 101, 52, 0.16);
  border-radius: 18px;
  background: #f0fdf4;
  color: #14532d;
}

.walone-ebook-mobile-tools strong {
  font-weight: 900;
}

.walone-ebook-mobile-tools span {
  flex: 1 1 220px;
  color: #334155;
  font-size: 0.92rem;
}

.walone-ebook-mobile-tools a,
.walone-ebook-fallback a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #14532d;
  font-weight: 800;
  text-decoration: none;
}

.walone-ebook-mobile-tools a:last-child,
.walone-ebook-fallback a:last-child {
  background: #16a34a;
  color: #fff;
}

.walone-ebook-viewer.is-touch-preview .walone-ebook-mobile-tools {
  display: flex;
  flex-wrap: wrap;
}


.walone-ebook-frame-wrap {
  position: relative;
  overflow: hidden;
  min-height: min(70vh, var(--walone-ebook-height));
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 20px;
  background: #0f172a;
}

.walone-ebook-frame {
  display: block;
  width: 100%;
  height: min(82vh, var(--walone-ebook-height));
  min-height: 420px;
  border: 0;
  background: #fff;
}

.walone-ebook-fallback {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #334155;
  font-size: 0.92rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16);
}

.walone-ebook-frame-wrap.is-loaded .walone-ebook-fallback {
  display: none;
}

.walone-ebook-notice {
  max-width: 960px;
  margin: 2rem auto;
  padding: 1rem;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

@media (max-width: 720px) {
  .walone-ebook-shell {
    border-radius: 20px;
  }

  .walone-ebook-header {
    align-items: stretch;
    flex-direction: column;
  }

  .walone-ebook-actions {
    justify-content: stretch;
  }

  .walone-ebook-button {
    flex: 1 1 140px;
  }

  .walone-ebook-mobile-tools {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .walone-ebook-mobile-tools a {
    width: 100%;
  }

  .walone-ebook-frame-wrap {
    min-height: min(68vh, var(--walone-ebook-height));
  }

  .walone-ebook-frame {
    height: 68vh;
    min-height: 340px;
  }
}
