:root {
  --umay-bg: #07131d;
  --umay-surface: #0b1d2a;
  --umay-surface-2: #102635;
  --umay-border: #24475a;
  --umay-text: #f4f8fb;
  --umay-muted: #91a8b6;
  --umay-cyan: #14c8e6;
  --umay-green: #1fd4a2;
  --umay-amber: #ffad35;
  --umay-red: #ff5b70;
  --umay-pulse-color: var(--umay-green);
}

#umayLauncher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147482000;
  width: 136px;
  height: 58px;
  border: 1px solid rgba(20, 200, 230, .72);
  border-radius: 8px;
  background: #08283a;
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-family: Rajdhani, Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

#umayLauncher:hover,
#umayLauncher:focus-visible {
  transform: translateY(-3px);
  border-color: var(--umay-green);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .42), 0 0 0 3px rgba(31, 212, 162, .12);
  outline: none;
}

.umay-launch-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
}

.umay-avatar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #061721;
  background-image: url('./umay-kaptan-avatar.webp');
  --umay-avatar-x: 50%;
  --umay-avatar-y: 50%;
  background-position: calc(var(--umay-avatar-x) + var(--umay-gaze-x, 0px)) calc(var(--umay-avatar-y) + var(--umay-gaze-y, 0px));
  background-repeat: no-repeat;
  background-size: cover;
  transform-origin: 50% 68%;
  will-change: transform, filter, box-shadow;
}

.umay-face-blink,
.umay-face-voice { position: absolute; z-index: 4; pointer-events: none; }
.umay-face-blink { left: 35%; top: 34%; width: 7%; height: 2px; border-radius: 50%; background: rgba(14,8,8,.8); box-shadow: 22px 0 0 rgba(14,8,8,.76); opacity: 0; transform: rotate(-5deg) scaleY(.2); animation: umayBlink 7.4s infinite; }
.umay-face-voice { left: 38%; top: 45%; width: 10%; height: 3px; border-radius: 50%; background: rgba(63,17,20,.58); opacity: 0; transform-origin: center; }
.umay-welcome-portrait .umay-face-blink { left: 35%; top: 34%; box-shadow: 23px 0 0 rgba(14,8,8,.76); }
.umay-welcome-portrait .umay-face-voice { left: 38%; top: 42%; }
body.umay-is-speaking .umay-face-voice { opacity: calc(.18 + var(--umay-voice-level, 0) * .55); transform: scaleY(calc(.7 + var(--umay-voice-level, 0) * 2.2)); }

@keyframes umayBlink {
  0%, 44%, 47%, 72%, 75%, 100% { opacity: 0; transform: rotate(-5deg) scaleY(.2); }
  45%, 46%, 73%, 74% { opacity: .75; transform: rotate(-5deg) scaleY(1); }
}

.umay-avatar::before,
.umay-welcome-portrait::before {
  content: '';
  position: absolute;
  right: 7%;
  bottom: 7%;
  z-index: 3;
  width: clamp(7px, 8%, 13px);
  aspect-ratio: 1;
  border: 2px solid #07131d;
  border-radius: 50%;
  background: var(--umay-green);
  box-shadow: 0 0 0 2px rgba(31,212,162,.16), 0 0 14px rgba(31,212,162,.7);
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.umay-avatar::after,
.umay-welcome-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(108deg, transparent 30%, rgba(210,245,255,.13) 48%, transparent 64%);
  mix-blend-mode: screen;
  opacity: .55;
  transform: translateX(-145%);
  animation: umayAmbientLight 9s ease-in-out infinite;
}

.umay-logo.umay-avatar,
.umay-launch-mark.umay-avatar,
.umay-welcome-portrait,
.umay-content > .umay-turn:first-child .umay-message-avatar {
  animation: umayIdleBreath 6.2s ease-in-out infinite;
}

body.umay-is-thinking .umay-logo,
body.umay-is-thinking #umayLauncher .umay-avatar,
body.umay-is-thinking .umay-welcome-portrait,
body.umay-is-thinking .umay-content > .umay-turn:first-child .umay-message-avatar {
  animation: umayThinking 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(255,173,53,.12), 0 0 24px rgba(255,173,53,.2);
}

