@font-face {
  font-family: "Instrument Sans";
  src: url("./assets/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f5f6fa;
  --white: #fff;
  --ink: #151829;
  --muted: #545b71;
  --line: #d9deea;
  --blue: #2347dd;
  --blue-dark: #1937b8;
  --light: #e9eeff;
  --media: #e6eaf4;
  --radius: 0.75rem;
  font-family: "Instrument Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scrollbar-gutter: stable;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, fieldset { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
::selection { background: #cbd6ff; }
[hidden] { display: none !important; }

.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.skip:focus { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 10; padding: 0.6rem 0.9rem; background: var(--white); }
.wrap { width: min(calc(100% - 5rem), 82rem); margin-inline: auto; }

.header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner { min-height: 4.4rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.wordmark { width: fit-content; display: inline-flex; align-items: center; gap: 0.22em; color: var(--ink); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.09em; white-space: nowrap; }
.wordmark-slash { color: var(--blue); font-weight: 600; margin-inline: 0.05em; }
.header-nav { display: flex; height: 100%; gap: clamp(1.25rem, 3vw, 3.25rem); color: var(--muted); font-size: 0.93rem; }
.header-nav a { min-height: 4.35rem; align-content: center; border-bottom: 2px solid transparent; }
.header-nav a:hover, .header-nav a[aria-current] { color: var(--ink); border-color: var(--blue); }
.header-actions { display: flex; align-items: center; justify-content: end; gap: 0.65rem; }
.icon-button, .bag-button { min-height: 2.6rem; border: 1px solid var(--line); background: var(--white); border-radius: 999px; display: inline-flex; justify-content: center; align-items: center; }
.icon-button { width: 2.6rem; padding: 0; font-size: 1.55rem; line-height: 1; }
.icon-button:hover, .bag-button:hover { background: var(--light); border-color: #afbdf2; }
.bag-button { gap: 0.55rem; padding: 0.3rem 0.38rem 0.3rem 0.85rem; font-size: 0.875rem; font-weight: 700; }
.bag-count { display: grid; min-width: 1.72rem; height: 1.72rem; place-items: center; padding-inline: 0.28rem; color: var(--white); background: var(--blue); border-radius: 999px; font-variant-numeric: tabular-nums; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.875rem; color: var(--muted); padding-block: 1.45rem; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(22rem, 1fr); align-items: start; gap: clamp(2rem, 6vw, 5.75rem); }
.gallery-frame { background: var(--media); aspect-ratio: 1.47; overflow: hidden; border-radius: var(--radius); position: relative; }
.gallery-open { border: 0; background: transparent; display: grid; width: 100%; height: 100%; padding: 0; }
.gallery-open:focus-visible { outline-offset: -5px; }
.gallery-open img { width: 100%; height: 100%; object-fit: cover; }
.favorite { position: absolute; inset: 1rem 1rem auto auto; box-shadow: 0 2px 12px #101a3010; }
.favorite[aria-pressed="true"] { color: var(--blue-dark); background: var(--light); border-color: #b0bdf9; }
.gallery-caption { position: absolute; bottom: 1rem; left: 1rem; font-size: 0.875rem; color: var(--ink); background: #ffffffe8; border: 1px solid #ffffff; padding: 0.38rem 0.68rem; border-radius: 999px; pointer-events: none; }
.gallery-zoom { position: absolute !important; right: 1.1rem; bottom: 1.1rem; background: #ffffffea; border-radius: 50%; box-shadow: 0 2px 12px #101a3010; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 0.75rem; }
.gallery-thumbs button { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--white); text-align: left; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); color: var(--blue-dark); }
.gallery-thumbs button:hover { border-color: var(--blue); }
.gallery-thumbs img { width: 100%; aspect-ratio: 2.35; height: auto; object-fit: cover; background: var(--media); }
.gallery-thumbs button span { display: block; padding: 0.5rem 0.7rem; font-size: 0.875rem; font-weight: 600; }

.product-heading { padding: 0.35rem 0 1.55rem; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--blue-dark); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.085em; text-transform: uppercase; }
h1 { max-width: 12ch; margin: 0.5rem 0 0.95rem; font-size: clamp(3rem, 5.15vw, 5.15rem); line-height: 0.95; letter-spacing: -0.055em; font-weight: 700; }
.product-meta { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.8rem; }
.price { display: flex; align-items: center; gap: 0.65rem; font-size: 1.65rem; font-weight: 700; }
.price del { color: var(--muted); font-size: 1rem; font-weight: 400; }
.rating-link { display: flex; gap: 0.38rem; align-items: center; font-size: 0.875rem; font-weight: 700; }
.rating-link:hover { text-decoration: underline; }
.stars { color: #9a450a; letter-spacing: 0.04em; white-space: nowrap; }
.quiet { color: var(--muted); font-weight: 400; }
.intro { max-width: 44ch; color: var(--muted); font-size: 1rem; line-height: 1.55; margin-top: 0.65rem; }
.selectors { padding-top: 1.15rem; }
fieldset { padding: 0; border: 0; min-inline-size: 0; }
legend { padding: 0; font-weight: 700; font-size: 0.95rem; }
.legend-divider { margin-inline: 0.25rem; color: var(--blue); font-weight: 500; }
[data-current-color] { color: var(--muted); font-weight: 500; }
.colors { display: flex; gap: 0.55rem; margin-top: 0.6rem; }
.swatch { width: 2.7rem; height: 2.7rem; padding: 0.25rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); }
.swatch span { width: 100%; height: 100%; border-radius: 50%; background: var(--swatch); }
.swatch.cobalt { --swatch: #2948d6; }
.swatch.oat { --swatch: #c5ad8d; }
.swatch.berry { --swatch: #822b54; }
.swatch:hover, .swatch[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.size-field { position: relative; margin-top: 1.25rem; }
.size-guide { position: absolute; top: -1.35rem; right: 0; }
.text-button { color: var(--blue-dark); border: 0; background: transparent; padding: 0.1rem 0; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 0.24em; font-weight: 600; }
.text-button:hover { color: var(--ink); }
.sizes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.45rem; padding-top: 0.6rem; }
.size-button { min-width: 0; min-height: 2.7rem; padding: 0 0.1rem; border: 1px solid var(--line); border-radius: 0.42rem; background: var(--white); font-size: 0.9rem; font-weight: 600; }
.size-button:not(:disabled):hover { border-color: var(--blue); }
.size-button[aria-pressed="true"] { background: var(--light); border-color: var(--blue); color: var(--blue-dark); }
.size-button:disabled { color: #6d7489; background: #edf0f6; text-decoration: line-through; }
.size-note[data-state="error"] { color: #a32639; }
.size-note { min-height: 1.3rem; color: var(--muted); font-size: 0.875rem; margin-top: 0.5rem; }
.purchase { display: grid; grid-template-columns: minmax(6.2rem, 7rem) minmax(0, 1fr); gap: 0.65rem; margin-top: 0.7rem; }
.quantity { min-height: 3.15rem; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: stretch; justify-content: center; border: 1px solid var(--line); border-radius: 0.45rem; background: var(--white); }
.quantity button { border: 0; border-radius: 0.35rem; background: transparent; font-size: 1.2rem; }
.quantity button:hover:not(:disabled) { background: var(--light); }
.quantity button:disabled { color: #83899b; }
.quantity output { display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.primary-button, .secondary-button { min-height: 3.1rem; border-radius: 0.45rem; padding: 0.5rem 0.9rem; text-align: center; font-weight: 700; }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: var(--white); }
.primary-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.primary-button:disabled { background: #606d9e; border-color: #606d9e; }
.secondary-button { border: 1px solid var(--line); background: var(--white); color: var(--blue-dark); }
.secondary-button:hover, .secondary-button[aria-pressed="true"] { border-color: var(--blue); background: var(--light); }
.fulfillment { display: flex; align-items: center; gap: 0.5rem; min-height: 3.1rem; color: var(--muted); font-size: 0.875rem; }
.product-details { border-top: 1px solid var(--line); }
.product-details details { border-bottom: 1px solid var(--line); }
.product-details summary { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; min-height: 3rem; cursor: pointer; font-size: 0.95rem; font-weight: 700; list-style: none; }
.product-details summary::-webkit-details-marker { display: none; }
.product-details summary::after { content: "+"; color: var(--blue-dark); font-size: 1.2rem; font-weight: 500; }
.product-details details[open] summary::after { content: "−"; }
.product-details details p { padding-bottom: 0.95rem; color: var(--muted); line-height: 1.55; max-width: 48ch; }

.lower-content { display: grid; gap: clamp(2.7rem, 5.5vw, 5.1rem); margin-block: clamp(3.5rem, 7vw, 6rem); }
.seller { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem; padding: 1.45rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.seller-mark { width: 3.9rem; aspect-ratio: 1; display: grid; place-items: center; background: var(--light); color: var(--blue-dark); border-radius: 0.65rem; font-size: 1.55rem; font-weight: 700; letter-spacing: -0.08em; }
.seller-copy h2 { font-size: 1.35rem; margin-block: 0.18rem; }
.seller-copy > p:last-child, .section-head p { color: var(--muted); line-height: 1.5; }
.seller-actions { display: flex; align-items: center; gap: 0.8rem; }
.seller-actions .secondary-button { min-height: 2.6rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.05rem; }
.section-head h2 { font-weight: 700; font-size: clamp(1.75rem, 3.2vw, 2.8rem); line-height: 1.05; letter-spacing: -0.05em; }
.section-head p { margin-top: 0.5rem; }
.review-grid, .collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.review { display: grid; justify-items: start; align-content: start; gap: 0.6rem; min-width: 0; padding: clamp(1rem, 3vw, 1.5rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.review h3 { font-size: 1.12rem; }
.review > p:not(.stars) { color: var(--muted); line-height: 1.5; }
.review .review-author { color: var(--ink) !important; font-size: 0.875rem; font-weight: 700; }
.review .text-button[aria-pressed="true"] { color: var(--ink); }
.review-photo { padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 0.4rem; background: var(--media); }
.review-photo img { width: 6.25rem; height: 4.5rem; object-fit: cover; }
.collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.collection-card { padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); text-align: left; overflow: hidden; }
.collection-card:hover, .collection-card[aria-pressed="true"] { border-color: var(--blue); }
.collection-card img { width: 100%; height: auto; aspect-ratio: 1.62; object-fit: cover; background: var(--media); }
.collection-card > span { display: flex; align-items: center; justify-content: space-between; gap: 0.45rem; padding: 0.85rem; color: var(--muted); }
.collection-card strong { color: var(--ink); }
.footer { border-top: 1px solid var(--line); background: var(--white); }
.footer-inner { min-height: 5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; padding-block: 1rem; }
.footer p { color: var(--muted); font-size: 0.875rem; }

.icon { display: inline-block; position: relative; width: 1.08rem; height: 1.08rem; flex: 0 0 auto; }
.icon-search::before { content: ""; position: absolute; inset: 0.05rem 0.25rem 0.27rem 0.05rem; border: 1.7px solid currentColor; border-radius: 50%; }
.icon-search::after { content: ""; position: absolute; width: 0.5rem; height: 1.7px; left: 0.66rem; top: 0.72rem; background: currentColor; transform: rotate(46deg); transform-origin: left; }
.icon-heart::before { content: "♡"; position: absolute; inset: -0.37rem -0.3rem; font-family: Arial, sans-serif; font-size: 1.55rem; line-height: 1.08; }
.favorite[aria-pressed="true"] .icon-heart::before { content: "♥"; }
.icon-expand { width: 2.3rem; height: 2.3rem; }
.icon-expand::before, .icon-expand::after { content: ""; position: absolute; width: 0.43rem; height: 0.43rem; color: var(--ink); }
.icon-expand::before { inset: 0.67rem auto auto 0.67rem; border-top: 1.5px solid; border-left: 1.5px solid; }
.icon-expand::after { inset: auto 0.67rem 0.67rem auto; border-bottom: 1.5px solid; border-right: 1.5px solid; }
.icon-box { border: 1.5px solid; border-radius: 0.2rem; }
.icon-box::before { content: ""; position: absolute; inset: 0.17rem 0.25rem auto; border-top: 1.5px solid; }

.feedback { position: fixed; z-index: 4; right: max(1rem, calc((100vw - 82rem) / 2)); bottom: 1rem; max-width: min(23rem, calc(100vw - 2rem)); padding: 0.85rem 1rem; border-radius: 0.5rem; color: var(--white); background: var(--ink); box-shadow: 0 8px 32px #20294d34; pointer-events: none; }
.feedback:empty { display: none; }
dialog { color: var(--ink); border: 1px solid var(--line); background: var(--white); padding: 0; box-shadow: 0 22px 80px #131a4438; }
dialog::backdrop { background: #161d39a3; }
.modal { width: min(34rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); border-radius: var(--radius); }
.dialog-head { min-height: 4.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.1rem; padding: 0.9rem 1.15rem; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: clamp(1.3rem, 4vw, 1.75rem); letter-spacing: -0.045em; }
.dialog-body { display: grid; gap: 0.85rem; padding: 1.15rem; }
.dialog-body p { color: var(--muted); line-height: 1.5; }
.dialog-body label { font-weight: 700; }
#search-input { min-height: 2.75rem; width: 100%; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 0.4rem; background: var(--paper); color: var(--ink); }
.search-results { display: grid; gap: 0.55rem; }
.search-hit { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0.45rem; background: var(--white); text-align: left; }
.search-hit:hover { border-color: var(--blue); background: var(--light); }
.search-hit img { width: 4rem; height: 2.7rem; object-fit: cover; border-radius: 0.25rem; }
.size-table { border-collapse: collapse; width: 100%; text-align: left; }
.size-table :is(th, td) { padding: 0.6rem; border-bottom: 1px solid var(--line); }
.shop-choices { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.image-modal { max-width: min(58rem, calc(100% - 1.5rem)); width: 100%; max-height: calc(100dvh - 1.5rem); border-radius: var(--radius); position: relative; background: var(--media); }
.image-modal img { width: 100%; height: auto; max-height: calc(100dvh - 1.5rem); object-fit: contain; }
.photo-close { position: absolute; inset: 0.65rem 0.65rem auto auto; }
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(29rem, 100%); max-width: 100%; height: 100dvh; max-height: none; border-width: 0 0 0 1px; }
.drawer[open] { display: flex; flex-direction: column; }
.bag-items { flex: 1; overflow: auto; margin: 0; padding-inline: 1.15rem; list-style: none; }
.bag-empty { margin-block: 1rem; color: var(--muted); }
.bag-item { display: grid; grid-template-columns: 4.8rem minmax(0, 1fr) auto; align-items: center; gap: 0.65rem; padding-block: 0.85rem; border-bottom: 1px solid var(--line); }
.bag-item img { width: 100%; height: 3.4rem; object-fit: cover; border-radius: 0.35rem; }
.bag-item-copy { display: grid; gap: 0.25rem; }
.bag-item-copy p, .bag-summary p { color: var(--muted); font-size: 0.875rem; }
.bag-item button { border: 0; background: transparent; color: var(--blue-dark); font-size: 0.875rem; text-decoration: underline; text-underline-offset: 0.2em; }
.bag-summary { display: grid; gap: 0.72rem; border-top: 1px solid var(--line); padding: 1.05rem 1.15rem; }
.bag-summary div { display: flex; justify-content: space-between; gap: 0.5rem; }

@media (max-width: 950px) {
  .wrap { width: calc(100% - 3rem); }
  .product-layout { gap: 1.85rem; grid-template-columns: minmax(0, 1.2fr) minmax(20rem, 1fr); }
  h1 { font-size: clamp(2.8rem, 6.1vw, 4.1rem); }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { grid-template-columns: 1fr auto; min-height: 3.9rem; }
  .header-nav { display: none; }
  .breadcrumb { padding-block: 0.9rem; }
  .product-layout { grid-template-columns: minmax(0, 1fr); gap: 1.45rem; }
  .gallery-frame { aspect-ratio: 1.42; }
  .gallery-thumbs { gap: 0.45rem; margin-top: 0.6rem; }
  .gallery-thumbs button span { padding: 0.42rem 0.48rem; }
  h1 { max-width: none; font-size: clamp(2.45rem, 9vw, 4rem); letter-spacing: -0.045em; }
  .seller { grid-template-columns: auto 1fr; gap: 0.75rem; padding: 1rem; }
  .seller-actions { grid-column: 2; }
  .review-grid { grid-template-columns: minmax(0, 1fr); }
  .collection-grid { gap: 0.42rem; }
  .collection-card > span { display: grid; padding: 0.5rem; font-size: 0.875rem; }
}
@media (max-width: 350px) {
  .wrap { width: calc(100% - 1.5rem); }
  .sizes { gap: 0.3rem; }
  .gallery-caption { bottom: 0.7rem; left: 0.7rem; }
}
