main .intro {
  justify-content: flex-end;
  margin-bottom: 8px;
}
.note-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.note-actions button {
  white-space: nowrap;
}
.note-actions .danger {
  background: #fbe9e5;
  border-color: #ad6559;
  color: #842f26;
  font-weight: 600;
}
.note-actions .danger:hover:not(:disabled) {
  background: #f5d4cb;
  border-color: #842f26;
}
.note-actions .danger:focus-visible {
  outline-color: #842f26;
}
.confirm-preference {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.confirm-preference input {
  flex: none;
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}
@media (max-width: 600px) {
  main .intro {
    align-items: flex-end;
  }
}
.add-note {
  background: #526c4a;
  color: white;
  border-color: #526c4a;
}
.add-note:hover:not(:disabled) {
  background: #40583a;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 5px 4px 9px;
  margin-top: 10px;
  scrollbar-width: thin;
}
.tab-group {
  display: flex;
  align-items: center;
  flex: none;
  gap: 5px;
  border: 1px solid #d3dccc;
  background: #eef1e9;
  border-radius: 9px;
  padding: 3px;
}
.group-label {
  padding: 0 7px;
  font-size: 11px;
  font-weight: 650;
  color: #425d39;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tabs .note-tab {
  flex: none;
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 12px;
}
.tabs .note-tab[aria-selected='true'] {
  background: #e1e8da;
  border-color: #839776;
  color: #364e2d;
  font-weight: 600;
}
.tabs .note-tab:focus-visible {
  outline-offset: -2px;
}
.tab-group .group-label {
  background: #e1eadb;
  border: 1px solid #a9baa1;
  min-height: 36px;
  padding: 5px 9px;
}
.tab-group .group-label:hover {
  background: #d2dfcb;
}
.group-overview {
  overflow: auto;
}
.overview-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.overview-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
}
.overview-header button {
  flex: none;
}
.overview-notes {
  list-style: none;
  margin: 0;
  padding: 3px;
  max-height: 55vh;
  overflow: auto;
}
.overview-notes li + li {
  margin-top: 7px;
}
.overview-notes button {
  display: block;
  width: 100%;
  text-align: left;
  overflow-wrap: anywhere;
}
.overview-notes button[aria-current='true'] {
  background: #e5e9dd;
  border-color: #839776;
}
.overview-notes strong,
.overview-notes span {
  display: block;
}
.overview-notes span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: pre-line;
  color: #626d57;
}
dialog.group-overview {
  width: calc(100% - 28px);
  max-width: 600px;
  max-height: calc(100% - 28px);
  padding: 22px;
  background: #fffefb;
}
.group-overview .overview-eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--green);
}
.overview-section {
  margin-top: 16px;
}
.overview-section-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 6px;
}
.overview-section-heading h3 {
  font-size: 14px;
  margin: 0;
}
.overview-section-heading p {
  margin: 0;
  color: #626d57;
  font-size: 12px;
}
.group-overview .overview-notes {
  max-height: 36vh;
  padding: 3px;
}
.overview-notes li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #f5f6f1;
  border: 1px solid #e4e8de;
  border-radius: 9px;
}
.overview-notes .overview-note-preview {
  min-width: 0;
  border-color: transparent;
  background: transparent;
}
.overview-notes .overview-note-preview:hover {
  background: #eaf0e2;
}
.overview-note-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.overview-note-actions button {
  width: auto;
  white-space: nowrap;
  padding: 6px 9px;
  font-size: 11px;
}
.overview-note-actions .overview-delete-note {
  background: #fff4f0;
  border-color: #d7a39a;
  color: #842f26;
}
.overview-note-actions .overview-delete-note:hover {
  background: #fbe3dc;
}
.group-overview .overview-transfer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin: 14px 0 0;
  padding: 11px;
  background: #eef1e9;
  border-radius: 9px;
}
.overview-transfer label {
  grid-column: 1/-1;
  font-weight: 650;
}
.overview-transfer select {
  width: 100%;
}
.overview-transfer button {
  padding-inline: 10px;
}
.group-overview .overview-status {
  margin: 6px 0 0;
}
.overview-status:empty {
  margin: 0;
}
.group-overview .overview-footer {
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
@media (max-width: 500px) {
  dialog.group-overview {
    padding: 14px;
  }
  .overview-notes li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .overview-note-actions button,
  .group-overview button {
    min-height: 36px;
  }
}
.group-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #526047;
  font-size: 12px;
}
.group-control label {
  flex: none;
}
.group-control select,
.group-name {
  font: inherit;
  color: inherit;
  min-width: 0;
  max-width: 100%;
  background: #fffefb;
  border: 1px solid #cbd2c4;
  border-radius: 6px;
  padding: 6px;
}
.group-name {
  display: block;
  width: 100%;
  margin-top: 4px;
}
@media (max-width: 600px) {
  .note-actions {
    gap: 5px;
  }
  .note-actions button {
    padding-inline: 9px;
  }
  .group-label {
    max-width: 100px;
  }
  .tabs .note-tab {
    max-width: 140px;
  }
}
:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --ink: #292e29;
  --muted: #777b70;
  --line: #e2e4da;
  --green: #526c4a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  line-height: 1.8;
}
.header {
  max-width: 1140px;
  margin: auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 18px;
  font-weight: 650;
}
.language-control select {
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  background: #fffefb;
  border: 1px solid #cbd2c4;
  border-radius: 7px;
  padding: 6px 9px;
}
.mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #e5e9dd;
  border-radius: 12px;
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1;
}
.brand small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
main {
  max-width: 960px;
  padding: 46px 40px 0;
  margin: auto;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 30px;
}
.save-state {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 3px;
}
.dot {
  width: 6px;
  height: 6px;
  background: #a5ac9a;
  border-radius: 50%;
}
.dot.saved {
  background: #77956a;
}
.dot.error {
  background: #b36a4b;
}
.paper {
  background: #fffefb;
  border: 1px solid #e0e2d8;
  border-radius: 14px;
  box-shadow: 0 6px 25px #36432a05;
  overflow: hidden;
}
.paper-top {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 0 30px;
  padding: 23px 0 18px;
  border-bottom: 1px solid #eeefe8;
}
input,
textarea {
  font: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  outline: none;
}
#title {
  font-size: 20px;
  font-weight: 550;
  min-width: 0;
  width: 100%;
}
input::placeholder {
  color: #9a9f92;
}
textarea {
  display: block;
  width: 100%;
  padding: 25px 30px;
  min-height: 350px;
  resize: vertical;
  line-height: 2;
  font-size: 15px;
  tab-size: 2;
}
textarea::placeholder {
  color: #a7ad9f;
}
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #a6b69a;
  outline-offset: -2px;
}
.paper-bottom {
  padding: 13px 30px;
  border-top: 1px solid #eff0e9;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: #8c9382;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 10px;
}
.actions {
  display: flex;
  gap: 9px;
}
button {
  border: 1px solid #dce0d3;
  background: #fffefa;
  color: #526047;
  border-radius: 7px;
  padding: 9px 17px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
button:hover:not(:disabled) {
  background: #eaf0e2;
}
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.danger {
  border-color: transparent;
  background: transparent;
  color: #8a766b;
}
.notice {
  font-size: 12px;
  min-height: 22px;
  margin: 9px 0 21px;
  color: var(--green);
}
.notice.error {
  color: #9b4d32;
}
.privacy {
  display: flex;
  gap: 15px;
  background: #edeee6;
  border-radius: 10px;
  padding: 20px 24px;
}
.privacy-icon {
  font-size: 25px;
  color: #74816b;
  line-height: 1.3;
}
.privacy h2 {
  font-size: 12px;
  font-weight: 550;
  margin: 0 0 6px;
}
.privacy p {
  font-size: 11px;
  color: #7c8372;
  line-height: 1.9;
  margin: 3px 0;
}
.privacy strong {
  font-weight: 550;
  color: #626d57;
}
footer {
  max-width: 960px;
  padding: 30px 40px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #929787;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 25px;
  max-width: 440px;
  width: calc(100% - 40px);
  color: var(--ink);
}
dialog::backdrop {
  background: #29302355;
}
dialog h2 {
  font-size: 18px;
  margin-top: 0;
}
dialog p {
  font-size: 13px;
  color: var(--muted);
}
.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
  margin-top: 25px;
}
.delete-button {
  background: #975c45;
  color: white;
  border-color: #975c45;
}
button.delete-button:hover {
  background: #804b36;
}
@media (max-width: 600px) {
  .header {
    padding: 20px;
  }
  .brand small {
    display: none;
  }
  main {
    padding: 25px 18px 0;
  }
  .intro {
    align-items: start;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
  }
  .paper-top {
    margin: 0 20px;
    padding: 18px 0;
  }
  #title {
    font-size: 18px;
  }
  textarea {
    padding: 20px;
    min-height: 45vh;
    font-size: 16px;
  }
  .paper-bottom {
    padding: 12px 20px;
  }
  .privacy {
    padding: 17px;
    gap: 10px;
  }
  button {
    padding: 9px 12px;
  }
  footer {
    padding: 25px 20px;
  }
}
