/* The live widget frame and native program controls. */

/* the widget frame: fluid, 880:380, the widgets' own ground */
.flw-root {
  position: relative;
  width: 100%;
  aspect-ratio: 880 / 380;
  border-radius: 22px;
  overflow: hidden;
  background: #0f0f0e;
}

/* the live surface; its bitmap is sized from this box x devicePixelRatio by the logic below */
.flw-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  outline: none;
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* keyboard focus: drawn inside the frame so the rounded clip never hides it */
.flw-canvas:focus-visible {
  outline: 2px solid #f5f5f2;
  outline-offset: -5px;
}

/* eye only: the round SIGNAL/01 dot matrix on its own, with its six programs as real buttons */
.flw-eye {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.flw-eye-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}
.flw-eye-stage .flw-canvas { border-radius: 50%; }
.flw-eye-stage .flw-canvas:focus-visible { outline-offset: 4px; }
.flw-try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 312px; /* six programs always break three and three */
  margin: 0;
  padding: 0;
  border: 0;
}
.flw-try-label {
  width: 100%;
  text-align: center;
  font-family: Consolas, "SF Mono", ui-monospace, Menlo, monospace;
  font-size: calc(12px * var(--ts, 1));
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9a9a96;
  margin-bottom: 4px;
}
.flw-try-label b { color: #e5483c; font-weight: 400; }
.flw-chip {
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #34342f;
  background: transparent;
  color: #c9c9c4;
  font-family: Consolas, "SF Mono", ui-monospace, Menlo, monospace;
  font-size: calc(12px * var(--ts, 1));
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .18s ease-out, color .18s ease-out, background-color .18s ease-out, transform .18s ease-out;
}
.flw-chip:hover { border-color: #8f8f8a; color: #f5f5f2; }
.flw-chip:active { transform: translateY(1px); }
.flw-chip:focus-visible { outline: 2px solid #f5f5f2; outline-offset: 2px; }
.flw-chip.on { background: #f5f5f2; border-color: #f5f5f2; color: #0f0f0e; }
@media (prefers-reduced-motion: reduce) { .flw-chip { transition: none; } }
:root[data-ui-motion=reduce] .flw-chip { transition: none; }
:root[data-ui-contrast=more] .flw-chip { border-width: 2px; border-color: #f5f5f2; color: #fff; }
:root[data-ui-contrast=more] .flw-chip.on { color: #0f0f0e; }

/* glass finish: Familiar's Liquid Glass widget look (dark tint, wallpaper softened through it, thin bright rim) */
.flw-eye.flw-glass {
  box-sizing: border-box;
  padding: clamp(18px, 3.2vw, 30px) clamp(18px, 3.2vw, 30px) clamp(20px, 3.4vw, 28px);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .025) 42%, rgba(255, 255, 255, .04)), rgba(16, 14, 15, .42);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, .17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .05), 0 24px 60px rgba(0, 0, 0, .45);
}
.flw-glass .flw-chip { background: rgba(10, 10, 10, .55); border-color: rgba(255, 255, 255, .16); color: #e4e4df; }
.flw-glass .flw-chip:hover { border-color: rgba(255, 255, 255, .42); color: #ffffff; }
.flw-glass .flw-chip.on { background: #f5f5f2; border-color: #f5f5f2; color: #0f0f0e; }
.flw-glass .flw-try-label { color: #d6d6d1; }
@media (prefers-reduced-transparency: reduce) {
  .flw-eye.flw-glass { background: #161617; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .flw-eye.flw-glass { background: Canvas; border-color: CanvasText; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .flw-chip.on { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; }
  .flw-canvas:focus-visible, .flw-chip:focus-visible { outline-color: Highlight; }
  .flw-try-label, .flw-glass .flw-try-label { color: CanvasText; }
}
