/* Mobile-only layout (narrow screens). */
html.locale-en .lng-zh,
html.locale-zh .lng-en {
  display: none !important;
}

:root {
  color-scheme: light only;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f6fb;
  color: #1e1e2d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 8px 32px;
}

.shell {
  width: min(540px, 100%);
  background: #ffffff;
  border-radius: 24px;
  padding: 12px;
  box-shadow: 0 16px 48px rgba(33, 33, 61, 0.08);
}

h1 {
  margin: 0 0 8px;
  font-size: 22px;
  text-align: center;
}

p.lead {
  margin: 0 0 16px;
  text-align: center;
  color: #62627b;
  font-size: 15px;
  line-height: 1.5;
}

.remote-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: #f5f6fb;
  border: 1px solid rgba(30, 94, 221, 0.2);
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

.remote-card__info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.remote-card__info > div:last-child {
  min-width: 0;
}

.remote-card__info strong,
.remote-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  border: 1px solid rgba(74, 141, 255, 0.8);
  background: linear-gradient(135deg, rgba(74, 141, 255, 0.15), rgba(30, 94, 221, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.remote-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remote-subtitle {
  font-size: 12px;
  color: #7a7a94;
  margin-top: 2px;
}

.remote-card__actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.remote-card__actions a {
  flex: 0 0 auto;
  padding: 10px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  color: #1e1e2d;
  background: #ffffff;
  border: 1px solid rgba(30, 94, 221, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.remote-card__actions a:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(30, 94, 221, 0.18);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #1e5edd;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.back-link::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #1e5edd
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E")
    center / 16px 16px no-repeat;
}

.platform-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.platform-row a {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: #1e1e2d;
  border: 1px solid rgba(30, 94, 221, 0.2);
  background: #f8f9ff;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.platform-row a:active {
  transform: translateY(-1px);
  border-color: #1e5edd;
}

.platform-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 14px;
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8f9ff 0%, #f2f5ff 100%);
  border: 1px solid rgba(30, 94, 221, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.platform-tab {
  border: 1px solid rgba(30, 94, 221, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: #33415f;
  border-radius: 14px;
  padding: 10px 6px 9px;
  min-height: 58px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  opacity: 0.9;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.platform-tab__title {
  font-size: 14px;
  font-weight: 700;
}

.platform-tab__desc {
  font-size: 11px;
  color: #7282a4;
  font-weight: 500;
}

.platform-tab.is-active {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  color: #1a315f;
  border-color: rgba(30, 94, 221, 0.45);
  box-shadow: 0 8px 18px rgba(30, 94, 221, 0.16);
  opacity: 1;
  transform: translateY(-2px);
  position: relative;
  z-index: 1;
}

.platform-tab.is-active .platform-tab__desc {
  color: #1e5edd;
}

.platform-tab.is-active::after {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f89ff 0%, #1e5edd 100%);
  pointer-events: none;
}

.platform-tab.is-inactive {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(30, 94, 221, 0.1);
}

.platform-tab.is-inactive .platform-tab__desc {
  color: #8e9ab3;
}

.platform-tab:active {
  transform: translateY(-1px);
}

.platform-panel[hidden] {
  display: none;
}

@media (max-width: 360px) {
  body {
    padding: 12px 6px 28px;
  }

  .shell {
    border-radius: 18px;
    padding: 10px;
  }
}

/* wechat.html */
body.wechat-page {
  align-items: center;
  padding: 24px 16px;
  background: #ffffff;
}

.wechat-page .card {
  width: min(520px, 100%);
  background: #f7f8fb;
  border: 1px solid #e5e7ef;
  border-radius: 18px;
  padding: 22px 18px;
}

.wechat-page h1 {
  text-align: left;
  font-size: 20px;
}

.wechat-page .browser-icons {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wechat-page .browser-icon-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.wechat-page .browser-icon-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.wechat-page p {
  margin: 0;
  line-height: 1.6;
  color: #374151;
}

.wechat-page .hint {
  margin-top: 14px;
  font-size: 14px;
  color: #6b7280;
}

.wechat-page .en {
  margin-top: 10px;
  font-size: 14px;
  color: #4b5563;
}

.wechat-page .actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wechat-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid #2f6fed;
  background: rgba(47, 111, 237, 0.12);
  color: #0b1020;
  font: inherit;
  cursor: pointer;
}

.wechat-page .btn.secondary {
  border-color: #d1d5db;
  background: #ffffff;
  font-weight: 600;
}

.wechat-page .copy-link {
  width: 100%;
}

.wechat-page .copy-status {
  margin-top: 10px;
  min-height: 22px;
  font-size: 14px;
  color: #1f4db6;
  font-weight: 600;
}

.wechat-page .target {
  margin-top: 12px;
  font-size: 12px;
  color: #6b7280;
  word-break: break-all;
}
