/* =========================================================
   KAYLEE'S RECIPE BOX
   Added below the existing scene. None of the original scene
   dimensions, positions, or interactive layers are changed.
   ========================================================= */

.recipe-shelf {
  width: min(1023px, 100%);
  margin: 0 auto;
  padding: 46px 18px 64px;
  color: #3f2b24;
  text-align: center;
  border-top: 1px solid rgba(213, 170, 77, .45);
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 247, 224, .08) 0 2px, transparent 3px),
    radial-gradient(circle at 74% 62%, rgba(255, 247, 224, .06) 0 2px, transparent 3px),
    linear-gradient(rgba(37, 28, 24, .90), rgba(20, 17, 15, .96)),
    #151311;
  background-size: 52px 52px, 68px 68px, auto, auto;
}

.recipe-shelf-kicker {
  margin: 0 0 6px;
  color: #d8bd82;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(.68rem, 1.4vw, .82rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.recipe-shelf-title {
  margin: 0 0 24px;
  color: #f3e7d2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  font-weight: normal;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}

.recipe-card-trigger {
  position: relative;
  display: inline-block;
  width: min(640px, 92vw);
  padding: 13px 13px 42px;
  color: #3d2d28;
  border: 1px solid #9f8c6f;
  background: #eee4cf;
  box-shadow:
    0 16px 25px rgba(0, 0, 0, .42),
    inset 0 0 0 3px rgba(255, 255, 255, .45);
  transform: rotate(-1.1deg);
  transition: transform .18s ease, box-shadow .18s ease;
}

.recipe-card-trigger::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  top: -13px;
  width: 118px;
  height: 27px;
  background: rgba(215, 195, 151, .78);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  transform: translateX(-50%) rotate(1.5deg);
}

.recipe-card-trigger:hover,
.recipe-card-trigger:focus-visible {
  transform: rotate(.15deg) translateY(-4px);
  box-shadow:
    0 20px 31px rgba(0, 0, 0, .48),
    inset 0 0 0 3px rgba(255, 255, 255, .5);
}

.recipe-card-trigger:focus-visible {
  outline: 2px dotted #f3e7d2;
  outline-offset: 7px;
}

.recipe-card-trigger img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(92, 76, 58, .38);
  filter: sepia(.05) contrast(.98) brightness(.95);
}

.recipe-card-trigger span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 11px;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: clamp(.78rem, 2vw, 1rem);
}

/* Large scrapbook-style recipe popup. */
#recipe-book-dialog {
  width: min(940px, calc(100% - 24px));
  max-width: 940px;
  max-height: min(88vh, 820px);
  padding: 0;
  overflow: hidden;
  color: #34251f;
  border: 2px solid #5b3b35;
  border-radius: 2px;
  background: #eadfc8;
  box-shadow: 14px 18px 42px rgba(0, 0, 0, .62);
}

#recipe-book-dialog::backdrop {
  background: rgba(13, 10, 9, .68);
  backdrop-filter: blur(1px);
}

.recipe-book-window {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 820px);
}

.recipe-book-titlebar {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px 8px 14px;
  color: #fff8e9;
  border-bottom: 2px solid #5b3b35;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .045) 0 4px, transparent 4px 8px),
    #84303d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.recipe-book-close {
  flex: 0 0 auto;
  width: 29px;
  height: 27px;
  padding: 0;
  color: #2e241f;
  border: 2px outset #efe5d0;
  background: #d9ccb2;
  font-size: 1.15rem;
  font-weight: bold;
  line-height: 1;
}

.recipe-book-body {
  min-height: 0;
  overflow-y: auto;
  padding: 19px;
  background:
    linear-gradient(90deg, transparent 31px, rgba(159, 69, 69, .18) 32px, transparent 33px),
    repeating-linear-gradient(0deg, #f6ecd7 0 28px, #d4d8c1 29px);
}

.recipe-book-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 17px;
  padding: 10px 12px;
  border: 1px solid #a48d68;
  background: rgba(245, 231, 199, .92);
  box-shadow: 3px 4px 0 rgba(79, 56, 43, .16);
}

.recipe-book-toolbar p {
  margin: 0;
  font-size: .72rem;
  line-height: 1.4;
}

.recipe-paper-button {
  padding: 7px 11px;
  color: #fff8e9;
  border: 1px solid #5e2b34;
  border-radius: 2px;
  background: #84303d;
  box-shadow: 2px 2px 0 rgba(69, 42, 35, .25);
  font-family: "Courier New", Courier, monospace;
  font-size: .72rem;
  font-weight: bold;
}

.recipe-paper-button.secondary {
  color: #3e2c24;
  border-color: #8c795d;
  background: #ded0b3;
}

.recipe-paper-button.danger {
  color: #6c2430;
  border-color: #9a6d6d;
  background: #ead1cb;
}

.recipe-paper-button:focus-visible,
.recipe-form input:focus,
.recipe-form textarea:focus {
  outline: 2px dotted #84303d;
  outline-offset: 2px;
}

.recipe-grid-popup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.recipe-popup-card {
  position: relative;
  min-width: 0;
  padding: 11px;
  border: 1px solid #8b775c;
  background: rgba(255, 248, 229, .96);
  box-shadow: 4px 5px 0 rgba(76, 55, 42, .18);
}

.recipe-popup-card:nth-child(odd) {
  transform: rotate(-.35deg);
}

.recipe-popup-card:nth-child(even) {
  transform: rotate(.35deg);
}

.recipe-popup-photo {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  color: #8c6f59;
  border: 1px solid #a18c6c;
  background: #e6dac0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
}

