/* №270: site theme, stable controls and stronger action emphasis. */
.kh-dialog267{width:min(900px,94vw);max-height:88dvh;overflow:auto;box-sizing:border-box;color:var(--kh-text,#edf1fa);background:var(--glass-menu,var(--kh-surface,#1c293d));border:1px solid var(--kh-border,#aab0c8);border-radius:14px;padding:18px;font:16px/1.5 system-ui;backdrop-filter:blur(18px)}
.kh-dialog267::backdrop{background:#0007}.kh-dialog267 h2{font-size:1.3rem;margin:0}.kh-dialog267 header{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:-18px;background:var(--kh-surface,#1c293d);z-index:2;padding:8px 0}
.kh-dialog267 input,.kh-dialog267 select,.kh-dialog267 textarea{box-sizing:border-box;width:100%;padding:10px;border:1px solid var(--kh-border,#aab0c8);border-radius:8px;background:var(--kh-input,#1c293d);color:var(--kh-text,#edf1fa);font:inherit}
html body :is(.kh-dialog267,.kh-tools267,.kh-context267,.kh-panel269,.kh-rating269) button,html body :is(.kh-trial-button267,.kh-author-open269){cursor:pointer;padding:8px 12px;border-radius:12px;border:1px solid var(--kh-border,#aab0c8);background:color-mix(in srgb,var(--kh-raised,var(--kh-surface,#1c293d)) 24%,transparent)!important;color:var(--kh-text,#edf1fa)!important;-webkit-text-fill-color:currentColor;filter:none!important;font:inherit;min-height:36px}
html body :is(.kh-dialog267,.kh-tools267,.kh-context267,.kh-panel269,.kh-rating269) button:hover:not(:disabled),html body :is(.kh-trial-button267,.kh-author-open269):hover{background:var(--kh-hover,#304257)!important}
.kh-dialog267 a{color:var(--kh-text,#edf1fa);text-decoration:underline}.kh-dialog267 section{margin:12px 0}.kh-dialog267 details{border-bottom:1px solid var(--kh-border,#aab0c8);padding:10px 0}.kh-dialog267 summary{cursor:pointer;font-weight:650;color:inherit;background:transparent}.kh-dialog267 iframe{display:block;width:100%;height:65dvh;border:1px solid var(--kh-border,#aab0c8);background:var(--kh-surface,#1c293d)}
.kh-live267{width:97vw;max-width:none;height:94dvh;max-height:none}.kh-live267 iframe{height:calc(94dvh - 200px)}.kh-clock267{font:700 28px monospace;color:var(--kh-text,#edf1fa)}.kh-trial-state267{padding:8px;background:var(--kh-raised,#223b45);border-radius:8px}.kh-method-note267{font-size:.9rem;line-height:1.4}.kh-photo-help267{background:var(--kh-surface,#1c293d);border-left:3px solid var(--kh-accent,#83b7a9);padding:9px;color:var(--kh-text,#edf1fa)}
.kh-emphasis267:not(:disabled):not([aria-disabled=true]){border-color:var(--kh-accent,#83b7a9)!important;box-shadow:0 0 0 2px var(--kh-accent,#83b7a9),0 0 10px color-mix(in srgb,var(--kh-accent,#83b7a9) 45%,transparent);animation:kh-pulse267 1.8s ease-in-out infinite!important}
@keyframes kh-pulse267{50%{box-shadow:0 0 0 4px var(--kh-accent,#83b7a9),0 0 30px 5px color-mix(in srgb,var(--kh-accent,#83b7a9) 80%,transparent);filter:brightness(1.22)}}
.kh-emphasis267:disabled,.kh-emphasis267[aria-disabled=true]{animation:none!important;box-shadow:none!important}
html body .header .brand-toggle212{border-radius:7px;outline:2px solid var(--kh-accent,#83b7a9);outline-offset:3px;animation:kh-pulse267 1.8s ease-in-out infinite!important}
html body .header .brand-toggle212 .brand-mark{animation:none!important}
html body .header .brand-toggle212:hover,html body .header .brand-toggle212:focus-visible{animation-play-state:paused!important;outline-width:3px;box-shadow:0 0 0 4px var(--kh-accent,#83b7a9),0 0 24px var(--kh-accent,#83b7a9)}
html body .header .brand-toggle212[data-calm221=true]{animation:none!important}
@media(prefers-reduced-motion:reduce){html body .header .brand-toggle212{animation:none!important}}
.kh-trial-locked267{opacity:.55!important;cursor:not-allowed!important}.kh-embedded-banner267{position:sticky;top:0;z-index:99999;background:var(--kh-warning-bg,#fff4ce);color:var(--kh-warning,#513c0e);padding:7px 12px;font:14px system-ui}.kh-expired267{position:fixed;inset:0;background:var(--kh-surface,#1c293d);color:var(--kh-text,#edf1fa);z-index:2147483001;display:grid;place-items:center;text-align:center;padding:24px;font:20px system-ui}.kh-context267{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.kh-access267{text-decoration:underline;padding:6px 10px;font-weight:650}
.kh-dialog267 [hidden]{display:none!important}.kh-dialog267 button:disabled{opacity:.55!important;cursor:wait}
html body .kh-tools267{position:static!important;inset:auto!important;display:inline-flex!important;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%;width:auto;margin:0;padding:0;border:0;background:transparent;box-shadow:none;z-index:auto}html body .kh-tools267 button{font:inherit;white-space:normal}
.kh-progress267{position:fixed;z-index:2147483000}.kh-progress-row267{display:grid;gap:4px;padding:8px 0;border-top:1px solid var(--kh-border,#aab0c8)}.kh-progress-row267 progress{width:100%;height:8px;accent-color:var(--kh-accent,#83b7a9)}.kh-error267{border-left:3px solid var(--kh-warning,#dfb870);padding-left:8px}
@media(max-width:600px){.kh-dialog267{padding:12px;font-size:15px}.kh-dialog267 header{top:-12px}.kh-live267 iframe{height:calc(94dvh - 240px)}}
@media(prefers-reduced-motion:reduce){.kh-emphasis267:not(:disabled):not([aria-disabled=true]){animation:none!important}.kh-progress267 progress{animation:none}}
/* №269 follows the site's active theme; only a user action moves this panel. */
html body .kh-panel269{width:min(340px,calc(100vw - 16px));height:min(440px,55dvh);max-height:none;padding:0;display:flex!important;flex-direction:column;overflow:hidden;box-sizing:border-box;background:var(--glass211,var(--kh-surface,#1c293d));color:var(--kh-text,#edf1fa);border:1px solid var(--kh-border,#aab0c8);border-radius:14px;backdrop-filter:blur(12px);box-shadow:0 8px 28px #0005;font:13px/1.4 system-ui;transition:none;animation:none}
html body .kh-panel269 header{display:flex;gap:6px;align-items:center;flex:none;padding:7px;border-bottom:1px solid var(--kh-border,#aab0c8)}
html body .kh-panel269 button{background:var(--kh-surface,#1c293d)!important;color:var(--kh-text,#edf1fa)!important;border:1px solid var(--kh-border,#aab0c8);border-radius:8px;min-height:32px;font:inherit;filter:none!important}
html body .kh-panel269 .kh-panel-handle269{flex:1;text-align:left;font-weight:700;cursor:move;touch-action:none;user-select:none}
.kh-panel-caption269{margin:7px 10px;font-size:12px;flex:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kh-panel269>progress{margin:0 10px 6px;width:calc(100% - 20px);height:7px;accent-color:var(--kh-accent,#74d6b3);flex:none}
.kh-panel-content269{padding:0 10px 10px;overflow:auto;overscroll-behavior:contain;min-height:0;flex:1}.kh-panel-content269 h3{font-size:14px;margin:16px 0 8px}.kh-panel269 .kh-progress-row267{padding:6px 0;gap:2px;border-color:var(--kh-border,#aab0c8)}.kh-panel269 small{color:var(--kh-muted,#bac6d7)}.kh-metric269{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid color-mix(in srgb,var(--kh-border,#aab0c8) 35%,transparent)}.kh-metric269 strong,.kh-metric269 small{max-width:53%;text-align:right;font-size:12px;overflow-wrap:anywhere}.kh-panel-source269{font-size:11px;color:var(--kh-muted,#bac6d7)}
html body .kh-panel269.is-collapsed269{height:52px}.kh-panel269.is-collapsed269>:not(header){display:none!important}.kh-panel269 [hidden]{display:none!important}
.kh-author269{width:97vw;max-width:none;height:94dvh;max-height:none}.kh-author269 iframe{height:calc(94dvh - 170px)}.kh-author-row269{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid var(--kh-border,#aab0c8)}.kh-author-row269 strong{flex-basis:100%}.kh-author-open269{margin-top:10px;background:var(--kh-button)!important;color:var(--kh-button-text)!important;border:1px solid var(--kh-border);border-radius:8px;padding:10px;font-weight:700}.kh-tools267 [hidden],[data-author269][hidden]{display:none!important}
@media(max-width:700px){html body .kh-panel269{height:min(350px,48dvh);max-height:none;width:min(300px,calc(100vw - 16px))}html body .kh-panel269.is-collapsed269{height:52px}}
.kh-rating269{position:fixed;right:16px;bottom:80px;z-index:10000;display:flex;align-items:center;flex-wrap:wrap;gap:8px;max-width:min(330px,calc(100vw - 32px));padding:9px 12px;border:1px solid var(--kh-border,#aab0c8);border-radius:12px;background:var(--glass211,var(--kh-surface,#1c293d));color:var(--kh-text,#edf1fa);box-shadow:0 5px 20px #0004;backdrop-filter:blur(12px);font:13px/1.4 system-ui}.kh-rating269 button{min-height:44px;border-radius:8px;border:1px solid var(--kh-border);background:var(--kh-surface);color:var(--kh-text);padding:8px}.kh-rating269 small{flex-basis:100%}.kh-rating-reaction269{position:fixed;left:50%;top:22%;transform:translateX(-50%);z-index:2147483002;padding:16px 22px;max-width:90vw;border-radius:14px;border:1px solid var(--kh-border);background:var(--kh-surface);color:var(--kh-text);box-shadow:0 10px 35px #0006;font:17px/1.5 system-ui}

@media(max-width:700px){.kh-rating269{bottom:calc(8px + env(safe-area-inset-bottom,0px));right:8px;max-width:calc(100vw - 16px);padding:6px 8px}.kh-rating269 button{padding:6px 10px}.kh-panel269 .kh-panel-handle269{min-width:0}}
.kh-confetti269{position:fixed;inset:0;pointer-events:none;z-index:2147483001;overflow:hidden}.kh-confetti269 i{position:absolute;top:-20px;width:7px;height:13px;background:var(--kh-accent);animation:kh-confetti269 1.5s ease-in forwards}@keyframes kh-confetti269{to{transform:translateY(85vh) rotate(540deg);opacity:0}}@media(prefers-reduced-motion:reduce){.kh-confetti269{display:none}}

.kh-rating269 button{display:inline-flex;align-items:center;gap:6px}.kh-rating269 button svg{width:20px;height:20px}
/* Keep service actions reachable above the existing movable bottom controls. */
html body .header-utilities .kh-tools267{order:-1}
@media(max-width:900px),(max-height:600px){html body:has(.kh-tools267){padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))}}

.kh-panel-ops269{margin:8px 0}.kh-panel-ops269>summary{cursor:pointer;font-weight:650;color:var(--kh-text);background:transparent;padding:5px 0}.kh-panel-content269 h3{margin-top:10px}

/* Let the program use the remaining screen instead of a fixed-height iframe. */
.kh-live267[open],.kh-author269[open]{display:flex;flex-direction:column}
.kh-live267>header,.kh-author269>header,.kh-live267>.kh-context267,.kh-live267>.kh-trial-state267,.kh-author269>p{flex:none}
.kh-live267>iframe,.kh-author269>iframe{flex:1;min-height:140px;height:auto}
.kh-access267{border:1px solid var(--kh-border,#aab0c8);border-radius:12px}
.kh-dialog267>header>button{flex-shrink:0;white-space:nowrap}
@media(max-width:600px),(max-height:500px){.kh-dialog267>header h2{font-size:1rem;line-height:1.3}.kh-trial-state267{font-size:.85rem;line-height:1.4;margin:8px 0}.kh-live267>.kh-context267{margin:6px 0}.kh-clock267{font-size:24px}}
