/* Mobile-only layout (narrow screens). */
: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;
}

@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 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;
  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 .target {
  margin-top: 12px;
  font-size: 12px;
  color: #6b7280;
  word-break: break-all;
}
