#voucher-gallery {
  --vg-ink: #41151c;
  --vg-subtle: #6a5151;
  --vg-line: #d6c8b8;
  --vg-page: #f9f5ec;
  --vg-paper: #fffaf1;
  --vg-wine: #62162b;
  --vg-serif: "Instrument Serif", Georgia, serif;
  color: var(--vg-ink);
}
#voucher-gallery :is(button, input) { font: inherit; }
#voucher-gallery :is(a, button, summary, input):focus-visible {
  outline: 3px solid #a8323d;
  outline-offset: 4px;
}
#voucher-gallery svg { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }
#voucher-gallery [hidden] { display: none !important; }
.vg-controls {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0 0 1.5rem;
}
.vg-filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.vg-filter {
  min-height: 42px;
  padding: .55rem 1.1rem;
  border-radius: 100px;
  border: 1px solid var(--vg-line);
  background: transparent;
  color: var(--vg-ink);
  cursor: pointer;
}
#voucher-gallery .vg-filter { font-size: .875rem; font-weight: 600; }
.vg-filter[aria-pressed="true"] {
  background: var(--vg-ink);
  border-color: var(--vg-ink);
  color: #fff9e9;
}
.vg-filter[aria-pressed="false"]:hover { border-color: var(--vg-ink); }
.vg-count { color: var(--vg-subtle); font-size: .875rem; }
.vg-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(16px,2.2vw,32px); }
.vg-ticket {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  min-width: 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 4px;
  text-align: left;
  background: var(--vg-paper);
  color: var(--vg-ink);
  cursor: pointer;
  box-shadow: 0 2px 9px #37181c0e, 0 0 0 1px #5e1f221a;
}
.vg-image {
  display: block;
  aspect-ratio: 1.65;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
  background: #eadfcd;
}
.vg-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vg-paper { display: grid; grid-template-rows: 1fr auto; }
.vg-title {
  display: block;
  padding: 1.12rem clamp(14px, 1.7vw, 26px) 1.25rem;
  font-family: var(--vg-serif);
  font-size: clamp(1.7rem,2.15vw,2.4rem);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.vg-stub {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  padding: .9rem clamp(14px,1.7vw,26px);
  border-top: 1px dashed #b69b85;
  color: var(--vg-wine);
}
.vg-stub::before, .vg-stub::after {
  content: "";
  position: absolute;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 100%;
  background: var(--vg-page);
  box-shadow: inset 0 1px 1px #4d1c1c23;
}
.vg-stub::before { left: 0; transform: translate(-50%,-50%); }
.vg-stub::after { right: 0; transform: translate(50%,-50%); }
.vg-amount { display: inline-flex; align-items: baseline; line-height: 1; white-space: nowrap; }
.vg-digits { font-family: var(--vg-serif); font-size: 2.35rem; letter-spacing: -.04em; }
.vg-unit { font-family: var(--vg-serif); font-size: 1.75rem; margin-left: .06em; }
.vg-modifier, .vg-extra { align-self: center; font-size: .8rem; font-weight: 600; }
.vg-modifier { margin-right: .35rem; }
.vg-extra { margin-left: .35rem; }
.vg-action { display: inline-flex; align-items: center; gap: .5rem; font-size: .83rem; font-weight: 650; }
.vg-action svg { border: 1px solid #c7b8a6; border-radius: 50%; padding: .2rem; box-sizing: content-box; }
.vg-ticket:hover .vg-action svg { color: white; background: var(--vg-wine); border-color: var(--vg-wine); }
.vg-empty { margin: 1.5rem 0; }
body.vg-is-open { overflow: hidden; }
.vg-dialog {
  position: fixed;
  inset: 0;
  width: min(980px, calc(100vw - 48px));
  height: fit-content;
  max-width: none;
  max-height: min(850px,calc(100dvh - 56px));
  padding: 0;
  margin: auto;
  border: 0;
  border-radius: 10px;
  color: var(--vg-ink);
  background: var(--vg-paper);
  box-shadow: 0 26px 100px #19050daa;
  overflow: visible;
}
.vg-dialog::backdrop { background: rgb(27 5 13 / .78); }
.vg-inside {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0,1.15fr);
  max-height: min(850px,calc(100dvh - 56px));
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: inherit;
  scrollbar-color: #b59588 var(--vg-paper);
}
.vg-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #62404444;
  border-radius: 50%;
  color: var(--vg-ink);
  background: #fffbf2;
  cursor: pointer;
}
.vg-close:hover { background: #f1e7da; }
.vg-scene {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #481321;
  color: #fff9ec;
  min-width: 0;
}
.vg-detail-image {
  flex: none;
  aspect-ratio: 1.38;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #613540;
}
.vg-detail-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vg-product-photo { background: white; padding: .9rem; }
.vg-product-photo img { object-fit: contain; }
.vg-specimen {
  display: grid;
  justify-items: center;
  gap: .75rem;
  max-width: 26ch;
  text-align: center;
  padding: 1rem;
}
.vg-specimen strong { font: 400 1.85rem/1.1 var(--vg-serif); }
.vg-specimen span { font-size: .85rem; }
.vg-quote { margin: 0; padding: clamp(22px,3vw,40px); }
.vg-quote p { margin: 0 0 .75rem; font: italic 400 clamp(1.5rem,2.5vw,2.2rem)/1.13 var(--vg-serif); }
.vg-quote cite { font-size: .9rem; font-weight: 600; font-style: normal; color: #f3d5ae; }
.vg-detail-body { padding: clamp(22px,3.2vw,44px); min-width: 0; }
.vg-detail-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-right: 26px; }
.vg-discount .vg-digits { font-size: 3.35rem; }
.vg-discount .vg-unit { font-size: 2.4rem; }
.vg-date { font-size: .8rem; font-weight: 600; color: var(--vg-subtle); }
#voucher-gallery .vg-headline {
  margin: 1.15rem 0 .65rem; font-family: var(--vg-serif); font-size: clamp(2rem,3.1vw,3.05rem);
  font-weight: 400; line-height: 1; letter-spacing: -.025em; text-wrap: balance;
}
.vg-condition { font-size: 1rem; line-height: 1.55; margin: 0; }
.vg-products { margin: 1.65rem 0 .9rem; padding: 0; border: 0; min-width: 0; }
.vg-products legend { margin: 0 0 .65rem; padding: 0; font-size: 1rem; font-weight: 700; }
.vg-product { display: flex; gap: .7rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--vg-line); }
.vg-product:last-child { border-bottom: 1px solid var(--vg-line); }
label.vg-product { cursor: pointer; }
.vg-product input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--vg-wine); }
.vg-product-text { display: grid; gap: .2rem; }
.vg-product-text strong { font-weight: 600; font-size: .95rem; line-height: 1.4; }
.vg-product-text small, .vg-calculator small { font-size: .8rem; color: var(--vg-subtle); }
.vg-product-value { font-size: .9rem; margin-left: auto; white-space: nowrap; }
.vg-claim-link {
  display: inline-flex; gap: .65rem; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.2rem; border-radius: 100px;
  color: #fff8eb; background: var(--vg-wine); text-decoration: none; font-weight: 650; font-size: .95rem;
}
.vg-claim-link:hover { background: #400b1c; }
.vg-claim p { margin: .55rem 0 0; font-size: .86rem; color: var(--vg-subtle); }
.vg-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.3rem; padding-top: .55rem; border-top: 1px solid var(--vg-line); }
.vg-nav-item { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0; border: 0; color: var(--vg-subtle); background: none; cursor: pointer; }
#voucher-gallery .vg-nav-item { font-size: .88rem; font-weight: 600; }
.vg-nav-item:hover { color: var(--vg-ink); text-decoration: underline; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  html:not([data-effects="off"]) .vg-image img { transition: transform 550ms cubic-bezier(.2,.8,.2,1); }
  html:not([data-effects="off"]) .vg-ticket:hover .vg-image img { transform: scale(1.035); }
}
@media (min-width: 721px) and (max-width: 910px) { .vg-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 720px) {
  .vg-controls { display: block; }
  .vg-filter { padding-inline: .85rem; }
  .vg-count { display: block; margin-top: .85rem; }
  .vg-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vg-title { font-size: 1.8rem; }
  .vg-dialog { width: min(100% - 20px, 510px); max-height: calc(100dvh - 24px); }
  .vg-inside { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
  .vg-scene { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: stretch; }
  .vg-detail-image { min-height: 145px; height: 100%; aspect-ratio: auto; }
  .vg-detail-image img { min-height: 0; }
  .vg-quote { align-self: center; padding: 3.15rem 1rem 1rem; }
  .vg-quote p { font-size: 1.25rem; }
  .vg-quote cite { font-size: .8rem; }
  .vg-detail-header { margin-right: 0; }
}
@media (max-width: 530px) {
  .vg-filters { gap: .35rem; }
  #voucher-gallery .vg-filter { font-size: .82rem; padding-inline: .8rem; }
  .vg-grid { grid-template-columns: minmax(0,1fr); gap: 1.4rem; }
  .vg-title { padding: 1rem 1.15rem 1.1rem; font-size: 2.05rem; }
  .vg-stub { padding: .8rem 1.15rem; }
  .vg-action { font-size: .9rem; }
}
