/* ../public/stylesheets/tokens.css */
@font-face {
  font-family: "D-DIN";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/html5/bin/assets/D-DIN.woff) format("woff");
}
:root {
  --surface-app: #091726;
  --surface-panel: #2e3440;
  --surface-card: #434c5e;
  --surface-elevated: #4c566a;
  --surface-tooltip: #161E2C;
  --surface-node: #3b4252;
  --fg-1: #FFFFFF;
  --fg-2: #eceff4;
  --fg-3: #88c0d0;
  --fg-4: #666666;
  --fg-muted: #A6B0C0;
  --fg-dim: #8992A3;
  --fg-faint: #6E7889;
  --accent-primary: #74b9ff;
  --accent-secondary: #88c0d0;
  --accent-warm: #fdcb6e;
  --accent-success: #00b894;
  --accent-error: #e17055;
  --accent-focus: #00AAFF;
  --tier-indie: #fdcb6e;
  --tier-student: #21D4FD;
  --tier-teacher: #28A745;
  --type-number: #A9B5CC;
  --type-text: #AC8BF6;
  --type-list: #A0E96A;
  --type-any: #C0C0C0;
  --font-ui:
    "D-DIN",
    system-ui,
    sans-serif;
  --font-mono:
    ui-monospace,
    "JetBrains Mono",
    "Menlo",
    "Consolas",
    monospace;
  --r-button: 4px;
  --r-panel: 5px;
  --r-card: 4px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 13px;
  --text-lg: 15px;
  --shadow-float: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-window: 0 12px 32px rgba(0,0,0,0.45);
  --shadow-sheet: 0 24px 48px rgba(0,0,0,0.42);
  --z-window: 10100;
  --z-toast: 10200;
  --z-popover: 10300;
  --z-shield: 10400;
  --z-status: 10450;
  --z-sheet: 10500;
  --z-tooltip: 10600;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --modal-titlebar-bg: #262b35;
  --modal-titlebar-bdr: #1b2028;
  --modal-rail-bg: #262b35;
  --modal-rail-bdr: #353c4a;
  --modal-code-bg: #0f1620;
  --modal-code-gutter-bg: #0c1219;
  --modal-code-gutter-bdr:#1b2230;
  --modal-comment: #5e6b80;
  --modal-gutter-num: #3e4a5e;
  --modal-msg-idle-bg: #1a2230;
  --modal-msg-idle-bdr: #2a3344;
  --modal-msg-success-bg: #152a23;
  --modal-msg-success-bdr:#1f4a3a;
  --modal-msg-success-fg: #a7e0c9;
  --modal-msg-error-bg: #2a1916;
  --modal-msg-error-bdr: #5a2d24;
  --modal-msg-error-fg: #f4baa7;
  --modal-active-line: rgba(116, 185, 255, 0.06);
  --modal-scrollbar: #4c566a;
  --modal-scrollbar-hov: #5e6b80;
  --modal-toolbar-bg: #2a303c;
  --modal-toolbar-bdr: #353c4a;
  --modal-toolbar-btn-bg: #434c5e;
  --modal-toolbar-btn-bdr: #4c566a;
  --modal-toolbar-btn-bg-hv: #3b4453;
  --modal-tpl-menu-bg: #262b35;
  --modal-tpl-menu-bdr: #4c566a;
  --modal-tpl-row-hover: rgba(255, 255, 255, 0.03);
  --modal-tpl-row-selected: rgba(116, 185, 255, 0.12);
  --modal-tpl-desc-fg: #88a0b8;
  --modal-help-text: #cbd3df;
  --modal-help-tag-bg: #2a3344;
  --modal-help-kbd-bg: #1a2230;
  --modal-help-kbd-bdr: #353c4a;
  --modal-help-kbd-fg: #cbd3df;
  --modal-help-active-bg: rgba(253, 203, 110, 0.12);
  --modal-shadow: var(--shadow-window), 0 0 0 1px rgba(0,0,0,0.3);
}
.flowlab :focus-visible {
  outline: 1px solid var(--accent-focus);
  outline-offset: 1px;
}

