:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #292421;
  background: #f6f3ef;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.hidden {
  display: none !important;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.shell {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100dvh;
  background: #f8f6f3;
  box-shadow: 0 0 30px #3020190a;
}
.hero {
  background: #b61f2a;
  color: white;
  border-radius: 0 0 30px 30px;
  padding: calc(22px + env(safe-area-inset-top)) 22px 42px;
}
.hero-top,
.brand,
.quick-row,
.quick-tools,
.list-head,
.toggle-row,
.task-main,
.task-meta,
.detail-header,
.detail-actions,
.two,
.state-actions {
  display: flex;
  align-items: center;
}
.hero-top,
.quick-tools,
.list-head,
.toggle-row {
  justify-content: space-between;
}
.brand {
  gap: 12px;
}
.brand-mark {
  background: white;
  color: #b61f2a;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: bold;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  opacity: 0.75;
}
.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}
.lang,
.icon-button {
  border: 0;
  background: #ffffff27;
  color: white;
  border-radius: 14px;
  min-width: 44px;
  height: 44px;
  font-weight: 700;
}
.hero-bottom {
  margin-top: 40px;
}
.hero h1 {
  font-size: 29px;
  letter-spacing: -0.04em;
  margin: 0 0 6px;
}
.hero p {
  margin: 0;
  opacity: 0.85;
  font-size: 14px;
}
.main {
  padding: 0 18px 38px;
  margin-top: -24px;
  position: relative;
}
.card {
  background: white;
  border-radius: 23px;
  box-shadow: 0 8px 24px #4b2c1714;
}
.quick {
  padding: 17px;
}
.quick-row {
  gap: 10px;
}
.quick-row input {
  border: 0;
  outline: 0;
  min-width: 0;
  flex: 1;
  font-size: 17px;
  color: #292421;
  padding: 12px 3px;
}
.quick-row input::placeholder {
  color: #99918d;
}
.add,
.primary {
  border: 0;
  background: #b61f2a;
  color: white;
  border-radius: 14px;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 700;
}
.add:disabled,
.primary:disabled {
  opacity: 0.5;
}
.quick-tools {
  border-top: 1px solid #f0ece8;
  padding-top: 10px;
  margin-top: 7px;
  color: #9c938d;
  font-size: 12px;
}
.text-button {
  border: 0;
  background: none;
  color: #b61f2a;
  font-weight: 700;
  padding: 4px 0;
}
.options {
  border-top: 1px solid #eee8e4;
  margin-top: 12px;
  padding-top: 16px;
  display: grid;
  gap: 15px;
}
.options label,
.field label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #665d58;
}
.options textarea,
.options input[type="datetime-local"],
.options select,
.field textarea,
.field input,
.field select {
  width: 100%;
  border: 1px solid #e9e2dc;
  border-radius: 13px;
  padding: 12px;
  background: #faf9f7;
  color: #292421;
  outline-color: #b61f2a;
}
.options textarea {
  resize: vertical;
}
.two {
  align-items: start;
  gap: 12px;
}
.two > label {
  width: 50%;
}
.photo-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.picker {
  display: grid;
  place-items: center;
  border: 1px dashed #d9c9bf;
  border-radius: 13px;
  padding: 12px;
  color: #b61f2a;
  min-height: 45px;
}
.photo-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}
.photo-preview-item {
  display: grid;
  gap: 4px;
  max-width: 90px;
}
.photo-hint {
  flex-basis: 100%;
  color: #78716c;
  margin: 6px 0;
}
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.photo-gallery a {
  min-width: 0;
}
.photo-gallery .detail-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin: 0;
}
.photo-preview img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
}
.photo-preview button {
  border: 0;
  background: none;
  color: #b61f2a;
  font-weight: 700;
}
.toggle-row {
  min-height: 42px;
  font-size: 14px;
  font-weight: 650;
}
.toggle-row input {
  appearance: none;
  width: 44px;
  height: 27px;
  border-radius: 20px;
  background: #ded7d2;
  position: relative;
  transition: 0.2s;
}
.toggle-row input:after {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: 0.2s;
  box-shadow: 0 1px 3px #0002;
}
.toggle-row input:checked {
  background: #b61f2a;
}
.toggle-row input:checked:after {
  transform: translateX(17px);
}
.repeat-panel {
  display: grid;
  gap: 10px;
}
.weekdays {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.weekdays button {
  border: 1px solid #e2d9d3;
  border-radius: 10px;
  background: #fff;
  padding: 9px 5px;
  min-width: 39px;
}
.weekdays button.active {
  background: #b61f2a;
  color: white;
  border-color: #b61f2a;
}
.list-head {
  margin: 31px 3px 18px;
}
.list-head h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
  margin: 0;
}
.list-head p {
  margin: 3px 0 0;
  color: #8e8580;
  font-size: 13px;
}
.list-head .icon-button {
  background: #eee6e0;
  color: #a6353c;
}
.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.filter,
.responsibility-filter {
  border: 0;
  border-radius: 12px;
  background: #ece7e2;
  color: #756b65;
  padding: 9px 6px;
  white-space: normal;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
  min-height: 42px;
}
.filter.active,
.responsibility-filter.active {
  background: #b61f2a;
  color: white;
}
.responsibility-filters {
  margin-top: 9px;
}
.responsibility-filter {
  font-size: 12px;
  min-height: 42px;
  padding: 8px 5px;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 15px 0;
  background: #fff;
  border: 1px solid #ece6e1;
  border-radius: 14px;
  padding: 0 13px;
  color: #a79d96;
}
.search-wrap span {
  font-size: 22px;
}
.search-wrap input {
  border: 0;
  outline: 0;
  min-width: 0;
  width: 100%;
  height: 43px;
  background: transparent;
}
.task-list {
  display: grid;
  gap: 10px;
  min-height: 104px;
  position: relative;
}
.task-list.is-loading::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #b61f2a, transparent);
  animation: list-loading 1.3s ease-in-out infinite;
  pointer-events: none;
}
.list-skeleton {
  min-height: 148px;
  padding: 18px;
  display: grid;
  gap: 14px;
  border: 1px solid #efeae5;
  border-radius: 18px;
  background: white;
}
.list-skeleton span {
  height: 14px;
  width: 70%;
  border-radius: 8px;
  background: #f1ece8;
}
.list-skeleton span:nth-child(2) {
  width: 52%;
}
.list-skeleton span:nth-child(3) {
  width: 62%;
}
@keyframes list-loading {
  0%,
  100% {
    opacity: 0.2;
    transform: scaleX(0.4);
  }
  50% {
    opacity: 0.8;
    transform: scaleX(1);
  }
}
.task-list.reminder-mode,
.reminder-panel {
  display: block;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #efeae5;
  border-radius: 18px;
  box-shadow: 0 3px 12px #4b2c1708;
}
.waiting-subsection {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.waiting-subsection h3 {
  margin: 10px 4px 0;
  color: #746860;
  font-size: 13px;
  font-weight: 700;
}
.reminder-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.reminder-row {
  display: flex;
  align-items: stretch;
  position: relative;
  min-width: 0;
  min-height: 66px;
  background: #fff;
  transition:
    opacity 0.18s ease,
    max-height 0.18s ease,
    transform 0.18s ease;
  max-height: 600px;
}
.reminder-row + .reminder-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 57px;
  right: 14px;
  border-top: 1px solid #f0ece8;
}
.reminder-row.is-leaving {
  opacity: 0;
  max-height: 0;
  min-height: 0;
  transform: translateX(8px);
  overflow: hidden;
}
.reminder-complete {
  border: 0;
  background: transparent;
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  align-self: flex-start;
  cursor: pointer;
}
.reminder-complete:disabled {
  cursor: default;
}
.reminder-circle {
  width: 24px;
  height: 24px;
  border: 2px solid #cfc3bb;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 15px;
  line-height: 1;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}
