@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@600&family=DM+Sans:wght@400;500;700&display=swap");
* { box-sizing: border-box; }
body { margin: 0; font-family: "DM Sans", sans-serif; background: #faf6f1; color: #2a2230; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #8b5cf6; outline-offset: 2px; }
.hero { background: #2a2230; color: #faf6f1; padding: 28px 20px 40px; }
.hero > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.logo { font-weight: 700; color: #f9a8d4; margin-bottom: 28px; }
.hero h1 { font-family: Fraunces, serif; font-size: clamp(30px, 6vw, 52px); line-height: 1.05; margin-top: 0; margin-bottom: 14px; max-width: 760px; }
.hero p { opacity: .8; max-width: 600px; line-height: 1.5; margin-bottom: 24px; }
.search { display: block; width: 100%; max-width: 560px; margin-left: 0; padding: 14px 18px; border-radius: 999px; border: 0; font-size: 16px; }
.hero .search { margin-left: auto; margin-right: auto; }
@media (min-width: 1080px) { .hero .search { margin-left: calc((100% - 1040px) / 2); } }
.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 20px 48px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid #ddd2c7; background: #fff; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.chip.on { background: #2a2230; color: #fff; border-color: #2a2230; }
.seg { display: flex; background: #ece4da; border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: #fff; font-weight: 700; }
.note { font-size: 13px; color: #8a7f86; margin: 16px 0; }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 10px rgba(42,34,48,.06); display: flex; flex-direction: column; }
.thumb { height: 150px; position: relative; }
.tag, .cat { position: absolute; top: 12px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.tag { left: 12px; }
.tag.free { background: #d1fae5; color: #065f46; }
.tag.paid { background: #fde68a; color: #78350f; }
.cat { right: 12px; background: rgba(255,255,255,.75); }
.body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.body h3 { margin: 0; font-size: 18px; }
.by { color: #8a7f86; font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.tags span { font-size: 12px; background: #f3ede6; padding: 3px 8px; border-radius: 6px; }
.act { margin-top: auto; text-align: center; padding: 11px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.act.dl { background: #8b5cf6; color: #fff; }
.act.ext { border: 2px solid #2a2230; color: #2a2230; }
.none { text-align: center; padding: 48px; display: flex; flex-direction: column; gap: 6px; color: #8a7f86; }
.none strong { color: #2a2230; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > .wrap { flex: 1; width: 100%; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: #8a7f86; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #ece4da; border-top-color: #8b5cf6; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 48px 20px; color: #8a7f86; }
.empty-title { color: #2a2230; font-weight: 700; margin: 0 0 6px; }
.hint { margin: 0; font-size: 14px; }
.alert { padding: 12px 16px; border-radius: 12px; margin: 12px 0; }
.alert-error { background: #fee2e2; color: #7f1d1d; }
.btn { border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 700; cursor: pointer; background: #8b5cf6; color: #fff; }
.btn-secondary { background: #fff; color: #2a2230; border: 2px solid #2a2230; }
.foot { text-align: center; padding: 24px; font-size: 13px; color: #8a7f86; }
