.h2flo-notebook-button,
.h2flo-capture-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(90, 106, 120, 0.75);
  border-radius: 4px;
  background: rgba(243, 246, 248, 0.94);
  color: #203038;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  text-decoration: none;
}

.h2flo-button-with-icon {
  gap: 8px;
}

.h2flo-button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-block;
  object-fit: contain;
}

.h2flo-button-text {
  display: inline-block;
  min-width: 0;
}

.h2flo-notebook-button:hover,
.h2flo-capture-button:hover {
  background: rgba(230, 237, 243, 0.98);
}

.h2flo-notebook-panel {
  position: absolute;
  right: 12px;
  top: 168px;
  z-index: 9100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 24px));
  height: calc(100vh - 180px);
  max-height: calc(100vh - 180px);
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(165, 176, 189, 0.95);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.97);
  color: #1e2b24;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.h2flo-notebook-panel[hidden] {
  display: none !important;
}

.h2flo-notebook-header {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  flex: 0 0 auto;
}

.h2flo-notebook-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.h2flo-notebook-subtitle {
  margin-top: 2px;
  color: #53626d;
  font-size: 12px;
  line-height: 1.35;
}

.h2flo-notebook-close,
.h2flo-notebook-filter-clear,
.h2flo-notebook-entry-button {
  padding: 4px 8px;
  border: 1px solid #9fb0bf;
  border-radius: 4px;
  background: #f3f6f8;
  color: #203038;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.h2flo-notebook-close:hover,
.h2flo-notebook-filter-clear:hover,
.h2flo-notebook-entry-button:hover {
  background: #e6edf3;
}

.h2flo-notebook-filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid #d3dae0;
  border-radius: 4px;
  background: #f8fafb;
  color: #41505b;
  font-size: 12px;
  flex: 0 0 auto;
}

.h2flo-notebook-scroll-region {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.h2flo-notebook-prefield-context {
  display: grid;
  gap: 8px;
  padding: 10px 10px 11px;
  border: 1px solid #d7cfae;
  border-radius: 4px;
  background: #fff8e8;
  color: #40331d;
  flex: 0 0 auto;
}

.h2flo-notebook-field-plan-context {
  gap: 10px;
}

.h2flo-notebook-prefield-context-title {
  color: #5b4520;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.h2flo-notebook-field-plan-context-body {
  display: grid;
  gap: 10px;
}

.h2flo-notebook-field-plan-context-captured {
  color: #6d5a36;
  font-size: 11px;
  line-height: 1.35;
}

.h2flo-notebook-field-plan-context-section {
  display: grid;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(215, 207, 174, 0.9);
}

.h2flo-notebook-field-plan-context-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.h2flo-notebook-field-plan-context-section-title {
  color: #5b4520;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.h2flo-notebook-field-plan-context-value,
.h2flo-notebook-field-plan-context-note,
.h2flo-notebook-field-plan-context-empty {
  color: #40331d;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.h2flo-notebook-field-plan-context-note {
  color: #5f4e2f;
  font-size: 12px;
}

.h2flo-notebook-field-plan-context-empty {
  color: #6d5a36;
}

.h2flo-notebook-field-plan-task-list {
  margin: 0;
  padding-left: 18px;
  color: #40331d;
  font-size: 13px;
  line-height: 1.45;
}

.h2flo-notebook-field-plan-task-list li + li {
  margin-top: 4px;
}

.h2flo-notebook-field-plan-request-item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-left: 3px solid #d8c79d;
  border-radius: 4px;
  background: rgba(255, 250, 236, 0.8);
}

.h2flo-notebook-field-plan-request-heading {
  color: #40331d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
}

.h2flo-notebook-field-plan-request-meta {
  color: #6d5a36;
  font-size: 11px;
  line-height: 1.35;
}

.h2flo-notebook-field-plan-request-response {
  color: #40331d;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.h2flo-notebook-prefield-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.h2flo-notebook-prefield-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.h2flo-notebook-prefield-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #a8b3bd;
  border-radius: 4px;
  background: #f4f7f9;
  color: #243039;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.h2flo-notebook-prefield-action:hover {
  background: #e8eef2;
}

.h2flo-notebook-prefield-link {
  white-space: nowrap;
}

.h2flo-notebook-prefield-context-text {
  white-space: pre-wrap;
  color: #40331d;
  font-size: 13px;
  line-height: 1.45;
}

.h2flo-notebook-prefield-purpose-body {
  display: grid;
  gap: 4px;
  color: #40331d;
  font-size: 13px;
  line-height: 1.45;
}

.h2flo-notebook-prefield-purpose-line {
  white-space: pre-wrap;
}

.h2flo-notebook-prefield-editor {
  display: grid;
  gap: 8px;
}

.h2flo-notebook-prefield-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 96px;
  padding: 8px 10px;
  border: 1px solid #c8d1d8;
  border-radius: 4px;
  background: #fff;
  color: #1e2b24;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.h2flo-notebook-prefield-textarea:focus {
  outline: 2px solid rgba(63, 119, 191, 0.22);
  outline-offset: 1px;
}

.h2flo-notebook-prefield-task-list {
  margin: 0;
  padding-left: 18px;
  color: #40331d;
  font-size: 13px;
  line-height: 1.45;
}

