/* ================= Tvor — animated guide ================= */
.tvor {
  --tvor-w: 118px;
  --tvor-right: var(--gutter, 24px);
  --tvor-bottom: 0px;
  position: fixed; z-index: 60; right: var(--tvor-right); bottom: var(--tvor-bottom);
  width: var(--tvor-w); pointer-events: none;
  transition: right .8s var(--ease), bottom .8s var(--ease);
}
.tvor-buddy {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  pointer-events: auto; -webkit-tap-highlight-color: transparent;
  transform: translateY(var(--tvor-peek, 58%)); transition: transform .9s var(--ease);
}
.tvor.is-up .tvor-buddy, .tvor-buddy:hover, .tvor-buddy:focus-visible { --tvor-peek: 4%; }
.tvor-buddy:focus-visible { outline: none; }
.tvor-buddy:focus-visible .tvor-fig { filter: drop-shadow(0 0 0 var(--accent)) drop-shadow(0 0 10px rgba(255, 90, 31, .9)); }
.tvor-fig { display: block; aspect-ratio: 450 / 500; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); transform-origin: 50% 100%; }
.tvor-fig svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tvor-fig .tv-tail, .tvor-fig .tv-head, .tvor-fig .tv-all { will-change: transform; }
.tvor-badge-dot { position: absolute; top: 4%; left: 6%; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--ink); opacity: 0; transform: scale(0); transition: opacity .3s, transform .5s var(--ease); }
.tvor.has-news .tvor-badge-dot { opacity: 1; transform: scale(1); animation: tvor-ping 1.8s ease-out infinite; }
@keyframes tvor-ping { 0% { box-shadow: 0 0 0 3px var(--ink), 0 0 0 3px rgba(255, 90, 31, .6); } 100% { box-shadow: 0 0 0 3px var(--ink), 0 0 0 14px rgba(255, 90, 31, 0); } }

/* speech bubble */
.tvor-bubble {
  position: absolute; right: calc(100% - 18px); bottom: calc(100% - 46px); width: min(340px, calc(100vw - var(--tvor-w) - 24px));
  padding: 16px 18px 16px; border-radius: 22px 22px 6px 22px;
  background: var(--paper); color: var(--ink); pointer-events: auto;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .7), 0 0 0 1px rgba(12, 12, 13, .06);
  transform-origin: 100% 100%;
  opacity: 0; transform: translate(10px, 14px) scale(.86); transition: opacity .35s, transform .6s var(--ease);
}
.tvor-bubble.is-open { opacity: 1; transform: none; }
.tvor-bubble[hidden] { display: block !important; visibility: hidden; }
.tvor-bubble::after { content: ""; position: absolute; right: -9px; bottom: 14px; width: 22px; height: 22px; background: inherit; clip-path: polygon(0 0, 100% 60%, 0 100%); }
.tvor-bubble-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(12, 12, 13, .5); }
.tvor-name { color: var(--ink); }
.tvor-name i { font-style: normal; color: rgba(12, 12, 13, .45); }
.tvor-count { margin-left: auto; color: var(--accent); }
.tvor-x { width: 24px; height: 24px; margin: -4px -6px -4px 0; border: 0; border-radius: 50%; background: none; color: rgba(12, 12, 13, .5); font-size: 18px; line-height: 1; cursor: pointer; transition: background .3s, color .3s; }
.tvor-count:empty + .tvor-x { margin-left: auto; }
.tvor-x:hover { background: var(--ink); color: var(--paper); }
.tvor-sr { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tvor-text { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 500; letter-spacing: -.005em; min-height: 1.45em; }
.tvor-text b { font-weight: 700; }
.tvor-text .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: tvor-caret .8s steps(2) infinite; }
@keyframes tvor-caret { 50% { opacity: 0; } }
.tvor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 14px; }
.tvor-actions:empty { display: none; }
.tvor-act { display: inline-flex; align-items: center; gap: 8px; padding: 2px 0; border: 0; background: none; cursor: pointer; font: 600 14px var(--display); color: var(--ink); text-decoration: none; position: relative; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .5s var(--ease), color .3s; }
.tvor-actions.is-in .tvor-act { opacity: 1; transform: none; }
.tvor-act::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.tvor-act:hover::after, .tvor-act:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.tvor-act:focus-visible { outline: none; color: var(--accent); }
.tvor-act--primary { padding: 0; }
.tvor-act--primary b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--ink); font-size: 14px; transition: transform .5s var(--ease); }
.tvor-act--primary:hover b { transform: translateX(3px) rotate(-8deg); }
.tvor-act--primary::after { display: none; }
.tvor-act--muted { color: rgba(12, 12, 13, .5); font-weight: 500; }

