:root {
  --bg: #080706;
  --bg2: #12100e;
  --bg3: #1b1815;
  --line: rgba(190, 183, 164, 0.14);
  --text: #fffffc;
  --muted: #a9a293;
  --accent: #ff7f11;
  --accent2: #ff3f00;
  --head: "Outfit", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
main { flex: 1; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(8, 7, 6, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.logo { font-family: var(--head); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; text-decoration: none; }
.logo span { color: var(--accent); margin-left: 6px; font-weight: 600; }
.top nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.top nav a { text-decoration: none; color: var(--muted); font-size: 14px; white-space: nowrap; transition: color 0.2s; }
.top nav a:hover { color: var(--text); }

/* hero */
.hero { padding: 40px 0 22px; }
.hero h1 { font-family: var(--head); font-weight: 800; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.025em; }
.hero h1 span { white-space: nowrap; }
.hero h1 span { color: var(--accent); }
.hero p { margin-top: 10px; max-width: 640px; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* category tabs */
.tabs-bar { position: sticky; top: 62px; z-index: 9; background: rgba(8, 7, 6, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; padding: 12px 0; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 0 0 auto; font: 500 14px var(--body); color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s; }
.tabs button b { color: var(--accent); margin-left: 4px; font-weight: 600; }
.tabs button:hover { border-color: var(--accent); }
.tabs button.on { background: var(--accent); border-color: var(--accent); color: #120a02; }
.tabs button.on b { color: #120a02; }
section[hidden] { display: none; }

/* grid + cards */
.cat { padding: 28px 0 8px; scroll-margin-top: 130px; }
.cat h2, .related h2 { font-family: var(--head); font-size: 26px; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.01em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform 0.25s, border-color 0.25s; }
.card:hover { transform: translateY(-3px); border-color: rgba(255, 127, 17, 0.45); }
.card-img { aspect-ratio: 315 / 250; background: var(--bg3); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.card h3 { font-family: var(--head); font-size: 17px; font-weight: 600; line-height: 1.3; }
.card-link { text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .buy { position: relative; z-index: 2; }
.card-meta { display: flex; flex-direction: column; gap: 3px; margin-top: 12px; }
.card p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-foot .buy { padding: 9px 20px; }
.fmts { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.price { font-family: var(--head); font-weight: 700; font-size: 20px; color: var(--accent); }

/* product */
.product { padding: 26px 0 60px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.p-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.main-img { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 11; display: flex; align-items: center; justify-content: center; }
.main-img img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(8, 7, 6, 0.62); color: var(--text); font-size: 30px; line-height: 40px; cursor: pointer; opacity: 0; transition: opacity 0.2s, background 0.2s; }
.nav:hover { background: rgba(8, 7, 6, 0.9); }
.nav.prev { left: 12px; } .nav.next { right: 12px; }
.main-img:hover .nav, .lightbox .nav { opacity: 1; }
.counter { position: absolute; right: 12px; bottom: 10px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(8, 7, 6, 0.62); color: #d8d2c4; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5, 4, 3, 0.96); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 60px); object-fit: contain; }
.lightbox .close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--text); font-size: 28px; cursor: pointer; }
.lightbox .nav.prev { left: 18px; } .lightbox .nav.next { right: 18px; }
.mbar { display: none; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: #3a342d transparent; }
.thumbs button { flex: 0 0 84px; height: 62px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--bg2); cursor: pointer; padding: 0; opacity: 0.65; transition: opacity 0.2s, border-color 0.2s; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button:hover { opacity: 1; }
.thumbs button.on { border-color: var(--accent); opacity: 1; }
.buybox { position: sticky; top: 84px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.buybox h1 { font-family: var(--head); font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.lead { margin-top: 12px; color: var(--muted); line-height: 1.6; font-size: 15px; }
.price-row { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.big-price { font-family: var(--head); font-size: 36px; font-weight: 800; }
.buy { flex: 1; font: 600 16px var(--body); color: #120a02; background: var(--accent); border: 0; border-radius: 10px; padding: 15px 22px; cursor: pointer; text-decoration: none; text-align: center; transition: background 0.2s, transform 0.1s; }
.buy:hover { background: #ff9233; }
.buy:active { transform: scale(0.98); }
.buy:disabled { opacity: 0.6; cursor: wait; }
.buy.small { flex: 0 0 auto; padding: 10px 18px; font-size: 14px; }
.buy-err { margin-top: 12px; color: #ff8a6a; font-size: 14px; line-height: 1.5; }
.facts { list-style: none; margin-top: 22px; display: grid; gap: 9px; font-size: 14px; color: #d8d2c4; }
.facts li { padding-left: 22px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.files { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; }
.files summary { cursor: pointer; color: var(--muted); }
.files ul { list-style: none; margin-top: 10px; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.files li { display: flex; justify-content: space-between; gap: 10px; color: #d8d2c4; font-size: 13px; }
.files li span:first-child { overflow-wrap: anywhere; }
.files li span:last-child { color: var(--muted); white-space: nowrap; }

/* description */
.desc { max-width: 780px; margin-top: 52px; line-height: 1.7; color: #e4dfd3; font-size: 16px; }
.desc h2, .desc h3 { font-family: var(--head); color: var(--text); margin: 30px 0 10px; font-size: 21px; }
.desc p { margin: 12px 0; }
.desc ul { margin: 10px 0 10px 22px; }
.desc li { margin: 5px 0; }
.desc a { color: var(--accent); }
.desc strong, .desc b { color: var(--text); }
.related { margin-top: 64px; }

/* simple pages */
.page { padding: 56px 0 80px; max-width: 760px; }
.page h1 { font-family: var(--head); font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.page h2 { font-family: var(--head); font-size: 21px; margin: 30px 0 8px; }
.page p { color: #d8d2c4; line-height: 1.7; margin: 10px 0; }
.page a { color: var(--accent); }
.muted { color: var(--muted) !important; }
.thanks .ok { color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.dl { list-style: none; margin-top: 26px; display: grid; gap: 10px; }
.dl li { display: flex; align-items: center; gap: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.dl li span { flex: 1; overflow-wrap: anywhere; font-size: 15px; }
.dl li small { color: var(--muted); white-space: nowrap; }
.dl li a.buy { color: #120a02; }
.note { margin-top: 26px; padding: 16px 18px; border: 1px dashed var(--line); border-radius: 10px; color: #d8d2c4; line-height: 1.6; font-size: 15px; }
.note a { color: var(--accent); }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0 42px; }
.foot-in { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.foot p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.foot-links { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }

@media (hover: none) { .nav { opacity: 1; } }
@media (max-width: 860px) {
  .p-grid { grid-template-columns: 1fr; gap: 22px; }
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; align-items: center; gap: 14px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(18, 16, 14, 0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .mbar div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .mbar b { font-family: var(--head); font-size: 20px; }
  .mbar span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar .buy { flex: 0 0 auto; padding: 12px 22px; }
  body:has(.mbar) .foot { padding-bottom: 96px; }
  .lightbox img { max-width: 100vw; }
  .buybox { position: static; padding: 20px; }
  .hero { padding: 44px 0 20px; }
  .top nav { gap: 16px; }
}
@media (max-width: 520px) {
  .top nav { display: none; }
  .hero h1 span { white-space: normal; }
  .tabs-bar { top: 62px; }
  .price-row { flex-wrap: wrap; }
  .price-row .buy { width: 100%; }
  .dl li { flex-wrap: wrap; }
}

/* tags + screenshots */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags a, .tags span { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: #d8d2c4; text-decoration: none; }
.tags a:hover { border-color: var(--accent); color: var(--text); }
.tags span { color: var(--muted); }
.tags b { color: var(--accent); font-weight: 600; margin-left: 3px; }
.tagcloud .tags a { font-size: 14px; padding: 8px 14px; }
.desc .shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.desc .shots img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); }

/* download page tools: download all / by format / copy link */
.dl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 6px; }
.dl-tools #dlfmts { display: contents; }
.ghost { font: 600 14px var(--body); color: var(--accent); background: transparent; border: 1px solid var(--accent); border-radius: 10px; padding: 9px 16px; cursor: pointer; transition: background 0.2s; }
.ghost:hover { background: rgba(255, 128, 0, 0.12); }
.ghost:disabled, .dl-tools .buy:disabled { opacity: 0.55; cursor: wait; }
.dl-progress { margin: 6px 0 10px; }
