:root {
  --page-bg: #dfe8f2;
  --page-bg-2: #f8fbfe;
  --panel-bg: #fffdfb;
  --panel-edge: #e8ddd1;
  --card-bg: #fffdf9;
  --card-bg-2: #fff8f1;
  --card-edge: #eadfd2;
  --text: #2f2a27;
  --muted: #857a71;
  --soft: #a99d92;
  --accent: #d9c6e7;
  --accent-deep: #a982c3;
  --success: #3e7f36;
  --success-bg: #eef8ec;
  --pending: #c79a1e;
  --pending-bg: #fff7df;
  --shadow: 0 28px 68px rgba(77, 67, 58, 0.08);
  --shadow-soft: 0 14px 30px rgba(94, 82, 69, 0.055);
  --max-width: 1260px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), transparent 24%),
    radial-gradient(circle at top right, rgba(232, 220, 244, 0.28), transparent 24%),
    linear-gradient(180deg, var(--page-bg-2) 0%, var(--page-bg) 100%);
  color: var(--text);
  font-family: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", serif;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.skip-link:focus {
  top: 16px;
}

.page-shell {
  width: min(calc(100% - 56px), var(--max-width));
  margin: 32px auto;
  background: var(--panel-bg);
  border: 1px solid var(--panel-edge);
  box-shadow: var(--shadow);
  border-radius: 34px;
  overflow: hidden;
}

.site-header {
  border-bottom: 1px solid var(--panel-edge);
  background: rgba(255, 253, 250, 0.98);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
  min-height: 82px;
  padding: 0 34px;
}

.brand,
.topnav-links a,
.lang-toggle,
.page-title,
.app-title,
.app-meta,
.status-pill,
.hero-stat-value,
.hero-stat-label {
  font-family: "Libre Baskerville", "Noto Serif TC", serif;
}

.brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: #49433e;
  letter-spacing: 0.01em;
}

.topnav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 42px;
}

.topnav-links a {
  position: relative;
  padding: 24px 0 20px;
  color: #9f9790;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.topnav-links a:first-child {
  color: #4d4742;
}

.topnav-links a:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--accent);
}

.topnav-links a:hover,
.topnav-links a:focus-visible {
  color: #4d4742;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
}

.lang-toggle {
  border: 1px solid #eadfd4;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffefc 0%, #fbf4ee 100%);
  color: #786d64;
  min-width: 92px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  color: #554f49;
  border-color: var(--accent-deep);
  transform: translateY(-1px);
}

main {
  padding: 84px 58px 76px;
}

.hero-block {
  margin-bottom: 62px;
}

.section-kicker {
  margin: 0 0 18px;
  color: #a19388;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.page-title {
  margin: 0;
  font-size: clamp(2.2rem, 4.4vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.06;
}

.title-underline {
  width: 104px;
  height: 3px;
  margin: 32px 0 34px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(217, 198, 231, 0.1) 100%);
}

.hero-text {
  max-width: 920px;
  margin: 0;
  font-size: 1.08rem;
  line-height: 2.05;
  font-weight: 500;
  color: #413b36;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
  max-width: 720px;
}

.hero-stat {
  padding: 20px 20px 18px;
  border: 1px solid var(--card-edge);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, #fffaf4 100%);
  box-shadow: var(--shadow-soft);
}

.hero-stat-value {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
}

.hero-stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.showcase-section {
  position: relative;
}

.showcase-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.section-title {
  margin: 0;
  font-family: "Libre Baskerville", "Noto Serif TC", serif;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.sort-note {
  margin: 10px 0 0;
  color: var(--soft);
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 600;
}

.showcase-controls {
  display: flex;
  gap: 10px;
}

.carousel-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--card-edge);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  border-color: var(--accent-deep);
  color: var(--accent-deep);
  transform: translateY(-1px);
}

.carousel-button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.apps-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 372px;
  gap: 24px;
  overflow-x: auto;
  padding: 10px 6px 22px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.apps-rail::-webkit-scrollbar {
  height: 10px;
}

.apps-rail::-webkit-scrollbar-thumb {
  background: rgba(188, 150, 216, 0.75);
  border-radius: 999px;
}

.app-card {
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
}

.app-card-inner {
  width: 100%;
  height: 100%;
  min-height: 596px;
  padding: 28px;
  border: 1px solid var(--card-edge);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,250,245,0.98)),
    linear-gradient(180deg, var(--card-bg) 0%, var(--card-bg-2) 100%);
  box-shadow: 0 16px 36px rgba(99, 86, 73, 0.07);
  display: grid;
  grid-template-rows: auto auto auto;
  row-gap: 18px;
  align-items: stretch;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-card-inner:hover,
.app-card-inner:focus-within {
  transform: translateY(-3px);
  border-color: rgba(169, 130, 195, 0.45);
  box-shadow: 0 22px 44px rgba(107, 95, 82, 0.1);
}

.app-card-top {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  min-height: 146px;
  margin-bottom: 0;
  padding-bottom: 2px;
}

.app-card-copy {
  min-width: 0;
  min-height: 100%;
  display: grid;
  align-content: start;
}

