:root {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #263f36;
  background: #f7f7f0;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 720px;
  margin: auto;
  padding: calc(30px + env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    calc(30px + env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}
header,
.intro,
.dialog-head,
.card,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
header small,
.list-label {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #6b7b68;
}
h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 46px;
  letter-spacing: -2px;
  margin: 6px 0 0;
}
h1 span {
  font: 36px Georgia;
  color: #ac6c44;
  margin-left: 9px;
}
h2 {
  font: 28px Georgia;
  margin: 12px 0;
}
h3 {
  font-size: 17px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 1px solid #d5ddcf;
  border-radius: 13px;
  background: #fffef9;
  color: #345d4e;
  min-height: 48px;
  padding: 12px 17px;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: #345d4e;
  color: white;
  border-color: #345d4e;
}
.icon {
  font-size: 25px;
  width: 48px;
  padding: 5px;
  background: transparent;
}
.intro {
  margin: 32px 0 24px;
}
.intro p {
  font-size: 15px;
  line-height: 1.7;
  color: #788271;
}
.intro strong {
  font-weight: 500;
  color: #405549;
}
.intro button {
  white-space: nowrap;
}
input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d5ddcf;
  border-radius: 11px;
  background: #fffefa;
  padding: 12px;
  color: #263f36;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid #9bae87;
  outline-offset: 3px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin: 15px 0;
}
label small,
.muted {
  font-size: 13px;
  color: #6b756d;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
.search input {
  background: #ebeee4;
  border: 0;
  min-height: 52px;
}
.list-label {
  margin: 32px 0 15px;
  display: flex;
  justify-content: space-between;
}
#list {
  display: grid;
  gap: 12px;
}
.card {
  width: 100%;
  text-align: left;
  padding: 19px 16px;
  border-radius: 17px;
  background: #fffefa;
  font-weight: 400;
  min-height: 100px;
}
.card.today {
  background: #e6eddb;
  border-color: #c4d3b2;
}
.event-icon {
  border-radius: 14px;
  background: #f2e8db;
  min-width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 23px;
}
.card[data-type="nameday"] .event-icon {
  background: #e8eddf;
}
.card[data-type="anniversary"] .event-icon {
  background: #f4e3df;
}
.event-main {
  flex: 1;
  min-width: 0;
}
.event-main strong {
  display: block;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.event-main small {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  color: #71806f;
}
.event-time {
  text-align: right;
  min-width: 76px;
}
.event-time b {
  font-size: 13px;
  display: block;
}
.event-time small {
  font-size: 11px;
  display: block;
  margin-top: 6px;
  color: #71806f;
}
.empty {
  text-align: center;
  padding: 50px 16px;
  background: #eeeee4;
  border-radius: 18px;
  color: #6b756d;
  line-height: 1.8;
}
footer {
  text-align: center;
  font: italic 14px Georgia;
  color: #899280;
  padding: 38px 0;
}
dialog {
  width: calc(100% - 24px);
  max-width: 500px;
  max-height: calc(100dvh - 24px);
  border: 1px solid #d5ddcf;
  border-radius: 22px;
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
  background: #f7f7f0;
  color: #263f36;
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #1d302d88;
  backdrop-filter: blur(3px);
}
.row label {
  flex: 1;
  min-width: 0;
}
.full {
  width: 100%;
  margin: 7px 0;
}
.danger {
  color: #a04438;
  background: transparent;
  border-color: #e2c8bf;
}
.check,
.offsets label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input,
.offsets input {
  width: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: #345d4e;
}
.offsets {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}
.offsets label {
  font-size: 13px;
}
fieldset {
  border: 1px solid #d5ddcf;
  border-radius: 12px;
  padding: 12px;
}
legend {
  font-size: 13px;
}
hr {
  border: 0;
  border-top: 1px solid #d5ddcf;
  margin: 26px 0;
}
summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
}
details p {
  font-size: 14px;
  line-height: 1.6;
}
.notice,
.formError {
  font-size: 14px;
  line-height: 1.6;
  color: #914e28;
}
.notice {
  background: #f3e7cf;
  padding: 12px;
  border-radius: 10px;
}
#status {
  font-size: 14px;
  color: #914e28;
}
#status:empty {
  display: none;
}
.break {
  overflow-wrap: anywhere;
  font-size: 13px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
@media (max-width: 380px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .intro {
    gap: 8px;
  }
  .card {
    gap: 10px;
    padding: 15px 10px;
  }
  .event-icon {
    min-width: 40px;
    height: 40px;
  }
}
