/* Fixed geometry: hover and theme changes never move surrounding controls. */
body, .layout > aside, input, select, textarea { transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease; }
.layout > aside { grid-template-columns: 190px minmax(0,1fr) auto; gap: 22px; }
.layout > aside .side-bottom { gap: 18px; }
#registration-link { color: var(--muted); font-size: 13px; white-space: nowrap; text-decoration: none; }
#registration-link:hover { color: var(--ink); }
.layout > aside a#admin-button.signin-button { padding: 10px 20px; min-height: 40px; color: var(--surface); background: var(--ink); border: 1px solid var(--ink); border-radius: 5px; }
.layout > aside a#admin-button.signin-button:hover { background: var(--red); border-color: var(--red); color: var(--surface); }
.layout > aside #theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0; flex-shrink: 0; }
.layout > aside #theme-toggle .ui-icon { width: 14px; height: 14px; }
.theme-symbol { display: inline-flex; align-items: center; color: var(--muted); }
.theme-track { display: inline-block; position: relative; width: 34px; height: 20px; background: var(--ink); border: 1px solid var(--ink); border-radius: 20px; }
.theme-thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: transform 220ms ease; }
#theme-toggle[aria-checked=true] .theme-thumb { transform: translateX(14px); }
.experience-section { display: grid; grid-template-columns: minmax(180px,260px) minmax(0,1fr); gap: 48px; align-items: start; }
.section-workspace { min-width: 0; }
.section-vignette { min-width: 0; padding-top: 8px; }
.section-index { display: flex; align-items: center; gap: 17px; margin: 0 0 26px; color: var(--muted); font-size: 12px; }
.section-index span { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--catalogue-serif); }
.section-index span::after { content: ''; width: 33px; height: 1px; background: var(--line); }
.section-art { margin: 0; width: 100%; height: 310px; overflow: hidden; border-radius: 2px 120px 2px 2px; background: #d4c6b5; }
.section-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 29% center; }
.art-materials { border-radius: 120px 2px 2px 2px; }
.art-materials img { object-position: 67% center; }
.art-hotline { height: 225px; margin-top: 37px; }
.art-hotline img { object-position: 42% center; }
:root[data-theme=dark] .section-art img { filter: brightness(.72) saturate(.65); }
.experience-section .portal-panorama { display: none; }
.experience-section .request-shell { max-width: none; }
.experience-section .auth-shell { min-height: 0; padding: 0; justify-content: flex-start; }
.experience-section .auth-panel { max-width: 430px; width: 100%; margin: 0; }
.section-vignette h1 { margin: 0; font: normal 43px/1.03 var(--catalogue-serif); letter-spacing: -1.3px; }
.section-lead { margin: 22px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 230px; }
.profile-edit-settings { margin: 25px 0 0; }
.profile-edit-settings form { padding: 25px 0 0; max-width: 520px; }
.profile-edit-settings summary { color: var(--red); }
.mail-invite { position: fixed; z-index: 65; bottom: 25px; right: max(25px,env(safe-area-inset-right)); display: grid; grid-template-columns: 30px minmax(0,1fr) 23px; gap: 12px; width: 430px; max-width: calc(100vw - 32px); padding: 23px 19px 23px 23px; color: #fff8f0; background: #8e362d; border: 1px solid #ac5140; border-radius: 10px; box-shadow: 0 12px 45px #2017102b; animation: invite-appear 300ms ease both; }
.mail-invite-icon { display: flex; justify-content: center; padding-top: 1px; color: #f0c68d; }
.mail-invite-icon .ui-icon { width: 25px; height: 25px; }
.mail-invite strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.4; }
.mail-invite p { margin: 7px 0 14px; color: #f0dad2; font-size: 13px; line-height: 1.6; }
.mail-invite-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.mail-invite a { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #fff8f0; text-decoration: underline; text-underline-offset: 4px; }
.mail-invite a .ui-icon { width: 15px; height: 15px; }
.mail-invite button { border: 0; padding: 2px 0; background: transparent; color: #f0dad2; font: inherit; font-size: 11px; cursor: pointer; }
.mail-invite #close-mail-invite { align-self: start; font-size: 25px; line-height: 1; padding: 0; min-width: 23px; min-height: 23px; }
.mail-invite a:hover, .mail-invite button:hover { color: #ffe5a9; }
.mail-invite :is(a,button):focus-visible { outline-color: #ffe5a9; }
.drawer-open .mail-invite { display: none; }
@keyframes invite-appear { from { opacity: 0; } to { opacity: 1; } }
.hotline-workspace { display: grid; grid-template-columns: 205px minmax(0,1fr); min-height: 520px; border: 1px solid var(--line); border-radius: 10px; overflow: clip; background: var(--input); }
.chat-departments { display: block; padding: 22px 10px; margin: 0; border-right: 1px solid var(--line); background: var(--surface-soft); min-width: 0; }
.chat-directory-title { padding: 0 10px 18px; font-size: 14px; font-weight: 600; }
.chat-department-search { display: flex; align-items: center; gap: 6px; margin: 0 8px 16px; padding: 0 5px 0 0; border-bottom: 1px solid var(--line); }
.chat-department-search .ui-icon { flex: 0 0 15px; width: 15px; height: 15px; color: var(--muted); }
.chat-department-search input { min-width: 0; width: 100%; min-height: 35px; padding: 7px 1px; border: 0; background: transparent; font-size: 12px; border-radius: 0; }
.chat-department-list { max-height: 500px; overflow-y: auto; scrollbar-width: thin; }
.chat-department { display: flex; align-items: flex-start; gap: 9px; width: 100%; min-height: 73px; padding: 14px 9px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; color: var(--ink); transform: none; }
.chat-department:hover { background: var(--hover); transform: none; }
.chat-department.selected { background: var(--input); border-color: var(--line); }
.chat-department > span:nth-child(2) { flex: 1; min-width: 0; }
.chat-department strong { display: block; font-size: 13px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.chat-department small { display: block; margin-top: 6px; font-size: 10px; line-height: 1.5; color: var(--muted); }
.department-glyph { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 31px; background: var(--surface); color: var(--department-color); border: 1px solid var(--line); border-radius: 5px; }
.department-glyph .ui-icon { width: 19px; height: 19px; }
.directory-dot { display: inline-block; margin-right: 4px; width: 5px; height: 5px; border-radius: 50%; background: #92958c; vertical-align: 1px; }
.directory-dot.online { background: #50865c; }
.directory-arrow { color: var(--muted); margin: 1px 0 0; line-height: 1.4; }
.directory-no-results { padding: 0 10px; }
.hotline-thread { min-width: 0; display: flex; flex-direction: column; }
.chat-destination-header { display: flex; align-items: center; gap: 12px; padding: 22px 25px; border-bottom: 1px solid var(--line); min-height: 87px; }
.chat-destination-header > div { min-width: 0; }
.chat-destination-header h2 { margin: 0 0 6px; font: 500 16px/1.3 "Segoe UI",Arial,sans-serif; overflow-wrap: anywhere; }
.chat-destination-header .presence { font-size: 11px; }
.chat-back { display: none; }
.chat-history-toolbar { display: flex; align-items: center; gap: 14px; padding: 15px 25px; border-bottom: 1px solid var(--line); }
.chat-history-toolbar .field { min-width: 0; flex: 1; margin: 0; }
.chat-history-toolbar .field > span { font-size: 10px; margin-bottom: 5px; }
.chat-history-toolbar select { min-height: 34px; padding: 6px 28px 6px 9px; font-size: 11px; border-radius: 4px; }
.chat-history-toolbar button { flex-shrink: 0; font-size: 11px; white-space: nowrap; }
.hotline-workspace .chat-panel { display: flex; flex-direction: column; flex: 1; margin: 0; background: transparent; border: 0; border-radius: 0; overflow: hidden; }
.chat-thread-context { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; padding: 13px 25px 0; color: var(--muted); font-size: 11px; }
.chat-thread-context strong { font-weight: 400; }
.chat-thread-context .badge { font-size: 10px; }
.chat-thread-context > button { margin-left: auto; font-size: 11px; }
.chat-visitor { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; padding: 15px 25px 0; font-size: 13px; }
.chat-visitor span { color: var(--muted); font-size: 11px; }
.hotline-workspace .messages { flex: 0 1 auto; min-height: 220px; height: clamp(220px,calc(100dvh - 450px),360px); max-height: 360px; padding: 25px; overflow-y: auto; scrollbar-width: thin; background: transparent; }
.hotline-workspace .bubble { max-width: 91%; padding: 13px 16px; border: 1px solid var(--line); border-radius: 9px 9px 9px 2px; background: var(--surface-soft); }
.hotline-workspace .bubble.mine { border-radius: 9px 9px 2px 9px; background: var(--accent-soft); border-color: transparent; }
.hotline-workspace .message-meta { gap: 14px; flex-wrap: wrap; }
.hotline-workspace .message-meta strong { font-size: 11px; }
.hotline-workspace .message-meta time, .hotline-workspace .message-role { font-size: 10px; }
.hotline-workspace .message-body { margin: 8px 0 0; font-size: 13px; line-height: 1.65; }
.hotline-workspace .compose { padding: 17px 20px; margin: 0; gap: 10px; align-items: end; background: transparent; border-top: 1px solid var(--line); }
.hotline-workspace .compose textarea { min-height: 48px; max-height: 180px; padding: 12px; border-radius: 5px; resize: vertical; font-size: 13px; }
.hotline-workspace .compose .btn { min-height: 48px; padding: 12px; border-radius: 5px; }
.hotline-workspace .compose .btn .ui-icon { width: 18px; height: 18px; }
.hotline-workspace .compose .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hotline-workspace .chat-notice { margin: 0; padding: 17px 25px; border: 0; border-top: 1px solid var(--line); border-radius: 0; font-size: 12px; }
.hotline-thread > .pagination { padding: 14px 20px; margin: 0; border-top: 1px solid var(--line); font-size: 10px; }
.hotline-thread .pagination-info { flex-wrap: wrap; }
.chat-start { padding: 26px; }
.chat-start h2 { margin: 0 0 25px; font: normal 28px/1.2 var(--catalogue-serif); }
.chat-start form { display: grid; gap: 18px; max-width: 570px; }
.chat-start .field { margin: 0; font-size: 12px; }
.chat-start .field input, .chat-start .field select { min-height: 43px; border-radius: 4px; font-size: 13px; }
.chat-start #recipient-online { display: none; }
.chat-start .notice { padding: 12px; font-size: 12px; }
.chat-start .btn { justify-self: start; }
.chat-identity-fields { display: grid; gap: 18px; }
.chat-welcome { flex: 1; display: grid; place-items: center; padding: 25px; }
.hotline-workspace .empty { padding: 30px 0; border: 0; background: transparent; }
.hotline-workspace .empty h2 { font-size: 27px; }
.hotline-workspace .empty p { font-size: 13px; }
@media (max-width: 1200px) {
 .layout > aside { grid-template-columns: 155px minmax(0,1fr) auto; gap: 15px; }
 .layout > aside #nav { gap: 20px; }
 .layout > aside .side-bottom { gap: 12px; }
 .experience-section { grid-template-columns: 205px minmax(0,1fr); gap: 30px; }
 .hotline-section { grid-template-columns: minmax(0,1fr); }
 .hotline-section > .section-vignette { display: grid; grid-template-columns: minmax(0,1fr) 200px; column-gap: 35px; }
 .hotline-section .section-index { grid-column: 1; margin-bottom: 14px; }
 .hotline-section h1 { grid-column: 1; }
 .hotline-section .section-lead { grid-column: 1; max-width: none; margin-top: 13px; }
 .hotline-section .section-art { grid-column: 2; grid-row: 1/4; height: 145px; margin: 0; }
}
@media (max-width: 920px) {
 .layout > aside { grid-template-columns: minmax(105px,1fr) auto; gap: 10px 16px; }
 .experience-section { grid-template-columns: minmax(0,1fr); gap: 24px; }
 .section-vignette { display: none; }
 .hotline-section > .section-vignette { display: block; }
 .hotline-section .section-art, .hotline-section .section-index { display: none; }
 .hotline-section .section-lead { margin-top: 15px; }
 .experience-section .auth-panel { margin: 0 auto; }
 .experience-section .portal-panorama { display: block; }
 .hotline-workspace { grid-template-columns: 210px minmax(0,1fr); }
}
@media (max-width: 620px) {
 .layout > aside { padding-inline: 17px; gap: 10px 8px; }
 .layout > aside .side-bottom { gap: 10px; }
 #registration-link { font-size: 11px; }
 .layout > aside a#admin-button.signin-button { padding: 9px 12px; font-size: 11px; min-height: 36px; }
 .layout > aside #theme-toggle { gap: 0; min-height: 36px; }
 .theme-symbol { display: none; }
 .theme-track { width: 34px; }
 .layout > aside #admin-button { max-width: 160px; }
 .hotline-workspace { display: block; min-height: 430px; }
 .chat-departments { border: 0; min-height: 430px; padding: 22px 13px; }
 .chat-directory-title { font-size: 16px; }
 .chat-department strong { font-size: 14px; }
 .chat-department small { font-size: 12px; }
 .chat-department-list { max-height: 460px; }
 .hotline-thread { display: none; }
 .hotline-workspace.show-thread .hotline-thread { display: flex; }
 .hotline-workspace.show-thread .chat-departments { display: none; }
 .hotline-section:has(.show-thread) > .section-vignette { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
 .hotline-section:has(.show-thread) { gap: 0; }
 .chat-back { display: inline-block; flex: 0 0 100%; padding: 0; margin: 0 0 4px; text-align: left; font-size: 12px; color: var(--red); }
 .chat-destination-header { flex-wrap: wrap; padding: 18px; }
 .chat-destination-header > div { flex: 1; }
 .chat-destination-header h2 { font-size: 15px; }
 .chat-destination-header .presence { font-size: 10px; }
 .chat-history-toolbar { padding: 13px 18px; gap: 9px; }
 .chat-history-toolbar button { max-width: 85px; white-space: normal; text-align: right; }
 .chat-thread-context { padding: 15px 18px 0; }
 .chat-visitor { padding-inline: 18px; }
 .hotline-workspace .messages { height: clamp(190px,calc(100dvh - 570px),330px); min-height: 190px; max-height: 330px; padding: 20px 15px; }
 .hotline-workspace .compose { padding: 14px; }
 .chat-start { padding: 22px 18px; }
 .hotline-section .section-lead { font-size: 13px; }
 .section-vignette h1 { font-size: 37px; }
 .mail-invite { bottom: max(16px,env(safe-area-inset-bottom)); right: 16px; width: 400px; padding: 20px 16px; grid-template-columns: 24px minmax(0,1fr) 20px; gap: 10px; }
 .mail-invite strong { font-size: 15px; }
 .mail-invite p { font-size: 12px; }
 .mail-invite-actions { gap: 13px 10px; }
}
@media (prefers-reduced-motion: reduce) {
 body, .layout > aside, input, select, textarea, .theme-thumb { transition: none !important; }
 .mail-invite { animation: none; }
}
