/* P1-7: QR reader tool + email preferences + maintenance/500. Tokens from home.css / v4.css. */
.p7-body { min-height: 100vh; background: var(--bg-2); }
.p7-body [hidden] { display: none !important; }

/* slim top bar + footer (prefs + error pages) */
.p7-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 680px; margin: 0 auto; padding: 16px 20px; }
.p7-top__end { display: flex; align-items: center; gap: 8px; }
.p7-foot { display: grid; justify-items: center; gap: 8px; text-align: center; max-width: 680px; margin: 0 auto; padding: 8px 20px 48px; color: var(--text-2); }
.p7-foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.p7-linklike { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 6px 2px; color: var(--text-2); font: inherit; font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; }
.p7-linklike:hover { color: var(--text); }
.p7-linklike .qq-ic { width: 16px; height: 16px; }

/* centred column (prefs + error pages) */
.p7-main { max-width: 680px; margin: 0 auto; padding: 4px 20px 32px; }
.p7-estate.is-on { animation: p7-up .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes p7-up { from { opacity: 0; transform: translateY(14px); } }
.p7-card { display: grid; gap: 14px; justify-items: center; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--sh-2); padding: 34px 30px 30px; }
.p7-card h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: var(--display-track); line-height: var(--display-lh); font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3rem); text-wrap: balance; }
.p7-card .qq-tag { margin-bottom: 2px; }
.p7-lead { color: var(--text-2); max-width: 52ch; }
.p7-lead b { color: var(--text); }

/* reader head */
.p7-head { padding: 34px 0 6px; }
.p7-crumbs { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--text-2); margin-bottom: 14px; }
.p7-crumbs a { color: inherit; text-decoration: none; }
.p7-crumbs a:hover { color: var(--text); }
.p7-crumbs .qq-ic { width: 12px; height: 12px; }
.p7-head h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: var(--display-track); line-height: var(--display-lh); font-size: clamp(2.6rem, 1.8rem + 3.4vw, 4.2rem); text-wrap: balance; }
.p7-head p { color: var(--text-2); font-size: 1.06rem; max-width: 62ch; margin-top: 12px; }
.p7-badges { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; color: var(--text-2); font-size: .88rem; font-weight: 600; }
.p7-badges span { display: inline-flex; align-items: center; gap: 7px; }
.p7-badges .qq-ic { width: 16px; height: 16px; color: var(--accent); }

/* work grid */
.p7-work { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; margin-top: 22px; align-items: start; }
.p7-work__main { display: grid; gap: 14px; min-width: 0; }

/* left-aligned compact tabs (rule 11) */
.p7-tabs { display: flex; justify-content: flex-start; gap: 4px; border-bottom: 1px solid var(--line); }
.p7-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px 12px; font: inherit; font-weight: 600; font-size: .95rem; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.p7-tabs [role="tab"]:hover { color: var(--text); }
.p7-tabs [role="tab"].is-on { color: var(--text); border-bottom-color: var(--accent); }
.p7-tabs [role="tab"] .qq-ic { width: 17px; height: 17px; }
.p7-panel { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--sh-1); }

