.brrrick {
  --ink: #17191b;
  --muted: #51585d;
  --paper: #fcfcfa;
  --canvas: #fff;
  --rule: #c8ced0;
  --spine: #e2e5e4;
  --leaf-edge: #e9ebea;
  --gallery-edge: #f7f8f6;
  --book-border: #dce0de;
  --imprint: #5b646b;
  --focus: #195681;
  --image-field: #edf0ef;
  --book-shadow: #4a505a90;
  --back-surface: linear-gradient(155deg, #dce8ee 0, #f9fbfc 47%, #e7eef1 100%);
  color-scheme: light;
  background: var(--canvas);
  color: var(--ink);
}

.brrrick[data-book-theme="dark"] {
  --ink: #eef0f0;
  --muted: #bdc4c7;
  --paper: #202326;
  --canvas: #121517;
  --rule: #545d62;
  --spine: #0e1012;
  --leaf-edge: #131618;
  --gallery-edge: #1a1e20;
  --book-border: #464d51;
  --imprint: #b1bcc2;
  --focus: #a8d9fc;
  --image-field: #31373a;
  --book-shadow: #000b;
  --back-surface: linear-gradient(155deg, #28373e, #344148 47%, #20292e);
  color-scheme: dark;
}

.brrrick :is(.article-mast, .article-footer) {
  background: var(--canvas);
  color: var(--ink);
}

.brrrick .article-footer { border-color: var(--rule); }
.brrrick .article-menu { background: var(--paper); color: var(--ink); }
.brrrick .article-menu::backdrop { background: var(--canvas); }

.book-header-controls { display: flex; align-items: center; gap: .55rem; }
.book-theme {
  min-height: 44px;
  padding: 0 .65rem;
  border: 1px solid transparent;
  background: transparent;
  font-size: .875rem;
}
.book-theme:hover { border-color: var(--rule); }
.brrrick[data-book-theme="dark"] .floating-soundtrack {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--rule);
}

.brrrick [hidden] { display: none !important; }

.lookbook {
  min-height: 70svh;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1rem/1.5 Arial, Helvetica, sans-serif;
  padding: clamp(1.3rem, 4vh, 3rem) 1rem clamp(2rem, 5vw, 4rem);
}

.front { display: grid; justify-items: center; gap: 1.35rem; }

.cover {
  position: relative;
  isolation: isolate;
  width: min(100%, 31rem, 58svh);
  aspect-ratio: 4 / 5;
  background: #e6ecef;
  box-shadow: 2px 3px 0 #c1c7cb, 4px 5px 0 #e6e8e9, 9px 9px 0 -3px #a6adb0,
    15px 20px 32px -18px #34455070;
  container-type: inline-size;
}

.cover::after {
  position: absolute;
  content: "";
  inset: 0 auto 0 0;
  width: 9px;
  pointer-events: none;
  background: linear-gradient(90deg, #23364450, #fff4 46%, transparent);
}

.cover-art { width: 100%; height: 100%; object-fit: cover; display: block; }

.wordmark {
  position: absolute;
  inset: 5% 4% auto;
  margin: 0;
  text-align: center;
  font-family: 'Arial Black', Arial, Helvetica, sans-serif;
  font-size: 14.5cqw;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.085em;
  color: #151a20;
}

.lookbook :is(.enter, .text-button, .categories a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--ink);
  font: 500 .875rem/1.2 Arial, Helvetica, sans-serif;
  text-decoration: none;
}

.lookbook .enter {
  border: 1px solid var(--ink);
  padding: 0 1.8rem;
}

.lookbook .enter:hover { background: var(--ink); color: var(--canvas); }
.lookbook .text-button:hover { text-decoration: underline; text-underline-offset: .27em; }
.lookbook :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.inside { max-width: 70rem; margin-inline: auto; }

.book-stage {
  position: relative;
  touch-action: pan-y pinch-zoom;
}
.cover { touch-action: pan-y pinch-zoom; }
.spread {
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 28rem;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule), 0 4px 0 -1px var(--gallery-edge),
    0 6px 0 -2px var(--rule), 2px 15px 28px -19px var(--book-shadow);
  border: 1px solid var(--book-border);
}

.book-stage[data-view="back"] .spread { visibility: hidden; }
.book-stage[data-view="spread"] .back { visibility: hidden; }

.product-index {
  border-top: 1px solid var(--rule);
  margin-top: .4rem;
}
.product-index summary {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  width: fit-content;
  list-style: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8125rem;
}
.product-index summary::-webkit-details-marker { display: none; }
.product-index summary::before {
  content: "";
  width: .75rem;
  height: .75rem;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
}
.product-index[open] summary::before { background-size: 100% 1px, 0 0; }
.product-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: clamp(1rem, 3vw, 2rem);
  padding: .2rem 0 .45rem;
}
.product-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: clamp(.95rem, 1.7vw, 1.2rem);
  letter-spacing: -.025em;
  text-decoration: none;
  transition: color 160ms ease-out;
}
.product-links a:is(:hover, :focus-visible) { color: var(--imprint); }
.product-links a[aria-current] { font-weight: 700; }
.brrrick[data-book-theme="dark"] .product-links a:is(:hover, :focus-visible) { color: #fff; }



:is(.book-stage, .cover).is-dragging {
  cursor: grabbing;
  user-select: none;
  transform: perspective(1800px) rotateY(var(--drag-angle, 0deg));
}
@media (hover: hover) and (pointer: fine) {
  .cover, .leaf { cursor: grab; }
  .product-details, .hero-view figcaption, .credits { cursor: auto; }
}

.leaf { min-width: 0; padding: clamp(1.25rem, 4vw, 3.15rem); }

.details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(270deg, var(--leaf-edge), var(--paper) 17px);
}