.recipe-popup-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-popup-copy h3 {
  margin: 10px 0 3px;
  color: #7c2f3c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.recipe-popup-meta,
.recipe-popup-notes {
  margin: 4px 0;
  font-size: .72rem;
  line-height: 1.45;
}

.recipe-popup-stars {
  color: #a8791d;
  letter-spacing: .08em;
}

.recipe-popup-notes {
  min-height: 2.2em;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
}

.recipe-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.recipe-details {
  margin-top: 10px;
  border-top: 1px dashed #a58e70;
}

.recipe-details summary {
  padding: 8px 0 2px;
  color: #6e3340;
  font-size: .72rem;
  font-weight: bold;
}

.recipe-details-text {
  margin: 7px 0 2px;
  padding: 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid #c1ad89;
  background: #f7efd9;
  font-family: "Courier New", Courier, monospace;
  font-size: .7rem;
  line-height: 1.55;
}

.recipe-empty-state {
  grid-column: 1 / -1;
  padding: 35px 15px;
  text-align: center;
  border: 1px dashed #9f896b;
  background: rgba(255, 247, 226, .82);
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
}

.recipe-editor {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid #8f775e;
  background: rgba(244, 229, 197, .97);
  box-shadow: 4px 5px 0 rgba(76, 55, 42, .16);
}

.recipe-editor[hidden] {
  display: none;
}

.recipe-editor h2 {
  margin: 0 0 12px;
  color: #7c2f3c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.recipe-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, .75fr);
  gap: 12px 15px;
}

.recipe-form label,
.recipe-rating-label {
  display: block;
  color: #4a342b;
  font-size: .7rem;
  font-weight: bold;
}

.recipe-form .full-row {
  grid-column: 1 / -1;
}

.recipe-form input,
.recipe-form textarea {
  width: 100%;
  margin-top: 5px;
  padding: 8px;
  color: #34251f;
  border: 1px solid #927c5f;
  background: #fffaf0;
  font-family: "Courier New", Courier, monospace;
  font-size: .75rem;
}

.recipe-form textarea {
  min-height: 80px;
  resize: vertical;
}

#recipe-details-input {
  min-height: 155px;
}

.recipe-rating-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
}

.recipe-rating-choice {
  padding: 1px 2px;
  color: #a9997f;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
}

.recipe-rating-choice.active {
  color: #a8791d;
  text-shadow: 0 1px 0 #fff;
}

.recipe-photo-preview {
  display: grid;
  width: 100%;
  min-height: 120px;
  margin-top: 7px;
  place-items: center;
  overflow: hidden;
  color: #7d6853;
  border: 1px dashed #9b8466;
  background: #e8dcc1;
  font-size: .7rem;
}

.recipe-photo-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.recipe-photo-preview img[hidden] {
  display: none;
}

.recipe-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.recipe-save-message {
  min-height: 1.25em;
  margin: 8px 0 0;
  color: #6d3d32;
  font-size: .7rem;
}

@media (max-width: 700px) {
  .recipe-shelf {
    padding-top: 34px;
  }

  .recipe-card-trigger {
    width: min(92vw, 640px);
    padding: 8px 8px 38px;
  }

  #recipe-book-dialog {
    width: calc(100% - 12px);
    max-height: 94vh;
  }

  .recipe-book-window {
    max-height: 94vh;
  }

  .recipe-book-body {
    padding: 12px;
  }

  .recipe-grid-popup,
  .recipe-form-grid {
    grid-template-columns: 1fr;
  }

  .recipe-form .full-row {
    grid-column: 1;
  }

  .recipe-popup-card:nth-child(n) {
    transform: none;
  }
}


/* =========================================================
   SITE EXTENSIONS WRAPPER
   ========================================================= */
.site-extensions {
  width: 100%;
  margin: 0;
  background: #151311;
}

/* Make sure injected shelves stack neatly under the scene. */
.site-extensions > section + section {
  margin-top: 0;
}

/* =========================================================
   CAMCORDER / MEDIA VAULT
   ========================================================= */
.media-vault-section {
  width: min(1023px, 100%);
  margin: 0 auto;
  padding: 10px 18px 74px;
  color: #f3e7d2;
  background:
    radial-gradient(circle at 15% 22%, rgba(255, 247, 224, .04) 0 2px, transparent 3px),
    radial-gradient(circle at 79% 58%, rgba(255, 247, 224, .05) 0 2px, transparent 3px),
    linear-gradient(rgba(20, 17, 15, .98), rgba(24, 20, 17, .98)),
    #151311;
  background-size: 56px 56px, 70px 70px, auto, auto;
}

.media-vault-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 26px;
  align-items: center;
}

.camcorder-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px 10px 42px;
  border: 1px solid rgba(212, 185, 137, .38);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.18));
  box-shadow: 0 20px 30px rgba(0, 0, 0, .36);
  transition: transform .18s ease, box-shadow .18s ease;
}

.camcorder-trigger:hover,
.camcorder-trigger:focus-visible {
  transform: translateY(-4px) rotate(-.4deg);
  box-shadow: 0 24px 36px rgba(0, 0, 0, .44);
}

.camcorder-trigger:focus-visible {
  outline: 2px dotted #f3e7d2;
  outline-offset: 8px;
}

.camcorder-trigger img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  filter: sepia(.12) saturate(.88) brightness(.92);
}

.camcorder-trigger-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 11px;
  color: #f3e7d2;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: clamp(.92rem, 1.8vw, 1.08rem);
  text-align: center;
}

.media-vault-copy h2 {
  margin: 0 0 12px;
  color: #f3e7d2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  font-weight: normal;
}

