:root {
  --bg: #eef2f7;
  --ink: #1f2a37;
  --ink-soft: #617087;
  --accent: #3c6ea8;
  --accent-dark: #2f5684;
  --line: #d6dee8;
  --card: #ffffff;
  --shadow: 0 20px 50px rgba(20, 35, 55, 0.12);
  --font-display: "Georgia", "Times New Roman", serif;
  --font-ui: "Segoe UI", "Trebuchet MS", sans-serif;
}


.body-reader {
  height: 100vh;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: radial-gradient(circle at top left, #f3f6fb 0%, #eef2f7 45%, #e7edf5 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  padding: 14px 5vw 16px;
  background: rgba(241, 246, 252, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.topbar-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.brand-mark {
  width: 12px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), #9fc0e3);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.icon-circle {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--accent);
}

.icon-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 2px solid var(--line);
}

.profile-menu {
  position: absolute;
  top: 68px;
  left: 5vw;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px;
  min-width: 180px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 30;
}

.profile-menu.is-open {
  display: flex;
}

.profile-menu a,
.profile-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 8px;
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: rgba(60, 110, 168, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 0.8rem;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 6px;
}

.profile-menu a:hover,
.profile-menu button:hover {
  background: rgba(60, 110, 168, 0.12);
}

.icon-bell {
  width: 18px;
  height: 18px;
  display: block;
  border: 2px solid var(--accent);
  border-radius: 6px 6px 10px 10px;
  position: relative;
}

.icon-bell::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 6px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--accent);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--card);
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.header-search input {
  border: none;
  background: transparent;
  font-size: 0.95rem;
  outline: none;
  color: var(--ink);
  width: 100%;
  padding-right: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-search input::placeholder {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.header-search button {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 40px;
}

.search-text {
  display: none;
}

.search-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  position: relative;
  display: inline-block;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: #fff;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
  border-radius: 2px;
}

main {
  flex: 1;
  padding: 48px 6vw 60px;
}

.main-reader {
  padding: 0 5vw 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: auto;
}

.body-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.category-select {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink-soft);
}

.category-filter {
  margin: 0;
}

.category-select span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.category-select select {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-family: var(--font-ui);
}

.library-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 18px;
}

.library-section {
  margin-top: 36px;
  display: grid;
  gap: 16px;
}

.library-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.library-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.library-section-subtitle {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 420px;
}

.book-card {
  background: transparent;
}

.book-card-link {
  display: grid;
  gap: 10px;
  color: inherit;
}

