.journal-period-card {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 100%;
}

#journal-flipbook {
  max-width: 64rem;
  margin: 0 auto;
}

.journal-hidden-input {
  display: none;
}

/* ── Cover ── */

.journal-book-cover {
  position: relative;
  max-width: 28rem;
  margin: 0 auto;
  cursor: pointer;
  perspective: 1500px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.journal-book-cover.is-opening {
  opacity: 0;
  transform: scale(0.95);
}

.journal-book-cover-inner {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  min-height: 34rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #8B4513 0%, #654321 50%, #4a3520 100%);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.35);
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

.journal-book-cover:hover .journal-book-cover-inner {
  transform: rotateY(-5deg);
}

.journal-cover-noise {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
}

.journal-cover-spine-left {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.5rem;
  background: linear-gradient(to right, rgb(0 0 0 / 0.4), rgb(0 0 0 / 0.2), transparent);
  pointer-events: none;
}

.journal-book-cover::after {
  content: '';
  position: absolute;
  right: -0.5rem;
  top: 1rem;
  bottom: 1rem;
  width: 0.5rem;
  border-radius: 0 0.25rem 0.25rem 0;
  background: repeating-linear-gradient(to bottom, #f5f5dc 0, #f5f5dc 2px, #e8e8d0 2px, #e8e8d0 4px);
}

.journal-cover-edge {
  position: absolute;
  right: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 0.75rem;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.1) 30%, rgb(0 0 0 / 0.2));
  pointer-events: none;
}

.journal-book-cover-shadow {
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 2rem;
  background: rgb(0 0 0 / 0.3);
  filter: blur(1rem);
  border-radius: 9999px;
}

.journal-cover-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.journal-cover-family {
  color: rgb(253 230 138 / 0.9);
  font-size: 1.125rem;
  letter-spacing: 0.15em;
  font-family: var(--font-serif, Georgia, serif);
  text-shadow: 1px 1px 2px rgb(0 0 0 / 0.5);
}

.journal-cover-name {
  color: rgb(254 243 199);
  font-size: 1.875rem;
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgb(0 0 0 / 0.5);
}

.journal-cover-photo {
  position: relative;
  width: 6rem;
  height: 7rem;
  border-radius: 0.125rem;
  border: 2px solid rgb(253 230 138 / 0.5);
  background: rgb(253 230 138 / 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgb(253 230 138 / 0.7);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.25rem;
  cursor: pointer;
}

.journal-cover-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journal-cover-photo-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.journal-cover-photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.5);
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
  font-size: 1.25rem;
}

.journal-cover-photo:hover .journal-cover-photo-overlay {
  opacity: 1;
}

.journal-cover-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 17.5rem;
  aspect-ratio: 1;
  margin: 0 auto;
}

.journal-cover-frame-image {
  position: absolute;
  inset: 1rem;
  border-radius: 0.25rem;
  overflow: hidden;
}

.journal-cover-frame-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.journal-cover-frame-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgb(120 53 15 / 0.2), transparent);
  pointer-events: none;
}

.journal-cover-corner {
  position: absolute;
  width: 2rem;
  height: 2rem;
  pointer-events: none;
  z-index: 2;
}

.journal-cover-corner-tl { top: 0.5rem; left: 0.5rem; border-top: 2px solid rgb(253 230 138 / 0.5); border-left: 2px solid rgb(253 230 138 / 0.5); border-radius: 0.25rem 0 0 0; }
.journal-cover-corner-tr { top: 0.5rem; right: 0.5rem; border-top: 2px solid rgb(253 230 138 / 0.5); border-right: 2px solid rgb(253 230 138 / 0.5); border-radius: 0 0.25rem 0 0; }
.journal-cover-corner-bl { bottom: 0.5rem; left: 0.5rem; border-bottom: 2px solid rgb(253 230 138 / 0.5); border-left: 2px solid rgb(253 230 138 / 0.5); border-radius: 0 0 0 0.25rem; }
.journal-cover-corner-br { bottom: 0.5rem; right: 0.5rem; border-bottom: 2px solid rgb(253 230 138 / 0.5); border-right: 2px solid rgb(253 230 138 / 0.5); border-radius: 0 0 0.25rem 0; }

.journal-cover-frame-border {
  position: absolute;
  inset: 0;
  border: 4px solid rgb(253 230 138 / 0.3);
  border-radius: 0.5rem;
  pointer-events: none;
}

.journal-cover-frame-border-inner {
  position: absolute;
  inset: 0.5rem;
  border: 1px solid rgb(253 230 138 / 0.2);
  border-radius: 0.25rem;
  pointer-events: none;
}

.journal-cover-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 2rem;
}

.journal-cover-story {
  color: rgb(254 243 199);
  font-size: 1.5rem;
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 700;
  text-shadow: 2px 2px 4px rgb(0 0 0 / 0.5);
}

.journal-cover-tagline {
  color: rgb(253 230 138 / 0.7);
  font-size: 0.875rem;
  font-style: italic;
  margin-top: 0.25rem;
}

