/* ─── Inter self-hosted ─── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Reset & base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button:focus:not(:focus-visible) { outline: none; }

:root {
  --fg: #000000;
  --accent: #fffe7a;
  --panel-width: 500px;
  --content-left: 310px;
  --content-max: 1000px;
  --panel-swipe-x: 0px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --space-xxl: 60px;
  --space-xl: 40px;
  --space-lg: 28px;
  --space-md: 14px;
  --ls-display: -0.02em;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.1;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  position: relative;
  background: #ffffff;
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2 {
  font-size: inherit;
  font-weight: inherit;
}

body.panel-open::after {
  content: '';
  position: fixed;
  top: -100vh;
  right: 0;
  width: var(--panel-width);
  height: 300vh;
  background: var(--accent);
  z-index: 250;
  pointer-events: none;
  opacity: 0;
  animation: panelBgReveal 0s 0.45s forwards;
  transform: translateX(var(--panel-swipe-x));
}

body:has(#detail-panel.open)::before {
  content: '';
  position: fixed;
  top: -100vh;
  right: 0;
  left: max(var(--content-left), calc(100% - var(--content-max)));
  height: 300vh;
  background: #f1f1f1;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  animation: panelBgReveal 0s 0.45s forwards;
  transform: translateX(var(--panel-swipe-x));
  transition: left 0.45s var(--ease), right 0.45s var(--ease);
}

body.panel-snap::after,
body.panel-snap::before {
  transition: transform 0.35s var(--ease);
}

@media (max-width: 1809px) {
  body.panel-open:has(#detail-panel.open)::before {
    left: var(--content-left);
    right: var(--panel-width);
  }
}

@media (min-width: 1810px) {
  body:has(#detail-panel.open)::before {
    left: auto;
    width: var(--content-max);
  }
  body.panel-open:has(#detail-panel.open)::before {
    right: var(--panel-width);
  }
}

@keyframes panelBgReveal {
  to { opacity: 1; }
}

/* ─── Hide scrollbars ─── */
#about-panel,
#detail-panel,
#cart-panel,
#cart-conditions-page {
  scrollbar-width: none;
}

#about-panel::-webkit-scrollbar,
#detail-panel::-webkit-scrollbar,
#cart-panel::-webkit-scrollbar,
#cart-conditions-page::-webkit-scrollbar {
  display: none;
}

/* ─── Visually hidden (SEO + a11y) ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Playground container ─── */
#playground {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  outline: none;
  touch-action: none;
}

#playground.lens-active,
#playground.lens-active * {
  cursor: zoom-in !important;
}

/* ─── Image items ─── */
.img-item {
  position: absolute;
  cursor: grab;
  user-select: none;
  touch-action: none;
  opacity: 0;
  transition: opacity 0s,
              left 0.38s var(--ease),
              top 0.38s var(--ease),
              width 0.38s var(--ease),
              transform 0.25s ease;
}

.img-item.visible { opacity: 1; }
.img-item.loading { opacity: 0.25; }

.img-item.dragging {
  cursor: grabbing;
  transition: none;
  will-change: transform, left, top;
}

.img-item.is-linked { cursor: pointer; }

/* ─── Shuffle button ─── */
#shuffle-btn {
  display: none;
}

/* ─── Mag cursor ─── */
#mag-cursor {
  position: fixed;
  z-index: 600;
  background: var(--accent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

#mag-cursor.visible { opacity: 1; }

/* ─── Tooltip ─── */
#tooltip {
  position: fixed;
  z-index: 600;
  background: var(--accent);
  max-width: 220px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

#tooltip.visible { opacity: 1; }

#tt-excerpt,
#tt-title,
#tt-info,
#tt-price,
#tt-cta {
  display: block;
  line-height: 1;
}

#tt-info {
  white-space: pre-line;
}

