:root {
  color-scheme: light;
  --ink: #1e1b4b;
  --muted: #5b617a;
  --accent: #6d28d9;
  --accent-dark: #4c1d95;
  --accent-soft: #f5f3ff;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --paper: #ffffff;
  --page: #f8fafc;
  --line: #e2e8f0;
  --shadow: 0 12px 34px rgb(76 29 149 / 8%);
  --heading-font: "Outfit", "Segoe UI", sans-serif;
  --body-font: "DM Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.7 var(--body-font);
  letter-spacing: 0.005em;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--blue);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

button,
a {
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent-dark);
  color: #ffffff;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Shared site header and navigation */
header {
  position: sticky;
  z-index: 1000;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 13px max(20px, calc((100% - 1160px) / 2));
  border-bottom: 1px solid #ddd6fe;
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 4px 20px rgb(109 40 217 / 6%);
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.logo img {
  display: block;
  width: 42px;
  height: 42px;
  border: 1px solid #c4b5fd;
  border-radius: 9px;
  background: #1e1b4b;
  object-fit: cover;
}

.brand-title {
  color: var(--accent-dark);
  font: 800 1.2rem/1.2 var(--heading-font);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

#navMenu {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 22px);
}

#navMenu a {
  display: flex;
  min-height: 44px;
  align-items: center;
  color: #334155;
  font: 600 0.94rem/1.3 var(--heading-font);
  text-decoration: none;
}

#navMenu a:hover {
  color: var(--blue);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-dark);
  font-size: 1.7rem;
  cursor: pointer;
}

.menu-toggle:hover {
  background: var(--accent-soft);
}

/* Homepage hero and download information */
.hero,
.page-hero {
  width: 100%;
  padding: 42px 20px 38px;
  border-bottom: 1px solid #ddd6fe;
  background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 55%, #ffffff 100%);
  text-align: center;
}

.hero-logo {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  border: 2px solid var(--blue);
  border-radius: 20px;
  background: #1e1b4b;
  object-fit: cover;
  box-shadow: 0 8px 24px rgb(37 99 235 / 16%);
}

.hero h1,
.page-hero h1 {
  max-width: 900px;
  margin: 0 auto 14px;
  color: var(--accent-dark);
  font: 700 clamp(1.8rem, 4.5vw, 2.8rem)/1.14 var(--heading-font);
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.7;
}

.download-box {
  width: min(100%, 440px);
  margin: 20px auto 10px;
  padding: 22px 24px;
  border: 2px solid #c4b5fd;
  border-radius: 15px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.apk-info {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  margin-bottom: 13px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #cbd5e1;
  color: var(--muted);
  font-size: 0.82rem;
}

.apk-info div {
  min-width: 0;
  flex: 1;
  text-align: center;
  overflow-wrap: anywhere;
}

.apk-info span {
  color: var(--ink);
  font-weight: 700;
}

.download-btn,
.read-more-btn {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--accent-dark);
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  box-shadow: 0 5px 14px rgb(109 40 217 / 22%);
  color: #ffffff;
  font: 700 1rem/1.2 var(--heading-font);
  letter-spacing: 0.025em;
  text-decoration: none;
}

.download-btn:hover,
.read-more-btn:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--blue-dark));
}

.safe-text {
  margin-top: 10px;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Homepage screenshot carousel */
.home-slider {
  width: min(calc(100% - 28px), 420px);
  margin: 18px auto 22px;
}

.slider-frame {
  position: relative;
}

.slider-viewport {
  width: 100%;
  height: min(620px, 70svh);
  min-height: 300px;
  overflow: hidden;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  background: #0f172a;
  touch-action: pan-y;
}

.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}

.home-slide {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  flex: 0 0 100%;
  margin: 0;
  background: #0f172a;
}

.home-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: flex;
  width: 40px;
  height: 44px;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid #c4b5fd;
  border-radius: 9px;
  background: rgb(255 255 255 / 94%);
  color: var(--accent-dark);
  font: 700 1.8rem/1 var(--heading-font);
  cursor: pointer;
}

.slider-frame .slider-arrow:first-child {
  left: 8px;
}

.slider-frame .slider-arrow:last-child {
  right: 8px;
}

.slider-arrow:hover {
  background: var(--accent-soft);
}

.slider-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.slider-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
}

