:host {
	display: block !important;
	width: 100%;
	background: linear-gradient(145deg, #f1f5f9 0%, #e6edf4 100%);
}

:root {
  --nav-spacing: 0px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  font-family: 'Inter', sans-serif;
  background: linear-gradient(145deg, #f1f5f9 0%, #e6edf4 100%);
  color: #0f172a;
  overflow-x: hidden;
}

h1, h2, h3, p {
  margin: 0;
}

#app-slot {
  display: block;
  margin: 0;
  padding: 0;
}

#app {
  flex: 1 0 auto;
  width: 100%;
}

jv-footer {
  flex: 0 0 auto;
  width: 100%;
}

/* =========================
   IMAGE MODAL - BASE
========================= */

.jn-image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* BACKDROP */
.jn-image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.25);
  backdrop-filter: blur(6px);
}

/* PANEL */
.jn-image-modal-panel {
  position: relative;
  width: min(1100px, 92vw);
  height: 80vh;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* =========================
   LEFT (IMAGE)
========================= */

.jn-image-modal-left {
  position: relative;
  background: #0b0b0b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jn-image-modal-left img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}

/* =========================
   RIGHT (CONTENT)
========================= */

.jn-image-modal-right {
  padding: 20px;
  overflow-y: auto;
  background: #fff;
}

/* =========================
   CLOSE BUTTON
========================= */

.jn-image-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all 0.15s ease;
}

.jn-image-modal-close:hover {
  background: #3a2f26;
  color: #fff;
}

/* =========================
   NAV ARROWS
========================= */

.jn-image-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.92);
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: all 0.15s ease;
}

.jn-image-nav:hover {
  background: #3a2f26;
  color: #fff;
}

.jn-image-prev {
  left: 12px;
}

.jn-image-next {
  right: 12px;
}

/* =========================
   COUNTERS
========================= */

#imageCounter {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 25;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#imageOverlayIndex {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 25;
  background: rgba(0,0,0,0.45);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}

.jv-memory-year-picker {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jv-memory-year-picker[hidden] {
  display: none;
}

.jv-memory-year-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.jv-memory-year-panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.jv-memory-year-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.jv-memory-year-kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.jv-memory-year-header h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.jv-memory-year-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #eee;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.jv-memory-year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.jv-memory-year-option {
  min-height: 44px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
}

.jv-memory-year-option:hover {
  background: #f3f4f6;
}

.jv-memory-year-option-all {
  grid-column: 1 / -1;
  font-weight: 600;
}

@media (max-width: 599px) {
  .jv-memory-year-picker {
    padding: 12px;
    box-sizing: border-box;
  }

  .jv-memory-year-panel {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 24px);
    box-sizing: border-box;
    padding: 20px;
    border-radius: 14px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .jv-memory-year-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}