.running-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -.045em;
  font-size: .875rem;
}

.detail-stack { max-width: 22rem; }
.detail-stack, .title-stack { display: grid; }
.detail-stack > *, .title-stack > * { grid-area: 1 / 1; min-width: 0; }
.book-measure { visibility: hidden; pointer-events: none; }
.book-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.story {
  margin: 0 0 1.65rem;
  font: 400 clamp(1.45rem, 2.25vw, 2.15rem)/1.18 Georgia, 'Times New Roman', serif;
  letter-spacing: -.027em;
}

.specs, .credits { margin: 0; }

.specs > div {
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 5.3rem 1fr;
  gap: .65rem;
  padding: .65rem 0;
}

.specs dt { font-size: .875rem; color: var(--muted); }
.specs dd { font-size: .9375rem; }
.lookbook dd { margin: 0; }

.lookbook button.text-button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.details .text-button { text-decoration: underline; text-underline-offset: .24em; }

.concept-note { margin: 0; color: var(--muted); font-size: .8125rem; }

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(48px, 17%);
  gap: clamp(.55rem, 1.5vw, 1rem);
  align-content: center;
  background: linear-gradient(90deg, var(--spine), var(--gallery-edge) 20px, var(--paper));
}

.hero-view { margin: 0; }
.image-frame {
  aspect-ratio: 1;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--image-field);
  border: 0;
  cursor: zoom-in;
}
.product-image {
  transition: transform 220ms ease-out;
  transform-origin: var(--zoom-origin, center);
}
.image-frame.is-zoomed .product-image { transform: scale(1.48); }
.product-image { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--image-field); }
.hero-view figcaption { padding-top: .85rem; }
.hero-view h2 { font-size: clamp(1.23rem, 2.5vw, 2.15rem); line-height: 1.05; letter-spacing: -.055em; margin: 0 0 .4rem; }
.hero-view figcaption > p { font-size: .9375rem; line-height: 1.35; margin: 0; }
.hero-view .price { margin-bottom: .25rem; color: var(--muted); }

.thumbnails { display: grid; align-content: start; gap: .55rem; }
.thumbnails button { padding: 0; border: 1px solid transparent; background: transparent; cursor: pointer; min-height: 44px; }
.thumbnails button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--paper) inset; padding: 2px; }
.thumbnails img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--image-field); }

.categories {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(.55rem, 3vw, 2.15rem);
  padding-top: .9rem;
  border-bottom: 1px solid var(--rule);
}

.categories a { border-bottom: 2px solid transparent; white-space: nowrap; }
.categories a:is(:hover, [aria-current]) { border-color: currentColor; }

.book-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: .35rem;
  font-size: .875rem;
  color: var(--muted);
}

.book-controls a:first-child { justify-self: start; }
.book-controls a:last-child { justify-self: end; }

.back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.back-paper {
  display: grid;
  align-items: end;
  width: min(100%, 27rem, 58svh);
  min-height: min(100%, 27rem);
  aspect-ratio: 4 / 5;
  background: linear-gradient(270deg, var(--spine), transparent 10px), var(--back-surface);
  border: 1px solid var(--book-border);
  box-shadow: -3px 4px 0 var(--rule), -5px 6px 0 var(--gallery-edge),
    -7px 15px 24px -10px var(--book-shadow);
}
.back h2 { margin: 1.25rem 0 1rem; font: 400 clamp(1.9rem, 4vw, 3.5rem)/1 Georgia, serif; }
.credits div + div { margin-top: .8rem; }
.credits dt { color: var(--muted); font-size: .875rem; }
.credits dd { font-weight: 600; }