/* ─── Header ─── */
header {
  position: fixed;
  top: 0;
  left: 0;
  padding: var(--space-xl);
  z-index: 100;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo {
  font-size: var(--space-xxl);
  font-weight: 600;
  line-height: .9;
  letter-spacing: var(--ls-display);
  color: var(--fg);
  text-decoration: none;
  text-transform: lowercase;
}

#hints {
  position: fixed;
  right: var(--space-xl);
  bottom: var(--space-xl);
  font-weight: 500;
  color: #c5c5c5;
  pointer-events: none;
  text-align: right;
  z-index: 200;
}

@keyframes hint-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hint--primary {
  color: var(--fg);
  animation: hint-blink 0.5s step-end 6;
}

#about-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  padding: var(--space-xl);
  z-index: 100;
  font-size: var(--space-xxl);
  font-weight: 600;
  line-height: .9;
  letter-spacing: var(--ls-display);
  color: var(--fg);
  background: none;
  border: none;
  pointer-events: none;
  font-family: inherit;
}

#about-btn span {
  display: block;
  pointer-events: all;
  cursor: pointer;
}

#about-btn span:hover { opacity: 0.4; }

/* ─── Main content ─── */
main:empty {
  background: transparent;
  pointer-events: none;
}

main:not(:empty) {
  position: relative;
  z-index: 10;
  pointer-events: all;
}

/* ─── About panel ─── */
#about-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-width);
  height: 100vh;
  background: var(--accent);
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  overflow-y: auto;
  color: var(--fg);
  padding-right: var(--space-xl);
}

#about-panel.is-open { transform: translateX(0); }

.about-panel__close {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: var(--space-lg);
  padding: 0;
  font-size: 28px;
  line-height: .8;
  height: 12px;
}

.about-panel__section {
  margin-bottom: var(--space-xl);
}

.about-panel__section-title,
.cart__section-title,
.conditions-section h2.cart__section-title {
  margin-bottom: var(--space-md);
  display: block;
  text-transform: lowercase;
  width: fit-content;
  font-size: var(--space-lg);
  font-weight: 600;
  letter-spacing: var(--ls-display);
}

.about-panel__bio {
  margin-top: var(--space-md);
}

.about-panel__bio-more {
  overflow: hidden;
  height: 0;
  transition: height 0.45s var(--ease);
}

.about-panel__bio-more p + p { margin-top: var(--space-md); }

.about-panel__bio-toggle {
  margin-left: auto;
  display: block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.about-panel__projects-inline {
  list-style: none;
}

.about-panel__projects-inline li {
  display: inline;
}

.about-panel__projects-inline li + li::before {
  content: ', ';
}

.about-panel__projects-inline li:last-child::after {
  content: '...';
}

.about-panel__see-all {
  display: block;
  margin-top: var(--space-md);
  width: fit-content;
  margin-left: auto;
}

.about-panel__contact {
  display: block;
  width: max-content;
}

.underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-panel__gallery-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: var(--fg);
  padding: 0;
}

.about-panel__gallery-btn:hover { opacity: 0.4; }

#gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #fff;
  overflow-y: auto;
  padding: var(--space-xxl);
  cursor: auto;
}


#gallery-overlay__close {
  position: fixed;
  bottom: 0;
  left: 0;
  padding: var(--space-xl);
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--space-xxl);
  font-weight: 600;
  line-height: .9;
  letter-spacing: var(--ls-display);
  color: var(--fg);
  font-family: inherit;
  z-index: 301;
}

#gallery-overlay__close:hover { opacity: 0.2; }

#gallery-overlay__mobile-close {
  display: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xxl);
}

.gallery-cell {
  aspect-ratio: 1;
  overflow: hidden;
}

.gallery-cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.about-panel__footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

footer .about-panel__contact {
  display: inline;
  width: auto;
}

.about-panel__section ul {
  list-style: none;
}

.about-panel__bio-toggle:hover,
.about-panel__see-all:hover,
.about-panel__contact:hover,
.about-panel__section ul a:hover,
.about-panel__projects-inline a:hover,
a.about-panel__section-title:hover,
.about-panel__section-title a:hover,
.about-panel__section-title-link a:hover { opacity: 0.2; }

