* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  background: #c4a882;
  background-image:
    radial-gradient(ellipse at 20% 20%, #d4b896 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, #a8845a 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
}

.hidden { display: none !important; }


#coverWrap {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#coverWrap.opening {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

#cover {
  width: 320px;
  filter: drop-shadow(-8px 8px 32px rgba(0,0,0,0.45));
}

#coverFront {
  width: 320px;
  background: #2e1a08;
  border-radius: 4px 14px 14px 4px;
  box-shadow: -6px 0 0 #1a0e04;
}

.cover-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.cover-text {
  padding: 28px 32px 36px;
  text-align: center;
}

.cover-text h1 {
  font-size: 1.9rem;
  color: #f5e6c8;
  margin-bottom: 6px;
}

.cover-text .subtitle {
  font-style: italic;
  font-size: 0.78rem;
  color: #c8a878;
  margin-bottom: 8px;
}

.cover-text .species {
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7a5a38;
  margin-bottom: 24px;
}

.cover-text button {
  background: transparent;
  border: 1px solid rgba(245,230,200,0.35);
  color: #f5e6c8;
  padding: 10px 28px;
  border-radius: 30px;
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}
.cover-text button:hover { background: rgba(245,230,200,0.1); }


#journal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 700px;
}

.top-bar button {
  background: rgba(245,230,200,0.15);
  border: 1px solid rgba(245,230,200,0.3);
  color: #f5e6c8;
  padding: 6px 18px;
  border-radius: 20px;
  font-family: 'Lora', serif;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}
.top-bar button:hover { background: rgba(245,230,200,0.28); }

#counter {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,230,200,0.45);
}

.spread {
  display: flex;
  width: 700px;
  height: 460px;
  border-radius: 2px 8px 8px 2px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.35), -4px 0 0 #8a6a48;
  overflow: hidden;
}

.left-page {
  width: 50%;
  overflow: hidden;
  border-right: 2px solid #c8a878;
  flex-shrink: 0;
}

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

.right-page {
  background: #fdf6e8;
  width: 50%;
  padding: 28px 28px 24px 38px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.right-page::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    transparent 0px, transparent 33px,
    #d4b896 33px, #d4b896 34px
  );
  opacity: 0.4;
  pointer-events: none;
}

.right-page::before {
  content: '';
  position: absolute;
  left: 26px; top: 0; bottom: 0;
  width: 1px;
  background: rgba(180,100,80,0.35);
}

.page-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  position: relative; z-index: 1;
}

.day {
  font-size: 1rem;
  font-weight: 600;
  color: #3a2010;
}

.weather {
  font-size: 0.6rem;
  color: #8a6a48;
  font-style: italic;
}

.entry-text {
  font-size: 0.88rem;
  line-height: 1.95;
  color: #2a1a08;
  flex: 1;
  position: relative; z-index: 1;
  overflow: hidden;
}

.nav {
  display: flex;
  gap: 12px;
}

.nav button {
  background: rgba(245,230,200,0.15);
  border: 1px solid rgba(245,230,200,0.3);
  color: #f5e6c8;
  padding: 9px 26px;
  border-radius: 30px;
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}
.nav button:hover    { background: rgba(245,230,200,0.28); }
.nav button:disabled { opacity: 0.2; cursor: default; }

@media (max-width: 720px) {
  body { align-items: flex-start; padding: 24px 16px; }

  #cover, #coverFront { width: 100%; }
  .cover-img { height: 180px; }

  .top-bar, .spread { width: 100%; }

  .spread {
    flex-direction: column;
    height: auto;
  }

  .left-page {
    width: 100%;
    height: 220px;
    border-right: none;
    border-bottom: 2px solid #c8a878;
  }

  .right-page {
    width: 100%;
    padding: 24px 20px 24px 30px;
  }

  .right-page::before { left: 18px; }

  .entry-text {
    font-size: 0.85rem;
    line-height: 1.85;
    overflow: visible;
  }
}