:root {
  --surface: #ffffff;
  --line: rgba(33, 37, 41, 0.1);
  --soft: #f3f6f9;
  --ink: #1f2937;
  --public-shell-width: 900px;
  --public-shell-padding-top: 48px;
  --public-shell-padding-bottom: 72px;
}

body {
  color: var(--ink);
}

.page-bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%);
}

.page-bg > main {
  flex: 1;
}

.admin-bg {
  min-height: 100vh;
  background: #f4f7fa;
}

.admin-login-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef7fb, #ffffff 48%, #e8f0f7);
}

.site-header {
  padding: 56px 0 32px;
}

.home-hero {
  padding-top: 28px;
}

.home-page {
  min-height: 100vh;
}

.home-topbar {
  padding: 22px 0 0;
}

.home-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-bottom: 72px;
}

.language-form {
  margin: 0;
}

.language-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #5c6773;
  pointer-events: none;
  z-index: 2;
}

.language-icon circle,
.language-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-select {
  width: auto;
  min-width: 120px;
  padding-left: 36px;
  border-color: var(--line);
  border-radius: 999px;
  color: var(--ink);
  background-color: #fff;
  box-shadow: 0 8px 24px rgba(29, 53, 87, 0.06);
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 48px;
}

.brand-link {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 760;
  text-decoration: none;
}

.nav-link-quiet {
  color: #5c6773;
  font-size: .95rem;
  text-decoration: none;
}

.nav-link-quiet:hover,
.nav-link-quiet:focus {
  color: #2780e3;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.home-heading {
  max-width: 760px;
}

.home-shell,
.app-detail-shell,
.blog-detail-shell {
  max-width: var(--public-shell-width);
  padding-top: var(--public-shell-padding-top);
  padding-bottom: var(--public-shell-padding-bottom);
}

.home-content {
  width: 100%;
  margin: 0 auto;
}

.home-intro {
  display: grid;
  place-content: center;
  max-width: 760px;
  min-height: 260px;
  margin: 0 auto 34px;
  text-align: center;
}

.display-title {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: 0;
}

.home-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-content: center;
  gap: 16px;
}

.home-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  box-shadow: 0 10px 30px rgba(29, 53, 87, 0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.home-product-card:hover,
.home-product-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(39, 128, 227, 0.35);
  box-shadow: 0 14px 36px rgba(29, 53, 87, 0.1);
}

.home-product-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.home-product-main::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
}

.home-product-main:focus {
  outline: 0;
}

.home-product-main:focus-visible::after {
  outline: 3px solid rgba(39, 128, 227, 0.35);
  outline-offset: 2px;
}

.home-product-body {
  min-width: 0;
}

.home-product-summary {
  display: -webkit-box;
  margin: 8px 0 0;
  color: #5c6773;
  font-size: .94rem;
  line-height: 1.55;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.home-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.home-product-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #5c6773;
  background: var(--soft);
  font-size: .8rem;
}

.home-recent-posts {
  margin: 38px 12px;
}

.blog-detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.home-section-title {
  margin: 0 0 8px;
  color: #5c6773;
  font-size: .92rem;
  font-weight: 650;
}

.home-post-list {
  border-top: 1px solid var(--line);
}

.home-post-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.home-post-row:hover span,
.home-post-row:focus span {
  color: #2780e3;
}

.home-post-row time {
  color: #5c6773;
  font-variant-numeric: tabular-nums;
}

.home-post-row span {
  overflow-wrap: anywhere;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.app-card {
  display: flex;
  gap: 16px;
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(29, 53, 87, 0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.product-card {
  align-items: flex-start;
  min-height: 190px;
}

.app-card:hover,
.app-card:focus {
  transform: translateY(-2px);
  border-color: rgba(39, 128, 227, 0.35);
  box-shadow: 0 14px 36px rgba(29, 53, 87, 0.1);
}

.app-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2780e3;
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
}

.app-icon-lg {
  width: 68px;
  height: 68px;
  font-size: 1.7rem;
}

.app-logo {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}

.app-logo-lg {
  width: 68px;
  height: 68px;
}

.public-app-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.product-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 auto;
  justify-content: space-between;
  min-width: 0;
}

.product-title-row .display-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-download-button {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.product-page-section + .product-page-section {
  margin-top: 42px;
}

.product-basic-section {
  width: 100%;
}

.product-basic-section > .lead,
.product-basic-section > .product-detail-copy {
  max-width: 760px;
}

.availability-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  align-self: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  line-height: 1;
}

.availability-pill span {
  color: #5c6773;
  font-size: .78rem;
  line-height: 1;
}

.availability-pill strong {
  font-size: 1rem;
  line-height: 1;
}

.product-detail-copy {
  color: #374151;
  font-size: 1rem;
  line-height: 1.75;
}

.product-detail-copy p {
  margin-bottom: .75rem;
}

.request-panel,
.admin-section,
.login-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(29, 53, 87, 0.06);
}

.request-panel {
  padding: 24px;
}

.product-request-panel {
  max-width: 480px;
  margin: 0 auto;
}

.request-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.request-panel.is-disabled {
  opacity: .62;
}

.request-panel.is-disabled input,
.request-panel.is-disabled button {
  cursor: not-allowed;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 10px;
}

