@font-face {
  font-family: Alegreya; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url("pearl-assets/alegreya-italic-latin.ad79ee28205c.woff2") format("woff2");
}
@font-face {
  font-family: Alegreya; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url("pearl-assets/alegreya-italic-cyrillic.0eec3a493bc4.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Mulish; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("pearl-assets/mulish-latin.50220d0057de.woff2") format("woff2");
}
@font-face {
  font-family: Mulish; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("pearl-assets/mulish-cyrillic.3ecaa05024bd.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

body[data-theme="pearl-pop"] {
  --paper: #fffbfe;
  --white: #fff;
  --ink: #2e345c;
  --muted: #71677f;
  --blue: #6640a6;
  --line: #edddec;
  --opal: #f6d8f0;
  --lavender: #dccbff;
  --mint: #bcefe5;
  --vanilla: #fff0af;
  --pink: #ff83c1;
  --amethyst: #a38aff;
  --berry: #731c38;
  --green: #216f61;
  --plate: polygon(3% 8%, 75% 0, 100% 13%, 97% 88%, 76% 100%, 1% 94%, 0 47%);
  --facet-button: polygon(6% 0, 90% 7%, 100% 52%, 91% 100%, 0 88%, 2% 28%);
  --width: 71rem;
  --gutter: clamp(1rem, 4.5vw, 3.5rem);
  --pearl-heading: Alegreya, Georgia, serif;
  font-family: Mulish, var(--sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 91% 12rem, #eee4fc8c, transparent 29rem),
    radial-gradient(ellipse at 9% 26rem, #fbe0f077, transparent 24rem),
    var(--paper);
}

.pearl-divider {
  width: min(72%, 88rem); margin: clamp(.4rem, 1.4vw, 1.2rem) auto 0; aspect-ratio: 6.5;
}
.pearl-divider img, .pearl-footer-art img { width: 100%; height: 100%; object-fit: cover; }
.pearl-footer a:hover { color: var(--berry); text-decoration: underline; text-underline-offset: .24em; }

[data-theme="pearl-pop"] :is(.pearl-page h1, .pearl-page h2, .pearl-page h3, .paper-dialog h2, .pearl-motto) {
  font-family: var(--pearl-heading);
  font-style: italic;
}

.pearl-hero {
  display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); align-items: center;
  gap: clamp(.6rem, 3vw, 2.5rem); padding-block: clamp(.7rem, 2vw, 1.85rem) 1.2rem;
}
.pearl-intro { padding-inline-start: clamp(0rem, 1.3vw, .8rem); }
.pearl-motto {
  margin: 0 0 .55rem; color: var(--ink); font-size: clamp(1.03rem, 2.25vw, 1.48rem);
  font-weight: 550; line-height: 1.15;
}
.pearl-intro h1 {
  margin: 0; max-width: 17ch; color: var(--berry); font-size: clamp(2.65rem, 6vw, 4.85rem);
  font-weight: 720; letter-spacing: -.035em; line-height: .99; overflow-wrap: anywhere;
}
.pearl-intro-text { max-width: 36rem; margin: .9rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.58; overflow-wrap: anywhere; }
.pearl-intro .pearl-button {
  margin-top: .95rem; --button-light: linear-gradient(120deg, #ffffff 0%, #c9a8ff 55%, #8febd9 100%);
}
.pearl-pets { position: relative; width: min(100%, 28.5rem); justify-self: center; isolation: isolate; }
.pearl-pets::before, .pearl-pets::after { content: ""; position: absolute; inset: 3% 2% 5%; z-index: -1; }
.pearl-pets::before {
  background: linear-gradient(135deg, #ffffff, var(--lavender) 44%, #fadbeb 67%, var(--mint));
  clip-path: polygon(10% 27%, 57% 0, 93% 13%, 100% 68%, 80% 90%, 24% 100%, 0 71%);
}
.pearl-pets::after {
  background: linear-gradient(125deg, #ffffffa0, #ffffff10 42%, #fff 42.4%, #fff3 66%, #fff9 67%, transparent);
  clip-path: polygon(10% 27%, 57% 0, 66% 51%, 93% 13%, 80% 90%, 24% 100%, 0 71%);
}
.pearl-pets img { width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 .65rem .75rem #5e428436); }
.pearl-pet-glint { position: absolute; z-index: 1; top: 8%; left: 9%; color: #905992; font-size: clamp(1.3rem, 4vw, 2.4rem); line-height: 1; }

.pearl-button, .pearl-chip {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  gap: .48rem; min-height: 2.75rem; max-width: 100%; padding: .56rem 1rem; border: 0;
  background: transparent; color: var(--ink); font-size: .88rem; font-weight: 680;
  line-height: 1.25; text-align: center; overflow-wrap: anywhere; touch-action: manipulation;
}
.pearl-button { padding-inline: 1.15rem; --button-light: linear-gradient(120deg, #fba2cc, var(--opal) 55%, #beaaff); }
.pearl-button::before, .pearl-chip::before {
  position: absolute; z-index: -1; inset: 0; content: ""; pointer-events: none;
}
.pearl-button::before { background: var(--button-light); background-size: 140% 100%; clip-path: var(--facet-button); transition: background-position .22s ease; }
.pearl-button::after {
  position: absolute; z-index: -1; content: ""; inset: 7% 6% 58%;
  background: linear-gradient(115deg, #ffffffb0, transparent);
  clip-path: polygon(6% 0, 89% 12%, 100% 100%, 0 75%); pointer-events: none;
}
.pearl-button:hover:not(:disabled)::before { background-position: 100% 50%; }
.pearl-secondary { --button-light: linear-gradient(110deg, #fff, #e5d9ff 70%, var(--mint)); }
.pearl-chip::before { inset-block: 3px; background: #ffffffdc; clip-path: polygon(12% 0, 100% 9%, 88% 100%, 0 86%); }
.pearl-chip:nth-child(even)::before { clip-path: polygon(0 12%, 88% 0, 100% 85%, 9% 100%); }
.pearl-chip:hover:not(:disabled)::before { background: #f1e7ff; }
.pearl-chip[aria-pressed="true"]::before { background: linear-gradient(115deg, var(--lavender) 82%, #bc9df9 82%); }

.pearl-filters {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  align-items: end; gap: .65rem .9rem; min-inline-size: 0; padding: .55rem 0 0; margin: 0 0 1rem; border: 0;
}
.pearl-categories, .pearl-filters > * { min-width: 0; }
.pearl-filter-label { display: block; margin: 0 0 .3rem; color: var(--muted); font-size: .79rem; font-weight: 610; }
.pearl-chips { display: flex; flex-wrap: wrap; align-items: end; gap: 0 .25rem; }
.pearl-budget .pearl-chip::before { background: #e9f8f5; }
.pearl-budget .pearl-chip:hover:not(:disabled)::before { background: #d8f3ed; }
.pearl-budget .pearl-chip[aria-pressed="true"]::before { background: linear-gradient(115deg, #bdefe3 82%, #94d8cc 82%); }

.pearl-random {
  position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  align-items: center; gap: .75rem clamp(.75rem, 2.5vw, 2.2rem); min-height: 21rem;
  padding: clamp(1.45rem, 5vw, 3.3rem); margin-bottom: clamp(2rem, 5vw, 3.8rem);
  filter: drop-shadow(0 .5rem 1rem #7b4dae15); scroll-margin-top: 1rem;
}
.pearl-random::before, .pearl-random::after { position: absolute; z-index: -2; inset: 0; content: ""; clip-path: var(--plate); }
.pearl-random::before { background: linear-gradient(122deg, #efc4e8, #fff4fa 36%, #e1cffb 68%, #d4f8ed 100%); }
.pearl-random::after {
  inset: .34rem; z-index: -1;
  background: linear-gradient(119deg, #fff4, #fff9 28%, #fff1 28.3%, transparent 58%, #fff8 58.3%, #fff1 79%, #fff9 79.3%);
  pointer-events: none;
}
.pearl-random-copy { min-width: 0; padding-block: .3rem; }
.pearl-random h2, .pearl-catalogue h2, .pearl-ownership h2 {
  margin: 0; font-size: clamp(1.9rem, 4.2vw, 3.15rem); font-weight: 690;
  letter-spacing: -.027em; line-height: 1.06; overflow-wrap: anywhere;
}
.pearl-random h2 { max-width: 13ch; }
.pearl-random-status { min-height: 1.45em; margin: .65rem 0 .9rem; color: #644d70; line-height: 1.5; overflow-wrap: anywhere; }
.pearl-stage { position: relative; display: grid; align-items: center; justify-items: center; min-width: 0; min-height: 15.5rem; }
.pearl-wheel {
  position: relative; display: grid; place-items: center; width: min(100%, 17.4rem); aspect-ratio: 1; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: #784c9c; touch-action: manipulation;
}
.pearl-wheel:disabled { opacity: 1; }
.pearl-rotor {
  position: absolute; inset: 7%; border-radius: 50%; isolation: isolate;
  background: conic-gradient(#f4b3ce, #ac8cec, #d2f6e7, #fff0af, #ffa6cc, #cfb2ff, #bcefe5, #f4b3ce);
  clip-path: polygon(50% 0, 75% 7%, 93% 25%, 100% 50%, 93% 75%, 75% 93%, 50% 100%, 25% 93%, 7% 75%, 0 50%, 7% 25%, 25% 7%);
}
.pearl-orbit {
  position: absolute; inset: 1%; border: 1px solid #b489df66; border-radius: 50%;
  outline: 1px solid #fff9; outline-offset: -.28rem; box-shadow: 0 .85rem 1.5rem #865cb21c;
}
.pearl-wheel:hover:not(:disabled) .pearl-orbit { outline-color: #a378da; }
.pearl-facet {
  position: absolute; inset: 0; transform: rotate(var(--angle));
  clip-path: polygon(50% 50%, 36.6% 0, 63.4% 0);
  background: linear-gradient(110deg, #fff9 34%, transparent 56%, #fff9 56.6%, var(--tint) 63%, #fff5 76%);
  mix-blend-mode: screen;
}
.pearl-facet:nth-child(3n) { mix-blend-mode: soft-light; }
.pearl-wheel-core {
  display: grid; place-items: center; z-index: 1; width: 21%; aspect-ratio: 1;
  background: linear-gradient(125deg, #fff, #f2d5ee 45%, #c7a9f0);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  color: #7b429b; font-size: clamp(1.05rem, 3.4vw, 1.9rem);
}
.pearl-glint { position: absolute; z-index: 2; inset: 7%; overflow: hidden; border-radius: 50%; pointer-events: none; }
.pearl-glint::after { content: ""; position: absolute; top: -15%; left: -53%; width: 39%; height: 135%; transform: rotate(28deg); opacity: 0; background: linear-gradient(90deg, transparent, #fff, transparent); }
.pearl-wheel[data-spinning] .pearl-glint::after { animation: pearl-glint 1.2s .35s ease-out both; }
@keyframes pearl-glint {
  0% { opacity: 0; transform: translateX(0) rotate(28deg); }
  28% { opacity: .85; }
  82% { opacity: .4; }
  100% { opacity: 0; transform: translateX(420%) rotate(28deg); }
}
.pearl-burst { position: absolute; z-index: 3; inset: 0; pointer-events: none; overflow: clip; }
.pearl-particle {
  position: absolute; top: 50%; left: 50%; width: .96rem; aspect-ratio: 1;
  transform: translate(-50%, -50%); background: var(--spark);
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}
.pearl-particle:nth-child(3n) { width: .53rem; clip-path: polygon(49% 0, 100% 48%, 50% 100%, 0 54%); }
#pearl-result { width: min(100%, 24rem); }

.pearl-catalogue { scroll-margin-top: 1rem; }
.pearl-catalogue-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .3rem .75rem; margin-bottom: 1.12rem; }
.pearl-count { margin: .4rem 0 0; color: var(--muted); font-size: .88rem; }
.pearl-free { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; font-size: .88rem; font-weight: 620; }
.pearl-free input { width: 1.15rem; height: 1.15rem; accent-color: var(--blue); }
.pearl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.pearl-card {
  position: relative; isolation: isolate; display: flex; min-width: 0; flex-direction: column; padding: .9rem;
  scroll-margin-block-start: 1rem;
  --card-tint: var(--opal); --card-shape: polygon(2% 0, 85% 0, 100% 2%, 100% 97%, 16% 100%, 0 98%, 0 16%);
  filter: drop-shadow(0 .35rem .55rem #704a9518);
}
.pearl-card:nth-child(3n+2) { --card-tint: var(--lavender); --card-shape: polygon(0 2%, 79% 0, 100% 1%, 100% 98%, 85% 100%, 0 98%); }
.pearl-card:nth-child(3n) { --card-tint: var(--mint); --card-shape: polygon(5% 0, 92% 0, 100% 3%, 100% 96%, 73% 100%, 0 98%, 0 20%); }
.pearl-card::before, .pearl-card::after { position: absolute; z-index: -2; inset: 0; content: ""; clip-path: var(--card-shape); }
.pearl-card::before { background: linear-gradient(140deg, var(--card-tint), #fff4fd 49%, var(--card-tint)); }
.pearl-card::after { z-index: -1; inset: .23rem; background: linear-gradient(160deg, #fff9, #fff 52%, #fffdfd); }
.pearl-card[data-state="unavailable"] { --card-tint: #dcd8df; }
.pearl-card[data-state="unavailable"]::after { background: #f4f2f5; }
.pearl-card[data-state="unavailable"] .pearl-card-art { filter: grayscale(.88); opacity: .79; }
.pearl-card[data-state="own"] { --card-tint: var(--mint); }
.pearl-card-art {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: .75rem;
  background:
    linear-gradient(152deg, #ffffffc0 21%, transparent 21.4%, transparent 63%, #fffa 63.4%, transparent 89%),
    linear-gradient(125deg, #f8e8f5, var(--card-tint), #fff7fb);
  overflow: hidden;
}
.pearl-grid .pearl-card-art { margin: clamp(.8rem, 4.5%, 1.4rem) clamp(.8rem, 4.5%, 1.4rem) 0; }
.pearl-card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #ffffffad; }
.pearl-card-placeholder {
  display: grid; place-items: center; width: 3.25rem; aspect-ratio: 1; border-radius: .11rem;
  transform: rotate(-12deg); color: #7f5498; font-size: 1.6rem;
  background: linear-gradient(135deg, #fff, #fcecf7 50%, var(--card-tint) 51%);
  box-shadow: .3rem .42rem .85rem #6a3b882a; clip-path: polygon(13% 5%, 85% 0, 100% 45%, 86% 95%, 14% 100%, 0 52%);
}
.pearl-card-body { display: flex; flex: 1; align-items: start; flex-direction: column; gap: .38rem; padding: .82rem .5rem .5rem; }
.pearl-card-body :is(h3, p) { max-width: 100%; margin: 0; overflow-wrap: anywhere; }
.pearl-card h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.12; letter-spacing: -.02em; }
.pearl-result-link::after { position: absolute; z-index: 1; inset: 0; content: ""; }
.pearl-result-link:hover { text-decoration: underline; text-underline-offset: .17em; }
#pearl-result .pearl-reserve { z-index: 2; }
.pearl-grid .pearl-card:focus { outline: 2px solid var(--blue); outline-offset: 3px; }
.pearl-card-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .34rem; margin-bottom: .12rem; width: 100%; }
.pearl-card-kind { flex: 1 1 auto; color: var(--berry); font-size: .78rem; font-weight: 630; overflow-wrap: anywhere; }
.pearl-tag { padding: .16rem .38rem; border: 1px solid transparent; border-radius: .2rem; background: #f6ebff; color: #603285; font-size: .72rem; font-weight: 630; }
.pearl-card[data-state="unavailable"] .pearl-tag, .pearl-tag.pearl-reservation { background: #eae5ed; color: #54485b; }
.pearl-card[data-state="own"] .pearl-reservation { color: var(--green); background: #ddf5ed; }
.pearl-kind-detail, .pearl-summary, .pearl-wish { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.pearl-kind-detail { font-size: .76rem; }
.pearl-price { color: var(--ink); font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pearl-card .pearl-wish {
  padding: .45rem .6rem; border-inline-start: 2px dashed #a288cc;
  background: linear-gradient(120deg, #f0e6fd, #e5eeff); color: var(--ink);
}
.pearl-wish strong { display: block; margin-bottom: .16rem; font-size: .72rem; }
.pearl-gift-link { color: var(--berry); font-size: .88rem; font-weight: 660; text-decoration: underline; text-underline-offset: .22em; overflow-wrap: anywhere; }
.pearl-gift-link:hover { color: var(--blue); }
.pearl-card .pearl-reserve { margin-top: auto; align-self: start; }
.pearl-card[data-state="own"] .pearl-reserve { --button-light: linear-gradient(120deg, #bdefe3, #f6ecff); }
.pearl-empty { padding: 1rem; border: 1px solid var(--line); text-align: center; }
.pearl-empty p { color: var(--muted); }

.pearl-ownership { padding: 1.1rem; margin-top: 1.65rem; background: linear-gradient(120deg, #dcf6ec, #fff 81%); border-inline-start: .2rem solid var(--mint); }
.pearl-ownership h2 { color: var(--green); font-size: 1.42rem; }
.pearl-ownership ul { display: grid; gap: .65rem; list-style: none; margin: .6rem 0 0; padding: 0; }
.pearl-ownership li { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
.pearl-ownership time { color: var(--green); font-size: .82rem; }
.pearl-footer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .55rem 1rem;
  padding-block: .7rem; margin-top: clamp(1rem, 3.5vw, 2.5rem); color: var(--muted); font-size: .85rem;
}
.pearl-footer-art { min-width: 0; aspect-ratio: 7.2; }

[data-theme="pearl-pop"] .paper-dialog { border-color: #dcbde7; border-radius: .85rem; box-shadow: .28rem .43rem 0 #855dab48; }
[data-theme="pearl-pop"] .paper-dialog::backdrop { background: #45375b88; }
[data-theme="pearl-pop"] .paper-dialog [data-icon="close"]:empty::before { content: "×"; font-size: 1.35em; line-height: 1; }
[data-theme="pearl-pop"] .paper-dialog input { border-color: #c2a9d5; }
[data-theme="pearl-pop"] .paper-dialog .icon-button { border-color: #ac92bd; }
[data-theme="pearl-pop"] .paper-dialog .icon-button:hover { background: #f0e2fa; }

@media (max-width: 850px) {
  .pearl-filters { grid-template-columns: minmax(0, 1fr); }
  .pearl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .pearl-hero { grid-template-columns: minmax(0, 1fr); }
  .pearl-intro { padding-inline-start: 0; }
  .pearl-pets { width: min(100%, 21rem); }
  .pearl-random { grid-template-columns: minmax(0, 1fr); padding: 1.5rem .95rem 1.65rem; }
  .pearl-random h2 { max-width: none; }
  .pearl-stage { min-height: 0; }
  .pearl-wheel { width: min(100%, 12rem); }
  .pearl-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pearl-button::before { transition: none; }
  .pearl-wheel[data-spinning] .pearl-glint::after { animation: none; }
}
