/* 模块 05 · 设置与长期协作 */

/* opener: three stacked layers */
.ops { position: relative; height: 300px; perspective: 900px; }
.ops-l { position: absolute; left: 10%; right: 10%; top: calc(30px + var(--l) * 70px); height: 120px; border-radius: 18px; transform: rotateX(58deg) rotateZ(-8deg); transform-style: preserve-3d; background: rgba(241, 239, 233, .05); box-shadow: inset 0 0 0 1.5px rgba(241, 239, 233, .3); transition: background-color .4s, box-shadow .4s, transform .6s var(--ease); }
.ops-l span { position: absolute; left: 20px; top: 14px; font-size: 1rem; color: var(--on-ink-2); transform: rotateZ(8deg); }
.page.in .ops-l { animation: ops-in .9s var(--ease) both; animation-delay: calc(.3s + var(--l) * .15s); }
@keyframes ops-in { from { opacity: 0; transform: rotateX(58deg) rotateZ(-8deg) translateZ(-60px); } }
.op.hl-0 .ops-l[data-hl="0"], .op.hl-1 .ops-l[data-hl="1"], .op.hl-2 .ops-l[data-hl="2"] { background: rgba(255, 216, 77, .14); box-shadow: inset 0 0 0 2px var(--mark); transform: rotateX(58deg) rotateZ(-8deg) translateZ(24px); }
.op.hl-0 .ops-l[data-hl="0"] span, .op.hl-1 .ops-l[data-hl="1"] span, .op.hl-2 .ops-l[data-hl="2"] span { color: var(--mark); }