.app-icon {
  width: 104px;
  height: 104px;
  border-radius: 24px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 20px 36px rgba(69, 57, 45, 0.12);
}

.status-row {
  margin-bottom: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-pill[data-status="released"] {
  color: var(--success);
  background: var(--success-bg);
}

.status-pill[data-status="pending"] {
  color: #996f05;
  background: var(--pending-bg);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.app-title {
  margin: 0 0 10px;
  font-size: 1.18rem;
  line-height: 1.44;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.44em * 2);
}

.app-meta {
  margin: 0;
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.75;
  font-style: italic;
  font-weight: 700;
}

.app-description,
.app-highlight,
.app-summary {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.9;
}

.app-description,
.app-summary {
  color: #4b4540;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.9em * 5);
}

.app-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 224px;
  gap: 16px;
  align-items: end;
  padding-top: 20px;
  min-height: 104px;
  border-top: 1px solid rgba(229, 219, 209, 0.7);
}

.app-highlight {
  padding-top: 18px;
  border-top: 1px solid rgba(229, 219, 209, 0.7);
  color: #383330;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.82;
  min-height: calc(1.82em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-open-hint {
  color: #8f6fb0;
  font-family: "Libre Baskerville", "Noto Serif TC", serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.03em;
  align-self: center;
  max-width: 120px;
}

.app-chevron {
  display: none;
}

.app-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 224px;
  min-height: 64px;
  border: 1px solid #eadfd4;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffefc 0%, #fcf4ee 100%);
  color: #946fba;
  font-family: "Libre Baskerville", "Noto Serif TC", serif;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.app-button:hover,
.app-button:focus-visible {
  transform: translateY(-1px);
  color: #865db0;
  box-shadow: 0 14px 30px rgba(183, 153, 216, 0.16);
}

.app-button.is-disabled {
  color: #9d9287;
  background: #fbf7f3;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .app-card-inner,
  .app-button,
  .carousel-button,
  .lang-toggle {
    transition: none;
  }
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 18px 20px 14px;
    gap: 8px;
  }

  .topbar-actions {
    justify-content: center;
  }

  .hero-stats,
  .apps-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .topnav-links {
    gap: 0;
  }

  .topnav-links a {
    padding: 6px 0 10px;
    font-size: 0.88rem;
  }

  .topnav-links a:first-child::after {
    bottom: -2px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    justify-items: stretch;
    align-items: center;
    min-height: auto;
    padding: 14px 16px 12px;
    gap: 10px 12px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .topbar-actions {
    justify-content: flex-end;
  }

  .lang-toggle {
    min-width: 72px;
    padding: 9px 12px;
    font-size: 0.8rem;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
  }

  main {
    padding: 28px 14px 32px;
  }

  .hero-text {
    font-size: 0.97rem;
    line-height: 1.88;
  }

  .hero-block {
    margin-bottom: 28px;
  }

  .section-kicker {
    margin-bottom: 12px;
    font-size: 0.88rem;
  }

  .page-title {
    font-size: clamp(2rem, 10vw, 2.65rem);
    line-height: 1.08;
  }

  .title-underline {
    width: 68px;
    margin: 22px 0 22px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
    max-width: none;
  }

  .hero-stat {
    padding: 14px 14px 13px;
    border-radius: 16px;
  }

  .hero-stat-value {
    font-size: 1.22rem;
  }

  .hero-stat-label {
    font-size: 0.8rem;
  }

  .showcase-header {
    align-items: start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
  }

  .showcase-controls {
    display: none;
  }

  .section-title {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
  }

  .sort-note {
    margin-top: 6px;
    font-size: 0.8rem;
  }

  .brand {
    font-size: 1.14rem;
  }

  .apps-rail {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .app-card {
    scroll-snap-align: unset;
  }

  .app-card-top {
    grid-template-columns: 76px 1fr;
    gap: 12px;
    margin-bottom: 12px;
    min-height: 0;
  }

  .app-icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    box-shadow: 0 14px 26px rgba(69, 57, 45, 0.1);
  }

  .status-row {
    margin-bottom: 8px;
  }

  .status-pill {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 0.74rem;
  }

  .app-title {
    margin-bottom: 6px;
    font-size: 1rem;
    line-height: 1.38;
    min-height: calc(1.38em * 2);
    -webkit-line-clamp: 2;
  }

  .app-meta {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .app-summary {
    font-size: 0.9rem;
    line-height: 1.62;
    -webkit-line-clamp: 3;
    min-height: calc(1.62em * 3);
  }

  .app-highlight {
    padding-top: 14px;
    min-height: 0;
    font-size: 0.86rem;
    line-height: 1.64;
    -webkit-line-clamp: 2;
  }

  .app-card-inner {
    padding: 16px;
    min-height: 0;
    border-radius: 18px;
    row-gap: 14px;
  }

  .app-card-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 14px;
    min-height: 0;
  }

  .app-open-hint {
    font-size: 0.78rem;
    letter-spacing: 0.01em;
  }

  .app-button {
    width: 100%;
    min-height: 48px;
    font-size: 0.88rem;
    border-radius: 12px;
    justify-content: center;
  }

  .skip-link {
    display: none;
  }
}