body.umay-is-thinking .umay-avatar::before,
body.umay-is-thinking .umay-welcome-portrait::before {
  background: var(--umay-amber);
  box-shadow: 0 0 0 2px rgba(255,173,53,.17), 0 0 16px rgba(255,173,53,.75);
}

body.umay-is-listening .umay-logo,
body.umay-is-listening #umayLauncher .umay-avatar,
body.umay-is-listening .umay-welcome-portrait,
body.umay-is-listening .umay-content > .umay-turn:first-child .umay-message-avatar {
  animation: umayListening 1.05s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(255,91,112,.12), 0 0 28px rgba(255,91,112,.28);
}

body.umay-is-listening .umay-avatar::before,
body.umay-is-listening .umay-welcome-portrait::before {
  background: var(--umay-red);
  box-shadow: 0 0 0 2px rgba(255,91,112,.18), 0 0 17px rgba(255,91,112,.85);
  transform: scale(1.15);
}

body.umay-is-speaking .umay-logo,
body.umay-is-speaking #umayLauncher .umay-avatar,
body.umay-is-speaking .umay-welcome-portrait,
body.umay-is-speaking .umay-content > .umay-turn:first-child .umay-message-avatar {
  animation: umaySpeakingFallback .72s ease-in-out infinite alternate;
  transform: translateY(calc(var(--umay-voice-level, 0) * -2px)) scale(calc(1.01 + var(--umay-voice-level, 0) * .045));
  filter: brightness(calc(1.02 + var(--umay-voice-level, 0) * .14)) saturate(calc(1.02 + var(--umay-voice-level, 0) * .16));
  box-shadow: 0 0 0 calc(3px + var(--umay-voice-level, 0) * 4px) rgba(20,200,230,.12), 0 0 calc(22px + var(--umay-voice-level, 0) * 18px) rgba(20,200,230,.3);
}

body.umay-is-speaking .umay-avatar::before,
body.umay-is-speaking .umay-welcome-portrait::before {
  background: var(--umay-cyan);
  box-shadow: 0 0 0 2px rgba(20,200,230,.2), 0 0 calc(15px + var(--umay-voice-level, 0) * 12px) rgba(20,200,230,.9);
  transform: scale(calc(1 + var(--umay-voice-level, 0) * .45));
}

body[data-umay-pulse="critical"] { --umay-pulse-color: var(--umay-red); }
body[data-umay-pulse="watch"] { --umay-pulse-color: var(--umay-amber); }
body[data-umay-pulse="normal"] { --umay-pulse-color: var(--umay-green); }
body:not(.umay-is-speaking):not(.umay-is-listening):not(.umay-is-thinking) .umay-avatar::before,
body:not(.umay-is-speaking):not(.umay-is-listening):not(.umay-is-thinking) .umay-welcome-portrait::before { background: var(--umay-pulse-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--umay-pulse-color) 18%, transparent), 0 0 14px color-mix(in srgb, var(--umay-pulse-color) 72%, transparent); }
body[data-umay-pulse="critical"] #umayLauncher { border-color: rgba(255,91,112,.82); }
body[data-umay-pulse="watch"] #umayLauncher { border-color: rgba(255,173,53,.82); }
body.umay-has-new-pulse #umayLauncher { animation: umayPulseAttention 1.8s ease-in-out infinite; }
@keyframes umayPulseAttention { 50% { box-shadow: 0 18px 42px rgba(0,0,0,.42), 0 0 0 5px color-mix(in srgb, var(--umay-pulse-color) 18%, transparent); } }

@keyframes umayIdleBreath {
  0%, 100% { transform: translateY(0) scale(1); filter: brightness(1) saturate(1); }
  50% { transform: translateY(-1px) scale(1.012); filter: brightness(1.035) saturate(1.025); }
}

