/* =============================================
   Header
============================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 200;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(8px);
}

/* =============================================
   Fixed single-screen layout (no page scroll)
============================================= */
html, body.log-page {
  height: 100%;
  margin: 0;
}
body.log-page {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.log-page .log-main {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 76px;
  box-sizing: border-box;
  display: flex;
}

/* =============================================
   Book section (fills remaining viewport space)
============================================= */
.log-book-section {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.log-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0;
}

.log-title {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--coffee);
  margin: 0;
}

.log-search label {
  font-size: 13px;
  font-weight: 500;
  color: var(--coffee);
}

.log-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.log-search-row input[type="date"] {
  padding: 8px 10px;
  border: 1px solid rgba(139, 115, 85, 0.35);
  border-radius: 8px;
  background: var(--white);
  font-family: var(--font-base);
  font-size: 13px;
  color: var(--coffee);
}

.log-search-btn {
  padding: 9px 20px;
  border: none;
  border-radius: 999px;
  background: var(--coffee);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s var(--ease);
}
.log-search-btn:hover { background: var(--cocoa); }

/* =============================================
   Book
============================================= */
.log-book-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.log-edge {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--camel);
  color: var(--coffee);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(74, 59, 42, 0.18);
  animation: edgeFloat 2.4s ease-in-out infinite;
  transition: background 0.3s var(--ease), transform 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
.log-edge:hover:not(:disabled) {
  background: var(--gold);
  transform: scale(1.12);
  box-shadow: 0 10px 26px rgba(74, 59, 42, 0.26);
}
.log-edge:disabled {
  opacity: 0.25;
  cursor: default;
  animation: none;
  box-shadow: none;
}

@keyframes edgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.log-book-frame {
  width: min(420px, 90vw);
  height: 100%;
  max-height: 600px;
  margin: 0 auto;
}

.log-book {
  width: 100%;
  height: 100%;
  box-shadow: 0 20px 50px rgba(74, 59, 42, 0.14);
  border-radius: 6px;
  background: var(--white);
  padding: 22px 26px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.18s var(--ease);
}
.log-book.log-book-fading {
  opacity: 0;
}

.log-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(139, 115, 85, 0.2);
}

.log-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}
.log-avatar img { width: 100%; display: block; }

.log-meta-text {
  font-size: 13px;
  color: var(--cocoa);
  line-height: 1.5;
}
.log-meta-text p { margin: 0; }
.log-meta-label {
  font-weight: 700;
  color: var(--coffee);
}
.log-weather {
  font-size: 15px;
  font-family: 'Segoe UI Symbol', 'Noto Sans Symbols', var(--font-base), sans-serif;
  color: var(--coffee);
}

.log-photo {
  flex: 0 0 auto;
  width: min(100%, 180px);
  aspect-ratio: 4 / 5;
  margin: 0 auto 12px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}
.log-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.log-text {
  flex: 1 1 auto;
  min-height: 4.5em;
  font-size: 16px;
  line-height: 1.8;
  color: var(--coffee);
  font-weight: 300;
  overflow: hidden;
  margin: 0;
}
.log-type-cursor {
  animation: blink 0.9s steps(1) infinite;
}

.log-share-slot { flex: 0 0 auto; }
.log-book .share-row { margin-top: 12px; gap: 6px; }
.log-book .share-btn { font-size: 11px; padding: 5px 10px; }

.log-page-indicator {
  flex: 0 0 auto;
  text-align: center;
  margin-top: 6px;
  font-size: 13px;
  color: var(--camel);
  letter-spacing: 0.05em;
}

/* =============================================
   Responsive
============================================= */
.log-page .site-footer {
  flex: 0 0 auto;
  padding: 8px 24px;
  font-size: 11px;
}

@media (max-width: 640px) {
  .log-page .log-main { padding-top: 90px; }
  .log-book-frame { width: min(320px, 88vw); max-height: 560px; }
  .log-book { padding: 12px 14px; }
  .log-edge { width: 34px; height: 34px; font-size: 16px; }
  .log-photo { width: min(100%, 90px); margin-bottom: 6px; }
  .log-avatar { width: 40px; height: 40px; }
  .log-meta { gap: 8px; margin-bottom: 6px; padding-bottom: 6px; }
  .log-meta-text { font-size: 12px; line-height: 1.4; }
  .log-text { font-size: 14px; line-height: 1.6; min-height: 4.2em; }
  .log-book .share-row { margin-top: 5px; }
  .log-toolbar { justify-content: center; margin-bottom: 0; }
  .log-search-row { flex-wrap: wrap; justify-content: center; margin-top: 4px; gap: 6px; }
  .log-search-row input[type="date"] { padding: 5px 6px; font-size: 11px; width: 100px; }
  .log-search-row span { font-size: 12px; }
  .log-search-btn { padding: 6px 14px; font-size: 12px; }
  .log-book-section { padding: 4px 10px; gap: 2px; }
}
