/* Live support — default theme: night-green background, brand green #1a805e, gold accent.
   Site themes below override only the variables through html[data-site] (destek.js BRANDS). */
:root{
  --bg:#06120d; --bg2:#0a1c15; --surface:#0f261d; --surface2:#143126; --line:rgba(214,236,224,.10); --line2:rgba(214,236,224,.18);
  --brand:#1a805e; --brand-light:#27a67a; --brand-rgb:26,128,94; --top1:#0b2019; --top2:#081710; --panel-bottom:#08170f;
  --me1:#1f8a64; --me2:#17714f; --avatar-bg:#1a2a22; --accent:#e9b949; --accent-dark:#b8871f; --accent-rgb:233,185,73;
  --text:#eef6f1; --text2:#b3c9bd; --text3:#86a092; --danger:#ff5d5d;
  --font-size:1rem; --radius:18px; --shadow:0 18px 50px -12px rgba(0,0,0,.65), 0 2px 8px rgba(0,0,0,.35);
  --ease:cubic-bezier(.16,1,.3,1);
  color-scheme:dark;
}
/* ---------- site themes (html[data-site], set by destek.js) ----------
   Dark site blocks are neutral placeholders; the operator's embedded window uses the LIGHT theme at the end of the file. */
html[data-site="troybet"]{
  --bg:#0a1220; --bg2:#0e1829; --surface:#14223a; --surface2:#1a2b47; --line:rgba(214,226,240,.10); --line2:rgba(214,226,240,.18);
  --brand:#2f6f9f; --brand-light:#4a90c2; --brand-rgb:47,111,159; --top1:#0f1b30; --top2:#0a1322; --panel-bottom:#0a1322;
  --me1:#387aac; --me2:#2c6592; --avatar-bg:#1a2533; --text2:#b5c3d6; --text3:#8797ad; /* 16.11 T3-06.04: me1 #3a7fb3 4,32 -> 4,62 */
}
html[data-site="lordspalace"]{
  --bg:#140d18; --bg2:#1b1220; --surface:#25192c; --surface2:#2e2037; --line:rgba(236,220,240,.10); --line2:rgba(236,220,240,.18);
  --brand:#7a4f8f; --brand-light:#9a6cb0; --brand-rgb:122,79,143; --top1:#221629; --top2:#170e1c; --panel-bottom:#170e1c;
  --me1:#8a5aa1; --me2:#6d4580; --avatar-bg:#2a1f30; --text2:#cbbcd2; --text3:#a08fa8;
}
.site-text{display:block;font-weight:800;font-size:1.35rem;letter-spacing:-.01em;color:var(--text);white-space:nowrap}
.site-logo{text-decoration:none}
[hidden]{display:none!important}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
/* On phones the visible area shrinks when the keyboard opens: dvh follows it (viewport meta interactive-widget=resizes-content). */
@supports (height:100dvh){body{height:100dvh}}
/* Interface font stack: system font + emoji fonts; no external font is downloaded. */
body{font:400 16px/1.5 system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";color:var(--text);background:var(--bg);
  background-image:radial-gradient(1200px 600px at 12% -10%,rgba(var(--brand-rgb),.30),transparent 60%),
  radial-gradient(900px 500px at 100% 110%,rgba(var(--accent-rgb),.08),transparent 60%);overflow:hidden}
