* , *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* 隐藏桌面占位滚动条，保持扫码页与移动端相同的可用宽度，仍可正常滚动。 */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; color: #191a1a; background: #dedede; font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; padding: 0; background: none; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #49736c; outline-offset: 3px; }
.page { width: 100%; max-width: 540px; min-height: 100vh; margin: 0 auto; padding-bottom: 82px; padding-bottom: calc(82px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #fff 0%, #dedede 80%); }
.navbar { position: relative; display: flex; align-items: center; justify-content: center; min-height: 56px; min-height: calc(56px + env(safe-area-inset-top)); padding: 16px 48px; padding-top: calc(16px + env(safe-area-inset-top)); }
.navbar h1 { margin: 0; font-size: 16px; font-weight: 400; line-height: 24px; text-align: center; overflow-wrap: break-word; }
.navbar-back { position: absolute; top: 6px; top: calc(6px + env(safe-area-inset-top)); left: 6px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
/* 旧 WebView 的逻辑定位兼容：只镜像导航，设备插画保持原方向。 */
[dir='rtl'] .navbar-back { left: auto; right: 6px; }
.navbar-back img { display: block; width: 24px; height: 24px; }
[dir='rtl'] .navbar-back img { transform: scaleX(-1); }
.owner { display: flex; align-items: center; margin-top: 8px; padding: 0 16px; }
.owner-avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.owner-text { min-width: 0; margin-left: 8px; margin-inline-start: 8px; }
[dir='rtl'] .owner-text { margin-left: 0; margin-right: 8px; }
.owner-name, .owner-desc { margin: 0; overflow-wrap: break-word; }
.owner-name { font-size: 14px; line-height: 22px; }
.owner-desc { font-size: 12px; line-height: 20px; color: #aaa; }
.owner-desc.alert { color: #b43831; }
.preview { display: flex; justify-content: center; height: 203px; margin-top: 8px; padding-top: 24px; }
.case { position: relative; width: 156px; height: 156px; transform: translateX(.5px); }
/* 产品素材按固定坐标叠放，RTL 不翻转物理外形。 */
.case-outer, .case-inner, .case-ring { position: absolute; display: block; }
.case-outer { top: 0; left: 0; width: 156px; height: 156px; }
.case-inner { top: 7px; left: 7px; width: 142px; height: 142px; }
.case-ring { top: 2px; left: 2px; width: 152px; height: 152px; }
.case-screen { position: absolute; top: 8px; left: 8px; display: flex; align-items: center; justify-content: center; width: 140px; height: 140px; overflow: hidden; background: #000; border-radius: 50%; }
.highlight { display: inline-flex; align-items: center; max-width: 124px; padding: 3.733px 7.467px; background: #ff8ace; border-radius: 15.556px; transform: translate(-.03px, .483px); }
.highlight-icon { display: block; flex-shrink: 0; width: 17.5px; height: 17.5px; margin-right: 3.733px; }
[dir='rtl'] .highlight-icon { margin-right: 0; margin-left: 3.733px; }
.highlight-text { overflow: hidden; font-family: 'HarmonyOS Sans SC', 'PingFang SC', sans-serif; font-size: 12.444px; font-weight: 500; line-height: 14.778px; color: #fff; white-space: nowrap; text-overflow: ellipsis; }
.form { margin-top: 8px; padding: 0 16px; }
.field { display: block; }
.field + .field { margin-top: 16px; }
.field-label { display: block; margin-bottom: 8px; font-size: 14px; line-height: 22px; }
.input, .message-box { width: 100%; background: rgba(255,255,255,.6); border: 0; box-shadow: inset 0 0 0 .5px #fff; }
.input { display: block; height: 54px; padding: 0 16px; border-radius: 16px; font-size: 14px; line-height: 22px; -webkit-appearance: none; }
.message-box { min-height: 200px; padding: 16px; border-radius: 12px; }
.textarea { display: block; width: 100%; height: 60px; padding: 0; font-size: 14px; line-height: 22px; background: transparent; border: 0; resize: none; -webkit-appearance: none; }
.input::placeholder, .textarea::placeholder { color: #909090; }
.divider { display: block; width: 100%; height: .5px; }
.samples-label { margin: 15.5px 0 8px; font-size: 12px; line-height: 20px; color: #5c5c5c; }
.samples { margin-bottom: -8px; }
.sample-row { display: flex; flex-wrap: wrap; }
.sample { max-width: 100%; margin: 0 8px 8px 0; padding: 4px 8px; font-size: 12px; line-height: 20px; color: #5c5c5c; background: #fff; border-radius: 16px; text-align: start; overflow-wrap: break-word; }
[dir='rtl'] .sample { margin: 0 0 8px 8px; }
.footer { position: fixed; right: 0; bottom: 2px; left: 0; max-width: 540px; margin: 0 auto; padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: #dedede; }
.submit { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 12px 16px; font-size: 16px; line-height: 24px; color: #fff; background: #191a1a; border-radius: 999px; }
.submit:disabled { background: #c4c4c4; cursor: not-allowed; }
.spinner { width: 16px; height: 16px; margin: 0 8px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.toast { position: fixed; z-index: 2; top: 45%; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 48px); padding: 12px 18px; border-radius: 10px; background: rgba(25,26,26,.92); color: #fff; font-size: 14px; line-height: 22px; text-align: center; overflow-wrap: break-word; opacity: 0; pointer-events: none; }
.toast.visible { opacity: 1; }
.fallback { padding: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