@keyframes umayAmbientLight {
  0%, 58% { transform: translateX(-145%); opacity: 0; }
  65% { opacity: .55; }
  77%, 100% { transform: translateX(145%); opacity: 0; }
}

@keyframes umayThinking {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.025); filter: brightness(1.08); }
}

@keyframes umayListening {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.035); filter: brightness(1.09) saturate(1.08); }
}

@keyframes umaySpeakingFallback {
  from { filter: brightness(1.02) saturate(1.02); }
  to { filter: brightness(1.09) saturate(1.1); }
}

#umayBackdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482001;
  background: rgba(1, 8, 13, .7);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

#umayBackdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

#umayPanel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2147482002;
  width: min(920px, 94vw);
  background: var(--umay-bg);
  color: var(--umay-text);
  border-left: 1px solid var(--umay-border);
  box-shadow: -24px 0 60px rgba(0,0,0,.42);
  transform: translateX(102%);
  transition: transform .22s ease;
  font-family: Rajdhani, Arial, sans-serif;
}

#umayPanel.is-open { transform: translateX(0); }

.umay-launch-alert { position: absolute; top: -8px; right: -8px; min-width: 24px; height: 24px; padding: 0 5px; display: grid; place-items: center; border: 2px solid #07131d; border-radius: 12px; background: var(--umay-pulse-color); color: #06131e; font: 900 10px JetBrains Mono,Consolas,monospace; }
.umay-launch-alert[hidden] { display: none; }

.umay-shell,
.umay-module-shell {
  min-height: 100%;
  background: var(--umay-bg);
  color: var(--umay-text);
  font-family: Rajdhani, Arial, sans-serif;
}

.umay-shell {
  height: 100%;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  overflow-x: hidden;
}

.umay-module-shell {
  width: min(1500px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.umay-header {
  min-width: 0;
  min-height: 76px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--umay-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #09212f;
}

.umay-title-wrap { display: flex; align-items: center; gap: 13px; min-width: 0; }
.umay-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid var(--umay-cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(20,200,230,.08);
}

.umay-kicker {
  color: var(--umay-cyan);
  font-family: JetBrains Mono, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.umay-header h1 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.umay-subtitle { color: var(--umay-muted); font-size: 13px; margin-top: 5px; }
.umay-header-actions { display: flex; align-items: center; gap: 8px; }
.umay-live-presence { margin-left: auto; display: flex; align-items: center; gap: 9px; min-width: 0; }
.umay-waveform { width: 150px; height: 32px; display: block; border-left: 1px solid rgba(36,71,90,.7); border-right: 1px solid rgba(36,71,90,.7); }
.umay-active-module { min-width: 130px; max-width: 180px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--umay-border); border-radius: 5px; background: #081722; color: var(--umay-cyan); font: 800 9px JetBrains Mono,Consolas,monospace; text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.umay-active-module span { overflow: hidden; text-overflow: ellipsis; }

.umay-pulse-bar { width: 100%; min-width: 0; min-height: 42px; padding: 7px 18px; display: flex; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid rgba(36,71,90,.65); background: #071a25; color: #dcecf2; text-align: left; cursor: pointer; }
.umay-pulse-bar:hover { background: #0a2330; }
.umay-pulse-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--umay-pulse-color); box-shadow: 0 0 12px color-mix(in srgb, var(--umay-pulse-color) 75%, transparent); }
.umay-pulse-copy { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.umay-pulse-counts { display: flex; align-items: center; gap: 6px; }
.umay-pulse-counts > span { min-height: 24px; padding: 0 7px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--umay-border); border-radius: 4px; color: var(--umay-muted); font: 800 8px JetBrains Mono,Consolas,monospace; }
.umay-pulse-counts .is-critical strong { color: var(--umay-red); }
.umay-pulse-counts .is-warning strong { color: var(--umay-amber); }
.umay-pulse-counts .is-work strong { color: var(--umay-green); }

.umay-icon-btn,
.umay-lang-btn,
.umay-open-link,
.umay-send,
.umay-prompt,
.umay-source-chip {
  border: 1px solid var(--umay-border);
  border-radius: 6px;
  background: #0a1925;
  color: var(--umay-text);
  font: 700 13px Rajdhani, Arial, sans-serif;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.umay-icon-btn:hover,
.umay-lang-btn:hover,
.umay-open-link:hover,
.umay-prompt:hover,
.umay-source-chip:hover { border-color: var(--umay-cyan); background: #102b3b; }

.umay-icon-btn { width: 38px; height: 38px; display: grid; place-items: center; font-size: 17px; }
.umay-lang-btn { height: 38px; padding: 0 12px; font-family: JetBrains Mono, Consolas, monospace; }
.umay-open-link { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }

.umay-query-zone { min-width: 0; padding: 16px 18px 12px; border-bottom: 1px solid rgba(36,71,90,.65); }
.umay-query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 48px;
  gap: 8px;
}

.umay-query {
  min-height: 50px;
  width: 100%;
  border: 1px solid #31586d;
  border-radius: 6px;
  background: #06131e;
  color: #fff;
  padding: 12px 14px;
  font: 600 16px Rajdhani, Arial, sans-serif;
  letter-spacing: 0;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.03);
}

.umay-query:focus { outline: 2px solid rgba(20,200,230,.25); border-color: var(--umay-cyan); }
.umay-query::placeholder { color: #6f8796; }
.umay-send { width: 48px; min-height: 50px; background: var(--umay-cyan); color: #031017; border-color: var(--umay-cyan); font-size: 18px; }
.umay-send:hover { transform: translateY(-1px); background: var(--umay-green); border-color: var(--umay-green); }
.umay-send:disabled { cursor: wait; opacity: .62; transform: none; }
.umay-mic { width: 48px; min-height: 50px; border: 1px solid var(--umay-border); border-radius: 6px; background: #0a1925; color: var(--umay-cyan); font-size: 17px; cursor: pointer; }
.umay-mic:hover { border-color: var(--umay-cyan); background: #102b3b; }
.umay-mic.is-listening { color: #fff; border-color: var(--umay-red); background: #8e2637; box-shadow: 0 0 0 3px rgba(255,91,112,.13); }
.umay-mic[hidden] { display: none; }
.umay-voice-chat.is-active { color: #05151f; border-color: var(--umay-green); background: var(--umay-green); box-shadow: 0 0 0 3px rgba(37,225,169,.14); }
.umay-stop-btn { color: #fff; border-color: rgba(255,91,112,.65); background: #8e2637; }
.umay-stop-btn:hover { border-color: var(--umay-red); background: #b52e45; }
.umay-stop-btn[hidden], .umay-voice-chat[hidden] { display: none; }

.umay-prompts,
.umay-sources { min-width: 0; max-width: 100%; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: thin; padding-top: 10px; }
.umay-prompts::-webkit-scrollbar,
.umay-sources::-webkit-scrollbar,
.umay-table-wrap::-webkit-scrollbar { height: 5px; }
.umay-prompts::-webkit-scrollbar-track,
.umay-sources::-webkit-scrollbar-track,
.umay-table-wrap::-webkit-scrollbar-track { background: #07131d; }
.umay-prompts::-webkit-scrollbar-thumb,
.umay-sources::-webkit-scrollbar-thumb,
.umay-table-wrap::-webkit-scrollbar-thumb { background: #31586d; border-radius: 4px; }
.umay-prompt,
.umay-source-chip { flex: 0 0 auto; padding: 7px 10px; color: #c8dae4; white-space: nowrap; }
.umay-source-chip { font-family: JetBrains Mono, Consolas, monospace; font-size: 10px; text-transform: uppercase; }
.umay-source-chip.is-active { border-color: var(--umay-green); color: var(--umay-green); background: rgba(31,212,162,.08); }

.umay-status {
  min-width: 0;
  min-height: 38px;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--umay-muted);
  font-family: JetBrains Mono, Consolas, monospace;
  font-size: 10px;
  border-bottom: 1px solid rgba(36,71,90,.45);
}

.umay-status strong { color: var(--umay-green); }
.umay-content { min-width: 0; overflow: auto; padding: 18px; scrollbar-width: thin; }
.umay-welcome { max-width: 900px; min-height: 260px; margin: 24px auto; padding: 20px; display: grid; grid-template-columns: 190px minmax(0,1fr); align-items: center; gap: 26px; text-align: left; }
.umay-welcome-portrait { --umay-avatar-x: 50%; --umay-avatar-y: 22%; position: relative; isolation: isolate; overflow: hidden; width: 190px; aspect-ratio: 4 / 5; border: 1px solid var(--umay-border); border-radius: 8px; background-color: #091924; background-image: url('./umay-kaptan-portrait.webp'); background-position: calc(var(--umay-avatar-x) + var(--umay-gaze-x, 0px)) calc(var(--umay-avatar-y) + var(--umay-gaze-y, 0px)); background-size: cover; background-repeat: no-repeat; box-shadow: 0 18px 42px rgba(0,0,0,.28); transform-origin: 50% 68%; will-change: transform, filter, box-shadow, background-position; }
.umay-welcome-copy { min-width: 0; }
.umay-welcome-status { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; color: var(--umay-green); font: 800 10px JetBrains Mono,Consolas,monospace; }
.umay-welcome-status i { font-size: 7px; }
.umay-welcome h2 { color: #fff; font-size: 28px; margin: 0 0 9px; }
.umay-welcome p { color: var(--umay-muted); font-size: 17px; line-height: 1.55; margin: 0; }
.umay-welcome-alerts { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.umay-welcome-alert { min-width: 0; min-height: 58px; padding: 8px 9px; display: flex; flex-direction: column; gap: 5px; border: 1px solid var(--umay-border); border-left: 3px solid var(--umay-amber); border-radius: 5px; background: #091b27; color: #e7f1f5; text-decoration: none; }
.umay-welcome-alert.is-critical { border-left-color: var(--umay-red); }
.umay-welcome-alert.is-watch { border-left-color: var(--umay-cyan); }
.umay-welcome-alert span { color: var(--umay-muted); font: 800 8px JetBrains Mono,Consolas,monospace; text-transform: uppercase; }
.umay-welcome-alert strong { min-width: 0; font-size: 11px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.umay-pulse-clear { color: var(--umay-green); font: 800 10px JetBrains Mono,Consolas,monospace; }

.umay-answer {
  border: 1px solid #24475a;
  border-left: 4px solid var(--umay-green);
  border-radius: 3px 9px 9px 9px;
  background: #0c202c;
  padding: 15px 16px;
  color: #edf8f8;
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.umay-turn { margin-bottom: 22px; }
.umay-user-message { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.umay-user-message span { max-width: 78%; border: 1px solid #31586d; border-radius: 10px 10px 3px 10px; background: #123246; color: #fff; padding: 11px 14px; font-size: 16px; line-height: 1.4; }
.umay-assistant-message { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.umay-message-avatar { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--umay-cyan); border-radius: 50%; box-shadow: 0 0 0 3px rgba(20,200,230,.07); }
.umay-message-body { position: relative; flex: 1 1 auto; min-width: 0; }
.umay-speak { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border: 1px solid var(--umay-border); border-radius: 5px; background: #071722; color: var(--umay-cyan); cursor: pointer; z-index: 2; }
.umay-speak:hover { border-color: var(--umay-cyan); }

.umay-answer-meta { min-height: 34px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; padding-right: 48px; }
.umay-speaker-name { color: var(--umay-cyan); font: 800 12px JetBrains Mono,Consolas,monospace; }
.umay-badge {
  border: 1px solid var(--umay-border);
  border-radius: 999px;
  padding: 4px 8px;
  color: #aac1ce;
  background: #091824;
  font-family: JetBrains Mono, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}
.umay-source-health { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 9px; }
.umay-health { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; border: 1px solid var(--umay-border); border-radius: 999px; padding: 3px 8px; background: #081722; color: #8da4b0; font: 800 9px JetBrains Mono,Consolas,monospace; }
.umay-health-current { border-color: rgba(18,211,157,.45); color: var(--umay-green); }
.umay-health-stale { border-color: rgba(255,176,46,.55); color: var(--umay-amber); }
.umay-health-unknown { border-color: rgba(255,91,112,.42); color: #ff8292; }

.umay-source-details { margin-top: 8px; }
.umay-module-result { border: 1px solid var(--umay-border); border-radius: 7px; overflow: hidden; margin-bottom: 8px; background: var(--umay-surface); }
.umay-module-result > summary { min-height: 44px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #dceaf0; background: #0a1c28; cursor: pointer; list-style: none; font-size: 14px; font-weight: 800; }
.umay-module-result > summary::-webkit-details-marker { display: none; }
.umay-module-result > summary:hover { background: #0d2735; }
.umay-details-hint { color: var(--umay-cyan); font-size: 11px; white-space: nowrap; }
.umay-details-hint i { margin-left: 5px; transition: transform .16s ease; }
.umay-module-result[open] .umay-details-hint i { transform: rotate(180deg); }
.umay-result-body { border-top: 1px solid var(--umay-border); }
.umay-result-head { padding: 11px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--umay-border); background: #0c2533; }
.umay-result-head h3 { margin: 0; color: #fff; font-size: 18px; }
.umay-result-head a { color: var(--umay-cyan); text-decoration: none; font-weight: 800; font-size: 12px; }
.umay-result-summary { color: #c9dbe4; padding: 0; font-size: 14px; line-height: 1.42; }
.umay-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--umay-border); margin-top: 11px; border-top: 1px solid var(--umay-border); border-bottom: 1px solid var(--umay-border); }
.umay-metric { min-height: 66px; background: var(--umay-surface-2); padding: 10px 12px; }
.umay-metric span { display: block; color: var(--umay-muted); font-family: JetBrains Mono, Consolas, monospace; font-size: 9px; text-transform: uppercase; font-weight: 800; }
.umay-metric strong { display: block; color: var(--umay-green); font-family: JetBrains Mono, Consolas, monospace; font-size: 18px; margin-top: 5px; overflow-wrap: anywhere; }

.umay-table-wrap { display: block; width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
.umay-table { width: 100%; border-collapse: collapse; min-width: 680px; table-layout: fixed; }
.umay-table th { background: #081722; color: #7793a3; text-align: left; padding: 8px 10px; font: 800 9px JetBrains Mono, Consolas, monospace; text-transform: uppercase; }
.umay-table td { border-top: 1px solid rgba(36,71,90,.5); color: #d8e5eb; padding: 9px 10px; font-size: 12px; vertical-align: top; overflow-wrap: anywhere; }
.umay-table td:nth-child(1) { width: 88px; color: #8da4b0; font-family: JetBrains Mono, Consolas, monospace; font-size: 10px; }
.umay-table td:nth-child(2) { width: 105px; color: var(--umay-cyan); font-weight: 800; }
.umay-table td:nth-child(5) { width: 88px; font-family: JetBrains Mono, Consolas, monospace; }
.umay-table td:nth-child(6) { width: 92px; color: var(--umay-amber); font-family: JetBrains Mono, Consolas, monospace; font-weight: 800; }
.umay-empty { color: var(--umay-muted); padding: 13px 14px; font-size: 12px; }
.umay-note { border-top: 1px solid rgba(36,71,90,.45); padding: 9px 14px; color: #77909f; font-size: 10px; font-family: JetBrains Mono, Consolas, monospace; }
.umay-feedback { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 6px 2px 0; }
.umay-feedback button { width: 34px; height: 32px; border: 1px solid var(--umay-border); border-radius: 5px; background: #081722; color: #8da4b0; cursor: pointer; }
.umay-feedback button:hover { color: var(--umay-cyan); border-color: var(--umay-cyan); }
.umay-feedback button.is-selected { color: var(--umay-green); border-color: var(--umay-green); background: rgba(18,211,157,.08); }
.umay-feedback span { color: var(--umay-muted); font: 800 9px JetBrains Mono,Consolas,monospace; }
.umay-error { border: 1px solid rgba(255,91,112,.55); background: rgba(255,91,112,.08); color: #ffb3bd; padding: 13px; border-radius: 6px; }
.umay-loading { display: flex; align-items: center; gap: 10px; color: #b8ccd6; padding: 28px 8px; justify-content: center; }
.umay-spinner { width: 20px; height: 20px; border: 2px solid #24475a; border-top-color: var(--umay-cyan); border-radius: 50%; animation: umaySpin .8s linear infinite; }
@keyframes umaySpin { to { transform: rotate(360deg); } }

.umay-module-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.umay-back { color: #b9ced8; text-decoration: none; font-weight: 800; border: 1px solid var(--umay-border); border-radius: 6px; min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; background: #091924; }
.umay-module-main { width: 100%; min-width: 0; min-height: calc(100vh - 90px); overflow: hidden; border: 1px solid var(--umay-border); background: var(--umay-bg); box-shadow: 0 18px 55px rgba(0,0,0,.26); }
.umay-module-main .umay-shell { min-height: calc(100vh - 90px); height: auto; }
.umay-module-main .umay-content { overflow: visible; }
.umay-module-main .umay-turn { width: min(1100px, 100%); margin-left: auto; margin-right: auto; }

@media (max-width: 720px) {
  #umayLauncher { right: 12px; bottom: 12px; width: 116px; height: 54px; font-size: 18px; }
  #umayPanel { width: 100vw; }
  .umay-header { min-height: 68px; padding: 11px 12px; }
  .umay-logo { width: 44px; height: 44px; flex-basis: 44px; }
  .umay-header h1 { font-size: 23px; }
  .umay-subtitle { display: none; }
  .umay-live-presence { order: 3; width: 100%; margin: 5px 0 0; }
  .umay-header { flex-wrap: wrap; }
  .umay-waveform { flex: 1 1 auto; width: auto; min-width: 90px; }
  .umay-active-module { flex: 0 1 140px; min-width: 105px; }
  .umay-pulse-bar { padding-left: 12px; padding-right: 12px; }
  .umay-pulse-counts .is-work { display: none; }
  .umay-pulse-copy { font-size: 11px; }
  .umay-open-link span { display: none; }
  .umay-query-zone, .umay-content { padding-left: 12px; padding-right: 12px; }
  .umay-status { padding-left: 12px; padding-right: 12px; }
  .umay-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .umay-user-message span { max-width: 92%; }
  .umay-message-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .umay-assistant-message { gap: 8px; }
  .umay-welcome { min-height: 220px; margin: 12px auto; padding: 16px 12px; grid-template-columns: 92px minmax(0,1fr); gap: 14px; }
  .umay-welcome-portrait { width: 92px; }
  .umay-welcome h2 { font-size: 22px; }
  .umay-welcome p { font-size: 14px; }
  .umay-welcome-alerts { grid-template-columns: 1fr; }
  .umay-welcome-alert { min-height: 48px; }
  .umay-details-hint { font-size: 0; }
  .umay-details-hint i { font-size: 11px; }
  .umay-module-shell { width: 100%; padding: 0; }
  .umay-module-topline { display: none; }
  .umay-module-main { border: 0; min-height: 100vh; }
  .umay-module-main .umay-shell { min-height: 100vh; }
}

@media (prefers-reduced-motion: reduce) {
  .umay-logo.umay-avatar,
  .umay-launch-mark.umay-avatar,
  .umay-welcome-portrait,
  .umay-content > .umay-turn:first-child .umay-message-avatar,
  .umay-avatar::after,
  .umay-welcome-portrait::after,
  .umay-face-blink,
  body.umay-has-new-pulse #umayLauncher {
    animation: none !important;
  }
}

@media print {
  #umayLauncher, #umayBackdrop, #umayPanel { display: none !important; }
}
