.notebook { padding-bottom: 1rem; }
.notebook [hidden] { display: none !important; }
.notebook__storage {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
}
.notebook__storage strong { display: block; color: var(--accent-strong); }
.notebook__storage p { margin: 0.25rem 0 0; font-size: 0.9rem; }
.notebook__jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.6rem; }
.notebook__jump a {
  display: inline-flex; align-items: center; min-height: 2.7rem;
  padding: 0.3rem 0.75rem; border: 1px solid var(--line-strong);
  border-radius: 6px; background: #fff; font-weight: 750; text-decoration: none;
}
.notebook__jump a:hover { background: var(--accent-soft); }
.notebook-panel {
  margin: 2rem 0;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.notebook-panel__heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.notebook-panel__heading h2 { margin: 0; }
.notebook-step { margin: 0 0 0.15rem; color: var(--accent-strong); font-size: 0.82rem; font-weight: 850; letter-spacing: 0.04em; }
.notebook-count { margin: 0; color: var(--accent-strong); font-weight: 850; white-space: nowrap; }
.notebook-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 1rem; margin: 1rem 0; }
.notebook-field { display: grid; align-content: start; gap: 0.3rem; min-width: 0; font-weight: 750; }
.notebook-field--narrow { max-width: 20rem; margin: 1rem 0; }
.notebook-field input, .notebook-field select, .notebook-quote-table input, .notebook-quote-table select, .notebook-inline-form input {
  width: 100%; min-width: 0; min-height: 2.65rem; padding: 0.45rem 0.55rem;
  border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--text); font: inherit;
}
.notebook-field input:disabled, .notebook-quote-table input:disabled { background: var(--surface-soft); color: var(--muted); }
.notebook-unit { display: flex; align-items: center; gap: 0.45rem; }
.notebook-unit span { flex: 0 0 auto; }
.notebook-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; margin: 0.85rem 0; }
.notebook-button, .notebook-import {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0.45rem 0.85rem; border: 1px solid var(--accent-strong);
  border-radius: 5px; background: var(--accent-strong); color: #fff; font: inherit;
  font-weight: 800; line-height: 1.4; text-align: center; text-decoration: none; cursor: pointer;
}
.notebook-button:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.notebook-button--secondary, .notebook-import { background: #fff; color: var(--accent-strong); }
.notebook-button--secondary:hover, .notebook-import:hover { background: var(--accent-soft); }
.notebook-button--danger { border-color: #a33847; background: #fff; color: #a33847; }
.notebook-button--danger:hover { background: #fff0f1; border-color: #a33847; }
.notebook-button:disabled { opacity: 0.55; cursor: not-allowed; }
.notebook-import { position: relative; overflow: hidden; }
.notebook-import input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.notebook-import:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.notebook-message { min-height: 1.4em; color: var(--accent-strong); font-weight: 750; }
.notebook-task-group { margin: 1.5rem 0; }
.notebook-task-group h3 { margin: 0 0 0.6rem; padding-left: 0.6rem; border-left: 4px solid var(--brand); }
.notebook-task { margin: 0.65rem 0; padding: 0.85rem; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.notebook-task__top { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 0.4rem 0.8rem; }
.notebook-task__done { display: inline-flex; align-items: start; gap: 0.55rem; font-weight: 800; cursor: pointer; }
.notebook-task__done input, .notebook-check input, .notebook-checks input { width: 1.1rem; height: 1.1rem; margin-top: 0.35rem; accent-color: var(--accent-strong); }
.notebook-task__done:has(input:checked) span { color: var(--muted); text-decoration: line-through; }
.notebook-task__link { font-size: 0.9rem; white-space: nowrap; }
.notebook-task__hint { margin: 0.2rem 0 0.55rem; color: var(--muted); font-size: 0.86rem; }
.notebook-task__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.notebook-task__fields .notebook-field { font-size: 0.82rem; }
.notebook-task__fields input, .notebook-task__fields select { min-height: 2.4rem; font-size: 0.9rem; }
.notebook-text-button { padding: 0.25rem; border: 0; background: transparent; color: #a33847; font: inherit; font-size: 0.86rem; text-decoration: underline; cursor: pointer; }
.notebook-inline-form { margin: 1.3rem 0 0; }
.notebook-inline-form > label { display: block; margin-bottom: 0.3rem; font-weight: 800; }
.notebook-inline-form > div { display: flex; gap: 0.5rem; }
.notebook-help { margin: 1.1rem 0 0; color: var(--muted); font-size: 0.9rem; }
.notebook-venue { margin: 1.1rem 0; padding: 0.9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.notebook-venue__heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.notebook-venue__heading h3 { margin: 0; }
.notebook-table-scroll { max-width: 100%; overflow-x: auto; }
.notebook-table-scroll table { display: table; min-width: 560px; margin: 0.6rem 0 1rem; }
.notebook-table-scroll th, .notebook-table-scroll td { padding: 0.55rem 0.65rem; font-size: 0.9rem; }
.notebook-quote-table th:first-child { min-width: 11rem; }
.notebook-quote-table td:nth-child(2) { min-width: 10rem; }
.notebook-quote-table td:nth-child(3) { min-width: 10rem; }
.notebook-checks { display: grid; gap: 0.3rem; margin: 0.5rem 0; }
.notebook-checks label, .notebook-check { display: inline-flex; align-items: start; gap: 0.5rem; cursor: pointer; }
.notebook-result { margin: 1.2rem 0 0; padding: 0.9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.notebook-result table { background: #fff; }
.notebook-warning, .notebook-success { margin: 0.75rem 0; padding: 0.65rem 0.75rem; border-radius: 5px; font-weight: 750; }
.notebook-warning { border-left: 4px solid #a33847; background: #fff0f1; color: #792331; }
.notebook-success { border-left: 4px solid var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.notebook-negative { background: #fff0f1; color: #792331; font-weight: 800; }
.notebook-empty { color: var(--muted); }
.notebook-money-row { margin: 0.6rem 0; padding: 0.8rem; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.notebook-money-row__fields { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.notebook-money-row .notebook-check { margin: 0.35rem 1rem 0.35rem 0; }
.notebook-noscript { max-width: 60rem; margin: 1rem auto; padding: 1rem; background: #fff; }
@media (max-width: 720px) {
  .notebook-panel__heading { display: block; }
  .notebook-fields, .notebook-task__fields, .notebook-money-row__fields { grid-template-columns: 1fr; }
  .notebook-inline-form > div { display: grid; }
  .notebook-venue { padding: 0.65rem; }
}
@media print {
  .site-header, .site-sidebar, .notebook__jump, .notebook-actions, .notebook-import, .notebook-inline-form, .site-footer { display: none !important; }
  .notebook-panel { break-inside: avoid; box-shadow: none; }
  .notebook-table-scroll { overflow: visible; }
}
