:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b0a0f;
  color: #f8f7fb;
  --background: #0b0a0f;
  --surface: #17141d;
  --line: rgb(255 255 255 / .1);
  --muted: #b5afbe;
  --quiet: #88818f;
  --accent: #ff8ba4;
  --accent-soft: #f7b4d2;
  --cream: #fff8f1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 78% -5%, rgb(124 50 78 / .34), transparent 28rem),
    radial-gradient(circle at -8% 40%, rgb(89 63 112 / .2), transparent 34rem),
    var(--background);
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
button[hidden] { display: none; }
img { display: block; max-width: 100%; }

.site-shell { width: min(1200px, calc(100% - 56px)); margin: 0 auto; }
.site-header {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 82px;
  border-bottom: 1px solid rgb(255 255 255 / .07);
}
.brand { font-size: 1.32rem; font-weight: 790; letter-spacing: -.055em; }
.site-nav { display: flex; gap: 24px; margin-left: auto; }
.nav-link, .header-app-link { color: var(--muted); font-size: .88rem; transition: color .2s ease; }
.nav-link:hover, .nav-link.is-active, .header-app-link:hover { color: #fff; }
.header-app-link { color: var(--accent); }

.home-main { width: 100%; margin: 0 auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  grid-template-rows: auto auto auto 1fr;
  column-gap: clamp(48px, 7vw, 104px);
  min-height: min(760px, calc(100vh - 82px));
  padding: clamp(74px, 10vw, 132px) 0 96px;
  align-items: start;
}
.hero .eyebrow, .hero h1, .hero .lede, .hero .intro-actions { grid-column: 1; }
.hero .eyebrow { margin-bottom: 18px; }
.hero h1 { max-width: 780px; }
.hero-preview {
  position: relative;
  grid-column: 2;
  grid-row: 1 / -1;
  display: block;
  align-self: center;
  min-height: 560px;
  isolation: isolate;
}
.hero-preview::before {
  content: "";
  position: absolute;
  inset: 10% 0 6%;
  border-radius: 50%;
  background: rgb(255 111 142 / .19);
  filter: blur(72px);
}
.hero-preview-card {
  position: absolute;
  display: flex;
  align-items: end;
  overflow: hidden;
  width: min(66%, 274px);
  aspect-ratio: 3 / 5;
  border: 1px solid rgb(255 255 255 / .13);
  border-radius: 34px;
  padding: 18px;
  color: inherit;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 34px 80px rgb(0 0 0 / .42);
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.hero-preview-card::after { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(0deg, rgb(8 6 10 / .7), transparent 45%); pointer-events: none; }
.hero-preview-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-preview:hover .hero-preview-card img { transform: scale(1.035); }
.hero-preview:hover .hero-preview-card-left { transform: rotate(-10deg) translate(-8px, -4px); }
.hero-preview:hover .hero-preview-card-center { transform: translateY(-10px); }
.hero-preview:hover .hero-preview-card-right { transform: rotate(10deg) translate(8px, -4px); }
.hero-preview-card span { position: relative; z-index: 1; color: rgb(255 255 255 / .78); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.hero-preview-card-left { left: 1%; top: 21%; z-index: 1; transform: rotate(-7deg); }
.hero-preview-card-right { right: 1%; top: 21%; z-index: 1; transform: rotate(7deg); }
.hero-preview-card-center { left: 50%; top: 7%; z-index: 2; transform: translateX(-50%); }
.hero-preview:hover .hero-preview-card-center { transform: translateX(-50%) translateY(-10px); }
.hero-preview-loading { background: linear-gradient(110deg, #201b24 8%, #332635 18%, #201b24 33%); background-size: 200% 100%; animation: shimmer 1.5s linear infinite; }
.hero-preview-fallback::after { content: "Popular cat wallpapers are on their way."; position: absolute; inset: 30% 8%; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 32px; color: var(--quiet); text-align: center; }
.explore-top { padding: 44px 0 20px; }
.eyebrow {
  color: #c9a6ea;
  font-size: .72rem;
  font-weight: 760;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 24px;
  font-size: clamp(4rem, 7.7vw, 7rem);
  line-height: .9;
  letter-spacing: -.072em;
}
.explore-top h1 { margin-bottom: 14px; font-size: clamp(3rem, 6vw, 5.2rem); }
h1 em { color: var(--accent-soft); font-family: Iowan Old Style, Baskerville, Georgia, serif; font-weight: 400; }
.lede { max-width: 570px; margin-bottom: 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.13rem); line-height: 1.65; }
.intro-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 34px; }
.intro-note { color: var(--quiet); font-size: .84rem; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px 0; border-radius: 50%; background: #8de0af; box-shadow: 0 0 0 4px rgb(141 224 175 / .1); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 700;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #21182b; background: #f0d8ff; box-shadow: 0 10px 30px rgb(213 167 255 / .16); }
.button-primary:hover { background: #fff0ff; }
.button-secondary { border-color: var(--line); color: #eeeaf4; background: rgb(255 255 255 / .06); }
.button-secondary:hover { border-color: rgb(255 255 255 / .2); background: rgb(255 255 255 / .1); }

.home-section { width: min(100%, 920px); margin: 0 auto; padding: 0 0 84px; }
.latest-section { padding-top: 18px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-kicker { margin-bottom: 6px; color: #c5a4e6; font-size: .7rem; font-weight: 760; letter-spacing: .16em; text-transform: uppercase; }
h2 { margin-bottom: 0; font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1; letter-spacing: -.06em; }
.text-link { flex: none; color: var(--muted); font-size: .86rem; transition: color .2s ease; }
.text-link:hover { color: #fff; }
.text-link span { color: var(--accent); margin-left: 5px; }

.latest-carousel { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 12px; }
.latest-carousel > .empty-state { grid-column: 1 / -1; }
.latest-viewport { min-width: 0; overflow: hidden; border-radius: 30px; }
.latest-track { display: flex; transition: transform .45s cubic-bezier(.2,.75,.25,1); }
.latest-slide { position: relative; flex: 0 0 100%; min-width: 0; overflow: hidden; aspect-ratio: 1; border: 0; border-radius: 30px; padding: 0; background: var(--surface); cursor: pointer; text-align: left; }
.latest-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(4 3 8 / .76), transparent 52%); pointer-events: none; }
.latest-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s ease; }
.latest-slide:hover img { transform: scale(1.035); }
.latest-copy { position: absolute; z-index: 1; inset: auto 0 0; max-width: 520px; padding: clamp(22px, 4vw, 36px); }
.latest-copy h3 { margin: 0 0 7px; font-size: clamp(1.8rem, 4vw, 2.75rem); line-height: .96; letter-spacing: -.065em; }
.latest-copy p { max-width: 460px; margin-bottom: 0; color: rgb(255 255 255 / .7); font-size: .92rem; line-height: 1.45; }
.carousel-arrow { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: rgb(255 255 255 / .06); cursor: pointer; font-size: 1.2rem; transition: background .2s ease, transform .2s ease; }
.carousel-arrow:hover { background: rgb(255 255 255 / .13); transform: scale(1.05); }
.carousel-arrow:disabled { opacity: .25; cursor: default; transform: none; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; min-height: 14px; margin-top: 15px; }
.carousel-dot { width: 6px; height: 6px; border: 0; border-radius: 99px; padding: 0; background: rgb(255 255 255 / .2); cursor: pointer; transition: width .25s ease, background .25s ease; }
.carousel-dot.is-active { width: 24px; background: var(--accent); }

.mosaic-grid { display: grid; grid-template-columns: 1.18fr .82fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; height: clamp(520px, 68vw, 640px); min-height: 300px; }
.mosaic-grid > .empty-state { grid-column: 1 / -1; }
.wallpaper-card { position: relative; display: block; min-width: 0; overflow: hidden; border: 0; border-radius: 24px; padding: 0; background: var(--surface); cursor: pointer; text-align: left; }
.wallpaper-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(4 3 8 / .72), transparent 47%); pointer-events: none; }
.wallpaper-card:not(.has-overlay)::after { display: none; }
.wallpaper-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.wallpaper-card:hover img { transform: scale(1.045); }
.mosaic-card:first-child { grid-row: 1 / -1; min-height: 0; }
.mosaic-card:not(:first-child) { min-height: 0; }
.card-overlay { position: absolute; z-index: 1; right: 0; bottom: 0; left: 0; padding: 18px; }
.card-tag { display: block; color: #f4dbff; font-size: .72rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.card-overlay-title { display: block; margin-top: 5px; font-size: 1.15rem; letter-spacing: -.035em; }
.card-overlay-description { display: block; max-width: 24ch; margin-top: 6px; color: rgb(255 255 255 / .7); font-size: .82rem; line-height: 1.4; }

.tag-shelves { position: relative; min-width: 0; }
.tag-shelves::before, .tag-shelves::after { content: ""; position: absolute; z-index: 3; top: 0; bottom: 8px; width: 76px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.tag-shelves::before { left: 0; background: linear-gradient(90deg, var(--background), transparent); }
.tag-shelves::after { right: 0; background: linear-gradient(270deg, var(--background), transparent); }
.tag-shelves.can-scroll-left::before, .tag-shelves.can-scroll-right::after { opacity: 1; }
.popular-tag-list { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.popular-tag-list::-webkit-scrollbar { display: none; }
.popular-tag-card { flex: 0 0 clamp(160px, 26vw, 190px); aspect-ratio: 3 / 5; border-radius: 22px; }
.popular-tag-card .card-overlay { padding: 14px; }
.popular-tag-card .card-overlay-title { font-size: 1.18rem; }

.explore-main { padding-bottom: 80px; }
.explore-top { max-width: 1080px; margin: 0 auto; }
.explore-lede { max-width: none; margin-bottom: 30px; color: var(--muted); font-size: 1rem; line-height: 1.6; white-space: nowrap; }
.tag-filters { display: flex; gap: 9px; overflow-x: auto; margin: 0 -2px 18px; padding: 2px; scrollbar-width: none; }
.tag-filters::-webkit-scrollbar { display: none; }
.tag-filter { flex: 0 0 auto; min-height: 40px; border: 1px solid rgb(255 255 255 / .09); border-radius: 999px; padding: 0 15px; color: #d8d2e1; background: rgb(255 255 255 / .07); cursor: pointer; font-size: .84rem; font-weight: 650; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.tag-filter:hover { border-color: rgb(255 255 255 / .2); background: rgb(255 255 255 / .12); }
.tag-filter.is-selected { border-color: transparent; color: #24182c; background: #edcfff; }
.explore-status { color: var(--quiet); font-size: .86rem; }
.explore-status:not(:empty) { margin: 0 0 12px; }
.wallpaper-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-card { aspect-ratio: 3 / 5; min-height: 250px; border-radius: 20px; }
.grid-card::after { display: none; }
.infinite-scroll-sentinel { height: 1px; margin-top: 24px; }

.loading-card { position: relative; overflow: hidden; min-height: 260px; border-radius: 30px; background: linear-gradient(110deg, rgb(255 255 255 / .04) 8%, rgb(255 255 255 / .09) 18%, rgb(255 255 255 / .04) 33%); background-size: 200% 100%; animation: shimmer 1.5s linear infinite; }
.loading-card-tall { min-height: 420px; }
@keyframes shimmer { to { background-position-x: -200%; } }
.empty-state { display: grid; place-items: center; min-height: 220px; border: 1px dashed rgb(255 255 255 / .15); border-radius: 24px; color: var(--muted); text-align: center; }

.site-footer { display: flex; justify-content: space-between; gap: 50px; margin-top: 48px; border-top: 1px solid rgb(255 255 255 / .1); padding: 28px 0 38px; color: var(--quiet); }
.footer-brand p, .footer-app-note { max-width: 300px; margin: 12px 0 0; font-size: .82rem; line-height: 1.5; }
.footer-actions { display: flex; flex-direction: column; align-items: end; justify-content: space-between; gap: 18px; text-align: right; }
.footer-app-note { margin: 0; color: var(--muted); }
.store-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.store-link { display: inline-flex; align-items: center; gap: 8px; min-width: 138px; border: 1px solid rgb(255 255 255 / .13); border-radius: 10px; padding: 7px 10px; color: #fff; background: rgb(255 255 255 / .06); text-align: left; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.store-link:hover { border-color: rgb(255 255 255 / .28); background: rgb(255 255 255 / .11); transform: translateY(-2px); }
.store-icon { width: 22px; font-size: 1.65rem; line-height: 1; text-align: center; }
.play-icon { font-size: 1.15rem; color: #b9f6ca; }
.store-link small, .store-link strong { display: block; line-height: 1.1; }
.store-link small { color: rgb(255 255 255 / .7); font-size: .48rem; letter-spacing: .08em; text-transform: uppercase; }
.store-link strong { margin-top: 3px; font-size: .92rem; letter-spacing: -.02em; }
.footer-links { display: flex; gap: 20px; color: var(--muted); font-size: .82rem; }
.footer-links { flex-wrap: wrap; justify-content: end; }
.footer-links a:hover { color: #fff; }

.legal-shell { min-height: 100vh; }
.legal-main { max-width: 760px; min-height: calc(100vh - 240px); padding: clamp(64px, 9vw, 112px) 0 80px; }
.legal-main h1 { max-width: 720px; margin-bottom: 28px; font-size: clamp(3rem, 7vw, 5.5rem); }
.legal-intro { max-width: 660px; color: var(--muted); font-size: 1.12rem; line-height: 1.7; }
.legal-card { margin: 38px 0 30px; border: 1px solid var(--line); border-radius: 26px; padding: clamp(24px, 5vw, 40px); background: rgb(255 255 255 / .045); }
.legal-card h2 { margin-bottom: 24px; font-size: 1.75rem; }
.legal-card ol { margin: 0 0 24px; padding-left: 1.4rem; color: #ece8ef; line-height: 1.8; }
.legal-card p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.legal-details { margin: 0 0 34px; }
.legal-details h2 { margin-bottom: 14px; font-size: 1.55rem; }
.legal-details p { color: var(--muted); line-height: 1.7; }
.deletion-card { min-height: 340px; }
.step-label { margin-bottom: 10px !important; color: var(--accent) !important; font-size: .72rem; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
.deletion-card > h2 { margin-bottom: 14px; }
.deletion-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.google-button { min-height: 50px; border-color: rgb(255 255 255 / .16); color: #272329; background: #fff; }
.google-button:hover { background: #f4f1f3; }
.google-button svg { width: 18px; height: 18px; }
.verified-account { display: flex; align-items: center; gap: 10px; margin-top: 26px; color: #eeeaf1; }
.verified-mark, .success-mark { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: #17251d; background: #8de0af; font-weight: 800; }
.deletion-check { display: flex; align-items: flex-start; gap: 12px; margin-top: 26px; color: var(--muted); font-size: .92rem; line-height: 1.55; cursor: pointer; }
.deletion-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.button-danger { border-color: rgb(255 118 145 / .3); color: #fff; background: #b93652; }
.button-danger:hover { background: #ca415f; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.text-button { border: 0; padding: 8px 2px; color: var(--muted); background: transparent; cursor: pointer; font-size: .86rem; }
.text-button:hover { color: #fff; }
.deletion-status { min-height: 1.5em; margin: 18px 0 0 !important; color: var(--accent-soft) !important; font-size: .86rem; }
.deletion-result { padding: 8px 0 0; }
.deletion-result .success-mark { width: 42px; height: 42px; margin-bottom: 20px; font-size: 1.15rem; }
.deletion-result h2 { margin-bottom: 12px; }
.deletion-footnote { color: var(--quiet); font-size: .86rem; line-height: 1.6; }
.compact-footer { align-items: center; }

.wallpaper-modal[hidden] { display: none; }
.wallpaper-modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 22px; background: rgb(5 4 8 / .84); backdrop-filter: blur(16px); }
.modal-panel { position: relative; display: grid; grid-template-columns: minmax(340px, .8fr) minmax(420px, 1.2fr); width: min(1080px, 100%); max-height: min(780px, calc(100vh - 44px)); overflow: hidden; border: 1px solid rgb(255 255 255 / .12); border-radius: 28px; background: #17151e; box-shadow: 0 25px 90px rgb(0 0 0 / .45); }
.modal-art { position: relative; min-height: 570px; background: #0d0c12; }
.modal-art::after { content: ""; position: absolute; inset: 0; opacity: 0; background: linear-gradient(110deg, #15121a 8%, #2b2530 18%, #15121a 33%); background-size: 200% 100%; pointer-events: none; transition: opacity .15s ease; }
.modal-art.is-loading::after { opacity: 1; animation: shimmer 1.5s linear infinite; }
.modal-art img { width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: opacity .18s ease; }
.modal-art.is-loading img { opacity: 0; }
.modal-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 58px); }
.modal-copy h2 { max-width: 17ch; margin: 8px 0 12px; font-size: clamp(1.55rem, 2.5vw, 2.5rem); line-height: 1.04; }
.modal-copy p { max-width: 40ch; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.modal-close { position: absolute; z-index: 1; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgb(255 255 255 / .12); border-radius: 50%; color: #fff; background: rgb(10 9 14 / .55); cursor: pointer; font-size: 1.25rem; }
.modal-close:hover { background: rgb(255 255 255 / .15); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(270px, .68fr); column-gap: 30px; }
  .hero-preview { min-height: 470px; }
  .wallpaper-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal-panel { grid-template-columns: minmax(300px, .78fr) minmax(330px, 1.22fr); }
}

@media (max-width: 620px) {
  .site-shell { width: min(100% - 32px, 560px); }
  .site-header { min-height: 72px; gap: 16px; }
  .site-nav { gap: 15px; }
  .header-app-link { display: none; }
  .hero { display: block; min-height: 0; padding: 68px 0 72px; }
  .hero h1 { font-size: clamp(3.7rem, 18vw, 5.9rem); }
  .hero-preview { min-height: 440px; margin-top: 48px; }
  .hero-preview-card { width: min(62%, 250px); border-radius: 28px; }
  h1 { letter-spacing: -.052em; }
  .explore-top { padding: 28px 0 16px; }
  .explore-lede { overflow: hidden; font-size: clamp(.7rem, 3.2vw, .88rem); text-overflow: ellipsis; }
  .home-section { padding: 0 0 58px; }
  .section-heading { align-items: baseline; }
  .text-link { font-size: .8rem; }
  .latest-carousel { grid-template-columns: 1fr; }
  .latest-viewport { order: 1; }
  .latest-slide { aspect-ratio: 1; border-radius: 25px; }
  .latest-carousel .carousel-arrow { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); }
  .latest-carousel .carousel-arrow:hover { transform: translateY(-50%) scale(1.05); }
  .latest-carousel .carousel-arrow:first-child { left: 12px; }
  .latest-carousel .carousel-arrow:last-child { right: 12px; }
  .latest-copy { padding: 24px; }
  .latest-copy p { font-size: .85rem; }
  .mosaic-grid { height: min(560px, 120vw); gap: 10px; min-height: 400px; }
  .mosaic-card:first-child { grid-column: auto; grid-row: 1 / -1; min-height: 0; }
  .mosaic-card:not(:first-child) { min-height: 0; }
  .card-overlay { padding: 13px; }
  .popular-tag-card { flex-basis: 178px; }
  .wallpaper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-card { min-height: 180px; border-radius: 17px; }
  .site-footer { flex-direction: column; gap: 26px; margin-top: 30px; }
  .footer-actions { align-items: start; text-align: left; }
  .footer-links { justify-content: start; }
  .modal-panel { display: block; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 23px; }
  .modal-art { height: min(60vh, 560px); min-height: 280px; }
  .modal-copy { padding: 25px; }
}

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