:root {
  --bg: #f9f5eb;
  --bg-accent: #e8f4ff;
  --text: #1f2933;
  --frame: #fefefe;
  --line: #d9dde3;
  --action: #e86d3f;
  --action-text: #fff9f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--bg-accent), transparent 30%),
    linear-gradient(135deg, #fff8ef, var(--bg));
  min-height: 100vh;
}

.layout {
  width: min(1240px, 96vw);
  margin: 0 auto;
  padding: 2.25rem 0 3rem;
}

.brand {
  margin-bottom: 1.5rem;
}

.banner-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(20, 40, 70, 0.16);
}

.main-banner {
  display: block;
  width: 100%;
  height: auto;
  min-height: 170px;
  object-fit: cover;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.kicker {
  margin: 0;
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  padding: 0.35rem 0.6rem;
  background: rgba(20, 40, 70, 0.68);
  color: #fff;
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.banner-link {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  background: var(--action);
  color: var(--action-text);
  font-weight: 700;
}

.banner-link:hover,
.banner-link:focus-visible {
  filter: brightness(0.95);
}

.reader {
  background: var(--frame);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 8px 28px rgba(20, 40, 70, 0.12);
}

.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.comic-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.comic-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

select,
button {
  font: inherit;
}

select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.page-frame {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #f7f9fb;
}

#comic-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fefefe;
  max-height: 82vh;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#comic-pdf-stage {
  display: none;
  width: 100%;
  min-height: 220px;
  max-height: 82vh;
  background: #fff;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

#comic-pdf-canvas {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  background: #fff;
  -webkit-user-select: none;
  user-select: none;
}

#page-caption {
  margin: 0;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: var(--action);
  color: var(--action-text);
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#comic-status {
  margin: 0;
  min-width: 10ch;
  font-size: 0.92rem;
  font-weight: 700;
}

#page-status {
  min-width: 9ch;
  margin: 0;
  text-align: center;
}

.site-footer {
  margin-top: 1.25rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: #4f5b66;
}
