:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f5f5;
  --text: #222222;
  --muted: #777777;
  --line: #dddddd;
  --nav: #333333;
  --nav-hover: #444444;
  --accent: #337ab7;
  --accent-strong: #337ab7;
  --shadow: 0 12px 36px rgba(0, 0, 0, .10);
  --radius: 14px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101723;
  --surface: #182232;
  --surface-soft: #202d3d;
  --text: #edf3fa;
  --muted: #adb9c8;
  --line: #314050;
  --nav: #071426;
  --nav-hover: #355b84;
  --accent: #91b8dc;
  --accent-strong: #79a9d0;
  --shadow: 0 12px 36px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Zen Kaku Gothic Antique", sans-serif;
  line-height: 1.42857143;
  font-size: 15px;
  transition: background .25s, color .25s;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
button, input { font: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position: fixed; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: 68px;
  background: var(--nav);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.nav-wrap { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 1.15rem; }
.brand-mark { display:none; }
.primary-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.nav-dropdown { position:relative; }
.nav-dropdown-menu {
  position:absolute; inset-inline-start:0; top:100%; min-width:170px;
  display:none; flex-direction:column; padding:8px;
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  box-shadow:var(--shadow); z-index:70;
}
.nav-dropdown-menu a { padding:9px 10px; border-radius:7px; text-decoration:none; color:var(--text); }
.nav-dropdown-menu a:hover { background:var(--surface-soft); color:var(--accent-strong); }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown.open .nav-dropdown-menu { display:flex; }
.nav-dropdown:hover .nav-dropdown-trigger, .nav-dropdown.open .nav-dropdown-trigger { color:#fff; background:rgba(255,255,255,.08); }
.nav-link { text-decoration: none; padding: 22px 12px; color: rgba(255,255,255,.82); transition: .2s; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.08); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-button, .language-button {
  border: 0; color: inherit; background: transparent; cursor: pointer;
}
.icon-button { display:grid; place-items:center; width:40px; height:40px; border-radius:8px; }
.icon-button:hover { background: rgba(255,255,255,.09); }
.theme-icon { width:20px; fill:currentColor; }
.language-picker { position: relative; }
.language-button { display:flex; align-items:center; gap:7px; height:40px; padding:0 8px; border-radius:8px; }
.language-button:hover, .language-button[aria-expanded="true"] { background: rgba(255,255,255,.09); }
.language-button svg { width:18px; fill:currentColor; }
.language-button span { font-size:.78rem; font-weight:700; }
.language-menu {
  position:absolute; inset-inline-end:0; top:48px; width:min(300px, calc(100vw - 32px));
  background:var(--surface); color:var(--text); border:1px solid var(--line);
  border-radius:12px; box-shadow:var(--shadow); padding:10px; z-index:60;
}
.language-menu input {
  width:100%; border:1px solid var(--line); background:var(--surface-soft); color:var(--text);
  border-radius:8px; padding:10px 12px; outline:none;
}
.language-menu input:focus { border-color:var(--accent-strong); }
.language-options { max-height:320px; overflow-y:auto; margin-top:8px; }
.language-option {
  width:100%; border:0; background:transparent; color:var(--text); text-align:start;
  display:flex; justify-content:space-between; align-items:center; padding:9px 10px; border-radius:7px; cursor:pointer;
}
.language-option:hover, .language-option.selected { background:var(--surface-soft); }
.language-option code { color:var(--muted); font-size:.78rem; }
.nav-toggle { display:none; border:0; background:transparent; margin-inline-start:auto; width:42px; height:42px; padding:10px; }
.nav-toggle span:not(.sr-only) { display:block; height:2px; background:#fff; margin:5px 0; }

.hero { min-height: 420px; display:flex; align-items:center; background:var(--surface); border-bottom:1px solid var(--line); }
.hero-grid { display:grid; grid-template-columns:1fr; align-items:center; gap:24px; padding-block:56px; text-align:center; }
.hero-copy { max-width:660px; margin-inline:auto; }
.eyebrow { display:block; color:var(--accent-strong); text-transform:uppercase; letter-spacing:.12em; font-size:.76rem; font-weight:700; margin-bottom:8px; }
h1, h2, h3, p { margin-top:0; }
h1 { font-size:clamp(2.1rem, 8vw, 4.3rem); line-height:1.05; letter-spacing:-.045em; margin-bottom:18px; }
h2 { font-size:clamp(1.8rem, 5vw, 2.7rem); line-height:1.15; letter-spacing:-.03em; }
.hero-copy p { max-width:560px; color:var(--muted); font-size:1.1rem; }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 18px; border-radius:8px; text-decoration:none; font-weight:700; }
.button.primary { background:var(--nav); color:#fff; }
.button.primary:hover { background:var(--nav-hover); }
.hero-art { display:none; position:relative; min-height:320px; }
.orb { position:absolute; border-radius:50%; filter:blur(.2px); }
.orb-one { width:260px; height:260px; inset-inline-end:10px; top:20px; background:linear-gradient(135deg,#d8e5f1,#91b3d2); opacity:.65; }
.orb-two { width:130px; height:130px; inset-inline-end:220px; bottom:10px; background:linear-gradient(135deg,#f1f5fa,#7fa1c2); opacity:.8; }
.app-window { position:absolute; inset-inline-end:50px; top:76px; width:300px; height:190px; border-radius:14px; background:rgba(255,255,255,.88); box-shadow:0 24px 60px rgba(38,65,94,.18); transform:rotate(-3deg); overflow:hidden; }
.window-bar { height:34px; background:#edf2f6; display:flex; align-items:center; gap:6px; padding-inline:12px; }
.window-bar i { width:7px; height:7px; border-radius:50%; background:#aeb9c5; }
.window-content { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; padding:24px; }
.window-content span { height:105px; border-radius:9px; background:linear-gradient(160deg,#b9cede,#eef3f7); }

.section { padding-block:64px; }
.section-heading {
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  gap:8px;
  margin-bottom:28px;
}
.section-heading h2 { margin-bottom:0; }
.app-count { color:var(--muted); font-size:.9rem; }
.apps-grid { display:grid; grid-template-columns:1fr; gap:18px; }
.app-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:20px; box-shadow:0 2px 12px rgba(40,55,75,.04); transition:.22s; text-align:center; }
.app-card-head { justify-content:center; }
.download-list { justify-content:center; }
.privacy-link { margin-inline:auto; }
.app-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.app-card-head { display:flex; gap:14px; align-items:center; margin-bottom:14px; }
.app-icon { flex:0 0 auto; width:58px; height:58px; display:grid; place-items:center; border-radius:15px; background:linear-gradient(145deg,var(--nav-hover),var(--accent)); color:#fff; font-weight:800; letter-spacing:.04em; box-shadow:inset 0 0 0 1px rgba(255,255,255,.16); }
.app-icon-image { display:block; object-fit:cover; background:var(--surface); }
.card-download { width:100%; margin-top:16px; }
.downloads-block { margin-top:24px; scroll-margin-top:88px; }
.downloads-block h2 { font-size:1.2rem; margin-bottom:10px; }
.app-card h3 { margin:0 0 2px; font-size:1.22rem; }
.app-title-link { color:var(--text); text-decoration:none; }
.app-title-link:hover { color:var(--accent-strong); }
.app-platform { color:var(--muted); font-size:.85rem; }
.app-description { min-height:52px; color:var(--muted); font-size:.92rem; }
.app-meta { display:flex; gap:14px; flex-wrap:wrap; padding:12px 0; border-block:1px solid var(--line); color:var(--muted); font-size:.82rem; }
.app-meta strong { color:var(--text); }
.download-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.download-button { display:inline-flex; align-items:center; gap:7px; min-height:38px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; text-decoration:none; font-size:.82rem; font-weight:700; background:var(--surface-soft); }
.download-button:hover { border-color:var(--accent-strong); color:var(--accent-strong); }
.download-button svg { width:16px; height:16px; fill:currentColor; }
.privacy-link { display:inline-block; margin-top:14px; color:var(--accent-strong); font-size:.82rem; }

.about-section { background:var(--nav); color:#fff; }
.about-section .eyebrow { color:var(--accent); }
.about-grid { display:grid; gap:18px; }
.about-grid p { color:rgba(255,255,255,.76); max-width:670px; }
.contacts-section { background:var(--surface); }
.contact-links { display:flex; gap:12px; flex-wrap:wrap; }
.contact-links a { padding:10px 14px; border:1px solid var(--line); border-radius:8px; text-decoration:none; }
.contact-links a:hover { border-color:var(--accent-strong); }
.site-footer { background:var(--surface-soft); border-top:1px solid var(--line); padding-block:28px; }
.footer-grid { display:grid; gap:18px; text-align:center; }
.footer-grid p { color:var(--muted); margin:4px 0 0; }
.footer-links { display:flex; flex-direction:column; gap:6px; }
.policy-links { display:flex; flex-direction:column; gap:6px; }
.footer-links a { color:var(--muted); text-decoration:none; font-size:.88rem; }
.footer-links a:hover { color:var(--text); }
.copyright { align-self:end; font-size:.82rem; }
.copyright a { color:var(--muted); text-decoration:none; }

.policy-dialog { width:min(680px, calc(100% - 32px)); max-height:min(720px, calc(100vh - 32px)); border:1px solid var(--line); border-radius:14px; padding:0; background:var(--surface); color:var(--text); box-shadow:var(--shadow); }
.policy-dialog::backdrop { background:rgba(7,20,38,.62); backdrop-filter:blur(3px); }
.dialog-head { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); padding:14px 18px; }
.dialog-head h2 { margin:0; font-size:1.25rem; }
.dialog-head .icon-button { color:var(--text); font-size:1.7rem; }
.dialog-content { padding:20px; color:var(--muted); }
.dialog-content p:last-child { margin-bottom:0; }

.detail-hero { background:var(--surface); border-bottom:1px solid var(--line); }
.detail-grid { min-height:390px; display:grid; align-items:start; gap:28px; padding-block:48px; }
.app-detail-top { padding-top:32px; }
.detail-main { display:grid; grid-template-columns:64px 1fr; gap:16px; align-items:center; }
.detail-main .app-icon { width:64px; height:64px; }
.detail-main h1 { margin:0 0 4px; font-size:clamp(2rem, 8vw, 3.5rem); }
.detail-description { color:var(--muted); font-size:1.05rem; white-space:pre-line; text-align:start; }
.detail-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
.detail-main { text-align:start; }
.detail-grid > div:first-child { text-align:start; }
.detail-actions { justify-content:flex-start; }
.detail-actions .download-button { min-height:46px; padding:10px 14px; }
.detail-placeholder { border:1px solid var(--line); background:var(--surface-soft); border-radius:var(--radius); padding:20px; color:var(--muted); }
.screenshots { display:grid; grid-template-columns:1fr; gap:12px; min-width:0; }
.screenshots button { display:block; width:100%; border:0; padding:0; background:transparent; cursor:zoom-in; }
.screenshots img { width:100%; height:220px; aspect-ratio:auto; object-fit:contain; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); transition:transform .2s, box-shadow .2s; }
.screenshots button:hover img { transform:translateY(-2px); box-shadow:var(--shadow); }
.lightbox { width:min(1100px, calc(100% - 24px)); max-height:calc(100vh - 24px); border:0; padding:0; background:rgba(7,20,38,.96); border-radius:12px; color:#fff; overflow:hidden; }
.lightbox::backdrop { background:rgba(7,20,38,.86); }
.lightbox-content { position:relative; display:grid; place-items:center; min-height:min(720px, calc(100vh - 24px)); padding:52px 64px 24px; }
.lightbox img { max-width:100%; max-height:calc(100vh - 100px); object-fit:contain; }
.lightbox-close, .lightbox-prev, .lightbox-next { position:absolute; z-index:2; border:0; color:#fff; background:rgba(255,255,255,.12); cursor:pointer; }
.lightbox-close { inset-inline-end:12px; top:12px; width:40px; height:40px; border-radius:50%; font-size:24px; }
.lightbox-prev, .lightbox-next { top:50%; width:44px; height:44px; border-radius:50%; transform:translateY(-50%); font-size:24px; }
.lightbox-prev { inset-inline-start:12px; }
.lightbox-next { inset-inline-end:12px; }
.detail-grid-columns { display:grid; gap:28px; }
.download-center { width:100%; margin-top:18px; }
.platform-tabs {
  display:flex; gap:6px; overflow-x:auto; padding:5px;
  border:1px solid var(--line); border-radius:12px;
  background:var(--surface-soft); scrollbar-width:none;
}
.platform-tabs::-webkit-scrollbar { display:none; }
.platform-tab {
  flex:1 0 auto; min-width:88px; min-height:52px;
  display:flex; align-items:center; justify-content:center; gap:8px;
  border:0; border-radius:8px; background:transparent; color:var(--muted);
  cursor:pointer; font-weight:700; transition:.18s ease;
}
.platform-tab svg { width:18px; height:18px; fill:currentColor; }
.platform-tab:hover { color:var(--text); background:rgba(127,127,127,.08); }
.platform-tab.active { color:var(--text); background:var(--surface); box-shadow:0 1px 5px rgba(0,0,0,.09); }
.platform-panel { padding-top:14px; }
.platform-panel[hidden] { display:none; }
.download-zone {
  border:1px solid var(--line); border-radius:12px;
  background:var(--surface); padding:16px; margin-top:10px;
}
.download-zone-heading { display:flex; align-items:flex-start; gap:12px; margin-bottom:14px; }
.download-zone-heading h3 { margin:0 0 2px; font-size:1rem; }
.download-zone-heading p { margin:0; color:var(--muted); font-size:.82rem; }
.zone-index {
  display:grid; place-items:center; flex:0 0 34px; height:34px;
  border-radius:8px; background:var(--surface-soft); color:var(--muted);
  font-size:.72rem; font-weight:800;
}
.store-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.store-button {
  min-height:58px; display:grid; grid-template-columns:24px minmax(0,1fr) auto;
  align-items:center; gap:9px; width:100%; padding:9px 11px;
  border:1px solid var(--line); border-radius:9px; background:var(--surface-soft);
  color:var(--text); text-decoration:none; text-align:start; font-weight:700;
  transition:.18s ease;
}
button.store-button { font:inherit; cursor:pointer; }
.store-button:not(.unavailable):hover {
  transform:translateY(-2px); border-color:var(--accent-strong);
  box-shadow:0 8px 20px rgba(40,55,75,.08);
}
.store-button span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.store-button small { color:var(--accent-strong); font-size:.68rem; }
.store-svg { width:22px; height:22px; fill:currentColor; }
.store-button.unavailable {
  opacity:.48; cursor:not-allowed; filter:saturate(.4);
}
.store-button.unavailable small { color:var(--muted); text-align:end; }
.github-zone { background:linear-gradient(135deg,var(--surface),var(--surface-soft)); }
.github-download {
  min-height:76px; display:grid; grid-template-columns:38px minmax(0,1fr) 28px;
  align-items:center; gap:12px; width:100%; padding:12px 14px;
  border:1px solid var(--line); border-radius:10px; background:var(--surface);
  color:var(--text); text-decoration:none; transition:.18s ease;
}
.github-download-list { display:grid; gap:8px; }
button.github-download { font:inherit; cursor:pointer; text-align:start; }
.github-download:not(.unavailable):hover {
  transform:translateY(-2px); border-color:var(--accent-strong);
  box-shadow:0 10px 24px rgba(40,55,75,.10);
}
.github-icon { width:36px; height:36px; fill:currentColor; }
.github-copy { display:flex; flex-direction:column; min-width:0; }
.github-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.github-copy small { color:var(--muted); margin-top:2px; }
.github-arrow { display:grid; place-items:center; width:28px; height:28px; border-radius:7px; background:var(--surface-soft); }
.github-download.unavailable { opacity:.48; cursor:not-allowed; filter:saturate(.4); }
.policy-page { max-width:760px; padding-block:64px; text-align:left; }
.policy-page h1 { font-size:clamp(2rem, 8vw, 3.2rem); text-align:center; margin-bottom:20px; }
.policy-page .effective-date { text-align:center; margin-bottom:24px; }
.policy-page section { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:20px; margin-bottom:16px; }
.policy-page section h2 { font-size:1.15rem; margin-bottom:12px; }
.policy-page p { color:var(--muted); }
.policy-page ul { margin:8px 0 0; padding-inline-start:24px; color:var(--muted); }
.policy-page li { margin-bottom:8px; }
.policy-page li:last-child { margin-bottom:0; }

@media (min-width: 720px) {
  .detail-grid { grid-template-columns:1fr; }
  .detail-grid > div:first-child { width:min(760px, 100%); margin-inline:auto; }
  .detail-grid-columns { grid-template-columns:1fr 1fr; }
  .screenshots { grid-template-columns:repeat(3, minmax(0,1fr)); }
  .app-detail-top { padding-top:48px; }
}

[dir="rtl"] .language-option { text-align:start; }

@media (max-width: 719px) {
  .app-detail-top { padding-top:20px; }
  .platform-tab { min-width:82px; }
  .platform-tab span { font-size:.78rem; }
  .store-grid { grid-template-columns:1fr; }
  .download-zone { padding:12px; }
  .store-button { min-height:54px; }
  .screenshots {
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:minmax(82%, 82%);
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    overscroll-behavior-inline:contain;
  }
  .screenshots button { scroll-snap-align:center; }
  .screenshots img { height:190px; }
  .lightbox-content { padding:48px 44px 18px; }
  .lightbox-prev, .lightbox-next { width:38px; height:38px; }
}

@media (min-width: 720px) {
  .container { width:min(1120px, calc(100% - 48px)); }
  .hero-grid { grid-template-columns:1.12fr .88fr; }
  .hero-art { display:block; }
  .apps-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .about-grid { grid-template-columns:.7fr 1.3fr; align-items:start; }
  .footer-grid { grid-template-columns:1fr 1fr auto; align-items:start; }
}

@media (min-width: 1040px) {
  .apps-grid { grid-template-columns:repeat(3, minmax(0,1fr)); }
}

@media (max-width: 719px) {
  .nav-toggle { display:block; }
  .primary-nav {
    position:absolute; inset-inline:16px; top:76px; display:none; flex-direction:column; align-items:stretch;
    background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:12px; padding:8px; box-shadow:var(--shadow);
  }
  .primary-nav.open { display:flex; }
  .nav-link { color:var(--text); border-radius:7px; padding:12px; }
  .nav-link:hover, .nav-link.active { background:var(--surface-soft); color:var(--text); }
  .nav-dropdown { width:100%; }
  .nav-dropdown-menu { position:static; width:100%; min-width:0; margin:2px 0 6px; box-shadow:none; }
  .nav-dropdown.open .nav-dropdown-menu { display:flex; }
  .brand { margin-inline-end:auto; }
  .header-actions { gap:0; }
  .language-button { justify-content:center; min-width:40px; padding:0 6px; }
  .language-button svg { display:none; }
  .language-button span { display:inline; }
}
