/* Release notice and archive additions; original homepage styles stay isolated. */
.amazon-new-tab { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cold-storage-release { padding: 32px 24px; background: #111912; border-block: 1px solid #46513b; color: #e6e3d8; }
.cold-storage-release-inner { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 28px; align-items: center; max-width: 1100px; margin-inline: auto; }
.cold-storage-release-cover img { display: block; width: 100%; height: auto; border: 1px solid #66705b; }
.cold-storage-release-label { font: 700 .72rem/1.6 "Courier New", monospace; letter-spacing: .09em; color: #bccc9c; margin: 0 0 10px; }
.cold-storage-release h2 { font: 500 clamp(1.8rem, 4vw, 2.5rem)/1.15 Georgia, serif; letter-spacing: -.03em; margin: 0 0 12px; }
.cold-storage-release p { margin: 0 0 12px; }
.cold-storage-release-actions { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.cold-storage-release-actions a { color: #eee5cd; font: 700 .84rem/1.6 "Courier New", monospace; text-underline-offset: 5px; padding-block: 10px; }
.cold-storage-release a:focus-visible { outline: 2px solid #f0c588; outline-offset: 5px; }
.cold-storage-release .cold-storage-release-disclosure { font: .7rem/1.6 Arial, sans-serif; color: #b5bbaa; margin: 10px 0 0; }
.cold-storage-purchase { margin-top: 8px; }
.cold-storage-footer p { font: .7rem/1.6 Arial, sans-serif; margin: 12px 0 0; }
@media (max-width: 480px) {
  .cold-storage-release { padding: 26px 20px; }
  .cold-storage-release-inner { grid-template-columns: 64px minmax(0, 1fr); gap: 18px; align-items: start; }
  .cold-storage-release-label { font-size: .65rem; }
}

/* Cold Storage is intentionally isolated from the existing book page. */
.cold-storage {
  --cs-ink: #e6e3d8;
  --cs-muted: #bbb9af;
  --cs-line: rgba(207, 219, 221, .2);
  --cs-red: #c67b70;
  box-sizing: border-box;
  color: var(--cs-ink);
  font: 1rem/1.5 Georgia, "Times New Roman", serif;
  isolation: isolate;
}

.cold-storage *,
.cold-storage *::before,
.cold-storage *::after {
  box-sizing: border-box;
}

.cold-storage [hidden] {
  display: none !important;
}

.cold-storage button,
.cold-storage a {
  -webkit-tap-highlight-color: transparent;
}

.cold-storage button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.cold-storage button:focus-visible,
.cold-storage a:focus-visible,
.cold-storage-catalog:focus-visible {
  outline: 2px solid #ebdba9;
  outline-offset: 4px;
}

.cold-storage-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100% - 34px, 430px);
  margin: 28px auto;
  padding: 0;
  border: 1px solid #585e5c;
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 0 0, rgba(208, 225, 226, .12), transparent 65%),
    repeating-linear-gradient(90deg, transparent 0 3px, rgba(213, 224, 224, .017) 3px 4px),
    linear-gradient(130deg, #272d2d, #171a19 70%);
  box-shadow: inset 0 0 0 4px rgba(2, 4, 4, .36), 0 12px 40px rgba(0, 0, 0, .36);
  overflow: hidden;
}

.cold-storage-ready {
  position: fixed;
  z-index: 1200;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(32px, env(safe-area-inset-bottom));
}

.cold-storage-ready .cold-storage-panel {
  position: absolute;
  right: calc(100% + 10px);
  bottom: 0;
  width: min(386px, calc(100vw - 92px));
  max-height: min(780px, calc(100vh - 44px));
  max-height: min(780px, calc(100dvh - 44px));
  margin: 0;
}

.cold-storage-ready.cold-storage-is-open::before {
  content: "";
  position: absolute;
  inset: 0 100% 0 auto;
  width: 12px;
}

.cold-storage-ready.cold-storage-is-open .cold-storage-panel {
  animation: cold-storage-open .22s ease-out both;
}

.cold-storage-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 185px;
  width: 48px;
  padding: 15px 9px;
  border: 1px solid #626761;
  border-radius: 5px;
  background:
    linear-gradient(90deg, #343a36, #232824 42%, #3b413a 86%, #1d231f);
  box-shadow: inset 1px 0 0 rgba(237, 244, 221, .18), 0 5px 20px rgba(0, 0, 0, .45);
}

.cold-storage-tab::before,
.cold-storage-tab::after {
  content: "";
  position: absolute;
  right: 8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a5a699;
  box-shadow: 0 1px 1px #000;
}

.cold-storage-tab::before { top: 8px; }
.cold-storage-tab::after { bottom: 8px; }

.cold-storage-tab-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  color: #dedec9;
  font: 700 .64rem/1.1 "Courier New", monospace;
  letter-spacing: .11em;
}

.cold-storage-handle {
  position: absolute;
  left: 6px;
  top: 26px;
  bottom: 26px;
  width: 8px;
  border: 1px solid #767c70;
  border-radius: 5px;
  background: linear-gradient(90deg, #323a31, #a3a692 42%, #5e6555 65%, #30392d);
  box-shadow: 2px 2px 3px rgba(0, 0, 0, .65);
}

.cold-storage-tab-label { margin-left: 13px; }

.cold-storage-tab-cue {
  position: absolute;
  right: calc(100% + 8px);
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid #c2b18f;
  border-radius: 3px;
  color: #241e16;
  background: linear-gradient(#e0d2b4, #c8b18a);
  box-shadow: 0 4px 15px rgba(0, 0, 0, .4);
  font: 700 .7rem/1.2 "Courier New", monospace;
  letter-spacing: .08em;
  white-space: nowrap;
}

.cold-storage-is-open .cold-storage-tab-cue {
  visibility: hidden;
}

.cold-storage-tab:hover,
.cold-storage-tab[aria-expanded="true"] {
  border-color: #a1a99a;
}

.cold-storage-header {
  position: relative;
  flex: 0 0 auto;
  padding: 24px 24px 17px;
  border-bottom: 1px solid var(--cs-line);
}

.cold-storage-eyebrow {
  margin: 0 38px 8px 0;
  color: #b3c1ba;
  font: 700 .62rem/1.35 "Courier New", monospace;
  letter-spacing: .14em;
}

.cold-storage-header h2 {
  max-width: none;
  margin: 0 28px 0 0;
  color: #e6e6d8;
  font: 900 1.8rem/1 Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: .045em;
  text-transform: uppercase;
  text-shadow: 0 2px 1px #080b09;
}

.cold-storage-tagline {
  margin: 10px 0 0;
  color: #bbbeb2;
  font-size: .85rem;
  font-style: italic;
}

.cold-storage-evidence-line {
  margin: 12px 0 0;
  color: #e2d6bc;
  font-size: .85rem;
  line-height: 1.5;
}

.cold-storage-close {
  position: absolute;
  top: 12px;
  right: 11px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #d8ded4;
  font: 400 1.75rem/1 Arial, sans-serif !important;
}

.cold-storage-close:hover {
  background: rgba(210, 225, 219, .08);
}

.cold-storage-catalog-heading {
  flex: 0 0 auto;
  margin: 0;
  padding: 17px 24px 0;
  color: #c8c8b9;
  font: 700 .63rem/1.45 "Courier New", monospace;
  letter-spacing: .085em;
}

.cold-storage-transfer {
  flex: 0 0 auto;
  margin: 8px 24px 0;
  color: #bcbeb3;
  font-size: .77rem;
  line-height: 1.45;
}

.cold-storage-transfer a {
  color: #e5d8b9;
  text-underline-offset: 3px;
}

.cold-storage-controls {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 0;
  color: var(--cs-muted);
  font: .68rem/1.25 "Courier New", monospace;
}

.cold-storage-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--cs-line);
  border-radius: 3px;
  background: #252b26;
  font: 1rem/1 Arial, sans-serif;
}

.cold-storage-controls button:hover:not(:disabled) {
  background: #394036;
}

.cold-storage-controls button:disabled {
  opacity: .36;
  cursor: default;
}

.cold-storage-catalog {
  position: relative;
  min-height: 0;
  padding: 17px 18px;
  scrollbar-width: thin;
  scrollbar-color: #798279 #252a25;
}

.cold-storage-ready .cold-storage-catalog {
  overflow-x: hidden;
  overflow-y: auto;
  /* Keep native scrolling and allow normal page scrolling at the boundary. */
  overscroll-behavior: auto;
}

.cold-storage-card {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  column-gap: 16px;
  align-content: start;
  padding: 18px;
  border: 1px solid #697065;
  border-radius: 3px;
  color: #dddccc;
  background:
    radial-gradient(ellipse at 0 0, rgba(225, 236, 218, .09), transparent 60%),
    linear-gradient(145deg, #323a30, #232a22);
  box-shadow: inset 0 0 0 3px rgba(8, 15, 8, .28), 0 8px 13px rgba(0, 0, 0, .18);
}

.cold-storage-card + .cold-storage-card {
  margin-top: 14px;
}

.cold-storage-card::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 5px;
  border-radius: 3px 3px 0 0;
  opacity: .55;
  background: linear-gradient(100deg, #c1caba, #7c8b79 32%, #bdc6b7 69%, #687662);
  pointer-events: none;
}

.cold-storage-cover {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
  width: 88px;
  min-height: 132px;
  margin: 0;
  border: 1px solid rgba(221, 229, 209, .3);
  background: #d1d4c0;
  box-shadow: 4px 5px 8px rgba(0, 0, 0, .35);
}

.cold-storage-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.cold-storage-cover-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 132px;
  padding: 12px 8px;
  color: #343b31;
  background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(51, 64, 45, .08) 24px 25px), #d1d4c0;
  font: 700 .57rem/1.45 "Courier New", monospace;
  overflow-wrap: anywhere;
}

.cold-storage-jacket-title {
  display: flex;
  align-items: center;
  min-height: 132px;
  padding: 12px 9px;
  color: #343b31;
  background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(51, 64, 45, .08) 24px 25px), #d1d4c0;
  font: 700 .61rem/1.45 "Courier New", monospace;
  overflow-wrap: anywhere;
}

.cold-storage-file {
  grid-column: 2;
  justify-self: start;
  margin: 0 0 11px;
  padding: 3px 6px;
  border: 1px solid #a16b5e;
  color: #d2a096;
  font: 700 .64rem/1.15 "Courier New", monospace;
  letter-spacing: .09em;
  transform: rotate(-2deg);
}

.cold-storage-file span {
  display: block;
  max-width: 26ch;
  margin-top: 4px;
  font-size: .57rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.cold-storage-card h3 {
  grid-column: 2;
  max-width: none;
  margin: 0 0 8px;
  color: #edebdb;
  font: 700 1.06rem/1.15 Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: break-word;
}

.cold-storage-title {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(237, 235, 219, .38);
  text-underline-offset: 3px;
}

.cold-storage-title:hover {
  text-decoration-color: #edebdb;
}

.cold-storage-title[role="button"] {
  cursor: pointer;
}

.cold-storage-genre {
  grid-column: 2;
  margin: 0;
  color: #b8c2ac;
  font: .64rem/1.5 "Courier New", monospace;
}

.cold-storage-synopsis {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  color: #d1d4c4;
  font-size: .85rem;
  line-height: 1.5;
}

.cold-storage-preview {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  padding: 13px 0 0;
  border-top: 1px dashed rgba(201, 217, 185, .3);
  color: #cbd0bf;
  font-size: .8rem;
  line-height: 1.55;
}

.cold-storage-sample-label {
  margin: 0 0 7px;
  color: #b7c0ad;
  font: 700 .61rem/1.4 "Courier New", monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cold-storage-sample {
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font: .84rem/1.6 Georgia, "Times New Roman", serif;
}

.cold-storage-preview p:last-child,
.cold-storage-sample p:last-child {
  margin-bottom: 0;
}

.cold-storage-book-link {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  color: #efe1b6;
  font: 700 .66rem/1.35 "Courier New", monospace;
  text-underline-offset: 3px;
}

.cold-storage-footer {
  flex: 0 0 auto;
  margin: 0;
  padding: 15px 24px 18px;
  border-top: 1px solid var(--cs-line);
  color: #acb5a5;
  background: rgba(6, 13, 6, .24);
  font: .62rem/1.6 "Courier New", monospace;
  letter-spacing: 0;
  text-align: left;
}

.cold-storage-number-note,
.cold-storage-repository-link {
  flex: 0 0 auto;
  margin: 0 24px 11px;
  color: #adb7a5;
  font: .63rem/1.5 "Courier New", monospace;
}

.cold-storage-repository-link a {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  color: #e7ddbd;
  text-underline-offset: 3px;
}

.cold-storage-grip,
.cold-storage-backdrop {
  display: none;
}

@keyframes cold-storage-open {
  from { opacity: 0; transform: translateX(9px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes cold-storage-sheet-open {
  from { opacity: .5; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 680px) {
  .cold-storage-ready {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .cold-storage-ready .cold-storage-tab {
    width: auto;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 4px;
    min-height: 58px;
    height: auto;
    padding: 9px 14px 9px 31px;
    border-radius: 5px;
    border-color: #9eaa97;
  }

  .cold-storage-ready .cold-storage-tab-cue {
    position: static;
    padding: 0;
    border: 0;
    color: #f0e2bc;
    background: none;
    box-shadow: none;
    font-size: .72rem;
  }

  .cold-storage-ready .cold-storage-tab-label {
    margin-left: 0;
    writing-mode: horizontal-tb;
    font-size: .59rem;
    letter-spacing: .07em;
  }

  .cold-storage-ready .cold-storage-handle {
    top: 8px;
    bottom: 8px;
    left: 12px;
    width: 7px;
  }

  .cold-storage-ready .cold-storage-tab::before,
  .cold-storage-ready .cold-storage-tab::after {
    display: none;
  }

  .cold-storage-ready .cold-storage-panel {
    position: fixed;
    z-index: 2;
    inset: auto 0 0;
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    padding-bottom: env(safe-area-inset-bottom);
    border-width: 1px 0 0;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -14px 65px rgba(0, 0, 0, .6);
  }

  .cold-storage-ready.cold-storage-is-open .cold-storage-panel {
    animation-name: cold-storage-sheet-open;
  }

  .cold-storage-ready .cold-storage-backdrop:not([hidden]) {
    position: fixed;
    z-index: 1;
    display: block;
    inset: 0;
    background: rgba(3, 7, 4, .68);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    touch-action: none;
  }

  .cold-storage-ready.cold-storage-is-open .cold-storage-tab {
    visibility: hidden;
  }

  .cold-storage-ready .cold-storage-grip {
    flex: 0 0 auto;
    display: block;
    height: 25px;
    touch-action: pan-x;
  }

  .cold-storage-grip::before {
    content: "";
    display: block;
    width: 42px;
    height: 4px;
    margin: 10px auto;
    border-radius: 5px;
    background: #8b9584;
  }

  .cold-storage-ready .cold-storage-header {
    padding: 0 22px 13px;
  }

  .cold-storage-ready .cold-storage-close {
    top: -8px;
  }

  .cold-storage-ready .cold-storage-header h2 {
    font-size: 1.75rem;
  }

  .cold-storage-ready .cold-storage-catalog-heading {
    padding: 13px 22px 0;
  }

  .cold-storage-ready .cold-storage-transfer {
    margin-right: 22px;
    margin-left: 22px;
  }

  .cold-storage-ready .cold-storage-catalog {
    display: flex;
    gap: 12px;
    align-items: stretch;
    padding: 15px 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 18px;
  }

  .cold-storage-ready .cold-storage-card {
    flex: 0 0 100%;
    min-width: 0;
    max-height: 50vh;
    max-height: 50dvh;
    margin: 0;
    overflow-y: auto;
    scroll-snap-align: start;
    scrollbar-width: thin;
  }

  .cold-storage-ready .cold-storage-footer {
    padding: 11px 22px 14px;
  }
}

@media (max-height: 560px) and (max-width: 680px) {
  .cold-storage-ready .cold-storage-panel {
    max-height: 96dvh;
  }

  .cold-storage-ready .cold-storage-tagline,
  .cold-storage-ready .cold-storage-transfer,
  .cold-storage-ready .cold-storage-catalog-heading {
    display: none;
  }

  .cold-storage-ready .cold-storage-header {
    padding-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cold-storage *,
  .cold-storage *::before,
  .cold-storage *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
