/* 07 设置：四张纸卡（我们 / 接口和模型 / 外观 / 小屋和心潮）+ 清缓存 */
.settings h1.title { display: flex; align-items: flex-end; gap: 10px; margin: 6px 0 0 4px; font-size: 22px; font-weight: 600; letter-spacing: 2px; }
.settings h1.title .script { font-size: 40px; line-height: 1; font-weight: 400; }
.st-cards { display: flex; flex-direction: column; gap: 22px; margin-top: 22px; }
.st-card { position: relative; background: var(--c-paper); border-radius: 8px; box-shadow: 0 5px 12px rgba(var(--c-shadow), .12); padding: 16px 16px 6px; }
.st-card:nth-child(odd) { transform: rotate(-.5deg); }
.st-card:nth-child(even) { transform: rotate(.5deg); }
.st-card > .tape { top: -8px; width: 56px; }
.st-card h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.st-card h2 .script { font-size: 22px; font-weight: 400; }

.st-row { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px dashed rgba(92, 132, 177, .3); font-size: 14px; }
.st-row > .k { flex: none; width: 84px; color: var(--c-ink-2); font-size: 13px; }
.st-row input[type="text"], .st-row input[type="url"], .st-row input[type="password"], .st-row input[type="date"], .st-row input[type="time"], .st-row select {
  flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; text-align: right; font: inherit; font-size: 14px; color: var(--c-ink); outline: none;
  border-bottom: 1.5px dashed transparent;
}
.st-row input:focus, .st-row select:focus { border-bottom-color: var(--c-accent); }
.st-row .mono, .st-row input.mono { font-family: var(--f-mono); font-size: 12px; }
.st-row.wrap { flex-wrap: wrap; padding: 8px 0; align-items: flex-start; }
.st-row .hint { font-size: 12px; color: var(--c-ink-2); }

.chips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 15px; background: var(--c-grid-bg); font-size: 12px; }
.chip.mono { font-family: var(--f-mono); }
.chip[aria-checked="true"], .chip[aria-pressed="true"] { background: var(--c-paper-blue); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--c-blue); }
.chip .x { width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--c-ink-2); }

.swatches { flex: 1; display: flex; justify-content: flex-end; gap: 10px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--c-paper); box-shadow: 0 0 0 1px rgba(92, 132, 177, .3); }
.sw[aria-checked="true"] { box-shadow: 0 0 0 2px var(--c-accent); }

.toggle { width: 46px; height: 28px; border-radius: 14px; background: #D5DEEA; position: relative; flex: none; transition: background .2s ease; }
.toggle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--c-paper); transition: left .2s ease; box-shadow: 0 1px 3px rgba(var(--c-shadow), .2); }
.toggle[aria-checked="true"] { background: var(--c-blue); }
.toggle[aria-checked="true"]::after { left: 21px; }

.range { flex: 1; accent-color: var(--c-blue); }

/* 我们：两个头像挨在一起 */
.us { display: flex; justify-content: center; padding: 8px 0 14px; position: relative; }
.us label { width: 66px; height: 66px; border-radius: 50%; border: 3px solid var(--c-paper); box-shadow: 0 3px 8px rgba(var(--c-shadow), .18); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; position: relative; }
.us label img { width: 100%; height: 100%; object-fit: cover; }
.us .her { background: var(--c-paper-pink); transform: rotate(-5deg); margin-right: -10px; z-index: 1; }
.us .her svg { stroke: var(--c-pink-ink); }
.us .him { background: var(--c-paper-blue); transform: rotate(5deg); }
.us .him svg { stroke: var(--c-accent); }
.us .heart { position: absolute; left: 50%; top: 2px; margin-left: -11px; z-index: 2; }

.st-btns { display: flex; gap: 10px; padding: 10px 0 12px; border-top: 1px dashed rgba(92, 132, 177, .3); }
.st-btns .btn { flex: 1; height: 42px; font-size: 14px; }
.st-result { font-size: 12px; padding: 0 0 10px; }
.st-result.ok { color: var(--c-ok); }
.st-result.bad { color: var(--c-fail); }

.st-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 0 4px; }
.st-foot button { height: 40px; padding: 0 18px; border-radius: 20px; background: var(--c-paper); font-size: 13px; box-shadow: 0 3px 8px rgba(var(--c-shadow), .1); }
.st-foot .mono { font-size: 11px; color: var(--c-ink-2); }

/* 温度滑条：自己画轨道，不用系统的灰黑色 */
.range { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: var(--c-paper-blue); outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--c-paper); box-shadow: 0 1px 4px rgba(var(--c-shadow), .35), inset 0 0 0 6px var(--c-blue); cursor: pointer; }
.range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--c-paper); box-shadow: 0 1px 4px rgba(var(--c-shadow), .35), inset 0 0 0 6px var(--c-blue); }
.range:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 6px; }