/* menu: a typographic list instead of buttons */
.tvor-actions.is-menu { display: grid; gap: 0; margin-top: 10px; }
.tvor-actions.is-menu .tvor-act { justify-content: space-between; width: 100%; padding: 9px 0; font-size: 15px; background: linear-gradient(90deg, rgba(12, 12, 13, .14) 50%, transparent 0) 0 100% / 6px 1px repeat-x; }
.tvor-actions.is-menu .tvor-act::after { display: none; }
.tvor-actions.is-menu .tvor-act span:last-child { font: 500 12px var(--mono); color: rgba(12, 12, 13, .35); transition: transform .5s var(--ease), color .3s; }
.tvor-actions.is-menu .tvor-act:hover span:last-child { transform: translateX(-4px); color: var(--accent); }
.tvor-actions.is-menu .tvor-act--primary { color: var(--accent); }
.tvor-actions.is-menu .tvor-act:last-child { background: none; }

/* spotlight used by the tour */
.tvor-spot {
  position: fixed; left: 0; top: 0; z-index: 55; pointer-events: none; border-radius: 26px;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 9999px rgba(12, 12, 13, .58), 0 0 60px 10px rgba(255, 90, 31, .35);
  opacity: 0; transition: opacity .5s;
}
.tvor-spot.is-on { opacity: 1; }

/* page-specific docking */
.tvor[data-page="kreator"] { --tvor-w: 104px; }
.tvor[data-page="kreator"].on-ticket .tvor-buddy { --tvor-peek: 0%; }
@media (max-width: 980px) {
  .tvor { --tvor-w: 84px; --tvor-right: 10px; }
  .tvor[data-page="kreator"] { --tvor-w: 74px; }
  .tvor-bubble { position: fixed; left: 12px; right: 12px; width: auto; bottom: calc(var(--tvor-bottom) + var(--tvor-w) * 1.05 + 8px); border-radius: 22px 22px 6px 22px; }
  .tvor-bubble::after { right: 34px; bottom: -9px; clip-path: polygon(0 0, 100% 0, 60% 100%); }
  .tvor-text { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .tvor-bubble, .tvor-buddy { transition-duration: .01ms; }
}
@media print { .tvor, .tvor-spot { display: none; } }

/* logo mark */
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark-tvor { width: auto; height: 46px; flex: none; margin: -8px 0 -6px; transform-origin: 50% 100%; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); transition: transform .7s cubic-bezier(.34, 1.56, .64, 1); }
.wordmark:hover .wordmark-tvor { transform: rotate(-8deg) translateY(-2px) scale(1.06); }
.wordmark.wink .wordmark-tvor { animation: tvor-wink 1.1s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes tvor-wink { 0% { transform: none; } 30% { transform: rotate(-16deg) translateY(-3px); } 60% { transform: rotate(8deg); } 100% { transform: none; } }
.loader { align-content: center; }
.loader-tvor { display: block; width: 90px; height: 100px; margin-bottom: 22px; transform-origin: 50% 100%; animation: tvor-bob 1.4s ease-in-out infinite; }
.curtain-tvor { display: block; width: 90px; height: 100px; margin: 0 auto 16px; }
@keyframes tvor-bob { 50% { transform: translateY(-6px) rotate(-4deg) scale(1.02, .98); } }
