* {
  box-sizing: border-box;
}
:root {
  --ink: #352831;
  --wine: #973753;
  --accent: #aa4762;
  --line: #e9e1de;
  --muted: #766a6b;
  --paper: #fffdf9;
  --serif: "Playfair Display", Georgia, serif;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.5 Inter,
    Arial,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a {
  color: inherit;
}
button {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #b65b77;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button[hidden],
[hidden] {
  display: none !important;
}
a {
  text-underline-offset: 3px;
}
i,
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
}
svg {
  display: block;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.wrap {
  width: min(1300px, calc(100% - 100px));
  margin-inline: auto;
}
header {
  border-bottom: 1px solid var(--line);
  background: #fffdfa;
}
.mast {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 54px;
}
.brand,
.foot-brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -1.3px;
  white-space: nowrap;
}
.brand {
  font-size: 30px;
}
.brand .logo {
  width: 45px;
  height: 43px;
}
.logo svg,
.foot-brand i svg {
  width: 100%;
  height: 100%;
}
.mast nav {
  display: flex;
  align-self: stretch;
  gap: 26px;
}
.nav-item {
  position: relative;
  font-size: 15px;
  color: #675d61;
  padding: 0 1px;
  gap: 7px;
}
.nav-item.current {
  color: var(--wine);
  font-weight: 600;
}
.nav-item.current:after {
  content: "";
  height: 2px;
  background: var(--wine);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
.nav-item i {
  font-size: 16px;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  background: #f8f4f1;
  border: 1px solid #e9e1dc;
  border-radius: 24px;
  height: 41px;
  width: 236px;
  padding: 0 15px;
  color: #8a7a7d;
}
.search input {
  background: none;
  border: 0;
  min-width: 0;
  width: 100%;
  font-size: 14px;
  color: var(--ink);
  outline: 0;
}
.search:focus-within {
  outline: 2px solid var(--accent);
}
.search input::placeholder {
  color: #82777a;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 25px;
  border-radius: 22px;
  background: #f8e6e8;
  min-height: 344px;
  display: flex;
  align-items: center;
}
.hero-image {
  position: absolute;
  inset: 0 0 0 40%;
  background: #f6e1e4;
  z-index: -2;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #f9ebea 0%,
    #f9ebea 35%,
    rgba(249, 235, 234, 0.93) 40%,
    rgba(249, 235, 234, 0) 56%
  );
  z-index: -1;
}
.hero-copy {
  padding: 31px 0 32px 4.8%;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--wine);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.5;
}
.eyebrow > span {
  width: 22px;
  height: 1.5px;
  background: #b2546e;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font: 600 44px/1.13 var(--serif);
  letter-spacing: -1.8px;
}
h1 {
  margin: 13px 0 13px;
  font-size: clamp(50px, 4.6vw, 71px);
  line-height: 0.99;
  letter-spacing: -2.9px;
  color: #402a34;
}
h1 em {
  font-weight: 500;
  color: var(--wine);
}
.hero-copy p {
  color: #674e57;
  font-size: 16px;
  line-height: 1.6;
}
.primary,
.secondary {
  font-weight: 600;
  font-size: 15px;
  min-height: 44px;
  border-radius: 11px;
  padding: 10px 18px;
  transition:
    background 0.18s,
    transform 0.18s;
}
.primary {
  background: var(--wine);
  color: white;
}
.primary:hover {
  background: #7f2843;
}
.primary:active,
.secondary:active {
  transform: translateY(1px);
}
.hero .primary {
  margin-top: 21px;
}
.secondary {
  background: #fffdfb;
  border: 1px solid #ddd5d2;
  color: #51434a;
}
.secondary:hover,
.chip:hover {
  background: #f8eeed;
}
#catalog {
  padding-top: 36px;
}
.catalog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.catalog-heading h2 {
  font-size: clamp(35px, 3vw, 47px);
  margin-top: 5px;
}
.catalog-heading .secondary {
  min-height: 40px;
  padding: 8px 15px;
  font-size: 14px;
}
.chips {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin: 21px 0;
}
.extra {
  margin-top: -11px;
}
.chip {
  background: #fffdfb;
  border: 1px solid var(--line);
  color: #564c50;
  white-space: nowrap;
  min-height: 39px;
  padding: 7px 15px;
  border-radius: 22px;
  display: inline-flex;
  font-size: 14px;
  gap: 7px;
}
.chip.selected {
  background: var(--wine);
  border-color: var(--wine);
  color: #fff;
}
.chip i {
  font-size: 16px;
  color: #917a7c;
}
.chip.selected i {
  color: #fff;
}
.chip .tiny svg {
  width: 12px;
}
.filter-panel {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf6f3;
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-panel label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}
select,
.control input {
  color: var(--ink);
  border: 1px solid #d7cdc8;
  border-radius: 8px;
  background: #fffdfb;
  padding: 8px 10px;
}
.text-btn {
  color: var(--wine);
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px 20px;
}
.card {
  min-width: 0;
}
.card-shell {
  position: relative;
  isolation: isolate;
}
.card-open {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  width: 100%;
  aspect-ratio: 7/6;
  border-radius: 14px;
  background: #f4e9e0;
  box-shadow: inset 0 0 0 1px #0001;
}
.card-open canvas {
  width: 100%;
  height: 100%;
  display: block;
  border: 6px solid transparent;
}
.fav,
.iconbtn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.94);
  color: #63555a;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.fav {
  margin-top: 6px;
  box-shadow: 0 1px 4px #3b182014;
}
.fav[aria-pressed="true"] {
  color: var(--wine);
}
.fav[aria-pressed="true"] svg {
  fill: #a44161;
}
.format-tag {
  margin-right: 6px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.3px;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 6px;
  color: #583e52;
  background: #fffdf7ed;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.format-tag svg {
  width: 12px;
  height: 12px;
}
.card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px;
}
.card-title {
  font-size: 17px;
  display: block;
  text-align: left;
  padding: 0;
  margin: 10px 0 2px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.card-occasion {
  font-size: 14px;
  color: var(--muted);
}
.load-area {
  display: flex;
  justify-content: center;
  margin: 28px 0 50px;
}
#status {
  color: var(--muted);
  font-size: 15px;
  margin: 16px 0;
  text-align: center;
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 21px;
}
.foot-brand {
  font-size: 22px;
}
.foot-brand i {
  height: 30px;
  width: 32px;
}
footer {
  border-top: 1px solid var(--line);
  background: #faf6f1;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  max-height: 90dvh;
  max-width: min(910px, 94vw);
  width: 100%;
  box-shadow: 0 28px 90px #25141e30;
}
dialog::backdrop {
  background: #30222cc2;
}
.close {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  border: 1px solid var(--line);
}
.edit-layout {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
}
.preview-area {
  display: grid;
  place-items: center;
  background: #eee4df;
  padding: 25px;
}
.preview-area canvas {
  width: auto;
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  height: auto;
  box-shadow: 0 8px 22px #38222b22;
}
.edit-panel,
.info-content {
  padding: 36px 29px 25px;
}
.edit-panel h2,
.info-content h2 {
  font-size: 33px;
  letter-spacing: -1px;
  margin: 12px 0 5px;
}
.edit-panel > p,
.assist {
  color: var(--muted);
  font-size: 14px;
}
.control {
  display: grid;
  gap: 7px;
  margin: 20px 0 13px;
  font-weight: 600;
  font-size: 15px;
}
.control input {
  font-size: 17px;
  font-weight: 400;
  height: 46px;
}
.edit-panel fieldset {
  border: 0;
  margin: 10px 0 20px;
  padding: 0;
  display: flex;
  gap: 14px;
}
.edit-panel legend {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 5px;
}
.edit-panel fieldset label {
  font-size: 15px;
}
.edit-panel input[type="radio"] {
  accent-color: var(--wine);
}
.edit-panel > .primary,
.edit-panel > .secondary {
  width: 100%;
  margin-bottom: 8px;
}
.edit-panel .assist {
  font-size: 13px;
  margin: 5px 0;
}
#exportStatus {
  color: var(--wine);
  font-size: 14px;
}
.edit-panel details {
  margin-top: 15px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
  font-size: 13px;
  color: var(--muted);
}
summary {
  cursor: pointer;
}
#sourceInfo {
  padding-top: 6px;
  overflow-wrap: anywhere;
}
#info {
  width: 650px;
}
.info-content {
  padding: 34px;
}
.info-content p {
  margin-top: 15px;
}
body.has-dialog {
  overflow: hidden;
}
#favCount:empty,
#filterMark:empty {
  display: none;
}
#favCount,
#filterMark {
  border-radius: 50%;
  font-size: 12px;
  background: #f6e4e8;
  padding: 1px 6px;
}
@media (min-width: 1550px) {
  .hero {
    min-height: 385px;
  }
}
@media (max-width: 1050px) {
  .wrap {
    width: calc(100% - 56px);
  }
  .grid {
    gap: 20px 15px;
  }
  .chip {
    padding-inline: 12px;
  }
  .mast {
    gap: 32px;
  }
  .hero {
    min-height: 320px;
  }
  .hero-copy {
    padding-left: 4%;
  }
}
@media (max-width: 800px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .mast {
    gap: 20px;
    height: 68px;
  }
  .brand {
    font-size: 24px;
    gap: 6px;
  }
  .brand .logo {
    width: 35px;
  }
  .mast nav {
    gap: 12px;
  }
  .search {
    width: 175px;
  }
  .hero-copy {
    padding: 30px 20px;
  }
  .hero {
    min-height: 300px;
  }
  .hero-copy p {
    font-size: 15px;
  }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .chips {
    gap: 7px;
  }
  .chip {
    font-size: 13px;
  }
}
@media (max-width: 620px) {
  .mast {
    height: auto;
    min-height: 91px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 5px;
    padding: 9px 0;
  }
  .brand {
    font-size: 23px;
    letter-spacing: -0.8px;
  }
  .brand .logo {
    height: 30px;
    width: 32px;
  }
  .mast nav {
    height: 36px;
    gap: 12px;
  }
  .nav-item {
    font-size: 13px;
  }
  .nav-item i {
    display: none;
  }
  .search {
    width: 100%;
    grid-column: 1/-1;
    margin: 8px 0 0;
    height: 36px;
  }
  .hero {
    margin-top: 15px;
    min-height: 285px;
    align-items: flex-start;
    border-radius: 16px;
  }
  .hero:before {
    background: linear-gradient(
      90deg,
      #faeae9 0%,
      #faeae9 36%,
      rgba(250, 234, 233, 0.9) 47%,
      rgba(250, 234, 233, 0) 74%
    );
  }
  .hero-copy {
    padding: 27px 17px 25px;
  }
  .hero-copy .eyebrow {
    font-size: 9px;
    letter-spacing: 1.2px;
  }
  .hero-image {
    inset: 0 -45% 0 24%;
    background-position: 56% center;
  }
  .hero-copy p {
    max-width: 55%;
    font-size: 14px;
    line-height: 1.45;
  }
  .desktop {
    display: none;
  }
  h1 {
    font-size: clamp(41px, 8.4vw, 53px);
    margin: 13px 0 12px;
    letter-spacing: -2px;
  }
  .hero .primary {
    font-size: 13px;
    min-height: 40px;
    padding: 8px 12px;
    margin-top: 16px;
  }
  .wrap {
    width: calc(100% - 28px);
  }
  #catalog {
    padding-top: 26px;
  }
  .catalog-heading h2 {
    font-size: 30px;
    letter-spacing: -1.2px;
  }
  .catalog-heading .eyebrow {
    font-size: 10px;
  }
  .catalog-heading .secondary {
    font-size: 13px;
    min-height: 36px;
    padding: 6px 9px;
  }
  .chips {
    margin: 14px 0;
    gap: 6px;
  }
  .chip {
    padding: 6px 10px;
    min-height: 35px;
    font-size: 13px;
    gap: 5px;
  }
  .chip i {
    font-size: 14px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 10px;
  }
  .card-open {
    border-radius: 10px;
  }
  .fav {
    width: 29px;
    height: 29px;
    top: 6px;
    right: 6px;
  }
  .fav svg {
    width: 15px;
    height: 15px;
  }
  .format-tag {
    top: 7px;
    left: 6px;
    font-size: 10px;
    padding: 4px 6px;
  }
  .card-title {
    font-size: 15px;
    line-height: 1.25;
  }
  .card-occasion {
    font-size: 13px;
  }
  .foot {
    gap: 12px;
    flex-wrap: wrap;
  }
  .foot-brand {
    font-size: 19px;
  }
  .edit-layout {
    grid-template-columns: 1fr;
  }
  #editor > .close {
    position: static;
    display: grid;
    margin: 5px 8px 5px auto;
  }
  .preview-area {
    padding: 12px 17px;
  }
  .preview-area canvas {
    max-width: 330px;
    max-height: 35dvh;
    width: auto;
    max-width: min(100%, 330px);
  }
  .edit-panel {
    padding: 17px 20px 20px;
  }
  .edit-panel h2 {
    font-size: 28px;
    margin: 5px 0;
  }
  .control {
    margin: 12px 0;
  }
  .edit-panel fieldset {
    margin: 8px 0 12px;
  }
  .close {
    top: 8px;
    right: 8px;
  }
  .info-content {
    padding: 28px 19px;
  }
  .info-content h2 {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.catalog-failure { margin-block: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff9f3; }

.card-open img{width:100%;height:100%;display:block;object-fit:contain;border:6px solid transparent;background:#f7efe8}