/* src/primitives.css */
.flui-tooltip {
  position: fixed;
  background: var(--surface-tooltip);
  color: var(--fg-1);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  padding: 5px 9px;
  border-radius: var(--r-button);
  z-index: var(--z-tooltip);
  pointer-events: none;
}
.flui-tooltip::after {
  content: "";
  position: absolute;
  top: calc(100% - 1px);
  left: var(--tip-arrow-x, 50%);
  margin-left: -10px;
  border: 10px solid transparent;
  border-top-color: var(--surface-tooltip);
  border-bottom: none;
}
.flui-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--r-button);
  align-self: center;
}
.flui-button {
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: var(--r-button);
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.flui-button-primary {
  background: var(--accent-primary);
  color: var(--fg-1);
}
.flui-button-secondary {
  background: var(--surface-card);
  color: var(--fg-2);
}
.flui-button.fl-disabled,
.flui-button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* src/toast.css */
#flowlab-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 8px);
  background: var(--surface-node);
  border-radius: var(--r-button);
  box-shadow: var(--shadow-float);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  z-index: var(--z-toast);
  opacity: 0;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}
#flowlab-toast.fl-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}
#flowlab-toast .fl-msg {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--fg-1);
  white-space: nowrap;
}
#flowlab-toast.fl-subtle {
  height: 34px;
  box-shadow: none;
}
#flowlab-toast.fl-notice {
  height: 40px;
}
#flowlab-toast .fl-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--accent-success);
  flex: 0 0 auto;
}

