/* Same 1608 × 3496 artboard and proportions as the native Mini Program.
   Container units keep the artwork aligned on phones and desktop previews. */
body[data-mode="mobile"] { background: #07172e; }
.mobile-view {
  container-type: inline-size;
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0;
  background: #245b9f;
  overflow: hidden;
}
.mobile-view::before { content: none; }
.mobile-art-canvas { position: relative; min-height: max(100dvh, 217.47cqw); padding-bottom: env(safe-area-inset-bottom); }
.mobile-art-background { position: absolute; inset: 0 auto auto 0; width: 100%; height: auto; pointer-events: none; }
.mobile-art-logo { position: absolute; top: 8.67cqw; left: 5.6cqw; width: 25.47cqw; height: 10cqw; object-fit: contain; }
.mobile-intro-art, .mobile-success-title { position: absolute; top: 78.93cqw; left: 0; width: 100%; height: auto; }
.mobile-view .wish-form { position: static; }
.mobile-view .wish-editor { position: absolute; top: 122.93cqw; left: 5.87cqw; width: 88.27cqw; height: 40cqw; display: block; }
.mobile-input-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mobile-view .wish-editor textarea {
  position: relative; width: 100%; height: 100%; min-height: 0; padding: 3.73cqw;
  color: #f2faff; font: 500 max(16px, 3.73cqw)/1.6 "PingFang SC", "Microsoft YaHei", sans-serif;
  background: transparent; border: 0; border-radius: 1.6cqw; box-shadow: none;
}
.mobile-view .wish-editor textarea::placeholder { color: #b7d5f6; }
.mobile-view .wish-editor textarea:focus-visible { outline: 2px solid #d7efff; outline-offset: 2px; }
.mobile-view .wish-tools { position: absolute; top: 164cqw; left: 5.87cqw; width: 88.27cqw; margin: 0; }
.mobile-view .random-phrase-button {
  min-width: 24.27cqw; min-height: 44px; padding: 0 2.93cqw; border: 1px solid #afd6ff;
  color: #fff9c4; font-size: max(14px, 3.73cqw); font-weight: 600;
  background: linear-gradient(180deg, #9fbee0, #466d9d 55%, #82b0df); box-shadow: inset 0 0 1.6cqw #c2e6ff;
}
.mobile-view .wish-tools small, .mobile-view .wish-tools small b { color: #fff9cf; font-size: max(12px, 3.33cqw); }
.mobile-view .interaction-hint { position: absolute; top: 178.7cqw; left: 5.87cqw; width: 88.27cqw; margin: 0; color: #d5e8ff; font-size: max(11px, 2.93cqw); line-height: 4.27cqw; }
.mobile-view .send-button {
  position: absolute; top: 180.8cqw; left: .93cqw; width: 98.13cqw; height: 22.93cqw;
  display: block; margin: 0; padding: 0; min-height: 44px; border: 0; border-radius: 0; background: transparent;
  opacity: 1; box-shadow: none; transform: none;
}
.mobile-send-art, .mobile-waiting-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.send-button[data-state="waiting"] .mobile-send-art, .send-button:not([data-state="waiting"]) .mobile-waiting-art { display: none; }
.send-button[data-state="active"] .mobile-action-label, .send-button[data-state="waiting"] .mobile-action-label, .mobile-sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip-path: inset(50%); white-space: nowrap; border: 0 !important;
}
.send-button[data-state="sending"] .mobile-send-art, .send-button[data-state="ended"] .mobile-send-art { visibility: hidden; }
.send-button[data-state="sending"] .mobile-action-label, .send-button[data-state="ended"] .mobile-action-label {
  position: absolute; top: 3.47cqw; left: 4.93cqw; width: 88.27cqw; height: 13.07cqw;
  display: grid; place-items: center; color: #e3efff; font-size: 4.8cqw; font-weight: 700;
  border-radius: 9cqw; border-top: .93cqw solid #a9e4ff; background: linear-gradient(#8ed6ff, #268ee1);
}
.mobile-view .privacy-note { position: absolute; top: 204cqw; left: 5%; width: 90%; margin: 0; color: #d5e8ff; font-size: max(10px, 2.7cqw); text-align: center; }
.mobile-view .mobile-success { position: static; padding: 0; margin: 0; background: none; border: 0; }
.mobile-view.is-submitted .mobile-intro-art, .mobile-view.is-submitted .wish-form { display: none; }
.mobile-success-detail { position: absolute; top: 122.67cqw; left: 0; width: 100%; }
.mobile-success-detail img { width: 100%; height: auto; }
.mobile-success-detail #explorer-no { position: absolute; top: 5.2cqw; left: 35.33cqw; width: 29.33cqw; color: #fff5bc; font-size: 8.53cqw; font-weight: 700; line-height: 7.73cqw; text-align: center; }
.mobile-view .test-reset { position: absolute; top: 204cqw; left: 10%; width: 80%; min-height: 44px; color: #fff; }
.mobile-view button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.mobile-view .wechat-profile { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; line-height: 1.5; padding-bottom: 16px; }
.wechat-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid #c7e6ff; }
#wechat-profile-retry { min-height: 44px; padding: 6px 12px; background: transparent; border: 1px solid #b3d5ff; border-radius: 6px; color: #f2faff; font: inherit; }
.wechat-profile [hidden] { display: none; }

/* Plan B shares the Mini Program artwork and control metrics, while browser
   chrome supplies navigation (no fabricated OS status bar/WeChat capsule). */
body[data-mode="mobile"] { background: #245b9f; }
.mobile-view { position: relative; }
.mobile-art-canvas { min-height: var(--page-height, 100dvh); }
.mobile-view.is-submitted .mobile-art-canvas { min-height: var(--success-height, 100dvh); }
.mobile-art-logo { top: 3.2cqw; height: 8.58cqw; }
.mobile-intro-art, .mobile-success-title { top: var(--intro-top, 78.93cqw); }
.mobile-view .wish-editor { top: var(--form-top, 122.93cqw); height: var(--input-height, 150px); }
.mobile-view .wish-editor textarea { box-sizing: border-box; resize: none; }
.mobile-view .wish-tools { top: var(--tools-top, 164cqw); height: 44px; display: flex; align-items: center; justify-content: space-between; }
.mobile-view .random-phrase-button { width: 25.6cqw; min-height: 44px; margin: 0; padding: .53cqw 0; border: 0; border-radius: 0; line-height: 1; background: transparent; box-shadow: none; }
.mobile-random-art { display: block; width: 25.6cqw; height: 7.47cqw; object-fit: contain; }
.mobile-view .send-button { top: var(--action-top, 180.8cqw); }
.send-button[data-state="sending"] .mobile-action-label, .send-button[data-state="ended"] .mobile-action-label { box-sizing: border-box; color: #fff; line-height: 1.3; text-shadow: 0 .4cqw 0 #1675b3; border-radius: 8.67cqw; background: linear-gradient(180deg, #8ed6ff, #409de5 40%, #268ee1 72%, #2eb5ed); box-shadow: 0 1.33cqw 3.2cqw #163f8066, inset 0 0 1.07cqw #a0e4ff; }
.send-button[data-state="ended"] .mobile-action-label { opacity: .65; }
.mobile-success-detail { top: var(--success-top, 122.67cqw); }
.mobile-view button:not(:disabled):active { opacity: .85; }
.mobile-toast { position: fixed; z-index: 100; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); max-width: 85vw; padding: 12px 18px; border-radius: 8px; background: #14213aef; color: white; text-align: center; font-size: 16px; }
.mobile-view [hidden] { display: none !important; }
.mobile-test-mode { position: absolute; z-index: 10; top: 12px; right: 12px; margin: 0; padding: 5px 8px; border-radius: 4px; text-align: center; font-size: 12px; font-weight: 600; color: #593700; background: #ffe7ad; }
