:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --paper: #ffffff;
  --ink: #192638;
  --muted: #647387;
  --border: #e4e9ef;
  --blue: #305fce;
  --blue-strong: #224cae;
  --blue-pale: #eaf1ff;
  --shadow: 0 6px 24px rgba(23, 44, 81, .055);
  --radius: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-width: 320px; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Arial, sans-serif;
  line-height: 1.55; font-size: 15px; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-strong); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(48, 95, 206, .65); outline-offset: 3px;
}
button { font: inherit; cursor: pointer; }
img { max-width: 100%; }
.container { width: min(100% - 32px, 1060px); margin-inline: auto; }
.skip-link { position: absolute; left: 10px; top: -80px; background: #fff; padding: 12px 16px; z-index: 200; }
.skip-link:focus { top: 10px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 17px; letter-spacing: -.025em; line-height: 1.35; }
.brand-text small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; background: #e9f0ff; border-radius: 12px; padding: 8px; transform: rotate(-4deg); }
.brand-mark span { background: #426cda; border-radius: 3px; }
.brand-mark span:nth-child(2) { background: #90b2fa; }
.brand-mark span:nth-child(3) { background: #5f86e9; }
.brand-mark span:nth-child(4) { background: #bacdff; }
.language-switch { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--border); background: #f3f6fa; border-radius: 10px; padding: 3px; gap: 2px; }
.language-link { display: inline-flex; justify-content: center; align-items: center; min-width: 43px; min-height: 34px; padding: 5px 8px; font-size: 12px; font-weight: 800; letter-spacing: .04em; border-radius: 7px; color: var(--muted); }
.language-link.is-current { background: var(--paper); box-shadow: 0 1px 5px #b5c4db55; color: var(--blue); }
.main-content { min-height: 62vh; padding-block: 38px 74px; }
.catalog-intro { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 27px; }
.eyebrow { color: var(--blue); font-weight: 800; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 6px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(27px, 4.6vw, 37px); line-height: 1.17; letter-spacing: -.04em; margin-bottom: 10px; }
.intro-text { color: var(--muted); font-size: 15px; max-width: 680px; margin-bottom: 0; }
.catalog-count { white-space: nowrap; background: #ecf2fc; color: #45628d; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 6px 12px; }
.filters { display: flex; align-items: center; gap: 8px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 3px 2px 14px; margin: 0 0 17px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.filter-chip { display: inline-flex; justify-content: center; white-space: nowrap; align-items: center; min-height: 37px; padding: 7px 15px; border: 1px solid var(--border); border-radius: 99px; font-size: 13px; font-weight: 650; background: var(--paper); color: #566a80; transition: color .15s, border-color .15s, background .15s; }
.filter-chip:hover { border-color: #aebee7; color: var(--blue); }
.filter-chip.is-active { color: #fff; background: var(--blue); border-color: var(--blue); }
.project-list { display: flex; flex-direction: column; gap: 18px; }
.project-card { min-width: 0; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow); }
.card-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.project-icon { background: #eff3fc; width: 60px; height: 60px; border-radius: 14px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--blue); font-size: 32px; }
.project-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.heading-copy { min-width: 0; flex: 1; }
.heading-copy h2 { font-size: clamp(19px, 3vw, 23px); font-weight: 750; letter-spacing: -.03em; margin: 0 0 3px; line-height: 1.24; }
.heading-copy h2 a { color: var(--ink); }
.heading-copy h2 a:hover { color: var(--blue); }
.subtitle { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.details-top { align-self: start; color: var(--muted); font-size: 22px; padding: 1px 8px; border-radius: 7px; }
.details-top:hover { background: var(--blue-pale); }
.card-body { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); column-gap: 26px; min-width: 0; }
.card-body.no-screenshots { display: block; }
.card-gallery, .card-copy { min-width: 0; }
.card-copy { display: flex; flex-direction: column; align-items: start; }
.description { color: #425268; font-size: 14px; line-height: 1.72; overflow-wrap: anywhere; white-space: normal; margin: -3px 0 18px; }
.metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 21px; }
.tag { font-size: 11px; line-height: 1.4; border-radius: 6px; padding: 5px 9px; font-weight: 700; }
.tag-genre { background: #ecf2ff; color: #3559a0; }
.tag-platform { background: #f0f3f6; color: #6b7786; }
.store-links { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: auto; }
.store-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 37px; padding: 7px 12px; background: #f8faff; border: 1px solid #d9e3f4; border-radius: 9px; font-size: 12px; font-weight: 750; color: #254a9c; }
.store-link:hover { background: var(--blue-pale); border-color: #a0b8ee; }
.more-link { font-size: 12px; font-weight: 750; margin-top: 17px; }
.more-link span { font-size: 16px; margin-left: 3px; }
.gallery { position: relative; min-width: 0; }
.gallery-track { display: flex; align-items: stretch; gap: 9px; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #c7d4e7 transparent; padding-bottom: 5px; border-radius: 10px; -webkit-overflow-scrolling: touch; }
.gallery-item { flex: 0 0 auto; height: 232px; max-width: 100%; min-width: 125px; display: flex; align-items: center; justify-content: center; overflow: hidden; scroll-snap-align: start; border-radius: 10px; border: 1px solid #e5eaf3; background: #f0f3f8; cursor: zoom-in; }
.gallery-item img { display: block; width: auto; height: 100%; max-width: 100%; object-fit: contain; }
.gallery-item:hover { border-color: #9cb5ef; }
.gallery-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 9px; }
.gallery-controls button { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--border); background: #fff; border-radius: 8px; color: #475c79; }
.gallery-controls button:hover:not(:disabled) { border-color: #9cb5ef; color: var(--blue); }
.gallery-controls button:disabled { opacity: .32; cursor: default; }
.gallery-index { font-size: 11px; font-weight: 750; color: var(--muted); font-variant-numeric: tabular-nums; }
.image-fallback { display: flex; flex-direction: column; gap: 6px; justify-content: center; align-items: center; min-height: 180px; border: 1px dashed #cad5e5; border-radius: 12px; background: #f8fafd; color: var(--muted); font-size: 12px; }
.image-fallback span:first-child { font-size: 38px; }
.empty-state { margin-top: 18px; background: #fff; border: 1px dashed var(--border); padding: 52px 20px; text-align: center; border-radius: var(--radius); color: var(--muted); }
.empty-state p { margin: 8px 0 0; }
.empty-icon { font-size: 40px; color: #a4b8d9; }
.site-footer { background: var(--paper); border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 26px; }
.footer-identity { display: flex; flex-direction: column; gap: 3px; }
.footer-identity strong { font-size: 13px; }
.footer-identity small { font-size: 12px; color: var(--muted); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; font-weight: 650; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 30px; }
.detail-intro { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.detail-icon { width: 84px; height: 84px; border-radius: 19px; font-size: 43px; }
.detail-intro h1 { margin-bottom: 6px; }
.detail-subtitle { margin: 0; color: var(--muted); font-size: 16px; }
.detail-content { display: grid; gap: 18px; }
.detail-section { min-width: 0; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 29px; box-shadow: var(--shadow); }
.detail-section h2 { font-size: 19px; letter-spacing: -.02em; margin-bottom: 16px; }
.detail-description { font-size: 15px; line-height: 1.85; max-width: 770px; color: #415166; white-space: normal; overflow-wrap: anywhere; }
.detail-section .metadata { margin-top: 19px; }
.detail-section .store-links { margin-top: 12px; }
.detail-gallery .gallery-track { justify-content: flex-start; gap: 13px; }
.detail-gallery .gallery-item { height: 410px; }
.detail-gallery .gallery-controls { justify-content: flex-end; }
.error-page { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.error-page h1 { margin-bottom: 8px; }
.error-page p:not(.error-number) { color: var(--muted); }
.error-number { font-size: 72px; color: #bbcbea; font-weight: 800; line-height: 1; margin-bottom: 18px; }
.primary-link { display: inline-flex; background: var(--blue); color: #fff; padding: 11px 17px; border-radius: 9px; font-weight: 700; margin-top: 20px; }
.primary-link:hover { color: #fff; background: var(--blue-strong); }
.image-viewer { position: fixed; inset: 0; width: min(96vw, 1250px); max-width: none; max-height: 94dvh; padding: 0; border: 0; border-radius: 15px; overflow: hidden; color: #fff; background: #121a28; box-shadow: 0 30px 80px #0007; }
.image-viewer::backdrop { background: rgba(6, 13, 24, .86); }
.viewer-layout { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; justify-items: center; width: 100%; height: min(88dvh, 850px); padding: 45px 8px 34px; }
.viewer-layout img { grid-column: 2; grid-row: 1; display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-close { position: absolute; top: 9px; right: 13px; border: 0; border-radius: 8px; width: 39px; height: 39px; background: #ffffff1c; color: #fff; font-size: 28px; line-height: 1; }
.viewer-arrow { z-index: 1; background: #ffffff18; color: #fff; border: 0; border-radius: 9px; width: 40px; height: 55px; font-size: 38px; line-height: 1; }
.viewer-arrow:hover, .viewer-close:hover { background: #ffffff33; }
.viewer-previous { grid-column: 1; grid-row: 1; }
.viewer-next { grid-column: 3; grid-row: 1; }
.viewer-counter { position: absolute; bottom: 10px; color: #c7cedb; font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .container { width: min(100% - 26px, 1060px); }
  .header-inner { padding-block: 13px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text strong { font-size: 15px; }
  .brand-text small { max-width: 34ch; font-size: 11px; }
  .main-content { padding-block: 27px 54px; }
  .catalog-intro { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 20px; }
  .catalog-count { display: none; }
  .project-card { padding: 18px; }
  .card-body { grid-template-columns: 1fr; row-gap: 20px; }
  .card-heading { margin-bottom: 17px; }
  .gallery-item { height: 250px; }
  .description { margin-top: 0; }
  .detail-section { padding: 22px; }
  .detail-gallery .gallery-item { height: min(60dvh, 430px); }
  .footer-inner { align-items: start; flex-direction: column; }
}
@media (max-width: 420px) {
  .brand-text small { max-width: 23ch; line-height: 1.25; }
  .brand { gap: 8px; }
  .language-link { min-width: 34px; min-height: 32px; padding-inline: 5px; }
  .project-card { padding: 15px; }
  .project-icon { width: 51px; height: 51px; border-radius: 11px; }
  .gallery-item { height: 225px; }
  .detail-icon { width: 67px; height: 67px; }
  .detail-intro { gap: 13px; }
  .detail-section { padding: 16px; }
  .viewer-layout { grid-template-columns: 36px minmax(0, 1fr) 36px; padding-inline: 4px; }
  .viewer-arrow { width: 34px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
