/* A collection cabinet for the existing violet-and-gold Memory skin. */
.mc-overlay {
  --mc-ink: #fff6e4;
  --mc-muted: #c0afc6;
  --mc-gold: #ffce77;
  --mc-gold-dark: #e3ad4b;
  --mc-line: #ab86b436;
  --mc-panel: #251c30;
  position: fixed;
  box-sizing: border-box;
  z-index: 80;
  inset: 0;
  width: 100%;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.2vmin, 24px);
  background: #100b17d9;
  color: var(--mc-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  overscroll-behavior: contain;
}
.mc-overlay[hidden], .mc-overlay [hidden] { display: none !important; }
.mc-overlay *, .mc-overlay *::before, .mc-overlay *::after { box-sizing: border-box; }
.mc-dialog {
  width: min(1120px, 100%);
  height: min(800px, 100%);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d6b5e03d;
  border-radius: 26px;
  background: radial-gradient(ellipse at 10% 0%, #67344b38, transparent 56%), linear-gradient(150deg, #302238, #1b1424 64%);
  box-shadow: 0 30px 100px #000a, inset 0 1px 0 #fff2;
  isolation: isolate;
  outline: none;
  animation: mc-arrive 200ms ease-out both;
}
.mc-overlay button {
  color: inherit;
  min-height: 44px;
  min-width: 44px;
  font: inherit;
  line-height: 1.3;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.mc-overlay button:focus-visible { outline: 3px solid #a2e5da; outline-offset: 3px; }
.mc-overlay button:active { transform: scale(.98); }
.mc-overlay svg { width: 22px; height: 22px; flex: 0 0 auto; }
.mc-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px 21px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--mc-line);
}
.mc-emblem {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border: 1px solid #ffd68b73;
  border-radius: 17px;
  background: linear-gradient(145deg, #ffd58a, #c48a39);
  box-shadow: inset 0 1px 1px #fff9, 0 7px 20px #09051055;
  color: #362318;
  transform: rotate(-5deg);
}
.mc-emblem svg { width: 30px; height: 30px; }
.mc-heading { flex: 1; min-width: 0; }
.mc-title { margin: 0; color: var(--mc-ink); font: 700 clamp(21px, 2.8vw, 30px)/1.15 Georgia, "Times New Roman", serif; }
.mc-intro { margin: 7px 0 0; color: var(--mc-muted); font-size: 13px; line-height: 1.45; }
.mc-close { display: grid; place-items: center; width: 44px; padding: 0; border: 1px solid var(--mc-line); border-radius: 13px; background: #fff06a08; }
.mc-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; min-height: 0; padding: 22px 28px; }
.mc-library { min-height: 0; min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
.mc-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid #b593bf24; border-radius: 15px; background: #110b18a1; }
.mc-tab { display: flex; align-items: center; justify-content: center; min-width: 0 !important; gap: 6px; padding: 9px 6px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--mc-muted) !important; font-size: 12px !important; font-weight: 600 !important; }
.mc-tab-text { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.mc-tab svg { width: 19px; height: 19px; }
.mc-tab[aria-selected="true"] { color: var(--mc-ink) !important; border-color: #dfc4ea25; background: linear-gradient(155deg, #513b59, #382940); box-shadow: 0 3px 9px #0003, inset 0 1px #fff1; }
.mc-panel { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #80608a #16111d; padding: 3px 5px 7px 3px; margin: -3px -5px -7px -3px; }
.mc-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 13px; padding: 1px; }
.mc-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 5px !important;
  overflow: hidden;
  border: 1px solid #ad8dbb43;
  border-radius: 17px;
  background: linear-gradient(145deg, #3d2d46, #291f32);
  box-shadow: 0 5px 16px #08050d33, inset 0 1px #ffffff09;
  text-align: left;
  filter: none !important;
}
.mc-choice-selected { border-color: var(--mc-gold) !important; background: linear-gradient(150deg, #544035, #332534) !important; box-shadow: 0 0 0 1px #ffce7759, 0 5px 20px #05020950 !important; }
.mc-choice-thumb { position: relative; display: block; width: 100%; aspect-ratio: 1.65; flex-shrink: 0; overflow: hidden; border-radius: 12px; background: radial-gradient(circle at 20% 0%, #b66d9b44, transparent 80%), #201928; background-size: cover !important; background-position: center !important; box-shadow: inset 0 0 0 1px #ffffff0e; pointer-events: none; }
.mc-choice-thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px #ffffff12; background: linear-gradient(135deg, #fff1, transparent 45%, #0001); pointer-events: none; }
.mc-choice-check { position: absolute; display: grid; place-items: center; width: 25px; height: 25px; right: 12px; top: 12px; border-radius: 50%; border: 1px solid #ffffff60; background: #17121d70; color: #352318; opacity: 0; transform: scale(.75); transition: opacity 140ms, transform 140ms; }
.mc-choice-check svg { width: 16px; height: 16px; stroke-width: 2.4; }
.mc-choice-selected .mc-choice-check { opacity: 1; transform: scale(1); background: var(--mc-gold); border-color: #ffde9a; box-shadow: 0 2px 7px #0005; }
.mc-choice-details { display: block; padding: 10px 6px 8px; min-width: 0; }
.mc-choice-name { display: block; color: var(--mc-ink); font-size: 13px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.mc-choice-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 4px; color: #c1b0c8; font-size: 11px; font-weight: 400; line-height: 1.35; }
.mc-swatch-cards { position: absolute; display: block; width: 70px; height: 55px; bottom: 12%; left: calc(50% - 35px); }
.mc-swatch-cards i { position: absolute; display: block; width: 35px; height: 47px; bottom: 0; left: 17px; border-radius: 6px; border: 1px solid #ffffff48; background: linear-gradient(145deg, #fff5db, #dcc3aa); box-shadow: 0 4px 10px #0005, inset 0 1px #fff8; }
.mc-swatch-cards i::after { content: ""; position: absolute; inset: 14px 8px; background: #6b436d; transform: rotate(45deg); border-radius: 3px; }
.mc-swatch-cards i:nth-child(1) { left: 1px; transform: rotate(-17deg); background: linear-gradient(140deg, #59405f, #2b213d); }
.mc-swatch-cards i:nth-child(1)::after { background: #d4ad795e; }
.mc-swatch-cards i:nth-child(2) { left: 34px; transform: rotate(16deg); background: linear-gradient(140deg, #5e4765, #2b213d); }
.mc-swatch-cards i:nth-child(2)::after { background: #d4ad795e; }
.mc-preview { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 13px; margin: 0; min-height: 0; min-width: 0; padding: 17px; border-radius: 20px; border: 1px solid #ba93c32b; background: linear-gradient(150deg, #ffffff06, #0b081129); }
.mc-preview-heading { display: flex; gap: 8px; align-items: center; }
.mc-preview-label { color: #ded1e0; font-size: 12px; font-weight: 650; letter-spacing: .025em; }
.mc-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #b3d3c4; box-shadow: 0 0 8px #b3d3c42e; }
.mc-stage-shell { display: grid; min-height: 0; min-width: 0; border-radius: 15px; padding: 0; background: #100c16; box-shadow: 0 10px 24px #0003; overflow: hidden; }
.mc-preview-stage { position: relative; width: 100%; height: 100%; min-height: 0; min-width: 0; overflow: hidden; border-radius: inherit; background-size: cover !important; background-position: center !important; pointer-events: none; }
.mc-preview-caption { display: flex; justify-content: center; align-items: center; gap: 7px; flex-wrap: wrap; min-height: 20px; color: var(--mc-ink); font-size: 12px; font-weight: 600; line-height: 1.3; text-align: center; }
.mc-caption-dot { color: #a48bae; }
.mc-footer { display: flex; align-items: center; gap: 20px; padding: 18px 28px; border-top: 1px solid var(--mc-line); background: #100b1770; }
.mc-remembered { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; margin: 0; color: var(--mc-muted); font-size: 11px; line-height: 1.4; }
.mc-remembered svg { width: 16px; height: 16px; opacity: .8; }
.mc-footer-actions { display: flex; gap: 8px; align-items: center; }
.mc-confirm { display: flex; align-items: center; justify-content: center; gap: 20px; min-width: 170px !important; min-height: 50px !important; padding: 11px 22px; border: 1px solid #ffe6ad; border-radius: 13px; color: #2b1e15 !important; background: linear-gradient(#ffd993, #f2bb5d); font-weight: 750 !important; box-shadow: inset 0 1px #fff9, 0 5px 17px #0004; }
.mc-confirm svg { width: 20px; height: 20px; }
.mc-cancel { padding: 10px 15px; border-radius: 11px; border: 1px solid #b39abd30; background: #ffffff04; color: var(--mc-muted) !important; font-size: 12px !important; }
.mc-sr-only { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mc-choice-changed .mc-preview-stage { animation: mc-preview-in 200ms ease-out; }
@keyframes mc-arrive { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes mc-preview-in { from { opacity: .75; } to { opacity: 1; } }
@media (hover: hover) {
  .mc-choice:hover { border-color: #d2afd978; box-shadow: 0 6px 19px #0005; background: #44304f; }
  .mc-tab:hover, .mc-close:hover, .mc-cancel:hover { background-color: #ffffff0c; border-color: #d4b2dd60; filter: none; }
  .mc-confirm:hover { background: linear-gradient(#ffe3ac, #f5c571); filter: none; }
}
@media (max-width: 700px) and (min-height: 501px) {
  .mc-dialog { max-width: 500px; height: 100%; border-radius: 21px; }
  .mc-header { gap: 12px; padding: 16px 17px 14px; }
  .mc-emblem { width: 44px; height: 44px; border-radius: 14px; }
  .mc-emblem svg { width: 25px; height: 25px; }
  .mc-title { font-size: 23px; }
  .mc-intro { font-size: 11px; margin-top: 5px; }
  .mc-main { display: flex; flex-direction: column; gap: 14px; padding: 14px 17px; }
  .mc-preview { order: -1; flex: 0 0 201px; grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr) auto; gap: 7px; padding: 10px; position: relative; border-radius: 15px; }
  .mc-preview-heading { padding: 0 1px; }
  .mc-preview-label { font-size: 11px; }
  .mc-preview-caption { position: static; justify-content: center; max-width: 100%; min-height: 13px; font-size: 10px; gap: 4px; }
  .mc-stage-shell { border-radius: 10px; }
  .mc-library { flex: 1; gap: 11px; }
  .mc-gallery { gap: 10px; }
  .mc-tab { min-height: 44px !important; padding: 7px 4px; font-size: 11px !important; }
  .mc-tab svg { display: none; }
  .mc-choice { border-radius: 14px; padding: 4px !important; }
  .mc-choice-thumb { aspect-ratio: 1.75; border-radius: 10px; }
  .mc-choice-details { padding: 7px 5px 6px; }
  .mc-choice-name { font-size: 12px; }
  .mc-choice-description { font-size: 10px; line-height: 1.3; margin-top: 3px; }
  .mc-choice-check { top: 9px; right: 9px; }
  .mc-swatch-cards { transform: scale(.78); transform-origin: bottom center; }
  .mc-footer { flex-direction: column; gap: 9px; padding: 12px 17px 14px; }
  .mc-remembered { font-size: 10px; gap: 6px; text-align: center; }
  .mc-footer-actions { width: 100%; }
  .mc-confirm { flex: 1; min-width: 0 !important; min-height: 48px !important; }
  .mc-cancel { flex: 0 1 30%; padding: 9px; }
}
@media (max-width: 700px) and (min-height: 501px) and (max-height: 720px) {
  .mc-header { padding: 12px 14px 10px; gap: 10px; }
  .mc-title { font-size: 21px; }
  .mc-intro { font-size: 10px; line-height: 1.3; }
  .mc-main { gap: 10px; padding: 11px 14px; }
  .mc-preview { flex-basis: 150px; padding: 8px; gap: 5px; }
  .mc-preview-label { font-size: 10px; }
  .mc-choice-thumb { aspect-ratio: 1.95; }
  .mc-footer { padding: 10px 14px 11px; gap: 7px; }
  .mc-remembered svg { display: none; }
}
@media (max-height: 500px) {
  .mc-overlay { padding: 7px; }
  .mc-dialog { max-width: 1100px; height: 100%; border-radius: 17px; }
  .mc-header { padding: 10px 16px; gap: 10px; }
  .mc-emblem { width: 38px; height: 38px; border-radius: 12px; }
  .mc-emblem svg { width: 23px; height: 23px; }
  .mc-title { font-size: 21px; }
  .mc-intro { margin-top: 3px; font-size: 10px; line-height: 1.25; }
  .mc-close { min-height: 44px !important; width: 44px; }
  .mc-main { grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr); gap: 16px; padding: 10px 16px; }
  .mc-library { gap: 9px; }
  .mc-tab { min-height: 44px !important; padding: 5px 7px; font-size: 11px !important; }
  .mc-tabs { padding: 3px; border-radius: 12px; }
  .mc-tab svg { width: 17px; height: 17px; }
  .mc-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .mc-choice { padding: 4px !important; border-radius: 12px; }
  .mc-choice-thumb { aspect-ratio: 1.85; border-radius: 8px; }
  .mc-choice-name { font-size: 11px; }
  .mc-choice-description { font-size: 10px; -webkit-line-clamp: 1; margin-top: 3px; }
  .mc-choice-details { padding: 6px 4px 4px; }
  .mc-choice-check { top: 8px; right: 8px; width: 22px; height: 22px; }
  .mc-swatch-cards { transform: scale(.65); transform-origin: bottom center; bottom: 9%; }
  .mc-preview { padding: 9px; gap: 7px; border-radius: 13px; }
  .mc-preview-label, .mc-preview-caption { font-size: 10px; }
  .mc-preview-caption { min-height: 13px; gap: 4px; }
  .mc-stage-shell { border-radius: 9px; }
  .mc-footer { padding: 8px 16px; gap: 12px; }
  .mc-remembered { font-size: 10px; }
  .mc-confirm { min-height: 44px !important; min-width: 148px !important; padding: 8px 18px; font-size: 13px !important; }
  .mc-cancel { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-overlay *, .mc-overlay *::before, .mc-overlay *::after { animation: none !important; transition: none !important; }
}