.journal-cover-seal {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  border: 2px solid rgb(253 230 138 / 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #654321 0%, #4a3520 100%);
  color: rgb(254 243 199);
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.3);
}

.journal-cover-hint {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgb(253 230 138 / 0.6);
  font-size: 0.875rem;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: 1;
}

/* ── Open book ── */

.journal-flipbook-open {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.journal-flipbook-open.is-opening {
  animation: journalFadeIn 0.5s ease forwards;
}

.journal-flipbook-open.is-closing {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

@keyframes journalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.journal-flipbook-open .journal-book-toolbar {
  display: flex;
}

.journal-book-toolbar {
  display: none;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.journal-period-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.journal-period-tab {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.journal-period-tab.is-active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.journal-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.journal-search-mode {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.journal-search-mode.is-active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.journal-search-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}

.journal-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  opacity: 0.5;
  pointer-events: none;
}

.journal-search-input {
  width: 100%;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 0.625rem 2.25rem 0.625rem 2.25rem;
  font-size: 0.875rem;
  background: hsl(var(--background));
}

.journal-search-clear {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  background: transparent;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.journal-search-clear:hover {
  background: hsl(var(--muted));
}

.journal-search-results {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}

.journal-spread {
  position: relative;
  min-height: 34rem;
  perspective: 2500px;
}

.journal-page {
  position: absolute;
  top: 0;
  width: 50%;
  min-height: 34rem;
  border: 1px solid hsl(var(--border) / 0.3);
  overflow: hidden;
}

.journal-page-texture {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
}

.journal-page-left {
  left: 0;
  border-radius: 0.5rem 0 0 0.5rem;
  background: linear-gradient(to right, #fffbeb, #fef3c7);
}

.journal-page-right {
  right: 0;
  border-radius: 0 0.5rem 0.5rem 0;
  background: linear-gradient(to left, #fffbeb, #fef3c7);
}

.journal-page-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2rem;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / 0.15) 45%, rgb(0 0 0 / 0.3) 50%, rgb(0 0 0 / 0.15) 55%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.journal-page-content {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 34rem;
}

.journal-page-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
}

.journal-page-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.journal-page-body {
  flex: 1;
  overflow-y: auto;
}

.journal-page-empty {
  height: 100%;
  min-height: 30rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: hsl(var(--muted-foreground));
  padding: 2rem;
}

.journal-no-results {
  width: 100%;
  min-height: 34rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  border: 1px solid hsl(var(--border) / 0.3);
  border-radius: 0.5rem;
  background: hsl(var(--card));
}

.journal-page-empty-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  background: hsl(var(--primary) / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
}

.journal-page-title {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.journal-page-date {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-style: italic;
}

.journal-page-text {
  font-size: 0.875rem;
  line-height: 1.7;
  font-family: var(--font-serif, Georgia, serif);
  margin-bottom: 1rem;
}

/* ── Media ── */

.journal-medias-section {
  margin-top: 0.75rem;
}

.journal-medias-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}

.journal-medias-count {
  background: hsl(var(--muted));
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
}

.journal-medias-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.journal-media {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.3);
  background: hsl(var(--muted) / 0.3);
}

.journal-media-delete-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 9999px;
  background: rgb(0 0 0 / 0.65);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, transform 0.2s;
}

.journal-media:hover .journal-media-delete-btn,
.journal-media-delete-btn:focus-visible {
  opacity: 1;
}

.journal-media-delete-btn:hover {
  background: rgb(220 38 38 / 0.9);
  transform: scale(1.08);
}

.journal-media-audio .journal-media-delete-btn {
  opacity: 1;
}

#journal-flipbook[data-mode="user"] .journal-media-delete-btn {
  opacity: 0.9;
}

#journal-flipbook[data-mode="user"] .journal-media:hover .journal-media-delete-btn,
#journal-flipbook[data-mode="user"] .journal-media-delete-btn:focus-visible {
  opacity: 1;
}

.journal-media-image img {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.journal-media-image:hover img {
  transform: scale(1.05);
}

.journal-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.6), transparent);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: flex-end;
  padding: 0.5rem;
}

.journal-media-image:hover .journal-media-overlay {
  opacity: 1;
}

.journal-media-overlay span {
  color: white;
  font-size: 0.6875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-media-playable {
  cursor: pointer;
}

.journal-media-playable img {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  display: block;
}

.journal-media-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.4);
  font-size: 1rem;
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  margin: auto;
  border-radius: 9999px;
  background: hsl(var(--primary));
}

.journal-media-caption {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  color: white;
  font-size: 0.6875rem;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.8);
}

.journal-video-player {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  display: block;
}

.journal-media-audio {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: linear-gradient(to right, hsl(var(--primary) / 0.1), hsl(var(--primary) / 0.05));
}

.journal-audio-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: none;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.journal-audio-info {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
}

.journal-audio-bars {
  display: flex;
  gap: 2px;
  margin-top: 0.25rem;
}