.media-vault-kicker {
  margin: 0 0 6px;
  color: #d8bd82;
  font-size: clamp(.68rem, 1.4vw, .82rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.media-vault-copy p {
  margin: 0 0 12px;
  color: #eadcc1;
  line-height: 1.7;
  font-size: .96rem;
}

.media-vault-small {
  color: #d1ba8c !important;
  font-size: .84rem !important;
}

#media-vault-dialog {
  width: min(980px, calc(100% - 24px));
  max-width: 980px;
  max-height: min(88vh, 840px);
  overflow: hidden;
  border: 1px solid #8c7255;
  border-radius: 12px;
  background: #e6d6b8;
  box-shadow: 0 24px 38px rgba(0,0,0,.48);
}

.media-vault-window {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.media-vault-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  color: #fff5e7;
  font-family: Arial, sans-serif;
  font-size: .88rem;
  font-weight: bold;
  background: linear-gradient(90deg, #5a4b73, #8b769e);
}

.media-vault-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(0,0,0,.4);
  border-radius: 5px;
  background: #efe7d7;
  font-size: 1.1rem;
  line-height: 1;
}

.media-vault-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  color: #3b2b24;
}

.media-vault-toolbar {
  padding: 14px 16px;
  border: 1px solid #c3ad8b;
  border-radius: 12px;
  background: rgba(255, 249, 237, .85);
}

.media-vault-toolbar p {
  margin: 0;
  line-height: 1.6;
}

.media-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.media-card,
.media-empty-state {
  overflow: hidden;
  border: 1px solid #b79d77;
  border-radius: 14px;
  background: #fff8ec;
  box-shadow: 0 12px 18px rgba(0,0,0,.12);
}

.media-card-frame {
  padding: 12px;
  background: linear-gradient(180deg, #ddd2be, #c8b69b);
}

.media-card-frame.video video,
.media-card-frame.audio audio,
.media-audio-poster {
  display: block;
  width: 100%;
}

.media-card-frame.video video {
  border-radius: 10px;
  background: #0f0f10;
}

.media-card-frame.audio {
  display: grid;
  gap: 10px;
}

.media-audio-poster {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.media-card-copy {
  padding: 14px 14px 16px;
  color: #3e2e28;
}

.media-card-copy h3,
.media-empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.media-card-meta,
.media-card-path {
  margin: 0 0 8px;
  color: #6d584a;
  font-size: .8rem;
}

.media-card-notes {
  margin: 0 0 10px;
  line-height: 1.6;
}

.media-card-path {
  word-break: break-all;
  font-family: "Courier New", Courier, monospace;
}

.media-empty-state {
  padding: 18px;
}

.media-empty-state p {
  line-height: 1.6;
}

.media-empty-state pre {
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #f3eadb;
  color: #3e2c26;
  font-family: "Courier New", Courier, monospace;
  font-size: .78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .media-vault-layout {
    grid-template-columns: 1fr;
  }

  .media-vault-section {
    padding-top: 0;
  }
}



/* =========================================================
   CAMCORDER WITH LIVE PLAYBACK SCREEN
   ========================================================= */
.camcorder-scene-object {
  position: absolute;
  z-index: 42;
  right: -2%;
  bottom: 3.2%;
  width: 31%;
  aspect-ratio: 1;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .36));
  transition: transform .18s ease, filter .18s ease;
}

.camcorder-scene-object:hover,
.camcorder-scene-object:focus-within {
  transform: translateY(-3px) rotate(-.5deg);
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, .42));
}

.camcorder-shell {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.camcorder-playback-screen {
  position: absolute;
  z-index: 2;
  left: 25.68%;
  top: 37.40%;
  width: 32.72%;
  height: 19.34%;
  overflow: hidden;
  color: rgba(226, 234, 218, .88);
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px),
    #111513;
  clip-path: polygon(0 5.6%, 95.5% 0, 100% 87.9%, 3.3% 100%);
  box-shadow: inset 0 0 7px rgba(0,0,0,.85);
  pointer-events: none;
}

.camcorder-playback-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(255,255,255,.08), transparent 28%),
    rgba(28, 39, 30, .11);
  mix-blend-mode: screen;
}

.camcorder-playback-screen video,
.camcorder-playback-screen > img {
  position: absolute;
  inset: -4%;
  z-index: 1;
  display: block;
  width: 108%;
  height: 108%;
  object-fit: cover;
  filter: brightness(.72) saturate(.78) contrast(.96);
}

.camcorder-playback-screen [hidden] {
  display: none !important;
}

.camcorder-screen-message {
  position: absolute;
  z-index: 4;
  left: 7%;
  right: 7%;
  bottom: 8%;
  overflow: hidden;
  color: rgba(230, 238, 218, .82);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(4px, .52vw, 8px);
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}

