:root {
  color-scheme:light;
  --paper:#f8f6f2;
  --card:#fffcf8;
  --ink:#28211f;
  --sub:#6c5d58;
  --line:#e8dfd9;
  --red:#a3483c;
  --blush:#f3e1d9;
  --shadow:0 16px 55px #47261812;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--paper);
  color:var(--ink);
}
* {
  box-sizing:border-box;
}
[hidden] {
  display:none!important;
}
body {
  margin:0;
}
button,input,textarea,select {
  font:inherit;
}
button {
  cursor:pointer;
  color:inherit;
}
button:disabled {
  opacity:.65;
  cursor:wait;
}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:2px solid var(--red);
  outline-offset:3px;
}
a {
  color:var(--red);
  text-underline-offset:4px;
}
h1,h2,h3,p {
  margin:0;
}
p {
  line-height:1.65;
}
button {
  border:0;
  background:none;
}
.bar,#screen,nav {
  width:min(100% - 40px,900px);
  margin:auto;
}
.bar {
  height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-top:env(safe-area-inset-top);
}
.wordmark {
  font-size:21px;
  font-weight:760;
  padding:0;
  letter-spacing:.06em;
}
.wordmark span {
  color:var(--red);
  font-size:13px;
}
.avatar {
  border-radius:50%;
  background:var(--blush);
  color:var(--red);
  font-size:12px;
  font-weight:750;
  width:42px;
  height:42px;
}
.hero {
  border-radius:28px;
  background:var(--blush);
  padding:34px;
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:224px;
}
.hero h1 {
  font-size:clamp(29px,6vw,49px);
  letter-spacing:-.04em;
}
.hero p {
  margin:9px 0 20px;
  color:var(--sub);
  max-width:20em;
}
.hero svg {
  width:30%;
  max-width:210px;
  color:var(--red);
  flex:none;
  margin-left:12px;
}
.primary,.secondary {
  border-radius:13px;
  padding:10px 16px;
  min-height:44px;
  font-weight:650;
  font-size:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.primary {
  background:var(--red);
  color:white;
}
.secondary {
  background:var(--blush);
  color:#823b32;
}
.quiet {
  color:var(--sub);
  min-height:44px;
  padding:6px 12px;
}
.section-head {
  margin:32px 0 13px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.section-head h2 {
  font-size:22px;
}
.tiles {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.tile {
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  text-align:left;
  padding:12px;
  display:flex;
  align-items:center;
  gap:11px;
  min-height:68px;
}
.tile:hover,.item:hover {
  border-color:#cfaea2;
}
.tile b {
  display:block;
  font-size:15px;
}
.tile small,.muted,.meta {
  color:var(--sub);
  font-size:13px;
}
.glyph {
  width:36px;
  height:36px;
  border-radius:11px;
  background:var(--blush);
  color:#853e34;
  display:grid;
  place-items:center;
  flex:none;
  font-size:17px;
}
.tile:nth-child(4n+3) .glyph,.tile:nth-child(4n+4) .glyph {
  background:#e5e9dc;
  color:#47573f;
}
.tile .arrow {
  margin-left:auto;
  color:var(--sub);
}
#screen {
  padding-bottom:calc(104px + env(safe-area-inset-bottom));
}
nav {
  position:fixed;
  bottom:max(12px,env(safe-area-inset-bottom));
  left:50%;
  transform:translateX(-50%);
  width:min(calc(100% - 36px),430px);
  display:flex;
  justify-content:space-around;
  background:#fffcf8f5;
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow);
  border:1px solid var(--line);
  border-radius:21px;
  padding:5px;
  z-index:2;
}
nav button {
  font-size:12px;
  min-height:49px;
  min-width:78px;
  border-radius:15px;
  color:var(--sub);
  display:grid;
  place-content:center;
  gap:1px;
}
nav button span {
  font-size:20px;
  line-height:1;
}
nav button[aria-current],nav button:hover {
  color:var(--red);
  background:var(--blush);
}
.page-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin:11px 0 19px;
}
.page-head h1 {
  font-size:clamp(26px,6vw,38px);
}
.filters,.actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0;
  align-items:center;
}
.filters input,.filters select {
  width:auto;
  max-width:100%;
}
.filters input {
  flex:1;
  min-width:130px;
}
.list {
  display:grid;
  gap:10px;
}
.item {
  display:flex;
  align-items:center;
  text-align:left;
  gap:14px;
  width:100%;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:17px;
  padding:12px;
  min-height:74px;
}
.item img {
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:10px;
}
.item div {
  min-width:0;
}
.item strong,.item .meta {
  display:block;
  overflow-wrap:anywhere;
}
.item .meta {
  margin-top:5px;
}
.empty {
  background:var(--card);
  border:1px dashed #d9c9c0;
  border-radius:17px;
  text-align:center;
  padding:27px 15px;
  color:var(--sub);
}
dialog {
  border:1px solid var(--line);
  border-radius:23px;
  background:var(--card);
  color:var(--ink);
  max-height:88dvh;
  width:min(92%,560px);
  box-shadow:var(--shadow);
  padding:19px;
}
dialog::backdrop {
  background:#281b1973;
}
.dialog-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
  gap:8px;
}
.dialog-head h2 {
  font-size:22px;
  overflow-wrap:anywhere;
}
#close {
  font-size:27px;
  min-width:44px;
  min-height:44px;
  border-radius:50%;
  background:var(--paper);
  line-height:1;
}
.field-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.wide {
  grid-column:1/-1;
}
label {
  display:grid;
  gap:5px;
  font-size:13px;
  font-weight:650;
  min-width:0;
}
input,textarea,select {
  width:100%;
  min-height:43px;
  border-radius:10px;
  border:1px solid var(--line);
  padding:8px 10px;
  background:white;
  color:var(--ink);
  font-size:16px;
}
textarea {
  resize:vertical;
  min-height:85px;
}
input[type=checkbox] {
  min-height:0;
  width:auto;
  accent-color:var(--red);
}
.checkbox {
  display:flex;
  align-items:center;
  gap:8px;
}
.error {
  color:#a02729;
  font-size:13px;
}
.notes {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  margin:12px 0;
}
.photos {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(95px,1fr));
  gap:8px;
  margin:12px 0;
}
.photos img {
  display:block;
  width:100%;
  height:110px;
  object-fit:cover;
  border-radius:10px;
}
.photos figure {
  margin:0;
}
.photos .quiet {
  padding-inline:2px;
  font-size:12px;
}
.login {
  max-width:410px;
  margin:clamp(35px,13vh,130px) auto 25px;
  padding:25px;
}
.login .brand {
  width:67px;
  height:67px;
  background:var(--blush);
  border-radius:20px;
  display:grid;
  place-content:center;
  display:flex;
  align-items:center;
  gap:3px;
  color:var(--red);
  font-weight:800;
  font-size:17px;
  margin-bottom:19px;
}
.brand span {
  font-size:12px;
}
.login h1 {
  font-size:36px;
}
.login>p {
  color:var(--sub);
  margin:7px 0 22px;
}
.login form {
  display:grid;
  gap:13px;
}
.danger {
  color:#a02729;
}
#toast {
  position:fixed;
  z-index:5;
  top:max(16px,env(safe-area-inset-top));
  left:50%;
  transform:translateX(-50%);
  background:var(--ink);
  color:#fff;
  padding:10px 17px;
  border-radius:20px;
  max-width:90%;
  box-shadow:var(--shadow);
}
#toast:empty {
  display:none;
}
.milestone {
  font-size:26px;
  font-weight:750;
  color:var(--red);
  margin:10px 0;
}
.check-list {
  color:var(--sub);
  font-size:13px;
  margin:8px 0;
}
progress {
  width:100%;
  accent-color:var(--red);
}
@media(max-width:500px) {
  .bar,#screen {
    width:calc(100% - 28px);
  }
  .bar {
    height:68px;
  }
  .hero {
    padding:22px 17px;
    min-height:178px;
    border-radius:21px;
  }
  .hero p {
    font-size:13px;
  }
  .hero svg {
    width:24%;
    margin-left:2px;
  }
  .tile {
    gap:7px;
    padding:8px;
  }
  .tile .arrow {
    display:none;
  }
  .tile b {
    font-size:14px;
  }
  .tile small {
    font-size:12px;
  }
}
