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

  body {
    width: 100vw; height: 100vh;
    overflow: hidden;
    font-family: Georgia, serif;
    background-image: url('../img/home/desk.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .back {
    position: fixed; top: 20px; left: 24px;
    font-size: 12px; letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(60,40,20,0.65);
    text-decoration: none;
    transition: color 0.2s; z-index: 100;
  }
  .back:hover { color: rgba(60,40,20,1); }

  .album-scene {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
  }

  /* ── ALBUM ── */
  .album {
    position: relative;
    display: flex;
    box-shadow: 0 16px 60px rgba(0,0,0,0.55);
    border-radius: 6px 8px 8px 6px;
    transition: opacity 0.18s ease;
  }
  .album.turning { opacity: 0; }

  /* page stack edge on right */
  .album::after {
    content: '';
    position: absolute;
    top: 5px; bottom: 5px;
    right: -8px; width: 8px;
    background: linear-gradient(90deg, #d8d0bc, #c0b8a8);
    border-radius: 0 3px 3px 0;
    background-image: repeating-linear-gradient(
      180deg, transparent, transparent 4px, rgba(0,0,0,0.05) 4px, rgba(0,0,0,0.05) 5px
    );
    z-index: 0;
  }

  /* ── COVER ── */
  .cover-page {
    width: min(400px, 46vw);
    height: min(560px, 82vh);
    background: linear-gradient(140deg, #281808, #100804);
    border-radius: 6px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    position: relative; padding: 40px;
    box-shadow: 0 16px 60px rgba(0,0,0,0.6);
  }
  .cover-frame {
    position: absolute; inset: 20px;
    border: 1px solid rgba(220,185,90,0.22); border-radius: 2px;
    pointer-events: none;
  }
  .cover-frame::before {
    content: '';
    position: absolute; inset: 7px;
    border: 1px solid rgba(220,185,90,0.1); border-radius: 1px;
  }
  .cover-title {
    font-size: 28px; font-style: italic;
    color: rgba(230,205,135,0.92);
    letter-spacing: 0.07em; text-align: center;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    margin-bottom: 10px;
  }
  .cover-sub {
    font-size: 10px; letter-spacing: 0.3em;
    text-transform: uppercase; color: rgba(190,160,85,0.5);
  }
  .cover-hint {
    position: absolute; bottom: 36px;
    font-size: 10px; letter-spacing: 0.2em;
    text-transform: uppercase; color: rgba(190,160,85,0.4);
    animation: pulse 2.5s ease-in-out infinite;
  }
  @keyframes pulse { 0%,100%{opacity:0.4} 50%{opacity:0.85} }

  /* ── PAGES ── */
  .page-left {
    width: min(390px, 45vw);
    height: min(560px, 82vh);
    background: linear-gradient(108deg, #e0d6c2, #ece2cc);
    border-radius: 6px 0 0 6px;
    padding: 24px 18px 40px 24px;
    display: flex; flex-direction: column; gap: 14px;
    position: relative; z-index: 1;
  }
  .page-left::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; width: 20px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.07));
    pointer-events: none; border-radius: 0;
  }

  .spine {
    width: 22px; flex-shrink: 0;
    background: linear-gradient(90deg, #1a0c04, #2c1606, #1a0c04);
    position: relative; z-index: 2;
    box-shadow: -3px 0 8px rgba(0,0,0,0.4), 3px 0 8px rgba(0,0,0,0.4);
  }
  .spine::before {
    content: '';
    position: absolute;
    top: 14px; bottom: 14px; left: 50%;
    width: 1px; border-left: 1px dashed rgba(80,40,16,0.5);
  }

  .page-right {
    width: min(390px, 45vw);
    height: min(560px, 82vh);
    background: linear-gradient(108deg, #ece2cc, #e0d6c2);
    border-radius: 0 8px 8px 0;
    padding: 24px 24px 40px 18px;
    display: flex; flex-direction: column; gap: 14px;
    position: relative; z-index: 1;
  }
  .page-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; width: 20px;
    background: linear-gradient(90deg, rgba(0,0,0,0.07), transparent);
    pointer-events: none;
  }

  .page-num {
    position: absolute; bottom: 10px;
    font-size: 10px; color: #a09080; font-style: italic;
  }
  .page-left  .page-num { right: 18px; }
  .page-right .page-num { right: 24px; }

  /* ── PHOTO SLOT (flip card) ── */
  .photo-slot {
    flex: 1; min-height: 0;
    perspective: 1000px;
    cursor: pointer;
  }

  .flip-inner {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  }
  .flip-inner.flipped { transform: rotateY(180deg); }

  .flip-front, .flip-back {
    position: absolute; inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  /* front: photo */
  .flip-front {
    background: #fff;
    padding: 7px 7px 20px 7px;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.25);
    display: flex; flex-direction: column;
    transition: box-shadow 0.2s;
  }
  .photo-slot:hover .flip-front {
    box-shadow: 4px 8px 22px rgba(0,0,0,0.35);
  }
  .flip-front::before, .flip-front::after {
    content: '';
    position: absolute;
    width: 15px; height: 15px;
    background: rgba(160,138,80,0.5);
    z-index: 2; pointer-events: none;
  }
  .flip-front::before { top: 4px; left: 4px; clip-path: polygon(0 0,100% 0,100% 30%,30% 30%,30% 100%,0 100%); }
  .flip-front::after  { bottom: 18px; right: 4px; clip-path: polygon(70% 0,100% 0,100% 100%,0 100%,0 70%,70% 70%); }

  .photo-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block; flex: 1;
  }
  .photo-ph {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
  }

  /* back: info */
  .flip-back {
    background: #faf6ee;
    transform: rotateY(180deg);
    padding: 20px 18px;
    display: flex; flex-direction: column;
    justify-content: center; gap: 10px;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.25);
    border: 1px solid rgba(180,160,120,0.2);
  }
  .flip-back::after {
    content: '';
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(
      180deg, transparent, transparent 23px,
      rgba(180,168,140,0.4) 23px, rgba(180,168,140,0.4) 24px
    );
    pointer-events: none;
  }
  .back-date {
    font-size: 10px; letter-spacing: 0.18em;
    text-transform: uppercase; color: #a09070;
    position: relative; z-index: 1;
  }
  .back-place {
    font-size: 14px; font-style: italic;
    color: #3a2e1e; position: relative; z-index: 1;
    line-height: 1.3;
  }
  .back-desc {
    font-size: 12px; color: #6a5a40;
    line-height: 1.9; position: relative; z-index: 1;
  }
  .back-tap {
    font-size: 9px; letter-spacing: 0.16em;
    text-transform: uppercase; color: #c0a870;
    margin-top: auto; position: relative; z-index: 1;
    opacity: 0.7;
  }

  /* slot rotation */
  .page-left  .photo-slot:nth-child(1) .flip-front { transform: rotate(-0.8deg); }
  .page-left  .photo-slot:nth-child(2) .flip-front { transform: rotate(0.7deg); }
  .page-right .photo-slot:nth-child(1) .flip-front { transform: rotate(0.9deg); }
  .page-right .photo-slot:nth-child(2) .flip-front { transform: rotate(-0.5deg); }
  .flip-inner.flipped .flip-front { transform: rotate(0deg) !important; }

  /* ── NAV ── */
  .nav-btn {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none; width: 48px; height: 48px;
    border-radius: 50%; cursor: pointer;
    font-size: 22px; color: rgba(50,35,15,0.7);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.22);
    z-index: 50;
  }
  #btn-prev { left: 20px; }
  #btn-next { right: 20px; }
  .nav-btn:hover { background: rgba(255,255,255,0.38); color: rgba(30,18,5,1); transform: translateY(-50%) scale(1.1); }
  .nav-btn:disabled { opacity: 0.18; cursor: default; }
  .nav-btn:disabled:hover { transform: translateY(-50%) scale(1); background: rgba(255,255,255,0.2); }

  .page-counter {
    position: fixed; bottom: 22px; left: 50%;
    transform: translateX(-50%);
    font-size: 11px; letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(50,35,15,0.45); font-style: italic;
  }