.h2flo-notebook-prefield-task-list li + li {
  margin-top: 4px;
}

.h2flo-notebook-prefield-request-list {
  display: grid;
  gap: 8px;
}

.h2flo-notebook-prefield-request-item {
  padding: 8px 9px;
  border: 1px solid #d8d0b6;
  border-radius: 4px;
  background: rgba(255, 250, 236, 0.9);
  display: grid;
  gap: 6px;
}

.h2flo-notebook-prefield-request-header {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: flex-start;
}

.h2flo-notebook-prefield-request-text {
  color: #40331d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
}

.h2flo-notebook-prefield-request-status {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f4e7c2;
  color: #5b4520;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.h2flo-notebook-prefield-request-response {
  color: #40331d;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.h2flo-notebook-prefield-request-meta {
  color: #6d5a36;
  font-size: 11px;
  line-height: 1.35;
}

.h2flo-notebook-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  min-height: 0;
  overflow: visible;
  overflow-x: hidden;
  flex: 0 0 auto;
}

.h2flo-notebook-entry-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  overflow: visible;
  overflow-x: hidden;
  min-height: 0;
  flex: 0 0 auto;
}

.h2flo-notebook-empty {
  padding: 12px;
  border: 1px solid #d9e0e5;
  border-radius: 4px;
  background: #fafbfd;
  color: #50606b;
  font-size: 13px;
  line-height: 1.4;
}

.h2flo-notebook-entry {
  flex: 0 0 auto;
  display: grid;
  gap: 11px;
  padding: 12px;
  padding-left: 14px;
  border: 1px solid #cfd8e0;
  border-left-width: 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  min-width: 0;
}

.h2flo-notebook-entry + .h2flo-notebook-entry {
  margin-top: 0;
}

.h2flo-notebook-entry.h2flo-notebook-entry-capture {
  border-color: #c9d9ea;
  border-left-color: #3f77bf;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.h2flo-notebook-entry.h2flo-notebook-entry-note {
  border-color: #e2d9c6;
  border-left-color: #c28f2c;
  background: linear-gradient(180deg, #fffefa 0%, #fbf7ef 100%);
}

.h2flo-notebook-thumb {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 34vh;
  object-fit: contain;
  border-radius: 3px;
  border: 1px solid #d3dae0;
  background: #000;
}

.h2flo-notebook-meta {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.h2flo-notebook-entry-header {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 2px;
}

.h2flo-notebook-entry-header-text {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.h2flo-notebook-entry-type {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid #9fb0bf;
  border-radius: 999px;
  background: #eef3f7;
  color: #41505b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.h2flo-notebook-entry-context {
  color: #203038;
  font-weight: 700;
}

.h2flo-notebook-line {
  color: #31424d;
  font-size: 12px;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}

.h2flo-notebook-entry-context {
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}

.h2flo-notebook-timestamp {
  color: #61717d;
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

.h2flo-notebook-details {
  color: #50606b;
}

.h2flo-notebook-details-disclosure {
  display: grid;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid #dde4ea;
}

.h2flo-notebook-details-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #50606b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.h2flo-notebook-details-summary::-webkit-details-marker {
  display: none;
}

.h2flo-notebook-details-body {
  display: grid;
  gap: 4px;
  padding-left: 2px;
  min-width: 0;
}

.h2flo-notebook-detail-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.h2flo-notebook-detail-label {
  color: #6a7883;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.h2flo-notebook-detail-value {
  color: #31424d;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.h2flo-notebook-field {
  display: grid;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid #e4e9ee;
  min-width: 0;
}

.h2flo-notebook-field-label {
  color: #203038;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.h2flo-notebook-textarea,
.h2flo-notebook-input {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #b9c3cb;
  border-radius: 4px;
  background: #fff;
  color: #1e2b24;
  font: inherit;
  font-size: 13px;
}

.h2flo-notebook-textarea {
  resize: vertical;
  min-height: 62px;
}

.h2flo-notebook-entry-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid #e4e9ee;
  min-width: 0;
}

.h2flo-notebook-composer {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d3dae0;
  border-radius: 4px;
  background: #f8fafb;
  min-height: 0;
  flex: 0 0 auto;
}

.h2flo-notebook-composer[hidden] {
  display: none !important;
}

.h2flo-notebook-composer-header {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.h2flo-notebook-composer-title {
  color: #203038;
  font-size: 13px;
  font-weight: 700;
}

.h2flo-notebook-composer-context {
  color: #50606b;
  font-size: 12px;
  line-height: 1.35;
  min-width: 0;
}

.h2flo-notebook-composer-status {
  color: #41505b;
  font-size: 12px;
  line-height: 1.35;
  min-width: 0;
}

.h2flo-notebook-composer-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.h2flo-notebook-entry-delete {
  border-color: #d6a8a8;
  background: #fff5f5;
  color: #8d3030;
}

.h2flo-notebook-entry-delete:hover {
  background: #ffeaea;
}

@media (max-width: 700px) {
  .h2flo-notebook-panel {
    right: 8px;
    left: 8px;
    top: 176px;
    width: auto;
    height: calc(100vh - 188px);
    max-height: calc(100vh - 188px);
  }
}