/* camera viewfinder */
.p7-view { position: relative; border-radius: 16px; overflow: hidden; background: var(--ink); color: var(--on-ink); aspect-ratio: 4/3; }
.p7-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p7-view__idle { position: absolute; inset: 0; display: grid; justify-items: center; align-content: center; gap: 8px; text-align: center; padding: 24px; }
.p7-view__qr { width: 92px; color: #fff; opacity: .92; }
.p7-view__qr svg { width: 100%; height: auto; display: block; }
.p7-view__idle b { font-size: 1.02rem; }
.p7-view__idle p { font-size: .88rem; opacity: .72; max-width: 34ch; }
.p7-view__frame { position: absolute; inset: 0; pointer-events: none; }
.p7-view__frame i { position: absolute; width: 34px; height: 34px; border: 3px solid #fff; opacity: .9; }
.p7-view__frame i:nth-child(1) { left: 12%; top: 12%; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.p7-view__frame i:nth-child(2) { right: 12%; top: 12%; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.p7-view__frame i:nth-child(3) { left: 12%; bottom: 12%; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.p7-view__frame i:nth-child(4) { right: 12%; bottom: 12%; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.p7-view__frame s { position: absolute; left: 12%; right: 12%; top: 14%; height: 2px; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); text-decoration: none; animation: p7-scan 2.2s ease-in-out infinite alternate; }
@keyframes p7-scan { from { top: 14%; } to { top: 84%; } }
.p7-view__live { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 12px; border-radius: var(--pill); background: rgba(0,0,0,.62); color: #fff; font-size: .82rem; font-weight: 600; }
.p7-view__live .qq-ic { width: 15px; height: 15px; color: #86efac; }
.p7-camrow { display: flex; flex-wrap: wrap; gap: 10px; }
.p7-camdd { display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 600; color: var(--text-2); }
.p7-priv { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); font-size: .85rem; }
.p7-priv .qq-ic { width: 16px; height: 16px; color: var(--accent); flex: none; }
.p7-note, .p7-error { display: flex; align-items: center; gap: 12px; border-radius: 14px; padding: 12px 14px; font-size: .9rem; }
.p7-note { background: var(--surface-2); border: 1px solid var(--line); }
.p7-note > .qq-ic { width: 20px; height: 20px; color: var(--accent); flex: none; }
.p7-note b { display: block; font-size: .92rem; }
.p7-note small { color: var(--text-2); }
.p7-error { background: color-mix(in srgb, #dc2626 8%, var(--surface)); border: 1px solid color-mix(in srgb, #dc2626 40%, var(--line)); }
.p7-error > .qq-ic { width: 22px; height: 22px; color: #dc2626; flex: none; }
.p7-error div { flex: 1; min-width: 0; }
.p7-error b { display: block; }
.p7-error small { color: var(--text-2); }

/* upload panel */
.p7-drop { display: grid; justify-items: center; gap: 8px; width: 100%; padding: 34px 20px; border-radius: 16px; border: 2px dashed var(--line-2); background: var(--surface-2); cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, background .15s; }
.p7-drop:hover { border-color: var(--ink); }
.p7-drop.is-drag { border-color: var(--accent); background: var(--accent-soft); }
.p7-drop > .qq-ic { width: 30px; height: 30px; color: var(--accent); }
.p7-drop b { font-size: 1rem; }
.p7-drop small { color: var(--text-2); font-size: .86rem; }
.p7-drop small u { color: var(--accent); font-weight: 700; }
.p7-uprow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.p7-uprow small { color: var(--text-2); font-size: .84rem; }
.p7-fielderr { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, #dc2626 8%, var(--surface)); border: 1px solid color-mix(in srgb, #dc2626 40%, var(--line)); color: var(--text); font-size: .88rem; font-weight: 600; }
.p7-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); }
.p7-file__thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--surface-3); flex: none; display: grid; place-items: center; }
.p7-file__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p7-file div { flex: 1; min-width: 0; }
.p7-file b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p7-file small { color: var(--text-2); font-size: .82rem; }
.p7-nofound { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.p7-nofound > span .qq-ic { width: 34px; height: 34px; color: var(--text-2); }
.p7-nofound p { margin: 0 0 6px; color: var(--text-2); font-size: .9rem; max-width: 44ch; }

/* demo buttons */
.p7-demo { display: grid; gap: 10px; }
.p7-demo > b { font-size: .9rem; }
.p7-demo > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.p7-demo button { display: grid; justify-items: center; gap: 3px; padding: 14px 8px 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); font: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
.p7-demo button:hover { transform: translateY(-1px); border-color: var(--ink); }
.p7-demo button > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.p7-demo button .qq-ic { width: 17px; height: 17px; }
.p7-demo button b { font-size: .9rem; }
.p7-demo button small { color: var(--text-2); font-size: .78rem; }

/* result rail */
.p7-rail { display: grid; gap: 14px; align-content: start; min-width: 0; }
.p7-result { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--sh-1); }
.p7-result--idle { justify-items: center; text-align: center; padding: 34px 22px; border-style: dashed; }
.p7-result__ic .qq-ic { width: 40px; height: 40px; color: var(--text-2); }
.p7-result--idle p { margin: 0; color: var(--text-2); font-size: .9rem; }
.p7-result__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p7-type { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; padding: 5px 12px; border-radius: var(--pill); background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); }
.p7-type .qq-ic { width: 14px; height: 14px; }
.p7-time { color: var(--text-2); font-size: .8rem; font-weight: 600; }
.p7-result__title { font-size: 1.12rem; overflow-wrap: anywhere; }
.p7-result__domain { margin: 0; font-size: .86rem; font-weight: 600; color: var(--text-2); overflow-wrap: anywhere; }
.p7-result__body { display: grid; gap: 8px; font-size: .92rem; }
.p7-result__body pre { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font: 500 .86rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow-y: auto; }
.p7-kv { display: grid; gap: 6px; margin: 0; }
.p7-kv div { display: flex; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
.p7-kv dt { color: var(--text-2); font-weight: 600; min-width: 74px; }
.p7-kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.p7-safety { display: flex; gap: 9px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: .84rem; color: var(--text); }
.p7-safety .qq-ic { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: 1px; }
.p7-result__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.p7-again { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: none; border: 0; padding: 8px; font: inherit; font-weight: 700; font-size: .88rem; color: var(--text-2); cursor: pointer; }
.p7-again:hover { color: var(--text); }
.p7-again .qq-ic { width: 16px; height: 16px; }

/* history */
.p7-hist { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px 18px; box-shadow: var(--sh-1); }
.p7-hist__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.p7-hist__head b { font-size: .92rem; }
.p7-hist__head button { background: none; border: 0; padding: 4px; font: inherit; font-size: .82rem; font-weight: 700; color: var(--text-2); cursor: pointer; }
.p7-hist__head button:hover { color: #dc2626; }
.p7-hist__empty { margin: 0; color: var(--text-2); font-size: .86rem; }
.p7-hist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.p7-hist li button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; cursor: pointer; text-align: left; }
.p7-hist li button:hover { border-color: var(--ink); }
.p7-hist li button > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); flex: none; }
.p7-hist li .qq-ic { width: 15px; height: 15px; }
.p7-hist li b { flex: 1; min-width: 0; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p7-hist li em { font-style: normal; color: var(--text-2); font-size: .76rem; font-weight: 600; flex: none; }

/* reader sections below */
.p7-below { display: grid; gap: 8px; padding-bottom: 56px; }
.p7-sec { padding-top: 44px; }
.p7-steps ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.p7-steps li { display: grid; gap: 6px; justify-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.p7-steps li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.p7-steps li .qq-ic { width: 17px; height: 17px; }
.p7-steps li small { color: var(--text-2); font-size: .88rem; }
.p7-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.p7-types > div { display: grid; justify-items: center; gap: 4px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 10px 16px; }
.p7-types span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); }
.p7-types .qq-ic { width: 17px; height: 17px; }
.p7-types b { font-size: .88rem; }
.p7-types small { color: var(--text-2); font-size: .78rem; }
.p7-privband { display: flex; gap: 16px; background: var(--ink); color: var(--on-ink); border-radius: 22px; padding: 26px 28px !important; margin-top: 44px; }
.p7-privband > span .qq-ic { width: 34px; height: 34px; }
.p7-privband b { font-size: 1.1rem; }
.p7-privband .qq-checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; font-weight: 500; }
.p7-privband .qq-checks li { display: flex; align-items: center; gap: 10px; }
.p7-privband .qq-checks .qq-ic { width: 18px; height: 18px; }
.p7-about .p7-tabs { margin-bottom: 4px; }
.p7-prose { color: var(--text-2); max-width: 72ch; display: grid; gap: 10px; padding-top: 16px; }
.p7-prose b { color: var(--text); }
.p7-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.p7-more a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); text-decoration: none; transition: transform .15s, border-color .15s; }
.p7-more a:hover { transform: translateY(-1px); border-color: var(--ink); }
.p7-more a > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.p7-more a .qq-ic { width: 17px; height: 17px; }
.p7-more a div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.p7-more a b { font-size: .92rem; }
.p7-more a small { color: var(--text-2); font-size: .8rem; }
.p7-more a > .qq-ic { color: var(--text-2); flex: none; }
.p7-more a:hover > .qq-ic { color: var(--accent); }

/* custom dropdown (no native select) */
.p7-dd { position: relative; min-width: 200px; }
.p7-dd__btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-weight: 600; font-size: .9rem; color: var(--text); cursor: pointer; }
.p7-dd__btn:hover { border-color: var(--ink); }
.p7-dd__btn .qq-ic { width: 15px; height: 15px; color: var(--text-2); transition: transform .15s; }
.p7-dd__btn[aria-expanded="true"] .qq-ic { transform: rotate(180deg); }
.p7-dd__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); display: grid; max-height: 240px; overflow-y: auto; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--sh-2); }
.p7-dd__list button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: .9rem; font-weight: 500; color: var(--text); cursor: pointer; text-align: left; }
.p7-dd__list button:hover { background: var(--surface-2); }
.p7-dd__list button.is-on { font-weight: 700; color: var(--accent); }

