:root {
  --blue: #1788eb;
  --blue-dark: #0876d8;
  --blue-light: #eaf5ff;
  --bg: #f2f6fb;
  --panel: #ffffff;
  --line: #e8edf2;
  --text: #252b31;
  --muted: #8a939c;
  --danger: #c03f3f;
  --viewer: #050708;
  --font: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

@font-face { font-family: "ft-image-icon"; src: url("assets/ftimage-iconfont.woff") format("woff"); font-display: block; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: var(--font); background: #e8ebee; color: var(--text); font-size: 14px; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.mobile-app { position: relative; width: min(430px, 100vw); min-height: 100vh; margin: 0 auto; overflow: hidden; background: var(--bg); box-shadow: 0 0 18px rgba(37,48,58,.16); }
.wechat-shell { position: fixed; top: 0; left: 50%; z-index: 20; width: min(430px, 100vw); height: 52px; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; transform: translateX(-50%); background: #ededed; border-bottom: 1px solid #dedede; }
.wechat-shell h1 { margin: 0; overflow: hidden; font-size: 17px; font-weight: 500; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.wechat-shell button { height: 52px; border: 0; color: #171717; background: transparent; }
.wechat-back { position: relative; }
.wechat-back::before { content: ""; position: absolute; top: 17px; left: 21px; width: 14px; height: 14px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.wechat-more { display: flex; align-items: center; justify-content: center; gap: 4px; }
.wechat-more span { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

.screen { display: none; min-height: 100vh; padding-top: 52px; background: var(--bg); }
.screen.active { display: block; }

.official-account-screen { position: relative; height: 100vh; min-height: 620px; overflow: hidden; padding-bottom: 76px; background: #f5f5f5; }
.official-chat-time { padding: 26px 16px 18px; color: #a2a5a9; font-size: 13px; text-align: center; }
.official-message-row { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: start; padding: 0 14px; }
.official-avatar { width: 48px; height: 48px; display: grid; place-content: center; overflow: hidden; color: #fff; background: #0752b9; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); position: relative; text-align: center; }
.official-avatar::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(142,220,255,.8); border-radius: 50%; }
.official-avatar b,
.official-avatar small { z-index: 1; display: block; line-height: 1; }
.official-avatar b { font: 700 12px Arial, sans-serif; letter-spacing: .5px; }
.official-avatar small { margin-top: 4px; font-size: 8px; }
.official-message-bubble { min-width: 0; padding: 14px 15px 13px; color: #25282c; background: #e9e9eb; border-radius: 7px; position: relative; font-size: 15px; line-height: 1.52; }
.official-message-bubble::before { content: ""; position: absolute; top: 14px; left: -7px; width: 14px; height: 14px; background: #e9e9eb; transform: rotate(45deg); }
.official-message-bubble p { margin: 0; }
.official-message-bubble a { display: block; margin: 2px 0; color: #3e67a4; text-decoration: none; word-break: break-all; }
.official-menu { position: fixed; left: 50%; bottom: 8px; z-index: 12; width: min(calc(100vw - 16px), 414px); height: 58px; display: grid; grid-template-columns: 1fr 1fr 48px; overflow: hidden; transform: translateX(-50%); background: #fff; border: 1px solid #d7d7d7; border-radius: 9px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.official-menu button { color: #25282c; background: #fff; border: 0; border-right: 1px solid #ececec; font-size: 16px; }
.official-menu button:last-child { border-right: 0; }
.official-keyboard span { width: 22px; height: 22px; display: block; margin: auto; border: 2px solid #686b6e; border-radius: 50%; position: relative; }
.official-keyboard span::before { content: ""; position: absolute; top: 5px; left: 5px; width: 2px; height: 2px; background: #686b6e; box-shadow: 4px 0 #686b6e, 8px 0 #686b6e, 0 4px #686b6e, 4px 4px #686b6e, 8px 4px #686b6e, 0 8px #686b6e, 4px 8px #686b6e, 8px 8px #686b6e; }

.privacy-notice { min-height: 48px; padding: 12px 18px 12px 44px; color: #5a9ed7; background: #eff8ff; font-size: 13px; line-height: 1.75; position: relative; }
.privacy-notice::before { content: ""; position: absolute; left: 18px; top: 17px; width: 16px; height: 13px; border: 2px solid #5aa5df; border-radius: 50%; }
.privacy-notice::after { content: "i"; position: absolute; left: 24px; top: 14px; color: #5aa5df; font-weight: 600; }
.login-content { min-height: calc(100vh - 100px); padding: 30px 24px; background: #fff; }
.login-heading h2 { margin: 0 0 9px; font-size: 27px; font-weight: 500; }
.login-heading p { margin: 0 0 28px; color: #a1a7ad; font-size: 13px; }
#login-form { display: grid; gap: 0; }
.line-field { height: 61px; display: grid; grid-template-columns: 118px 1fr; align-items: center; border-bottom: 1px solid #e3e6e9; }
.line-field > span { padding-left: 24px; font-size: 16px; position: relative; }
.line-field > span::before { content: ""; position: absolute; left: 1px; top: 50%; width: 13px; height: 13px; border: 1.6px solid #42a0dd; border-radius: 50%; transform: translateY(-60%); }
.line-field > span::after { content: ""; position: absolute; left: -2px; top: 56%; width: 19px; height: 10px; border: 1.6px solid #42a0dd; border-top: 0; border-radius: 0 0 12px 12px; }
.line-field input { width: 100%; height: 48px; padding: 0 0 0 8px; border: 0; outline: 0; color: #343a40; background: transparent; font-size: 15px; }
.line-field input::placeholder { color: #c3c7cb; }
.form-error { margin: 12px 0 0; color: var(--danger); font-size: 13px; line-height: 1.5; }
.primary-button, .secondary-button { height: 42px; padding: 0 18px; border-radius: 5px; font-weight: 500; }
.primary-button { color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.primary-button:active { background: var(--blue-dark); }
.primary-button:disabled { background: #b7c5cf; border-color: #b7c5cf; cursor: default; }
.secondary-button { color: #52616b; background: #fff; border: 1px solid #cfd7dc; }
.wide { width: 100%; }
.login-submit { height: 48px; margin-top: 30px; border-radius: 6px; font-size: 17px; box-shadow: 0 7px 18px rgba(23,136,235,.2); }
.secure-note { margin: 21px 0 0; color: #9ca3aa; font-size: 12px; text-align: center; }
.secure-note::before { content: ""; width: 9px; height: 11px; display: inline-block; margin-right: 6px; border: 2px solid #9ca3aa; border-radius: 2px; vertical-align: -2px; }

.records-title { padding: 17px 18px 15px; background: #fff; border-bottom: 1px solid var(--line); }
.records-title > div { display: flex; align-items: baseline; gap: 10px; }
.records-title strong { font-size: 19px; font-weight: 500; }
.records-title span, .records-title p { color: var(--muted); }
.records-title p { margin: 8px 0 0; font-size: 12px; }
.record-list { background: #fff; }
.record-group-title { height: 39px; display: flex; align-items: center; padding: 0 16px; color: #52616b; background: #e9f3ff; font-size: 15px; font-weight: 500; }
.record-row { width: 100%; min-height: 94px; display: grid; grid-template-columns: 1fr 72px 14px; align-items: center; gap: 9px; padding: 14px 16px; color: var(--text); background: #fff; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.record-main { min-width: 0; }
.record-main strong, .record-main span, .record-main small { display: block; }
.record-main strong { overflow: hidden; font-size: 15px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.record-main span { margin-top: 7px; color: #4f5961; font-size: 15px; }
.record-main small { margin-top: 6px; color: #a4abb1; font-size: 13px; }
.record-tags { display: flex; justify-content: flex-end; gap: 4px; }
.record-tags span { min-width: 31px; padding: 3px 5px; color: #fff; background: #4a9bd2; border-radius: 2px; text-align: center; font-size: 12px; }
.record-tags span:last-child { background: #ff8a27; }
.record-arrow { width: 9px; height: 9px; border-top: 1px solid #c9ced3; border-right: 1px solid #c9ced3; transform: rotate(45deg); }

#screen-detail { padding-bottom: 22px; background: linear-gradient(#1788eb 0, #1788eb 260px, #eef5ff 510px, #f2f6fb 100%); }
.study-hero { margin: 16px 8px 13px; overflow: hidden; background: #fff; border-radius: 8px; box-shadow: 0 3px 12px rgba(36,100,158,.14); }
.study-hero > p { margin: 0; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 18px; text-align: center; }
.study-patient { display: flex; align-items: center; gap: 13px; padding: 16px 18px 8px; }
.avatar { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 50%; background: #438fe8; position: relative; }
.avatar::before { content: ""; position: absolute; left: 21px; top: 12px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.avatar::after { content: ""; position: absolute; left: 13px; bottom: 10px; width: 34px; height: 18px; border-radius: 18px 18px 8px 8px; background: #fff; }
.study-patient div strong, .study-patient div span { display: block; }
.study-patient strong { font-size: 18px; font-weight: 500; }
.study-patient span { margin-top: 6px; color: #3784c7; }
.study-type { display: flex; align-items: center; gap: 6px; padding: 3px 16px 6px; color: #2679bf; }
.study-type > span { padding: 2px 5px; color: #fff; background: #4b9dd4; border-radius: 2px; }
.study-type strong { font-size: 15px; font-weight: 500; }
.study-summary { margin: 0; padding: 3px 16px 13px; }
.study-summary div { display: grid; grid-template-columns: 78px 1fr; padding: 4px 0; }
.study-summary dt { color: #4e5962; }
.study-summary dd { margin: 0; color: #3f4850; word-break: break-all; }
.study-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 15px 16px 16px; }
.study-actions button { height: 68px; display: grid; grid-template-columns: 62px 1fr; align-items: center; padding: 0 12px; border: 0; border-radius: 18px; color: #5a5e66; background: #fff; box-shadow: rgba(20,121,255,.3) 0 2px 10px; text-align: left; }
.study-actions button > i { height: 68px; display: grid; place-items: center; }
.study-actions button > i img { width: 48px; height: 44px; object-fit: contain; }
.study-actions button > strong { font-size: 14px; font-weight: 400; white-space: nowrap; }
.history-card { margin: 0 8px; min-height: 82px; display: grid; grid-template-columns: 1fr 46px; align-items: center; gap: 10px; padding: 13px 16px; background: #fff; border-radius: 8px; box-shadow: 0 3px 12px rgba(36,100,158,.1); }
.history-card strong, .history-card span { display: block; }
.history-card strong { font-size: 16px; font-weight: 500; }
.history-card span { margin-top: 6px; color: #a0a7ad; font-size: 12px; }
.history-card button { border: 0; color: var(--blue); background: transparent; }

#screen-report { padding-bottom: 22px; background: #fff; }
.report-paper { margin: 0; padding: 22px 18px 26px; background: #fff; }
.report-paper header { text-align: center; }
.report-paper header p { margin: 0 0 7px; color: #69737b; }
.report-paper header h2 { margin: 0 0 18px; font-size: 21px; font-weight: 500; }
.report-meta { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 12px 0; border-top: 1px solid #cfd5da; border-bottom: 1px solid #cfd5da; }
.report-meta div { display: grid; grid-template-columns: 64px 1fr; padding: 5px 0; }
.report-meta dt { color: #737c84; }
.report-meta dd { margin: 0; word-break: break-all; }
.report-meta div:nth-child(5), .report-meta div:nth-child(6) { grid-column: 1 / -1; }
.report-section h3 { margin: 20px 0 8px; font-size: 15px; font-weight: 500; }
.report-section p { margin: 0; color: #404a51; line-height: 1.9; text-align: justify; }
.report-sign { display: grid; gap: 7px; margin-top: 22px; padding-top: 14px; border-top: 1px solid #dfe3e6; color: #6e7880; font-size: 12px; }

.viewer-screen { height: 100vh; min-height: 650px; overflow: hidden; color: #e6eaec; background: var(--viewer); }
.viewer-screen.active { display: flex; flex-direction: column; }
.viewer-study-head { height: 48px; flex: 0 0 48px; display: grid; grid-template-columns: 1fr 56px; align-items: center; padding: 0 12px; border-bottom: 1px solid #2c3437; }
.viewer-study-head strong, .viewer-study-head span { display: block; }
.viewer-study-head strong { font-size: 14px; }
.viewer-study-head span { max-width: 300px; margin-top: 2px; overflow: hidden; color: #9da8ad; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.viewer-study-head button { color: #c9d1d5; background: transparent; border: 0; }
.viewer-patient-bar { height: 31px; flex: 0 0 31px; display: flex; justify-content: space-between; align-items: center; padding: 0 10px; color: #b9c1c5; border-bottom: 1px solid #222a2d; font-size: 10px; }
.viewport-wrap { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 4px 28px 4px 4px; }
.viewport { position: relative; width: min(100%, calc(100vh - 305px)); aspect-ratio: 1; overflow: hidden; background: #000; border: 1px solid #364044; touch-action: none; }
.image-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform-origin: center; }
.image-layer img { width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; filter: brightness(1) contrast(1); }
.measurement-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.measurement-line, .measurement-arm { fill: none; stroke: #ffe05b; stroke-width: 2; }
.measurement-point { fill: #ffe05b; }
.measurement-label { fill: #ffe05b; font: 14px Arial, sans-serif; paint-order: stroke; stroke: #000; stroke-width: 3px; stroke-linejoin: round; }
.overlay { position: absolute; z-index: 2; color: #f2f3d5; font: 9px/1.45 Arial, sans-serif; text-shadow: 1px 1px #000; pointer-events: none; }
.top-left { top: 6px; left: 7px; }.top-right { top: 6px; right: 7px; text-align: right; }.bottom-left { left: 7px; bottom: 6px; }.bottom-right { right: 7px; bottom: 6px; text-align: right; }
.orientation { position: absolute; z-index: 2; color: #d9e3e2; font: 11px Arial, sans-serif; text-shadow: 1px 1px #000; }
.orientation-left { left: 5px; top: 50%; }.orientation-right { right: 5px; top: 50%; }.orientation-top { top: 5px; left: 50%; }.orientation-bottom { bottom: 5px; left: 50%; }
.slice-control { position: absolute; top: 8px; bottom: 8px; right: 3px; display: flex; flex-direction: column; align-items: center; gap: 5px; color: #89959a; font-size: 8px; }
.slice-control input { flex: 1; width: 18px; writing-mode: vertical-lr; direction: rtl; accent-color: #9bc3dc; }
.series-strip { height: 82px; flex: 0 0 82px; display: flex; gap: 7px; padding: 7px 9px; overflow-x: auto; border-top: 1px solid #252d30; }
.series-item { min-width: 117px; display: grid; grid-template-columns: 54px 1fr; grid-template-rows: 1fr 1fr; column-gap: 7px; align-items: center; padding: 5px; color: #c4ccd0; background: #14191b; border: 1px solid #394347; text-align: left; }
.series-item.active { border-color: #77acd0; color: #fff; }
.series-item img { width: 54px; height: 54px; grid-row: 1 / 3; object-fit: cover; }
.series-item span { align-self: end; font-size: 10px; }.series-item small { align-self: start; color: #879399; font-size: 9px; }
.viewer-toolbar { height: 50px; flex: 0 0 50px; display: flex; overflow-x: auto; border-top: 1px solid #30393c; border-bottom: 1px solid #30393c; }
.viewer-toolbar button { min-width: 72px; color: #bbc4c8; background: #171c1e; border: 0; border-right: 1px solid #30393c; font-size: 11px; }
.viewer-toolbar button.active { color: #fff; background: #2d5d79; }
.viewer-hint { height: 26px; flex: 0 0 26px; margin: 0; display: flex; align-items: center; justify-content: center; color: #8f9a9e; font-size: 9px; }

.modal-mask { position: fixed; inset: 0; left: 50%; z-index: 40; width: min(430px, 100vw); display: flex; align-items: flex-end; justify-content: center; padding: 14px; transform: translateX(-50%); background: rgba(17,25,30,.55); }
.center-modal { align-items: center; }
.modal-panel { width: 100%; max-height: calc(100vh - 28px); overflow-y: auto; background: #fff; border-radius: 9px 9px 3px 3px; box-shadow: 0 6px 20px rgba(15,33,46,.22); }
.modal-panel > header, .authorization-panel > header, #share-form-view > header, .share-result > header { padding: 19px 18px 15px; border-bottom: 1px solid var(--line); }
.modal-panel h2 { margin: 0; font-size: 18px; font-weight: 500; }
.modal-panel header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.modal-panel footer { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 18px; border-top: 1px solid var(--line); }
.authorization-message { margin: 15px 18px 2px; padding: 0; color: #46525a; background: transparent; border: 0; line-height: 1.75; }
.authorization-detail { margin: 0; padding: 8px 18px; }
.authorization-detail div { display: grid; grid-template-columns: 72px 1fr; gap: 9px; padding: 8px 0; border-bottom: 1px solid #edf0f2; }
.authorization-detail dt { color: var(--muted); }.authorization-detail dd { margin: 0; line-height: 1.6; }
.consent-line { display: flex; gap: 9px; padding: 11px 18px 16px; color: #37464e; line-height: 1.55; }
.consent-line input { margin-top: 3px; accent-color: var(--blue); }
.option-list { padding: 10px 18px; }.option-item { display: flex; align-items: flex-start; gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf0f2; }.option-item:last-child { border-bottom: 0; }
.option-item input { margin-top: 4px; accent-color: var(--blue); }.option-item span, .option-item strong, .option-item small { display: block; }.option-item small { margin-top: 5px; color: var(--muted); }
.task-progress { padding: 7px 18px 16px; }.task-progress > div { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 12px; }.task-progress i { display: block; height: 5px; overflow: hidden; background: #e5eaed; }.task-progress b { display: block; width: 0; height: 100%; background: var(--blue); transition: width .2s; }
.form-block { padding: 15px 18px 4px; }.field-title { display: block; margin-bottom: 10px; color: #4f5f68; }.radio-line { display: inline-flex; align-items: center; margin-right: 15px; color: var(--text); }.radio-line input { margin-right: 5px; accent-color: var(--blue); }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.choice-row button { height: 36px; color: #4c5b63; background: #fff; border: 1px solid #c5ced3; border-radius: 3px; }.choice-row button.active { color: var(--blue); border-color: var(--blue); background: var(--blue-light); }
.password-field { display: block; padding: 14px 18px 18px; }.password-field span { display: block; margin-bottom: 8px; }.password-field input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #d5dce1; border-radius: 4px; }
.share-result dl { margin: 0; padding: 9px 18px; }.share-result dl div { display: grid; grid-template-columns: 84px 1fr; padding: 8px 0; }.share-result dt { color: var(--muted); }.share-result dd { margin: 0; text-align: right; }
.share-link-box { margin: 4px 18px 17px; padding: 11px; color: #3b4b54; background: #f4f6f7; border: 1px solid #d8dfe3; font-size: 12px; line-height: 1.5; word-break: break-all; }

.wechat-menu-mask { position: fixed; inset: 0; left: 50%; z-index: 60; width: min(430px, 100vw); display: flex; align-items: flex-end; transform: translateX(-50%); background: rgba(0,0,0,.45); }
.wechat-action-sheet { width: 100%; padding: 18px 12px 14px; background: #f7f7f7; }
.wechat-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wechat-actions button { border: 0; color: #3d4247; background: transparent; font-size: 12px; }
.wechat-actions button span { width: 48px; height: 48px; display: block; margin: 0 auto 8px; border-radius: 8px; background: #fff; position: relative; }
.wechat-actions button span::before { content: ""; position: absolute; inset: 13px; border: 2px solid #5f6971; border-radius: 3px; }
.wechat-menu-cancel { width: 100%; height: 47px; margin-top: 18px; color: #262a2e; background: #fff; border: 0; border-radius: 3px; font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: 90px; z-index: 70; min-width: 150px; padding: 10px 14px; transform: translateX(-50%); color: #fff; background: rgba(25,34,39,.9); border-radius: 3px; text-align: center; font-size: 12px; }

/* 依据用户录屏还原数字影像详情、影像查看、分享与下载 */
#screen-detail { background: #e8f3ff; }
.detail-banner { height: 158px; overflow: hidden; position: relative; background: #168df1; }
.detail-banner img { position: absolute; top: 0; left: 0; width: 100%; height: auto; }
.study-hero { margin: -6px 7px 13px; position: relative; z-index: 2; border-radius: 18px 18px 7px 7px; }
.study-hero > p { font-size: 18px; }
.study-share-actions { height: 54px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #dce6ee; }
.study-share-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px; color: #1479ff; background: #fff; border: 0; border-right: 1px solid #dce6ee; font-size: 16px; }
.study-share-actions button:last-child { border-right: 0; }
.study-share-actions button > i { width: 22px; height: 22px; display: block; }
.share-mini-icon svg { width: 22px; height: 22px; display: block; }
.share-mini-icon rect { fill: #2d8ded; }
.share-mini-icon path { fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.share-mini-icon circle { fill: #fff; }
.history-card { border-radius: 7px; }

.viewer-hidden-meta { display: none; }
.viewer-screen { min-height: 650px; }
.viewer-toolbar { order: 1; height: 53px; flex: 0 0 53px; border-top: 0; }
.viewer-toolbar button { min-width: 64px; padding: 25px 4px 3px; color: #e4e7e9; background: linear-gradient(#27292b, #191b1d); border-right-color: #0c0d0e; position: relative; font-size: 11px; }
.viewer-toolbar button::before { content: ""; position: absolute; top: 7px; left: 50%; width: 15px; height: 15px; border: 1px solid #d6dadd; transform: translateX(-50%); }
.viewer-toolbar button.active { background: #3a6c93; }
.series-strip { order: 2; height: 98px; flex: 0 0 98px; gap: 5px; padding: 7px; background: #000; }
.series-item { min-width: 95px; display: block; padding: 3px; border: 2px solid #4b4f52; border-radius: 8px; background: #000; text-align: center; position: relative; overflow: hidden; }
.series-item.active { border-color: #8c9296; }
.series-item img { width: 100%; height: 100%; opacity: .58; object-fit: cover; }
.series-item span, .series-item small { position: absolute; left: 2px; right: 2px; color: #e7eaec; text-shadow: 0 1px 2px #000; }
.series-item span { top: 29px; font-size: 12px; }.series-item small { bottom: 5px; font-size: 10px; }
.viewport-wrap { order: 3; padding: 4px 25px 4px 4px; border-top: 1px solid #373b3d; }
.viewport { width: min(100%, calc(100vh - 250px)); border: 0; }
.viewer-hint { order: 4; height: 22px; flex: 0 0 22px; }
.image-layer img.is-inverted { filter: invert(1) brightness(1) contrast(1) !important; }

.sheet-title { min-height: 58px; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: 0 12px !important; text-align: center; }
.sheet-title h2 { grid-column: 2; }
.sheet-close, .sheet-back { width: 36px; height: 36px; border: 0; background: transparent; position: relative; }
.sheet-close { grid-column: 3; }
.sheet-close::before, .sheet-close::after { content: ""; position: absolute; top: 17px; left: 10px; width: 17px; height: 1px; background: #aeb5ba; transform: rotate(45deg); }
.sheet-close::after { transform: rotate(-45deg); }
.sheet-back { grid-column: 1; grid-row: 1; }
.sheet-back::before { content: ""; position: absolute; top: 12px; left: 12px; width: 11px; height: 11px; border-left: 2px solid #7a858d; border-bottom: 2px solid #7a858d; transform: rotate(45deg); }

.download-panel { min-height: 570px; border-radius: 16px 16px 0 0; }
.download-steps { height: 89px; display: grid; grid-template-columns: repeat(3, 1fr); padding: 14px 14px 6px; position: relative; }
.download-steps::before { content: ""; position: absolute; top: 28px; left: 18%; right: 18%; height: 2px; background: #acd1ee; }
.download-steps div { z-index: 1; text-align: center; color: #9bc6e7; }
.download-steps b { width: 24px; height: 24px; display: grid; place-items: center; margin: 0 auto 7px; color: #fff; background: #9bc6e7; border-radius: 50%; font-weight: 400; }
.download-steps span { font-size: 13px; }
.download-steps div.active { color: #2d91dc; }.download-steps div.active b { background: #2d91dc; }
#download-step-one { padding: 5px 14px 18px; }
.download-method { width: 100%; min-height: 72px; display: grid; grid-template-columns: 1fr 24px; align-items: center; gap: 8px; margin: 0 0 13px; padding: 0 16px; color: #28323a; background: #fff; border: 1px solid #1788eb; border-radius: 8px; text-align: left; }
.download-method strong { font-size: 15px; font-weight: 400; }
.download-method i { width: 18px; height: 18px; border: 1px solid #c7d1d9; border-radius: 50%; }
#download-step-two { padding: 0 16px 20px; }
.download-field { min-height: 58px; display: grid; grid-template-columns: 86px 1fr; align-items: center; border-bottom: 1px solid #e3e7ea; }
.download-field span { font-size: 15px; }
.download-field input { width: 100%; height: 44px; border: 0; outline: 0; }
.download-choice { margin: 0; padding: 13px 0; border: 0; border-bottom: 1px solid #e3e7ea; }
.download-choice legend { width: 82px; float: left; font-size: 15px; }
.download-choice label { display: inline-flex; align-items: center; margin: 0 10px 8px 0; color: #44515a; }
.download-choice input { accent-color: #2496e7; }
.switch-line { min-height: 52px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e3e7ea; }
.switch-line input { width: 43px; height: 24px; appearance: none; background: #dce2e7; border-radius: 13px; position: relative; }
.switch-line input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .2s; }
.switch-line input:checked { background: #2496e7; }.switch-line input:checked::before { left: 22px; }
.download-submit, .share-next { width: calc(100% - 40px); height: 45px; display: block; margin: 22px auto 6px; color: #1888e7; background: #fff; border: 1px solid #1888e7; border-radius: 23px; font-size: 16px; }
.download-success { padding: 54px 24px 30px; text-align: center; }
.success-check { width: 55px; height: 55px; display: block; margin: 0 auto 18px; border-radius: 50%; background: #2e9ae9; position: relative; }
.success-check::after { content: ""; position: absolute; left: 17px; top: 14px; width: 18px; height: 10px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg); }
.download-success h3 { margin: 0 0 9px; font-size: 18px; font-weight: 500; }.download-success p { margin: 0; color: #8b949b; line-height: 1.7; }
.task-progress { margin: 5px 16px 18px; padding: 0; }

.share-panel { border-radius: 16px 16px 0 0; }
.share-form-block { padding: 18px 20px 4px; }
.share-form-block > strong { display: block; margin-bottom: 13px; font-size: 15px; font-weight: 500; }
.share-option-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.share-option-row button { height: 34px; padding: 0 2px; color: #515b63; background: #f8fafc; border: 1px solid transparent; border-radius: 4px; }
.share-option-row button.active { color: #1888e7; background: #fff; border-color: #1888e7; }
.view-count-options { grid-template-columns: repeat(4, 1fr) 54px; }
.view-count-options input { width: 54px; min-width: 0; border: 1px solid #dde3e7; border-radius: 4px; }
.share-tabs { height: 47px; display: grid; grid-template-columns: 1fr 1fr; margin: 12px 16px 0; border-bottom: 1px solid #e2e6e9; }
.share-tabs button { border: 0; border-bottom: 2px solid transparent; color: #8b939a; background: #fff; font-size: 15px; }
.share-tabs button.active { color: #1888e7; border-bottom-color: #1888e7; }
.share-checks { display: grid; gap: 14px; padding: 17px 20px 4px; }
.share-checks label { color: #4c565e; }
.share-checks input { margin: 0 8px 0 0; accent-color: #34a5eb; }
.share-next { margin-top: 24px; }
.share-result .sheet-title { border-bottom: 1px solid var(--line); }

@media (max-width: 520px) {
  html, body { background: var(--bg); }
  .mobile-app { width: 100%; box-shadow: none; }
  .wechat-shell, .modal-mask, .wechat-menu-mask { width: 100vw; }
}

@media (max-height: 720px) {
  .viewer-screen { min-height: 620px; }
  .series-strip { height: 70px; flex-basis: 70px; }
  .series-item { min-width: 104px; grid-template-columns: 44px 1fr; }
  .series-item img { width: 44px; height: 44px; }
}

/* 真实移动端查看影像页 */
.viewer-screen,
.viewer-screen.active { display: none; height: 100vh; min-height: 0; overflow: hidden; background: #000; }
.viewer-screen.active { display: block; }
.preview-image-wrap { position: relative; height: calc(100vh - 52px); overflow: hidden; background: #000; color: #d1e4ff; }
.preview-image-wrap .preview-box { position: absolute; inset: 0 0 86px; width: auto; height: auto; aspect-ratio: auto; overflow: hidden; border: 0; background: #000; touch-action: none; }
.preview-image-wrap .image-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform-origin: center; }
.preview-image-wrap .image-layer img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; opacity: 1; user-select: none; pointer-events: none; }
.preview-image-wrap .measurement-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.viewer-image-info { position: absolute; z-index: 3; top: 5px; right: 5px; display: grid; color: #d1e4ff; font: 12px/1.25 Arial, sans-serif; text-align: right; }
.viewer-original-tip { position: absolute; z-index: 3; right: 10px; bottom: 120px; height: 30px; padding: 0 8px; color: #fff; background: rgba(69,127,202,.8); border-radius: 5px; font-size: 14px; line-height: 30px; }
.viewer-finger-icon,
.viewer-dicom-icon { font-family: "ft-image-icon"; font-style: normal; font-weight: 400; -webkit-font-smoothing: antialiased; }
.viewer-finger-icon::before { content: "\e651"; font-size: 17px; vertical-align: -1px; }
.viewer-dicom-entry { position: absolute; z-index: 3; right: 10px; bottom: 91px; width: 30px; height: 27px; padding: 0; color: #d1e4ff; background: transparent; border: 0; }
.viewer-dicom-icon::before { content: "\e663"; font-size: 21px; }
.preview-image-wrap .series-strip { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; width: 100%; height: 86px; display: flex; gap: 5px; margin: 0; padding: 5px; overflow-x: auto; overflow-y: hidden; background: #000; list-style: none; white-space: nowrap; }
.preview-image-wrap .series-strip li { width: 76px; height: 76px; flex: 0 0 76px; margin: 0; padding: 2px; overflow: hidden; background: rgba(255,255,255,.2); border-radius: 8px; }
.preview-image-wrap .series-strip li:has(.series-item.active) { background: #60646c; }
.preview-image-wrap .series-item { position: relative; width: 100%; min-width: 0; height: 100%; display: block; margin: 0; padding: 0; overflow: hidden; color: #fff; background: #000; border: 0; border-radius: 7px; }
.preview-image-wrap .series-item img { position: absolute; top: 50%; left: 50%; width: auto; height: auto; max-width: 100%; max-height: 100%; opacity: 1; object-fit: contain; transform: translate(-50%,-50%); }
.preview-image-wrap .series-item span { position: absolute; right: 0; bottom: 0; left: 0; padding: 0; color: #fff; font-size: 14px; line-height: 21px; text-align: center; text-shadow: 0 1px 2px #000; }

.share-password-field { margin: -3px 0 2px 26px; padding: 12px; background: #f7f9fb; border-radius: 5px; }
.share-password-field span,
.share-password-field small { display: block; }
.share-password-field span { margin-bottom: 9px; color: #4c565e; font-size: 14px; }
.share-password-field input { width: 100%; height: 40px; margin: 0 !important; padding: 0 11px; color: #303940; background: #fff; border: 1px solid #d8e0e6; border-radius: 4px; outline: 0; }
.share-password-field input:focus { border-color: #1888e7; }
.share-password-field small { margin-top: 7px; color: #929aa1; font-size: 12px; }

/* 原始影像阅片页 */
.dicom-screen { height: 100vh; min-height: 0; overflow: hidden; color: #fff; background: #000; }
.dicom-screen.active { display: flex; flex-direction: column; }
.dicom-toolbar { height: 55px; flex: 0 0 55px; display: flex; overflow-x: auto; overflow-y: hidden; background: #111; border-bottom: 1px solid #000; }
.dicom-toolbar button { width: 43px; min-width: 43px; height: 55px; display: grid; grid-template-rows: 31px 18px; place-items: center; padding: 2px 1px 0; overflow: hidden; color: #e1e5e7; background: linear-gradient(#303236,#191b1d); border: 0; border-right: 1px solid #0d0e0f; }
.dicom-toolbar button.active { background: #3d6e98; }
.dicom-toolbar i { align-self: end; font-family: "ft-image-icon"; font-size: 20px; font-style: normal; font-weight: 400; line-height: 27px; -webkit-font-smoothing: antialiased; }
.dicom-toolbar span { width: 100%; overflow: hidden; font-size: 10px; line-height: 16px; white-space: nowrap; text-overflow: ellipsis; }
.dicom-tool-wwwc::before { content: "\e610"; }.dicom-tool-presets::before { content: "\e761"; }.dicom-tool-roi::before { content: "\e63f"; }
.dicom-tool-invert::before { content: "\e6e0"; }.dicom-tool-page::before { content: "\eab7"; }.dicom-tool-one::before { content: "\e650"; }
.dicom-tool-zoom::before { content: "\e626"; }.dicom-tool-reset::before { content: "\e635"; }.dicom-tool-series::before { content: "\e647"; }
.dicom-series-strip { height: 80px; flex: 0 0 80px; display: flex; gap: 4px; margin: 0; padding: 4px 5px; overflow-x: auto; overflow-y: hidden; background: #000; list-style: none; }
.dicom-series-strip li { width: 91px; height: 72px; flex: 0 0 91px; }
.dicom-series-strip button { position: relative; width: 100%; height: 100%; display: block; overflow: hidden; color: #fff; background: #171717; border: 2px solid #282b2e; border-radius: 7px; }
.dicom-series-strip button.active { border-color: #747b80; }
.dicom-series-strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .58; }
.dicom-series-strip span,
.dicom-series-strip small { position: absolute; right: 2px; left: 2px; z-index: 1; display: block; overflow: hidden; color: #fff; text-align: center; text-shadow: 0 1px 2px #000; white-space: nowrap; text-overflow: ellipsis; }
.dicom-series-strip span { top: 20px; font-size: 12px; }.dicom-series-strip small { bottom: 4px; font-size: 10px; }
.dicom-viewport { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #000; border-top: 1px solid #353a3d; touch-action: none; }
.dicom-image-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform-origin: center; }
.dicom-image-layer img { width: auto; height: auto; max-width: 100%; max-height: 84%; object-fit: contain; user-select: none; pointer-events: none; }
.dicom-corner { position: absolute; z-index: 2; color: #f0f4f7; font: 11px/1.25 Arial, sans-serif; text-shadow: 1px 1px #000; pointer-events: none; }
.dicom-top-left { top: 8px; left: 6px; }.dicom-top-right { top: 8px; right: 6px; text-align: right; }
.dicom-bottom-left { bottom: 8px; left: 6px; }.dicom-bottom-right { right: 6px; bottom: 8px; text-align: right; }
.dicom-orientation { position: absolute; z-index: 2; color: #edf1f3; font: 17px Arial, sans-serif; text-shadow: 1px 1px #000; }
.dicom-h { top: 16px; left: 50%; transform: translateX(-50%); }.dicom-r { top: 50%; left: 34px; }.dicom-l { top: 50%; right: 9px; }.dicom-f { bottom: 15px; left: 50%; transform: translateX(-50%); }
.dicom-check { width: 12px; height: 12px; display: inline-block; border-radius: 3px; background: #edf1f3; vertical-align: -2px; }
.dicom-warning-panel { width: 312px; max-width: calc(100vw - 48px); overflow: hidden; border-radius: 7px; }
.dicom-warning-panel > p { margin: 0; padding: 27px 16px 25px; color: #3d4348; font-size: 16px; line-height: 1.55; text-align: center; }
.dicom-warning-panel > footer { height: 51px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; border-top: 1px solid #dce1e5; }
.dicom-warning-panel > footer button { height: 51px; color: #4b91e1; background: #fff; border: 0; font-size: 16px; }
.dicom-warning-panel > footer button + button { color: #fff; background: #4b91e1; border-left: 1px solid #dce1e5; }