/* src/save_status.css */
#flowlab-status {
  position: fixed;
  right: 14px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: var(--z-status);
  font-family: var(--font-ui);
  user-select: none;
}
.fls-chip {
  height: 26px;
  border-radius: var(--r-button);
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  position: relative;
  transition: background-color 180ms cubic-bezier(.4, 0, .2, 1), border-color 180ms cubic-bezier(.4, 0, .2, 1);
  border: 1px solid transparent;
  cursor: default;
}
.fls-chip .fls-icon {
  width: 11px;
  height: 11px;
  display: inline-flex;
  flex: 0 0 auto;
}
.fls-chip .fls-icon svg {
  width: 100%;
  height: 100%;
}
.fls-label {
  transition: opacity 120ms cubic-bezier(.4, 0, .2, 1);
}
.fls-dot {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: var(--accent-primary);
  flex: 0 0 auto;
  animation: fls-pulse 1.6s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes fls-pulse {
  0% {
    opacity: .35;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: .35;
  }
}
.fls-glow::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 10px;
  background:
    radial-gradient(
      closest-side,
      rgba(225, 112, 85, .35),
      transparent);
  animation: fls-glow 400ms cubic-bezier(.4, 0, .2, 1) forwards;
  pointer-events: none;
}
@keyframes fls-glow {
  0% {
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.fls-chip.fls-mini {
  padding: 0;
  width: 26px;
  justify-content: center;
}
.fls-chip.fls-mini .fls-label {
  display: none;
}
.fls-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #1F2733;
  background: var(--accent-primary);
  cursor: pointer;
  flex: 0 0 auto;
  position: relative;
}
.fls-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.fls-avatar.fls-ghost {
  background: none;
  border: 1px dashed rgba(116, 185, 255, .6);
  color: var(--accent-primary);
}
.fls-avatar .fls-icon {
  width: 13px;
  height: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fls-avatar .fls-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.fls-avatar.fls-remembered {
  background: none;
  border: 1px dotted rgba(116, 185, 255, .7);
}
.fls-avatar.fls-remembered .fls-hint-initial {
  color: var(--accent-primary);
  opacity: .45;
  font-size: var(--text-sm);
  font-weight: 700;
}
.fls-login {
  color: var(--accent-primary);
  font-size: var(--text-sm);
  cursor: pointer;
  text-decoration: none;
}
a.fls-login:hover {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fls-login.fls-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fls-tip {
  max-width: 260px;
  line-height: 1.55;
  padding: 8px 10px;
}
#fls-shield {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: var(--z-shield);
}
#fls-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 46px;
  height: 34px;
  background: rgba(236, 239, 244, .12);
  backdrop-filter: blur(2px);
  color: var(--fg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  z-index: calc(var(--z-status) + 1);
  transition: opacity 180ms cubic-bezier(.4, 0, .2, 1);
}
#fls-pop {
  position: fixed;
  background: var(--surface-node);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-float);
  padding: 14px;
  z-index: var(--z-popover);
  font-family: var(--font-ui);
  min-width: 200px;
}
.fls-pop-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
}
.fls-pop-name {
  font-size: var(--text-lg);
  color: var(--fg-2);
}
.fls-pop-tier {
  border: 1px solid;
  margin-left: 2px;
}
.fls-pop-note {
  font-size: var(--text-sm);
  color: var(--fg-dim);
  margin: 2px 0 8px;
}
.fls-pop-item {
  display: flex;
  align-items: center;
  height: 30px;
  font-size: var(--text-md);
  color: var(--fg-muted);
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--r-button);
  padding: 0 8px;
}
.fls-pop-item:hover {
  background: rgba(255, 255, 255, .06);
  color: var(--fg-2);
}
#fls-sheet-back {
  position: fixed;
  inset: 0;
  background: rgba(23, 27, 33, .55);
  z-index: var(--z-sheet);
  animation: fls-fade 160ms cubic-bezier(.4, 0, .2, 1);
}
@keyframes fls-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
#fls-sheet {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 352px;
  max-width: calc(100vw - 40px);
  transform: translate(-50%, -50%);
  background: var(--surface-node);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-sheet);
  padding: 18px;
  z-index: calc(var(--z-sheet) + 1);
  font-family: var(--font-ui);
  animation: fls-rise 220ms cubic-bezier(.4, 0, .2, 1);
}
@keyframes fls-rise {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
.fls-sheet-title {
  font-size: var(--text-lg);
  color: var(--fg-2);
  margin-bottom: 8px;
}
.fls-sheet-body {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--fg-muted);
  margin-bottom: 14px;
}
.fls-sheet-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.fls-sheet-hint {
  font-size: var(--text-xs);
  color: var(--fg-dim);
  margin-top: 10px;
}
.fls-sheet-hint a {
  color: var(--accent-primary);
}
#fls-return {
  position: fixed;
  right: 14px;
  bottom: 46px;
  width: 300px;
  background: var(--surface-node);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-float);
  padding: 14px;
  z-index: calc(var(--z-status) + 2);
  font-family: var(--font-ui);
}
.fls-return-title {
  font-size: var(--text-md);
  color: var(--fg-2);
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 6px;
}
.fls-return-title .fls-icon {
  width: 12px;
  height: 12px;
  color: var(--accent-success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fls-return-title .fls-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.fls-return-body {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.fls-return-dismiss {
  font-size: var(--text-sm);
  color: var(--accent-primary);
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .fls-chip,
  .fls-label {
    transition: none;
  }
  .fls-dot {
    animation: none;
    opacity: 1;
  }
  .fls-glow::after {
    animation: none;
    opacity: 0;
  }
}

/* src/history.css */
#flowlab-history {
  position: fixed;
  width: 420px;
  max-height: 560px;
  background: var(--surface-panel);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-window);
  font-family: var(--font-ui);
  z-index: var(--z-window);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 140ms ease-out;
  user-select: none;
  overflow: hidden;
}
#flowlab-history.fl-shown {
  opacity: 1;
}
#flowlab-history *,
#flowlab-history {
  box-sizing: border-box;
}
.flh-titlebar {
  height: 36px;
  background: #262c37;
  border-radius: var(--r-panel) var(--r-panel) 0 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: move;
  flex: 0 0 auto;
}
.flh-title {
  flex: 1;
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
}
.flh-objname {
  font-size: var(--text-xs);
  color: var(--fg-dim);
  margin-right: 10px;
}
.flh-close {
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: var(--text-md);
  color: var(--fg-3);
  cursor: pointer;
}
.flh-close.fl-disabled {
  color: var(--surface-elevated);
  cursor: default;
}
.flh-list {
  overflow-y: auto;
  padding: 8px 0;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
}
.flh-list::-webkit-scrollbar {
  width: 4px;
}
.flh-list::-webkit-scrollbar-track {
  background: var(--surface-node);
  border-radius: 2px;
}
.flh-list::-webkit-scrollbar-thumb {
  background: var(--surface-elevated);
  border-radius: 2px;
}
.flh-row {
  width: 100%;
  height: 52px;
  padding: 8px 12px;
  display: flex;
  cursor: pointer;
  position: relative;
  transition: background-color 120ms ease-out;
}
.flh-row:hover {
  background: rgba(76, 86, 106, 0.5);
}
.flh-row.fl-selected {
  background: var(--surface-card);
}
.flh-row.fl-current {
  cursor: default;
}
.flh-row.fl-current:hover {
  background: none;
}
.flh-row.fl-dim {
  opacity: 0.45;
}
.flh-gutter {
  flex: 0 0 10px;
  margin-right: 10px;
  position: relative;
}
.flh-dot {
  width: 9px;
  height: 9px;
  border-radius: 5px;
  position: absolute;
  top: 4px;
}
.flh-dot.fl-filled {
  background: var(--accent-primary);
}
.flh-dot.fl-open {
  border: 1px solid #8890B2;
}
.flh-dot.fl-applying {
  border: 1px solid var(--accent-primary);
}
.flh-spine {
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: -16px;
  width: 1px;
  background: var(--surface-elevated);
}
.flh-col {
  flex: 1;
  min-width: 0;
}
.flh-line {
  display: flex;
  align-items: baseline;
  height: 18px;
  line-height: 18px;
}
.flh-time {
  flex: 1;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--fg-2);
  position: relative;
}
.flh-time.fl-current-time {
  color: var(--fg-1);
}
.flh-trigger {
  font-size: var(--text-xs);
}
.flh-size {
  flex: 1;
  font-size: var(--text-xs);
  color: var(--fg-3);
}
.flh-delta {
  font-size: var(--text-xs);
}
.flh-chip {
  color: var(--accent-primary);
  background: rgba(116, 185, 255, 0.15);
}
.flh-progress {
  width: 132px;
  height: 3px;
  border-radius: 2px;
  background: var(--surface-node);
  overflow: hidden;
  align-self: center;
}
.flh-progress > div {
  height: 100%;
  background: var(--accent-primary);
  width: 0%;
  transition: width 500ms ease-out;
}
.flh-terminal {
  font-size: var(--text-xs);
  line-height: 16px;
  color: var(--fg-dim);
  padding: 6px 12px 2px 32px;
}
.flh-preview {
  height: 96px;
  margin: 0 12px 8px;
  flex: 0 0 auto;
}
.flh-footer {
  padding: 12px;
  border-top: 1px solid #262c37;
  flex: 0 0 auto;
}
.flh-hint {
  font-size: var(--text-xs);
  line-height: 16px;
  color: var(--fg-dim);
}
.flh-devnote {
  font-size: var(--text-xs);
  line-height: 16px;
  color: #8890B2;
}
.flh-btnrow {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.flh-btn-restore {
  flex: 1;
}
.flh-empty {
  padding: 20px 20px 4px;
}
.flh-empty-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--fg-1);
}
.flh-empty-body {
  font-size: var(--text-md);
  line-height: 20px;
  color: var(--fg-2);
  margin-top: 10px;
}
.flh-empty-hint {
  font-size: var(--text-md);
  line-height: 20px;
  color: var(--fg-dim);
  margin-top: 12px;
}

/* src/index.css */
