/* Přepínač vzhledů: čistý Křišťál a výrazný prezentační Showcase. */
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.visual-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 27, 7, .72);
}

.visual-switch > span {
  padding: 0 7px;
  color: #94b98d;
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .11em;
}

.visual-switch button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #b5d7ac;
  padding: 6px 9px;
  cursor: pointer;
  font: 800 .69rem inherit;
}

.visual-switch button[aria-pressed=true] {
  background: linear-gradient(135deg, #d6ff69, #78e52b);
  color: #082006;
  box-shadow: 0 0 16px rgba(184, 255, 66, .5);
}

/* Showcase: skutečná 3D scéna je pouze pozadí. Data a názvy jsou HTML. */
body[data-style="showcase"] {
  --lime: #e8ff74;
  --green: #aaff43;
  --line: rgba(232, 255, 133, .55);
  --panel: rgba(1, 13, 3, .70);
  --panel2: rgba(24, 100, 20, .43);
  --gold: #fff28a;
  background:
    linear-gradient(90deg, rgba(0, 8, 2, .31), rgba(0, 11, 3, .12) 35% 65%, rgba(0, 8, 2, .35)),
    linear-gradient(180deg, rgba(0, 7, 2, .12), rgba(0, 8, 2, .28)),
    url("/showcase-backdrop.png") center top / cover fixed no-repeat,
    #020702;
}

body[data-style="showcase"]::before {
  display: none;
}

body[data-style="showcase"] .ambient { opacity: .12; }
body[data-style="showcase"] .ambient-one { background: #8bff35; }
body[data-style="showcase"] .ambient-two { background: #efff64; }

body[data-style="showcase"] .topbar {
  border-bottom-color: rgba(232, 255, 132, .46);
  background: linear-gradient(90deg, rgba(0, 12, 3, .54), rgba(3, 31, 8, .20), rgba(0, 12, 3, .54));
  box-shadow: 0 16px 34px rgba(114, 255, 34, .13);
}

body[data-style="showcase"] .brand-mark {
  border-color: #f6ffbd;
  background: radial-gradient(circle at 34% 27%, #ffffdc, #c5ff4b 22%, #307f16 54%, #051e05 79%);
  box-shadow: inset 0 0 24px rgba(255, 255, 216, .82), 0 0 42px rgba(195, 255, 67, .92);
}

body[data-style="showcase"] .brand h1 {
  color: #fff9c0;
  text-shadow: 0 0 8px rgba(255, 243, 117, .4);
}

body[data-style="showcase"] .panel {
  border-color: rgba(231, 255, 125, .58);
  background: linear-gradient(140deg, rgba(28, 97, 22, .48), rgba(1, 18, 4, .66) 46%, rgba(0, 8, 2, .77));
  box-shadow: inset 0 0 65px rgba(190, 255, 75, .11), inset 0 1px rgba(255, 255, 210, .17), 0 0 29px rgba(143, 255, 45, .22), 0 18px 50px rgba(0, 0, 0, .32);
  backdrop-filter: blur(3px);
}

body[data-style="showcase"] .ai-core-stage {
  background:
    radial-gradient(circle at 50% 43%, rgba(84, 255, 40, .20), transparent 35%),
    linear-gradient(90deg, rgba(0, 9, 2, .54), rgba(0, 14, 3, .08) 35% 65%, rgba(0, 9, 2, .54)),
    linear-gradient(180deg, rgba(7, 44, 11, .32), rgba(0, 8, 2, .82));
}

body[data-style="showcase"] .ai-core-stage::before {
  opacity: .16;
  background-image: linear-gradient(90deg, transparent, rgba(237, 255, 145, .25), transparent);
  background-size: 100% 100%;
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}

body[data-style="showcase"] .ai-core-stage::after { display: none; }

/* V Showcase zůstává živý diamant hlavní osobností celé scény. */
body[data-style="showcase"] .ai-orb-wrap {
  width: 440px;
  height: 430px;
  top: 49%;
  transform: translate(-50%, -50%);
}

body[data-style="showcase"] .ai-orb {
  width: 430px;
  height: 430px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  animation: diamond-breathe 5.4s ease-in-out infinite;
}

body[data-style="showcase"] .ai-orb::before,
body[data-style="showcase"] .ai-orb::after,
body[data-style="showcase"] .orb-aura,
body[data-style="showcase"] .orb-grid,
body[data-style="showcase"] .orb-energy,
body[data-style="showcase"] .orb-shine { display: none; }

body[data-style="showcase"] .diamond-aura {
  background: radial-gradient(circle at 50% 46%, rgba(255, 240, 137, .26), rgba(94, 255, 45, .20) 29%, transparent 70%);
}

body[data-style="showcase"] .diamond-image {
  filter: drop-shadow(0 0 11px rgba(255, 242, 151, .80)) drop-shadow(0 0 39px rgba(54, 255, 60, .62));
}

body[data-style="showcase"] .orbital { opacity: .18; }

body[data-style="showcase"] .orb-content {
  filter: drop-shadow(0 0 12px rgba(237, 255, 133, .9));
  text-shadow: 0 0 10px #e5ff88, 0 0 29px rgba(105, 255, 31, .9);
}

body[data-style="showcase"] .orb-content strong {
  font-size: 2.35rem;
  color: #fff8bf;
  letter-spacing: .04em;
}

body[data-style="showcase"] .orb-content span:not(.orb-diamond) {
  font-size: .72rem;
  color: #f3ffc0;
}

body[data-style="showcase"] .orb-content i {
  width: 58px;
  background: #efff8b;
}

body[data-style="showcase"] .metric-card {
  border-color: rgba(234, 255, 135, .52);
  background: linear-gradient(130deg, rgba(42, 126, 23, .47), rgba(1, 14, 3, .73));
  box-shadow: inset 0 0 31px rgba(184, 255, 65, .08), 0 0 18px rgba(179, 255, 57, .11);
}

body[data-style="showcase"] .milestones > div {
  border-color: rgba(234, 255, 135, .44);
  background: linear-gradient(135deg, rgba(195, 255, 77, .16), rgba(1, 25, 5, .17));
}

body[data-style="showcase"] .visual-switch {
  border-color: rgba(247, 255, 163, .62);
  background: rgba(4, 39, 6, .82);
}

body[data-style="showcase"] .visual-switch button[aria-pressed=true] {
  background: linear-gradient(135deg, #f7ffb5, #b4ff42);
  box-shadow: 0 0 20px rgba(212, 255, 85, .68);
}

body[data-style="showcase"] .top-status {
  border-color: rgba(235, 255, 139, .5);
  background: rgba(4, 45, 8, .75);
}

/* Rozhovor má vlastní široký prostor pod hlavním jevištěm. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.ai-core-stage { min-height: 580px; }
.stage-cta { position: absolute; z-index: 5; right: 16px; top: 46%; width: auto; padding: 0; }
.elia-dialogue { position: relative; z-index: 1; margin: 16px 0; padding: 16px 18px; border-radius: 12px; background: linear-gradient(115deg, rgba(1, 17, 4, .90), rgba(15, 72, 13, .68)); box-shadow: inset 0 0 35px rgba(169,255,59,.09), 0 0 25px rgba(85,255,35,.14); backdrop-filter: blur(7px); }
.dialogue-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stage-top #core-mode { display: none; }
.dialogue-header p { margin: 0; color: var(--lime); font-size: .61rem; font-weight: 900; letter-spacing: .17em; }
.dialogue-header h2 { display: none; }
.dialogue-actions { display: flex; gap: 6px; align-items: center; }
.voice-picker { display: flex; align-items: center; gap: 5px; max-width: 235px; padding: 3px 6px 3px 8px; border: 1px solid rgba(210,255,115,.5); border-radius: 999px; background: rgba(164,255,62,.08); color: #dfffb7; font: 800 .58rem inherit; white-space: nowrap; }
.voice-picker strong { color: #f0ffd8; font: 800 .58rem inherit; }
.voice-picker select { min-width: 0; max-width: 158px; border: 0; outline: 0; background: transparent; color: #f0ffd8; cursor: pointer; font: 800 .58rem inherit; }
.voice-picker select:disabled { cursor: wait; opacity: .6; }
.voice-picker option { background: #062208; color: #efffd2; }
.voice-toggle, .icon-button { border: 1px solid rgba(210,255,115,.5); border-radius: 999px; background: rgba(164,255,62,.08); color: #e5ffc3; cursor: pointer; font: 800 .63rem inherit; }
.voice-toggle { padding: 6px 8px; }
.voice-toggle[aria-pressed="false"] { border-color: rgba(199,222,190,.35); color: #b6cab0; background: rgba(219,237,209,.05); }
.icon-button { display: grid; width: 29px; height: 29px; place-items: center; color: var(--lime); font-size: 1rem; }
.voice-preview { color: #fff7ae; }
.voice-toggle:hover, .icon-button:hover { border-color: var(--lime); background: rgba(198,255,77,.18); }
.chat-mode { display: flex; align-items: center; gap: 7px; margin: 4px 0; color: #c8e8c1; font-size: .58rem; }
.chat-mode i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.chat-messages { display: grid; min-height: 38px; max-height: 96px; overflow-y: auto; padding: 1px 1px 2px; }
.chat-message { max-width: 100%; padding: 4px 7px; border: 1px solid rgba(183,255,93,.24); border-radius: 8px; background: rgba(118,255,54,.075); color: #e9ffe4; }
.chat-message.user { justify-self: end; border-color: rgba(236,255,150,.42); border-radius: 12px 12px 3px 12px; background: rgba(204,255,91,.14); color: #fbffe8; }
.chat-message b { display: inline; margin-right: 5px; color: var(--lime); font-size: .54rem; letter-spacing: .1em; }
.chat-message.user b { color: #fbffb6; }
.chat-message p { display: inline; margin: 0; white-space: pre-wrap; font-size: .64rem; line-height: 1.2; }
.chat-prompts { display: flex; gap: 4px; flex-wrap: wrap; margin: 2px 0 4px; }
.chat-prompts button { border: 1px solid rgba(189,255,91,.35); border-radius: 999px; background: rgba(127,255,45,.07); color: #dfffb2; padding: 3px 6px; cursor: pointer; font: 700 .54rem inherit; }
.chat-prompts button:hover { border-color: var(--lime); background: rgba(190,255,76,.16); }
.chat-composer { display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: stretch; }
.chat-composer textarea { width: 100%; min-height: 32px; resize: none; padding: 7px 9px; border: 1px solid rgba(187,255,93,.42); border-radius: 8px; outline: 0; background: rgba(0,10,2,.74); color: #f0ffe9; font: .66rem/1.2 inherit; }
.chat-composer textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(185,255,77,.10); }
.chat-composer button { min-width: 76px; border: 1px solid #e5ff84; border-radius: 8px; background: linear-gradient(135deg, #e7ff85, #83eb32); color: #062004; cursor: pointer; font: 900 .62rem inherit; }
.chat-composer .voice-input { min-width: 67px; background: rgba(167,255,61,.12); color: #e5ffc3; }
.chat-composer .voice-input.listening { border-color: #fff6ad; color: #071006; background: linear-gradient(135deg, #fff8b6, #bcff4c); box-shadow: 0 0 18px rgba(227,255,114,.75); }
.chat-composer button:disabled { cursor: wait; opacity: .65; }

@media(max-width:810px) {
  .top-actions { justify-content: flex-start; }
}

@media(max-width:480px) {
  .visual-switch > span { display: none; }
  .visual-switch { max-width: 100%; overflow: auto; }
  .top-actions { align-items: flex-start; flex-direction: column; }
  body[data-style="showcase"] .ai-orb-wrap { top: 49%; transform: translate(-50%, -50%) scale(.72); }
  .ai-core-stage { min-height: 580px; }
  .stage-cta { top: 48%; right: 12px; }
  .stage-cta button { padding: 7px 8px; font-size: .63rem; }
  .elia-dialogue { margin: 12px 0; padding: 12px; }
  .dialogue-header { align-items: flex-start; }
  .dialogue-header h2 { font-size: .84rem; }
  .voice-toggle { padding: 5px 6px; font-size: .56rem; }
  .voice-picker { max-width: 125px; padding-left: 6px; }
  .voice-picker > span { display: none; }
  .voice-picker select { max-width: 90px; }
  .voice-preview { display: none; }
  .chat-composer .voice-input { min-width: 43px; font-size: 0; }
  .chat-composer .voice-input:first-letter { font-size: .92rem; }
  .chat-composer button { min-width: 63px; }
}
