body.cm-page { overflow: hidden; height: 100dvh; background: #000; color: #fff; }
.cm-shoot, .cm-pick { position: fixed; inset: 0; display: flex; flex-direction: column; }

.cm-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; }
.cm-round { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font: inherit; font-size: 20px; text-decoration: none; cursor: pointer; }
.cm-pill { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.cm-title { font-size: 16px; font-weight: 650; }
.cm-pick-top { display: grid; grid-template-columns: 40px minmax(0, 1fr); }
.cm-pick-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.cm-pill:disabled, .cm-link:disabled { opacity: .4; cursor: default; }
.cm-proto { color: rgba(255, 255, 255, .55); font-size: 11.5px; }
.cm-proto a { color: rgba(255, 255, 255, .8); }

/* 取景 */
.cm-shoot video, .cm-shoot #cm-sim { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cm-shoot #cm-sim { padding: 70px 10px 150px; object-fit: contain; background: radial-gradient(circle at 50% 40%, #6b645a, #2c2925); }
.cm-grid { position: absolute; inset: 0; pointer-events: none; }
.cm-grid i { position: absolute; background: rgba(255, 255, 255, .28); }
.cm-grid i:nth-child(1) { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.cm-grid i:nth-child(2) { left: 66.66%; top: 0; bottom: 0; width: 1px; }
.cm-grid i:nth-child(3) { top: 33.33%; left: 0; right: 0; height: 1px; }
.cm-grid i:nth-child(4) { top: 66.66%; left: 0; right: 0; height: 1px; }
.cm-hint { position: absolute; left: 50%; top: 44%; z-index: 2; transform: translate(-50%, -50%); width: max-content; max-width: 86vw; padding: 10px 16px; border-radius: 14px; background: rgba(0, 0, 0, .38); font-size: 17px; font-weight: 600; line-height: 1.55; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); transition: opacity .4s; }
.cm-hint small { font-size: 13.5px; font-weight: 500; opacity: .85; }
.cm-hint.is-faded { opacity: 0; }

.cm-bar { position: absolute; inset: auto 0 0; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 22px 28px calc(26px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0)); }
.cm-album { display: grid; justify-items: center; gap: 2px; justify-self: start; color: #fff; font-size: 12px; cursor: pointer; }
.cm-album { border: 0; padding: 0; background: transparent; }
.cm-top [data-site-auth] { color: #172e22; }
.cm-album svg { width: 46px; height: 46px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .16); }
.cm-shutter { display: grid; place-items: center; width: 78px; height: 78px; padding: 0; border: 4px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.cm-shutter i { width: 62px; height: 62px; border-radius: 50%; background: #fff; transition: transform .1s; }
.cm-shutter:active i { transform: scale(.88); }
.cm-shutter:disabled { opacity: .35; }

.cm-denied { position: absolute; inset: 0; z-index: 2; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 0 32px 120px; background: #101a1c; text-align: center; }
.cm-denied h1 { font-size: 20px; }
.cm-denied p { color: rgba(255, 255, 255, .7); font-size: 14px; }
.cm-denied .sq-primary, .cm-denied .sq-ghost { width: min(100%, 300px); }
.cm-denied .sq-primary { margin-top: 8px; }
.cm-dark-ghost { border-color: rgba(255, 255, 255, .25); background: transparent; color: #fff; }
.cm-denied small { margin-top: 6px; color: rgba(255, 255, 255, .45); font-size: 12px; }

/* 选题 */
.cm-pick { overflow-y: auto; background: #0f1517; }
.cm-stage-wrap { flex: 1; min-height: 264px; display: grid; place-items: center; padding: 4px 12px 12px; }
.cm-stage { position: relative; overflow: hidden; border-radius: 4px; touch-action: none; user-select: none; -webkit-user-select: none; }
.cm-stage img { display: block; max-width: 100%; max-height: max(240px, calc(100dvh - 410px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); border-radius: 4px; }
.cm-boxes { position: absolute; inset: 0; }
.cm-box { position: absolute; padding: 0; border: 2px solid rgba(255, 255, 255, .7); border-radius: 6px; background: rgba(8, 127, 121, .08); cursor: pointer; animation: cm-pop .3s ease-out backwards; }
.cm-box b { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px 0 6px 0; background: rgba(255, 255, 255, .85); color: #0f1517; font-size: 13px; font-weight: 750; }
.cm-box[aria-pressed="true"] { z-index: 1; border: 3px solid #fff; background: transparent; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5), 0 0 18px rgba(45, 212, 191, .8); }
.cm-box[aria-pressed="true"] b { background: var(--sq-teal); color: #fff; }
.cm-boxes.is-cropping { display: none; }
@keyframes cm-pop { from { opacity: 0; transform: scale(1.04); } }

.cm-finding { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cm-scanline { position: absolute; inset: 0 0 auto; height: 30%; background: linear-gradient(to bottom, rgba(45, 212, 191, 0), rgba(45, 212, 191, .25) 85%, rgba(94, 234, 212, .9)); border-bottom: 2px solid #5eead4; animation: cm-scan 1.4s ease-in-out infinite; }
@keyframes cm-scan { from { transform: translateY(-100%); } to { transform: translateY(340%); } }

.cm-sheet { flex: 0 0 auto; padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #fff; color: var(--sq-ink); }
.cm-finding-text { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 120px; color: var(--sq-muted); font-size: 15px; }
.cm-spin { width: 16px; height: 16px; border: 2.5px solid var(--sq-teal); border-right-color: transparent; border-radius: 50%; animation: sq-spin .8s linear infinite; }
.cm-chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cm-chips button { flex: 0 0 auto; width: 40px; height: 40px; border: 1px solid var(--sq-line); border-radius: 50%; background: #fff; color: var(--sq-ink); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.cm-chips button[aria-selected="true"] { border-color: var(--sq-teal); background: var(--sq-teal); color: #fff; }
.cm-chosen { display: grid; place-items: center; height: 74px; margin-top: 12px; overflow: hidden; border: 1px solid var(--sq-line); border-radius: 12px; background: #fafbfa; }
.cm-chosen img { max-width: 100%; max-height: 72px; }
.cm-go { width: 100%; min-height: 50px; margin-top: 12px; font-size: 16px; }
.cm-sub { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: var(--sq-muted); font-size: 12.5px; }
.cm-link { padding: 4px 0; border: 0; background: none; color: var(--sq-teal); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cm-crop-hint { margin-bottom: 12px; color: var(--sq-muted); font-size: 14px; text-align: center; }
.cm-crop-hint b { color: var(--sq-ink); }
.cm-proto-note { margin-top: 8px; color: #9aa9a5; font-size: 11.5px; text-align: center; }
.cm-orientation-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #fff6df; color: #765322; font-size: 13px; line-height: 1.5; }
.cm-retry { width: 100%; margin: 12px 0; }

@media (min-width: 760px) {
  .cm-pick-top { display: flex; }
  .cm-pick-actions { margin-left: auto; }
  .cm-stage-wrap { padding: 8px 40px 16px; }
  .cm-sheet { width: 520px; margin: 0 auto; }
}