.camcorder-scene-object:not(.has-media) .camcorder-screen-message {
  top: 42%;
  bottom: auto;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.camcorder-scene-object.is-playing .camcorder-screen-message {
  opacity: .42;
}

.camcorder-screen-hotspot,
.camcorder-open-hotspot {
  position: absolute;
  z-index: 6;
  padding: 0;
  border: 0;
  background: transparent;
}

.camcorder-screen-hotspot {
  left: 25.3%;
  top: 36.8%;
  width: 34.2%;
  height: 21.2%;
  clip-path: polygon(0 7%, 95% 0, 100% 88%, 4% 100%);
}

.camcorder-open-hotspot {
  right: 0;
  top: 9%;
  width: 44%;
  height: 78%;
  border-radius: 42% 14% 22% 38%;
}

.camcorder-screen-hotspot:focus-visible,
.camcorder-open-hotspot:focus-visible {
  outline: 2px dotted rgba(243, 231, 210, .9);
  outline-offset: 4px;
}

/* Remove the older camcorder section beneath the scene. */
.media-vault-section {
  display: none !important;
}

.media-card.is-current {
  outline: 2px solid #84303d;
  outline-offset: 2px;
}

.media-card-preview {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 150px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  color: #f7ead5;
  border: 0;
  background: linear-gradient(145deg, #3b3532, #171514);
}

.media-card-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  filter: brightness(.76) saturate(.82);
}

.media-card-preview-icon {
  font-size: 2.6rem;
}

.media-card-preview-badge {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  padding: 6px 8px;
  color: #fff7e9;
  background: rgba(49, 36, 31, .78);
  font-size: .7rem;
  text-align: center;
}

.media-play-button {
  margin-top: 6px;
  padding: 7px 10px;
  color: #fff8e9;
  border: 1px solid #5e2b34;
  border-radius: 2px;
  background: #84303d;
  font-family: "Courier New", Courier, monospace;
  font-size: .7rem;
  font-weight: bold;
}

@media (max-width: 700px) {
  .camcorder-scene-object {
    right: -2%;
    bottom: 3.4%;
    width: 35%;
  }
}


/* Config-driven Honeybun and Cinnabun charms. */
.bunny-photo-charm {
  position: absolute;
  z-index: 41;
  width: 4.65%;
  aspect-ratio: 1;
  overflow: hidden;
  padding: .38%;
  border: 1px solid rgba(96, 69, 30, .9);
  border-radius: 50%;
  background: linear-gradient(145deg, #efd99d, #9b6926 58%, #e5c77c);
  box-shadow:
    2px 3px 6px rgba(0, 0, 0, .38),
    inset 0 1px 1px rgba(255, 255, 255, .35);
  pointer-events: none;
}

.bunny-photo-charm img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: brightness(.66) saturate(.80) contrast(.98);
}

.bunny-photo-charm img[hidden] {
  display: none;
}

.honeybun-charm {
  left: 21.7%;
  top: 58.62%;
  transform: rotate(-9deg);
}

.cinnabun-charm {
  left: 48.1%;
  top: 58.72%;
  transform: rotate(8deg);
}


/* =========================================================
   HOVER-OPEN SCRAPBOOK
   ========================================================= */
.scrapbook-shelf {
  width: min(1023px, 100%);
  margin: 0 auto;
  padding: 52px 18px 70px;
  color: #f3e7d2;
  text-align: center;
  border-top: 1px solid rgba(213, 170, 77, .28);
  background:
    radial-gradient(circle at 17% 22%, rgba(246, 224, 189, .055) 0 2px, transparent 3px),
    radial-gradient(circle at 81% 63%, rgba(246, 224, 189, .05) 0 2px, transparent 3px),
    linear-gradient(rgba(25, 20, 17, .98), rgba(35, 27, 23, .96)),
    #151311;
  background-size: 62px 62px, 79px 79px, auto, auto;
}

.scrapbook-heading {
  margin: 0 auto 22px;
}

.scrapbook-heading p,
.scrapbook-heading span {
  margin: 0;
  color: #d8bd82;
  font-size: clamp(.66rem, 1.4vw, .82rem);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.scrapbook-heading h2 {
  margin: 5px 0 7px;
  color: #f3e7d2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4.5vw, 2.55rem);
  font-weight: normal;
}

.scrapbook-stage {
  position: relative;
  width: min(840px, 94vw);
  aspect-ratio: 16 / 10;
  margin: 0 auto;
  perspective: 1800px;
  outline: none;
}

.scrapbook-book {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.scrapbook-inside {
  position: absolute;
  inset: 3% 2% 2%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #8e7554;
  border-radius: 16px 19px 18px 16px;
  background: #d9c9a8;
  box-shadow:
    0 22px 34px rgba(0, 0, 0, .42),
    inset 0 0 24px rgba(75, 48, 31, .14);
}

.scrapbook-page {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 8% 7% 7%;
  flex-direction: column;
  color: #47372d;
  background:
    radial-gradient(circle at 17% 13%, rgba(118, 82, 54, .06) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(118, 82, 54, .05) 0 1px, transparent 2px),
    linear-gradient(100deg, rgba(255,255,255,.16), rgba(118,82,54,.05)),
    #e7dbc0;
  background-size: 31px 31px, 47px 47px, auto, auto;
}

.scrapbook-page-left {
  border-right: 1px solid rgba(94, 67, 46, .25);
  box-shadow: inset -16px 0 20px rgba(75, 48, 31, .08);
}

.scrapbook-page-right {
  box-shadow: inset 16px 0 20px rgba(75, 48, 31, .08);
}

.scrapbook-binding {
  position: absolute;
  z-index: 5;
  top: 2%;
  bottom: 2%;
  left: 50%;
  width: 3.2%;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(72,45,31,.24), rgba(255,255,255,.18) 48%, rgba(72,45,31,.18));
  transform: translateX(-50%);
  filter: blur(.2px);
}

.scrapbook-page-label {
  margin: 0 0 6%;
  color: #7b2f3b;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: clamp(.72rem, 1.65vw, 1.05rem);
  text-align: left;
}

.scrapbook-photo-grid {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 6%;
}

.scrapbook-polaroid,
.scrapbook-empty-frame {
  position: relative;
  display: block;
  min-width: 0;
  height: 100%;
  padding: 5%;
  color: #49382d;
  border: 1px solid rgba(99, 78, 59, .3);
  background: #f7f0df;
  box-shadow: 3px 5px 9px rgba(53, 38, 28, .2);
  transform: rotate(var(--tilt, -1.5deg));
}

.scrapbook-polaroid {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}


.scrapbook-polaroid:hover,
.scrapbook-polaroid:focus-visible {
  z-index: 3;
  transform: rotate(0deg) translateY(-3px) scale(1.035);
  box-shadow: 5px 8px 13px rgba(53, 38, 28, .28);
}

.scrapbook-polaroid:focus-visible {
  outline: 2px dotted #84303d;
  outline-offset: 3px;
}

.scrapbook-polaroid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(79, 59, 45, .25);
  filter: brightness(.95) saturate(.86) contrast(.98);
}

.scrapbook-polaroid span {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 4%;
  overflow: hidden;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: clamp(.43rem, .85vw, .72rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrapbook-empty-frame {
  display: grid;
  aspect-ratio: 1 / 1.12;
  place-content: center;
  gap: 5px;
  color: #927b66;
  border-style: dashed;
  background: rgba(248, 239, 220, .68);
}

.scrapbook-empty-frame span {
  font-size: clamp(1rem, 3vw, 1.7rem);
}

.scrapbook-empty-frame small {
  font-size: clamp(.42rem, .78vw, .66rem);
}

.scrapbook-upload-button {
  display: inline-block;
  margin-top: 8%;
  padding: 7px 11px;
  color: #fff6e5;
  border: 1px solid #612d36;
  border-radius: 3px;
  background: #84303d;
  box-shadow: 2px 3px 0 rgba(73, 46, 36, .2);
  font-size: clamp(.54rem, 1vw, .76rem);
  cursor: pointer;
}

.scrapbook-storage-note {
  margin: 4% auto 0;
  max-width: 90%;
  color: #76614f;
  font-size: clamp(.38rem, .72vw, .58rem);
  line-height: 1.4;
}

.scrapbook-cover {
  position: absolute;
  z-index: 10;
  inset: 3% 2% 2%;
  overflow: hidden;
  border: 1px solid rgba(80, 50, 37, .65);
  border-radius: 16px 19px 18px 16px;
  background: #611f2b;
  box-shadow:
    0 22px 34px rgba(0, 0, 0, .48),
    inset 0 0 24px rgba(255, 255, 255, .06);
  transform: rotateY(0deg);
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform .78s cubic-bezier(.22,.72,.26,1), box-shadow .4s ease;
  backface-visibility: hidden;
}

.scrapbook-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.07), transparent 28%, rgba(0,0,0,.12)),
    rgba(66, 28, 32, .08);
  mix-blend-mode: multiply;
}