@media (min-width: 716px) {
  .section-link {
    display: block;
    text-transform: lowercase;
    width: fit-content;
    font-size: var(--space-lg);
    font-weight: 600;
    letter-spacing: var(--ls-display);
    list-style-type: none;
  }
}

.about-panel__section ul a.about-panel__row-link:hover { opacity: 0.2; }

.about-panel__pub-row {
  display: flex;
  gap: 10px;
}

.about-panel__pub-row > a.about-panel__row-link {
  flex: 1;
  display: flex;
  gap: 10px;
}

.about-panel__exh-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0 10px;
}

.about-panel__row-year {
  min-width: 30px;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
}

.about-panel__row-title {
  flex: 1;
}

.about-panel__pub-row-publisher {
  text-align: right;
  flex-shrink: 0;
}

.about-panel__row-link {
  cursor: pointer;
}

.about-panel__subsection-title {
  margin: var(--space-md) 0 var(--space-md) var(--space-xl);
  text-transform: capitalize;
  font-size: inherit;
  font-weight: inherit;
}

/* ─── Content panel ─── */
.detail-panel__description {
  margin-bottom: var(--space-md);
  max-width: var(--panel-width);
}

.detail-panel__txt p:first-child {
  margin-bottom: var(--space-md);
}

#detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  left: max(var(--content-left), calc(100% - var(--content-max)));
  height: 100vh;
  overflow-y: auto;
  background: #f1f1f1;
  z-index: 10;
  pointer-events: all;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease), left 0.45s var(--ease), right 0.45s var(--ease);
}

#detail-panel.open {
  transform: translateX(0);
}

@media (max-width: 1809px) {
  body.panel-open #detail-panel.open {
    left: var(--content-left);
    right: var(--panel-width);
    transform: translateX(0);
  }
}

@media (hover: none) {
  #hints { display: none; }
}

@media (max-width: 950px) {
  #hints { display: none; }

  #about-panel {
    z-index: 100;
  }

  body.panel-open::after {
    z-index: 50;
  }

  #detail-panel {
    left: 0;
    right: 0;
    z-index: 200;
  }

  main:not(:empty) {
    z-index: 200;
  }

  #cart-panel {
    z-index: 300;
  }

  body.panel-open #detail-panel.open {
    left: 0;
    right: 0;
  }

  body:has(#detail-panel.open)::before {
    left: 0;
  }

  body.panel-open:has(#detail-panel.open)::before {
    left: 0;
    right: 0;
  }
}

@media (min-width: 950px) and (max-width: 1300px) {
  body.panel-open #detail-panel.open {
    left: 0;
  }

  main:not(:empty), #cart-panel {
    z-index: 200;
  }

  body.panel-open:has(#detail-panel.open)::before {
    left: 0;
    z-index: 150;
  }
}

@media (min-width: 1810px) {
  #detail-panel {
    left: auto;
    width: var(--content-max);
  }
  body.panel-open #detail-panel.open {
    transform: translateX(calc(-1 * var(--panel-width)));
  }
}

.detail-panel__meta,
.meta-date {
  margin-bottom: var(--space-md);
}

.meta-title {
  display: block;
  font-size: var(--space-lg);
  font-weight: 600;
  letter-spacing: var(--ls-display);
  text-transform: lowercase;
  margin-bottom: var(--space-md);
  line-height: .9;
}

.detail-panel__link {
  display: flex;
  flex-direction: column;
}

.detail-panel__link a:hover { opacity: 0.2; }

#detail-panel__close {
  display: block;
  margin-bottom: var(--space-lg);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  font-family: inherit;
  font-size: 28px;
  line-height: .8;
  height: 12px;
  position: sticky;
  top: 0;
}

#detail-panel__close:hover,
.about-panel__close:hover,
#cart-close:hover,
#cart-conditions-back:hover { opacity: 0.2; }

#detail-panel__close.close-btn--return {
  font-size: 28px;
  font-weight: 400;
  line-height: inherit;
  height: 12px;
  text-indent: -0.08em;
}

.detail-panel__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  list-style: none;
}

.detail-panel__content.is-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg) var(--space-md);
}