/* Independent chat/tool model pools and the single fixed memory model */
.model-pools { padding: 2px 0 8px; }
.model-pool { border-top: 1px dashed rgba(92, 132, 177, .3); padding: 12px 0 8px; }
.pool-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pool-head > div { display: flex; flex-direction: column; gap: 3px; }
.pool-head b { font-size: 13px; }
.pool-head small, .pool-empty { color: var(--c-ink-2); font-size: 11px; }
.pool-items { display: flex; flex-direction: column; gap: 8px; margin-top: 9px; }
.model-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; border-radius: 8px; background: rgba(221, 235, 247, .38); }
.model-item.is-active { box-shadow: inset 0 0 0 1px rgba(92, 132, 177, .42); }
.model-meta { min-width: 0; flex: 1 1 100%; display: flex; flex-direction: column; gap: 3px; }
.model-meta b { font-size: 13px; }
.model-meta span, .model-meta small { min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
.model-meta small { color: var(--c-ink-2); }
.pool-active { margin-right: auto; color: var(--c-blue); font-size: 11px; }
.pool-remove { color: var(--c-pink-ink); }
.model-form { display: grid; gap: 9px; margin-top: 10px; padding: 12px; border-radius: 8px; background: rgba(248, 246, 240, .8); }
.model-form > strong { font-size: 13px; }
.model-form > label:not(.model-check) { display: grid; gap: 4px; color: var(--c-ink-2); font-size: 11px; }
.model-form input:not([type="checkbox"]), .model-form select { width: 100%; min-width: 0; height: 36px; padding: 0 8px; border: 1px solid rgba(92,132,177,.25); border-radius: 6px; background: var(--c-paper); color: var(--c-ink); font: inherit; font-size: 12px; }
.model-form .model-check { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.model-form-actions { display: flex; gap: 8px; }
.model-form-actions .btn { flex: 1; min-height: 38px; }

.st-prompt { display: grid; gap: 7px; padding: 12px 0; border-top: 1px dashed rgba(92,132,177,.3); }
.st-prompt > span { font-size: 13px; color: var(--c-ink-2); }
.st-prompt textarea { width:100%; min-height:120px; resize:vertical; padding:10px; border:1px solid rgba(92,132,177,.25); border-radius:8px; background:rgba(255,255,255,.65); color:var(--c-ink); font:inherit; font-size:12px; line-height:1.6; }
.st-prompt small { color:var(--c-ink-2); font-size:11px; }

/* 世界书板块 */
.wb-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.wb-card { border: 1px solid rgba(92, 132, 177, .25); border-radius: 12px; background: rgba(255, 255, 255, .65); overflow: hidden; transition: all .2s ease; }
.wb-card.disabled { opacity: .65; }
.wb-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; user-select: none; }
.wb-header:hover { background: rgba(221, 235, 247, .25); }
.wb-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--c-paper-blue); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.wb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wb-title-row { display: flex; align-items: center; gap: 6px; }
.wb-title { font-size: 13px; font-weight: bold; color: var(--c-ink); }
.wb-desc { font-size: 11px; color: var(--c-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--c-paper-blue); color: var(--c-blue); font-weight: normal; }
.wb-actions { display: flex; align-items: center; gap: 8px; }
.wb-arrow { font-size: 11px; color: var(--c-ink-2); transition: transform .2s ease; }
.wb-card.expanded .wb-arrow { transform: rotate(90deg); }

.wb-entries { display: none; padding: 8px 14px 12px; border-top: 1px dashed rgba(92, 132, 177, .2); background: rgba(248, 246, 240, .5); }
.wb-card.expanded .wb-entries { display: flex; flex-direction: column; gap: 8px; }
.wbe-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--c-paper); border: 1px solid rgba(92, 132, 177, .15); }
.wbe-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wbe-title { font-size: 12px; font-weight: 500; color: var(--c-ink); display: flex; align-items: center; gap: 6px; }
.wbe-keywords { font-size: 10px; color: var(--c-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toggle.small { width: 34px; height: 20px; border-radius: 10px; }
.toggle.small::after { width: 14px; height: 14px; }
.toggle.small[aria-checked="true"]::after { left: 16px; }

.mcp-title-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.mcp-title-row h2 { margin-bottom:0; }
.mcp-intro { margin:4px 0 10px; color:var(--c-ink-2); font-size:11px; }
.mcp-list { display:flex; flex-direction:column; gap:9px; }
.mcp-item { padding:11px; border-radius:9px; background:rgba(221,235,247,.38); border:1px solid rgba(92,132,177,.18); }
.mcp-item.disabled { opacity:.58; }
.mcp-meta { min-width:0; display:flex; flex-direction:column; gap:4px; }
.mcp-name-row { display:flex; align-items:center; gap:7px; }
.mcp-name-row b { font-size:13px; }
.mcp-status { font-size:10px; color:var(--c-blue); }
.mcp-meta code { overflow-wrap:anywhere; color:var(--c-ink-2); font-size:10px; }
.mcp-meta small { color:var(--c-ink-2); font-size:10px; }
.mcp-actions { display:flex; align-items:center; gap:6px; margin-top:8px; }
.mcp-tools { display:flex; flex-direction:column; gap:5px; margin-top:8px; font-size:11px; }
.mcp-tools > div { display:flex; flex-direction:column; gap:2px; padding:6px 8px; border-left:2px solid var(--c-blue); background:rgba(255,255,255,.5); }
.mcp-tools span { color:var(--c-ink-2); }
.mcp-credential-layer { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:18px; }
.mcp-credential-layer .scrim { position:absolute; inset:0; background:rgba(30,42,58,.35); backdrop-filter:blur(3px); }
.mcp-credential-dialog { position:relative; width:min(100%,390px); padding:20px; border-radius:14px; background:var(--c-paper); box-shadow:0 16px 40px rgba(0,0,0,.25); }
.mcp-credential-dialog h3 { margin:0 0 6px; font-size:17px; }
.mcp-credential-dialog p { margin:0 0 16px; color:var(--c-ink-2); font-size:12px; }
.mcp-credential-dialog label { display:grid; gap:5px; margin:10px 0; color:var(--c-ink-2); font-size:11px; }
.mcp-credential-dialog input { height:40px; padding:0 10px; border:1px solid rgba(92,132,177,.3); border-radius:8px; background:var(--c-paper-blue); color:var(--c-ink); font:inherit; }
.mcp-dialog-actions { display:flex; gap:8px; margin-top:16px; }
.mcp-dialog-actions button { flex:1; min-height:40px; border-radius:9px; background:var(--c-grid-bg); }
.mcp-dialog-actions button.primary { background:var(--c-blue); color:white; }
