:root {
  font-family: "Roboto", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  color: #333;
  background: #f8f8f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --primary: #529cff;
  --primary-dark: #3f83d5;
  --primary-soft: #eff6ff;
  --text: #333;
  --muted: #999;
  --line: #e7e7e7;
  --home: #f8f8f8;
  --profile: #f5f6fa;
  --card: #fff;
  --success: #34b866;
  --warning: #ff9800;
  --danger: #ef5350;
  --bar: 56px;
  --bottom: 56px;
  --control-nav-height: calc(56px + env(safe-area-inset-bottom, 0px));
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; background: var(--home); }
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
img { max-width: 100%; }

.android-page { position: relative; width: 100%; max-width: 1180px; min-height: 100vh; margin: 0 auto; padding-bottom: calc(var(--bottom) + env(safe-area-inset-bottom)); background: var(--home); }
.android-topbar { position: sticky; z-index: 20; top: 0; width: 100%; height: var(--bar); display: flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--text); background: #fff; border-bottom: 1px solid #f0f0f0; }
.android-topbar h1 { margin: 0; font-size: 18px; line-height: 1; font-weight: 700; }
.android-topbar-title { position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 144px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.android-topbar-title.start { left: 16px; max-width: calc(100% - 140px); transform: none; text-align: left; }
.android-topbar .android-icon-history { filter: brightness(0) saturate(100%); }
.topbar-spacer { flex: 1; }
.android-logo { display: block; object-fit: contain; }
.android-icon { width: 22px; height: 22px; display: inline-block; vertical-align: middle; object-fit: contain; }
.android-icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; flex: 0 0 40px; padding: 0; color: #4a4a4a; background: transparent; border-radius: 50%; }
.android-icon-button:hover, .android-icon-button:focus-visible { background: #f1f6fc; outline: none; }
.android-icon-button .android-icon { width: 22px; height: 22px; }
.android-bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: 0; width: min(100%, 1180px); height: calc(var(--bottom) + env(safe-area-inset-bottom)); display: flex; align-items: flex-start; transform: translateX(-50%); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid #e4e4e4; }
.android-nav-item { width: 33.333%; height: var(--bottom); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #999; background: transparent; font-size: 11px; }
.android-nav-item .android-icon { width: 22px; height: 22px; opacity: .8; }
.android-nav-item.active { color: var(--primary); font-weight: 700; }
.android-nav-item.active .android-icon { opacity: 1; }
/* A few Android drawables are white because their native toolbar is dark.
   Scope the recolor to light H5 surfaces instead of changing the shared files. */
.android-bottom-nav .android-icon-home,
.android-bottom-nav .android-icon-person { filter: brightness(0) saturate(100%) invert(62%); }
.android-bottom-nav .android-nav-item.active .android-icon-home,
.android-bottom-nav .android-nav-item.active .android-icon-person { filter: brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(1770%) hue-rotate(190deg) brightness(103%) contrast(101%); }

.android-button { min-height: 40px; padding: 0 16px; border-radius: 6px; font-size: 14px; }
.android-button.primary, .android-wide-primary, .login-submit, .purchase-confirm { color: #fff; background: var(--primary); }
.android-button.outline { color: var(--primary-dark); background: #fff; border: 1px solid #a8ccf5; }
.android-button.text { color: #666; background: transparent; }
.android-wide-primary { width: 100%; min-height: 44px; display: block; padding: 0 16px; border-radius: 6px; font-size: 15px; font-weight: 700; }

.android-field { position: relative; display: block; margin: 0 0 16px; }
.android-field > span { display: block; margin: 0 0 6px; color: #666; font-size: 12px; }
.android-input { width: 100%; height: 44px; padding: 0 12px; color: #333; background: #fff; border: 1px solid #d6d9de; border-radius: 6px; outline: none; }
.android-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(82, 156, 255, .12); }
.android-input::placeholder { color: #b2b2b2; }
.android-modal-backdrop, .android-sheet-backdrop { position: fixed; z-index: 80; inset: 0; display: flex; justify-content: center; align-items: center; padding: 16px; background: rgba(0, 0, 0, .42); }
.android-modal { width: min(100%, 420px); max-height: min(90vh, 680px); overflow: auto; padding: 20px; background: #fff; border-radius: 12px; box-shadow: 0 12px 42px rgba(0,0,0,.24); }
.android-modal-title { margin-bottom: 12px; color: #222; font-size: 18px; font-weight: 700; }
.android-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.android-sheet-backdrop { align-items: flex-end; padding: 0; }
.android-sheet { width: min(100%, 640px); max-height: min(90vh, 720px); overflow: auto; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -12px 42px rgba(0,0,0,.2); }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: #d5d5d5; }
.sheet-title { display: flex; align-items: center; min-height: 38px; margin-bottom: 10px; color: #222; font-size: 17px; font-weight: 700; }
.sheet-title .android-icon-button { margin-left: auto; }
.android-legal-copy { color: #666; font-size: 13px; line-height: 1.8; }
.android-legal-copy .android-legal-link { color: #3667f2; font-size: 13px; }
.android-loading { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--primary-dark); font-size: 13px; }
.android-spinner { width: 28px; height: 28px; display: block; border: 3px solid #dceeff; border-top-color: var(--primary); border-radius: 50%; animation: android-spin .8s linear infinite; }
@keyframes android-spin { to { transform: rotate(360deg); } }
.android-empty { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; color: #999; text-align: center; }
.android-empty > .android-icon { width: 72px; height: 72px; margin-bottom: 14px; opacity: .55; }
.android-empty p { margin: 0 0 14px; font-size: 14px; }
.android-toast { position: fixed; z-index: 120; left: 50%; bottom: calc(var(--bottom) + 18px); max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 8px; padding: 9px 14px; color: #fff; background: rgba(0,0,0,.78); border-radius: 6px; transform: translateX(-50%); font-size: 13px; }
.android-toast-logo { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 4px; }
.android-toast span { min-width: 0; }

.splash-screen { min-height: 100vh; display: grid; place-items: center; background: #fff; }
.splash-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.splash-brand .splash-logo { width: 120px; height: 120px; }
.splash-brand h1 { margin: 0; color: #333; font-size: 24px; font-weight: 500; }
.agreement-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .46); }
.agreement-dialog { width: min(calc(100vw - 32px), 656px); padding: 28px 20px 20px; color: #222; background: #fff; border-radius: 12px; box-shadow: 0 12px 42px rgba(0, 0, 0, .24); }
.agreement-dialog h2 { margin: 0 0 18px; font-size: 18px; font-weight: 700; line-height: 1.35; }
.agreement-copy { color: #666; font-size: 14px; line-height: 1.8; }
.agreement-copy p { margin: 0 0 18px; }
.agreement-copy p:last-child { margin-bottom: 0; }
.agreement-copy .android-legal-link { display: inline; min-height: 0; padding: 0; color: #3667f2; background: transparent; font-size: inherit; line-height: inherit; vertical-align: baseline; }
.agreement-dialog footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.agreement-dialog footer button { min-width: 0; min-height: 40px; border-radius: 8px; color: #666; background: #fff; font-size: 16px; }
.agreement-dialog footer .agreement-accept { color: #fff; background: #529cff; }

.login-screen { min-height: 100vh; display: flex; justify-content: center; padding: 12px 12px 40px; background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 52%, #fff 100%); }
.login-content { width: min(100%, 430px); display: flex; flex-direction: column; align-items: center; }
.login-logo { width: 60px; height: 60px; margin-top: 20px; }
.login-content > h1 { margin: 6px 0 20px; color: #1a1a1a; font-size: 18px; font-weight: 700; }
.login-toggle { width: 228px; height: 40px; display: flex; padding: 4px; margin-bottom: 16px; background: #f3f4f6; border-radius: 20px; }
.login-toggle button { flex: 1; border-radius: 18px; color: #6b7280; background: transparent; font-size: 13px; }
.login-toggle button.selected { color: #fff; background: #3b82f6; box-shadow: none; }
.login-card { width: 100%; padding: 20px; background: #fff; border-radius: 0; box-shadow: none; }
.login-card .android-input { height: 56px; border-color: #d9dce1; border-radius: 12px; }
.login-form-row { display: block; }
.login-code-row { display: grid; grid-template-columns: minmax(0, 1fr) 116px; align-items: end; gap: 8px; }
.login-code-row .android-field { min-width: 0; }
.login-code-row .android-button { min-width: 0; padding: 0 6px; font-size: 12px; white-space: nowrap; }
.remember-row, .policy-row { display: flex; align-items: flex-start; gap: 7px; color: #777; font-size: 11px; line-height: 1.7; }
.remember-row { margin: -4px 0 16px; }
.remember-row input, .policy-row input, .sheet-policy input { margin: 2px 0 0; accent-color: var(--primary); }
.policy-row { margin-top: 15px; }
.policy-row button { padding: 0; color: var(--primary-dark); background: transparent; font-size: inherit; }
.login-submit { width: 100%; height: 44px; margin-top: 12px; border-radius: 12px; color: #fff; background: #3b82f6; font-size: 15px; font-weight: 700; }
.login-error { margin: -3px 0 10px; color: #e35353; font-size: 12px; }
.captcha-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.48); }
.captcha-dialog { position: relative; width: min(352px, calc(100vw - 40px)); min-height: 360px; padding: 14px 20px 18px; color: #1e1e1e; background: #fff; border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.24); }
.captcha-dialog header { height: 42px; display: flex; align-items: center; }
.captcha-dialog header strong { flex: 1; font-size: 19px; }
.captcha-dialog header button, .captcha-refresh { display: inline-flex; align-items: center; justify-content: center; color: #8e8e93; background: transparent; }
.captcha-dialog header button { width: 36px; height: 36px; }
.captcha-dialog header button .android-icon, .captcha-refresh .android-icon { width: 20px; height: 20px; }
.captcha-refresh { position: absolute; top: 54px; right: 56px; gap: 4px; font-size: 10px; }
.captcha-puzzle { position: relative; height: 174px; margin-top: 4px; overflow: hidden; background: linear-gradient(35deg, rgba(41,125,158,.75), transparent 26%), linear-gradient(125deg, rgba(235,148,61,.72), transparent 34%), linear-gradient(75deg, rgba(89,166,115,.75), transparent 60%), linear-gradient(155deg, #d9e6ed, #f0f4f6 54%, #b8ccd7); }
.captcha-puzzle:before, .captcha-puzzle:after { position: absolute; content: ''; inset: 0; opacity: .4; background: repeating-linear-gradient(14deg, transparent 0 28px, rgba(255,255,255,.7) 29px 31px, transparent 32px 58px); }
.captcha-gap { position: absolute; top: 22%; left: var(--captcha-target); width: 48px; height: 48px; border: 2px dashed rgba(255,255,255,.95); background: rgba(0,0,0,.16); transform: translateX(-50%); }
.captcha-piece { position: absolute; z-index: 2; top: 22%; left: clamp(10px, var(--captcha-slider), calc(100% - 58px)); width: 48px; height: 48px; border: 2px solid #fff; background: rgba(255,255,255,.1); box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.captcha-range { width: 100%; height: 48px; margin-top: 18px; appearance: none; border-radius: 24px; background: #f2f2f7; outline: none; }
.captcha-range::-webkit-slider-thumb { width: 44px; height: 44px; appearance: none; border: 0; border-radius: 50%; background: #007aff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.captcha-range::-moz-range-thumb { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #007aff; }
.captcha-tip { margin: 12px 0 0; color: #8e8e93; text-align: center; font-size: 13px; }

.device-filter-bar { height: 48px; display: flex; align-items: center; background: #fff; border-bottom: 1px solid #ececec; }
.device-filter-bar > button:not(.android-icon-button) { min-width: 0; flex: 1; height: 32px; padding: 0 6px; overflow: hidden; color: #555; background: transparent; border-right: 1px solid #eee; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.device-filter-bar .android-icon-button { margin: 0 4px; }
.device-announcement { display: flex; align-items: center; padding: 6px; color: #E65100; background: #FFF8E1; font-size: 7px; overflow: hidden; }
.device-announcement > .android-icon-announcement { width: 10px; height: 10px; flex: 0 0 10px; margin-right: 4px; filter: brightness(0) saturate(100%) invert(58%) sepia(98%) saturate(1688%) hue-rotate(359deg) brightness(102%) contrast(105%); }
.device-announcement-scroll { min-width: 0; flex: 1 1 auto; overflow: hidden; scrollbar-width: none; }
.device-announcement-scroll::-webkit-scrollbar { display: none; }
.device-announcement-track { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.device-announcement-track span { display: block; flex: 0 0 auto; white-space: pre; }
.device-announcement-close { width: 10px; height: 10px; flex: 0 0 10px; margin-left: 4px; padding: 0; border-radius: 0; }
.device-announcement-close .android-icon,
.device-announcement .android-icon-close { width: 10px; height: 10px; filter: brightness(0) saturate(100%) invert(58%) sepia(98%) saturate(1688%) hue-rotate(359deg) brightness(102%) contrast(105%); }
@media (prefers-reduced-motion: reduce) { .device-announcement-track { transform: none !important; will-change: auto; } }
.new-user-gift { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; margin: 10px 12px 0; color: #7b4a00; background: #fff4d6; border: 1px solid #ffe2a1; border-radius: 8px; }
.new-user-gift strong, .new-user-gift span { display: block; }
.new-user-gift strong { font-size: 13px; }
.new-user-gift span { margin-top: 4px; color: #a87420; font-size: 11px; }
.new-user-gift .android-button { flex: 0 0 auto; min-height: 34px; padding: 0 13px; }
.device-main { min-height: calc(100vh - var(--bar) - 48px - var(--bottom)); }
.device-list { display: grid; grid-template-columns: repeat(var(--device-columns, 2), minmax(0, 1fr)); gap: 8px; padding: 12px; }
.device-grid-card { overflow: hidden; background: #fff; border-radius: 12px; }
.device-preview { position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; color: #fff; background: #e0e0e0; }
.device-preview-main { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; color: inherit; background: transparent; }
.device-preview-image { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: #e0e0e0; }
.device-preview-image img { width: 100%; height: 100%; object-fit: contain; }
.device-preview-canvas { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; opacity: 0; }
.device-preview-image[data-preview-rotation="landscape"] .device-preview-canvas { inset: auto; top: 50%; left: 50%; width: var(--preview-rotated-width, 177.777778%); height: var(--preview-rotated-height, 56.25%); transform: translate(-50%, -50%) rotate(90deg); transform-origin: center; }
.device-preview-image[data-preview-live="true"] .device-preview-canvas { opacity: 1; }
.device-preview-image .device-placeholder { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #000; font-size: 11px; opacity: .9; }
.device-preview-image[data-preview-live="true"] .device-placeholder { opacity: 0; pointer-events: none; }
.preview-debug-overlay { position:absolute; z-index:4; top:4px; left:4px; max-width:calc(100% - 8px); box-sizing:border-box; padding:2px 3px; color:#d0e4e0; background:rgba(9,27,32,.82); border:1px solid rgba(159,217,206,.49); border-radius:4px; font:5px/1.15 monospace; text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; pointer-events:none; }
.screen-frame > .preview-debug-overlay { z-index:10; top:8px; left:8px; font-size:5px; }
.preview-debug-overlay span { display:block; color:#d7e0e2; }
.preview-debug-overlay i { color:#fff; font-style:normal; }
.device-preview-image .device-placeholder img { width: 46%; height: auto; opacity: .9; }
.device-preview-stream-status { position: absolute; z-index: 3; top: 50%; left: 50%; display: none; max-width: calc(100% - 16px); padding: 4px 6px; color: transparent; background: transparent; font-size: 10px; line-height: 1.35; text-align: center; transform: translate(-50%,-50%); visibility: hidden; }
.device-preview-image[data-preview-state="connecting"] .device-preview-stream-status,
.device-preview-image[data-preview-state="retrying"] .device-preview-stream-status { display: block; }
.device-offline { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.52); font-size: 13px; }
.device-preview-overlay { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; }
.device-expire { flex: 0 0 auto; margin: 0 0 4px 4px; padding: 1px 6px; color: #fff; background: #f86d5e; border-radius: 0; font-size: 10px; font-weight: 600; }
.device-grid-info { width: 100%; min-height: 26px; display: flex; align-items: center; gap: 4px; padding: 4px; color: #fff; background: rgba(0,0,0,.5); pointer-events: auto; }
.device-grid-open { min-width: 0; flex: 1; height: 18px; padding: 0; color: #fff; background: transparent; text-align: left; }
.device-grid-label { min-width: 0; display: flex; align-items: center; gap: 3px; overflow: hidden; font-size: 10px; white-space: nowrap; }
.device-grid-label > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-grid-vip, .device-grid-android { flex: 0 1 auto; font-weight: 700; }
.device-grid-name { flex: 1 1 auto; color: #fff; font-weight: 700; }
.device-grid-label[data-vip-tone="gvip"] .device-grid-vip, .device-grid-label[data-vip-tone="gvip"] .device-grid-android { color: #d4e6f1; }
.device-grid-label[data-vip-tone="kvip"] .device-grid-vip, .device-grid-label[data-vip-tone="kvip"] .device-grid-android { color: #ffe6a3; }
.device-grid-label[data-vip-tone="svip"] .device-grid-vip, .device-grid-label[data-vip-tone="svip"] .device-grid-android { color: #aa00ff; }
.device-grid-label[data-vip-tone="vip"] .device-grid-vip, .device-grid-label[data-vip-tone="vip"] .device-grid-android { color: #a8e6cf; }
.device-grid-label[data-vip-tone="default"] .device-grid-vip, .device-grid-label[data-vip-tone="default"] .device-grid-android { color: #03a9f4; }
.device-grid-settings { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; padding: 0; color: #fff; background: transparent; }
.device-grid-settings .android-icon { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.device-list.list-mode { display: flex; flex-direction: column; gap: 1px; padding: 0; background: #eee; }
.device-list-card { min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #fff; }
.device-list-main { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; padding: 0; color: inherit; background: transparent; border: 0; text-align: left; }
.device-list-main > span { min-width: 0; flex: 1; }
.device-list-icon { width: 34px; height: 34px; }
.device-list-main strong, .device-list-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-list-main strong { font-size: 13px; }
.device-list-main span { margin-top: 3px; color: #999; font-size: 11px; }
.device-status-text { width: 52px; text-align: center; color: var(--success); font-size: 11px; }
.device-status-text.offline { color: #999; }
.device-status-text.expired { color: var(--danger); }
.device-expire-text { width: 110px; color: #999; text-align: right; font-size: 10px; }
.device-list-actions { display: flex; align-items: center; gap: 2px; }
.device-list-action { min-width: 34px; height: 30px; padding: 0 4px; color: var(--primary-dark); background: transparent; font-size: 11px; }
.device-more-button { width: 32px; height: 32px; display: grid; place-items: center; background: transparent; }
.device-more-button .android-icon { width: 18px; height: 18px; }

.sheet-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 12px 0 16px; border-top: 1px solid #f0f0f0; }
.sheet-actions button { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; color: #555; background: transparent; font-size: 10px; }
.sheet-actions button .android-icon { width: 22px; height: 22px; }
.device-detail-warning { min-height: 44px; display: flex; align-items: center; justify-content: space-between; margin: 0 -16px 8px; padding: 0 16px; color: #fff; background: #ff5252; font-size: 14px; }
.device-detail-warning button { padding: 4px; color: #fff; background: transparent; font-size: 14px; }
.device-detail-identity { display: flex; align-items: center; gap: 8px; padding: 8px 0 16px; }
.device-detail-vip { color: #d4e6f1; font-size: 16px; font-weight: 700; }
.device-detail-name { color: #333; font-size: 18px; font-weight: 700; }
.device-detail-edit { width: 26px; height: 26px; display: grid; place-items: center; border: 0; background: transparent; color: #8a93a6; cursor: pointer; padding: 0; }
.device-detail-edit .android-icon { width: 16px; height: 16px; }
.device-detail-info { margin: 0 0 8px; }
.device-detail-row { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 7px 0; color: #666; font-size: 14px; }
.device-detail-row + .device-detail-row { border-top: 1px solid #f2f2f2; }
.device-detail-id-tag { padding: 4px 8px; color: #999; background: #eee; border-radius: 4px; font-size: 14px; }
.device-detail-code { color: #666; font-size: 14px; }
.device-detail-time { flex: 1; color: #666; font-size: 14px; }
.device-detail-copy { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; color: var(--primary-dark); background: transparent; }
.device-detail-copy .android-icon { width: 18px; height: 18px; }
.device-detail-renew { padding: 4px; color: var(--danger); background: transparent; font-size: 14px; }
.batch-major { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.batch-major button, .batch-grid button { min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #555; background: #f7faff; border: 1px solid #e4effc; border-radius: 8px; font-size: 12px; }
.batch-major button .android-icon, .batch-grid button .android-icon { width: 23px; height: 23px; }
.batch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.batch-grid button { flex-direction: column; min-height: 74px; }
.group-picker-list { margin-bottom: 14px; border-top: 1px solid #f1f1f1; }
.group-picker-row { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; color: #555; background: transparent; border-bottom: 1px solid #f1f1f1; font-size: 13px; text-align: left; }
.group-picker-row.selected { color: var(--primary-dark); font-weight: 700; }
.group-picker-row .android-icon { width: 18px; height: 18px; }
.group-picker-empty { padding: 28px 0; color: #999; text-align: center; font-size: 13px; }

.purchase-main { padding: 14px 12px 92px; }
.purchase-main h2 { margin: 0 0 8px; color: #444; font-size: 14px; font-weight: 700; }
.purchase-vip-bar { position: sticky; z-index: 19; top: var(--bar); margin: -14px -12px 14px; padding: 14px 12px 0; background: var(--home); border-bottom: 1px solid #ececec; }
.horizontal-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 16px; }
.android-tab { flex: 0 0 auto; min-width: 76px; height: 34px; padding: 0 12px; color: #777; background: #fff; border: 1px solid #e0e0e0; border-radius: 17px; font-size: 12px; }
.android-tab.selected { color: #fff; background: var(--primary); border-color: var(--primary); }
.package-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.package-card { position: relative; min-height: 148px; padding: 12px; color: #444; background: #fff; border: 1px solid #e4e4e4; border-radius: 10px; text-align: left; }
.package-card.selected { border: 2px solid var(--primary); padding: 11px; box-shadow: 0 2px 8px rgba(82,156,255,.13); }
.package-card-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.package-card-head strong { color: var(--primary-dark); font-size: 14px; }
.package-card-head span { color: #999; font-size: 10px; }
.package-day { margin-top: 12px; color: #666; font-size: 12px; }
.package-price { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; color: #f26722; }
.package-price b { font-size: 21px; }
.package-price del { color: #bbb; font-size: 10px; }
.package-daily { margin-top: 5px; color: #999; font-size: 10px; }
.package-tag { position: absolute; top: -1px; right: 8px; padding: 2px 5px; color: #fff; background: #ff9b42; border-radius: 0 0 3px 3px; font-size: 9px; }
.package-recommend-tag { position: absolute; top: 0; left: 0; padding: 4px 9px; color: #fff; background: #ff5252; border-radius: 10px 0 8px 0; font-size: 11px; line-height: 1.2; }
.purchase-confirm { position: fixed; z-index: 22; right: 12px; bottom: calc(var(--bottom) + 10px); left: 12px; width: min(calc(100% - 24px), 1156px); height: 44px; margin: 0 auto; border-radius: 6px; font-size: 15px; font-weight: 700; }
.order-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 11px; margin-bottom: 12px; background: #f7faff; border-radius: 8px; font-size: 12px; }
.order-summary strong { color: var(--primary-dark); }
.order-summary span { color: #555; }
.stepper-row, .sheet-total { display: flex; align-items: center; justify-content: space-between; min-height: 42px; font-size: 13px; }
.sheet-total .android-wide-primary:disabled { opacity: .55; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 28px; height: 28px; color: #555; background: #f1f4f8; border-radius: 50%; }
.purchase-sheet h3 { margin: 14px 0 7px; color: #555; font-size: 13px; }
.price-range-list { padding: 8px 10px; background: #fafafa; border-radius: 6px; color: #777; font-size: 11px; }
.price-range-list div { display: flex; justify-content: space-between; min-height: 26px; align-items: center; }
.price-range-list b { color: #f26722; }
.pay-option { min-height: 42px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.pay-option img { width: 24px; height: 24px; object-fit: contain; }
.pay-option .wechat-pay-icon { width: 28px; height: 28px; }
.pay-option input { margin-left: auto; accent-color: var(--primary); }
.pay-option em { margin-left: auto; color: #bbb; font-style: normal; font-size: 11px; }
.pay-option.disabled { opacity: .55; }
.sheet-policy { display: flex; align-items: center; gap: 7px; margin: 12px 0; color: #777; font-size: 11px; }
.sheet-policy-link { padding: 0; color: var(--primary-dark); background: transparent; font-size: inherit; }
.sheet-total { padding-top: 8px; border-top: 1px solid #eee; }
.sheet-total strong { color: #f26722; font-size: 17px; }
.sheet-total span { margin-left: auto; margin-right: 10px; color: #999; font-size: 11px; }
.sheet-total .android-wide-primary { width: 118px; }
.payment-qr { display: block; width: 220px; height: 220px; margin: 8px auto 14px; object-fit: contain; }
.payment-missing { padding: 24px 0; color: #777; font-size: 13px; line-height: 1.7; }
.payment-code { overflow-wrap: anywhere; padding: 10px; color: #555; background: #f5f6fa; font-size: 11px; }

.profile-page { background: var(--profile); }
.profile-page > .android-topbar { position: relative; justify-content: center; }
.profile-page > .android-topbar h1 { position: absolute; left: 50%; transform: translateX(-50%); }
.profile-main { padding: 16px; }
.profile-card, .profile-menu-card { overflow: hidden; margin-bottom: 12px; background: #fff; border-radius: 12px; }
.profile-card { padding: 20px; margin-bottom: 16px; }
.profile-user { display: flex; align-items: center; gap: 16px; padding: 0; }
.profile-avatar { width: 60px; height: 60px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #edf5ff; }
.profile-avatar .android-icon { width: 60px; height: 60px; }
.profile-avatar .android-icon-user_avatar { filter: brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(1770%) hue-rotate(190deg) brightness(103%) contrast(101%); }
.profile-user span, .profile-user strong { display: block; }
.profile-user span { color: #999; font-size: 11px; }
.profile-user strong { margin-top: 4px; color: #333; font-size: 18px; }
.profile-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.profile-shortcuts button { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #333; background: #fff; font-size: 12px; }
.profile-shortcuts .android-icon { width: 28px; height: 28px; }
.profile-menu-card > button { width: 100%; min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: #555; background: #fff; border-bottom: 1px solid #f1f1f1; text-align: left; font-size: 13px; }
.profile-menu-card > button:last-child { border-bottom: 0; }
.profile-menu-card > button > span { flex: 1; }
.profile-menu-card > button > .android-icon { width: 20px; height: 20px; }
.profile-menu-card .logout-row { justify-content: center; color: #e45b5b; }

.legal-page { background: #fff; }
.legal-content { padding: 20px 16px 40px; color: #555; font-size: 13px; line-height: 1.9; }
.legal-content h2 { margin: 0 0 14px; color: #333; font-size: 18px; }
.legal-frame { width: 100%; height: calc(100vh - var(--bar)); display: block; border: 0; background: #fff; }
.android-secondary { min-height: calc(100vh - var(--bar)); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; color: #999; text-align: center; }
.android-secondary img { width: 72px; height: 72px; margin-bottom: 12px; opacity: .55; }
.android-secondary h2 { margin: 0 0 8px; color: #555; font-size: 17px; }
.android-secondary p { margin: 0; font-size: 13px; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px, 1px, 1px, 1px) !important; white-space: nowrap !important; }
.p1-main, .p2-main { min-height: calc(100vh - var(--bar)); padding: 12px; background: var(--home); }
.p1-card { padding: 14px; margin-bottom: 12px; background: #fff; border-radius: 10px; }
.p1-code-row { display: grid; grid-template-columns: 1fr 116px; gap: 8px; }
.p1-card h2 { margin: 0 0 10px; color: #444; font-size: 14px; }
.p1-hint { margin: 0 0 12px; color: #999; font-size: 12px; line-height: 1.7; }
.transfer-notice p { margin: 0; color: #666; white-space: pre-line; font-size: 12px; line-height: 1.7; }
.transfer-main { min-height: calc(100vh - var(--bar)); padding: 16px; background: #f5f5f5; }
.transfer-main .p1-card { padding: 16px; margin-bottom: 16px; border: 1px solid #e0e0e0; border-radius: 8px; }
.transfer-main .p1-card h2 { margin-bottom: 12px; color: #333; font-size: 16px; }
.transfer-main .transfer-notice p { font-size: 14px; line-height: 1.5; }
.transfer-main .transfer-device-select, .transfer-main .transfer-target-card .android-input { min-height: 48px; background: #f8f8f8; border-color: #e0e0e0; border-radius: 6px; }
.transfer-main > .android-wide-primary { min-height: 48px; height: 48px; border-radius: 12px; background: #3b82f6; }
.p1-top-text.transfer-record-action { color: #2196f3; }
.transfer-selection-card h2, .transfer-target-card h2 { margin-bottom: 12px; font-size: 16px; }
.transfer-device-select { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; color: #999; background: #fff; border: 1px solid #d6d9de; border-radius: 6px; text-align: left; }
.transfer-device-select > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-device-select > span.selected { color: #333; }
.transfer-device-select .android-icon { width: 20px; height: 20px; }
.transfer-selection-card small { display: block; margin-top: 8px; color: #999; font-size: 12px; }
.transfer-selector-notice { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #856404; background: #fff3cd; font-size: 12px; }
.transfer-selector-notice .android-icon { width: 16px; height: 16px; }
.transfer-selector-main { min-height: calc(100vh - 164px); padding: 8px 16px 112px; background: #f5f5f5; }
.transfer-group-tabs { display: flex; gap: 0; overflow-x: auto; margin: -8px -16px 8px; padding: 0 16px; background: #fff; border-bottom: 1px solid #eee; }
.transfer-group-tabs button { flex: 0 0 auto; min-width: 72px; height: 48px; padding: 0 14px; color: #666; background: transparent; border-bottom: 2px solid transparent; font-size: 14px; }
.transfer-group-tabs button.selected { color: var(--primary-dark); border-bottom-color: var(--primary-dark); }
.transfer-device-list { display: grid; gap: 12px; }
.transfer-device-option { min-height: 82px; display: flex; align-items: center; gap: 12px; padding: 16px; background: #fff; border-radius: 12px; }
.transfer-device-option input { flex: 0 0 auto; accent-color: var(--primary-dark); }
.transfer-device-copy { min-width: 0; flex: 1; }
.transfer-device-copy strong, .transfer-device-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-device-copy strong { color: #333; font-size: 16px; }
.transfer-device-copy small { margin-top: 6px; color: #999; font-size: 12px; }
.transfer-device-state { flex: 0 0 auto; text-align: right; }
.transfer-device-state b, .transfer-device-state small { display: block; }
.transfer-device-state b { font-size: 13px; }
.transfer-device-state small { margin-top: 4px; color: #ff9800; font-size: 12px; }
.transfer-device-state.online b { color: #4caf50; }
.transfer-device-state.offline b { color: #f44336; }
.transfer-selector-footer { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
.transfer-selector-footer span { display: block; margin-bottom: 12px; color: #666; font-size: 14px; }
.transfer-selector-footer .android-wide-primary { width: 100%; min-height: 48px; height: 48px; margin: 0; border-radius: 12px; background: #3b82f6; }
.transfer-confirm-modal { padding: 24px; }
.transfer-confirm-copy { margin: 0 0 12px; color: #444; font-size: 14px; line-height: 1.6; }
.transfer-confirm-devices { max-height: 116px; margin: 0 0 12px; padding: 8px 12px; overflow: auto; color: #555; background: #f7f7f7; border-radius: 6px; font-size: 13px; line-height: 1.7; list-style: none; }
.transfer-confirm-label { display: block; color: #b63b32; font-size: 13px; font-weight: 700; }
.transfer-confirm-label .android-input { display: block; margin-top: 8px; }
.activation-renew-select { width: 100%; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; color: #333; background: #fff; border: 1px solid #ddd; border-radius: 12px; text-align: left; }
.activation-renew-select > span { min-width: 0; flex: 1; }
.activation-renew-select small, .activation-renew-select strong { display: block; }
.activation-renew-select small { color: #999; font-size: 12px; }
.activation-renew-select strong { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.activation-renew-select .android-icon { width: 20px; height: 20px; }
.activation-selected-devices { margin-top: 12px; padding: 8px; color: #333; background: #fafafa; font-size: 13px; line-height: 1.7; }
.activation-selected-devices small, .activation-selected-devices span { display: block; }
.activation-selected-devices small { color: #666; font-size: 12px; }
.activation-renew-tip { margin: 12px 0 0; padding: 12px; color: #f57c00; background: #fff8e1; font-size: 12px; line-height: 1.6; }
.batch-group-tabs { display: flex; height: 48px; overflow-x: auto; background: #fff; border-bottom: 1px solid #eee; }
.batch-group-tabs button { min-width: 76px; padding: 0 14px; color: #666; background: transparent; border-bottom: 2px solid transparent; font-size: 14px; white-space: nowrap; }
.batch-group-tabs button.selected { color: var(--primary-dark); border-bottom-color: var(--primary-dark); }
.batch-command-main { min-height: calc(100vh - var(--bar) - 144px); padding-bottom: 96px; }
.batch-device-list { margin-top: 8px; }
.batch-device-option { min-height: 76px; }
.batch-command-footer { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
.batch-command-footer span { display: block; margin-bottom: 12px; color: #666; font-size: 14px; }
.batch-command-footer .android-wide-primary { width: 100%; min-height: 48px; height: 48px; margin: 0; border-radius: 12px; background: #3b82f6; }
.batch-command-modal { padding: 24px; }
.batch-command-copy { margin: 0 0 12px; color: #444; font-size: 14px; line-height: 1.65; }
.batch-command-warning { margin: 0 0 12px; color: #c0392b; font-size: 14px; line-height: 1.65; }
.p1-selection-head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 3px; color: #777; font-size: 12px; }
.p1-bottom-action { margin-top: 14px; }
.p1-device-list { overflow: hidden; background: #fff; border-radius: 10px; }
.p1-device-option { min-height: 62px; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-bottom: 1px solid #f0f0f0; }
.p1-device-option:last-child { border-bottom: 0; }
.p1-device-option input { flex: 0 0 auto; accent-color: var(--primary); }
.p1-device-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 8px; background: #eef6ff; }
.p1-device-icon .android-icon { width: 27px; height: 27px; }
.p1-device-copy { min-width: 0; flex: 1; }
.p1-device-copy strong, .p1-device-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p1-device-copy strong { color: #444; font-size: 13px; }
.p1-device-copy small { margin-top: 4px; color: #999; font-size: 10px; }
.p1-device-expire { color: #999; font-size: 10px; }
.p1-device-option > button { padding: 4px; color: var(--primary-dark); background: transparent; font-size: 11px; }
.p1-top-text { min-height: 40px; padding: 0 8px; color: var(--primary-dark); background: transparent; font-size: 14px; }
.p1-groups { padding: 4px 0; background: #f8f8f8; }
.p1-group-row { width: calc(100% - 16px); min-height: 56px; display: flex; align-items: center; gap: 16px; margin: 4px 8px; padding: 0 16px; color: #333; background: #fff; border-radius: 12px; text-align: left; }
.p1-group-copy { min-width: 0; display: flex; align-items: center; gap: 8px; flex: 1; }
.p1-group-copy strong, .p1-group-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p1-group-copy strong { min-width: 0; font-size: 16px; font-weight: 400; }
.p1-group-copy small { color: #999; font-size: 14px; }
.p1-group-row > .android-icon { width: 24px; height: 24px; color: #aaa; }
.p1-group-device-main, .p1-group-add-main { padding-bottom: calc(var(--bottom) + 82px); }
.p1-group-device-list { overflow: hidden; background: #fff; border-radius: 10px; }
.p1-group-device-card { min-height: 76px; display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-bottom: 1px solid #f0f0f0; }
.p1-group-device-card:last-child { border-bottom: 0; }
.p1-group-device-card > div { display: flex; flex-direction: column; gap: 5px; }
.p1-group-device-card > div button { min-height: 25px; padding: 0 4px; color: var(--primary-dark); background: transparent; font-size: 11px; white-space: nowrap; }
.p1-group-device-card > div button:last-child { color: var(--danger); }
.p1-group-add-device { position: fixed; z-index: 25; left: 50%; bottom: calc(var(--bottom) + 14px + env(safe-area-inset-bottom)); width: min(calc(100% - 32px), 1148px); transform: translateX(-50%); }
.group-modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .42); }
.group-dialog { width: min(calc(100vw - 32px), 400px); padding: 20px; background: #fff; border-radius: 12px; box-shadow: 0 12px 42px rgba(0, 0, 0, .24); }
.group-dialog h2 { margin: 0 0 16px; color: #222; font-size: 18px; }
.group-dialog p { margin: 0; color: #666; font-size: 14px; line-height: 1.7; }
.group-input-label { display: block; color: #666; font-size: 13px; }
.group-input-label input { width: 100%; height: 42px; margin-top: 8px; padding: 0 10px; border: 1px solid #d6d9de; border-radius: 6px; color: #333; outline: none; }
.group-input-label input:focus { border-color: var(--primary); }
.group-dialog footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.group-dialog footer button { min-height: 40px; color: #666; background: #fff; font-size: 14px; }
.group-dialog footer .group-dialog-primary { color: #fff; background: var(--primary); border-radius: 6px; }
.group-dialog footer .group-dialog-danger { color: var(--danger); }
.group-action-sheet { align-self: flex-end; width: min(100%, 640px); padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); background: #fff; border-radius: 16px 16px 0 0; }
.group-action-sheet button { width: 100%; min-height: 48px; color: #333; background: #fff; border-bottom: 1px solid #f0f0f0; font-size: 16px; }
.group-action-sheet button:last-child { margin-top: 10px; border-bottom: 0; color: #666; background: #f8f8f8; border-radius: 6px; }
.group-action-sheet .group-action-danger { color: var(--danger); }
.group-move-list { max-height: 42vh; overflow: auto; border-top: 1px solid #f0f0f0; }
.group-move-row { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 2px; color: #444; background: transparent; border-bottom: 1px solid #f0f0f0; font-size: 14px; text-align: left; }
.group-move-row .android-icon { width: 18px; height: 18px; color: #aaa; }
.group-modal-empty { padding: 20px 0; color: #999; text-align: center; }
.p1-select-link { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 2px; color: var(--primary-dark); background: transparent; font-size: 13px; text-align: left; }
.p1-select-link .android-icon { width: 18px; height: 18px; }
.p1-renew-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.p1-renew-package { min-height: 78px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; color: #666; background: #fff; border: 1px solid #e2e2e2; border-radius: 8px; text-align: left; }
.p1-renew-package.selected { color: var(--primary-dark); border: 2px solid var(--primary); padding: 9px; }
.p1-renew-package strong { font-size: 13px; }
.p1-renew-package span { color: #888; font-size: 11px; }
.p1-renew-package b { color: #f26722; font-size: 16px; }
.p1-renew-device-main { min-height: calc(100vh - var(--bar)); padding-bottom: 56px; background: #f7f7f7; }
.p1-renew-device-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, 1fr); min-height: 48px; overflow-x: auto; padding: 0 8px; background: #fff; border-bottom: 1px solid #eee; }
.p1-renew-device-tabs button { min-width: 88px; height: 48px; padding: 0 8px; color: #999; background: transparent; font-size: 15px; font-weight: 700; }
.p1-renew-device-tabs button.selected { color: var(--primary); box-shadow: inset 0 -3px 0 var(--primary); }
.p1-renew-config-tabs { display: flex; gap: 12px; overflow-x: auto; padding: 8px; background: #fff; }
.p1-renew-config-tabs button { min-width: min(280px, calc(50vw - 16px)); height: 40px; padding: 0 16px; color: #aaa; background: #fff; border: 1px solid #d8d8d8; border-radius: 8px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.p1-renew-config-tabs button.selected { color: #fff; background: var(--primary); border-color: var(--primary); }
.p1-renew-device-list { min-height: calc(100vh - var(--bar) - 152px); padding: 8px; }
.p1-renew-device-empty { min-height: calc(100vh - var(--bar) - 176px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; color: #999; text-align: center; }
.p1-renew-device-empty .android-icon { width: 56px; height: 56px; margin-bottom: 18px; opacity: .28; }
.p1-renew-device-empty p { margin: 0 0 22px; font-size: 16px; }
.p1-renew-buy { min-width: 144px; min-height: 46px; font-size: 16px; }
.p1-renew-device-option { min-height: 72px; display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 8px; background: #fff; border-radius: 8px; }
.p1-renew-device-option input { position: absolute; opacity: 0; pointer-events: none; }
.p1-renew-check, .p1-device-check { width: 24px; height: 24px; flex: 0 0 24px; border: 2px solid var(--primary); border-radius: 4px; }
.p1-renew-device-option input:checked + .p1-device-check { background: var(--primary); box-shadow: inset 0 0 0 4px #fff; }
.p1-renew-device-copy { min-width: 0; flex: 1; }
.p1-renew-device-copy strong, .p1-renew-device-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p1-renew-device-copy strong { color: #333; font-size: 16px; }
.p1-renew-device-copy strong em { margin-left: 6px; color: #00bfe8; font-size: 13px; font-style: normal; }
.p1-renew-device-copy small { min-width: 0; display: flex; align-items: center; gap: 8px; margin-top: 6px; color: #999; font-size: 13px; }
.p1-renew-device-copy small > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p1-renew-device-copy small > b { flex: 0 0 auto; color: #ff5252; font-size: 13px; font-weight: 400; }
.p1-renew-selection-bar { position: fixed; z-index: 31; right: 0; bottom: 0; left: 0; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #eee; box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
.p1-renew-select-all { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: #666; background: transparent; font-size: 14px; white-space: nowrap; }
.p1-renew-select-all b { color: var(--primary); font-size: 13px; font-weight: 500; }
.p1-renew-select-all[aria-pressed="true"] .p1-renew-check { background: var(--primary); box-shadow: inset 0 0 0 4px #fff; }
.p1-renew-next { min-width: 120px; height: 40px; margin: 0; border-radius: 6px; }
.p1-renew-package-main { min-height: 0; height: calc(100vh - var(--bar)); display: flex; flex-direction: column; overflow: hidden; padding: 0; background: #f8f8f8; }
.p1-renew-summary { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding: 16px; margin: 8px 0 0; background: #fff; border-radius: 0; }
.p1-renew-summary-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 32px; color: var(--primary); }
.p1-renew-summary-icon .android-icon { width: 32px; height: 32px; }
.p1-renew-summary > div { min-width: 0; flex: 1; }
.p1-renew-summary strong, .p1-renew-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p1-renew-summary strong { color: #333; font-size: 16px; }
.p1-renew-summary small { display: none; }
.p1-renew-summary .android-button.text { min-width: 36px; padding: 8px; color: var(--primary); background: transparent; font-size: 14px; }
.p1-renew-package-section { min-height: 0; flex: 1 1 auto; overflow-y: auto; }
.p1-renew-package-section h2 { margin: 16px 16px 8px; color: #666; font-size: 14px; font-weight: 400; }
.p1-renew-package-list { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 16px 16px; }
.p1-renew-package-main .package-card { min-height: 104px; }
.p1-renew-package-main .package-card-inner { min-height: 102px; padding: 20px 16px 16px; }
.p1-renew-package-main .package-card.selected { border-color: #ff5252; box-shadow: none; }
.p1-renew-package-main .package-price b { color: #ff5252; font-size: 18px; }
.p1-renew-pay { position: static; z-index: auto; flex: 0 0 56px; width: auto; min-height: 56px; margin: 16px; border-radius: 0; }
.renew-device-detail-sheet { padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
.renew-device-detail-sheet h2 { margin: 0 0 12px; font-size: 18px; }
.renew-device-detail-list { overflow: hidden; background: #f8f8f8; border-radius: 8px; }
.renew-device-detail-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px; border-bottom: 1px solid #eee; }
.renew-device-detail-row:last-child { border-bottom: 0; }
.renew-device-detail-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.renew-device-detail-row span { color: #888; font-size: 12px; }
.renew-device-detail-row b { grid-column: 1 / -1; color: #ff5252; font-size: 12px; font-weight: 400; }
.cloud-main { padding-bottom: 20px; }
.cloud-storage { padding: 14px; margin-bottom: 10px; background: #fff; border-radius: 10px; }
.cloud-storage-body > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.cloud-storage strong { font-size: 14px; }
.cloud-storage span { color: #999; font-size: 11px; }
.cloud-progress { height: 6px; overflow: hidden; margin-top: 12px; background: #eaf2fc; border-radius: 6px; }
.cloud-progress i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.cloud-tabs { display: flex; height: 42px; margin-bottom: 8px; background: #fff; border-radius: 8px; }
.cloud-tabs button { flex: 1; position: relative; color: #888; background: transparent; font-size: 12px; }
.cloud-tabs button.selected { color: var(--primary-dark); font-weight: 700; }
.cloud-tabs button.selected::after { content: ""; position: absolute; right: 25%; bottom: 0; left: 25%; height: 2px; background: var(--primary); }
.p1-file-list { overflow: hidden; background: #fff; border-radius: 10px; }
.p1-file-row { min-height: 62px; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-bottom: 1px solid #f0f0f0; }
.p1-file-row:last-child { border-bottom: 0; }
.p1-file-row > div { min-width: 0; flex: 1; }
.p1-file-row strong, .p1-file-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p1-file-row strong { color: #555; font-size: 13px; }
.p1-file-row small { margin-top: 4px; color: #999; font-size: 10px; }
.p1-file-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 3px; }
.p1-file-action { min-width: 32px; height: 30px; padding: 0 4px; color: var(--primary-dark); background: transparent; font-size: 11px; }
.p1-file-action.danger { color: var(--danger); }
.p1-file-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; color: var(--primary); background: #eef6ff; border-radius: 8px; }
.p1-file-icon .android-icon { width: 22px; height: 22px; }
.p1-file-icon .android-icon-apk,
.p1-file-icon .android-icon-image,
.p1-file-icon .android-icon-file { filter: brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(1770%) hue-rotate(190deg) brightness(103%) contrast(101%); }
.p1-file-icon.cloud-file-icon .android-icon { filter: brightness(0) saturate(100%) invert(52%) sepia(78%) saturate(1770%) hue-rotate(87deg) brightness(93%) contrast(101%); }
.p1-file-icon.cloud-file-icon .cloud-file-custom-icon { width: 24px; height: 24px; object-fit: contain; }
.p1-file-icon.cloud-file-icon .cloud-file-app-thumb { width: 32px; height: 32px; object-fit: contain; }
.p1-file-icon.cloud-file-icon.cloud-file-image { width: 60px; height: 60px; flex-basis: 60px; }
.p1-file-icon.cloud-file-icon .cloud-file-image-thumb { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; }
.p1-file-row .cloud-file-date { display: block; margin-top: 3px; color: #999; font-size: 10px; }
.upload-progress-main { min-height: calc(100vh - 56px); padding: 8px 0 16px; background: #f8f9fa; }
.upload-task { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #f0f0f0; }
.upload-task-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 8px; background: #eef6ff; }
.upload-task-icon .android-icon { width: 23px; height: 23px; filter: brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(1770%) hue-rotate(190deg) brightness(103%) contrast(101%); }
.upload-task-body { min-width: 0; flex: 1; }
.upload-task-head, .upload-task-meta { min-width: 0; display: flex; align-items: center; gap: 12px; }
.upload-task-head strong { min-width: 0; overflow: hidden; flex: 1; color: #333; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.upload-task-head time { flex: 0 0 auto; color: #999; font-size: 11px; }
.upload-task-meta { min-height: 28px; margin-top: 4px; color: #666; font-size: 11px; }
.upload-task-meta small { min-width: 0; overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; }
.upload-task-cancel { min-width: 50px; min-height: 28px; padding: 4px 8px; color: #ff5722; background: #fff; border: 1px solid #ff5722; border-radius: 4px; font-size: 10px; }
.upload-task-progress { height: 3px; overflow: hidden; margin-top: 6px; background: #e8e8e8; }
.upload-task-progress i { display: block; height: 100%; background: var(--primary); }
.upload-empty { min-height: calc(100vh - 112px); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #888; }
.upload-empty .p1-file-icon { width: 64px; height: 64px; background: transparent; opacity: .3; }
.upload-empty .p1-file-icon .android-icon { width: 42px; height: 42px; }
.upload-empty strong { font-size: 16px; font-weight: 400; }
.upload-empty small { color: #aaa; font-size: 14px; }
.p2-main { padding: 12px; }
.p2-filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 12px; background: #fff; }
.p2-filter-row .android-button { min-height: 34px; padding: 0 12px; font-size: 12px; }
.p2-filter-select, .p2-filter-input { height: 34px; min-width: 0; border: 1px solid #e2e2e2; border-radius: 4px; color: #555; background: #fff; font-size: 12px; }
.p2-filter-select { width: 82px; padding: 0 4px; }
.p2-filter-input { flex: 1; padding: 0 10px; }
.p2-record-list { overflow: hidden; background: #fff; border-radius: 10px; }
.p2-record-card { border-bottom: 1px solid #f0f0f0; }
.p2-record-card:last-child { border-bottom: 0; }
.p2-record-row { min-height: 62px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f0f0f0; }
.p2-record-card .p2-record-row { border-bottom: 0; }
.p2-record-row:last-child { border-bottom: 0; }
.p2-record-row > div { min-width: 0; flex: 1; }
.p2-record-row strong, .p2-record-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p2-record-row strong { color: #555; font-size: 13px; }
.p2-record-row small { margin-top: 4px; color: #999; font-size: 10px; }
.p2-record-row b { color: #f26722; font-size: 14px; }
.p2-record-row > span { color: var(--success); font-size: 11px; }
.p2-record-details { display: grid; gap: 5px; padding: 0 12px 9px; color: #777; font-size: 11px; line-height: 1.5; }
.p2-record-expand { width: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 7px 12px 10px; color: #aaa; background: transparent; font-size: 11px; }
.p2-record-expand .android-icon { width: 14px; height: 14px; }
.p2-pagination { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 18px 0; color: #999; font-size: 12px; }
.p2-pagination button { color: var(--primary-dark); background: transparent; font-size: 12px; }
.consumption-pagination { gap: 0; }
.consumption-pagination > button, .consumption-page-numbers button { min-width: 40px; height: 32px; color: #007bff; background: #f2f2f2; border-right: 1px solid #fff; font-size: 15px; }
.consumption-page-numbers { display: flex; }
.consumption-page-numbers button { min-width: 32px; font-size: 12px; }
.consumption-page-numbers button.selected { color: #fff; background: #007bff; }
.p2-mode-tabs { display: flex; height: 42px; margin-bottom: 14px; background: #fff; border-radius: 9px; }
.p2-mode-tabs button { flex: 1; color: #888; background: transparent; font-size: 13px; }
.p2-mode-tabs button.selected { color: var(--primary-dark); border-bottom: 2px solid var(--primary); font-weight: 700; }
.p2-code-label { display: block; margin-bottom: 12px; color: #666; font-size: 12px; }
.p2-code { width: 100%; min-height: 130px; display: block; resize: vertical; margin-top: 7px; padding: 10px; color: #333; background: #fff; border: 1px solid #d6d9de; border-radius: 7px; outline: none; }
.p2-code:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(82,156,255,.12); }
.p2-record-link { display: block; margin: 10px auto; }
.p2-setting-row { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 9px; padding: 0 2px; color: #555; background: #fff; border-bottom: 1px solid #f0f0f0; text-align: left; font-size: 13px; }
.p2-setting-row:last-child { border-bottom: 0; }
.p2-setting-row > span { flex: 1; display: flex; align-items: center; gap: 8px; }
.p2-setting-row > span .android-icon { width: 20px; height: 20px; }
.p2-setting-row > .android-icon { width: 18px; height: 18px; }
.p2-setting-row small { color: #999; font-size: 10px; }
.p2-logout { margin-top: 20px; background: #fff; color: #e45b5b; border: 1px solid #f0d4d4; }
.p2-settings { padding: 16px; background: #f5f6fa; }
.p2-settings-card { padding: 8px 0; margin: 0; border-radius: 12px; }
.p2-settings .p2-setting-row { min-height: 50px; padding: 0 16px; color: #333; font-size: 14px; }
.p2-settings .p2-setting-row > span { gap: 12px; }
.p2-settings .p2-setting-row > span .android-icon { width: 20px; height: 20px; }
.p2-account-delete { width: 100%; min-height: 50px; margin-top: 24px; color: #f44336; background: #fff; border-radius: 12px; font-size: 16px; font-weight: 700; }
.account-delete-modal { padding: 24px; }
.account-delete-copy { margin: 0; color: #555; font-size: 15px; line-height: 1.6; }
.p2-error { margin: -3px 0 10px; color: #e45b5b; font-size: 12px; }
.p2-change-password { padding: 16px; background: #f5f6fa; }
.p2-change-form { padding: 20px; margin-bottom: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(20, 40, 60, .08); }
.p2-change-form .android-field { margin-bottom: 16px; }
.p2-change-form .android-field > span { margin-bottom: 8px; color: #333; }
.p2-change-form .android-input { min-height: 48px; border-radius: 12px; }
.p2-password-input { position: relative; display: block; }
.p2-password-input .android-input { width: 100%; padding-right: 48px; }
.p2-password-toggle { position: absolute; top: 0; right: 0; display: grid; width: 48px; height: 48px; place-items: center; padding: 0; background: transparent; border: 0; }
.p2-password-toggle .android-icon { width: 20px; height: 20px; opacity: .64; }
.p2-change-form .p1-code-row { grid-template-columns: 1fr 100px; gap: 12px; }
.p2-change-code { min-height: 48px; padding: 0 12px; white-space: nowrap; }
.p2-change-tip { padding: 16px; color: #666; background: #fff9e6; border-radius: 8px; box-shadow: 0 1px 4px rgba(20, 40, 60, .08); text-align: left; }
.p2-change-tip h2 { margin: 0 0 8px; color: #ff8c00; font-size: 14px; }
.p2-change-tip p { margin: 0; font-size: 12px; line-height: 1.75; }
.p2-about { display: flex; min-height: calc(100vh - var(--bar)); flex-direction: column; align-items: center; padding: 0 16px; background: #f5f6fa; text-align: center; }
.p2-about-brand { width: 100%; padding: 32px 0; }
.p2-about-logo { width: 76px; height: 76px; object-fit: contain; }
.p2-about h2 { margin: 14px 0 8px; font-size: 20px; }
.p2-about-brand p { margin: 0; color: #999; font-size: 14px; }
.p2-about-update { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: #333; background: #fff; border-radius: 12px; font-size: 14px; text-align: left; }
.p2-about-update .android-icon { width: 16px; height: 16px; color: #ccc; }
.p2-about-links { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 24px 0; }
.p2-about-links button { color: var(--primary-dark); background: transparent; font-size: 12px; }
.p2-about-links i { color: #ddd; font-size: 12px; font-style: normal; }

.control-page { position: fixed; z-index: 10; inset: 0; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; color: #fff; background: #0c0f14; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.control-bar { display: none; }
.screen-stage { position: relative; width: 100%; height: 100vh; height: 100dvh; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 0 var(--control-nav-height); background: #0c0f14; }
.screen-frame { position: relative; flex: 1 1 auto; width: 100%; height: 100%; max-width: none; overflow: hidden; background: #000; border: 0; border-radius: 0; box-shadow: none; }
.screen-stage[data-orientation="landscape"] .screen-frame { width: 100%; height: 100%; }
.screen-stage[data-orientation="portrait"] .screen-frame { width: 100%; height: 100%; }
.screen-frame video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #000; }
.screen-frame video[hidden] { display: none !important; }
.screen-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #000; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; z-index: 2; }
.control-metrics { position: absolute; z-index: 4; top: 10px; left: 12px; display: flex; align-items: center; gap: 9px; padding: 5px 8px; color: rgba(255,255,255,.9); background: rgba(0,0,0,.56); border-radius: 4px; font-size: 12px; line-height: 1.2; pointer-events: none; }
.control-metrics span { white-space: nowrap; }
.control-metrics [data-metric="latency"] { color: #42c778; }
.screen-overlay { position: absolute; z-index: 65; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; color: rgba(255,255,255,.78); background: transparent; text-align: center; font-size: 13px; line-height: 1.4; white-space: pre-line; pointer-events: none; }
.screen-overlay.is-loading { flex-direction: column; gap: 16px; color: #fff; background: #000; }
.screen-overlay.is-loading::before { width: 48px; height: 48px; box-sizing: border-box; content: ''; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: control-loading-spin 1s linear infinite; }
.screen-overlay.is-loading .control-overlay-message { font-size: 16px; }
.screen-overlay.is-loading .control-overlay-device { color: rgba(255,255,255,.7); font-size: 14px; }
@keyframes control-loading-spin { to { transform: rotate(360deg); } }
.screen-overlay[hidden] { display: none !important; }
.screen-frame .control-latency-display { position: absolute; z-index: 4; top: calc(11% + 16px); left: 16px; color: #4caf50; font-size: 12px; font-weight: 500; line-height: 1.2; pointer-events: none; }
.screen-frame[data-stream-orientation="landscape"] .control-latency-display { top: calc(5% + 16px); left: calc(15% + 16px); }
.control-floating-ball { position: fixed; z-index: 70; top: 50%; right: 0; width: 56px !important; height: 56px !important; box-sizing: border-box; color: #fff; background: linear-gradient(135deg, #667eea, #764ba2); border: 2px solid rgba(255,255,255,.8); box-shadow: 2px 2px 0 rgba(0,0,0,.267); transform: translateY(-50%); touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: opacity .3s ease, transform .5s cubic-bezier(.4,0,.2,1), box-shadow .15s ease; }
.control-floating-ball:hover, .control-floating-ball:focus-visible { background: linear-gradient(135deg, #667eea, #764ba2); outline: none; }
.control-floating-ball::after { position: absolute; content: ''; inset: 4px 2px 2px 4px; border-radius: 50%; background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,0)); pointer-events: none; }
.control-floating-ball .android-icon { width: 24px; height: 24px; opacity: .96; }
.control-floating-ball:active, .control-floating-ball.dragging { box-shadow: 2px 3px 0 rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.45); }
.control-floating-ball.control-ball-hidden { opacity: .7; }
.control-tools-backdrop { position: fixed; z-index: 66; inset: 0; width: 100%; height: 100%; padding: 0; background: transparent; border: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.control-tools-backdrop.hidden { display: none !important; }
.control-tools-backdrop:focus { outline: none; }
.control-tools { position: fixed; z-index: 68; top: calc(50% - 2px); left: 50%; width: 280px; max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 16px; box-sizing: border-box; color: #fff; background: #000000e6; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.58); transform: translate(-50%, -50%); overscroll-behavior: contain; touch-action: manipulation; }
@supports (height: 100dvh) {
  .control-tools { max-height: calc(100dvh - 32px); }
}
.control-tools.hidden { display: none; }
.control-tool-title { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 2px 2px; }
.control-tool-title strong { min-width: 0; overflow: hidden; flex: 1; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.control-device-name { margin-right: 6px; }
.control-device-label { color: #fff; font-weight: 700; }
.control-tool-title .control-switchbar { flex: 0 0 auto; gap: 0; padding: 0; }
.control-tool-title .control-switchbar label { gap: 4px; }
.control-tool-title .control-switchbar label > span { display: none; }
.control-tool-title .control-latency { font-size: 11px; }
.control-switchbar { position: relative; z-index: auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 0 2px; }
.control-switchbar label { min-width: 0; display: flex; align-items: center; gap: 6px; color: #b8c8d9; font-size: 11px; }
.control-switchbar .control-latency { margin-left: 2px; font-size: 11px; }
.control-switchbar select { min-width: 0; width: 120px; height: 30px; padding: 0 24px 0 10px; color: #fff; background: #2c2c2c; border: 0; border-radius: 14px; font-size: 11px; }
.control-switchbar select:disabled { color: rgba(255,255,255,.55); opacity: 1; }
.control-route-button { min-width: 0; height: 29px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; color: #fff; background: #2c2c2c; border: 0; border-radius: 14px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.control-route-button:disabled { cursor: not-allowed; opacity: .45; }
.control-route-button .control-route-name { min-width: 0; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.control-route-button .control-latency { margin-left: 2px; font-size: 11px; }
.control-route-button .control-route-arrow { width: 14px; height: 14px; flex: 0 0 14px; filter: brightness(0) invert(1); }
.control-route-menu { position: absolute; z-index: 75; top: calc(100% + 8px); right: 0; width: max-content; min-width: 132px; max-width: 220px; padding: 8px 10px; box-sizing: border-box; background: #262626; border-radius: 18px; box-shadow: 0 12px 24px rgba(0,0,0,.5); white-space: nowrap; }
.control-route-menu.hidden { display: none !important; }
.control-route-option { display: block; width: 100%; padding: 12px 14px; color: #fff; background: transparent; border: 0; border-radius: 12px; text-align: left; font-size: 12px; }
.control-route-option + .control-route-option { margin-top: 4px; }
.control-route-option:hover, .control-route-option:focus-visible { background: #333333; outline: none; }
.control-route-option.selected { color: #7dd3fc; background: #3a4148; font-weight: 600; }
.control-switch-button { width: 32px; height: 32px; color: #dceaff; background: #202d3d; }
.control-switch-button:disabled { cursor: not-allowed; opacity: .35; }
.control-tools .android-icon-button { width: 40px; height: 40px; color: #e7f2ff; background: #202d3d; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.control-tools .android-icon-button:hover, .control-tools .android-icon-button:focus-visible { background: var(--primary-dark); }
.control-tool-grid, .control-tool-secondary-grid { display: grid; grid-template-columns: repeat(3, max-content); justify-content: space-evenly; column-gap: 0; row-gap: 8px; }
.control-tool-item { min-width: 0; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; color: #fff; background: transparent; border-radius: 8px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.control-tool-item:hover, .control-tool-item:focus-visible { background: rgba(255,255,255,.09); outline: none; }
.control-tool-item:active { background: rgba(255,255,255,.16); }
.control-tool-icon { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; background: #444; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,.18); }
.control-tool-icon .android-icon { width: 18px; height: 18px; }
.control-tool-item.is-active .control-tool-icon { background: #4caf50; }
.control-tool-item.is-muted .control-tool-icon { background: #444; opacity: .75; }
.control-tool-item.is-danger .control-tool-icon { background: #e53e3e; }
.control-tool-label { max-width: 100%; overflow: hidden; color: rgba(255,255,255,.94); font-size: 10px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.control-tool-more { border-top: 1px solid rgba(255,255,255,.09); color: #b9cee2; font-size: 11px; }
.control-tool-more summary { padding: 7px 2px 3px; cursor: pointer; list-style: none; text-align: center; }
.control-tool-more summary::-webkit-details-marker { display: none; }
.control-tool-secondary-grid { padding-top: 5px; }
.control-tool-secondary-grid .control-tool-item { min-height: 64px; }
.control-tool-secondary-grid .control-tool-icon { width: 38px; height: 38px; }
.control-tool-secondary-grid .control-tool-icon .android-icon { width: 20px; height: 20px; }
.control-switch-layer { position: fixed; z-index: 55; inset: 0; display: flex; pointer-events: none; }
.control-switch-layer.hidden { display: none !important; }
.control-switch-layer.portrait { align-items: flex-start; justify-content: space-between; padding: calc(28px + env(safe-area-inset-top, 0px)) 18px 0; }
.control-switch-layer.landscape { flex-direction: column; align-items: flex-start; justify-content: space-between; padding: calc(24px + env(safe-area-inset-top, 0px)) 0 calc(24px + env(safe-area-inset-bottom, 0px)) 18px; }
.control-switch-arrow { width: 56px; height: 56px; display: grid; place-items: center; padding: 0; color: #fff; background: rgba(20,20,20,.78); border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,.42); pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.control-switch-arrow .android-icon { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.control-switch-arrow:disabled { cursor: not-allowed; opacity: .45; }
.control-switch-arrow:hover, .control-switch-arrow:focus-visible { background: rgba(40,40,40,.92); outline: none; }
.control-switch-layer.portrait .control-switch-prev .android-icon, .control-switch-layer.portrait .control-switch-next .android-icon { transform: rotate(-90deg); }
.control-bottom { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; height: var(--control-nav-height); display: flex; justify-content: space-around; align-items: flex-start; padding-bottom: env(safe-area-inset-bottom, 0px); box-sizing: border-box; background: rgba(13,17,24,.92); border-top: 1px solid rgba(255,255,255,.08); pointer-events: auto; }
.control-bottom-button { width: 33.333%; min-height: 56px; height: 56px; display: grid; place-items: center; padding: 0; background: transparent; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.control-bottom-button img { width: 24px; height: 24px; object-fit: contain; filter: brightness(0) invert(1); opacity: .94; }
.control-bottom-button:hover, .control-bottom-button:focus-visible { background: rgba(255,255,255,.08); outline: none; }
.stream-state { position: absolute; left: 18px; bottom: 12px; color: #8fa4bb; font-size: 11px; }
.control-modal { color: #333; }
.control-page.control-fullscreen { --control-nav-height: 0px; }
.control-page.control-fullscreen .screen-stage .control-bottom { height: calc(56px + env(safe-area-inset-bottom, 0px)); background: transparent; border: 0; pointer-events: none; }
.control-page.control-fullscreen .screen-stage .control-bottom-button { width: 48px; min-height: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; background: rgba(13,17,24,.55); pointer-events: auto; }
.control-page.control-fullscreen .screen-stage { padding-bottom: var(--control-nav-height); align-items: center; }
.control-page.control-fullscreen .screen-stage .screen-frame { width: 100%; height: 100%; max-width: none; }

@media (max-width: 680px) {
  .device-list { grid-template-columns: repeat(var(--device-columns, 2), minmax(0, 1fr)); }
  .device-list.list-mode { display: flex; }
  .device-expire-text { display: none; }
  .batch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-list { grid-template-columns: 1fr; }
  .control-floating-ball { right: 0; }
  .control-tools { width: 280px; gap: 8px; padding: 16px; }
  .control-tool-item { min-height: 64px; }
  .sheet-total .android-wide-primary { width: 112px; padding: 0 8px; }
}

@media (orientation: landscape) {
  .control-tools { width: 180px; gap: 6px; padding: 6px; }
  .control-tools .control-tool-title { padding: 0 1px; }
  .control-tools .control-tool-title strong { font-size: 9px; }
  .control-tools .control-tool-title .control-latency { font-size: 9px; }
  .control-switchbar { gap: 4px; padding: 1px 0; }
  .control-switchbar label { gap: 3px; font-size: 9px; }
  .control-switchbar .control-latency { font-size: 9px; }
  .control-switchbar select { width: 76px; height: 26px; padding-left: 5px; font-size: 9px; }
  .control-route-button { height: 26px; gap: 3px; padding: 0 8px; font-size: 9px; }
  .control-route-button .control-route-name { max-width: 82px; }
  .control-route-button .control-latency { font-size: 9px; }
  .control-route-button .control-route-arrow { width: 12px; height: 12px; }
  .control-route-menu { min-width: 120px; top: calc(100% + 6px); padding: 6px 8px; }
  .control-route-option { padding: 10px 12px; font-size: 10px; }
  .control-switch-button { width: 28px; height: 28px; }
  .control-tool-grid { gap: 4px; }
  .control-tool-item { min-height: 52px; gap: 2px; }
  .control-tool-icon { width: 36px; height: 36px; }
  .control-tool-icon .android-icon { width: 16px; height: 16px; }
  .control-tool-label { font-size: 8px; }
  .control-tool-more summary { padding: 4px 1px 2px; }
  .control-tool-secondary-grid .control-tool-item { min-height: 52px; }
  .control-tool-secondary-grid .control-tool-icon { width: 32px; height: 32px; }
  .control-tool-secondary-grid .control-tool-icon .android-icon { width: 18px; height: 18px; }
}

@media (min-width: 681px) {
  .android-page { box-shadow: 0 0 0 1px #ececec; }
  .android-bottom-nav { width: min(100%, 1180px); }
  .purchase-confirm { left: 50%; right: auto; transform: translateX(-50%); }
  .control-bottom { display: flex; }
}

/* Navigation placement follows the physical page orientation. The stream
   shape only controls the frame aspect ratio inside that layout. */
.screen-stage[data-orientation="landscape"] { padding: 0 0 var(--control-nav-height); }
.screen-stage[data-orientation="landscape"] .screen-frame { width: 100%; height: 100%; }
.screen-stage[data-orientation="portrait"] { padding: 0 0 var(--control-nav-height); }
.screen-stage[data-orientation="portrait"] .control-bottom {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: var(--control-nav-height);
  flex-direction: row;
  justify-content: space-around;
  align-items: flex-start;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid rgba(255,255,255,.08);
  border-left: 0;
  border-radius: 0;
}
.screen-stage[data-orientation="portrait"] .control-bottom-button {
  width: 33.333%;
  min-height: 56px;
  height: 56px;
  flex: 0 0 33.333%;
  order: initial;
}
/* Rotate only the remote screen surface when a landscape stream is viewed
   from a portrait browser. Fixed navigation and the floating ball stay in
   the physical viewport coordinate space. */
.screen-frame[data-surface-rotation="landscape"] {
  max-width: none;
  flex: 0 0 auto;
  width: calc(100vh - var(--control-nav-height));
  height: 100vw;
  transform: rotate(90deg);
  transform-origin: center center;
}
.screen-stage[data-orientation="portrait"] .screen-frame[data-surface-rotation="landscape"] {
  max-width: none;
  width: calc(100vh - var(--control-nav-height));
  height: 100vw;
}
@supports (height: 100dvh) {
  .screen-frame[data-surface-rotation="landscape"] { width: calc(100dvh - var(--control-nav-height)); }
  .screen-stage[data-orientation="portrait"] .screen-frame[data-surface-rotation="landscape"] { width: calc(100dvh - var(--control-nav-height)); }
}
.control-page.control-fullscreen .screen-stage[data-orientation="landscape"] { padding: 0 0 var(--control-nav-height); }
.control-page.control-fullscreen .screen-stage .screen-frame[data-surface-rotation="landscape"] {
  width: calc(100vh - var(--control-nav-height));
  height: 100vw;
}
@supports (height: 100dvh) {
  .control-page.control-fullscreen .screen-stage .screen-frame[data-surface-rotation="landscape"] {
    width: calc(100dvh - var(--control-nav-height));
  }
}

/* Keep the secondary H5 pages visually aligned with the Android cards. */
.cloud-main { padding: 0 0 96px; background: #f5f5f5; }
.cloud-storage { padding: 8px 16px; margin: 0; background: transparent; }
.cloud-storage-body { padding: 16px; background: #e8f4fc; border-radius: 8px; }
.cloud-storage-head { display: flex; align-items: center; justify-content: space-between; }
.cloud-storage-head strong { color: #333; font-size: 18px; }
.cloud-storage-head span { color: #666; font-size: 16px; }
.cloud-storage-usage { margin-top: 10px; color: #666; font-size: 15px; }
.cloud-progress { height: 7px; margin-top: 12px; background: #c6d4df; }
.cloud-install-banner { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 9px 16px; margin: 0 16px 6px; color: #996b00; background: #fff3cd; border-radius: 8px; }
.cloud-install-banner-icon { display: grid; place-items: center; flex: 0 0 22px; }
.cloud-install-banner-icon .android-icon { width: 20px; height: 20px; }
.cloud-install-banner p { min-width: 0; flex: 1; margin: 0; font-size: 14px; line-height: 1.45; }
.cloud-install-banner-close { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; color: #c9941b; background: transparent; }
.cloud-install-banner-close .android-icon { width: 18px; height: 18px; }
.cloud-tabs { height: 48px; margin: 6px 0 8px; border-radius: 0; }
.cloud-tabs button { font-size: 16px; }
.p1-file-list { margin: 0; border-radius: 0; }
.p1-file-row { min-height: 78px; padding: 12px 16px; }
.p1-file-row strong { color: #444; font-size: 15px; }
.p1-file-row small.cloud-file-size { margin-top: 5px; color: #888; font-size: 12px; }
.p1-file-icon { width: 40px; height: 40px; flex-basis: 40px; }
.p1-file-icon .android-icon { width: 25px; height: 25px; }
.cloud-upload-dock { position: fixed; z-index: 31; right: 0; bottom: env(safe-area-inset-bottom, 0px); left: 0; display: flex; gap: 16px; padding: 12px 16px 14px; background: #fff; border-top: 1px solid #e6e6e6; box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
.cloud-upload-card { min-width: 0; min-height: 68px; display: flex; align-items: center; justify-content: center; gap: 9px; flex: 1; color: #555; background: #fff; border: 1px solid #edf0f4; border-radius: 8px; cursor: pointer; font-size: 15px; }
.cloud-upload-card-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #eef6ff; }
.cloud-upload-card-icon .android-icon { width: 22px; height: 22px; filter: brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(1770%) hue-rotate(190deg) brightness(103%) contrast(101%); }
.cloud-upload-progress-action { min-width: 96px; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 4px; color: var(--primary); background: transparent; font-size: 14px; }
.cloud-upload-progress-action .android-icon { width: 22px; height: 22px; filter: brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(1770%) hue-rotate(190deg) brightness(103%) contrast(101%); }
.cloud-main .p1-file-action { min-width: 64px; height: 36px; padding: 0 13px; color: #fff; background: var(--primary); border-radius: 18px; font-size: 14px; }
.cloud-main .p1-file-action.danger { color: #fff; background: var(--primary); }

.local-files-main { min-height: calc(100vh - 56px); display: grid; place-items: center; padding: 16px 20px 156px; background: #f5f5f5; }
.local-upload-instruction { margin: 0 0 72px; color: #888; font-size: 15px; }
.local-upload-dock { position: fixed; z-index: 31; right: 0; bottom: env(safe-area-inset-bottom, 0px); left: 0; display: flex; gap: 20px; padding: 20px; background: #f5f5f5; }
.local-upload-card { min-width: 0; min-height: 90px; display: flex; align-items: center; justify-content: center; flex: 1; flex-direction: column; gap: 6px; color: #333; background: #fff; border-radius: 16px; cursor: pointer; font-size: 14px; }
.local-upload-card-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; }
.local-upload-card-icon .android-icon { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.local-upload-app .local-upload-card-icon { background: #35b96d; }
.local-upload-file .local-upload-card-icon { background: var(--primary); }

.android-topbar.cloud-file-device-topbar { height: 56px; border-bottom-color: #e8e8e8; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.cloud-file-device-picker { min-height: calc(100vh - 56px); padding: 16px 12px 28px; background: #f5f5f5; }
.cloud-file-device-selection-head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px 8px; color: #777; font-size: 14px; }
.cloud-file-device-select-all { min-width: 48px; min-height: 36px; padding: 0 4px; color: #666; background: transparent; font-size: 14px; }
.cloud-file-device-list { overflow: hidden; background: #fff; border-radius: 12px; }
.cloud-file-device-option { min-height: 62px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #ededed; }
.cloud-file-device-option:last-child { border-bottom: 0; }
.cloud-file-device-option input { width: 17px; height: 17px; flex: 0 0 17px; margin: 0; accent-color: var(--primary); }
.cloud-file-device-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 9px; background: #fff4d7; }
.cloud-file-device-icon .android-icon { width: 25px; height: 25px; }
.cloud-file-device-copy { min-width: 0; flex: 1; }
.cloud-file-device-copy strong, .cloud-file-device-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-file-device-copy strong { color: #444; font-size: 16px; }
.cloud-file-device-copy small { margin-top: 4px; color: #999; font-size: 12px; }
.cloud-file-device-expire { max-width: 88px; overflow: hidden; color: #999; font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.cloud-file-device-confirm { min-height: 48px; margin-top: 14px; font-size: 16px; }

.activation-main, .activation-records-main { padding: 16px; background: #f5f5f5; }
.p2-card { padding: 20px; margin-bottom: 12px; background: #fff; border-radius: 12px; }
.p2-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.p2-section-heading h2, .activation-type-card h2, .activation-record-summary h2 { margin: 0; color: #333; font-size: 16px; }
.p2-count-badge { color: #888; font-size: 12px; }
.activation-code-card .p2-count-badge { padding: 4px 10px; color: #666; background: #f5faff; border: 2px solid #2196f3; border-radius: 18px; }
.activation-code-card .p2-code { min-height: 120px; margin-top: 14px; padding: 14px; border: 2px solid #ddd; border-radius: 12px; font-size: 15px; }
.p2-card-hint { margin: 9px 0 0; color: #999; font-size: 12px; line-height: 1.5; }
.activation-type-options { display: flex; gap: 10px; margin-top: 14px; }
.activation-type-choice { min-height: 42px; flex: 1; padding: 0 12px; color: #777; background: #fff; border: 1px solid #dfe3e8; border-radius: 7px; font-size: 14px; }
.activation-type-choice.selected { color: var(--primary-dark); background: #eff6ff; border-color: var(--primary); font-weight: 700; }
.activation-device-selection { display: flex; align-items: center; gap: 8px; min-height: 42px; padding-top: 15px; margin-top: 14px; border-top: 1px solid #f0f0f0; color: #777; font-size: 12px; }
.activation-device-selection strong { color: #555; font-size: 13px; }
.activation-device-selection span { min-width: 0; flex: 1; }
.activation-device-selection .android-button { min-height: 34px; padding: 0 10px; font-size: 12px; }
.activation-primary { min-height: 50px; margin: 24px 0 20px; border-radius: 28px; box-shadow: 0 5px 10px rgba(0,0,0,.16); font-size: 16px; }
.activation-progress-modal { width: min(90vw, 460px); max-height: 60vh; padding: 16px; }
.activation-progress-title { text-align: center; }
.activation-progress-header, .activation-progress-row { display: grid; grid-template-columns: 3.5fr 2fr 2.5fr; gap: 4px; align-items: center; }
.activation-progress-header { padding: 8px 12px; color: #333; background: #e8e8e8; font-size: 11px; font-weight: 700; text-align: center; }
.activation-progress-header span:first-child { text-align: left; }
.activation-progress-list { min-height: 80px; max-height: 280px; overflow: auto; padding: 4px; background: #f5f5f5; }
.activation-progress-row { min-height: 32px; padding: 6px 8px; color: #555; border-bottom: 1px solid #e8e8e8; font-size: 11px; }
.activation-progress-row span, .activation-progress-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activation-progress-row b { text-align: center; font-weight: 400; }
.activation-progress-row b.success { color: var(--success); }
.activation-progress-row b.error { color: var(--danger); }
.activation-progress-row b.waiting { color: #ff9800; }
.activation-progress-count { display: flex; justify-content: center; gap: 16px; margin-top: 12px; font-size: 12px; }
.activation-progress-count span:nth-child(2) { color: var(--success); }
.activation-progress-count span:nth-child(3) { color: var(--danger); }
.activation-progress-confirm { min-height: 40px; margin-top: 12px; font-size: 14px; }

.activation-record-summary { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.activation-record-summary span { color: #888; font-size: 14px; }
.activation-record-list { overflow: visible; background: transparent; border-radius: 0; }
.activation-record-card { position: relative; padding: 14px 16px; margin-bottom: 12px; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.activation-record-head { display: flex; align-items: center; gap: 8px; }
.activation-record-head strong { min-width: 0; flex: 1; overflow: hidden; color: #444; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.activation-record-type { padding: 2px 7px; color: #fff; background: #4caf78; border-radius: 4px; font-size: 11px; }
.activation-record-type.renew { background: #529cff; }
.activation-record-time { display: block; margin-top: 7px; color: #999; font-size: 12px; }
.activation-record-fields { margin: 10px 0 0; }
.activation-record-fields > div { display: flex; min-height: 24px; align-items: baseline; gap: 5px; font-size: 13px; }
.activation-record-fields dt { color: #888; }
.activation-record-fields dd { min-width: 0; flex: 1; margin: 0; overflow: hidden; color: #555; text-overflow: ellipsis; white-space: nowrap; }
.activation-record-status { position: absolute; right: 16px; bottom: 14px; color: var(--success); font-size: 12px; }

.purchase-main { padding: 16px 0 calc(88px + env(safe-area-inset-bottom)); background: #f5f5f5; }
.purchase-main > h2 { margin: 0 16px 10px; font-size: 16px; }
.purchase-main > .horizontal-tabs { padding: 0 16px 18px; }
.purchase-main > .package-list { padding-right: 16px; padding-left: 16px; }
.package-list { grid-template-columns: 1fr; gap: 12px; }
.package-card { min-height: 112px; padding: 0; border-radius: 12px; }
.package-card.selected { padding: 0; border-width: 2px; }
.package-card.selected { border-color: #529cff; box-shadow: 0 4px 12px rgba(82,156,255,.14); }
.package-card-inner { min-height: 110px; display: flex; align-items: center; gap: 12px; padding: 22px 16px 16px; }
.package-copy { min-width: 0; flex: 1; }
.package-card-head { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.package-card-head strong { font-size: 15px; }
.package-card-head span { color: #888; font-size: 12px; }
.package-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: #666; font-size: 13px; }
.package-meta i { width: 1px; height: 12px; background: #ccc; }
.package-day { margin-top: 10px; font-size: 13px; }
.package-price-side { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; }
.package-price { justify-content: flex-end; margin-top: 0; }
.package-price b { font-size: 22px; line-height: 1; }
.package-daily { margin-top: 7px; font-size: 12px; }
.package-daily { font-size: 0; }
.package-daily::after { content: attr(data-display); font-size: 12px; }
.package-tag { position: static; display: block; margin-top: 8px; padding: 0; color: #ff5252; background: transparent; border-radius: 0; font-size: 12px; }
.package-recommend-tag { top: 0; left: 0; padding: 4px 9px; border-radius: 10px 0 8px 0; font-size: 11px; }
.purchase-confirm { right: 0; bottom: 0; left: 0; width: 100%; height: 56px; border-radius: 0; box-shadow: 0 -8px 20px rgba(37, 63, 99, .12); font-size: 18px; }

.device-detail-sheet { padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); }
.device-detail-sheet .sheet-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 0 16px; }
.device-detail-sheet .sheet-actions button { font-size: 12px; }
.device-detail-sheet .sheet-actions button .android-icon { width: 24px; height: 24px; }
.device-detail-sheet .sheet-actions button .android-icon { filter: brightness(0) saturate(100%) invert(35%) sepia(9%) saturate(300%) hue-rotate(200deg) brightness(95%) contrast(88%); }
.device-command-modal { padding: 24px 24px 20px; }
.device-command-modal .android-modal-title { margin: 0 0 18px; font-size: 20px; }
.device-command-message { margin: 0; color: #555; white-space: pre-line; font-size: 15px; line-height: 1.65; }
.device-command-modal .android-modal-actions { margin-top: 24px; gap: 20px; }
.device-command-cancel, .device-command-primary { min-width: 76px; min-height: 40px; padding: 0 8px; background: transparent; font-size: 15px; }
.device-command-cancel { color: #666; }
.device-command-primary { color: var(--primary-dark); font-weight: 700; }
.device-rename-label { display: block; color: #555; font-size: 14px; }
.device-rename-label .android-input { margin-top: 8px; }
.new-user-gift-message, .cloud-action-message { margin: 0; color: #555; white-space: pre-line; font-size: 15px; line-height: 1.65; }
.cloud-action-modal .android-modal-actions { flex-wrap: wrap; gap: 12px; }
.cloud-action-danger { min-width: 76px; min-height: 40px; padding: 0 8px; color: var(--danger); background: transparent; font-size: 15px; }

/* Match the Android purchase configuration strip and keep it visible while
   the package list scrolls underneath. */
.purchase-config-section { display: block; min-height: 88px; background: #fff; border-bottom: 1px solid #e8edf3; }
.purchase-config-section h2 { margin-left: 16px; margin-bottom: 10px; }
.purchase-config-section .horizontal-tabs { min-height: 50px; align-items: flex-start; padding-left: 16px; padding-right: 16px; padding-bottom: 16px; }
.purchase-vip-bar { margin: -16px 0 18px; padding: 16px 0 0; }
.purchase-main .android-tab { min-width: 80px; height: 38px; color: #666; background: #fff; border: 2px solid #ddd; border-radius: 12px; font-size: 16px; }
.purchase-main .android-tab.selected { color: #008ecf; background: #eef6ff; border-color: #529cff; }

/* Cloud icons use a light-surface color, including the bottom upload dock. */
.cloud-file-icon { display: grid; place-items: center; flex: 0 0 40px; }
.cloud-file-icon.cloud-file-image { flex-basis: 60px; }
.p1-file-actions { flex-direction: row-reverse; }
.cloud-file-icon .android-icon,
.cloud-upload-card-icon .android-icon { filter: brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(1770%) hue-rotate(190deg) brightness(103%) contrast(101%); }
.cloud-storage-progress { display: block; min-height: 4px; }
.cloud-storage-progress i { min-width: 0; }

/* Consumption records follow the Android filter row and separated white
   cards instead of the denser activation-record presentation. */
.consumption-main { padding: 12px 12px calc(var(--bottom) + env(safe-area-inset-bottom)); background: #f5f5f5; }
.consumption-filter-row { display: grid; grid-template-columns: 75px minmax(0, 1fr) 56px; align-items: center; gap: 8px; padding: 12px; margin-bottom: 10px; background: #fff; border-radius: 0; }
.consumption-filter-row .p2-filter-select,
.consumption-filter-row .p2-filter-input { min-width: 0; width: 100%; height: 36px; padding: 0 9px; color: #555; background: #fff; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 12px; }
.consumption-filter-row .android-button { min-width: 0; height: 36px; min-height: 36px; padding: 0 5px; border-radius: 6px; font-size: 12px; }
.consumption-list { overflow: visible; background: transparent; border-radius: 0; }
.consumption-card { margin-bottom: 12px; background: #fff; border-radius: 12px; }
.consumption-card:last-child { margin-bottom: 0; }
.consumption-row { min-height: 76px; display: flex; align-items: flex-start; gap: 10px; padding: 13px 12px 7px; }
.consumption-copy { min-width: 0; flex: 1; }
.consumption-copy strong, .consumption-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.consumption-copy strong { color: #444; font-size: 14px; line-height: 1.35; }
.consumption-copy small { margin-top: 6px; color: #999; font-size: 10px; line-height: 1.35; }
.consumption-amount { min-width: 62px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.consumption-amount b { color: #f26722; font-size: 14px; font-weight: 500; white-space: nowrap; }
.consumption-amount span { color: #777; font-size: 10px; white-space: nowrap; }
.consumption-expand { width: 100%; min-height: 30px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 2px 12px 9px; color: #999; background: transparent; font-size: 11px; }
.consumption-expand .android-icon { width: 14px; height: 14px; opacity: .75; }
.consumption-details { display: grid; gap: 5px; padding: 12px; margin: 0 16px; color: #666; background: #f9f9f9; font-size: 13px; line-height: 1.45; }
.consumption-pagination { margin-top: 10px; }

.consumption-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 16px 0; }
.consumption-card-head > div { min-width: 0; flex: 1; }
.consumption-title { display: block; overflow: hidden; color: #333; font-size: 16px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.consumption-card-head time { display: block; margin-top: 7px; color: #999; font-size: 13px; }
.consumption-status-badge { flex: 0 0 auto; padding: 5px 10px; color: #58b86b; background: #e8f6ea; border-radius: 18px; font-size: 12px; font-weight: 700; }
.consumption-divider { height: 1px; margin: 14px 16px 0; background: #f0f0f0; }
.consumption-content-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 16px; color: #666; font-size: 14px; }
.consumption-content-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.consumption-content-row b { flex: 0 0 auto; color: #ff5a2f; font-size: 17px; }
.consumption-content-row b.transfer { color: #a329b5; }

.activation-radio-list { display: grid; gap: 9px; margin-top: 14px; }
.activation-radio-option { min-height: 46px; display: flex; align-items: center; gap: 14px; padding: 0 8px; color: #333; background: transparent; font-size: 15px; text-align: left; }
.activation-radio-dot { width: 22px; height: 22px; flex: 0 0 22px; border: 3px solid #2196f3; border-radius: 50%; }
.activation-radio-option.selected .activation-radio-dot { box-shadow: inset 0 0 0 4px #fff; background: #2196f3; }

/* iOS uses these values when the site is launched from the Home Screen.
   Safari cannot enter Fullscreen API mode on page load, while standalone PWA
   mode removes browser chrome after the user adds the site to Home Screen. */
@media (display-mode: standalone), (display-mode: fullscreen) {
  body { padding-top: env(safe-area-inset-top, 0px); }
}
/* Always-visible build identifier. It is replaced by package.ps1 with the
   current build_id on every packaging run so operators can verify which
   binary (and embedded frontend) is being served. */
.h5-build-version {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 2147480000;
  padding: 4px 8px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.h5-native-app-version {
  bottom: 31px;
}

/* Android-style debug panel opened by tapping the device name five times.
   Matches FloatingControlBall.DebugInfoPanel without touching the video. */
.control-debug-panel {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 2147480001;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 240px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 10px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, .82);
  border-radius: 8px;
  font-size: 9px;
  line-height: 1.2;
  pointer-events: auto;
  cursor: pointer;
}
.control-debug-panel.hidden { display: none; }
.control-debug-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 11px; }
.control-debug-row > span { flex: 0 0 auto; color: #ccc; }
.control-debug-row > strong { min-width: 0; max-width: 160px; color: inherit; font-size: 9px; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.control-debug-probe { margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.18); color: #ccc; }
.control-debug-probe > span { display: block; margin-bottom: 5px; font-size: 9px; }
.control-debug-probe-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.control-debug-probe-option { min-height: 24px; padding: 3px 4px; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; color: #d9e8ff; background: rgba(255,255,255,.08); font: inherit; cursor: pointer; }
.control-debug-probe-option.selected { border-color: #64b5f6; color: #fff; background: rgba(33,150,243,.45); }
.control-debug-probe-status { display: block; margin-top: 5px; color: #81c784; font-size: 9px; line-height: 1.3; }

/* Android control surface: fullscreen content fills the viewport and the
   three system keys use one translucent navigation bar without circular
   button backgrounds. */
.control-page.control-fullscreen .screen-stage { padding: 0; }
.control-page.control-fullscreen .screen-stage .control-bottom {
  z-index: 60; right: 0; bottom: 0; left: 0; width: 100%;
  height: calc(36px + env(safe-area-inset-bottom, 0px));
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  background: rgba(0,0,0,.4); border: 0; border-radius: 18px 18px 0 0;
  pointer-events: auto; align-items: center;
}
.control-page.control-fullscreen .screen-stage .control-bottom-button {
  width: 33.333%; min-height: 36px; height: 36px; flex: 1 1 33.333%;
  border-radius: 0; background: transparent; pointer-events: auto;
}
.control-page.control-fullscreen .screen-stage .control-bottom-button img {
  width: 24px; height: 24px; opacity: 1;
}
.control-page.control-fullscreen .screen-stage[data-orientation="landscape"] .control-bottom {
  top: 0; right: 0; bottom: 0; left: auto; width: 36px; height: 100%;
  padding: 0 0 0 env(safe-area-inset-right, 0px);
  border-radius: 18px 0 0 18px; flex-direction: column;
}
.control-page.control-fullscreen .screen-stage[data-orientation="landscape"] .control-bottom-button {
  width: 36px; min-height: 36px; height: 36px; flex: 0 0 36px;
}