.journal-audio-bars span {
  width: 3px;
  height: 0.75rem;
  background: hsl(var(--primary));
  border-radius: 1px;
  animation: journalBarPulse 0.8s ease-in-out infinite alternate;
}

.journal-audio-bars span:nth-child(2) { animation-delay: 0.1s; }
.journal-audio-bars span:nth-child(3) { animation-delay: 0.2s; }
.journal-audio-bars span:nth-child(4) { animation-delay: 0.3s; }

@keyframes journalBarPulse {
  from { height: 0.25rem; }
  to { height: 0.75rem; }
}

/* ── Media upload ── */

.journal-media-upload {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px dashed hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--muted) / 0.3);
}

.journal-media-upload-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}

.journal-media-upload-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.journal-media-tab {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  cursor: pointer;
}

.journal-media-tab.is-active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.journal-media-upload-btn {
  width: 100%;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--background));
  border-radius: 0.375rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 0.2s;
}

.journal-media-upload-btn:hover {
  background: hsl(var(--muted) / 0.5);
}

.journal-flipbook.is-uploading .journal-media-tab,
.journal-flipbook.is-uploading [data-action="cover-photo-upload"] {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

/* ── Music player ── */

.journal-music-player {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: linear-gradient(to right, rgb(254 243 199 / 0.5), rgb(255 251 235 / 0.5));
  border: 1px solid rgb(251 191 36 / 0.3);
  flex-shrink: 0;
}

.journal-music-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.journal-music-icon {
  font-size: 1.25rem;
}

.journal-music-meta {
  flex: 1;
  min-width: 0;
}

.journal-music-title {
  font-size: 0.875rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-music-artist {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-music-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.journal-music-play {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: none;
  background: rgb(245 158 11);
  color: white;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.journal-music-play:hover {
  background: rgb(217 119 6);
}

.journal-music-progress,
.journal-music-volume {
  flex: 1;
  height: 0.25rem;
  cursor: pointer;
  accent-color: rgb(245 158 11);
}

.journal-music-volume {
  flex: 0 0 4rem;
}

.journal-music-mute {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0.25rem;
}

/* ── Page flip animation ── */

@keyframes flipPageNext {
  0% { transform: rotateY(0deg); box-shadow: 0 0 20px rgb(0 0 0 / 0.3); }
  50% { transform: rotateY(-90deg); box-shadow: 0 0 40px rgb(0 0 0 / 0.4); }
  100% { transform: rotateY(-180deg); box-shadow: 0 0 20px rgb(0 0 0 / 0.3); }
}

@keyframes flipPagePrev {
  0% { transform: rotateY(0deg); box-shadow: 0 0 20px rgb(0 0 0 / 0.3); }
  50% { transform: rotateY(90deg); box-shadow: 0 0 40px rgb(0 0 0 / 0.4); }
  100% { transform: rotateY(180deg); box-shadow: 0 0 20px rgb(0 0 0 / 0.3); }
}

.journal-flip-overlay {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  z-index: 20;
  overflow: hidden;
  transform-style: preserve-3d;
  min-height: 34rem;
}

.journal-flip-right {
  right: 0;
  border-radius: 0 0.5rem 0.5rem 0;
  transform-origin: left center;
}

.journal-flip-left {
  left: 0;
  border-radius: 0.5rem 0 0 0.5rem;
  transform-origin: right center;
}

.journal-flip-next {
  animation: flipPageNext 0.8s ease-in-out forwards;
}

.journal-flip-prev {
  animation: flipPagePrev 0.8s ease-in-out forwards;
}

.journal-flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: linear-gradient(to left, #fffbeb, #fef3c7);
  border: 1px solid hsl(var(--border) / 0.3);
}

.journal-flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(to right, #fffbeb, #fef3c7);
}

/* ── Navigation ── */

.journal-page-number {
  position: absolute;
  bottom: 1rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  z-index: 2;
}

.journal-page-number-left { left: 1rem; }
.journal-page-number-right { right: 1rem; }

.journal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.journal-nav-btn {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.journal-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.journal-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.journal-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  border: none;
  background: hsl(var(--muted));
  cursor: pointer;
  padding: 0;
}

.journal-dot.is-active {
  width: 2rem;
  background: hsl(var(--primary));
}

.journal-page-counter {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.journal-close-btn {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .journal-spread {
    min-height: 28rem;
  }

  .journal-page,
  .journal-flip-overlay {
    min-height: 28rem;
  }

  .journal-page-inner {
    padding: 1rem;
  }

  .journal-period-tabs {
    grid-template-columns: 1fr;
  }

  .journal-page-left,
  .journal-flip-left {
    display: none;
  }

  .journal-page-right,
  .journal-flip-right {
    width: 100%;
    border-radius: 0.5rem;
  }

  .journal-page-spine {
    display: none;
  }

  .journal-medias-grid {
    grid-template-columns: 1fr;
  }

  .journal-music-volume {
    display: none;
  }
}
