  #fb-btn {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000;
    height: 46px; border-radius: 0;
    background: #7c3aed; color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: 0 13px;
    box-shadow: 0 3px 12px rgba(124,58,237,.45);
    transition: background .18s, box-shadow .18s, padding .22s;
    overflow: hidden; white-space: nowrap;
  }
  #fb-btn:hover { background: #6d28d9; box-shadow: 0 4px 18px rgba(109,40,217,.55); }
  #fb-btn svg { pointer-events: none; flex-shrink: 0; }
  #fb-btn-label {
    max-width: 0; overflow: hidden;
    font-size: .82rem; font-weight: 600; letter-spacing: .01em;
    transition: max-width .22s ease, opacity .18s;
    opacity: 0;
  }
  #fb-btn:hover #fb-btn-label { max-width: 220px; opacity: 1; }

  /* Notes mode — green */
  #fb-btn.notes-mode { background: #059669; box-shadow: 0 3px 12px rgba(5,150,105,.42); }
  #fb-btn.notes-mode:hover { background: #047857; box-shadow: 0 4px 18px rgba(4,120,87,.52); }

  /* Tab bar */
  .fb-tabs { display: none; flex-direction: row; gap: 0; margin: -.2rem -1.8rem .9rem; padding: 0 1.8rem; border-bottom: 2px solid #f0f0f0; }
  .fb-tabs.visible { display: flex; }
  .fb-tab-btn { flex: 1; padding: .52rem .8rem; border: none; background: none; font-size: .87rem; font-weight: 600; cursor: pointer; font-family: inherit; color: #9ca3af; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .12s, border-color .12s; }
  .fb-tab-btn.active { color: #111827; }
  .fb-tab-btn-notes.active    { border-bottom-color: #059669; }
  .fb-tab-btn-feedback.active { border-bottom-color: #7c3aed; }

  /* Notes panel */
  #fb-tab-notes { display: none; }
  #fb-modal.notes-active #fb-tab-notes { display: block; }
  #fb-modal.notes-active #fb-title,
  #fb-modal.notes-active #fb-sub,
  #fb-modal.notes-active #fb-img-preview-wrap,
  #fb-modal.notes-active .fb-cats,
  #fb-modal.notes-active #fb-moods-row,
  #fb-modal.notes-active #fb-msg,
  #fb-modal.notes-active .fb-modifier,
  #fb-modal.notes-active .fb-attach-section,
  #fb-modal.notes-active .fb-btns,
  #fb-modal.notes-active #fb-status { display: none !important; }

  /* Interp panel (admin) */
  #fb-tab-interp { display: none; }
  #fb-modal.interp-active #fb-tab-interp { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
  #fb-modal.interp-active #fb-tab-notes { display: none; }
  #fb-modal.interp-active #fb-title,
  #fb-modal.interp-active #fb-sub,
  #fb-modal.interp-active #fb-img-preview-wrap,
  #fb-modal.interp-active .fb-cats,
  #fb-modal.interp-active #fb-moods-row,
  #fb-modal.interp-active #fb-msg,
  #fb-modal.interp-active .fb-modifier,
  #fb-modal.interp-active .fb-attach-section,
  #fb-modal.interp-active .fb-btns,
  #fb-modal.interp-active #fb-status { display: none !important; }

  /* Inline interp editor styles */
  .ipi-toolbar { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; padding:.55rem 0 .7rem; border-bottom:1px solid #e5e7eb; margin-bottom:.8rem; flex-shrink:0; }
  .ipi-toolbar span { font-size:.8rem; color:#6b7280; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .ipi-btn { font-size:.8rem; font-weight:600; border:1px solid #d1d5db; background:#f9fafb; color:#374151; border-radius: 0; padding:.28rem .7rem; cursor:pointer; font-family:inherit; flex-shrink:0; }
  .ipi-btn:hover { background:#f3f4f6; }
  .ipi-btn-save { background:#4f46e5; color:#fff; border-color:#4338ca; }
  .ipi-btn-save:hover { background:#4338ca; }
  .ipi-flash { font-size:.78rem; font-weight:600; color:#065f46; display:none; }
  .ipi-flash.on { display:inline; }
  .ipi-loading { padding:2rem 1rem; text-align:center; font-size:.88rem; color:#9ca3af; }
  .ipi-no-run { background:#fff7ed; border:1px solid #fed7aa; border-radius: 0; padding:.75rem 1rem; color:#92400e; font-size:.84rem; margin:.5rem 0; }
  .ipi-empty { text-align:center; padding:1.5rem; color:#9ca3af; font-size:.85rem; }
  .ipi-section { background:#fff; border:1px solid #e5e7eb; border-radius: 0; padding:.9rem 1rem; margin-bottom:.7rem; box-shadow:0 1px 3px rgba(0,0,0,.05); }
  .ipi-section-head { display:flex; gap:.4rem; margin-bottom:.65rem; }
  .ipi-section-fields { flex:1; min-width:0; display:flex; flex-direction:column; gap:.45rem; }
  .ipi-section-acts { display:flex; flex-direction:column; gap:.2rem; flex-shrink:0; }
  .ipi-row { display:flex; gap:.5rem; flex-wrap:wrap; }
  .ipi-row > * { flex:1 1 160px; min-width:0; }
  .ipi-lbl { font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#9ca3af; margin-bottom:.15rem; }
  .ipi-input { width:100%; box-sizing:border-box; border:1px solid #d1d5db; border-radius: 0; padding:.3rem .45rem; font-size:.84rem; font-family:inherit; color:#111827; }
  .ipi-input:focus { outline:none; border-color:#6366f1; box-shadow:0 0 0 2px #e0e7ff; }
  .ipi-textarea { width:100%; box-sizing:border-box; height:130px; resize:vertical; border:1px solid #d1d5db; border-radius: 0; padding:.35rem .5rem; font-size:.82rem; font-family:monospace; line-height:1.5; color:#111827; }
  .ipi-textarea:focus { outline:none; border-color:#6366f1; box-shadow:0 0 0 2px #e0e7ff; }
  .ipi-bsm { font-size:.74rem; border:1px solid #d1d5db; background:#f9fafb; color:#374151; border-radius: 0; padding:.15rem .38rem; cursor:pointer; font-family:inherit; }
  .ipi-bsm:hover { background:#fee2e2; color:#991b1b; border-color:#fca5a5; }
  .ipi-bsm:disabled { opacity:.35; pointer-events:none; }
  .ipi-bsm-del { background:#fee2e2; color:#991b1b; border-color:#fca5a5; }
  .ipi-ss-grid { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.4rem; }
  .ipi-ss-thumb { position:relative; cursor:pointer; border-radius: 0; overflow:hidden; border:2px solid transparent; flex-shrink:0; }
  .ipi-ss-thumb.selected { border-color:#6366f1; }
  .ipi-ss-thumb img { display:block; max-width:90px; max-height:68px; object-fit:cover; background:#f3f4f6; }
  .ipi-ss-check { position:absolute; top:2px; right:2px; background:#6366f1; color:#fff; border-radius:50%; width:15px; height:15px; display:none; align-items:center; justify-content:center; font-size:.58rem; font-weight:700; }
  .ipi-ss-thumb.selected .ipi-ss-check { display:flex; }
  .ipi-add-btn { display:block; width:100%; padding:.45rem; background:#f0fdf4; border:2px dashed #86efac; border-radius: 0; font-size:.84rem; font-weight:600; color:#16a34a; cursor:pointer; font-family:inherit; text-align:center; margin-top:.4rem; box-sizing:border-box; }
  .ipi-add-btn:hover { background:#dcfce7; }

  /* PDF checkbox + my-notes link in notes panel */
  .fb-pdf-cb { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: #6b7280; cursor: pointer; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid #f0f0f0; }
  .fb-pdf-cb input[type=checkbox] { margin: 0; flex-shrink: 0; }
  .fb-my-notes-link { display: block; font-size: .8rem; color: #4a90d9; text-decoration: none; margin-top: .45rem; }
  .fb-my-notes-link:hover { text-decoration: underline; }

  #fb-note-title { font-size: .95rem; font-weight: 700; color: #1a1a2e; margin-bottom: .65rem; }
  #fb-note-area {
    width: 100%; box-sizing: border-box; resize: vertical; min-height: 150px;
    border: 1px solid #d1d5db; border-radius: 0; padding: .6rem .75rem;
    font-size: .9rem; font-family: inherit; line-height: 1.6; color: #222;
  }
  #fb-note-area:focus { outline: none; border-color: #059669; box-shadow: 0 0 0 2px rgba(5,150,105,.18); }
  .fb-privacy-note { font-size: .74rem; color: #9ca3af; margin-top: .5rem; line-height: 1.55; }
  #fb-note-status { font-size: .78rem; color: #9ca3af; min-height: 1.2em; margin-top: .3rem; }
  #fb-note-status.saved { color: #059669; }
  #fb-note-status.err   { color: #b00; }
  .fb-note-btns { display: flex; justify-content: flex-end; margin-top: .75rem; }
  .fb-note-btns button { padding: .42rem 1rem; border-radius: 0; font-size: .88rem; cursor: pointer; font-family: inherit; border: none; background: #059669; color: #fff; }
  .fb-note-btns button:hover { background: #047857; }

  #fb-overlay {
    display: none; position: fixed; inset: 0; z-index: 1002;
    background: rgba(0,0,0,.45); align-items: center; justify-content: center;
  }
  #fb-overlay.open { display: flex; }
  /* Drag mode: overlay jen jako dimmer, modal se pozicuje sám */
  #fb-overlay.dragged { align-items: flex-start; justify-content: flex-start; }

  #fb-modal {
    background: #fff; border-radius: 0; padding: 1.6rem 1.8rem;
    width: min(480px, calc(100vw - 2rem)); box-shadow: 0 8px 32px rgba(0,0,0,.22);
    position: relative; max-height: 92vh; overflow-y: auto;
  }
  /* Drag mode: modal má fixní pozici */
  #fb-modal.is-dragged {
    position: fixed;
    margin: 0;
  }

  /* Drag handle — pruh v hlavičce modalu */
  #fb-drag-handle {
    display: flex; align-items: center; justify-content: space-between;
    margin: -.4rem -1.8rem .6rem; padding: .35rem 1rem .35rem 1.2rem;
    background: #f5f3ff; border-bottom: 1px solid #e0d8f5; border-radius: 0;
    cursor: grab; user-select: none; touch-action: none;
    font-size: .72rem; color: #9ca3af; letter-spacing: .04em;
  }
  #fb-drag-handle:active { cursor: grabbing; }
  #fb-drag-handle .drag-dots {
    display: flex; gap: 3px; align-items: center;
  }
  #fb-drag-handle .drag-dots span {
    width: 4px; height: 4px; border-radius: 50%; background: #c4b5fd; display: block;
  }
  /* Na mobilu: drag handle schován, drag vypnut */
  @media (max-width: 639px) {
    #fb-drag-handle { display: none; }
  }
  #fb-modal.interp-active {
    width: min(920px, 94vw);
    height: 92vh;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    padding: .8rem 1.1rem .8rem;
    overflow: hidden;
  }
  #fb-modal.interp-active > #fb-close { top: .6rem; right: .8rem; }
  #fb-modal h2 { font-size: 1.05rem; margin-bottom: .15rem; color: #1a1a2e; }
  .fb-sub { font-size: .8rem; color: #999; margin-bottom: .8rem; }

  #fb-close {
    position: absolute; top: .9rem; right: 1rem;
    background: none; border: none; font-size: 1.4rem; color: #aaa;
    cursor: pointer; line-height: 1; padding: 0;
  }
  #fb-close:hover { color: #333; }

  /* Náhled obrázku nahoře */
  #fb-img-preview-wrap {
    display: none; margin-bottom: .75rem; position: relative;
  }
  #fb-img-preview {
    max-width: 100%; max-height: 130px; border-radius: 0; display: block;
    border: 1px solid #e0d8f5; object-fit: cover;
  }
  #fb-img-remove {
    position: absolute; top: .25rem; right: .25rem;
    background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 0;
    font-size: .75rem; cursor: pointer; padding: .1rem .35rem; line-height: 1.4;
  }

  /* Kategorie */
  .fb-cats { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
  .fb-cat { display: inline-block; }
  .fb-cat input { position: absolute; opacity: 0; width: 0; height: 0; }
  .fb-cat span {
    display: inline-block; padding: .28rem .7rem; font-size: .81rem;
    border: 1.5px solid #e0d8f5; border-radius: 0; cursor: pointer;
    background: #faf8ff; color: #555; transition: border-color .12s, background .12s, color .12s;
    user-select: none;
  }
  .fb-cat span:hover { border-color: #c4b5fd; background: #f3eeff; color: #4c1d95; }
  .fb-cat input:checked + span { border-color: #7c3aed; background: #ede9fe; color: #5b21b6; font-weight: 600; }

  /* Nálada */
  .fb-moods { display: flex; gap: .5rem; margin-bottom: .8rem; }
  .fb-moods button {
    flex: 1; padding: .35rem 0; font-size: 1.2rem; border-radius: 0;
    border: 2px solid #e8e0f7; background: #faf8ff; cursor: pointer;
    transition: border-color .12s, background .12s;
  }
  .fb-moods button:hover  { border-color: #c4b5fd; background: #f3eeff; }
  .fb-moods button.active { border-color: #7c3aed; background: #ede9fe; }

  #fb-msg {
    width: 100%; box-sizing: border-box; resize: vertical; min-height: 80px;
    border: 1px solid #ddd; border-radius: 0; padding: .5rem .7rem;
    font-size: .9rem; font-family: inherit; line-height: 1.55; color: #222;
  }
  #fb-msg:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,.18); }

  /* Modifikátor zeď */
  .fb-modifier {
    display: flex; align-items: flex-start; gap: .45rem;
    margin-top: .7rem; font-size: .8rem; color: #777; cursor: pointer;
  }
  .fb-modifier input { margin-top: .15rem; cursor: pointer; accent-color: #059669; flex-shrink: 0; }

  /* Příloha (pro feedback kategorie) */
  .fb-attach-section { margin-top: .6rem; }
  .fb-img-attach-btn {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .8rem; color: #7c3aed; cursor: pointer; background: none; border: none;
    padding: 0; font-family: inherit;
  }
  .fb-img-attach-btn:hover { text-decoration: underline; }

  .fb-btns { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .9rem; }
  .fb-btns button {
    padding: .45rem 1.1rem; border-radius: 0; font-size: .9rem;
    cursor: pointer; font-family: inherit; border: none;
  }
  #fb-cancel         { background: #f0edf8; color: #5b21b6; }
  #fb-cancel:hover   { background: #e6dff5; }
  #fb-submit         { background: #7c3aed; color: #fff; }
  #fb-submit:hover   { background: #6d28d9; }
  #fb-submit:disabled { background: #c4b5fd; cursor: default; }

  #fb-status { font-size: .85rem; margin-top: .65rem; min-height: 1.2em; color: #555; }
  #fb-status.ok  { color: #155724; }
  #fb-status.err { color: #b00; }