.reminder-circle::after {
  content: "✓";
  opacity: 0;
  transform: scale(0.3);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}
.reminder-row.is-checking .reminder-circle {
  background: #5d9b6b;
  border-color: #5d9b6b;
  transform: scale(1.08);
}
.reminder-row.is-checking .reminder-circle::after {
  opacity: 1;
  transform: scale(1);
}
.reminder-row:not(.is-checking) .reminder-complete:disabled .reminder-circle {
  opacity: 0.45;
}
.reminder-open {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  min-height: 60px;
  padding: 10px 14px 10px 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}
.reminder-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}
.reminder-title {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.32;
  overflow-wrap: anywhere;
}
.reminder-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  color: #8d837d;
  font-size: 11px;
  line-height: 1.35;
  min-width: 0;
}
.reminder-meta > span {
  overflow-wrap: anywhere;
}
.reminder-meta > span + span::before {
  content: "·";
  margin-right: 7px;
  color: #c6bdb7;
}
.reminder-due.overdue,
.reminder-urgent {
  color: #b61f2a;
  font-weight: 700;
}
.reminder-due.today {
  color: #9a6200;
  font-weight: 700;
}
.reminder-chevron {
  flex: none;
  color: #bcaea5;
  font-size: 21px;
  line-height: 1;
  align-self: center;
}
.reminder-open:focus-visible,
.reminder-complete:focus-visible {
  outline: 2px solid #b61f2a;
  outline-offset: -3px;
  border-radius: 10px;
}
@media (prefers-reduced-motion: reduce) {
  .task-list.is-loading::after,
  .reminder-row,
  .reminder-circle,
  .reminder-circle::after {
    animation: none;
    transition: none;
  }
}
.task {
  display: flex;
  align-items: start;
  gap: 12px;
  background: white;
  border: 1px solid #efeae5;
  border-radius: 19px;
  padding: 15px 14px;
  text-align: left;
  width: 100%;
  box-shadow: 0 3px 9px #4b2c1708;
}
.task-check {
  border: 2px solid #d3c9c2;
  border-radius: 50%;
  height: 25px;
  width: 25px;
  flex: none;
  margin-top: 2px;
  display: grid;
  place-items: center;
  color: white;
  background: white;
  font-size: 13px;
}
.task-check.done {
  background: #5d9b6b;
  border-color: #5d9b6b;
}
.task-body {
  min-width: 0;
  flex: 1;
}
.task-main {
  gap: 7px;
}
.task-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}
.task-meta {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
  color: #9d938c;
  font-size: 11px;
}
.pill {
  background: #f5eee8;
  border-radius: 7px;
  padding: 4px 6px;
  color: #78685e;
  font-weight: 700;
}
.pill.red {
  background: #fff0ef;
  color: #b61f2a;
}
.pill.amber {
  background: #fff3d8;
  color: #9a6200;
}
.task-chevron {
  color: #bdafa6;
  font-size: 22px;
}
.empty {
  border: 1px dashed #ddcec4;
  border-radius: 20px;
  text-align: center;
  color: #8c8078;
  padding: 36px 18px;
  background: #fffcf8;
}
.empty strong {
  display: block;
  color: #51423c;
  margin-bottom: 6px;
}
.state {
  text-align: center;
  padding: 52px 24px;
  color: #70655f;
}
.state h2 {
  color: #342b27;
  font-size: 24px;
}
.state p {
  line-height: 1.55;
}
.shade {
  position: fixed;
  inset: 0;
  background: #21191582;
  z-index: 10;
}
.sheet {
  position: fixed;
  z-index: 11;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 26px 26px 0 0;
  width: min(680px, 100%);
  max-height: 91dvh;
  overflow: auto;
  padding: 11px 20px calc(24px + env(safe-area-inset-bottom));
  animation: rise 0.22s ease-out;
}
@keyframes rise {
  from {
    transform: translate(-50%, 100%);
  }
  to {
    transform: translate(-50%, 0);
  }
}
.handle {
  width: 38px;
  height: 4px;
  background: #ddd4ce;
  border-radius: 5px;
  margin: 0 auto 22px;
}
.detail-header {
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.detail-header h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.close {
  border: 0;
  background: #f3eeea;
  border-radius: 50%;
  font-size: 20px;
  width: 36px;
  height: 36px;
  flex: none;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 20px;
}
.detail-block {
  border-top: 1px solid #f0ece8;
  padding: 16px 0;
}
.detail-block h3 {
  font-size: 13px;
  color: #9b8f87;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 7px;
}
.detail-block p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}
.detail-photo {
  max-width: 100%;
  max-height: 240px;
  border-radius: 14px;
  object-fit: cover;
}
.detail-actions {
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.detail-actions button {
  flex: 1;
  min-height: 46px;
  border-radius: 13px;
  border: 1px solid #e4d9d2;
  background: #fff;
  padding: 10px;
  font-weight: 700;
}
.detail-actions .primary {
  background: #b61f2a;
  color: white;
  border-color: #b61f2a;
  min-width: 160px;
}
.field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.field label {
  font-size: 13px;
}
.comment {
  background: #f8f5f2;
  padding: 12px;
  border-radius: 12px;
  margin: 8px 0;
  font-size: 13px;
}
.comment small {
  display: block;
  color: #928780;
  margin-top: 5px;
}
.owner-list {
  display: grid;
  gap: 10px;
}
.owner-row {
  border: 1px solid #e9e2dc;
  border-radius: 14px;
  padding: 12px;
}
.owner-row strong {
  display: block;
}
.owner-row small {
  color: #8d827b;
}
.owner-row .detail-actions {
  margin-top: 7px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  background: #292421;
  color: white;
  padding: 12px 17px;
  border-radius: 12px;
  z-index: 20;
  white-space: nowrap;
  box-shadow: 0 8px 30px #0003;
}
@media (min-width: 680px) {
  .hero {
    padding-left: 30px;
    padding-right: 30px;
  }
  .main {
    padding-left: 26px;
    padding-right: 26px;
  }
}

@media (max-width: 500px) {
  .two {
    display: grid;
    grid-template-columns: 1fr;
  }
  .two > label {
    width: 100%;
  }
}
