:root {
  color-scheme: light;
  --paper: #fff7f9;
  --white: #fffdfd;
  --ink: #292a27;
  --muted: #92858a;
  --line: #eee1e5;
  --pink: #f2c5d2;
  --pink-deep: #b66f84;
  --pink-wash: #f9e9ee;
  --serif: "Manrope", sans-serif;
  --sans: "DM Sans", sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--pink-deep);
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: sticky;
  z-index: 5;
  top: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 12px max(34px, calc((100% - 1440px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 249, 251, .96);
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 11px; width: max-content; font: 800 14px/1.05 var(--serif); letter-spacing: -.05em; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; background: var(--pink); color: #854b5d; font: 800 22px var(--serif); letter-spacing: -.08em; }
.sidebar-rule { display: none; }
.side-label, .eyebrow { color: var(--muted); font: 500 9px/1.5 var(--mono); letter-spacing: .1em; }
.side-label { display: none; }
.side-nav { display: flex; align-items: center; gap: 4px; }
.nav-item { width: auto; min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 0; border-radius: 4px; background: transparent; color: #777870; text-align: left; font-size: 10px; white-space: nowrap; cursor: pointer; transition: background .18s ease, color .18s ease; }
.nav-item:hover { background: var(--pink-wash); color: var(--ink); }
.nav-item.is-active { background: #f6e1e8; color: #744656; font-weight: 600; }
.nav-icon { width: 15px; color: #777870; font-size: 15px; text-align: center; }
.nav-count { margin-left: auto; color: #999a92; font: 10px var(--mono); }
.category-dot { width: 7px; height: 7px; margin-inline: 4px; border-radius: 50%; }
.dot-type { background: #d98856; }
.dot-brand { background: #747da5; }
.dot-editorial { background: #769582; }
.dot-pack { background: #c994b0; }
.dot-poster { background: #d0aa4f; }
.sidebar-bottom { display: none; }
.tiny-spark { color: #8da651; font-size: 18px; }
.sidebar-bottom p { margin: 9px 0 18px; color: #6f706a; font: 500 12px/1.55 var(--serif); }
.side-version { color: #a4a49d; font: 8px var(--mono); letter-spacing: .04em; }

.main-content { width: min(1440px, 100%); min-width: 0; margin-inline: auto; padding: 0 64px; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 11px; margin: 0; color: #878880; font-size: 10px; }
.breadcrumb > span:first-child { font: 9px var(--mono); letter-spacing: .08em; }
.breadcrumb-slash { color: #c0c0b9; }
.breadcrumb strong { color: #494a45; font-weight: 500; }
.add-button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: var(--white); font-size: 10px; font-weight: 600; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.add-button:hover { transform: translateY(-1px); background: #454640; }
.add-button > span { font-size: 17px; font-weight: 400; }

.page-intro { min-height: 307px; display: flex; align-items: center; justify-content: space-between; gap: 35px; padding-block: 49px 42px; }
.eyebrow { margin: 0; }
.page-intro .eyebrow { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pink-deep); }
h1, h2, h3, p { margin-top: 0; }
h1, .collection-heading h2, .dialog-heading h2 { font-family: var(--serif); letter-spacing: -.065em; }
h1 { margin: 18px 0 13px; font-size: clamp(52px, 6vw, 75px); font-weight: 600; line-height: .96; }
h1 span { color: #96978e; }
.intro-copy { max-width: 495px; margin: 0; color: #797a73; font-size: 12px; line-height: 1.8; }
.intro-stamp { width: 108px; height: 108px; flex: 0 0 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dcdcd3; border-radius: 50%; color: #787970; text-align: center; font: 8px/1.4 var(--mono); letter-spacing: .07em; transform: rotate(9deg); }
.stamp-star { color: var(--pink-deep); font-size: 25px; line-height: 1; }

.library-section { padding-top: 8px; }
.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.collection-heading h2 { margin: 7px 0 0; font-size: clamp(21px, 2.4vw, 29px); font-weight: 600; line-height: 1.2; }
.collection-heading h2 span { padding-left: 5px; color: var(--pink-deep); font: 18px var(--sans); }
.sort-control { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; color: #a0a097; font: 8px var(--mono); letter-spacing: .08em; white-space: nowrap; }
.sort-control select { padding: 5px 16px 5px 1px; border: 0; background: transparent; color: #565750; font: 10px var(--sans); cursor: pointer; }
.toolbar { min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 7px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.search-box { min-width: 200px; display: flex; align-items: center; gap: 9px; color: #93948b; }
.search-icon { font: 21px var(--sans); transform: rotate(-20deg); }
.search-box input { width: min(260px, 28vw); min-height: 30px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.search-box input::placeholder { color: #a1a198; }
.search-box kbd { padding: 3px 5px; border: 1px solid #e3e2db; border-radius: 3px; color: #a2a29a; font: 8px var(--mono); white-space: nowrap; }
.quick-filters { display: flex; gap: 5px; }
.filter-chip { min-height: 27px; padding: 0 10px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #81827a; font-size: 9px; cursor: pointer; }
.filter-chip:hover { background: var(--pink-wash); }
.filter-chip.is-selected { border-color: #ecd4dc; background: #fffdfd; color: #744656; }
.results-line { min-height: 12px; margin: 13px 0 10px; color: #a0a097; font: 8px var(--mono); letter-spacing: .04em; }

.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.inspiration-card { min-width: 0; animation: card-in .24s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.card-art { position: relative; height: clamp(155px, 17vw, 207px); display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.art-label, .art-index { position: absolute; z-index: 2; color: rgba(41,42,39,.63); font: 8px var(--mono); letter-spacing: .07em; }
.art-label { top: 13px; left: 14px; }
.art-index { right: 13px; bottom: 12px; color: rgba(41,42,39,.5); font-size: 7px; }
.art-mark { position: relative; z-index: 1; color: #282925; font: 700 65px/.82 var(--serif); letter-spacing: -.1em; text-align: center; white-space: pre-line; }
.visual-type { background: #e2a479; }
.visual-type::before { position: absolute; top: 39px; left: 13%; width: 74%; height: 70%; border: 1px solid rgba(43,38,33,.26); content: ""; transform: rotate(-7deg); }
.visual-type .art-mark { font-size: clamp(66px, 8vw, 94px); font-style: italic; }
.visual-signal { background: #d5d9c9; }
.visual-signal::before { position: absolute; width: 175px; height: 175px; border: 1px solid rgba(41,42,39,.24); border-radius: 50%; box-shadow: 0 0 0 15px rgba(41,42,39,.04), 0 0 0 31px rgba(41,42,39,.04); content: ""; }
.visual-signal .art-mark { font-size: 27px; letter-spacing: .02em; }
.visual-paper { background: #d8c3b4; }
.visual-paper::before, .visual-paper::after { position: absolute; width: 82px; height: 117px; border: 1px solid rgba(41,42,39,.2); background: #eee8dd; content: ""; transform: rotate(-13deg); }
.visual-paper::after { width: 74px; height: 106px; background: #a6a987; transform: translate(37px, -4px) rotate(12deg); }
.visual-paper .art-mark { z-index: 1; font-size: 24px; letter-spacing: .02em; }
.visual-read { background: #d9e0db; }
.visual-read::before { position: absolute; width: 45%; height: 70%; border-inline: 1px solid rgba(41,42,39,.22); content: ""; }
.visual-read .art-mark { font-size: 32px; letter-spacing: -.04em; }
.visual-color { background: #a9abc7; }
.visual-color::before { position: absolute; top: 15%; left: 14%; width: 76%; height: 69%; background: #edb377; content: ""; clip-path: polygon(0 3%, 100% 0, 94% 100%, 7% 92%); transform: rotate(5deg); }
.visual-color .art-mark { z-index: 1; font-size: 43px; }
.visual-world { background: #e2d6d0; }
.visual-world::before { position: absolute; width: 130px; height: 130px; border-radius: 44% 56% 53% 47%; background: #c98779; content: ""; transform: rotate(-25deg); }
.visual-world::after { position: absolute; width: 62px; height: 62px; border: 1px solid #42433e; border-radius: 50%; content: ""; transform: translate(40px, -30px); }
.visual-world .art-mark { z-index: 1; color: #fff7ec; font-size: 25px; letter-spacing: .02em; }
.visual-collage { background: #d8c66c; }
.visual-collage::before { position: absolute; width: 130px; height: 100px; background: #748c73; content: ""; transform: rotate(13deg) translate(-21px, 13px); }
.visual-collage::after { position: absolute; width: 78px; height: 135px; background: #d98868; content: ""; transform: rotate(-15deg) translate(47px, -3px); }
.visual-collage .art-mark { z-index: 1; color: #282925; font-size: 29px; letter-spacing: -.03em; }
.visual-cover { background: #d2d7d0; }
.visual-cover::before { position: absolute; width: 42%; height: 78%; background: #f1eee4; box-shadow: 8px 8px 0 rgba(41,42,39,.11); content: ""; transform: rotate(4deg); }
.visual-cover .art-mark { z-index: 1; font-size: 22px; letter-spacing: .04em; }
.visual-custom { background: #dce1d2; }
.visual-custom .art-mark { font-size: 42px; }

.card-content { padding: 12px 1px 3px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; }
.category-label { color: #909188; font: 8px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.save-button { width: 27px; height: 25px; display: grid; place-items: center; border: 0; border-radius: 3px; background: transparent; color: #999a91; font-size: 16px; cursor: pointer; }
.save-button:hover { background: var(--pink-wash); color: #a9526c; }
.save-button.is-saved { color: #b65b76; }
.card-content h3 { margin: 5px 0 5px; font: 600 14px var(--serif); letter-spacing: -.035em; }
.card-note { min-height: 34px; margin: 0; color: #85867e; font-size: 10px; line-height: 1.65; }
.source-link { display: inline-block; margin-top: 9px; color: #9c5269; font-size: 9px; font-weight: 600; }
.source-link:hover { text-decoration: underline; }

.empty-state { padding: 75px 20px; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state > span { color: var(--pink-deep); font-size: 26px; }
.empty-state h3 { margin: 13px 0 7px; font: 600 21px var(--serif); letter-spacing: -.04em; }
.empty-state p { margin-bottom: 14px; color: #85867e; font-size: 11px; }
.text-button { border: 0; background: transparent; color: #667b3f; font-size: 10px; font-weight: 600; cursor: pointer; }
.main-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 49px; padding: 18px 0 23px; border-top: 1px solid var(--line); color: #a0a097; font: 8px var(--mono); letter-spacing: .05em; }
.main-footer p { margin: 0; }
.main-footer p:first-child span { padding-left: 3px; color: var(--pink-deep); font-size: 12px; }

.add-dialog { width: min(440px, calc(100% - 32px)); max-height: min(90vh, 700px); padding: 28px; border: 1px solid #e4e3dc; border-radius: 7px; background: var(--white); color: var(--ink); box-shadow: 0 18px 70px rgba(34,35,31,.18); }
.add-dialog::backdrop { background: rgba(35,36,32,.38); backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }
.dialog-heading h2 { margin: 6px 0 0; font-size: 30px; font-weight: 600; }
.dialog-heading h2 span { color: var(--pink-deep); }
.close-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: #73746d; font-size: 20px; cursor: pointer; }
.form-field { display: grid; gap: 7px; margin-top: 14px; color: #5f6059; font-size: 10px; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 38px; padding: 9px 10px; border: 1px solid #e4e3dc; border-radius: 3px; background: #fffefa; color: var(--ink); font-size: 11px; font-weight: 400; }
.form-field textarea { min-height: 78px; resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #a5a59d; }
.optional { color: #a1a198; font-weight: 400; }
.form-error { min-height: 15px; margin: 8px 0 0; color: #a2463d; font-size: 10px; }
.dialog-actions { display: flex; justify-content: end; gap: 9px; margin-top: 12px; }
.cancel-button { padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: #62635d; font-size: 10px; cursor: pointer; }
.toast { position: fixed; right: 24px; bottom: 22px; z-index: 10; max-width: min(360px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 4px; background: var(--ink); color: white; font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 1500px) {
  .main-content { padding-inline: 68px; }
}

@media (max-width: 1050px) {
  .sidebar { gap: 10px; padding-inline: 22px; }
  .side-nav { gap: 1px; }
  .nav-item { gap: 6px; padding-inline: 8px; font-size: 9px; }
  .main-content { padding-inline: 38px; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-art { height: clamp(170px, 20vw, 235px); }
}

@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; min-height: 0; height: auto; display: block; padding: 14px 20px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: inline-flex; }
  .brand-mark { width: 32px; height: 32px; }
  .sidebar-rule, .sidebar > .side-label, .sidebar-bottom { display: none; }
  .side-nav { display: flex; gap: 5px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-item { width: auto; min-width: max-content; min-height: 32px; gap: 6px; padding-inline: 9px; font-size: 9px; }
  .nav-icon { font-size: 12px; }
  .category-nav { padding-inline: 8px; }
  .category-dot { width: 6px; height: 6px; margin-inline: 1px; }
  .main-content { padding-inline: 23px; }
  .topbar { height: 60px; }
  .page-intro { min-height: auto; padding-block: 45px 39px; }
  .intro-stamp { width: 80px; height: 80px; flex-basis: 80px; font-size: 6px; }
  .stamp-star { font-size: 19px; }
}

@media (max-width: 520px) {
  .main-content { padding-inline: 18px; }
  .topbar { height: 57px; }
  .breadcrumb { gap: 7px; font-size: 9px; }
  .breadcrumb > span:first-child { font-size: 7px; }
  .add-button { min-height: 34px; gap: 5px; padding-inline: 10px; font-size: 9px; }
  .page-intro { align-items: start; gap: 8px; padding-block: 36px 32px; }
  h1 { font-size: clamp(47px, 13vw, 62px); }
  .intro-copy { max-width: 350px; font-size: 11px; }
  .intro-stamp { width: 58px; height: 58px; flex-basis: 58px; margin-top: 30px; font-size: 5px; }
  .stamp-star { font-size: 15px; }
  .collection-heading { align-items: start; flex-direction: column; gap: 7px; }
  .collection-heading h2 { max-width: 100%; font-size: 20px; }
  .sort-control { align-self: end; margin-top: 0; }
  .toolbar { align-items: start; flex-direction: column; gap: 6px; padding-block: 9px; }
  .search-box { width: 100%; }
  .search-box input { width: 100%; }
  .quick-filters { width: 100%; gap: 2px; }
  .filter-chip { padding-inline: 8px; font-size: 8px; }
  .card-grid { grid-template-columns: 1fr; gap: 22px; }
  .card-art { height: clamp(200px, 63vw, 290px); }
  .art-mark { font-size: 70px; }
  .visual-type .art-mark { font-size: 100px; }
  .main-footer { flex-direction: column; gap: 7px; margin-top: 32px; }
  .add-dialog { padding: 23px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
