/* Live-demo dialog: a browser frame around the app */
html.live-lock { overflow: hidden; }
html.live-lock.live-lock-gutter { scrollbar-gutter: stable; }
.live { width: 92vw; height: 86vh; max-width: 1600px; max-height: none; padding: 0; border: 1px solid var(--ink); border-radius: 14px;
  background: var(--paper-2); color: var(--ink); display: none; flex-direction: column; overflow: hidden;
  box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--ink) 60%, transparent); }
.live[open] { display: flex; animation: live-in .35s var(--ease); }
.live::backdrop { background: rgba(0, 0, 0, .45); background: color-mix(in srgb, var(--curtain) 62%, transparent); backdrop-filter: blur(3px); }
@keyframes live-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.live-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--paper-3); }
.live-dots { display: inline-flex; gap: 6px; padding: 0 4px; }
.live-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.live-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 17px; white-space: nowrap; }
.live-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--paper-2); font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.live-url svg { flex: none; width: 12px; height: 12px; fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.live-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 999px; font-size: 14px; color: var(--ink); transition: background .25s; white-space: nowrap; }
.live-btn:hover { background: var(--accent-soft); }
.live-open { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.live-reload span { font-size: 18px; line-height: 1; }
.live-note { margin: 0; padding: 8px 16px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); background: var(--accent-soft); }
.live-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.live-view { position: relative; flex: 1; min-height: 0; background: var(--paper-2); }
.live-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--paper-2); }
.live-loading { position: absolute; inset: 0; z-index: 1; display: none; flex-direction: row; align-items: center; justify-content: center; gap: 10px;
  background: var(--paper); font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink-3); }
.live-view.is-loading .live-loading { display: flex; }
/* Loading state after beautifului.dev (MIT, see assets/css/bui.css): a 3 × 3 pixel grid whose cells blink in a
   staggered wave, the label under a moving shimmer, and the true elapsed time in tabular figures. */
.live-pix { flex: none; display: grid; grid-template-columns: repeat(3, 5px); gap: 2px; }
.live-pix i { width: 5px; height: 5px; border-radius: 1px; background: var(--accent); opacity: .15; animation: live-pix .65s ease-in-out infinite; }
.live-pix i:nth-child(1), .live-pix i:nth-child(5), .live-pix i:nth-child(7) { animation-delay: 90ms; }
.live-pix i:nth-child(2), .live-pix i:nth-child(6), .live-pix i:nth-child(8) { animation-delay: 180ms; }
.live-pix i:nth-child(3), .live-pix i:nth-child(9) { animation-delay: 270ms; }
.live-pix i:nth-child(4) { animation-delay: 0ms; }
@keyframes live-pix { 0%, 100% { opacity: .15; } 18%, 42% { opacity: 1; } 62% { opacity: .15; } }
.live-loading-t { color: transparent; background: linear-gradient(90deg, var(--ink-3) 35%, var(--ink) 50%, var(--ink-3) 65%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; animation: live-shimmer 1.4s linear infinite; }
@keyframes live-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.live-el { min-width: 4.5ch; font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
/* Streamlit's shell has loaded but the app hasn't drawn yet: a slim line along the top, never in the way. */
.live-wake { position: absolute; z-index: 2; left: 0; right: 0; top: 0; margin: 0; display: flex; align-items: center; gap: 10px; padding: 7px 14px;
  border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--paper-2) 92%, transparent); pointer-events: none;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--ink-2); overflow: hidden; }
.live-wake[hidden] { display: none; }
.live-wake-i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: live-wake 1.2s var(--ease) infinite alternate; }
.live-wake-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes live-wake { from { opacity: .25; } to { opacity: 1; } }
@media (max-width: 700px) {
  .live { width: 100vw; height: 100vh; height: 100dvh; max-width: none; border: 0; border-radius: 0; margin: 0; }
  .live-dots, .live-url { display: none; }
  /* The tool's name, not its address: the address is one tap away in "open in a new tab". */
  .live-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 16px; padding-left: 4px; }
  .live-bar { gap: 6px; padding: 8px; }
  .live-btn { min-width: 40px; height: 40px; }
  .live-open { font-size: 0; padding: 0 8px; }
  .live-open span { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .live[open] { animation: none; } .live-pix i { animation: none !important; opacity: .55; } .live-loading-t { animation: none !important; color: var(--ink-2); background: none; } .live-wake-i { animation: none; } }