::selection{background:rgba(var(--accent-rgb),.35);color:#fff}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
button{font:inherit;color:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:10px}
*{scrollbar-width:thin;scrollbar-color:rgba(214,236,224,.2) transparent}

/* ---------- site shell ---------- */
.site{position:fixed;inset:0 0 auto;height:68px;display:flex;align-items:center;gap:28px;padding:0 28px;z-index:5;
  background:linear-gradient(180deg,var(--top1),var(--top2));border-bottom:1px solid var(--line)}
.site-logo img{height:42px;width:auto;display:block;border-radius:6px}
.site-nav{display:flex;gap:4px;flex:1;min-width:0;overflow:hidden}
.site-nav a{color:var(--text2);text-decoration:none;font-weight:600;font-size:15px;padding:9px 13px;border-radius:10px;white-space:nowrap;transition:background .2s,color .2s}
.site-nav a:hover{background:rgba(var(--brand-rgb),.22);color:#fff}
.site-actions{display:flex;gap:10px}
.btn-ghost,.btn-gold{font-weight:700;font-size:14px;text-decoration:none;padding:10px 18px;border-radius:12px;white-space:nowrap}
.btn-ghost{color:var(--text);border:1px solid var(--line2)}
.btn-gold{color:#1d1503;background:linear-gradient(180deg,#f6cf6a,var(--accent));box-shadow:0 6px 18px -6px rgba(var(--accent-rgb),.55)}

.stage{position:fixed;inset:68px 460px 0 0;display:flex;align-items:center;padding:0 7vw}
.welcome{max-width:620px}
.welcome h1{font-size:clamp(2.2rem,4.2vw,3.6rem);line-height:1.05;letter-spacing:-.03em;font-weight:800;margin:0 0 20px;text-wrap:balance}
.welcome h1 span{color:var(--accent)}
.welcome p{color:var(--text2);font-size:1.12rem;max-width:56ch;margin:0 0 28px}
.feature{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.feature li{display:flex;align-items:center;gap:12px;font-weight:600;color:var(--text)}
.feature svg{color:var(--accent);width:22px;height:22px}

/* ---------- panel ---------- */
.panel{position:fixed;top:84px;right:16px;bottom:16px;width:440px;display:flex;flex-direction:column;z-index:10;
  background:linear-gradient(180deg,var(--bg2),var(--panel-bottom));border:1px solid var(--line2);border-radius:24px;box-shadow:var(--shadow);overflow:hidden;
  font-size:var(--font-size);transition:transform .45s var(--ease),opacity .3s}
.panel.closed{transform:translateY(24px) scale(.97);opacity:0;pointer-events:none}
.p-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 14px 12px 16px;
  background:linear-gradient(180deg,rgba(var(--brand-rgb),.28),rgba(var(--brand-rgb),.06));border-bottom:1px solid var(--line)}
.p-who{display:flex;align-items:center;gap:12px;min-width:0}
.p-who>div:last-child{min-width:0}
.p-who b{font-size:1.15em;letter-spacing:-.01em;display:block}
.p-who small{color:var(--text2);font-size:.8em;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p-avatar{position:relative;width:52px;height:52px;flex:none}
.p-avatar video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 12%;border-radius:50%;
  border:2px solid rgba(var(--accent-rgb),.7);transition:opacity .35s;background:var(--avatar-bg)}
#avatarTalk{opacity:0}
.panel.speaking #avatarTalk{opacity:1}
.panel.speaking .p-avatar video{box-shadow:0 0 0 4px rgba(var(--accent-rgb),.18)}
/* Unbranded site (data-unbranded): brand initial instead of a face — same circle, same online dot */
.p-brand{display:none}
html[data-unbranded] .p-avatar video{display:none}
html[data-unbranded] .p-brand{position:absolute;inset:0;display:grid;place-items:center;border-radius:50%;font-weight:800;font-size:1.5em;
  color:#fff;background:linear-gradient(160deg,var(--brand-light),var(--brand));border:2px solid rgba(var(--accent-rgb),.7)}
.p-online{position:absolute;right:1px;bottom:1px;width:13px;height:13px;border-radius:50%;background:#3ddc84;border:2px solid var(--bg2)}
/* Header pill: on an unbranded site it shows who is answering — 32 px avatar (AI: black circle + yellow spark; agent: photo
   or initial) + name + green dot. No "online" text. */
.who-avatar{display:none}
html[data-unbranded] .p-avatar{display:none}
html[data-unbranded] .p-who{gap:10px;padding:4px 16px 4px 4px;border-radius:999px;background:var(--surface);border:1px solid var(--line2);
  box-shadow:0 4px 14px -6px rgba(0,0,0,.28)}
html[data-unbranded] .p-who b{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-unbranded] .who-avatar{position:relative;display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:50%;
  background:#0b0b0c;color:#f7c948}
.who-avatar>*{grid-area:1/1}
.who-avatar .who-ai{width:18px;height:18px;fill:currentColor;stroke:none}
.who-initial{display:none;font-weight:700;font-size:14px;color:#fff}
.who-avatar[data-who="agent"]{background:var(--brand)}
.who-avatar[data-who="agent"] .who-ai{display:none}
.who-avatar[data-who="agent"] .who-initial{display:block}
.who-photo{width:100%;height:100%;border-radius:50%;object-fit:cover}
.who-online{position:absolute;top:-1px;right:-1px;width:10px;height:10px;border-radius:50%;background:#3ddc84;border:2px solid var(--surface)}
.p-tools{display:flex;gap:4px}
.icon{width:40px;height:40px;display:grid;place-items:center;border:0;border-radius:12px;background:transparent;color:var(--text2);transition:background .2s,color .2s}
.icon:hover{background:rgba(255,255,255,.07);color:#fff}
.icon[aria-pressed="true"]{background:rgba(var(--accent-rgb),.16);color:var(--accent)}

.p-tab{display:flex;align-items:center;gap:4px;padding:10px;border-bottom:1px solid var(--line)}
.p-tab button{display:flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--text2);font-weight:600;font-size:.88em;padding:8px 10px;border-radius:10px;white-space:nowrap}
.p-tab svg{width:17px;height:17px}
.p-tab button[aria-selected="true"]{background:rgba(var(--brand-rgb),.25);color:#fff}
.p-tab em{font-style:normal;font-size:.8em;color:var(--accent);font-variant-numeric:tabular-nums}
.p-tab .agent{margin-left:auto;color:var(--accent);border:1px solid rgba(var(--accent-rgb),.35)}
.p-tab .agent:hover{background:rgba(var(--accent-rgb),.12)}

/* ---------- message feed ---------- */
.feed{flex:1;overflow-y:auto;padding:18px 14px 8px;display:flex;flex-direction:column;gap:12px;scroll-behavior:smooth}
.m{max-width:88%;display:flex;flex-direction:column;gap:5px;animation:enter .45s var(--ease) both}
/* Slide only: starting from opacity 0 left answers invisible for a while in slow or background tabs (measured). */
@keyframes enter{from{transform:translateY(8px)}}
.m-bot{align-self:flex-start}
.m-me{align-self:flex-end;align-items:flex-end}
/* Message text 14 px; the input stays 16 px — iOS zooms the page when focusing an input below 16 px. */
.m-box{padding:11px 14px;border-radius:18px;line-height:1.55;overflow-wrap:anywhere;font-size:14px}
/* Avatar next to the answer bubble: spark for AI, photo or initial for an agent; the bubble and everything under it
   (options, ladder, footer) sit in the second column. With an agent name line the avatar aligns with the bubble. */
.m-bot,.m-agent{display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:8px;row-gap:5px}
.m-bot>:not(.m-av),.m-agent>:not(.m-av){grid-column:2}
.m-av{grid-column:1;grid-row:1;align-self:start;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;overflow:hidden;
  font-weight:700;font-size:13px;color:#fff;background:var(--brand)}
.m-agent:has(.m-name)>.m-av{grid-row:2}
.m-av-ai{background:#0b0b0c;color:#f7c948}
.m-av svg{width:16px;height:16px;fill:currentColor;stroke:none}
.m-av img{width:100%;height:100%;object-fit:cover}
.m-bot .m-box{background:var(--surface);border:1px solid var(--line);border-top-left-radius:6px}
.m-me .m-box{background:linear-gradient(180deg,var(--me1),var(--me2));border-top-right-radius:6px;color:#fff}
.m-box p{margin:0 0 .5em}.m-box p:last-child{margin:0}
.m-box ul{margin:.3em 0 .5em;padding-left:1.2em}.m-box li{margin:.15em 0}
.m-box strong{color:var(--accent);font-weight:700}
.m-me .m-box strong{color:#fff}
.m-voice{display:flex;align-items:center;gap:6px;font-size:.78em;color:rgba(255,255,255,.75);margin-bottom:4px}
.m-voice svg{width:15px;height:15px}
.m-foot{display:flex;align-items:center;gap:8px;font-size:.74em;color:var(--text3);padding:0 4px;flex-wrap:wrap}
.m-foot .speed{display:inline-flex;align-items:center;gap:4px;color:var(--text2);font-variant-numeric:tabular-nums}
.m-foot .speed svg{width:13px;height:13px;color:var(--accent)}
.m-foot .source{border:1px solid var(--line2);border-radius:999px;padding:1px 8px;
  /* A long title pushed the "not helpful" button to a second line on narrow screens: one line, only the label shrinks,
     overflow becomes "…" (full text in title). The row holds only speed + label + 3 buttons (destek.js). */
  flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.m-foot:has(.source){flex-wrap:nowrap}
.m-foot:has(.source)>*{flex-shrink:0}
.m-foot:has(.source)>.source{flex-shrink:1}
.m-foot button{border:0;background:transparent;color:var(--text3);padding:4px;border-radius:8px;display:grid;place-items:center}
.m-foot button:hover{color:#fff;background:rgba(255,255,255,.06)}
.m-foot button svg{width:16px;height:16px}
.m-foot button[aria-pressed="true"]{color:var(--accent)}
.cursor::after{content:"";display:inline-block;width:.5em;height:1em;margin-left:2px;vertical-align:-.12em;background:var(--accent);border-radius:2px;animation:blink 1s steps(2) infinite}
@keyframes blink{50%{opacity:0}}
.typing{display:flex;gap:5px;padding:14px 16px}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--text2);animation:bounce 1.1s var(--ease) infinite}
.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes bounce{0%,60%,100%{transform:none;opacity:.45}30%{transform:translateY(-5px);opacity:1}}
.m-system{align-self:center;max-width:92%;text-align:center;font-size:.82em;color:var(--text2);background:rgba(var(--accent-rgb),.08);
  border:1px solid rgba(var(--accent-rgb),.25);padding:8px 14px;border-radius:12px}
.m-system b{color:var(--accent);font-variant-numeric:tabular-nums;white-space:nowrap}
/* 1–5 rating at closing: looks like the system box, separate class */
.m-rating{align-self:center;max-width:92%;text-align:center;font-size:.82em;color:var(--text2);background:rgba(var(--accent-rgb),.08);
  border:1px solid rgba(var(--accent-rgb),.25);padding:8px 14px;border-radius:12px;display:grid;gap:8px}
.rating-buttons{display:flex;justify-content:center;gap:6px;flex-wrap:wrap}
.rating-buttons button{min-width:40px;min-height:40px;border:1px solid var(--line2);background:transparent;color:var(--text);
  font-weight:700;border-radius:10px;font-variant-numeric:tabular-nums}
.rating-buttons button:hover:not(:disabled){background:rgba(255,255,255,.06)}
.rating-buttons button:disabled{opacity:.55}
.rating-buttons button[aria-pressed="true"]{opacity:1;background:rgba(var(--accent-rgb),.16);border-color:var(--accent);color:var(--accent)}
.rating-result:empty{display:none}
/* Live agent: agent bubble on the left like the bot, separated from the assistant by a gold border; strip above the input */
.m-agent{align-self:flex-start}
.m-agent .m-box{background:var(--surface2);border:1px solid rgba(var(--accent-rgb),.45);border-top-left-radius:6px;white-space:pre-wrap}
.m-name{font-size:.74em;font-weight:700;color:var(--accent);letter-spacing:.02em;padding-left:4px}
.live-strip{display:flex;align-items:center;gap:8px;padding:7px 12px;border-top:1px solid var(--line);background:rgba(var(--accent-rgb),.07);
  font-size:.82em;color:var(--text2)}
.live-strip svg{width:16px;height:16px;flex-shrink:0;color:var(--accent)}
.live-strip span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.live-strip button{flex-shrink:0;border:1px solid var(--line2);background:transparent;color:var(--text);font-size:.95em;font-weight:600;
  padding:5px 10px;border-radius:999px}
.live-strip button:hover{border-color:var(--accent)}
.p-tab .agent:disabled{opacity:.45;cursor:default}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 6px}
.chips button{border:1px solid rgba(var(--accent-rgb),.35);background:rgba(var(--accent-rgb),.06);color:var(--text);font-size:.86em;font-weight:600;
  padding:8px 12px;border-radius:999px;transition:background .2s,border-color .2s}
.chips button:hover{background:rgba(var(--accent-rgb),.16);border-color:var(--accent)}
/* Card choice: full-width cards stacked, ≥48 px touch; the escape is secondary but full width ≥44 px. */
.card-choice{display:flex;flex-direction:column;gap:8px;margin:4px 0 8px;width:100%;max-width:440px}
.card-choice button{width:100%;text-align:left;border-radius:12px;color:var(--text);transition:background .2s,border-color .2s,opacity .2s}
.card-choice .card-pick{min-height:48px;padding:11px 14px;font-size:.92em;font-weight:700;line-height:1.35;
  border:1px solid rgba(var(--accent-rgb),.38);background:rgba(var(--accent-rgb),.06)}
.card-choice .card-pick:hover:not(:disabled),.card-choice .card-pick:focus-visible{background:rgba(var(--accent-rgb),.16);border-color:var(--accent);outline:none}
.card-choice .card-pick.selected{border-color:var(--accent);background:rgba(var(--accent-rgb),.18)}
.card-choice .card-pick.dimmed{opacity:.4}
.card-choice button:disabled{cursor:default}
.card-choice .card-escape{min-height:44px;padding:10px 14px;text-align:center;font-size:.86em;font-weight:600;color:var(--text2);
  border:1px dashed var(--line2);background:rgba(255,255,255,.03)}
.card-choice .card-escape:hover:not(:disabled),.card-choice .card-escape:focus-visible{color:var(--text);border-color:var(--text3);outline:none}
/* Ladder: under a card / model answer "was this helpful?" Yes · No (No → model → agent) */
.ladder{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:4px 0 6px;font-size:.86em;color:var(--text2)}
.ladder span{font-weight:600}
.ladder button{border:1px solid rgba(var(--accent-rgb),.35);background:rgba(var(--accent-rgb),.06);color:var(--text);font-weight:600;
  padding:6px 14px;border-radius:999px;transition:background .2s,border-color .2s}
.ladder button:hover:not(:disabled){background:rgba(var(--accent-rgb),.16);border-color:var(--accent)}
.ladder button:disabled{opacity:.5;cursor:default}
.ladder button[aria-pressed="true"]{opacity:1;border-color:var(--accent);color:var(--accent)}
/* Linking blocks: sourced "remember" note + related questions */
.warning-note{margin:6px 0 2px;padding:9px 12px;border-left:3px solid var(--accent);background:rgba(var(--accent-rgb),.07);
  border-radius:0 10px 10px 0;font-size:.88em;line-height:1.5;overflow-wrap:anywhere}
.warning-note b{color:var(--accent)}
.related-title{margin:8px 0 4px;font-size:.78em;color:var(--text3);letter-spacing:.02em}

/* ---------- glossary ---------- */
.glossary{flex:1;display:flex;flex-direction:column;min-height:0;padding:12px 14px 0}
.g-search{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line2);border-radius:14px;padding:0 12px}
.g-search svg{color:var(--text3)}
.g-search input{flex:1;background:transparent;border:0;outline:0;color:var(--text);font:inherit;padding:12px 0}
.g-search:focus-within{border-color:var(--brand-light)}
.g-cat{display:flex;gap:6px;overflow-x:auto;padding:10px 0;flex:none;scrollbar-width:none}
.g-cat button{flex:none;border:1px solid var(--line2);background:transparent;color:var(--text2);font-size:.8em;font-weight:600;padding:6px 11px;border-radius:999px}
.g-cat button[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:#fff}
.g-list{flex:1;overflow-y:auto;padding-bottom:14px}
.g-list details{border-bottom:1px solid var(--line)}
.g-list summary{list-style:none;cursor:pointer;padding:12px 4px;font-weight:600;display:flex;justify-content:space-between;gap:10px}
.g-list summary::-webkit-details-marker{display:none}
.g-list summary small{color:var(--text3);font-weight:500;font-size:.78em;white-space:nowrap}
.g-list details[open] summary{color:var(--accent)}
.g-list .g-answer{color:var(--text2);padding:0 4px 14px;margin:0;line-height:1.6}
.g-list .g-empty{color:var(--text3);text-align:center;padding:30px 10px}

/* ---------- input / recorder ---------- */
.composer{display:flex;align-items:flex-end;gap:8px;padding:10px 12px 8px;border-top:1px solid var(--line)}
.composer textarea{flex:1;resize:none;max-height:140px;background:var(--surface);border:1px solid var(--line2);border-radius:22px;color:var(--text);
  font:inherit;line-height:1.45;padding:12px 16px;outline:0;caret-color:var(--accent);overflow-y:hidden}
.composer textarea.overflow{overflow-y:auto}
.composer textarea::placeholder{color:var(--text3)}
.composer textarea:focus{border-color:var(--brand-light)}
.mic,.send,.rec-send{width:50px;height:50px;border:0;border-radius:50%;display:grid;place-items:center;flex:none;color:#fff;
  background:linear-gradient(180deg,var(--brand-light),var(--brand));box-shadow:0 8px 20px -8px rgba(var(--brand-rgb),.9);transition:transform .2s var(--ease)}
.mic svg,.send svg,.rec-send svg{width:22px;height:22px}
.mic:active,.send:active{transform:scale(.92)}
.mic.pressed{transform:scale(1.25);background:linear-gradient(180deg,#ff7a7a,#e04848)}
.mic:disabled{opacity:.4;cursor:not-allowed}
/* Baglanti kopuk (destek.js setNetDown): gonder dugmesi sonuk, tiklanmaz gorunur */
.send.net-down{opacity:.4;cursor:not-allowed}
/* Attach: secondary button — does not compete with the blue primary buttons; in older windows only during a live agent
   chat, in the embedded operator window always visible */
.attach{width:44px;height:44px;margin-bottom:3px;border:1px solid var(--line2);border-radius:50%;display:grid;place-items:center;flex:none;
  background:transparent;color:var(--text2);cursor:pointer;touch-action:manipulation;transition:transform .2s var(--ease),color .2s,border-color .2s}
.attach svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media (hover:hover){.attach:hover{color:var(--brand-light);border-color:var(--brand-light)}}
.attach:active{transform:scale(.92)}
.attach:disabled{opacity:.45;cursor:progress}
.attach[hidden]{display:none!important}
.p-foot{margin:0;padding:0 16px 12px;font-size:.7em;color:var(--text3);text-align:center;line-height:1.4}

.recorder{border-top:1px solid var(--line);padding:12px 12px 10px;background:linear-gradient(180deg,rgba(224,72,72,.07),transparent)}
.rec-live{margin:0 4px 10px;font-size:1.3em;line-height:1.35;font-weight:600;min-height:1.35em;max-height:5.5em;overflow-y:auto;color:#fff}
.rec-live .temp{color:var(--text2)}
.rec-bar{display:flex;align-items:center;gap:10px}
.rec-cancel{color:var(--danger)}
.rec-dot{width:12px;height:12px;border-radius:50%;background:var(--danger);animation:pulse 1.2s ease-in-out infinite;flex:none}
@keyframes pulse{50%{opacity:.25;transform:scale(.8)}}
.rec-time{font-variant-numeric:tabular-nums;font-weight:700;color:var(--text2);min-width:3.2em}
.rec-wave{flex:1;min-width:0;height:40px}
.rec-hint{display:block;margin:8px 4px 0;color:var(--text3);font-size:.78em}

/* ---------- launcher ---------- */
.launcher{position:fixed;right:20px;bottom:20px;z-index:9;display:flex;align-items:center;gap:10px;border:1px solid rgba(var(--accent-rgb),.5);
  background:var(--surface2);color:#fff;font-weight:700;padding:6px 18px 6px 6px;border-radius:999px;box-shadow:var(--shadow)}
.launcher img{width:44px;height:44px;border-radius:50%;object-fit:cover;border:2px solid var(--accent)}

/* ---------- phone ---------- */
@media (max-width:900px){
  .site-nav,.site-actions{display:none}
  .site{height:58px;padding:0 16px}
  .site-logo img{height:36px}
  .stage{display:none}
  /* Height from the visible area: the input stays visible when the keyboard opens (100vh fallback for old browsers). */
  .panel{inset:58px 0 auto 0;width:auto;height:calc(100vh - 58px);height:calc(100dvh - 58px);border-radius:0;border:0}
  .panel.closed{transform:translateY(100%)}
  .m{max-width:92%}
  /* 16 px side gutter, readable text ≥ 15 px */
  .p-head{padding:12px 12px 10px 16px}
  .p-tab{padding:8px 16px}
  .feed{padding:16px 16px 8px}
  .chips button{font-size:.94em}
  .composer{padding:10px 16px calc(8px + env(safe-area-inset-bottom,0px))}
  .p-foot{font-size:.75em}
}
@media (max-width:420px){
  .p-tab{gap:2px;padding:8px 16px}
  .p-tab button{padding:8px 9px}
  .p-who small{max-width:170px}
}
/* ---------- embedded in the studio panel (?gomulu=panel) ----------
   Green theme by decision; the big avatar is removed by the server (it took 204 px of a 680 px window). Header is a single
   line like the operator window. No site shell. iframe 380–520 px. */
.embedded .site,.embedded .stage,.embedded .launcher,.embedded #minimize{display:none}
.embedded .panel{inset:0;width:auto;height:auto;border:0;border-radius:0;box-shadow:none}
.embedded .p-who small{max-width:none}
/* Tab row on one line at 360–430 px: "connect to an agent" → "agent" (the full accessible name stays in aria-label). */
.p-tab .agent .t-long{display:inline}
.p-tab .agent .t-short{display:none}
.embedded .p-tab .agent .t-long{display:none}
.embedded .p-tab .agent .t-short{display:inline}
/* ---------- embedded in the operator site (?parca=1, parca.js) ----------
   Box size and the launcher belong to parca.js on the parent page; here the panel fills the iframe, no site shell. */
.widget .site,.widget .stage,.widget .launcher{display:none}
.widget .panel{inset:0;width:auto;height:auto;border:0;border-radius:0;box-shadow:none}
/* No avatar: the 170 px limit of the 420 px rule (avatar allowance) was cutting the subtitle for nothing. */
.widget .p-who small{max-width:none}
/* Phone: panel is screen-wide; below 480 px the same short label (otherwise the button overflowed the right edge). */
@media (max-width:480px){.p-tab .agent .t-long{display:none}.p-tab .agent .t-short{display:inline}}
.embedded .p-tab{gap:4px;padding:8px 10px}
.embedded .p-tab button{white-space:nowrap;padding:8px 10px}
/* A half-cut chip/message at the bottom edge looks rough: soft fade while there is content below (class set by JS,
   removed at the bottom — the last line of the last message never fades). Thin green scrollbar. */
.embedded .feed{scrollbar-color:rgba(39,166,122,.45) transparent}
.embedded .feed::-webkit-scrollbar{width:6px}
.embedded .feed::-webkit-scrollbar-thumb{background:rgba(39,166,122,.45);border-radius:6px}
.embedded .feed.has-below{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 36px),transparent);
  mask-image:linear-gradient(to bottom,#000 calc(100% - 36px),transparent)}
.embedded .feed.has-above{-webkit-mask-image:linear-gradient(to bottom,transparent,#000 32px);
  mask-image:linear-gradient(to bottom,transparent,#000 32px)}
.embedded .feed.has-above.has-below{-webkit-mask-image:linear-gradient(to bottom,transparent,#000 32px,#000 calc(100% - 36px),transparent);
  mask-image:linear-gradient(to bottom,transparent,#000 32px,#000 calc(100% - 36px),transparent)}

/* ---------- full screen (?gorunum=tam, shareable link) ----------
   Question accordion on the left, chat glued to the right; no gap between them or at the window edge. No site shell.
   The question list is never drawn outside this view (corner window and embed modes unchanged). */
/* .p-tab button{display:flex} targets the same element more specifically: the hide rule needs enough specificity to win */
.questions,.p-tab .questions-open{display:none}
.full .site,.full .stage,.full .launcher,.full #minimize{display:none}
.full .questions{position:fixed;inset:0 auto 0 0;width:380px;display:flex;flex-direction:column;z-index:11;
  background:var(--bg2);border-right:1px solid var(--line2)}
.full .panel{inset:0 0 0 380px;width:auto;border:0;border-radius:0;box-shadow:none}
.q-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:18px 16px 10px 20px}
.q-head b{font-size:1.05rem;letter-spacing:.01em}
.q-close{display:none}
.q-search{display:flex;align-items:center;gap:8px;margin:0 16px 10px;background:var(--surface);border:1px solid var(--line2);border-radius:12px;padding:0 12px}
.q-search svg{color:var(--text3)}
.q-search input{flex:1;min-width:0;border:0;background:transparent;color:var(--text);font:inherit;font-size:.95rem;padding:11px 0;outline:0}
.q-tree{flex:1;overflow-y:auto;padding:0 10px 24px}
.q-empty{margin:0 20px 20px;color:var(--text3);font-size:.92rem}
/* Accordion: details/summary (keyboard and screen reader built in). Depth shows as a left rule, text shrinks per level. */
.q-tree details{border-radius:12px}
.q-tree summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;border-radius:12px;cursor:pointer;
  color:var(--text);font-weight:600;user-select:none}
.q-tree summary::-webkit-details-marker{display:none}
.q-tree summary::after{content:"";margin-left:auto;flex:none;width:8px;height:8px;border-right:2px solid var(--text3);border-bottom:2px solid var(--text3);
  transform:rotate(-45deg);transition:transform .2s var(--ease)}
.q-tree details[open]>summary::after{transform:rotate(45deg)}
.q-tree summary:hover{background:rgba(255,255,255,.05)}
.q-tree .q-count{flex:none;min-width:24px;padding:0 7px;border-radius:99px;background:rgba(var(--brand-rgb),.22);color:var(--text2);
  font-size:.75rem;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}
.q-tree .q-inner{margin-left:14px;padding-left:8px;border-left:1px solid var(--line2)}
.q-tree .d1>summary{font-size:1rem;font-weight:700}
.q-tree .d2>summary,.q-tree .d3>summary{font-size:.95rem;color:var(--text2)}
.q-tree .q-card>summary{font-size:.92rem;font-weight:600;color:var(--text2)}
.q-tree details[open]>summary{color:#fff}
.q-item{display:block;width:100%;text-align:left;border:0;background:transparent;color:var(--text2);font-size:.92rem;line-height:1.4;
  padding:9px 12px;border-radius:10px;min-height:40px}
.q-item:hover,.q-item:focus-visible{background:rgba(var(--brand-rgb),.22);color:#fff}
.q-all{display:block;margin:2px 0 6px;border:0;background:transparent;color:var(--accent);font-size:.85rem;font-weight:600;
  padding:8px 12px;border-radius:10px;min-height:40px}
.q-all:hover,.q-all:focus-visible{background:rgba(var(--accent-rgb),.12)}
.q-badge{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:99px;font-size:.72rem;font-weight:700;vertical-align:1px;
  color:var(--accent);border:1px solid rgba(var(--accent-rgb),.45);white-space:nowrap}
@media (max-width:900px){
  .full .panel{inset:0;height:100vh;height:100dvh}
  .full .questions{width:min(420px,100vw);transform:translateX(-100%);transition:transform .3s var(--ease);box-shadow:var(--shadow)}
  .full .questions.open{transform:none}
  .full .p-tab .questions-open{display:flex}
  .full .q-close{display:grid}
}

/* ---------- LIGHT theme: the operator's embedded window (?site=troybet&parca=1) ----------
   Light cards; colours taken from the operator site's own design variables (measured): primary blue #1475e1, text #0e202d,
   secondary text #3e586c. No gold accent here; the accent is blue. Accent text is the dark twin of the blue (#0f5fb8, ≥ 4.5
   on white). Scope only: dark themes and the full-screen view stay as they are. */
html.widget[data-site="troybet"]{
  --bg:#f5f8fb; --bg2:#ffffff; --surface:#ffffff; --surface2:#eef4fb; --panel-bottom:#f5f8fb;
  --line:rgba(14,32,45,.08); --line2:rgba(14,32,45,.14);
  --brand:#1475e1; --brand-light:#3a8cf0; --brand-rgb:20,117,225; --me1:#1d7ee8; --me2:#1475e1;
  --accent:#0f5fb8; --accent-dark:#0c4f9a; --accent-rgb:20,117,225;
  --text:#0e202d; --text2:#3e586c; --text3:#5c7080; --danger:#c80833; /* 16.11 T3-06.04: text3 #6b8295 3,61-4,00 -> en kotu 4,65 */
  --shadow:0 12px 40px -12px rgba(14,32,45,.28), 0 2px 6px rgba(14,32,45,.08);
  color-scheme:light;
}
html.widget[data-site="troybet"] body{background:var(--bg2);background-image:none}
html.widget[data-site="troybet"] ::selection{color:var(--text)}
html.widget[data-site="troybet"] *{scrollbar-color:rgba(14,32,45,.18) transparent}
html.widget[data-site="troybet"] .panel{background:var(--bg2)}
/* header: white, single rule; brand initial in the operator blue, online dot green */
html.widget[data-site="troybet"] .p-head{background:#fff;border-bottom:1px solid var(--line);padding:14px 12px 12px 16px}
html.widget[data-site="troybet"] .p-avatar{width:44px;height:44px}
html.widget[data-site="troybet"] .p-brand{background:var(--brand)!important;border:0!important;font-size:1.3em}
html.widget[data-site="troybet"] .p-online{background:#03c41f;border-color:#fff}
html.widget[data-site="troybet"] .p-who b{color:var(--text)}
html.widget[data-site="troybet"] .p-who small{color:var(--text3)}
html.widget[data-site="troybet"] .icon{color:var(--text3)}
html.widget[data-site="troybet"] .icon:hover{background:var(--surface2);color:var(--text)}
html.widget[data-site="troybet"] .icon[aria-pressed="true"]{background:rgba(20,117,225,.10);color:var(--brand)}
/* tabs: two options inside a light grey pill */
html.widget[data-site="troybet"] .p-tab{background:#fff;border-bottom:1px solid var(--line);padding:8px 16px 10px}
html.widget[data-site="troybet"] .p-tab button{color:var(--text2)}
html.widget[data-site="troybet"] .p-tab button[aria-selected="true"]{background:var(--surface2);color:var(--text)}
html.widget[data-site="troybet"] .p-tab em{color:var(--accent)}
/* feed: very light blue-grey background, white bubble, blue player bubble; long answers with relaxed line height */
html.widget[data-site="troybet"] .feed{background:var(--bg);padding:20px 16px 10px;gap:14px}
html.widget[data-site="troybet"] .m-bot .m-box{background:#fff;border:1px solid var(--line);box-shadow:0 1px 2px rgba(14,32,45,.05);line-height:1.6}
html.widget[data-site="troybet"] .m-me .m-box{background:var(--brand);color:#fff}
html.widget[data-site="troybet"] .m-box strong{color:var(--accent)}
html.widget[data-site="troybet"] .m-me .m-box strong{color:#fff}
html.widget[data-site="troybet"] .m-foot button:hover{color:var(--text);background:var(--surface2)}
html.widget[data-site="troybet"] .m-agent .m-box{background:#fff;border-color:rgba(20,117,225,.45)}
html.widget[data-site="troybet"] .m-system,html.widget[data-site="troybet"] .m-rating{background:#fff;border-color:var(--line2)}
html.widget[data-site="troybet"] .rating-buttons button:hover:not(:disabled){background:var(--surface2)}
/* suggestion chips and options: white, blue text, thin blue border */
html.widget[data-site="troybet"] .chips button,html.widget[data-site="troybet"] .ladder button,
html.widget[data-site="troybet"] .card-choice .card-pick{background:#fff;border:1px solid rgba(20,117,225,.30);color:var(--accent)}
html.widget[data-site="troybet"] .chips button:hover,html.widget[data-site="troybet"] .ladder button:hover:not(:disabled),
html.widget[data-site="troybet"] .card-choice .card-pick:hover:not(:disabled){background:rgba(20,117,225,.07);border-color:var(--brand)}
html.widget[data-site="troybet"] .card-choice .card-escape{background:#fff}
html.widget[data-site="troybet"] .warning-note{background:rgba(20,117,225,.06)}
html.widget[data-site="troybet"] .live-strip{background:rgba(20,117,225,.06)}
/* input: white, rounded, blue send/mic */
html.widget[data-site="troybet"] .composer{background:#fff;padding:12px 14px 8px}
html.widget[data-site="troybet"] .composer textarea{background:var(--bg);border-color:var(--line2);caret-color:var(--brand)}
html.widget[data-site="troybet"] .composer textarea:focus{border-color:var(--brand);background:#fff}
html.widget[data-site="troybet"] .mic,html.widget[data-site="troybet"] .send,html.widget[data-site="troybet"] .rec-send{
  background:var(--brand);box-shadow:0 6px 16px -8px rgba(20,117,225,.8)}
html.widget[data-site="troybet"] .p-foot{background:#fff;color:var(--text3)}
html.widget[data-site="troybet"] .attach{color:var(--text2);border-color:var(--line2)}
@media (hover:hover){html.widget[data-site="troybet"] .attach:hover{color:var(--brand);border-color:var(--brand)}}
html.widget[data-site="troybet"] .rec-live{color:var(--text)}
html.widget[data-site="troybet"] .g-search{background:var(--bg)}
html.widget[data-site="troybet"] :focus-visible{outline-color:var(--brand)}

/* ---------- operator embedded window: Home · Messages · Help ----------
   The view lives on #panel[data-view] (destek.js setView); each view draws only its own parts. The bottom tab bar shows
   on Home and Help, not in Messages (the back button returns to Home). Font Inter (served by us; no new origin in CSP,
   default-src 'self' is enough). Other sites and views are unaffected: Home, tab bar and the Help title are not drawn by default. */
@font-face{font-family:"Inter";src:url("/fonts/inter.woff2") format("woff2");font-weight:100 900;font-display:swap}
.home,.tabbar,.g-title{display:none}
html.widget[data-site="troybet"] body{font-family:"Inter",system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  -webkit-font-smoothing:antialiased}
html.widget[data-site="troybet"] .panel[data-view="home"]>:not(.home):not(.tabbar),
html.widget[data-site="troybet"] .panel[data-view="help"]>:not(.glossary):not(.tabbar),
html.widget[data-site="troybet"] .panel[data-view="messages"]>:is(.home,.tabbar){display:none!important}
/* without the tab bar the input carries the phone's bottom safe-area inset */
html.widget[data-site="troybet"] .panel[data-view="messages"]{padding-bottom:env(safe-area-inset-bottom,0px)}
/* Instead of the Chat/Glossary tabs the bottom tab bar is used; the row keeps only the agent button, and is not drawn while that is hidden */
html.widget[data-site="troybet"] .p-tab [data-tab]{display:none}
html.widget[data-site="troybet"] .p-tab:not(:has(.agent:not([hidden]))){display:none}

/* Home: colour field on top melting into the light background; the cards sit on that transition. 14.11 (owner: "the canvas
   is tiring"): the field is one frame of the former WebGL shader (arkaplan.js) saved as arkaplan.webp — same look, no GPU
   loop. The CSS gradient under it shows until the image arrives. */
/* Layout: top strip at the top, greeting + cards pushed down against the tab bar (the greeting's margin-top:auto takes the
   free space; if the content does not fit the page scrolls and the gap goes to 0). */
html.widget[data-site="troybet"] .home{position:relative;isolation:isolate;display:flex;flex-direction:column;flex:1;min-height:0;
  overflow-y:auto;overflow-x:hidden;padding:0 16px 12px;background:var(--bg)}
.h-bg{position:absolute;inset:0 0 auto 0;height:max(360px,58%);z-index:-1;overflow:hidden;
  background:url("/arkaplan.webp") center top/cover no-repeat,
  radial-gradient(110% 80% at 12% 0%,#164fae 0%,transparent 62%),radial-gradient(90% 75% at 100% 35%,#3a2f9c 0%,transparent 66%),
  linear-gradient(180deg,#081230 0%,#0d2a66 100%)}
/* fine film grain (SVG noise in CSS, img-src data: allowed) + melt into the light background at the bottom edge */
.h-bg::before{content:"";position:absolute;inset:0;z-index:1;opacity:.16;mix-blend-mode:overlay;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E")}
.h-bg::after{content:"";position:absolute;inset:auto 0 0 0;height:52%;z-index:2;
  background:linear-gradient(180deg,rgba(245,248,251,0) 0%,rgba(245,248,251,.55) 45%,var(--bg) 92%)}
.h-top{display:flex;align-items:center;gap:12px;padding:20px 4px 0 4px;color:#fff}
.h-brand{display:flex;align-items:center;gap:9px;margin-right:auto;font-size:20px;letter-spacing:-.015em;min-width:0}
.h-brand b{font-weight:600}
.h-mark{width:28px;height:28px;flex:none;border-radius:8px;display:grid;place-items:center;font-style:normal;font-weight:800;font-size:15px;
  background:linear-gradient(150deg,#4a9bf5,#1475e1);box-shadow:0 6px 16px -6px rgba(20,117,225,.9),inset 0 1px 0 rgba(255,255,255,.35)}
/* team faces: ~44 px, side by side, overlapping a little; no white frame, a thin ring in the background colour
   separates each face from the previous one */
.h-team{display:flex;padding-left:2px}
.h-team>*{width:44px;height:44px;margin-left:-3px;border-radius:50%;border:2.5px solid #0b1f4d;box-shadow:none}
.h-team>:first-child{margin-left:0}
.h-team .m-av{grid-column:auto;grid-row:auto}
.h-team .m-av svg{width:20px;height:20px}
.h-team img{object-fit:cover}
.h-face{display:grid;place-items:center;overflow:hidden;color:#fff;background:linear-gradient(160deg,#6b93ea,#3460c4)}
.h-face>*{grid-area:1/1}
.h-face svg{width:20px;height:20px}
.h-face img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .3s var(--ease)}
.h-face img.on{opacity:1}
html.widget[data-site="troybet"] .home .h-close{width:36px;height:36px;color:#fff;border-radius:50%}
html.widget[data-site="troybet"] .home .h-close:hover{background:rgba(255,255,255,.14)}
/* the "hello 👋" line muted, two bold white lines under it */
.h-hello{margin:auto 4px 22px;padding-top:40px;color:#fff;font-size:30px;line-height:1.18;font-weight:700;letter-spacing:-.02em}
.h-hello span{display:block;color:rgba(255,255,255,.55);overflow-wrap:anywhere}
/* 14.11: the wave close to the name (its glyph carries its own side space) */
.h-hello .h-wave{display:inline;margin-left:-.06em;color:inherit}
/* cards: frosted white, thin rule, soft shadow */
.h-card{display:block;width:100%;margin:0 0 12px;padding:14px 16px;text-align:left;color:var(--text);font:inherit;
  background:rgba(255,255,255,.97);border:1px solid rgba(14,32,45,.07);border-radius:16px;
  box-shadow:0 12px 32px -14px rgba(14,32,45,.30),0 1px 3px rgba(14,32,45,.06);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.h-last{cursor:pointer;transition:transform .2s var(--ease),box-shadow .2s}
@media (hover:hover){.h-last:hover{transform:translateY(-1px);box-shadow:0 16px 36px -14px rgba(14,32,45,.36),0 1px 3px rgba(14,32,45,.06)}}
.h-card-title{display:block;margin-bottom:10px;font-size:14px;font-weight:600}
.h-last-row{display:flex;align-items:center;gap:10px}
.h-last-av .m-av{width:36px;height:36px}
.h-last-av .m-av svg{width:18px;height:18px}
.h-last-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.h-last-head{display:flex;justify-content:space-between;gap:8px;font-size:14px}
.h-last-head b{font-weight:500}
.h-last-head small{flex:none;font-size:13px;color:var(--text3)}
.h-last-msg{font-size:13.5px;color:var(--text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.h-faq{padding:8px 8px 6px;margin-bottom:0}
/* help search: grey filled box, bold dark text, blue magnifier on the right */
.h-search{display:flex;align-items:center;gap:8px;padding:0 12px 0 14px;margin-bottom:6px;border-radius:10px;background:#eef1f5}
.h-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--text);font:inherit;font-size:14px;font-weight:600;padding:12px 0}
.h-search input::placeholder{color:var(--text);opacity:1}
.h-search svg{width:18px;height:18px;color:var(--brand);stroke-width:2.2}
.h-search:focus-within{box-shadow:0 0 0 2px rgba(20,117,225,.35)}
.h-item{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:10px 12px 10px 14px;border:0;
  border-radius:10px;background:transparent;text-align:left;color:#3d4b5c;font-size:14px;line-height:1.4;transition:background .15s,color .15s}
.h-item svg{width:16px;height:16px;color:var(--brand);stroke-width:2.2}
.h-item:hover,.h-item:focus-visible{background:var(--surface2);color:var(--text)}
.h-list{display:flex;flex-direction:column}
.h-empty{margin:0;padding:10px 12px;font-size:13px;color:var(--text3)}
/* Help: glossary with its own title */
html.widget[data-site="troybet"] .g-title{display:block;margin:6px 2px 12px;font-size:20px;font-weight:700;letter-spacing:-.02em;color:var(--text)}
html.widget[data-site="troybet"] .glossary{padding:16px 16px 0;background:var(--bg)}
/* Help text 16 → 14.4 px (owner 14.11: "unnecessarily large"); the smaller labels (category chips, tags) keep their px size */
html.widget[data-site="troybet"] :is(.g-search input,.g-list summary,.g-list .g-answer,.g-list .g-empty){font-size:14.4px}
html.widget[data-site="troybet"] .g-cat button{font-size:12.8px}
html.widget[data-site="troybet"] .g-list summary small{font-size:12.48px}
/* ---------- Messages ---------- */
/* Header: back to Home on the left, the answering party's pill in the middle (13 px bold), read-aloud + close on the right
   (B-15: the small window had no "Sesli oku" while the full page had it) */
.p-back{display:none}
html.widget[data-site="troybet"] .p-head{position:relative;justify-content:center;min-height:60px;padding:10px 92px}
html.widget[data-site="troybet"] .p-back{display:grid;position:absolute;left:10px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%}
html.widget[data-site="troybet"] .p-tools{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:flex;gap:4px}
html.widget[data-site="troybet"] .p-tools .icon{width:36px;height:36px;border-radius:50%}
html.widget[data-site="troybet"] #readAloud[aria-pressed="true"]{color:var(--brand);background:rgba(20,117,225,.10)}
/* Inline "Temsilciye bağlan" under the answer that grants it (B-06) */
.agent-chips .agent-chip{display:inline-flex;align-items:center;gap:6px}
.agent-chips .agent-chip svg{width:16px;height:16px;flex:none}
html.widget[data-site="troybet"] .agent-chips .agent-chip{background:var(--brand);border-color:var(--brand);color:#fff}
html.widget[data-site="troybet"] .agent-chips .agent-chip:hover{background:var(--brand);filter:brightness(1.08)}
/* After a pick every row of the list is locked (B-07); the escape row dims like the cards */
.card-choice .card-escape.dimmed{opacity:.45}
.card-choice .card-escape.selected{color:var(--text);border-color:var(--accent)}
.chips button:disabled{cursor:default;opacity:.5}
.chips button[aria-pressed="true"]:disabled{opacity:1;border-color:var(--accent)}
html.widget[data-site="troybet"] .p-who{gap:8px;padding:3px 14px 3px 3px}
html.widget[data-site="troybet"] .p-who b,html.widget[data-site="troybet"] .p-who small{font-size:13px;font-weight:700}
html.widget[data-site="troybet"] .who-avatar{width:28px;height:28px}
html.widget[data-site="troybet"] .who-avatar .who-ai{width:15px;height:15px}
/* AI avatar: brand blue to violet gradient, a thin highlight on top, three white sparkles; same in the header pill,
   message bubble, last message card and the "joined" line */
html.widget[data-site="troybet"] .m-av-ai,html.widget[data-site="troybet"] .who-avatar:not([data-who="agent"]){color:#fff;
  background:radial-gradient(120% 90% at 30% 15%,rgba(255,255,255,.38),transparent 46%),linear-gradient(145deg,#4aa3ff 0%,#1475e1 48%,#5240c8 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22),0 3px 8px -3px rgba(20,117,225,.75)}
html.widget[data-site="troybet"] .m-av-ai svg,html.widget[data-site="troybet"] .who-avatar .who-ai{fill:#fff;stroke:none;filter:drop-shadow(0 0 2px rgba(255,255,255,.55))}
html.widget[data-site="troybet"] .m-av-ai svg{width:18px;height:18px}
html.widget[data-site="troybet"] .who-avatar .who-ai{width:17px;height:17px}
/* agent initial in brand colour (the unbranded site's black AI background was overriding the agent rule) */
html.widget[data-site="troybet"] .who-avatar[data-who="agent"]{background:var(--brand)}
/* agent button row: only while the button is visible, thin */
html.widget[data-site="troybet"] .p-tab{justify-content:flex-end;padding:6px 16px}
/* feed: airy light background, rounded bubbles (bot/agent light grey, player brand blue), 14 px text */
html.widget[data-site="troybet"] .feed{background:linear-gradient(180deg,#fff 0%,#f4f6f9 100%);padding:18px 16px 10px;gap:10px}
html.widget[data-site="troybet"] .m-bot .m-box,html.widget[data-site="troybet"] .m-agent .m-box{background:#eef1f5;border:0;box-shadow:none;
  border-radius:18px;line-height:1.5}
html.widget[data-site="troybet"] .m-me .m-box{border-radius:18px}
html.widget[data-site="troybet"] .m-foot:empty{display:none}
/* chat layout: the name sits under the bubble ("Name • 2 dk"); when an agent joins a small centred line with face
   "Name joined the chat". */
/* The avatar stays next to the bubble (the agent's face comes from the same place): spark for AI, photo or initial for
   an agent. The name is under the bubble, the avatar on the bubble's row. */
html.widget[data-site="troybet"] .m-name{display:none}
html.widget[data-site="troybet"] .m-agent>.m-av{grid-row:1}
/* chat faces 30 px (14.11 owner: 38 was too big); the agent face also comes from here */
html.widget[data-site="troybet"] .m-bot,html.widget[data-site="troybet"] .m-agent{grid-template-columns:30px minmax(0,1fr);column-gap:10px}
html.widget[data-site="troybet"] .feed .m-av{width:30px;height:30px;font-size:13px}
html.widget[data-site="troybet"] .feed .m-av-ai svg{width:17px;height:17px}
/* while an agent is connected the "you can reach an agent" hint is meaningless: hidden while the live strip is open */
html.widget[data-site="troybet"] .panel:has(#liveStrip:not([hidden])) .p-foot{display:none}
/* 14.11 sahip (Gamdom gibi): the top-right "Temsilci" row and "Görüşmeyi bitir" are never drawn. The way to an agent is the
   "Temsilciye bağlan" button inside the chat (destek.js addAgentChip; the header button keeps only its state logic). */
html.widget[data-site="troybet"] .p-tab,html.widget[data-site="troybet"] #liveEnd,
html.widget[data-site="troybet"] .live-strip .live-confirm{display:none!important}
/* the queue note: one short line without a box ("Sıraya alındınız · HB-…") */
html.widget[data-site="troybet"] .m-system.m-short{padding:2px 8px;border:0;background:transparent;box-shadow:none;font-size:12px;color:var(--text3)}
html.widget[data-site="troybet"] .m-me{gap:4px}
.m-meta{padding:0 6px;font-size:12px;color:var(--text3);font-variant-numeric:tabular-nums}
/* VOL3 V05 (S2): hizli yazma kilidinde reddedilen mesaj "Gonderilmedi" uyari renginde (oyuncu gitti sanmasin); ardisik balon gizlemesi
   reddedilende de durumu saklamasin diye goruntu kurali sonradan gelir */
.unsent>.m-meta,.m-meta[data-status="unsent"]{color:var(--danger);font-weight:600}
html.widget[data-site="troybet"] .unsent>.m-meta{display:block!important}  /* gizleme kurali :is() icinde ID tasir, ozgulluk yetmez */
/* consecutive messages from the same side show the time line only under the last one (the agent "typing" bubble does not count) */
html.widget[data-site="troybet"] :is(.m-me:has(+ .m-me), .m-bot:has(+ .m-bot), .m-agent:has(+ .m-agent:not(#liveTyping)))>.m-meta{display:none}
.m-joined{align-self:center;display:flex;align-items:center;gap:6px;margin:6px 0;font-size:13px;color:var(--text3)}
.m-joined b{color:var(--text);font-weight:600}
html.widget[data-site="troybet"] .feed .m-joined .m-av{display:grid;width:22px;height:22px;font-size:11px}
.m-joined .m-av svg{width:12px;height:12px}
/* unread dot on the Messages tab */
.tabbar button{position:relative}
.tabbar button[data-unread]::after{content:"";position:absolute;top:5px;left:calc(50% + 8px);width:9px;height:9px;border-radius:50%;
  background:#e5484d;border:2px solid #fff}
/* "… is typing": only while the bubble shows three dots (the first chunk removes .typing and the label disappears with it) */
.m-typing-label{display:none;padding-left:4px;font-size:12px;color:var(--text3)}
html.widget[data-site="troybet"] .m:has(>.typing)>.m-typing-label{display:block}
html.widget[data-site="troybet"] .m-box.typing{justify-self:start}  /* the label must not stretch the bubble */
/* card choice: same look as the Home help list — one white card, rows separated by thin rules, arrow on the right;
   "none of these" as a muted last row */
html.widget[data-site="troybet"] .card-choice{flex-direction:column;flex-wrap:nowrap;gap:0;width:min(100%,330px);max-width:none;margin:4px 0;padding:4px;
  background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 22px -14px rgba(14,32,45,.30)}
html.widget[data-site="troybet"] .card-choice button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:42px;
  padding:10px 12px;border:0;border-radius:10px;background:transparent;text-align:left;line-height:1.35}
html.widget[data-site="troybet"] .card-choice button{position:relative}
html.widget[data-site="troybet"] .card-choice button+button::before{content:"";position:absolute;left:12px;right:12px;top:0;height:1px;background:var(--line)}
html.widget[data-site="troybet"] .card-choice .card-pick{font-size:14px;font-weight:500;color:var(--text);border:0;background:transparent}
html.widget[data-site="troybet"] .card-choice .card-pick::after{content:"";flex:none;width:7px;height:7px;margin-right:3px;
  border-top:2px solid var(--brand);border-right:2px solid var(--brand);transform:rotate(45deg)}
html.widget[data-site="troybet"] .card-choice .card-pick:hover:not(:disabled),
html.widget[data-site="troybet"] .card-choice .card-pick:focus-visible{background:var(--surface2);border:0}
html.widget[data-site="troybet"] .card-choice .card-pick.selected{background:var(--surface2);color:var(--brand);font-weight:600}
html.widget[data-site="troybet"] .card-choice .card-pick.dimmed{opacity:.45}
html.widget[data-site="troybet"] .card-choice .card-escape{font-size:13px;font-weight:500;color:var(--text3);border:0;background:transparent}
html.widget[data-site="troybet"] .card-choice .card-escape:hover:not(:disabled){background:var(--surface2);color:var(--text)}
html.widget[data-site="troybet"] .chips{gap:6px}
html.widget[data-site="troybet"] .chips button{font-size:14px;font-weight:600;padding:7px 13px}
html.widget[data-site="troybet"] .ladder{font-size:13px;gap:6px}
html.widget[data-site="troybet"] .ladder button{padding:4px 12px}
/* input: text above, icon row below — attach (opens the menu), mic — small send arrow bottom-right (muted while
   empty); brand-coloured ring on focus */
html.widget[data-site="troybet"] .composer{position:relative;display:grid;grid-template-columns:auto auto 1fr auto;grid-template-areas:"t t t t" "a m . s";
  align-items:center;gap:2px;margin:8px 12px 6px;padding:8px 8px 6px;border:1px solid var(--line2);border-radius:14px;background:#fff;
  box-shadow:0 1px 3px rgba(14,32,45,.06);transition:border-color .15s,box-shadow .15s}
html.widget[data-site="troybet"] .composer:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px rgba(20,117,225,.12)}
html.widget[data-site="troybet"] .composer textarea,html.widget[data-site="troybet"] .composer textarea:focus{grid-area:t;background:transparent;border:0;
  border-radius:0;padding:4px 6px 8px;font-size:14px;line-height:1.4}
html.widget[data-site="troybet"] .attach{grid-area:a}
html.widget[data-site="troybet"] .mic{grid-area:m}
html.widget[data-site="troybet"] .send{grid-area:s}
html.widget[data-site="troybet"] .mic,html.widget[data-site="troybet"] .send{width:32px;height:32px;box-shadow:none}
html.widget[data-site="troybet"] .mic{background:transparent;color:var(--text2)}
@media (hover:hover){html.widget[data-site="troybet"] .mic:hover{background:var(--surface2);color:var(--text)}}
html.widget[data-site="troybet"] .send{background:var(--brand);color:#fff}
html.widget[data-site="troybet"] .send:disabled{background:#e4e9ef;color:#9aabbb;cursor:default;transform:none}
html.widget[data-site="troybet"] .mic svg,html.widget[data-site="troybet"] .send svg{width:18px;height:18px}
html.widget[data-site="troybet"] .send svg{stroke-width:2.3}
html.widget[data-site="troybet"] .attach{width:32px;height:32px;margin:0;border:0;background:transparent;color:var(--text2)}
@media (hover:hover){html.widget[data-site="troybet"] .attach:hover{background:var(--surface2);color:var(--text)}}
html.widget[data-site="troybet"] .attach svg{width:18px;height:18px}
.attach-menu{position:absolute;left:0;bottom:calc(100% + 8px);z-index:6;min-width:220px;padding:6px;border:1px solid var(--line);border-radius:14px;
  background:#fff;box-shadow:0 16px 36px -12px rgba(14,32,45,.35),0 2px 6px rgba(14,32,45,.06)}
.attach-menu button{display:flex;align-items:center;gap:12px;width:100%;padding:12px;border:0;border-radius:10px;background:transparent;
  color:var(--text);font-size:14px;text-align:left}
.attach-menu button:hover,.attach-menu button:focus-visible{background:var(--surface2)}
.attach-menu svg{width:20px;height:20px}
/* footer note 11.44 px */
html.widget[data-site="troybet"] .p-foot{font-size:11.44px;padding:0 16px 8px;background:transparent}
/* bottom tab bar */
html.widget[data-site="troybet"] .tabbar{display:flex;flex:none;gap:4px;padding:6px 10px calc(6px + env(safe-area-inset-bottom,0px));
  background:#fff;border-top:1px solid var(--line);box-shadow:0 -8px 22px -16px rgba(14,32,45,.35)}
.tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 0 5px;border:0;border-radius:12px;
  background:transparent;color:var(--text3);font-size:12px;font-weight:600;letter-spacing:.005em;transition:color .15s,background .15s}
.tabbar svg{width:22px;height:22px;stroke-width:1.8}
.tabbar button:hover{color:var(--text);background:var(--surface2)}
.tabbar button[aria-current]{color:var(--brand)}
.tabbar button[aria-current] svg{stroke-width:2.1;fill:rgba(var(--brand-rgb),.16)}

/* ---------- motion: opening and view changes ----------
   The parent box (parca.js) fades in (opacity only); nothing inside fades on top of it. On a view change Messages slides in;
   Home and Help only fade in (opacity, no movement). Reduced motion turns it off below.
   V42 (19.11 sahip: "iframe'de opacity smooth degil, biraz kasiyor"), measured in Chromium: on open the box fade and an inner
   Home stagger (420 ms) ran on top of each other; on Home/Help changes the entry animations kept fill-mode both, so the next
   fade-out did not run: opacity dropped to .3 in one frame and held there ~165 ms. Now: no inner opening fade, one duration and
   one curve (.22s ease-out) for every fade, entry animations fill backwards only, will-change only during a change. */
/* 18.11 sahip: "opacity yeterli degil, akisa daha uygun olmali; slide in yapmiyoruz" -> gecis yalniz opacity ama BOSLUKSUZ:
   eski gorunum 0'a degil GECIS_TABAN'a (.3) soner, yeni gorunum ayni degerden beklemeden belirir (tek akici solma; arada bos ekran yok).
   Asagidaki gecis keyframe'leri .3'ten baslar (cikisin bittigi deger), boylece degisim aninda titreme olmaz. */
@keyframes view-in{from{opacity:.3;transform:translateX(var(--view-dx,20px))}}
@keyframes view-fade{from{opacity:.3}}
@keyframes parts-in{from{opacity:.3;transform:translateX(8px)}}
@keyframes composer-in{from{opacity:.3;transform:translateY(15px)}}

/* view change (destek.js setView): the old view fades to .3 (.22s ease-out); the new view is shown while still held at .3 and
   one frame later fades in from .3 (.22s ease-out, no delay); Messages: conversation 8 px + input 15 px slide with it (15.11). */
html.widget .panel.view-out[data-next="messages"]>*,
html.widget .panel.view-out:not([data-next="messages"])>:not(.tabbar){opacity:.3;transition:opacity .22s ease-out;will-change:opacity}
html.widget .panel.view-in>*{will-change:opacity}
/* 15.11 sahip: "mesajlar kisminda slide in, ana sayfa ve yardimlarda opacity. Baska bir sey degil." -> Messages keeps parts-in/composer-in;
   Home and Help enter with opacity only (view-fade), no transform.
   18.11 sahip: 80 ms bekleme kalkti (dusuk saydamlikta duraklama akisi kesiyordu); solma cikisin bittigi .3'ten hemen devam eder. */
html.widget .panel.view-in[data-view="home"]>.home{animation:view-fade .22s ease-out backwards}
html.widget .panel.view-in[data-view="help"]>:not(.home):not(.tabbar):not([hidden]):not(:is(.p-head,.feed,.composer)){animation:view-fade .22s ease-out backwards}
html.widget .panel.view-in:not([data-view="home"]):not([data-view="help"])>:not(.home):not(.tabbar):not([hidden]):not(:is(.p-head,.feed,.composer)){animation:view-in .22s ease-out backwards}
html.widget .panel.view-in:is([data-view="messages"],[data-view="help"])>.p-head{animation:view-fade .22s ease-out backwards}
html.widget .panel.view-in[data-view="messages"]>.feed{animation:parts-in .22s ease-out backwards}
html.widget .panel.view-in[data-view="messages"]>.composer{animation:composer-in .22s ease-out backwards}
html.widget .panel.view-in[data-prev="messages"]>.tabbar{animation:view-fade .22s ease-out backwards}
/* ending a live chat asks once ("sure?") inside the strip instead of ending on the first tap */
.live-strip .live-confirm{display:flex;gap:6px;flex-shrink:0}
.live-strip .live-confirm button.danger{border-color:var(--danger);color:var(--danger)}

@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