.scrapbook-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(.86) saturate(.92) contrast(1.02);
}

.scrapbook-cover-caption {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 4.5%;
  padding: 7px 11px;
  color: #4d342a;
  border: 1px solid rgba(115, 87, 60, .5);
  background: rgba(240, 226, 194, .88);
  box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: clamp(.62rem, 1.3vw, .88rem);
  transform: translateX(-50%) rotate(-1deg);
}

.scrapbook-stage.is-open .scrapbook-cover,
.scrapbook-stage:hover .scrapbook-cover,
.scrapbook-stage:focus-within .scrapbook-cover {
  transform: rotateY(-157deg);
  box-shadow: -18px 24px 32px rgba(0, 0, 0, .38);
}

.scrapbook-stage.is-open .scrapbook-cover-caption,
.scrapbook-stage:hover .scrapbook-cover-caption,
.scrapbook-stage:focus-within .scrapbook-cover-caption {
  opacity: 0;
}

.scrapbook-photo-dialog {
  width: min(760px, calc(100% - 24px));
  max-width: 760px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #745844;
  border-radius: 10px;
  background: #e7dbc0;
  box-shadow: 0 26px 44px rgba(0,0,0,.58);
}

.scrapbook-lightbox-window {
  position: relative;
  padding: 22px 22px 18px;
  text-align: center;
  background:
    linear-gradient(90deg, transparent 34px, rgba(156,73,73,.16) 35px, transparent 36px),
    repeating-linear-gradient(0deg, #f4ead3 0 29px, #d0d7c0 30px);
}

.scrapbook-lightbox-window img {
  display: block;
  width: 100%;
  max-height: 64vh;
  object-fit: contain;
  border: 9px solid #fff8e8;
  box-shadow: 6px 8px 14px rgba(65, 45, 33, .25);
}

.scrapbook-lightbox-window p {
  margin: 12px 0 0;
  color: #563d31;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
}

.scrapbook-lightbox-close {
  position: absolute;
  z-index: 3;
  top: 7px;
  right: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #2c211c;
  border: 1px solid #8e785c;
  border-radius: 50%;
  background: #efe3ca;
  font-size: 1.15rem;
}

.scrapbook-delete-button {
  margin-top: 12px;
  padding: 7px 10px;
  color: #772b36;
  border: 1px solid #a67878;
  background: #ead1cb;
  font-family: "Courier New", Courier, monospace;
  font-size: .7rem;
}

@media (max-width: 700px) {
  .scrapbook-shelf {
    padding-left: 8px;
    padding-right: 8px;
  }

  .scrapbook-stage {
    width: 98vw;
  }

  .scrapbook-stage.is-open .scrapbook-cover,
  .scrapbook-stage:hover .scrapbook-cover,
  .scrapbook-stage:focus-within .scrapbook-cover {
    transform: rotateY(-148deg);
  }

  .scrapbook-page {
    padding: 7% 5%;
  }

  .scrapbook-photo-grid {
    gap: 5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scrapbook-cover,
  .scrapbook-polaroid {
    transition: none;
  }
}


.scrapbook-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8%;
}

.scrapbook-upload-button {
  margin-top: 0;
}

.scrapbook-upload-button.secondary {
  background: #a2707f;
}

.scrapbook-cover-strip {
  position: absolute;
  z-index: 2;
  left: 25.8%;
  top: 6.3%;
  width: 20.5%;
  height: 84%;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 2.4%;
  transform: rotate(-1.4deg);
  pointer-events: none;
}

.scrapbook-cover-strip-slot {
  overflow: hidden;
  border-radius: 3px;
}

.scrapbook-cover-strip-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(.98);
}

@media (max-width: 700px) {
  .scrapbook-upload-actions {
    gap: 6px;
  }

  .scrapbook-upload-button {
    font-size: clamp(.5rem, 2vw, .72rem);
  }
}


/* Clean four-photo scrapbook pages: no upload controls or captions. */
.scrapbook-upload-actions,
.scrapbook-upload-button,
.scrapbook-storage-note,
.scrapbook-polaroid span,
#scrapbook-lightbox-caption,
#scrapbook-lightbox-date {
  display: none !important;
}

.scrapbook-empty-frame {
  height: 100%;
  padding: 5%;
  aspect-ratio: auto;
}


/* =========================================================
   KAYLEE'S TURNTABLE
   A separate permanent MP3 player beneath the recipe section.
   It does not share audio, controls, or state with the iPod.
   ========================================================= */