.detail-panel__content.is-grid.is-publications {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xxl);
  padding: 0 var(--space-xxl);
}

.detail-panel__content.is-grid.is-shop {
  grid-template-columns: repeat(auto-fill, minmax(clamp(100px, 45%, 200px), 1fr));
}

.is-grid:last-child {
  padding-bottom: 14px;
}

.grid-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.is-gallery {
  justify-content: end;
}

li.grid-card.is-gallery {
  gap: 0;
}

.grid-card__img {
  cursor: pointer;
}

.grid-card__img:hover { opacity: 0.7; }


.img-contain-sq {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  background: #ececec;
  padding: var(--space-lg);
  display: block;
}

.img-auto {
  width: 100%;
  aspect-ratio: auto;
  display: block;
}

.img-cover-landscape {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #ececec;
}

.grid-card__img--empty {
  width: 100%;
  aspect-ratio: 1;
  background: #ececec;
}

.grid-card__txt {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.is-grid .shop-actions {
  gap: 6px;
  min-width: 0;
}

.is-grid .shop-actions .shop-variants {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-card__title {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.grid-card__meta {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-panel__buy .shop-variants {
  display: block;
}

.shop-variants {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  field-sizing: content;
  width: auto;
  outline: 0;
}

.shop-add-btn {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  width: fit-content;
}

.detail-panel__description .shop-add-btn {
  background: var(--accent);
}



.is-grid .shop-add-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  display: none;
}

.shop-add-btn:not(:disabled):hover,
select.shop-variants:hover {
  color: hsl(0deg 0% 0% / 20%);
}

.shop-out-of-stock {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.shop-archive {
  font-size: var(--space-lg);
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: var(--ls-display);
}

.detail-panel__shop-archive {
  margin-top: var(--space-xxl);
}

.archive-grid {
  opacity: 0.5;
}

.img-contain-panel {
  width: 100%;
  max-height: 95vh;
  object-fit: contain;
  object-position: left;
  display: block;
}

/* ─── Page views ─── */
.page {
  padding: var(--space-xl) 24px 80px;
  max-width: 960px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
  pointer-events: all;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Page titles ─── */
.detail-panel__title {
  margin-bottom: var(--space-xxl);
  font-size: var(--space-xxl);
  font-weight: 600;
  letter-spacing: var(--ls-display);
  text-transform: lowercase;
  line-height: .9;
}

.detail-panel__shop {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--space-xxl);
}

.detail-panel__description.is-cart {
  max-width: none;
}

.detail-panel__description.is-cart .detail-panel__shop {
  max-width: none;
  margin-bottom: 0;
}

.detail-panel__shop .detail-panel__title {
  margin-bottom: 0;
}

#cart-btn {
  font-size: var(--space-lg);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: var(--ls-display);
  color: var(--fg);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-transform: lowercase;
  padding-right: var(--space-xl);
}

#cart-btn:hover { opacity: 0.4; }

#cart-btn sup {
  font-size: 14px;
}

/* ─── Shop conditions ─── */
#cart-conditions-content {
  padding-right: var(--space-xl);
}

.conditions-section {
  margin-bottom: var(--space-xxl);
  max-width: var(--panel-width);
}

.conditions-section a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.conditions-section a:hover {
  opacity: 0.2;
}

.conditions-section:last-child {
  margin-bottom: 0;
}

.conditions-section h2 {
  font-size: inherit;
  font-weight: inherit;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
}

/* ─── Panel conditions link ─── */
.cart-conditions-link {
  display: block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  text-align: left;
  margin-top: auto;
}

.cart-conditions-link:hover { opacity: 0.2; }

/* ─── Cart panel ─── */
#cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 85vw);
  height: 100vh;
  background: var(--accent);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease), right 0.45s var(--ease);
  overflow: hidden;
  color: var(--fg);
}

#cart-slider {
  display: flex;
  flex-direction: column;
  height: 200vh;
  transition: transform 0.45s var(--ease);
}

#cart-panel.conditions-open #cart-slider {
  transform: translateY(-100vh);
}

