/* Launcher refinements. Keep the existing library, editor and red/black identity. */
:root { color-scheme: dark; --tb-muted: #929292; --tb-line: #292929; --tb-ease: cubic-bezier(.22, 1, .36, 1); }
body { padding: clamp(24px, 5vh, 56px) 28px 36px; }
.tb-wrap { max-width: 744px; min-width: 0; }
.hero-block { margin-bottom: 24px; }
.tb-logo { font-size: clamp(42px, 6vw, 58px); font-weight: 500; letter-spacing: 1px; line-height: 1.08; }
.logo-dot { cursor: pointer; }
.logo-dot span { transition: color 180ms; }
.logo-dot:hover span { color: #ff7470; }
.tb-sub { color: var(--tb-muted); letter-spacing: .015em; margin-top: 14px; border-left: 0; padding-left: 0; line-height: 1.8; }
.launcher-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 14px; }
.launcher-nav a, .launcher-nav button, button.link-tools { color: #a0a0a0; font: 11px 'DM Mono', monospace; text-decoration: none; border: 0; background: transparent; padding: 4px 0; cursor: pointer; transition: color 160ms; }
.launcher-nav span { color: #696969; display: inline-block; margin-left: 3px; transition: transform 180ms var(--tb-ease); }
.launcher-nav a:hover, .launcher-nav button:hover, button.link-tools:hover { color: #e8e8e8; }
.launcher-nav a:hover span, .launcher-nav button:hover span { transform: translate(2px, -1px); color: #e24b4a; }
.composer { gap: 12px; min-width: 0; }
.composer-section { min-width: 0; }
.composer-section { padding: 18px; border: 1px solid #252525; border-radius: 8px; background: #111; box-shadow: none; transition: border-color 200ms; }
.composer-section:focus-within { border-color: #3b3b3b; }
.section-heading { align-items: center; margin-bottom: 14px; gap: 14px; }
.section-heading label, .section-heading .condition-label { font-size: 11px; color: #b2b2b2; letter-spacing: .1em; }
.section-title-row { gap: 10px; }
.step-badge { height: 22px; min-width: 28px; border: 1px solid #e24b4a35; color: #f07975; background: #211313; }
.section-note { color: #909090; font-size: 11px; margin-top: 8px; letter-spacing: 0; }
.field-count { color: #939393; font-size: 10px; font-variant-numeric: tabular-nums; }
.field-meta { gap: 10px; }
.message-kind { letter-spacing: .03em; font-size: 9px; }
.field label, .condition-label { color: #b0b0b0; font-size: 10px; letter-spacing: .08em; }
.field textarea, .composer-section > textarea, .input-wrap textarea, .input-wrap input[type='text'], .field input[type='text'], .field select { background: #151515; border: 1px solid #303030; padding: 12px 40px 12px 13px; font-size: 13px; border-radius: 5px; transition: border-color 180ms, background 180ms; }
.composer-section > .input-wrap textarea, .composer-section > textarea { min-height: 124px; line-height: 1.7; }
.field textarea::placeholder, .composer-section > textarea::placeholder, .input-wrap textarea::placeholder, .input-wrap input::placeholder, .field input::placeholder { color: #828282; }
.input-wrap textarea:focus, .input-wrap input:focus, .field select:focus { border-color: #a85654; background: #171515; }
.clear-input-btn { top: 10px; right: 9px; color: #a0a0a0; border-color: #333; background: #191919; opacity: .65; }
.input-wrap:hover .clear-input-btn, .input-wrap:focus-within .clear-input-btn { opacity: 1; }
.condition-tabs { gap: 7px; margin-bottom: 12px; }
.tab-btn { min-height: 58px; padding: 11px 10px; border: 1px solid #303030; color: #bababa; border-radius: 5px; letter-spacing: 0; font-size: 11px; transition: background 180ms, color 180ms, border-color 180ms; }
.tab-desc { color: #8d8d8d; font-size: 9px; letter-spacing: 0; margin-top: 6px; }
.tab-btn:not(.active):hover { color: #f0f0f0; background: #191919; border-color: #494949; }
.tab-btn.active { color: #ff8a83; background: #251515; border-color: #a545424d; }
.tab-btn.active .tab-desc { color: #c58f8b; }
.condition-editor { padding: 14px; border: 1px solid #282828; border-left: 2px solid #a64b49; border-radius: 5px; min-height: 154px; background: #0e0e0e; }
.condition-panel.active { animation: condition-in 220ms var(--tb-ease) both; }
.field-hint { color: #959595; font-size: 10px; letter-spacing: 0; line-height: 1.65; margin-top: 10px; overflow-wrap: anywhere; }
.preset-row { gap: 7px; margin-top: 9px; }
.preset-btn { min-width: 45px; min-height: 29px; color: #a7a7a7; border: 1px solid #303030; border-radius: 4px; background: #161616; }
.preset-btn:hover { color: #f0d1cd; border-color: #794240; background: #231616; }
.action-row { grid-template-columns: 1fr 130px; gap: 12px; margin-top: 2px; }
.submit-btn { min-height: 48px; border-radius: 5px; letter-spacing: 2.5px; transition: background 180ms, transform 180ms var(--tb-ease); }
.submit-btn:hover { opacity: 1; background: #fff; transform: translateY(-1px); }
.submit-btn:active { opacity: 1; transform: translateY(1px); }
.submit-btn:disabled { cursor: wait; opacity: .55; transform: none; }
.secondary-btn { color: #b5b5b5; border: 1px solid #333; border-radius: 5px; font-size: 11px; }
#open-library-btn { display: flex; justify-content: center; align-items: center; gap: 14px; text-transform: none; }
#open-library-btn span { color: #747474; transition: transform 180ms var(--tb-ease); }
#open-library-btn:hover span { color: #e24b4a; transform: translate(2px, -2px); }
.launcher-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #898989; font-size: 9px; padding: 2px 1px; min-height: 24px; }
.shortcut-note { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.meta-dot { margin: 0 4px; color: #535353; }
kbd { color: #b5b5b5; font: 9px 'DM Mono', monospace; border: 1px solid #343434; border-bottom-width: 2px; border-radius: 3px; padding: 2px 4px; }
.output-box.visible { animation: condition-in 260ms var(--tb-ease) both; border-color: #484848; }
.output-label, .copy-hint { color: #a0a0a0; }
.view { transition: opacity 180ms ease; }
.tb-wrap { animation: launcher-in 450ms var(--tb-ease) both; }
.tb-drawer { visibility: hidden; transition: transform 280ms var(--tb-ease), opacity 180ms ease, visibility 280ms; }
.tb-drawer.open { visibility: visible; }
.drawer-open { overflow: hidden; }
.drawer-title { color: #e8e8e8; }
.drawer-search::placeholder, .drawer-key-switch input::placeholder { color: #858585; }
.drawer-search, .drawer-sort, .drawer-clear, .drawer-close, .drawer-key-copy { color: #adadad; }
.drawer-empty { color: #a2a2a2; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #d47771; outline-offset: 3px; }
.flatpickr-calendar { font-family: 'DM Mono', monospace; background: #191919; border: 1px solid #3a3a3a; border-radius: 6px; box-shadow: 0 12px 36px #0008; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months, .flatpickr-weekdays, span.flatpickr-weekday { background: #191919; color: #bbb; }
.flatpickr-current-month input.cur-year, .flatpickr-day, .flatpickr-time input, .flatpickr-time .flatpickr-am-pm { color: #ddd; }
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: #747474; }
.flatpickr-day:hover, .flatpickr-day:focus, .flatpickr-time input:hover, .flatpickr-time input:focus, .flatpickr-time .flatpickr-am-pm:hover { background: #303030; border-color: #303030; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: #b94341; border-color: #b94341; color: #fff; }
.flatpickr-day.today { border-color: #a26460; }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { fill: #bbb; }
.flatpickr-calendar.hasTime .flatpickr-time { border-top-color: #333; }
.flatpickr-calendar.arrowTop::before, .flatpickr-calendar.arrowTop::after { border-bottom-color: #333; }
@keyframes launcher-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes condition-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 601px) and (max-height: 820px) {
  body { padding-top: 22px; padding-bottom: 24px; }
  .hero-block { margin-bottom: 18px; }
  .tb-logo { font-size: 50px; }
  .tb-sub { font-size: 11px; margin-top: 8px; line-height: 1.65; }
  .launcher-nav { margin-top: 8px; }
  .composer { gap: 10px; }
  .composer-section { padding: 13px; }
  .section-heading { margin-bottom: 10px; }
  .section-note { display: none; }
  .composer-section > .input-wrap textarea, .composer-section > textarea { min-height: 96px; height: 96px; }
  .tab-btn { min-height: 48px; padding: 8px 10px; }
  .tab-desc { margin-top: 4px; }
  .condition-tabs { margin-bottom: 10px; }
  .condition-editor { padding: 11px; min-height: 144px; }
  .field-hint { margin-top: 7px; }
  .preset-row { margin-top: 7px; }
  .preset-btn { min-height: 26px; }
}
@media (max-width: 600px) {
  body { padding: 24px 16px 28px; }
  .hero-block { margin-bottom: 20px; }
  .tb-logo { font-size: clamp(36px, 10vw, 48px); }
  .tb-sub { font-size: 11px; }
  .launcher-nav { gap: 17px; margin-top: 12px; }
  .launcher-nav a, .launcher-nav button { font-size: 10px; }
  .composer-section { padding: 14px; }
  .condition-tabs { display: grid; grid-template-columns: repeat(5, minmax(108px, 1fr)); overflow-x: auto; padding-bottom: 7px; scrollbar-width: thin; scrollbar-color: #444 transparent; }
  .tab-btn { white-space: normal; }
  .condition-editor { padding: 12px; }
  .action-row { grid-template-columns: 1fr 110px; gap: 10px; }
  .launcher-meta { font-size: 8px; gap: 10px; }
  .shortcut-note { display: none; }
  .section-heading { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
