:root {
  --black: #111214;
  --charcoal: #1b1d20;
  --graphite: #2d3034;
  --paper: #f4f2ed;
  --white: #ffffff;
  --warm: #e8e4dc;
  --line: #d9d5cc;
  --muted: #74736f;
  --gold: #b79a61;
  --gold-light: #d4c39e;
  --danger: #7e3c34;
  --ease: cubic-bezier(.22,.8,.2,1);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: #d9d8d4; color: var(--black); font-family: Arial, "Microsoft YaHei", sans-serif; letter-spacing: 0; }
body { overflow-x: hidden; }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus { outline: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
a { color: inherit; }
[hidden] { display: none !important; }

.desktop-stage { position: relative; display: grid; min-height: 100vh; place-items: center; overflow: hidden; padding: 38px 24px; background: #dededa; }
.desktop-stage::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: url("./assets/legal-review.webp"); background-position: center; background-size: cover; filter: grayscale(1) contrast(.85); }
.desktop-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(222,222,218,.75), rgba(222,222,218,.97) 38%, rgba(222,222,218,.97) 62%, rgba(222,222,218,.72)); }
.stage-index { position: absolute; z-index: 2; top: 50%; left: max(32px, calc(50% - 610px)); width: 300px; transform: translateY(-50%); }
.stage-index > span { display: block; color: #777570; font-size: 9px; letter-spacing: .16em; }
.stage-index > strong { display: block; margin: 18px 0 21px; color: var(--black); font-family: Georgia, serif; font-size: 46px; line-height: .98; font-weight: 400; }
.stage-index > p { margin: 0; color: #74736f; font-size: 10px; line-height: 1.9; }
.device-label { position: absolute; z-index: 3; top: 20px; left: 50%; display: flex; align-items: center; gap: 8px; color: #706e69; font-size: 10px; transform: translateX(-50%); }
.device-label i { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 4px rgba(183,154,97,.15); animation: statusPulse 2.4s ease-in-out infinite; }

.device-shell { position: relative; z-index: 4; width: 390px; height: 844px; overflow: hidden; background: var(--paper); border: 9px solid #17181a; border-radius: 42px; box-shadow: 0 32px 80px rgba(17,18,20,.27), 0 0 0 1px rgba(255,255,255,.5); transform: translateZ(0); }
.device-shell::before { content: ""; position: absolute; z-index: 20; top: 0; left: 50%; width: 124px; height: 25px; background: #17181a; border-radius: 0 0 17px 17px; transform: translateX(-50%); pointer-events: none; }
.device-topbar { position: absolute; z-index: 19; top: 0; right: 0; left: 0; height: 35px; display: flex; align-items: center; justify-content: space-between; padding: 0 21px; color: var(--black); font-size: 10px; pointer-events: none; }
.device-topbar > span { display: flex; align-items: center; gap: 5px; }
.device-topbar i { display: block; width: 12px; height: 7px; border: 1px solid currentColor; border-radius: 2px; }
.device-topbar i:nth-child(2) { width: 15px; border-radius: 5px; }
.device-topbar strong { font-size: 9px; }
.device-home-indicator { position: absolute; z-index: 19; bottom: 5px; left: 50%; width: 108px; height: 4px; background: rgba(17,18,20,.8); border-radius: 8px; transform: translateX(-50%); pointer-events: none; }

.mini-header { position: absolute; z-index: 16; top: 27px; right: 0; left: 0; height: 51px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: rgba(244,242,237,.92); border-bottom: 1px solid rgba(217,213,204,.85); backdrop-filter: blur(15px); }
.mini-header > button { width: 34px; height: 34px; padding: 0; background: transparent; color: var(--black); font-size: 20px; }
.mini-header > div { display: flex; align-items: center; gap: 8px; }
.mini-header em { display: grid; width: 24px; height: 24px; place-items: center; background: var(--black); color: var(--gold-light); font-family: Georgia, serif; font-size: 13px; font-style: normal; }
.mini-header > div > span { display: grid; gap: 1px; }
.mini-header strong { font-size: 11px; }
.mini-header small { color: var(--muted); font-size: 6px; }
.mini-header #miniMore { font-size: 14px; }

.mini-app { position: relative; display: flex; width: 100%; height: 100%; background: var(--paper); }
.screen { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 91px 16px 82px; background: var(--paper); scrollbar-width: none; animation: screenEnter .4s var(--ease); }
.screen::-webkit-scrollbar { display: none; }
.screen.active { display: block; }
.screen button { transition: transform .18s var(--ease), background .18s, border-color .18s, color .18s, box-shadow .18s; }
.screen button:active { transform: scale(.98); }
.chat-screen { padding: 79px 0 162px; }

.chat-status { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px 10px; border-bottom: 1px solid var(--line); }
.chat-status > span { display: flex; align-items: center; gap: 7px; color: #6d6c68; font-size: 6px; letter-spacing: .12em; }
.chat-status > span i { width: 5px; height: 5px; background: var(--gold); border-radius: 50%; animation: statusPulse 2.4s ease-in-out infinite; }
.chat-status > button { padding: 0; background: transparent; color: #797873; font-size: 7px; text-decoration: underline; }
.conversation { padding: 18px 15px 28px; }
.message { display: grid; margin-bottom: 18px; animation: messageEnter .42s var(--ease); }
.assistant-message { grid-template-columns: 30px 1fr; gap: 9px; }
.assistant-avatar { display: grid; width: 28px; height: 28px; place-items: center; background: var(--black); color: var(--gold-light); font-family: SimSun, serif; font-size: 12px; }
.message-body { min-width: 0; }
.message-author { display: block; margin-bottom: 7px; color: #666661; font-size: 7px; }
.message-author b { margin-left: 5px; padding: 2px 5px; background: #e7e2d8; color: #665a42; font-size: 5px; letter-spacing: .08em; }
.assistant-message .message-body > p { margin: 0 0 8px; color: #343537; font-size: 10px; line-height: 1.72; }
.assistant-message .message-body > p strong { color: var(--black); }
.assistant-message .message-body > small { display: block; padding-top: 8px; border-top: 1px solid #e0ddd6; color: #8a8984; font-size: 6px; line-height: 1.6; }
.user-message { justify-items: end; }
.user-message .message-body { max-width: 85%; padding: 11px 13px; background: var(--charcoal); color: #fff; }
.user-message p { margin: 0; font-size: 10px; line-height: 1.65; }
.user-message time { display: block; margin-top: 6px; color: #9c9c99; font-size: 6px; text-align: right; }
.system-note { margin: 19px 0 4px 39px; padding: 10px 12px; border: 1px solid #d6d1c6; background: rgba(255,255,255,.6); }
.system-note strong { color: #5d5036; font-size: 7px; }
.system-note p { margin: 5px 0 0; color: #777570; font-size: 7px; line-height: 1.6; }

.prompt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 4px 0 18px 39px; }
.prompt-actions button { position: relative; min-height: 76px; padding: 11px; background: rgba(255,255,255,.72); border: 1px solid var(--line); color: var(--black); text-align: left; }
.prompt-actions button:hover { border-color: #a99b7d; box-shadow: 0 5px 16px rgba(17,18,20,.07); }
.prompt-actions span { display: block; margin-bottom: 12px; color: #837352; font-size: 6px; letter-spacing: .08em; }
.prompt-actions strong { display: block; width: 90%; font-size: 9px; line-height: 1.5; }
.prompt-actions i { position: absolute; right: 10px; bottom: 9px; color: var(--gold); font-size: 12px; font-style: normal; }

.composer-wrap { position: absolute; z-index: 13; right: 0; bottom: 67px; left: 0; padding: 9px 14px 8px; background: rgba(244,242,237,.96); border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
.composer-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.composer-tools button { padding: 0; background: transparent; color: #73726d; font-size: 8px; }
.composer-tools #attachButton { width: 22px; height: 22px; border: 1px solid #bcb7ad; font-size: 14px; }
.composer-tools span { flex: 1; overflow: hidden; color: #8b8983; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.composer { display: grid; grid-template-columns: 1fr 36px; align-items: end; gap: 7px; padding: 7px 7px 7px 11px; background: #fff; border: 1px solid #cfcac0; box-shadow: 0 4px 15px rgba(17,18,20,.05); }
.composer:focus-within { border-color: #8c7a58; }
.composer textarea { width: 100%; max-height: 82px; min-height: 29px; resize: none; padding: 7px 0 3px; border: 0; outline: 0; background: transparent; color: var(--black); font-size: 10px; line-height: 1.5; }
.composer > button { display: grid; width: 34px; height: 34px; place-items: center; background: var(--black); color: var(--gold-light); font-size: 16px; }
.composer-wrap > p { margin: 6px 0 0; color: #92908a; font-size: 5px; line-height: 1.5; text-align: center; }
.composer-wrap > p a { color: #665637; font-weight: 900; text-decoration: none; }

.typing-dots { display: flex; gap: 4px; width: fit-content; padding: 11px 13px; background: #fff; border: 1px solid var(--line); }
.typing-dots i { width: 4px; height: 4px; background: #85837d; border-radius: 50%; animation: typing 1.1s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: .14s; }
.typing-dots i:nth-child(3) { animation-delay: .28s; }

.analysis-card, .legal-summary, .tool-card, .document-card, .review-score, .clause-risks { margin: 10px 0; background: #fff; border: 1px solid var(--line); }
.analysis-card > header { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px 8px; }
.analysis-card header span { color: #706f6b; font-size: 7px; letter-spacing: .08em; }
.analysis-card header b { padding: 4px 7px; background: #e9e2d3; color: #5f5031; font-size: 7px; }
.risk-line { height: 2px; margin: 0 12px; overflow: hidden; background: #e7e3db; }
.risk-line i { display: block; width: 76%; height: 100%; background: var(--gold); animation: riskGrow .9s var(--ease); }
.analysis-card dl { display: grid; grid-template-columns: repeat(3,1fr); margin: 10px 0 0; border-top: 1px solid #e6e2da; }
.analysis-card dl > div { padding: 10px 7px; }
.analysis-card dl > div + div { border-left: 1px solid #e6e2da; }
.analysis-card dt { color: #898782; font-size: 6px; }
.analysis-card dd { margin: 4px 0 0; color: var(--black); font-size: 8px; font-weight: 900; }
.legal-summary { padding: 12px; border-left: 3px solid var(--gold); }
.legal-summary > span, .evidence-list > span { display: block; color: #7a6845; font-size: 7px; font-weight: 900; }
.legal-summary p { margin: 7px 0 0; color: #50514f; font-size: 8px; line-height: 1.7; }
.evidence-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0; }
.evidence-list > span { width: 100%; margin-bottom: 3px; }
.evidence-list b { padding: 5px 7px; background: #ebe8e1; color: #4a4a47; font-size: 6px; font-weight: 500; }
.message-actions { display: flex; gap: 7px; margin: 11px 0 9px; }
.message-actions button { min-height: 31px; padding: 0 11px; background: var(--black); color: #fff; font-size: 7px; }
.message-actions button + button { background: transparent; border: 1px solid #aaa69d; color: var(--black); }

.tool-card { padding: 12px; }
.tool-card > header { margin: -12px -12px 13px; padding: 11px 12px; background: var(--charcoal); color: #fff; }
.tool-card > header span { display: block; margin-bottom: 5px; color: var(--gold-light); font-size: 5px; letter-spacing: .12em; }
.tool-card > header strong { font-size: 10px; }
.tool-card label { display: block; margin-bottom: 10px; }
.tool-card label > span { display: block; margin-bottom: 5px; color: #72716c; font-size: 6px; }
.tool-card input, .tool-card textarea { width: 100%; min-height: 34px; padding: 8px 9px; border: 1px solid #d8d3ca; outline: 0; background: #faf9f6; color: var(--black); font-size: 8px; }
.tool-card textarea { min-height: 65px; resize: none; line-height: 1.55; }
.tool-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.strategy-pills { display: flex; gap: 5px; margin-bottom: 12px; }
.strategy-pills button { min-height: 29px; flex: 1; padding: 0 5px; background: transparent; border: 1px solid #cdc8be; color: #6d6b66; font-size: 6px; }
.strategy-pills button.active { background: var(--charcoal); border-color: var(--charcoal); color: var(--gold-light); }
.tool-primary { width: 100%; min-height: 38px; background: var(--black); color: #fff; font-size: 8px; }

.document-card > header { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-bottom: 1px solid var(--line); }
.document-card header span { font-family: SimSun, serif; font-size: 11px; font-weight: 900; }
.document-card header b { color: #7a6845; font-size: 6px; }
.document-card > p { margin: 0; padding: 11px 12px; color: #5c5b57; font-size: 7px; line-height: 1.7; }
.document-card ol { margin: 0; padding: 0 12px 8px 29px; color: #424340; font-size: 7px; line-height: 1.85; }
.document-card > footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #f0ede7; }
.document-card footer span { color: #605335; font-size: 8px; font-weight: 900; }
.document-card footer button { padding: 0; background: transparent; color: var(--black); font-size: 7px; text-decoration: underline; }

.upload-tool-card { text-align: center; }
.upload-tool-card > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-symbol { display: grid; width: 42px; height: 42px; margin: 5px auto 11px; place-items: center; border: 1px solid #bcb6aa; color: #6d6045; font-size: 19px; }
.upload-tool-card > strong { display: block; font-size: 9px; }
.upload-tool-card > p { margin: 6px 0 12px !important; color: #85837d !important; font-size: 6px !important; }
.upload-tool-card > div:not(.upload-symbol) { display: flex; justify-content: center; gap: 6px; }
.upload-tool-card > div button { min-height: 30px; padding: 0 10px; background: var(--black); color: #fff; font-size: 6px; }
.upload-tool-card > div button + button { background: transparent; border: 1px solid #aaa69d; color: var(--black); }
.tool-agreement { display: flex !important; align-items: flex-start; gap: 7px; margin: 12px 0 !important; text-align: left; }
.tool-agreement input { width: 13px !important; min-height: 13px !important; padding: 0 !important; accent-color: var(--black); }
.tool-agreement span { margin: 0 !important; color: #74726d !important; font-size: 6px !important; line-height: 1.5; }
.review-loading { padding: 16px 12px; text-align: center; }
.review-loading .scan-track { position: relative; height: 1px; margin: 14px 0; overflow: hidden; background: #d4d0c8; }
.review-loading .scan-track i { position: absolute; width: 35%; height: 100%; background: var(--gold); animation: scanTrack 1s ease-in-out infinite; }
.review-loading strong { display: block; font-size: 8px; }
.review-loading p { margin: 5px 0 0 !important; color: #807e78 !important; font-size: 6px !important; }
.review-finished { border-left: 2px solid var(--gold); background: #f0ede7; text-align: left; }

.review-score { display: grid; grid-template-columns: 1fr 1.25fr; background: var(--charcoal); color: #fff; }
.review-score > div { padding: 13px; border-right: 1px solid #35383b; }
.review-score > div span { display: block; color: var(--gold-light); font-family: Georgia, serif; font-size: 28px; }
.review-score > div small { color: #aaa9a5; font-size: 6px; }
.review-score > p { margin: 0 !important; padding: 13px !important; color: #c7c6c2 !important; font-size: 7px !important; line-height: 1.9 !important; }
.review-score > p b { color: var(--gold-light); }
.clause-risks article + article { border-top: 1px solid var(--line); }
.clause-risks article > button { display: grid; grid-template-columns: 24px 1fr auto; width: 100%; align-items: center; gap: 8px; padding: 10px; background: transparent; text-align: left; }
.clause-risks article > button i { display: grid; width: 22px; height: 22px; place-items: center; background: #e9e3d8; color: #695838; font-size: 6px; font-style: normal; font-weight: 900; }
.clause-risks article > button strong, .clause-risks article > button small { display: block; }
.clause-risks article > button strong { font-size: 8px; }
.clause-risks article > button small { margin-top: 3px; color: #85837d; font-size: 6px; }
.clause-risks article > button em { color: #77756f; font-style: normal; }
.clause-risks article > div { display: none; padding: 0 11px 11px 42px; }
.clause-risks article.expanded > div { display: block; animation: messageEnter .25s ease; }
.clause-risks article > div p { margin: 0 0 7px !important; color: #61615d !important; font-size: 7px !important; line-height: 1.65 !important; }
.clause-risks article > div b { color: #675739; font-size: 7px; line-height: 1.55; }

.section-head { margin: 4px 0 24px; }
.section-head span, .recent-title span, .profile-header > span, .prototype-panel > span, .contact-panel > span { color: #817151; font-size: 6px; letter-spacing: .12em; }
.section-head h1 { margin: 9px 0 7px; font-family: Georgia, "Microsoft YaHei", serif; font-size: 25px; font-weight: 400; }
.section-head p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.6; }
.document-launchers { display: grid; gap: 9px; }
.document-launchers > button { position: relative; display: grid; grid-template-columns: 37px 1fr; min-height: 112px; align-items: start; gap: 11px; padding: 15px; background: var(--charcoal); color: #fff; text-align: left; }
.document-launchers > button + button { background: #fff; border: 1px solid var(--line); color: var(--black); }
.document-launchers i { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #5d5e60; color: var(--gold-light); font-size: 7px; font-style: normal; }
.document-launchers > button + button i { border-color: #c7c2b8; color: #796743; }
.document-launchers strong, .document-launchers small { display: block; }
.document-launchers strong { margin-top: 2px; font-size: 12px; }
.document-launchers small { margin-top: 7px; color: #a8a7a3; font-size: 7px; line-height: 1.55; }
.document-launchers > button + button small { color: var(--muted); }
.document-launchers em { position: absolute; left: 63px; bottom: 14px; color: var(--gold-light); font-size: 7px; font-style: normal; }
.document-launchers > button + button em { color: #6e5c38; }
.recent-title { display: flex; align-items: end; justify-content: space-between; margin: 26px 0 10px; }
.recent-title strong { font-size: 12px; }
.document-list, .record-list { display: grid; gap: 7px; }
.document-list article, .record-list article { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 11px; background: #fff; border: 1px solid var(--line); }
.document-list article > i, .record-list article > span { display: grid; width: 36px; height: 40px; place-items: center; background: #eeeae2; color: #645537; font-size: 7px; font-style: normal; font-weight: 900; }
.document-list strong, .document-list p, .document-list small, .record-list strong, .record-list p, .record-list small { display: block; }
.document-list strong, .record-list strong { font-size: 8px; }
.document-list p, .record-list p { margin: 4px 0 0; color: #666560; font-size: 6px; }
.document-list small, .record-list small { margin-top: 4px; color: #9a9892; font-size: 5px; }
.document-list article > button, .record-list article > button { background: transparent; color: #74716b; font-size: 17px; }
.privacy-line { margin-top: 15px; padding: 13px; border-top: 1px solid #cfcac0; border-bottom: 1px solid #cfcac0; }
.privacy-line strong { font-size: 8px; }
.privacy-line p { margin: 6px 0 0; color: var(--muted); font-size: 7px; line-height: 1.65; }

.record-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-bottom: 13px; background: var(--charcoal); color: #fff; }
.record-stats span { padding: 12px 5px; color: #aaa9a5; font-size: 6px; text-align: center; }
.record-stats span + span { border-left: 1px solid #343639; }
.record-stats b { display: block; margin-bottom: 5px; color: var(--gold-light); font-family: Georgia, serif; font-size: 16px; }
.record-filter { display: flex; gap: 6px; margin-bottom: 10px; }
.record-filter button { min-height: 29px; padding: 0 11px; background: transparent; border: 1px solid #c9c4ba; color: #77756f; font-size: 7px; }
.record-filter button.active { background: var(--black); border-color: var(--black); color: #fff; }
.record-list article { animation: messageEnter .3s ease; }

.profile-header { margin: -91px -16px 13px; padding: 105px 18px 25px; background: var(--charcoal); color: #fff; }
.profile-header > div { display: grid; grid-template-columns: 44px 1fr; align-items: center; margin-top: 23px; }
.profile-header i { grid-row: 1 / 3; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #5e6062; color: var(--gold-light); font-style: normal; font-weight: 900; }
.profile-header h1 { margin: 0; font-size: 17px; }
.profile-header p { margin: 4px 0 0; color: #aaa9a5; font-size: 7px; }
.prototype-panel { padding: 15px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); }
.prototype-panel h2 { margin: 10px 0 7px; font-size: 14px; }
.prototype-panel p { margin: 0; color: #666560; font-size: 8px; line-height: 1.7; }
.prototype-panel button { margin-top: 10px; padding: 0; background: transparent; color: #665637; font-size: 7px; text-decoration: underline; }
.profile-menu { margin-top: 10px; background: #fff; border: 1px solid var(--line); }
.profile-menu > button { display: grid; grid-template-columns: 29px 1fr auto; width: 100%; align-items: center; gap: 10px; padding: 12px; background: transparent; text-align: left; }
.profile-menu > button + button { border-top: 1px solid var(--line); }
.profile-menu i { color: #8c7b59; font-size: 6px; font-style: normal; }
.profile-menu strong, .profile-menu small { display: block; }
.profile-menu strong { font-size: 8px; }
.profile-menu small { margin-top: 3px; color: var(--muted); font-size: 6px; }
.profile-menu em { color: #77756f; font-style: normal; }
.contact-panel { position: relative; margin-top: 11px; overflow: hidden; padding: 17px; background: var(--charcoal); color: #fff; }
.contact-panel::after { content: "LEGAL"; position: absolute; right: -4px; bottom: -18px; color: rgba(255,255,255,.035); font-family: Georgia, serif; font-size: 61px; }
.contact-panel h2 { margin: 14px 0 12px; font-size: 15px; }
.contact-panel a, .contact-panel b { position: relative; z-index: 1; display: block; width: fit-content; margin: 6px 0; color: #e2ded6; font-size: 8px; }
.contact-panel p { position: relative; z-index: 1; margin: 14px 0 0; padding-top: 10px; border-top: 1px solid #36383a; color: #9b9a96; font-size: 6px; }

.tabbar { position: absolute; z-index: 15; right: 0; bottom: 0; left: 0; display: grid; height: 68px; grid-template-columns: repeat(4,1fr); padding: 7px 12px 10px; background: rgba(250,249,246,.96); border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
.tabbar button { position: relative; display: grid; place-content: center; justify-items: center; gap: 4px; background: transparent; color: #84827c; }
.tabbar button i { font-size: 14px; font-style: normal; line-height: 1; }
.tabbar button span { font-size: 6px; }
.tabbar button.active { color: var(--black); }
.tabbar button.active i { color: #806d46; }
.tabbar button > b { position: absolute; top: 5px; right: 29px; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; }

.modal-layer { position: fixed; z-index: 30; inset: 0; display: grid; align-items: end; background: rgba(17,18,20,.55); backdrop-filter: blur(6px); }
.modal-sheet { width: min(390px,100%); max-height: 78vh; margin: 0 auto; overflow-y: auto; padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); background: var(--paper); box-shadow: 0 -18px 55px rgba(0,0,0,.2); animation: sheetEnter .36s var(--ease); }
.modal-sheet > header { position: sticky; z-index: 2; top: -18px; display: flex; align-items: flex-start; justify-content: space-between; margin: -18px -16px 15px; padding: 18px 16px 12px; background: rgba(244,242,237,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.modal-sheet header span { color: #806d46; font-size: 6px; letter-spacing: .1em; }
.modal-sheet header h2 { margin: 6px 0 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: 18px; font-weight: 400; }
.modal-sheet header button { width: 32px; height: 32px; background: var(--black); color: #fff; font-size: 18px; }
.modal-card { padding: 13px; background: #fff; border: 1px solid var(--line); }
.modal-card + .modal-card { margin-top: 9px; }
.modal-card strong { font-size: 9px; }
.modal-card p { margin: 7px 0 0; color: #65645f; font-size: 8px; line-height: 1.72; }
.modal-list { margin: 10px 0 0; padding: 0; list-style: none; }
.modal-list li { padding: 8px 0; border-top: 1px solid var(--line); color: #5f5e5a; font-size: 7px; line-height: 1.6; }
.modal-list b { color: var(--black); }
.appointment-form { display: grid; gap: 9px; }
.appointment-form > span { color: #6e6d68; font-size: 7px; font-weight: 900; }
.appointment-options { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; }
.appointment-options button { min-height: 34px; background: #fff; border: 1px solid var(--line); color: #696863; font-size: 7px; }
.appointment-options button.active { background: var(--black); border-color: var(--black); color: var(--gold-light); }
.appointment-form input { width: 100%; min-height: 38px; padding: 9px; border: 1px solid var(--line); outline: 0; background: #fff; color: var(--black); font-size: 8px; }
.modal-submit { width: 100%; min-height: 41px; margin-top: 11px; background: var(--black); color: #fff; font-size: 8px; }
.contact-lines { margin-top: 10px; padding: 11px; background: var(--charcoal); color: #ddd9d1; font-size: 7px; line-height: 1.8; }
.contact-lines a { color: var(--gold-light); }
.clause-map { display: grid; gap: 6px; }
.clause-map span { padding: 9px 10px; background: #fff; border-left: 2px solid var(--gold); font-size: 7px; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 36px; display: flex; align-items: center; gap: 8px; min-width: 250px; max-width: calc(100% - 28px); padding: 11px 13px; background: var(--black); color: #fff; box-shadow: 0 9px 30px rgba(17,18,20,.22); font-size: 8px; transform: translate(-50%,150%); opacity: 0; transition: transform .38s var(--ease), opacity .38s; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
.toast i { color: var(--gold-light); font-style: normal; }

@keyframes screenEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes messageEnter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes sheetEnter { from { opacity: 0; transform: translateY(35px); } to { opacity: 1; transform: none; } }
@keyframes statusPulse { 50% { opacity: .45; transform: scale(.78); } }
@keyframes typing { 0%,100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes riskGrow { from { width: 0; } }
@keyframes scanTrack { from { left: -35%; } to { left: 100%; } }

@media (max-width: 600px) {
  .desktop-stage { display: block; min-height: 100vh; padding: 0; }
  .desktop-stage::before, .desktop-stage::after, .stage-index, .device-label { display: none; }
  .device-shell { width: 100%; height: 100dvh; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .device-shell::before { display: none; }
  .device-topbar { height: 27px; padding: 0 18px; }
  .mini-header { top: 22px; }
  .device-home-indicator { bottom: 4px; }
  .modal-sheet { width: 100%; }
}

@media (min-width: 601px) and (max-height: 800px) {
  .desktop-stage { padding-block: 18px; }
  .device-shell { transform: scale(.87); transform-origin: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