#cart-content {
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  padding-right: var(--space-xl);
  display: flex;
  flex-direction: column;
}

#cart-conditions-page {
  height: 100vh;
  overflow-y: auto;
  padding-bottom: var(--space-xl);
}

#cart-conditions-back {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  margin-bottom: var(--space-lg);
  padding: 0;
  font-size: 28px;
  line-height: 1.1;
  height: 12px;
  flex-shrink: 0;
  font-family: inherit;
  font-weight: 400;
  width: fit-content;
  text-indent: -0.08em;
}

#cart-panel.is-open { transform: translateX(0); }

@media (min-width: 951px) {
  body.panel-open #cart-panel {
    right: var(--panel-width);
  }
}

#cart-close {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  margin-bottom: var(--space-lg);
  padding: 0;
  font-size: 28px;
  line-height: .8;
  height: 12px;
  width: max-content;
}

#cart-content:has(.cart-empty) {
  display: flex;
  flex-direction: column;
}

.cart-empty-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: calc(-1 * (12px + var(--space-lg) + var(--space-lg) + var(--space-md)) / 2);
}

.cart-empty {
  opacity: 0.4;
}

.cart-list {
  list-style: none;
  margin-bottom: var(--space-xxl);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.cart-item-thumb {
  width: var(--space-lg);
  height: var(--space-lg);
  object-fit: contain;
  flex-shrink: 0;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cart-qty-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  padding: 0;
  color: var(--fg);
  line-height: 1;
}

.cart-qty-btn:hover { opacity: 0.2; }

.cart-item-qty {
  min-width: 16px;
  text-align: center;
}

.cart-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: inherit;
  font-size: 14px;
  padding: 0;
}

.cart-remove-btn:hover { opacity: 0.2; }

.cart-subtotal-row,
.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.cart-total-row {
  margin-bottom: var(--space-xxl);
}

.cart-shipping-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#zone-select,
#service-select {
  outline: 0;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: 1.1;
  border: none;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  field-sizing: content;
  width: auto;
}

.cart-shipping-select-row.is-placeholder {
  width: fit-content;
}

#shipping-price {
  min-width: 60px;
  text-align: right;
}

.cart-shipping-note {
  opacity: .4;
  margin-top: 10px;
  margin-bottom: var(--space-md);
  font-size: 9px;
  font-weight: 600;
  margin-left: 18px;
}

.cart-shipping-selects {
  display: flex;
  flex-direction: column;
}

.cart-shipping-select-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-shipping-select-row.blink-hint {
  animation: hint-blink 0.5s step-end 2;
}

.cart-checkout-btn {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  text-align: right;
  display: block;
  margin-left: auto;
  font-size: var(--space-lg);
  letter-spacing: var(--ls-display);
  font-weight: 600;
  line-height: 1.1;
}

@keyframes checkoutBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.cart-checkout-btn:not(:disabled)::before {
  content: '→ ';
}

.cart-checkout-btn:hover:not(:disabled) { opacity: 0.2; }

.cart-checkout-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.tax-note {
  margin-left: 4px;
  font-size: 9px;
  font-weight: 700;
  vertical-align: super;
}

/* ─── Detail description — body / spec / buy ─── */
.detail-panel__spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: baseline;
}


.size-guide-table {
  border-collapse: collapse;
  margin-top: var(--space-md);
}

.size-guide-table th,
.size-guide-table td {
  padding: 0 12px 0 0;
  text-align: left;
  white-space: nowrap;
}

.size-guide-table thead th {
  padding-bottom:4px;
  font-weight: inherit;
}

.size-guide-table tbody td:first-child {
  font-size: 9px;
  font-weight: 700;
  vertical-align: baseline;
}

.detail-panel__buy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: var(--space-md);
}