.turntable-shelf {
  width: min(1023px, 100%);
  margin: 0 auto;
  padding: 54px 18px 76px;
  color: #f3e7d2;
  border-top: 1px solid rgba(213, 170, 77, .32);
  background:
    radial-gradient(circle at 13% 18%, rgba(246, 224, 189, .05) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 72%, rgba(246, 224, 189, .045) 0 2px, transparent 3px),
    linear-gradient(rgba(34, 27, 23, .98), rgba(17, 15, 13, .99)),
    #151311;
  background-size: 61px 61px, 77px 77px, auto, auto;
}

.turntable-heading {
  margin: 0 auto 25px;
  text-align: center;
}

.turntable-heading p,
.turntable-heading span {
  margin: 0;
  color: #d8bd82;
  font-size: clamp(.66rem, 1.4vw, .82rem);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.turntable-heading h2 {
  margin: 5px 0 7px;
  color: #f3e7d2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.72rem, 4.5vw, 2.6rem);
  font-weight: normal;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .4);
}

.turntable-console {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr);
  gap: 22px;
  width: min(930px, 100%);
  margin: 0 auto;
  align-items: stretch;
}

.turntable-player-card,
.turntable-playlist-card {
  min-width: 0;
  border: 1px solid rgba(156, 125, 87, .72);
  box-shadow:
    0 20px 32px rgba(0, 0, 0, .38),
    inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.turntable-player-card {
  display: grid;
  grid-template-columns: minmax(250px, 1.06fr) minmax(205px, .94fr);
  overflow: hidden;
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 2px, transparent 2px 7px),
    linear-gradient(145deg, #806247, #4d3628 58%, #34251e);
}

.turntable-deck {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), transparent 28%),
    repeating-linear-gradient(90deg, rgba(88,54,33,.13) 0 3px, rgba(255,255,255,.025) 3px 7px),
    #b98f69;
  box-shadow: inset -12px 0 18px rgba(45, 29, 21, .22);
}

.turntable-deck::before {
  content: "";
  position: absolute;
  inset: 4.5%;
  border: 1px solid rgba(77, 49, 33, .36);
  border-radius: 7px;
  box-shadow: inset 0 0 18px rgba(79, 48, 31, .16);
  pointer-events: none;
}

.turntable-platter {
  position: absolute;
  left: 7.5%;
  top: 13%;
  width: 68%;
  aspect-ratio: 1;
  padding: 3.2%;
  border: 1px solid #3c332e;
  border-radius: 50%;
  background:
    radial-gradient(circle, #76716c 0 6%, #292827 7% 71%, #716d68 72% 74%, #282625 75%);
  box-shadow:
    0 12px 18px rgba(43, 29, 22, .42),
    inset 0 0 0 2px rgba(255,255,255,.08);
}

.turntable-record {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, rgba(255,255,255,.028) 0 1px, rgba(0,0,0,.035) 1px 3px),
    radial-gradient(circle at center, #171616 0 8%, #2a2828 8.5% 36%, #131212 37% 100%);
  box-shadow:
    inset 0 0 22px rgba(0,0,0,.68),
    0 1px 2px rgba(255,255,255,.08);
  transform: rotate(0deg);
}

.turntable-record::before {
  content: "";
  position: absolute;
  inset: 4.5%;
  border: 1px solid rgba(255,255,255,.045);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 12px rgba(255,255,255,.012),
    inset 0 0 0 24px rgba(0,0,0,.045),
    inset 0 0 0 36px rgba(255,255,255,.012);
}

.turntable-record::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.8%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d7c8a9;
  box-shadow: 0 0 0 1px rgba(62, 40, 30, .65);
  transform: translate(-50%, -50%);
}

.turntable-groove {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(255,255,255,.035);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.turntable-groove.groove-one { width: 91%; height: 91%; }
.turntable-groove.groove-two { width: 76%; height: 76%; }
.turntable-groove.groove-three { width: 58%; height: 58%; }

.turntable-record-label {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  width: 31%;
  aspect-ratio: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3%;
  color: #492c2f;
  border: 1px solid rgba(92, 58, 51, .44);
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 29%, rgba(255,255,255,.28), transparent 26%),
    #d7bd82;
  box-shadow: inset 0 0 9px rgba(73, 45, 36, .18);
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
  transform: translate(-50%, -50%);
}