.sizing-dialog {
  width: min(36rem, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  background: var(--canvas);
  color: var(--ink);
  padding: 1.35rem;
  border: 1px solid var(--rule);
}

.sizing-dialog::backdrop { background: #15212b77; }
.sizing-dialog form { display: flex; justify-content: flex-end; }
.sizing-dialog h2 { margin: 0; line-height: 1.05; }
.sizing-dialog table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.sizing-dialog caption { text-align: left; color: var(--muted); padding-bottom: .5rem; }
.sizing-dialog :is(th,td) { border-top: 1px solid var(--rule); padding: .45rem .35rem; }

@media (max-width: 45rem) {
  .cover { width: min(100%, 27rem, 64svh); }
  .categories { letter-spacing: 0; text-transform: none; }
  .spread { grid-template-columns: 1fr; min-height: 0; }
  .gallery { order: -1; background: var(--paper); }
  .details { background: var(--paper); border-top: 1px solid var(--rule); gap: 1rem; }
  .running-title { display: none; }
  .detail-stack { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .product-image, .product-links a { transition: none; }
  :is(.book-stage, .cover).is-dragging { transform: none; }
}

.page-corner {
  position: absolute;
  z-index: 1;
  inset-block-end: 0;
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
}
.page-corner-left { inset-inline-start: 0; }
.page-corner-right { inset-inline-end: 0; }
.page-corner::after {
  content: "";
  position: absolute;
  inset-block-end: 1px;
  width: 24px;
  height: 24px;
  background:
    linear-gradient(135deg, transparent 48%, var(--rule) 49%, var(--rule) 52%, var(--leaf-edge) 54%);
  pointer-events: none;
}
.page-corner-right::after { inset-inline-end: 1px; }
.page-corner-left::after { inset-inline-start: 1px; transform: scaleX(-1); }
.page-corner:is(:hover, :focus-visible)::after {
  background: linear-gradient(135deg, transparent 48%, currentColor 49%, currentColor 52%, var(--gallery-edge) 54%);
}

.shop-controls,
.shop-actions {
  display: flex;
  align-items: center;
}
.shop-controls { justify-content: space-between; margin-top: .5rem; }
.shop-actions { gap: .15rem; }

.shop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .3rem;
  min-height: 44px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: 500 .75rem/1.2 Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.shop-button:is(:hover, :focus-visible) { color: var(--imprint); }
.shop-button:disabled { opacity: .45; cursor: default; }
.shop-icon-button { position: relative; min-width: 44px; padding: 0; }
.shop-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.shop-icon-button[aria-pressed="true"] .shop-icon { fill: currentColor; }
.bag-count {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 1.05rem;
  border-radius: 1em;
  padding: .12rem .16rem;
  color: var(--canvas);
  background: var(--ink);
  font-size: .63rem;
  letter-spacing: 0;
  text-align: center;
}

.book-dialog {
  max-height: calc(100dvh - 2rem);
  margin: auto;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: var(--paper);
}
.book-dialog::backdrop { background: #0c1019bc; }
.photo-lightbox {
  max-width: calc(100% - 2rem);
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
}
.photo-lightbox img {
  display: block;
  width: min(77svh, 750px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  background: var(--image-field);
}
.lightbox-close { position: absolute; top: .45rem; right: .45rem; }
.lightbox-close button {
  font-size: 1.65rem;
  color: #fff;
  background: #16191ded;
  border: 1px solid #ffffff6a;
}
.lightbox-close button:is(:hover, :focus-visible) { color: #fff; background: #15191f; }

.shop-dialog { width: min(34rem, calc(100% - 2rem)); padding: clamp(1rem, 4vw, 1.6rem); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.dialog-heading h2 { margin: 0; line-height: 1.1; letter-spacing: -.04em; }
.close-mark { font-size: 1.65rem; }
.shop-items { margin: 0; padding: 0; list-style: none; }
.shop-items li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: start;
  gap: .65rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule);
}
.shop-items img { width: 100%; height: auto; background: var(--image-field); }
.shop-items a { font-weight: 700; }
.shop-items p { margin: .2rem 0 0; font-size: .8125rem; color: var(--muted); }
.bag-item-actions { display: grid; grid-template-columns: 44px minmax(1ch, auto) 44px; align-items: center; text-align: center; }
.bag-item-actions button:not(.bag-remove) { font-size: 1.1rem; }
.bag-item-actions .bag-remove { grid-column: 1 / -1; }
.bag-subtotal { display: flex; justify-content: space-between; padding-top: 1rem; font-weight: 600; }
.bag-size-dialog { width: min(28rem, calc(100% - 2rem)); }
.bag-size-dialog > p { margin: .55rem 0 1rem; }
#bag-size-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  column-gap: .85rem;
  row-gap: .75rem;
}
.size-picker { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.size-picker legend { margin-bottom: .25rem; padding: 0; font-size: .875rem; color: var(--muted); }
.size-options { display: flex; flex-wrap: wrap; gap: .25rem; }
.size-options label { position: relative; cursor: pointer; }
.size-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  clip-path: inset(50%);
}
.size-options span {
  display: grid;
  place-items: center;
  width: max(44px, 2.75rem);
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 0;
  box-sizing: border-box;
  color: var(--ink);
  font: 600 .875rem/1 Arial, Helvetica, sans-serif;
}
.size-options label:hover span { background: var(--leaf-edge); }
.size-options input:checked + span { border-color: currentColor; }
.size-options input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.shop-confirm {
  width: fit-content;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--ink);
  color: var(--canvas);
  background: var(--ink);
  font: inherit;
  font-size: .82rem;
  text-transform: uppercase;
}
.shop-confirm:disabled { opacity: .5; cursor: default; }

@media (max-width: 30rem) {
  .shop-items li { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .shop-items li > :nth-child(3) { grid-column: 2; justify-self: start; }
  .shop-actions { gap: 0; }
  .shop-button { letter-spacing: .02em; }
}