.slider-dot.is-current {
  background: var(--accent);
  box-shadow: 0 0 0 3px #ddd6fe;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

/* Home article layout */
main {
  flex: 1 0 auto;
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.toc,
.card,
.page-section {
  min-width: 0;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 6px 24px rgb(30 27 75 / 5%);
}

.toc {
  position: sticky;
  top: 88px;
  padding: 14px;
}

.toc h2 {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font: 600 0.96rem/1.35 var(--heading-font);
}

.toc ul {
  margin: 0;
  padding-left: 17px;
}

.toc li {
  margin: 0;
  padding: 0;
}

.toc a {
  display: flex;
  min-height: 40px;
  align-items: center;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover {
  color: var(--blue);
}

.content {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.card,
.page-section {
  padding: 25px 27px;
  scroll-margin-top: 90px;
}

.card h2,
.page-section h2,
.page-shell h2 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ede9fe;
  color: var(--accent-dark);
  font: 650 1.35rem/1.3 var(--heading-font);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.card h3,
.page-shell h3 {
  margin: 20px 0 6px;
  color: var(--blue-dark);
  font: 600 1.08rem/1.35 var(--heading-font);
}

.card p,
.page-shell p {
  margin: 10px 0;
  color: #334155;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.card ul,
.card ol,
.page-shell ul,
.page-shell ol {
  padding-left: 22px;
  color: #334155;
}

.card li,
.page-shell li {
  padding: 3px 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.card strong,
.page-shell strong {
  color: var(--accent-dark);
}

.notice,
.contact-note {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--blue-soft);
  color: #1e3a8a;
}

.feature-list li {
  padding: 5px 0;
}

/* Responsive information table */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  background: #ffffff;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

table.info-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: auto;
  background: #ffffff;
}

table.info-table th,
table.info-table td {
  padding: 14px 16px;
  border: 1px solid #d8dce5;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

table.info-table thead th {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

table.info-table tbody td:first-child {
  width: 34%;
  font-weight: 600;
  color: var(--accent-dark);
}

table.info-table tbody td {
  color: var(--ink);
}

table.info-table tbody tr:nth-child(even) {
  background: var(--accent-soft);
}

table.info-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

/* Inner pages and blog list */
.page-hero h1 {
  margin-bottom: 10px;
}

.page-shell {
  flex: 1 0 auto;
  width: min(100%, 1020px);
  margin: 24px auto;
  padding: 0 20px 36px;
}

.page-shell .card {
  margin: 16px 0;
  padding: 27px;
}

.detail-section {
  margin-top: 24px;
}

.guide-list {
  display: grid;
  gap: 13px;
}

.guide-link {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 17px;
  border: 1px solid #ddd6fe;
  border-radius: 11px;
  background: #ffffff;
}

.guide-link h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  font: 650 1.08rem/1.4 var(--heading-font);
}

.guide-link span {
  color: var(--muted);
  line-height: 1.5;
}

.read-more-btn {
  display: inline-flex;
  margin-top: 3px;
  padding: 9px 17px;
  border-radius: 8px;
  font-size: 0.96rem;
}

details {
  border-bottom: 1px solid #e2e8f0;
}

details summary {
  color: var(--accent-dark);
  cursor: pointer;
}

/* Footer */
footer {
  display: block;
  clear: both;
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  padding: 30px 20px;
  border-top: 1px solid #ddd6fe;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

.footer-brand {
  display: block;
  margin: 0 0 8px;
  color: var(--accent-dark);
  font: 700 1.08rem/1.3 var(--heading-font);
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 10px 0 12px;
}

.footer-nav a {
  color: #475569;
  font: 500 0.9rem/1.4 var(--heading-font);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--blue);
  text-decoration: underline;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
}

/* Mobile navigation and compact screens */
@media (max-width: 900px) {
  header {
    isolation: isolate;
    padding: 10px 18px;
  }

  .menu-toggle {
    position: relative;
    z-index: 1002;
    display: flex;
  }

  #navMenu {
    position: absolute;
    z-index: 1001;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 9px 18px 14px;
    border-bottom: 1px solid #ddd6fe;
    background: #ffffff;
    box-shadow: 0 12px 24px rgb(30 27 75 / 12%);
    overscroll-behavior: contain;
    visibility: visible;
    pointer-events: auto;
  }

  html.has-menu-js #navMenu:not(.open) {
    display: none;
  }

  html.has-menu-js #navMenu.open {
    display: flex;
  }

  #navMenu a {
    width: 100%;
    min-height: 46px;
    padding: 8px 6px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
  }

  footer {
    padding: 24px 16px;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 72px;
  }

  body {
    font-size: 15.5px;
  }

  header {
    min-height: 62px;
    padding: 8px 14px;
    gap: 10px;
  }

  .logo {
    gap: 9px;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  .brand-title {
    font-size: 1.08rem;
  }

  .menu-toggle {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border: 1px solid #ddd6fe;
    background: var(--accent-soft);
    font-size: 1.55rem;
  }

  #navMenu {
    top: calc(100% + 1px);
    max-height: calc(100svh - 64px);
    padding: 8px 14px 14px;
    border: 1px solid #ddd6fe;
    border-top: 0;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 14px 26px rgb(30 27 75 / 14%);
  }

  #navMenu a {
    min-height: 48px;
    padding: 9px 10px;
    border-bottom: 1px solid #ede9fe;
    font-size: 1rem;
  }

  #navMenu a:last-child {
    border-bottom: 0;
  }

  .hero {
    padding: 28px 16px 26px;
  }

  .hero-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  .hero h1,
  .page-hero h1 {
    max-width: 24ch;
    line-height: 1.16;
  }

  .hero p,
  .page-hero p {
    max-width: 58ch;
  }

  .download-box {
    max-width: 480px;
    margin-top: 17px;
    padding: 18px;
  }

  .apk-info {
    gap: 8px;
  }

  .home-slider {
    width: min(calc(100% - 28px), 390px);
    max-width: min(390px, calc(100vw - 24px));
  }

  .slider-viewport {
    height: min(58svh, 520px);
    max-height: 70svh;
    min-height: 280px;
  }

  main {
    padding: 20px 14px 38px;
  }

  .page-shell {
    width: min(100%, 720px);
    margin: 18px auto;
    padding: 0 14px 30px;
  }

  body,
  main,
  .page-shell,
  .layout,
  .content,
  .card,
  .page-shell .card,
  .page-section {
    max-width: 100%;
    min-width: 0;
  }

  .card,
  .page-shell .card,
  .page-section,
  .toc {
    overflow-wrap: anywhere;
  }

  .layout {
    gap: 14px;
  }

  .toc {
    padding: 12px 14px;
  }

  .toc ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
  }

  .toc a {
    min-height: 42px;
  }

  .content {
    gap: 12px;
  }

  .card,
  .page-shell .card,
  .page-section {
    padding: 20px 17px;
  }

  .card p,
  .page-shell p {
    line-height: 1.65;
  }

  .table-wrap {
    margin-inline: 0;
  }

  table.info-table th,
  table.info-table td {
    padding: 9px 10px;
  }

  footer {
    padding: 22px 14px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .hero {
    padding: 24px 13px 22px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .hero p,
  .page-hero p {
    font-size: 0.94rem;
  }

  .page-hero {
    padding: 27px 14px;
  }

  .download-box {
    padding: 15px 12px;
    border-radius: 12px;
  }

  .apk-info {
    align-items: flex-start;
    font-size: 0.72rem;
  }

  .apk-info div {
    line-height: 1.4;
  }

  .home-slider {
    width: calc(100% - 22px);
    margin: 12px auto 16px;
  }

  .slider-viewport {
    height: min(56svh, 450px);
    min-height: 245px;
    border-radius: 10px;
  }

  .slider-arrow {
    width: 36px;
    height: 40px;
  }

  main {
    padding: 16px 10px 30px;
  }

  .page-shell {
    padding: 0 10px 24px;
  }

  .toc ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc a {
    min-height: 38px;
  }

  .card,
  .page-shell .card,
  .page-section {
    padding: 17px 14px;
    border-radius: 11px;
  }

  .card h2,
  .page-shell h2,
  .page-section h2 {
    font-size: 1.16rem;
  }

  table.info-table th,
  table.info-table td {
    padding: 8px;
    font-size: 0.86rem;
  }

  .notice,
  .contact-note {
    padding: 11px 12px;
  }

  .guide-link {
    padding: 13px;
  }
}

@media (max-width: 380px) {
  .page-shell,
  main {
    padding-right: 8px;
    padding-left: 8px;
  }

  .card,
  .page-shell .card,
  .page-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .slider-arrow {
    width: 34px;
    height: 38px;
  }
}

@media (max-width: 360px) {
  .brand-title {
    font-size: 1rem;
  }

  .logo {
    gap: 8px;
  }

  .logo img {
    width: 36px;
    height: 36px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .apk-info {
    font-size: 0.67rem;
  }

  .download-box {
    padding: 13px 10px;
  }

  .slider-viewport {
    height: 48svh;
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}