.turntable-record-label strong {
  max-width: 86%;
  overflow: hidden;
  font-size: clamp(.43rem, 1.05vw, .72rem);
  font-weight: normal;
  letter-spacing: .05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turntable-record-label small {
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(.34rem, .75vw, .52rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.turntable-tonearm {
  position: absolute;
  z-index: 4;
  right: 2.5%;
  top: 5.5%;
  width: 31%;
  height: 73%;
  transform: rotate(-12deg);
  transform-origin: 82% 15%;
  transition: transform .65s cubic-bezier(.2,.75,.2,1);
  pointer-events: none;
}

.turntable-tonearm-pivot {
  position: absolute;
  right: 4%;
  top: 3%;
  width: 31%;
  aspect-ratio: 1;
  border: 1px solid #423933;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #c8c1b6, #6d6963 48%, #302d2b 72%);
  box-shadow: 0 5px 8px rgba(45, 29, 22, .36);
}

.turntable-tonearm-bar {
  position: absolute;
  right: 19%;
  top: 14%;
  width: 7%;
  height: 72%;
  border: 1px solid rgba(42, 39, 36, .7);
  border-radius: 999px;
  background: linear-gradient(90deg, #5d5955, #d0cbc2 48%, #77716b);
  box-shadow: 2px 2px 4px rgba(0,0,0,.25);
  transform: rotate(22deg);
  transform-origin: top center;
}

.turntable-tonearm-head {
  position: absolute;
  left: 23%;
  bottom: 2%;
  width: 22%;
  height: 10%;
  border: 1px solid #3f3732;
  border-radius: 3px 7px 7px 3px;
  background: linear-gradient(180deg, #cec7bc, #6f6862);
  box-shadow: 2px 3px 5px rgba(0,0,0,.3);
  transform: rotate(22deg);
}

.turntable-deck-toggle {
  position: absolute;
  right: 7.2%;
  bottom: 8%;
  display: grid;
  width: 17%;
  aspect-ratio: 1;
  place-items: center;
  padding: 0;
  color: #efe4cd;
  border: 1px solid #3f3128;
  border-radius: 50%;
  background:
    radial-gradient(circle at 37% 31%, #8d7e6b, #3e3731 63%, #201d1b);
  box-shadow:
    0 4px 7px rgba(0,0,0,.34),
    inset 0 1px 2px rgba(255,255,255,.18);
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(.48rem, 1vw, .68rem);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.turntable-deck-toggle:active {
  transform: translateY(1px);
}

.turntable-deck-toggle:focus-visible,
.turntable-control:focus-visible,
.turntable-track-button:focus-visible {
  outline: 2px dotted #84303d;
  outline-offset: 3px;
}

.turntable-now-playing {
  display: flex;
  min-width: 0;
  padding: 28px 24px 24px;
  flex-direction: column;
  justify-content: center;
  color: #3d2d28;
  background:
    linear-gradient(90deg, transparent 28px, rgba(148,70,70,.15) 29px, transparent 30px),
    repeating-linear-gradient(0deg, #f2e8d3 0 28px, #ccd2bc 29px);
}

.turntable-now-kicker {
  margin: 0 0 7px;
  color: #84303d;
  font-family: "Courier New", Courier, monospace;
  font-size: .68rem;
  font-weight: bold;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.turntable-now-playing h3 {
  margin: 0;
  color: #6f2d39;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  font-weight: normal;
  line-height: 1.15;
}

#turntable-song-artist {
  margin: 5px 0 19px;
  color: #6a5548;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: .9rem;
}

.turntable-progress-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  color: #5e4b40;
  font-family: "Courier New", Courier, monospace;
  font-size: .63rem;
  font-variant-numeric: tabular-nums;
}

.turntable-progress-row input,
.turntable-volume-label input {
  width: 100%;
  accent-color: #84303d;
}

.turntable-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 20px 0 16px;
}

.turntable-control {
  display: grid;
  min-width: 42px;
  height: 36px;
  place-items: center;
  padding: 0 10px;
  color: #fff8e9;
  border: 1px solid #542c32;
  border-radius: 3px;
  background: #84303d;
  box-shadow: 2px 3px 0 rgba(69, 42, 35, .24);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .75rem;
}

.turntable-play-toggle {
  min-width: 52px;
  height: 44px;
  font-size: 1rem;
}

.turntable-control:active {
  box-shadow: 1px 1px 0 rgba(69, 42, 35, .24);
  transform: translate(1px, 1px);
}

.turntable-volume-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: #6b5648;
  font-family: "Courier New", Courier, monospace;
  font-size: .65rem;
  text-transform: lowercase;
}

.turntable-status {
  min-height: 1.3em;
  margin: 13px 0 0;
  color: #795f4f;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: .72rem;
  text-align: center;
}

.turntable-playlist-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  color: #392b25;
  background:
    linear-gradient(90deg, transparent 30px, rgba(156,73,73,.17) 31px, transparent 32px),
    repeating-linear-gradient(0deg, #f4ead5 0 29px, #d0d7c0 30px);
}

.turntable-playlist-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 13px;
  color: #fff8e9;
  border-bottom: 1px solid #5b3b35;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 4px, transparent 4px 8px),
    #84303d;
  font-family: Georgia, "Times New Roman", serif;
}

.turntable-playlist-heading span {
  font-size: 1.02rem;
}

.turntable-playlist-heading small {
  font-family: "Courier New", Courier, monospace;
  font-size: .65rem;
  opacity: .85;
}

.turntable-playlist {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 430px;
  margin: 0;
  padding: 10px;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: #9d8067 #eadfc8;
  scrollbar-width: thin;
}

.turntable-playlist-item + .turntable-playlist-item {
  border-top: 1px dashed rgba(110, 76, 57, .28);
}

.turntable-track-button {
  display: grid;
  width: 100%;
  grid-template-columns: 31px minmax(0, 1fr) 24px;
  gap: 8px;
  align-items: center;
  padding: 10px 8px;
  color: #46342c;
  border: 0;
  background: transparent;
  text-align: left;
  transition: background .15s ease, transform .15s ease;
}

.turntable-track-button:hover {
  background: rgba(255, 248, 229, .68);
  transform: translateX(2px);
}

.turntable-track-button.is-current {
  color: #6e2935;
  background: rgba(232, 207, 178, .78);
  box-shadow: inset 3px 0 0 #84303d;
}

.turntable-track-number {
  color: #9a7d68;
  font-family: "Courier New", Courier, monospace;
  font-size: .66rem;
}

.turntable-track-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.turntable-track-copy strong,
.turntable-track-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turntable-track-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: .88rem;
  font-weight: normal;
}

.turntable-track-copy small {
  color: #786052;
  font-family: "Courier New", Courier, monospace;
  font-size: .62rem;
}

.turntable-track-marker {
  color: #84303d;
  font-size: .86rem;
  text-align: center;
  opacity: 0;
}

.turntable-track-button.is-current .turntable-track-marker {
  opacity: 1;
}

.turntable-shelf.is-playing .turntable-record {
  animation: kaylee-record-spin 3.4s linear infinite;
}

.turntable-shelf.is-playing .turntable-tonearm {
  transform: rotate(7deg);
}

@keyframes kaylee-record-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 820px) {
  .turntable-console {
    grid-template-columns: 1fr;
  }

  .turntable-playlist {
    max-height: 360px;
  }
}

@media (max-width: 620px) {
  .turntable-shelf {
    padding: 42px 9px 60px;
  }

  .turntable-player-card {
    grid-template-columns: 1fr;
  }

  .turntable-deck {
    min-height: 360px;
  }

  .turntable-now-playing {
    padding: 25px 20px 23px;
  }
}

@media (max-width: 390px) {
  .turntable-deck {
    min-height: 330px;
  }

  .turntable-progress-row {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .turntable-record,
  .turntable-tonearm,
  .turntable-track-button {
    animation: none !important;
    transition: none !important;
  }
}
/* =========================================================
   MOBILE SCRAPBOOK — HORIZONTAL SWIPE
   ========================================================= */

@media (max-width: 768px) {
  .scrapbook-shelf {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .scrapbook-heading {
    width: 100vw;
    padding-left: 12px;
    padding-right: 12px;
  }

  .scrapbook-stage {
    width: min(840px, 200vw) !important;
    max-width: none !important;
    margin: 0 16px 60px !important;
    aspect-ratio: 16 / 10 !important;
    touch-action: pan-x pan-y;
  }

  .scrapbook-book {
    position: absolute !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  .scrapbook-polaroid img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}/* =========================================================
   SCROLLABLE SCRAPBOOK PAGES
   Keeps the open book the same size while allowing visitors
   to scroll downward through additional rows of photos.
   ========================================================= */

.scrapbook-inside {
  align-items: start;

  overflow-x: hidden !important;
  overflow-y: auto !important;

  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;

  scrollbar-width: thin;
  scrollbar-color: rgba(123, 47, 59, 0.55) transparent;
}

/* Each paper page can become taller than the visible book window. */
.scrapbook-page {
  align-self: start;
  width: 100%;
  min-height: 100%;
  height: auto !important;
  padding-bottom: 12%;
}

/* Allow unlimited two-column photo rows. */
.scrapbook-photo-grid {
  display: grid;
  flex: 0 0 auto !important;
  min-height: auto !important;

  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: none !important;
  grid-auto-rows: auto;

  gap: 6%;
}

/* Give every new photo a consistent Polaroid size. */
.scrapbook-polaroid,
.scrapbook-empty-frame {
  width: 100%;
  height: auto !important;
  aspect-ratio: 4 / 5;
}

/* Make every image fill its Polaroid without black space. */
.scrapbook-polaroid img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
}

/* Subtle scrapbook-colored scrollbar. */
.scrapbook-inside::-webkit-scrollbar {
  width: 9px;
}

.scrapbook-inside::-webkit-scrollbar-track {
  background: rgba(94, 67, 46, 0.08);
}

.scrapbook-inside::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(123, 47, 59, 0.55);
  background-clip: padding-box;
}

@media (max-width: 768px) {
  .scrapbook-inside::-webkit-scrollbar {
    width: 5px;
  }

  .scrapbook-photo-grid {
    gap: 5%;
  }
}/* =========================================================
   SCROLLABLE SCRAPBOOK
   Full two-page book always fits the screen.
   Extra photo rows scroll vertically inside the pages.
   ========================================================= */

.scrapbook-inside {
  align-items: start;

  overflow-x: hidden !important;
  overflow-y: auto !important;

  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;

  scrollbar-width: thin;
  scrollbar-color: rgba(123, 47, 59, 0.5) transparent;
}

.scrapbook-page {
  align-self: start;
  width: 100%;
  min-height: 100%;
  height: max-content !important;
  padding-bottom: 12%;
}

.scrapbook-photo-grid {
  display: grid;
  flex: 0 0 auto !important;
  min-height: 0 !important;

  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: none !important;
  grid-auto-rows: auto;

  column-gap: 6%;
  row-gap: clamp(10px, 2vw, 18px);
}

.scrapbook-polaroid,
.scrapbook-empty-frame {
  width: 100%;
  height: auto !important;
  aspect-ratio: 4 / 5;
}

.scrapbook-polaroid img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Small scrapbook-colored scrollbar */
.scrapbook-inside::-webkit-scrollbar {
  width: 8px;
}

.scrapbook-inside::-webkit-scrollbar-track {
  background: rgba(94, 67, 46, 0.07);
}

.scrapbook-inside::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(123, 47, 59, 0.5);
  background-clip: padding-box;
}


/* =========================================================
   MOBILE — SCALE THE WHOLE BOOK TO THE SCREEN
   No horizontal scrolling.
   ========================================================= */

@media (max-width: 768px) {
  .scrapbook-shelf {
    width: 100% !important;
    max-width: none !important;
    padding-left: 8px !important;
    padding-right: 8px !important;

    overflow-x: hidden !important;
  }

@media (max-width: 768px) {
  .scrapbook-stage {
    width: calc(100vw - 16px) !important;
    max-width: 840px !important;

    /* Makes the mobile book taller again */
    height: clamp(245px, 76vw, 430px) !important;
    aspect-ratio: auto !important;

    margin: 0 auto 60px !important;
    overflow: visible !important;
  }

  .scrapbook-book {
    position: absolute !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
  }
  }

  .scrapbook-book {
    position: absolute !important;
    inset: 0 !important;

    width: auto !important;
    height: auto !important;
  }

  .scrapbook-inside {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: pan-y;
  }

  .scrapbook-page {
    min-height: 100%;
    height: max-content !important;
    padding: 7% 5% 11% !important;
  }

  .scrapbook-page-label {
    margin-bottom: 6%;
    font-size: clamp(7px, 2.5vw, 14px);
  }

  .scrapbook-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none !important;
    grid-auto-rows: auto;

    column-gap: 5%;
    row-gap: 10px;
  }

  .scrapbook-polaroid,
  .scrapbook-empty-frame {
    height: auto !important;
    aspect-ratio: 4 / 5;
  }

  .scrapbook-inside::-webkit-scrollbar {
    width: 4px;
  }
}