.notebook {
  width: min(920px, calc(100% - clamp(32px, 12vw, 120px)));
  min-height: 58vh;
  margin-inline: auto;
  padding-block: clamp(44px, 7vw, 92px) 64px;
}

.notebook-heading { margin-bottom: clamp(28px, 5vw, 52px); }
.notebook-heading h1 {
  font: 600 clamp(38px, 6vw, 60px)/1.35 "Noto Serif JP", var(--serif);
  letter-spacing: .04em;
  margin-bottom: 12px;
}
.notebook-heading > p { font-size: clamp(14px, 2vw, 17px); }
.notebook-heading .notebook-storage { margin-top: 8px; color: var(--muted); font-size: 12px; }

.notebook-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 10px;
}
.notebook-menu[hidden] { display: none; }
.note-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.note-filters button {
  min-height: 44px;
  padding-inline: clamp(8px, 2vw, 16px);
  border-bottom: 2px solid transparent;
  font-size: 13px;
  white-space: nowrap;
}
.note-filters button span { margin-inline-start: 3px; color: var(--muted); font-size: 11px; }
.note-filters button[aria-pressed="true"] { border-color: var(--clay); font-weight: 700; }
.note-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  color: var(--green);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.note-quiet[hidden] { display: none; }
.note-live:not(:empty) { margin-bottom: 10px; color: var(--green); font-size: 13px; }
.note-empty { border-top: 1px solid var(--line); padding: 30px 0; }
.note-empty .primary { display: inline-flex; align-items: center; gap: 14px; margin-top: 14px; }

.note-card { border-top: 1px solid var(--line); }
.note-card summary {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.6vw, 22px);
  padding: 14px 2px;
  cursor: pointer;
  list-style: none;
}
.note-card summary::-webkit-details-marker { display: none; }
.note-card summary .catalog-thumb { --catalog-thumb-width: clamp(59px, 13vw, 90px); }
.note-drink-type {
  display: grid;
  place-items: center;
  flex: 0 0 clamp(59px, 13vw, 90px);
  aspect-ratio: 6 / 5;
  border-radius: 12px;
  background: #f0eee6;
  color: var(--green);
  font-size: 12px;
}
.note-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.note-name small { display: block; color: var(--clay); font-size: 11px; }
.note-name strong { display: block; margin-top: 2px; font: 600 clamp(15px, 3vw, 23px)/1.5 "Noto Serif JP", var(--serif); }
.note-state { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.note-card[data-tried="true"] .note-state { color: var(--green); }
.note-open-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: clamp(7px, 1.8vw, 16px);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
}
.note-open-label .note-close-label,
details[open] .note-open-label .note-edit-label { display: none; }
details[open] .note-open-label .note-close-label { display: inline; }
.note-card summary:hover .note-open-label,
.note-card details[open] .note-open-label { background: #f3ede5; }

.note-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px clamp(20px, 4vw, 44px);
  padding: clamp(14px, 3vw, 26px);
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: #faf6f0;
}
.note-fields { min-width: 0; }
.note-tried {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}
.note-tried input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.note-memo { display: block; margin-top: 7px; font-weight: 600; }
.note-memo small { margin-left: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }
.note-form :is(textarea, select) {
  border: 1px solid #cfc5b8;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.note-form :is(textarea, select):focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.note-form textarea {
  display: block;
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  margin-top: 6px;
  resize: vertical;
  font-size: 16px;
  font-weight: 400;
}
.note-taste { min-width: 0; }
.note-taste table { width: 100%; border-collapse: collapse; font-size: 12px; }
.note-taste caption { text-align: left; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.note-taste th, .note-taste td { text-align: left; padding: 3px 6px 3px 0; }
.note-taste thead th { color: var(--muted); white-space: nowrap; }
.note-taste thead small { display: block; font-size: 10px; font-weight: 400; }
.note-taste tbody th { white-space: nowrap; }
.note-taste tbody tr { border-top: 1px solid var(--line); }
.note-estimate { white-space: nowrap; color: #91462e; letter-spacing: .045em; }
.note-taste select { width: 100%; min-height: 44px; padding: 4px 6px; color: var(--green); }
.note-taste-key { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.note-actions { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.note-result { grid-column: 1 / -1; color: var(--green); font-size: 12px; }
.note-result:empty { margin-top: -12px; }
.note-delete { margin-inline-start: auto; color: #92442d; }
.note-delete-dialog { border-radius: 12px; }
.note-delete-dialog h2 { margin: 0 0 10px; font-weight: 700; }
.note-delete-dialog p { overflow-wrap: anywhere; }
.note-delete-dish { font-weight: 700; }
#note-delete-copy { color: var(--muted); margin-top: 4px; }
#note-delete-error:not(:empty) { margin-top: 8px; color: #92442d; }
.note-delete-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; margin-top: 20px; }
.note-delete-actions button {
  min-height: 44px;
  padding-inline: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.note-delete-actions .note-delete-confirm { background: #943f2a; border-color: #943f2a; color: white; }
.notebook .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .note-form { grid-template-columns: minmax(0, 1fr); }
  .note-delete { margin-inline-start: 0; }
  .note-taste select { font-size: 16px; }
}