.captcha-image-button {
  width: 132px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.captcha-image-button img {
  display: block;
  width: 132px;
  height: 48px;
}

.captcha-placeholder {
  display: grid;
  place-items: center;
  width: 132px;
  height: 48px;
  padding: 0 10px;
  border: 1px dashed rgba(92, 103, 115, 0.32);
  border-radius: 8px;
  background: var(--soft);
  color: #6b7280;
  font-size: .82rem;
  line-height: 1.25;
  text-align: center;
}

.admin-section {
  padding: 20px;
}

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric span {
  display: block;
  color: #5c6773;
  margin-bottom: 6px;
}

.metric strong {
  font-size: 1.8rem;
  line-height: 1;
}

.code-input {
  font-family: Menlo, Consolas, monospace;
}

.rich-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.rich-toolbar .btn {
  min-height: 32px;
}

.rich-editor-surface {
  min-height: 320px;
  padding: 14px;
  outline: none;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.rich-editor-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(39, 128, 227, 0.18);
}

.rich-editor-surface:empty::before {
  content: attr(data-placeholder);
  color: #8a96a3;
}

.rich-editor-surface img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 14px 0;
}

.rich-editor-surface img.rich-image-selected {
  outline: 2px solid #2780e3;
  outline-offset: 2px;
}

.rich-image-resizer {
  position: fixed;
  z-index: 1100;
  box-sizing: border-box;
  border: 2px solid #2780e3;
  border-radius: 8px;
  pointer-events: none;
}

.rich-image-resizer.d-none {
  display: none;
}

.rich-image-resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid #2780e3;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(29, 53, 87, 0.18);
  pointer-events: auto;
}

.rich-image-resize-handle-n {
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.rich-image-resize-handle-e {
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.rich-image-resize-handle-s {
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.rich-image-resize-handle-w {
  top: 50%;
  left: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.rich-image-resize-handle-nw {
  top: -7px;
  left: -7px;
  cursor: nwse-resize;
}

.rich-image-resize-handle-ne {
  top: -7px;
  right: -7px;
  cursor: nesw-resize;
}

.rich-image-resize-handle-se {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.rich-image-resize-handle-sw {
  bottom: -7px;
  left: -7px;
  cursor: nesw-resize;
}

.rich-editor-surface h2 {
  margin: 1rem 0 .5rem;
  font-size: 1.35rem;
}

.text-pre-line {
  white-space: pre-line;
}

.admin-logo-preview {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}

.admin-cover-preview {
  width: min(100%, 320px);
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--soft);
}

.admin-feedback-description {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: inherit;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.admin-feedback-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-feedback-images img {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--soft);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.blog-card {
  display: block;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 10px 28px rgba(29, 53, 87, 0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.blog-card:hover,
.blog-card:focus {
  transform: translateY(-2px);
  border-color: rgba(39, 128, 227, 0.35);
  box-shadow: 0 14px 36px rgba(29, 53, 87, 0.1);
}

.blog-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--soft);
}

.blog-card-body {
  padding: 18px;
}

.blog-article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 10px 28px rgba(29, 53, 87, 0.06);
}

.blog-article-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.12;
}

.blog-hero-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.blog-content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.blog-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 18px 0;
}

.blog-content pre {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
  overflow-x: auto;
}

.site-footer {
  padding: 24px 0 30px;
  color: #5c6773;
  font-size: .92rem;
}

.site-footer .container {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #2780e3;
}

.support-shell {
  max-width: var(--public-shell-width);
  display: flex;
  flex-direction: column;
  padding-top: var(--public-shell-padding-top);
  padding-bottom: var(--public-shell-padding-bottom);
}

.support-nav {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.support-panel {
  width: min(100%, 560px);
  margin: auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 28px rgba(29, 53, 87, 0.06);
}

.support-panel form {
  text-align: left;
}

.empty-inline {
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: #5c6773;
  text-align: center;
}

.empty-state {
  max-width: 520px;
  padding: 32px;
  text-align: center;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 440px);
  padding: 28px;
}

@media (max-width: 767.98px) {
  .site-header {
    padding-top: 34px;
  }

  .home-topbar {
    padding-top: 16px;
  }

  .home-shell,
  .app-detail-shell,
  .blog-detail-shell,
  .support-shell {
    padding-top: 32px;
    padding-bottom: 56px;
  }

  .home-nav {
    margin-bottom: 42px;
  }

  .home-intro {
    min-height: 220px;
  }

  .home-product-grid {
    grid-template-columns: 1fr;
  }

  .home-product-card {
    padding: 18px;
  }

  .home-post-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .header-inner {
    display: block;
  }

  .public-nav {
    align-items: flex-start;
    margin-bottom: 30px;
  }

  .blog-detail-nav {
    margin-bottom: 30px;
  }

  .header-inner .btn {
    margin-top: 20px;
    width: 100%;
  }

  .app-card {
    min-height: 0;
  }

  .blog-article {
    padding: 18px;
  }

  .request-panel,
  .admin-section {
    padding: 16px;
  }

  .request-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }

  .captcha-image-button {
    width: 100%;
  }

  .captcha-image-button img {
    margin: 0 auto;
  }

  .captcha-placeholder {
    margin: 0 auto;
  }
}