/* ─── Mobile (≤ 715px) ─── */
@media (max-width: 715px) {
  #gallery-overlay__close { display: none; }

  #gallery-overlay {
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
  }

  #gallery-overlay.is-open {
    transform: translateX(0);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-lg);
  }

  .gallery-cell {
    aspect-ratio: auto;
  }

  #gallery-overlay__mobile-close {
    display: block;
    position: sticky;
    top: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--space-lg);
    line-height: .8;
    height: 0px;
    color: var(--fg);
    font-family: inherit;
    padding: 0;
    z-index: 1;
  }

  #gallery-overlay__mobile-close:hover { opacity: 0.2; }

  .about-panel__gallery-btn {
    padding-bottom: var(--space-md);
    margin-left: auto;
  }
  header {
    padding-inline: 0;
    padding-block: calc(100vw / 8.2 * 0.05);
    right: 0;
    align-items: center;
    z-index: 10;
  }

  .logo {
    font-size: calc(100vw / 8.2);
    white-space: nowrap;
  }

  .logo br {
    display: none;
  }

  #about-btn {
    padding: calc(100vw / 8.2 * 0.15);
    right: 0;
    left: auto;
    z-index: 10;
    font-size: calc(100vw / 8.2);
  }

  #about-panel {
    width: 100vw;
    z-index: 100;
    padding-right: 0;
  }

  #about-panel__content {
    max-width: 500px;
  }

  h2.about-panel__section-title a::before,
  .about-panel__section-title-link a::before {
    content: '→ ';
  }

  .about-panel__section-title-link {
    margin-bottom: 0;
    display: block;
    text-transform: lowercase;
    width: fit-content;
    font-size: var(--space-lg);
    font-weight: 600;
    letter-spacing: var(--ls-display);
  }

  #detail-panel {
    left: 0;
    right: 0;
    width: 100vw;
    z-index: 200;
  }

  body.panel-open #detail-panel.open {
    left: 0;
    right: 0;
  }

  body.panel-open::after {
    width: 100vw;
    z-index: 50;
  }

  body.panel-open:has(#detail-panel.open)::before {
    left: 0;
    right: 0;
    z-index: 150;
  }

  body.panel-open #cart-panel {
    right: 0;
  }

  #cart-panel {
    z-index: 300;
  }

  main:not(:empty) {
    z-index: 200;
  }

  #detail-panel__close,
  #detail-panel__close.close-btn--return,
  .about-panel__close {
    font-size: var(--space-lg);
  }

  .detail-panel__title {
    font-size: calc(100vw / 8.2);
    margin-bottom: var(--space-xl);
  }

  .detail-panel__shop {
    margin-bottom: var(--space-xl);
  }

  .detail-panel__content.is-grid.is-publications {
    gap: var(--space-lg);
    padding: 0 var(--space-lg);
  }

  #cart-close,
  #cart-conditions-back {
    font-size: var(--space-lg);
  }

  #cart-conditions-back {
    line-height: inherit;
  }

  #cart-btn {
    padding-right: var(--space-md);
  }

  #cart-btn::before {
    content: '→ ';
  }

  #shuffle-btn {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 10;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--fg);
    font-family: inherit;
    font-size: calc(100vw / 8.2);
    font-weight: 600;
    letter-spacing: -0.02em;
    cursor: pointer;
    line-height: .9;
    padding-block: calc(100vw / 8.2 * 0.15);
    padding-inline: calc(100vw / 8.2 * 0.15);
  }

  #shuffle-btn:hover {
    opacity: .4;
  }
}

/* ─── iPad (716px–1024px) ─── */
@media (min-width: 716px) and (max-width: 1024px) {
  #shuffle-btn {
    display: block;
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border: none;
    color: var(--fg);
    font-family: inherit;
    font-size: var(--space-xxl);
    font-weight: 600;
    letter-spacing: var(--ls-display);
    line-height: .9;
    padding: var(--space-xl);
    cursor: pointer;
  }

  #shuffle-btn:hover { opacity: .4; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .img-item {
    transition: none;
  }

  #about-panel,
  #detail-panel,
  #cart-panel,
  #cart-slider,
  .about-panel__bio-more {
    transition: none;
  }

  body.panel-open::after,
  body:has(#detail-panel.open)::before {
    animation: none;
    opacity: 1;
  }

  .page {
    animation: none;
  }
}
