.memo-book {
  --memo-ink: #293c32;
  --memo-accent: #305b48;
  --memo-line: #d4dfd2;
  --memo-paper: #fffefa;
  display: grid;
  gap: 12px;
  min-width: 0;
  text-align: left;
  color: var(--memo-ink);
  font-family: var(--sans, -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif);
}
.memo-book [hidden] { display: none !important; }
.memo-book *, .memo-book *::before, .memo-book *::after { box-sizing: border-box; }
.memo-section {
  min-width: 0;
  border: 1px solid var(--memo-line);
  background: var(--memo-paper);
  border-radius: 12px;
  padding: clamp(12px, 3vw, 20px);
}
.memo-section-head, .memo-actions, .memo-editor-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.memo-section-head { justify-content: space-between; gap: 5px 12px; }
.memo-book .memo-section-head h3, .memo-free strong { font-size: 16px; font-weight: 700; line-height: 1.45; margin: 0; }
.memo-book button { cursor: pointer; color: var(--memo-accent); }
.memo-book .memo-add, .memo-book .memo-editor-actions button {
  min-height: 44px; padding: 6px 10px; border: 1px solid #b6c9b6; border-radius: 7px;
  background: #fafcf6; font: 600 13px/1.4 var(--sans, sans-serif);
}
.memo-book button:focus-visible, .memo-book :is(input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #466d55; outline-offset: 2px;
}
.memo-book .memo-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin-top: 9px;
  border: 1px solid var(--memo-line);
  border-radius: 8px;
}
.memo-book table { width: 100%; text-align: left; border-collapse: collapse; color: var(--memo-ink); }
.memo-book .memo-claims-table th, .memo-book .memo-claims-table td { padding: 0; }
.memo-book .memo-claims-table th:first-child {
  position: sticky; left: 0; z-index: 1; min-width: 54px; width: 54px;
  padding: 8px 5px; text-align: center; white-space: nowrap; color: #475849; background: #f1f5ed;
}
.memo-book table th { font: 650 13px/1.45 var(--sans, sans-serif); background: #edf3e9; }
.memo-book .memo-claims-table td, .memo-book .memo-claims-table th { border: 1px solid var(--memo-line); }
.memo-book .memo-claims-table tr > :first-child { border-left: 0; }
.memo-book .memo-claims-table tr > :last-child { border-right: 0; }
.memo-book .memo-claims-table thead tr > * { border-top: 0; }
.memo-book .memo-claims-table tbody tr:last-child > * { border-bottom: 0; }
.memo-book .memo-claims-table td { min-width: 89px; }
.memo-book .memo-claims-table button, .memo-book .memo-link {
  display: block; min-height: 44px; border: 0; background: transparent;
  padding: 7px 8px; font: 500 14px/1.5 var(--sans, sans-serif); overflow-wrap: anywhere;
}
.memo-book .memo-claims-table button { width: 100%; text-align: left; }
.memo-book .memo-header-btn { font-weight: 650 !important; }
.memo-book .memo-claims-table .memo-empty-cell { color: #6c7d67; text-align: center; font-size: 17px; }
.memo-result > span { color: var(--memo-ink); }
.memo-result > b {
  display: inline-block; border-radius: 4px; padding: 1px 5px;
  font-size: 12px; white-space: nowrap;
}
.memo-verdict-human { color: #315e46; background: #e4f0df; }
.memo-verdict-wolf { color: #8e3d3c; background: #f6e4e0; }
.memo-verdict-guard { color: #325e69; background: #e5f0f0; }
.memo-book .memo-extra-claims { list-style: none; margin: 8px 0 0; padding: 0; }
.memo-extra-claims li { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; border-top: 1px solid var(--memo-line); }
.memo-extra-claims li > strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.memo-extra-claims .memo-extra-table { display:block; padding-block:8px; }
.memo-extra-table-title { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 8px; }
.memo-extra-table-title strong { min-width:0; overflow-wrap:anywhere; font-size:13px; }
.memo-extra-table-title small { color:#52695a; font-size:12px; }
.memo-book .memo-extra-table .memo-table-wrap { margin-top:6px; }
.memo-extra-claimants,.memo-extra-claim,.memo-extra-results { display:flex; flex-wrap:wrap; align-items:baseline; min-width:0; gap:4px 8px; }
.memo-extra-claimants { flex:1 1 175px; }
.memo-extra-claim-with-results { flex-basis:100%; }
.memo-extra-results { flex:1 1 130px; }
.memo-extra-result-day { margin-inline-end:4px; color:#52695a; white-space:nowrap; }
.memo-extra-results .memo-result { overflow-wrap:anywhere; }
.memo-book .memo-link { text-decoration: underline; text-decoration-color: #b0c0ae; text-underline-offset: 3px; }
.memo-book .memo-muted { font-size: 13px; color: #657365; margin: 6px 0 0; }
.memo-book .memo-event-table { margin-top: 10px; font-size: 14px; }
.memo-book .memo-event-table td,.memo-book .memo-event-table th { padding: 8px; border-bottom: 1px solid var(--memo-line); }
.memo-book .memo-event-table tbody th { background: transparent; }
.memo-book .memo-event-table td:first-of-type, .memo-book .memo-event-table th { white-space: nowrap; }
.memo-book .memo-event-table td:last-child { overflow-wrap: anywhere; }
.memo-book .memo-event-table .memo-link { padding-inline: 0; text-align: left; }
.memo-book .memo-editor {
  padding: 13px; margin-top: 12px;
  border: 1px solid #bcccb6; border-radius: 8px; background: #f4f7ef;
}
.memo-editor-fields {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,145px),1fr)); gap: 10px;
}
.memo-verdict-fields { display:contents; }
.memo-editor-fields > label, .memo-verdict-fields > label, .memo-free label { display: grid; min-width: 0; gap: 5px; font-size: 13px; font-weight: 600; }
.memo-verdict-fields > .memo-guard-success { display:flex; align-items:center; gap:8px; min-height:44px; align-self:end; }
.memo-guard-success input { width:18px; height:18px; margin:0; flex:none; accent-color:var(--memo-accent); }
.memo-book input:not([type="checkbox"]), .memo-book select, .memo-book textarea {
  min-width: 0; max-width: 100%; width: 100%; min-height: 44px;
  border: 1px solid #b9c6b6; border-radius: 6px; color: var(--memo-ink); background: #fffffd;
  font: 400 16px/1.4 var(--sans, sans-serif); padding: 8px;
}
.memo-book .memo-day-input { display: flex; align-items: center; gap: 6px; }
.memo-book .memo-day-input input { width: 70px; }
.memo-book textarea { resize: vertical; min-height: 112px; margin-top: 3px; }
.memo-book .memo-picks { margin: 0; padding: 8px; grid-column: 1/-1; border: 1px solid var(--memo-line); border-radius: 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,120px),1fr)); }
.memo-picks legend { font-size: 13px; font-weight: 600; }
.memo-picks label { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 4px; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.memo-picks input { accent-color: var(--memo-accent); flex: none; width: 18px; height: 18px; }
.memo-editor-actions { margin-top: 12px; }
.memo-book .memo-editor-actions .memo-submit { background: var(--memo-accent); color: white; border-color: var(--memo-accent); }
.memo-book .memo-editor-actions .memo-delete { color: #893e3d; margin-left: auto; border-color: #dbc9bf; background: #fffaf5; }
.memo-book .memo-error,.memo-book .memo-storage-status { color: #893e3d; font-size: 13px; margin: 6px 0 0; }
.memo-summary .memo-summary-claimant, .memo-summary .memo-result, .memo-summary .memo-summary-empty {
  display: block; padding: 7px 8px; overflow-wrap: anywhere;
}
.memo-summary .memo-summary-claimant small {
  display: block; margin-top: 2px; color: #536753; font-size: 11px; font-weight: 500;
}
.memo-summary .memo-summary-empty { color: #657365; text-align: center; }
.memo-summary .memo-result { font-size: 14px; line-height: 1.5; }
.memo-summary .memo-extra-claims li { padding-block: 8px; }
.memo-summary .memo-extra-claims li > span { gap: 4px 12px; font-size: 14px; overflow-wrap: anywhere; }
.memo-summary .memo-summary-note { overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.6; margin: 6px 0 0; }