.book-cover {
  width: 100%;
  aspect-ratio: 155 / 238;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.book-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.rating-star {
  width: 12px;
  height: 12px;
  background: var(--accent);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

.cover-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.empty-state {
  margin: 0;
  color: var(--ink-soft);
}

.detail-page {
  display: grid;
  gap: 20px;
}

.detail-card {
  display: grid;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.detail-cover {
  width: 85px;
  aspect-ratio: 155 / 238;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-info {
  display: grid;
  gap: 10px;
}

.detail-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.detail-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
}

.detail-meta {
  margin: 0;
  color: var(--ink-soft);
}

.detail-rating {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.detail-rating-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-rating-bottom {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.detail-description {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.detail-btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

@media (min-width: 900px) {
  .detail-card {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 22px;
  }

  .detail-cover {
    width: 240px;
  }

  .detail-title {
    font-size: 1.8rem;
  }
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 6vw 32px;
  color: var(--ink-soft);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.reader-topbar {
  padding: 14px 5vw;
}

.reader-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reader-back {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--ink);
}

.reader-back img {
  width: 18px;
  height: 18px;
  display: block;
}

.reader-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.reader-edit {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.reader-delete {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reader-delete img {
  width: 16px;
  height: 16px;
  display: block;
}

.reader-shell {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  perspective: 1200px;
}

.reader-shell--full {
  flex: 1;
  min-height: 0;
}

.reader-track {
  display: flex;
  transition: transform 0.35s ease;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.reader-track.is-dragging {
  transition: none;
}

.reader-page {
  flex: 0 0 100%;
  padding: 0;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.35s ease;
}

.reader-page.is-tilting {
  transition: none;
}

.reader-leaf {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 20px;
  box-shadow: var(--shadow);
  height: 100%;
  overflow: auto;
}

.reader-leaf .ProseMirror {
  outline: none;
  white-space: pre-wrap;
}

.reader-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.reader-prev {
  left: 10px;
}

.reader-next {
  right: 10px;
}

.form-shell {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.form-card {
  width: min(420px, 92vw);
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 12px;
}

.form-back {
  justify-self: start;
}

.form-card h1 {
  margin: 0;
  font-size: 1.4rem;
}

.form-card p {
  margin: 0;
  color: var(--ink-soft);
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.login-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: rgba(60, 110, 168, 0.08);
  margin: 0 auto 6px;
}

.svgContainer {
  width: 160px;
  height: 160px;
  margin: 0 auto 6px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: rgba(60, 110, 168, 0.08);
  overflow: hidden;
  pointer-events: none;
}

.svgContainer > div {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
}

.svgContainer .mySVG {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mouth-bg {
  display: none;
}

.mouth-bg.is-active {
  display: block;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-family: var(--font-ui);
}

.form-group textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-family: var(--font-ui);
  min-height: 120px;
  resize: vertical;
}

.form-group input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
}

.form-check input {
  width: 18px;
  height: 18px;
}

.form-group .errorlist,
.form-check .errorlist {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: #b00020;
  font-size: 0.85rem;
}

.char-count {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: right;
}

.char-count.is-over {
  color: #b00020;
}

.cover-upload {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.cover-preview {
  width: 155px;
  aspect-ratio: 155 / 238;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-preview .cover-placeholder {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-actions {
  display: grid;
  gap: 10px;
}

.form-actions .btn,
.form-actions .btn-ghost {
  width: 100%;
  text-align: center;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  color: var(--ink-soft);
  font-weight: 600;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.social-actions {
  display: grid;
  gap: 10px;
}

.editor-shell {
  display: grid;
  gap: 16px;
}

.editor-header h1 {
  margin: 0;
  font-size: 1.3rem;
}

.editor-header p {
  margin: 0;
  color: var(--ink-soft);
}

.editor-form {
  display: grid;
  gap: 16px;
}

.editor-canvas {
  position: relative;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-icon-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.editor-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.editor-color {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.editor-color input[type="color"] {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.editor-surface {
  min-height: 480px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 16px;
  box-shadow: var(--shadow);
  outline: none;
  overflow: auto;
}

.editor-surface .ProseMirror {
  min-height: 448px;
  outline: none;
  white-space: pre-wrap;
}

.editor-surface img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
  -webkit-user-drag: auto;
  user-select: auto;
}

.editor-surface .image-resizer,
.editor-surface .image-resize,
.editor-surface .resize-image,
.editor-surface [data-resize-image] {
  max-width: 100%;
}

.editor-surface--fallback:empty::before {
  content: "Start writing your leaf...";
  color: var(--ink-soft);
}

.editor-image-remove {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-weight: 700;
  z-index: 2;
}

.editor-image-remove.is-visible {
  display: inline-flex;
}

.editor-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.editor-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.editor-link {
  color: var(--accent-dark);
  font-weight: 600;
}

.detail-layout {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: nowrap;
}

.detail-cover {
  width: min(62vw, 220px);
  aspect-ratio: 155 / 238;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-author {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.detail-date {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.detail-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.detail-actions-row form {
  margin: 0;
}

.save-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  line-height: 1;
}

.save-btn img {
  width: 16px;
  height: 16px;
  display: block;
}

.detail-sep {
  color: var(--line);
}

.detail-read img {
  width: 16px;
  height: 16px;
  display: block;
}

.detail-pages {
  display: inline-flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  font-weight: 600;
  line-height: 1.1;
}

.detail-pages-count {
  font-size: 0.95rem;
}

.detail-pages-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.detail-about {
  margin-top: 20px;
  display: grid;
  gap: 8px;
}

.detail-about h2 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink);
}

.detail-about p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.detail-reviews {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.detail-reviews h2 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink);
}

.detail-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.detail-review-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.detail-review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.detail-review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbe7f5, #f7f9fc);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  overflow: hidden;
}

.detail-review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-review-name {
  color: var(--ink);
}

.detail-review-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.detail-review-stars {
  color: var(--accent-dark);
  font-weight: 700;
}

.detail-review-comment {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.4;
}

.detail-review-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.detail-review-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
}

.detail-review-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.detail-review-form textarea {
  resize: vertical;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.detail-review-stars-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-star-button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.detail-star-button .rating-star {
  width: 16px;
  height: 16px;
  background: var(--line);
}

.detail-star-button.is-active .rating-star {
  background: var(--accent);
}

.detail-review-submit {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
}

.detail-review-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.detail-review-error {
  margin: 0;
  color: #b84a4a;
  font-size: 0.85rem;
}

.detail-review-signin {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.cover-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  main {
    padding: 36px 6vw 52px;
  }
}

@media (min-width: 900px) {
  .topbar {
    padding: 18px 8vw 20px;
  }

  .header-search {
    max-width: 520px;
    margin: 0 auto;
  }

  .header-search input {
    padding-right: 110px;
  }

  .header-search button {
    padding: 10px 18px;
  }

  .search-text {
    display: inline;
  }

  .search-icon {
    display: none;
  }
}
