/* =====================
  Journal styles
===================== */
/* =====================
  Base Styles
===================== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #fff;
  color: #222;
  font-size: 12px;
  box-sizing: border-box;
  overflow: hidden;
}
a:active,
a:focus {
  color: #000;
}
h1 {
  font-size: 12px;
  font-weight: 400;
  margin: 0;
  color: transparent;
}
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* =====================
   Centerpiece Area
===================== */
.centerpiece {
  position: relative;
  flex: 2 1 0;
  min-height: 200px;
  height: 66.66%;
  overflow: hidden;
  pointer-events: auto;
}
.centerpiece-images {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  overscroll-behavior: contain;
  margin-bottom: 0;
}
.centerpiece-image,
#centerpiece-hover-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 8px 0;
  box-sizing: border-box;
}
#centerpiece-hover-image {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  bottom: auto;
  z-index: 2;
  pointer-events: none;
  display: none;
}

/* =====================
   Footer Area & List
===================== */
.footer-area {
  flex: 1 1 0;
  background: #fff;
  box-sizing: border-box;
  padding: 6px;
  min-height: 0;
  height: 33.33%;
  overflow: hidden;
}
.footer-list {
  max-height: 33.33vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  overscroll-behavior: contain;
}
.footer-line-row {
  display: flex;
  align-items: flex-start;
  padding: 7px 12px;
  font-size: 12px;
  color: #000;
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease;
}
.footer-label {
  flex: 1;
  font-weight: 400;
  text-align: left;
  font-size: 12px;
  transition: font-weight 0.2s;
}
.footer-info {
  font-size: 12px;
  flex: 1;
  text-align: left;
  padding-left: 10px;
  padding-bottom: 5px;
  max-width: 250px;
  word-break: break-word;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 1.5s cubic-bezier(.4,0,.2,1), opacity 1s;
}
.footer-date {
  flex: 1;
  text-align: right;
  font-size: 12px;
}
.footer-time {
  font-size: 12px;
  display: inline-block;
}
.footer-line {
  border-top: 1px solid #000;
  margin: 0;
  width: 100%;
  height: 0;
}

/* =====================
   Entry Transition & Active State
===================== */
.footer-line-row.entry-transition {
  transition: background 1.5s cubic-bezier(.4,0,.2,1), opacity 1.5s;
  background: #f5f5f5;
  opacity: 0.5;
}
.footer-line-row.entry-transition.active {
  opacity: 1;
  background: #fff;
}

/* =====================
   Active & Hover Fixes
===================== */
.footer-line-row.active .footer-info {
  transition: max-height 1.5s cubic-bezier(.4,0,.2,1), opacity 1s;
  max-height: 1000px !important;
  opacity: 1 !important;
}
.footer-line-row.active .footer-label {
  font-weight: 700 !important;
}
.footer-line-row:not(.active):hover .footer-info {
  max-height: 1000px;
  opacity: 1;
}
.footer-line-row:not(.active):hover .footer-label {
  font-weight: 700;
}

/* =====================
   Desktop Layout
===================== */
@media (hover: hover) and (pointer: fine) {
  .footer-info {
    max-width: 500px;
  }
  body {
    overflow: hidden;
  }
  .main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }
  .centerpiece-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
    overscroll-behavior: contain;
    height: 100%;
    width: 100%;
  }
  .centerpiece-image,
  #centerpiece-hover-image {
    width: 30%;
    max-width: 30%;
    margin: 12px auto;
  }
  #centerpiece-hover-image {
    display: none;
  }
  .footer-area {
    flex: 1 1 0;
    background: #fff;
    box-sizing: border-box;
    padding: 6px;
    min-height: 0;
    height: 33.33%;
    overflow: hidden;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    max-height: none;
  }
  .footer-list {
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 0px;
  }
  .footer-label {
    max-width: 100px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-btn {
    transform: translateY(8px);
  }
  .nav-btn:active {
    transform: translateY(9px);
  }
}

/* =====================
   Mobile Layout
===================== */
@media (max-width: 600px) {
  .centerpiece-image,
  #centerpiece-hover-image {
    width: calc(100% - 24px);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px 12px;
    box-sizing: border-box;
  }
  .site-logo {
    width: 40px;
    height: 40px;
  }
  .footer-line-row {
    padding: 7px 0 7px 0;
  }
  .footer-list {
    padding: 0 10px;
  }
  .footer-label {
    flex: 0 0 40px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .footer-date {
    flex: 0 0 70px;
    text-align: right;
    margin-right: 8px;
  }
  .footer-info {
    flex: 1 1 auto;
    max-width: none;
    width: auto;
    padding-left: 8px;
  }
  .nav-btn {
    width: 64px;
    height: 56px;
    font-size: 18px;
    line-height: 1;
    overflow: visible;
    font-weight: 400;
    font-family: inherit;
  }
  .nav-btn:active {
    transform: translateY(1px);
  }
}

/* =====================
   Navigation Arrows
===================== */
.nav-arrows {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}
.nav-btn {
  background: transparent;
  border: none;
  width: 70px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.nav-btn.prev { position: absolute; left: -5px; }
.nav-btn.next { position: absolute; right: -5px; }
.nav-btn,
.nav-btn:hover,
.nav-btn:active,
.nav-btn:focus {
  color: #000;
}

/* =====================
   Site Logo
===================== */
.site-logo {
  width: 48px;
  height: 48px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.98;
  margin: 0;
}
.site-logo svg,
.site-logo img,
.site-logo .site-logo-img {
  width: 100%;
  height: 100%;
  display: block;
}
.nav-btn svg,
.nav-btn .nav-icon {
  width: 36px;
  height: 36px;
  display: block;
}
@media (max-width: 600px) {
  .nav-btn svg,
  .nav-btn .nav-icon {
    width: 40px;
    height: 40px;
  }
}
.nav-btn .nav-icon-box rect {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.nav-btn .nav-icon-box {
  color: #111;
}

/* =====================
   Image Caption
===================== */
.image-caption {
  font-size: 11px;
  color: #111;
  margin-bottom: 6px;
  font-style: italic;
}

/* =====================
   Link States
===================== */
a {
  color: inherit;
  text-decoration: none;
  transition: color 120ms ease-in-out;
}
a:visited { color: #444; }
a:hover,
a:focus { color: #000; text-decoration: underline; }
a:active,
a:focus-visible { color: #000; }
a:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}
.footer-line-row.active a,
.footer-line-row:hover a { color: #000; }

/* =====================
   Image Preview (Entry)
===================== */
.image-preview img {
  width: 60px;
  height: auto;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
}
