* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #22221f;
  background: #faf9f6;
  font:
    16px/1.55 "Malgun Gothic",
    system-ui,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button,
select,
input,
textarea {
  border: 1px solid #d9d8d2;
  border-radius: 8px;
  background: white;
  padding: 8px 12px;
}
button:hover,
select:hover {
  border-color: #87847d;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #2868aa;
  outline-offset: 2px;
}
header {
  border-bottom: 1px solid #deddd7;
  background: white;
}
.head,
main {
  max-width: 960px;
  margin: auto;
  padding: 0 28px;
}
.head {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand i {
  background: #ff2233;
  color: #fff;
  font: bold italic 27px/31px Georgia;
  text-align: center;
  border-radius: 7px;
  width: 34px;
  height: 34px;
}
.head #sync {
  margin-left: auto;
  color: #595950;
  font-size: 13px;
}
main {
  padding-top: 42px;
  padding-bottom: 72px;
}
.title,
.toolbar,
.list-title,
.actions,
.compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
h1 {
  font-size: clamp(32px, 6vw, 46px);
  letter-spacing: -0.04em;
  margin: 0 0 20px;
}
small,
.meta,
.compose-actions span {
  font-size: 13px;
  color: #625f59;
}
.paper,
.item,
.entry,
dialog {
  background: white;
  border: 1px solid #deddd6;
  border-radius: 12px;
}
.paper {
  padding: 18px 20px;
  border-top: 3px solid #ff2233;
}
.paper label {
  font-weight: 700;
}
.paper textarea {
  width: 100%;
  border: 0;
  resize: vertical;
  min-height: 74px;
  padding: 8px 0;
}
.primary {
  background: #b71c2c;
  color: white;
  border: 1px solid #a91929;
  font-weight: bold;
}
.compose-actions {
  justify-content: flex-end;
}
.toolbar {
  margin-top: 32px;
  border-bottom: 1px solid #deddd6;
  padding-bottom: 14px;
}
.toolbar nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.toolbar button {
  border: 0;
  background: transparent;
  font-size: 14px;
}
.toolbar button[aria-pressed="true"] {
  background: #ffebec;
  color: #921a28;
  font-weight: bold;
}
#query {
  max-width: 180px;
}
.list-title {
  margin: 18px 0 12px;
}
h2 {
  font-size: 19px;
}
.item {
  width: 100%;
  display: flex;
  text-align: left;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  margin: 0 0 6px;
}
.item strong {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item .meta {
  flex-shrink: 0;
}
.card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr));
  gap: 12px;
}
.card .item,
.detail .item {
  align-items: flex-start;
  flex-direction: column;
}
.card .item strong,
.detail .item strong {
  white-space: normal;
}
.excerpt {
  white-space: pre-wrap;
  color: #524f49;
  overflow-wrap: anywhere;
}
.empty {
  text-align: center;
  padding: 45px 12px;
  color: #666;
}
.sr {
  position: absolute;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
}
dialog {
  width: min(610px, 94vw);
  max-height: 89dvh;
  padding: 22px;
}
dialog::backdrop {
  background: #201e1b66;
}
dialog form,
label {
  display: grid;
  gap: 6px;
}
dialog form,
.entry {
  margin: 13px 0;
}
dialog textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.grid input,
.grid select {
  width: 100%;
  min-width: 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
}
.check input {
  width: auto;
}
.entry {
  border-left: 3px solid #ddd;
  padding: 10px 13px;
}
.entry p,
.para {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 4px 0;
}
.para button {
  margin-left: 8px;
  font-size: 12px;
}
.link {
  color: #195e9b;
}
.close {
  float: right;
}
#message:not(:empty) {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #282725;
  color: white;
  border-radius: 7px;
  padding: 10px 18px;
  z-index: 4;
}
#login {
  max-width: 400px;
  margin: 8vh auto;
}
#signin {
  display: grid;
  gap: 14px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  main,
  .head {
    padding-left: 16px;
    padding-right: 16px;
  }
  main {
    padding-top: 24px;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar nav {
    width: 100%;
  }
  #query {
    max-width: none;
    width: 100%;
  }
  .item {
    gap: 7px;
    flex-wrap: wrap;
  }
  .item strong {
    min-width: 40%;
  }
  .item .meta {
    font-size: 12px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .head {
    gap: 8px;
  }
  .head button {
    font-size: 13px;
  }
}
.row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 6px;
}
.row .item {
  margin: 0;
  min-width: 0;
}
.tick {
  align-self: center;
  padding: 8px;
  font-size: 20px;
  line-height: 1;
}