/* switch + segmented */
.p7-switch { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px; font: inherit; cursor: pointer; flex: none; }
.p7-switch > span { position: relative; width: 46px; height: 26px; border-radius: var(--pill); background: var(--surface-3); border: 1px solid var(--line-2); transition: background .15s, border-color .15s; flex: none; }
.p7-switch > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: left .15s; }
.p7-switch.is-on > span { background: var(--accent); border-color: var(--accent); }
.p7-switch.is-on > span::after { left: 22px; }
.p7-switch em { font-style: normal; font-size: .82rem; font-weight: 700; color: var(--text-2); min-width: 24px; text-align: left; }
.p7-switch.is-on em { color: var(--accent); }
.p7-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.p7-seg button { border: 0; background: none; padding: 8px 16px; border-radius: 9px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.p7-seg button.is-on { background: var(--ink); color: var(--on-ink); }

/* forms */
.p7-form, .p7-prefs { display: grid; gap: 14px; width: 100%; text-align: left; }
.p7-prefs__rows { display: grid; gap: 8px; }
.p7-pref { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); text-align: left; }
.p7-pref__ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.p7-pref__ic .qq-ic { width: 17px; height: 17px; }
.p7-pref div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.p7-pref div b { font-size: .94rem; }
.p7-pref div small { color: var(--text-2); font-size: .82rem; }
.p7-prefs__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p7-field { display: grid; gap: 8px; }
.p7-field > span { font-size: .86rem; font-weight: 700; }
.p7-unsuball { margin: 0; text-align: center; }
.p7-unsuball button { background: none; border: 0; padding: 6px; font: inherit; font-weight: 700; font-size: .88rem; color: #dc2626; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.p7-unsuball button:hover { text-decoration: underline; }
.p7-unsuball .qq-ic { width: 16px; height: 16px; }
.p7-submit { width: 100%; }
.p7-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.p7-input:focus-within { border-color: var(--ink); }
.p7-input.is-bad { border-color: #dc2626; box-shadow: 0 0 0 3px color-mix(in srgb, #dc2626 18%, transparent); }
.p7-input > .qq-ic { width: 17px; height: 17px; color: var(--text-2); flex: none; }
.p7-input input { flex: 1; min-width: 0; border: 0; background: none; padding: 13px 0; font: inherit; font-size: .94rem; color: var(--text); outline: none; }
.p7-err { display: flex; align-items: center; gap: 7px; color: #dc2626; font-size: .84rem; font-weight: 600; }
.p7-err .qq-ic { width: 15px; height: 15px; }
.p7-back { margin: 2px 0 0; }

/* reason radios */
.p7-reasons { display: grid; gap: 8px; }
.p7-reason { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 14px; border: 1px solid var(--line-2); cursor: pointer; text-align: left; }
.p7-reason:hover { border-color: var(--ink); }
.p7-reason input { position: absolute; opacity: 0; pointer-events: none; }
.p7-reason__ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.p7-reason__ic .qq-ic { width: 17px; height: 17px; }
.p7-reason b { flex: 1; font-size: .92rem; }
.p7-reason__ck { display: none; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); flex: none; }
.p7-reason__ck .qq-ic { width: 14px; height: 14px; }
.p7-reason:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.p7-reason:has(input:checked) .p7-reason__ck { display: grid; }
.p7-reason:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* modals */
.p7-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.p7-modal__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.p7-modal__card { position: relative; width: min(480px, 100%); max-height: calc(100vh - 60px); overflow-y: auto; display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--sh-3); padding: 22px; animation: p7-up .3s cubic-bezier(.2,.7,.2,1) both; }
.p7-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p7-modal__head b { font-size: 1.15rem; }
.p7-modal__lead { margin: 0; color: var(--text-2); font-size: .92rem; }
.p7-modal__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p7-safetyurl { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font: 600 .85rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

/* success / done blocks */
.p7-done, .p7-saved { display: grid; justify-items: center; gap: 8px; text-align: center; width: 100%; }
.p7-done__ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.p7-done__ic .qq-ic { width: 24px; height: 24px; }
.p7-done b, .p7-saved > b { font-size: 1.2rem; }
.p7-done p, .p7-saved p { margin: 0; color: var(--text-2); font-size: .92rem; }
.p7-saved ul { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.p7-saved li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; text-align: left; }
.p7-saved li .qq-ic { width: 16px; height: 16px; color: var(--accent); flex: none; }
.p7-done--inline { padding-top: 6px; }
.p7-done__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.p7-means { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; text-align: left; font-weight: 500; }
.p7-means li { display: flex; align-items: center; gap: 10px; }
.p7-means .qq-ic { width: 18px; height: 18px; }
.p7-fb { display: grid; gap: 10px; width: 100%; text-align: left; border-top: 1px solid var(--line); padding-top: 16px; }
.p7-fb > b { font-size: .9rem; text-align: center; }
.p7-fb > b em { font-style: normal; color: var(--text-2); font-weight: 500; }

/* empty / error states */
.p7-empty__img { width: 100%; max-width: 420px; }
.p7-empty__img .qq-img { border-radius: 20px; }
.p7-empty__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.p7-eta { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0; padding: 11px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: .9rem; color: var(--text-2); }
.p7-eta .qq-ic { width: 17px; height: 17px; color: var(--accent); flex: none; }
.p7-eta b { color: var(--text); }
.p7-status { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; }
.p7-status li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line-2); text-align: left; }
.p7-status li > .qq-ic { width: 18px; height: 18px; color: var(--text-2); }
.p7-status b { flex: 1; font-size: .92rem; }
.p7-st { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 700; color: var(--text-2); }
.p7-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.p7-st.is-ok { color: var(--accent); }
.p7-st.is-ok::before { background: var(--accent); }
.p7-st.is-busy { color: #b45309; }
.p7-st.is-busy::before { background: #b45309; animation: p7-blink 1.4s ease-in-out infinite; }
@keyframes p7-blink { 50% { opacity: .35; } }
.p7-req { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
.p7-req span { color: var(--text-2); font-weight: 600; }
.p7-req code { font: 700 .86rem ui-monospace, SFMono-Regular, Menlo, monospace; }

/* toast */
.p7-toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 16px); display: flex; align-items: center; gap: 10px; max-width: min(480px, calc(100vw - 40px)); padding: 13px 18px; border-radius: var(--pill); background: var(--ink); color: var(--on-ink); font-size: .9rem; font-weight: 600; box-shadow: var(--sh-3); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.p7-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.p7-toast .qq-ic { width: 18px; height: 18px; flex: none; }

/* responsive */
@media (max-width: 1000px) {
  .p7-work { grid-template-columns: 1fr; }
  .p7-types { grid-template-columns: repeat(2, 1fr); }
  .p7-more { grid-template-columns: 1fr 1fr; }
  .p7-steps ol { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .p7-head { padding-top: 26px; }
  .p7-panel { padding: 14px; }
  .p7-demo > div { grid-template-columns: 1fr; }
  .p7-demo button { grid-template-columns: auto 1fr; grid-template-rows: auto auto; justify-items: start; text-align: left; column-gap: 12px; padding: 12px 14px; }
  .p7-demo button > span { grid-row: 1 / 3; }
  .p7-demo button b { align-self: end; }
  .p7-demo button small { align-self: start; }
  .p7-more { grid-template-columns: 1fr; }
  .p7-prefs__row2 { grid-template-columns: 1fr; }
  .p7-modal__btns, .p7-done__btns { grid-template-columns: 1fr; }
  .p7-card { padding: 26px 20px 24px; border-radius: 22px; }
  .p7-top__cta { font-size: 0; gap: 0; }
  .p7-top__cta .qq-ic { width: 16px; height: 16px; }
  .p7-error { flex-wrap: wrap; }
  .p7-privband { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .p7-view__frame s, .p7-st.is-busy::before { animation: none; }
  .p7-estate.is-on, .p7-modal__card { animation: none; }
}