/* shared toggle switch for recreated settings */
.st7-tg { position: relative; flex: none; width: 40px; height: 24px; border-radius: 24px; background: #d4d4d8; transition: background-color .25s; display: inline-block; }
.st7-tg::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--spring); }
.st7-tg[aria-checked="true"], .st7-tg[data-on="1"] { background: #4c78f0; }
.st7-tg[aria-checked="true"]::after, .st7-tg[data-on="1"]::after { transform: translateX(16px); }

/* ===== settings ===== */
.st7 { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr); grid-template-areas: "copy win" "fix win" "src win"; column-gap: clamp(28px, 4vw, 60px); align-items: start; }
.st7-copy { grid-area: copy; }
.st7-keys { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.st7-key { display: grid; gap: 10px; justify-items: start; padding: 16px 18px; border-radius: 18px; background: rgba(12, 14, 50, .25); font-size: 1.4rem; transition: transform .15s; }
.st7-key > span { font-size: .78rem; color: rgba(240, 242, 252, .8); }
.st7-key kbd { min-width: 2.4em; height: 2.4em; font-size: 1.1rem; }
.st7-key.pressed kbd { transform: translateY(2px); box-shadow: 0 0 0 1px var(--line-2), 0 1px 0 0 var(--paper-3); }
.st7-tip { margin-top: 16px; }
.st7-fix { grid-area: fix; margin-top: 16px; font-size: .9rem; color: rgba(246, 246, 252, .9); }
.st7-fix b { display: block; color: #fff; }
.st7 .src { grid-area: src; }
.st7-win { grid-area: win; position: relative; height: min(520px, calc(100dvh - var(--top) - var(--bottom) - 80px)); min-height: 400px; }
.st7-panel { position: absolute; inset: 0; display: grid; grid-template-columns: 210px 1fr; border-radius: 16px; overflow: hidden; background: #fff; color: #111; box-shadow: 0 0 0 1px rgba(0, 0, 0, .07), 0 40px 80px -30px rgba(10, 14, 60, .65); transition: opacity .45s var(--ease), transform .55s var(--spring); }
.st7-win[data-state="closed"] .st7-panel { opacity: 0; transform: scale(.94) translateY(16px); pointer-events: none; }
.st7-closed { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px; border: 2px dashed rgba(255, 255, 255, .45); color: rgba(255, 255, 255, .85); font-size: .95rem; transition: opacity .3s; }
.st7-win[data-state="open"] .st7-closed { opacity: 0; pointer-events: none; }
.st7-side { background: #f7f7f8; border-right: 1px solid #ececef; padding: 14px 10px; display: flex; flex-direction: column; gap: 1px; overflow: auto; }
.st7-search { display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 34px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px #e3e3e8; margin-bottom: 10px; color: #8e8e94; }
.st7-search input { border: 0; outline: none; width: 100%; font-size: 12.5px; background: transparent; }
.st7-g { font-size: 11px; color: #8e8e94; padding: 8px 8px 4px; }
.st7-item { text-align: left; padding: 6px 10px; border-radius: 8px; font-size: 13px; transition: background-color .2s, opacity .2s; }
.st7-item:hover { background: #ececef; }
.st7-item.on { background: #e4e4e9; font-weight: 600; }
.st7-item.dim { opacity: .3; }
.st7-main { padding: 22px 26px; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.st7-title { font-size: 1.15rem; font-weight: 650; margin-bottom: 10px; }
.st7-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #f0f0f2; }
.st7-row b { display: block; font-size: .92rem; font-weight: 600; }
.st7-row small { display: block; font-size: .8rem; color: #6b6b72; }
.st7-dd { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; padding: 6px 10px; border-radius: 8px; box-shadow: 0 0 0 1px #e3e3e8; color: #333; white-space: nowrap; }
.st7-dd .ic { width: 12px; height: 12px; }
.st7-seg { background: #f1f1f4; }
.st7-seg button { font-size: .8rem; min-height: 30px; padding: 0 12px; color: #444; }
.st7-say { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #fff8d6; font-size: .9rem; font-weight: 600; }
.st7-other { margin-top: 8px; font-size: .95rem; color: #333; }
.st7-cap { position: absolute; left: 0; right: 0; bottom: -26px; font-size: .78rem; color: rgba(240, 242, 252, .82); }

/* ===== configuration: who wins ===== */
.cf { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); grid-template-areas: "copy lab" "copy rules" "src rules"; column-gap: clamp(28px, 4vw, 60px); row-gap: 16px; align-items: start; }
.cf-copy { grid-area: copy; }
.cf-groups { margin-top: 20px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.cf-groups div { display: grid; grid-template-columns: 6.5em 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cf-groups dt { font-weight: 650; }
.cf-groups dd { font-size: .9rem; color: var(--text-2); }
.cf-where { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .86rem; }
.cf-where b { margin-right: 4px; }
.cf-rules { grid-area: rules; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: r; margin-top: 4px; }
.cf-rules li { padding-left: 34px; position: relative; font-size: .9rem; counter-increment: r; }
.cf-rules li::before { content: counter(r); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--mark); font: 600 .74rem/1 var(--mono); }
.cf-rules b { display: block; }
.cf .src { grid-area: src; }
.cf-lab { grid-area: lab; display: grid; gap: 12px; }
.cf-h { font-size: .84rem; color: var(--muted); }
.cf-stack { display: grid; gap: 6px; }
.cf-layer { display: grid; grid-template-columns: 6em 1fr auto; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 14px; background: var(--white); box-shadow: 0 0 0 1px var(--line); text-align: left; transition: box-shadow .3s, opacity .3s, transform .3s var(--ease); }
.cf-layer[aria-pressed="false"] { opacity: .45; box-shadow: 0 0 0 1px var(--line); background: transparent; }
.cf-layer[aria-pressed="false"] em { text-decoration: line-through; }
.cf-ln { font-weight: 650; }
.cf-layer code { justify-self: start; font-size: .74rem; }
.cf-layer em { font-style: normal; font: 500 .82rem/1 var(--mono); }
.cf-layer.win { box-shadow: 0 0 0 2px var(--ink), 0 14px 24px -16px rgba(0, 0, 0, .4); transform: translateX(-4px); }
.cf-layer.win em { background: var(--mark); padding: 5px 8px; border-radius: 6px; }
.cf-result { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--ink); color: var(--on-ink); }
.cf-result span { font-size: .8rem; color: var(--on-ink-muted); }
.cf-result b { font: 600 1.2rem/1 var(--mono); color: var(--mark); }
.cf-result small { font-size: .84rem; color: var(--on-ink-2); }
.cf-org { font-size: .86rem; color: var(--text-2); }
.cf-panel { padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 20px 40px -30px rgba(0, 0, 0, .4); font-size: .86rem; }
.cf-ph { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cf-dd { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 8px; box-shadow: 0 0 0 1px #e3e3e8; font-size: .8rem; }
.cf-dd .ic { width: 12px; height: 12px; }
.cf-open { font-size: .78rem; color: #6b6b72; }
.cf-prow { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-top: 1px solid #f0f0f2; }
.cf-prow b { font-weight: 600; }
.cf-cap { margin-top: 6px; font-size: .74rem; color: var(--muted); }
.cf-zoom { text-decoration: underline; font-size: inherit; }

/* ===== permission: what it can reach ===== */
.pm { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr); grid-template-areas: "copy map" "foot map" "src src"; column-gap: clamp(28px, 4vw, 60px); align-items: start; }
.pm-copy { grid-area: copy; }
.pm-menu { margin-top: 22px; }
.pm-h { font-size: .8rem; color: var(--on-ink-muted); margin-bottom: 8px; }
.pm-menu .cx-menu { max-width: 320px; }
.pm-menu .cx-mi.on { background: #f2f2f4; }
.pm-menu .cx-mi.on::after { content: ""; width: 14px; height: 8px; border-left: 2px solid #111; border-bottom: 2px solid #111; transform: rotate(-45deg) translateY(-2px); margin-left: auto; }
.pm-say { margin-top: 16px; min-height: 7em; }
.pm-who { font-size: .84rem; color: var(--on-ink-muted); }
.pm-who b { color: var(--mark); font-size: 1rem; }
.pm-say p:not(.pm-who):not(.pm-mono) { margin-top: 6px; color: var(--on-ink-2); }
.pm-mono { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.pm-mono span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--ink-2); font: .66rem/1.2 var(--mono); color: var(--on-ink-muted); letter-spacing: .04em; text-transform: uppercase; }
.pm-mono b { font-size: .82rem; color: var(--on-ink); text-transform: none; letter-spacing: 0; font-weight: 500; }
.pm-foot { grid-area: foot; display: grid; gap: 8px; margin-top: 10px; font-size: .86rem; color: var(--on-ink-2); }
.pm-foot b { color: var(--on-ink); margin-right: 6px; }
.pm .src { grid-area: src; }
.pm-map { grid-area: map; position: relative; aspect-ratio: 1.15; max-height: calc(100dvh - var(--top) - var(--bottom) - 40px); width: 100%; }
.pm-zone { position: absolute; border-radius: 50%; display: grid; justify-items: center; align-content: start; padding-top: 3%; transition: background-color .6s var(--ease), box-shadow .6s; }
.pm-zone span { font-size: .82rem; color: var(--on-ink-muted); transition: color .4s; }
.z-net { inset: 0 2%; box-shadow: inset 0 0 0 1.5px rgba(241, 239, 233, .18); background: rgba(241, 239, 233, .02); }
.z-disk { inset: 14% 16%; box-shadow: inset 0 0 0 1.5px rgba(241, 239, 233, .24); background: rgba(241, 239, 233, .03); }
.z-proj { inset: 32% 33%; box-shadow: inset 0 0 0 2px rgba(255, 216, 77, .5); background: rgba(255, 216, 77, .1); padding-top: 12%; }
.z-proj span { color: var(--mark); font-weight: 600; }
.pm-map[data-mode="ask"] .z-net, .pm-map[data-mode="ask"] .z-disk, .pm-map[data-mode="auto"] .z-net, .pm-map[data-mode="auto"] .z-disk { box-shadow: inset 0 0 0 1.5px rgba(255, 179, 71, .55); background: repeating-linear-gradient(-45deg, rgba(255, 179, 71, .05) 0 10px, transparent 10px 20px); }
.pm-map[data-mode="full"] .z-net, .pm-map[data-mode="full"] .z-disk { background: rgba(255, 106, 106, .1); box-shadow: inset 0 0 0 2px rgba(255, 106, 106, .7); }
.pm-map[data-mode="full"] .z-disk span, .pm-map[data-mode="full"] .z-net span { color: #ff9a9a; }
.pm-map[data-mode="custom"] .pm-zone { box-shadow: inset 0 0 0 1.5px rgba(241, 239, 233, .3); background: transparent; }
.pm-acts { position: absolute; inset: 0; pointer-events: none; }
.pm-acts li { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: rgba(12, 12, 14, .82); box-shadow: 0 0 0 1px var(--line-ink-2); font-size: .8rem; white-space: nowrap; transform: translate(-50%, -50%); }
.pm-acts li[data-act="0"] { left: 44%; top: 55%; } .pm-acts li[data-act="1"] { left: 58%; top: 68%; } .pm-acts li[data-act="2"] { left: 22%; top: 40%; } .pm-acts li[data-act="3"] { left: 82%; top: 16%; }
.pm-acts .st { font-size: .74rem; }

/* ===== full access ===== */
.fa { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); grid-template-areas: "copy lab" "src lab"; column-gap: clamp(28px, 4vw, 60px); align-items: start; }
.fa-copy { grid-area: copy; }
.fa-steps { margin-top: 22px; display: grid; gap: 8px; }
.fa-steps li { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; opacity: .55; transition: background-color .3s, opacity .3s; }
.fa-steps li b { font-size: 1rem; }
.fa-steps li span:not(.path) { font-size: .88rem; color: rgba(246, 246, 252, .9); }
.fa[data-step="0"] .s0, .fa[data-step="1"] .s1, .fa[data-step="2"] .s2 { opacity: 1; background: rgba(12, 14, 50, .26); }
.fa-note { margin-top: 12px; }
.fa .src { grid-area: src; }
.fa-lab { grid-area: lab; position: relative; display: grid; gap: 16px; }
.fa-set { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 16px 18px; border-radius: 16px; background: #fff; color: #111; box-shadow: 0 20px 40px -24px rgba(10, 14, 60, .6); }
.fa-set span { grid-column: 1 / -1; font: .74rem/1 var(--mono); color: #8e8e94; }
.fa-set b { font-size: .95rem; }
.fa-compose { position: relative; margin-top: 70px; }
.fa-menu { position: absolute; left: 30px; bottom: calc(100% - 50px); z-index: 3; }
.fa-chip { box-shadow: 0 0 0 2px var(--mark); }
.fa-chip.danger { background: #ffe5e5; color: var(--bad); box-shadow: 0 0 0 2px var(--bad); }
.fa-wt { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #5d5d63; margin-right: 8px; }
.fa-dialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; width: min(380px, 92%); padding: 20px; border-radius: 18px; background: #fff; color: #111; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 40px 80px -20px rgba(0, 0, 0, .6); display: grid; gap: 10px; animation: dlg-in .4s var(--spring); }
@keyframes dlg-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } }
.fa-dt { display: flex; align-items: center; gap: 8px; }
.fa-dt .ic { width: 20px; height: 20px; color: var(--bad); }
.fa-dt small { margin-left: auto; font-size: .7rem; color: #8e8e94; }
.fa-dialog > p:not(.fa-dt) { font-size: .88rem; color: #333; }
.fa-dialog ul { display: grid; gap: 6px; }
.fa-dialog label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #f6f6f8; font-size: .9rem; cursor: pointer; }
.fa-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.fa-dialog .btn.ghost { color: #111; }
.fa-say { min-height: 2.6em; font-size: .98rem; font-weight: 600; }

/* ===== profile ===== */
.pf { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 1fr); grid-template-areas: "copy lab" "src lab"; column-gap: clamp(28px, 4vw, 60px); align-items: start; }
.pf-copy { grid-area: copy; }
.pf-not { margin-top: 22px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.pf-not div { padding: 14px 16px; border-radius: 16px; background: var(--white); box-shadow: 0 0 0 1px var(--line); display: grid; gap: 2px; }
.pf-not div:last-child { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.pf-not b { font-size: 1rem; }
.pf-not span { font-size: .82rem; color: var(--muted); }
.pf-not i { font-style: normal; font-size: 2rem; font-weight: 300; color: var(--bad); }
.pf-tiles { margin-top: 18px; display: grid; gap: 8px; }
.pf-h { font-size: .8rem; color: var(--muted); }
.pf-tile { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 12px 16px; border-radius: 14px; background: var(--paper-2); text-align: left; }
.pf-tile b { font-size: .95rem; }
.pf-tile span { font-size: .82rem; color: var(--muted); }
button.pf-tile:hover { background: var(--paper-3); }
.pf .src { grid-area: src; }
.pf-lab { grid-area: lab; display: grid; gap: 16px; }
.pf-card { position: relative; padding: 24px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -36px rgba(0, 0, 0, .45); display: grid; gap: 18px; }
.pf-top { display: flex; gap: 14px; align-items: center; }
.pf-av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ffd84d, #f08a3e); font-weight: 700; font-size: 1.4rem; color: #fff; }
.pf-name { font-size: 1.15rem; font-weight: 650; }
.pf-mail { font: .82rem/1.4 var(--mono); color: #6b6b72; }
.pf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-stats p { padding: 14px; border-radius: 14px; background: #f6f6f8; display: grid; }
.pf-stats span { font-size: .78rem; color: #6b6b72; }
.pf-stats b { font-family: var(--display); font-size: 1.6rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pf-stats small { font-size: .74rem; color: #8e8e94; }
.pf-act { display: grid; gap: 6px; font-size: .9rem; }
.pf-act p:not(.pf-h) { padding: 8px 12px; border-radius: 10px; background: #f6f6f8; }
.pf-cap { font-size: .72rem; color: #a0a0a6; }
.pf-sec { transition: filter .5s var(--ease), background-color .5s; }
.pf-card[data-blur="1"] .pf-sec { filter: blur(7px); background-color: rgba(0, 0, 0, .08); border-radius: 6px; user-select: none; }
.pf-share { display: grid; gap: 8px; justify-items: start; }

/* ===== tradeoff: funnel or fan ===== */
.tr { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); grid-template-areas: "copy stage" "foot stage" "src src"; column-gap: clamp(28px, 4vw, 60px); align-items: start; }
.tr-copy { grid-area: copy; }
.tr-seg { margin-top: 22px; }
.tr-text { margin-top: 16px; font-size: 1.02rem; line-height: 1.75; padding: 16px 18px; border-radius: 16px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-ink); min-height: 7.5em; }
.tr[data-s="0"] .tr-text { box-shadow: inset 0 0 0 1px rgba(255, 106, 106, .5); }
.tr[data-s="1"] .tr-text { box-shadow: inset 0 0 0 1px rgba(99, 214, 155, .5); }
.tr-why { margin-top: 12px; color: var(--on-ink-2); font-size: .94rem; }
.tr-foot { grid-area: foot; margin-top: 16px; display: grid; gap: 8px; }
.tr-take { font-weight: 600; }
.tr .src { grid-area: src; }
.tr-stage { grid-area: stage; position: relative; padding-top: 10px; }
.tr-ask { text-align: center; padding: 14px 18px; border-radius: 999px; background: var(--on-ink); color: var(--ink); font-weight: 600; width: max-content; max-width: 100%; margin: 0 auto; }
.tr-flow { display: block; width: 100%; height: 150px; margin-top: 6px; }
.tr-funnel { fill: none; stroke: rgba(255, 106, 106, .75); stroke-width: 1.6; stroke-dasharray: 4 5; transition: opacity .6s; vector-effect: non-scaling-stroke; }
.tr-fan { fill: none; stroke: rgba(99, 214, 155, .8); stroke-width: 2; stroke-dasharray: 4 5; transition: opacity .6s; vector-effect: non-scaling-stroke; }
.tr[data-s="0"] .tr-fan, .tr[data-s="1"] .tr-funnel { opacity: 0; }
.tr-out { transition: opacity .5s var(--ease), transform .6s var(--ease); }
.tr-out.one { width: 46%; margin: 0 auto; text-align: center; }
.tr-cardrow { display: flex; gap: 6px; justify-content: center; }
.tr-cardrow i { width: 30%; aspect-ratio: .8; border-radius: 10px; background: rgba(241, 239, 233, .14); }
.tr-out.one p { margin-top: 8px; font-size: .86rem; color: #ff9a9a; }
.tr-out.many { position: absolute; left: 0; right: 0; top: 214px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tr-out.many > div { padding: 14px; border-radius: 16px; background: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(99, 214, 155, .4); }
.tr-out.many b { font: 600 .8rem/1 var(--mono); color: #63d69b; }
.tr-out.many > div p { margin-top: 6px; font-size: .9rem; }
.tr-choose { grid-column: 1 / -1; text-align: center; font-size: .9rem; color: var(--on-ink-2); margin-top: 4px; }
.tr-choose b { color: #63d69b; }
.tr[data-s="0"] .tr-out.many, .tr[data-s="1"] .tr-out.one { opacity: 0; transform: translateY(10px); pointer-events: none; }

/* ===== web personalization ===== */
.wp { display: grid; grid-template-columns: minmax(300px, .88fr) minmax(0, 1.12fr); grid-template-areas: "copy lab" "src lab"; column-gap: clamp(28px, 4vw, 60px); align-items: start; }
.wp-copy { grid-area: copy; }
.wp-route { margin-top: 18px; }
.wp-rules { margin-top: 16px; display: grid; gap: 12px; }
.wp-rules li { font-size: .9rem; line-height: 1.65; color: var(--text-2); padding-left: 14px; border-left: 3px solid var(--paper-3); }
.wp-rules b { display: block; color: var(--text); font-size: .98rem; }
.wp-dist { margin-top: 14px; }
.wp .src { grid-area: src; }
.wp-lab { grid-area: lab; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.wp-h { font-size: .84rem; color: var(--muted); }
.wp-pool { display: flex; flex-wrap: wrap; gap: 6px; min-height: 2.2em; }
.wp-line { max-width: 100%; padding: 7px 12px; border-radius: 10px; background: var(--white); box-shadow: 0 0 0 1px var(--line); font-size: .8rem; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: transform .2s var(--ease), opacity .3s; }
.wp-line b { margin-right: 6px; }
.wp-line:hover { transform: translateY(-2px); }
.wp-line.placed { opacity: 0; transform: scale(.8); pointer-events: none; position: absolute; }
.wp-form { padding: 16px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 24px 50px -36px rgba(0, 0, 0, .4); display: grid; gap: 10px; }
.wp-field p { font-weight: 600; font-size: .9rem; }
.wp-field small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.wp-drop { margin-top: 6px; min-height: 52px; padding: 8px; border-radius: 12px; background: #f6f6f8; display: grid; gap: 6px; align-content: start; }
.wp-placed { font-size: .8rem; line-height: 1.55; padding: 6px 10px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px #ececef; animation: log-in .4s var(--ease); }
.wp-placed b { margin-right: 6px; }
.wp-pers { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .86rem; font-weight: 600; }
.wp-pers .seg button { min-height: 30px; font-size: .78rem; }
.wp-lab .prompt textarea { min-height: 5em; max-height: 9em; font-size: .82rem; }

/* ===== local instructions ===== */
.li7 { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr); grid-template-areas: "copy lab" "src lab"; column-gap: clamp(28px, 4vw, 60px); align-items: start; }
.li7-copy { grid-area: copy; }
.li7-route { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.li7-route > span:last-child { font-size: .8rem; color: var(--muted); }
.li7-pers { margin-top: 16px; display: grid; gap: 6px; padding: 16px 18px; border-radius: 16px; background: var(--ink); color: var(--on-ink); }
.li7-pers p:not(.li7-h) { font-size: .88rem; color: var(--on-ink-2); }
.li7-pers b { color: var(--on-ink); margin-right: 8px; }
.li7-h { font-size: .8rem; color: var(--muted); }
.li7-pers .li7-h { color: var(--mark); }
.li7-copy .note { margin-top: 12px; }
.li7 .src { grid-area: src; }
.li7-lab { grid-area: lab; display: grid; gap: 12px; }
.li7-rules { display: flex; flex-wrap: wrap; gap: 6px; }
.li7-rule { padding: 8px 12px; border-radius: 10px; background: var(--white); box-shadow: 0 0 0 1px var(--line); font-size: .84rem; transition: opacity .3s, transform .2s; }
.li7-rule:hover { transform: translateY(-2px); }
.li7-rule.bad { box-shadow: 0 0 0 1px rgba(223, 71, 71, .4); }
.li7-rule:disabled { opacity: .25; }
.li7-sheets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.li7-sheet { min-height: 150px; padding: 12px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 16px 30px -26px rgba(0, 0, 0, .4); display: grid; align-content: start; gap: 8px; transition: box-shadow .3s; }
.li7-sheet > p { display: grid; gap: 2px; }
.li7-sheet > p b { font-size: .92rem; }
.li7-sheet code { font-size: .68rem; justify-self: start; }
.li7-in { display: grid; gap: 6px; }
.li7-in p { font-size: .8rem; padding: 6px 8px; border-radius: 8px; background: #f6f6f8; animation: log-in .4s var(--ease); }
.li7-in p.bad { background: #ffe9e9; color: #a13a3a; }
.li7-lab.conflict [data-home="global"], .li7-lab.conflict [data-home="chat"] { box-shadow: 0 0 0 2px var(--bad), 0 16px 30px -26px rgba(0, 0, 0, .4); }
.li7-say { min-height: 2.6em; font-size: .92rem; font-weight: 600; }
.li7-lab .prompt textarea { min-height: 4.5em; max-height: 8em; font-size: .8rem; }

/* ===== memory ===== */
.mm { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 1fr); grid-template-areas: "copy lab" "src lab"; column-gap: clamp(28px, 4vw, 60px); align-items: start; }
.mm-copy { grid-area: copy; }
.mm-islands { margin-top: 22px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.mm-is { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: 18px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-ink); }
.mm-is b { font-size: 1rem; }
.mm-is span:not(.path):not(.path span) { font-size: .82rem; color: var(--on-ink-2); }
.mm-is .path { font-size: .66rem; }
.mm-gap { display: grid; place-items: center; gap: 4px; width: 50px; }
.mm-gap i { width: 2px; height: 70%; background: repeating-linear-gradient(transparent 0 5px, rgba(255, 106, 106, .7) 5px 10px); }
.mm-gap span { font-size: .7rem; color: #ff9a9a; writing-mode: vertical-rl; }
.mm-cmd { margin-top: 14px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 14px 16px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line-ink-2); }
.mm-cmd code { font-size: .95rem; padding: 6px 10px; background: var(--mark); color: var(--ink); }
.mm-cmd p { font-size: .9rem; color: var(--on-ink-2); }
.mm-cmd b { color: var(--on-ink); }
.mm .src { grid-area: src; }
.mm-lab { grid-area: lab; display: grid; gap: 14px; }
.mm-h { font-size: .8rem; color: var(--on-ink-muted); }
.mm-list { display: grid; gap: 6px; }
.mm-list li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff; color: #111; font-size: .92rem; transition: background-color .4s; }
.mm-list li p { flex: 1; }
.mm-list li.old { background: #fff4d6; }
.mm-list li.old p { text-decoration: line-through; text-decoration-color: rgba(223, 71, 71, .6); }
.mm-list li.fixed { background: #e3f6ea; animation: log-in .5s var(--ease); }
.mm-age { font: .72rem/1 var(--mono); color: #8a6d12; }
.mm-list li.fixed .mm-age { color: var(--ok); }
.mm-care { display: grid; gap: 6px; font-size: .88rem; color: var(--on-ink-2); }
.mm-care b { color: var(--on-ink); margin-right: 8px; }
.mm-ref { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--ink-2); text-align: left; cursor: zoom-in; }
.mm-ref img { width: 62px; height: 112px; object-fit: cover; object-position: top; border-radius: 10px; }
.mm-ref span { font-size: .82rem; color: var(--on-ink-2); }

@media (max-width: 1100px) {
  .st7, .cf, .pm, .fa, .pf, .tr, .wp, .li7, .mm { grid-template-columns: 1fr; grid-template-areas: none; }
  .st7 > *, .cf > *, .pm > *, .fa > *, .pf > *, .tr > *, .wp > *, .li7 > *, .mm > * { grid-area: auto !important; }
  .tr-out.many { position: relative; top: 0; }
}
@media (max-width: 760px) {
  .st7-panel { grid-template-columns: 1fr; }
  .st7-side { display: none; }
  .li7-sheets, .tr-out.many, .pf-stats { grid-template-columns: 1fr; }
  .mm-islands, .pf-not { grid-template-columns: 1fr; }
  .mm-gap { width: auto; height: 30px; }
  .mm-gap span { writing-mode: horizontal-tb; }
  .pm-acts li { font-size: .7rem; padding: 6px 8px; }
}

@media (max-width: 760px) {
  .cf-lab { grid-template-columns: minmax(0, 1fr); }
  .cf-layer { grid-template-columns: 5em minmax(0, 1fr); }
  .cf-layer em { grid-column: 1 / -1; }
  .cf-layer code { overflow-wrap: anywhere; }
  .cf-rules { grid-template-columns: 1fr; }
}
