:root {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: #1D2132;
  background: #F8F7F5;
  font-synthesis: none;
  --bg: #F8F7F5;
  --card: #fff;
  --ink: #1D2132;
  --muted: #686977;
  --navy: #353F5B;
  --wine: #8F5364;
  --sage: #A3BFB1;
  --lilac: #ECEAF1;
  --line: #E7E5EA;
  --soft: #F2F3F1;
  --shadow: 0 8px 28px #353f5b0c;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: env(safe-area-inset-top) 0 calc(100px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}

body[data-theme=dark] {
  --bg: #191D2B;
  --card: #23283A;
  --ink: #F1EFF4;
  --muted: #BCBAC8;
  --navy: #B6C3E4;
  --wine: #DCA6B7;
  --sage: #7B9C8D;
  --lilac: #363749;
  --line: #3C4050;
  --soft: #2D3442;
  --shadow: none;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
}

button,input,select,textarea {
  font: inherit;
}

button,a,input,select,textarea {
  touch-action: manipulation;
}

button,a,select {
  min-height: 48px;
}

button {
  border: 0;
  cursor: pointer;
  background: var(--lilac);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 600;
}

button:disabled {
  opacity: .45;
  cursor: default;
}

a {
  color: var(--navy);
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
}

input,select,textarea {
  width: 100%;
  padding: 13px 14px;
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 12px;
  font-size: 16px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

label {
  display: block;
  font-weight: 600;
  margin: 16px 0 8px;
}

p {
  line-height: 1.55;
  margin: 8px 0 14px;
}

h1,h2,h3,h4 {
  line-height: 1.2;
  letter-spacing: -.025em;
  margin: 0;
}

h1 {
  font-size: 32px;
  font-weight: 650;
}

h2 {
  font-size: 23px;
  font-weight: 650;
}

h3 {
  font-size: 19px;
}

h4 {
  font-size: 16px;
}

small,.small {
  font-size: 13px;
  line-height: 1.4;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--wine);
  margin-bottom: 8px;
}

.app-header {
  max-width: 600px;
  margin: auto;
  padding: 17px 22px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: flex;
  gap: 1px;
  align-items: center;
  text-decoration: none;
  font-family: Georgia,serif;
  font-size: 33px;
  font-weight: 500;
  letter-spacing: -1.5px;
}

.wordmark i {
  font-size: 21px;
  margin-left: 6px;
  color: var(--wine);
  font-style: normal;
}

.connection {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  text-align: right;
}

.connection:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}

main {
  max-width: 600px;
  margin: auto;
  padding: 20px 20px 14px;
}

.page-intro {
  margin: 3px 2px 26px;
}

.page-intro p {
  color: var(--muted);
  margin: 8px 0 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 2px 13px;
  gap: 12px;
}

.section-title .eyebrow {
  margin: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 23px;
  padding: 19px;
  margin: 13px 0;
  box-shadow: var(--shadow);
}

.card.today-card {
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 650;
  padding: 6px 9px;
  border-radius: 20px;
  background: var(--soft);
  color: var(--muted);
}

.pill.pending {
  background: var(--lilac);
  color: var(--wine);
}

.day-date {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}

.outfit-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 9px;
}

.piece {
  min-width: 0;
}

.piece-box {
  aspect-ratio: 4/5;
  background: var(--soft);
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.piece-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

body[data-theme=dark] .piece-box img {
  mix-blend-mode: normal;
}

.piece-box .piece-letter {
  font-family: Georgia,serif;
  font-size: 38px;
  color: var(--muted);
  opacity: .5;
}

.piece-name {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin: 7px 1px 0;
  overflow-wrap: anywhere;
}

.piece-category {
  font-size: 10px;
  display: block;
  color: var(--muted);
  margin-top: 3px;
  text-transform: capitalize;
}

.outfit-grid.large {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}

.outfit-grid.large .piece-box {
  aspect-ratio: 3/4;
}

.outfit-grid.large .piece-name {
  font-size: 12px;
}

.outfit-accessories {
  margin: 15px 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.button-row {
  display: flex;
  gap: 9px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.button-row>* {
  flex: 1;
}

.primary {
  background: var(--navy);
  color: var(--card);
}

.wine {
  background: var(--wine);
  color: var(--card);
}

.quiet {
  background: transparent;
  color: var(--navy);
  padding: 10px 0;
}

.wide {
  width: 100%;
}

.compact {
  padding: 10px 12px;
  font-size: 13px;
}

.outline {
  background: transparent;
  border: 1px solid var(--line);
}

.text-button {
  font-size: 13px;
  background: none;
  padding: 8px;
  color: var(--wine);
}

.meal-line {
  display: grid;
  grid-template-columns: 76px minmax(0,1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
}

.meal-line:last-child {
  border: 0;
}

.meal-line>span:first-child {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-top: 2px;
}

.dinner-button {
  text-align: left;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  background: transparent;
  min-height: 48px;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.35;
}

.dinner-button .arrow {
  float: right;
  margin-left: 5px;
}

.prep {
  background: var(--soft);
  padding: 14px;
  border-radius: 13px;
  margin-top: 16px;
}

.prep .eyebrow {
  color: var(--muted);
  margin-bottom: 6px;
}

.prep p {
  font-size: 13px;
  margin: 0;
}

.heads-up {
  background: var(--lilac);
  border: 0;
  font-size: 14px;
}

.tomorrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.tomorrow>div+div {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.tomorrow p {
  font-size: 13px;
  margin: 6px 0 0;
}

.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  padding: 7px 7px calc(8px + env(safe-area-inset-bottom));
  z-index: 5;
}

.tabs[hidden] {
  display: none;
}

.tabs button {
  flex: 1;
  max-width: 110px;
  border-radius: 12px;
  min-height: 58px;
  background: transparent;
  color: var(--muted);
  padding: 5px 3px;
  font-size: 10px;
  letter-spacing: .02em;
  display: grid;
  place-items: center;
  gap: 3px;
}

.tabs button svg {
  width: 22px;
  height: 22px;
}

.tabs button[aria-current=page] {
  color: var(--wine);
  background: var(--lilac);
}

.segments {
  display: flex;
  padding: 4px;
  background: var(--lilac);
  border-radius: 15px;
  gap: 3px;
  margin: 4px 0 20px;
}

.segments button {
  flex: 1;
  background: transparent;
  font-size: 13px;
  padding: 9px;
  min-height: 48px;
  border-radius: 11px;
}

.segments button[aria-pressed=true] {
  background: var(--card);
  box-shadow: 0 2px 7px #00000008;
}

.empty {
  text-align: center;
  padding: 24px 10px;
  color: var(--muted);
}

.loading {
  text-align: center;
  padding: 60px 10px;
  color: var(--muted);
}

.monogram {
  display: inline-grid;
  place-items: center;
  font-family: Georgia,serif;
  background: #353F5B;
  color: white;
  width: 76px;
  height: 76px;
  border-radius: 23px;
  font-size: 49px;
  margin-bottom: 20px;
}

.setup {
  text-align: center;
  padding: 20px 4px;
}

.setup .card {
  text-align: left;
}

.setup h1 {
  font-size: 30px;
}

.setup-code {
  font-size: 24px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.install-steps {
  padding-left: 22px;
  line-height: 1.7;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: calc(90px + env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  max-width: 560px;
  margin: auto;
  border-radius: 17px;
  background: var(--navy);
  color: var(--card);
  padding: 13px 16px;
  z-index: 20;
  box-shadow: 0 8px 30px #0002;
  font-size: 14px;
  align-items: center;
  gap: 12px;
}

.toast:not([hidden]) {
  display: flex;
}

.toast span {
  flex: 1;
}

.toast button {
  background: transparent;
  color: inherit;
  min-height: 48px;
  padding: 8px;
  text-decoration: underline;
}

.sheet {
  position: fixed;
  top: auto;
  bottom: 0;
  width: 100%;
  max-width: 600px;
  max-height: 90dvh;
  padding: 22px 22px calc(28px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--bg);
  color: var(--ink);
  margin: 0 auto;
  overflow: auto;
}

.sheet::backdrop {
  background: #10162666;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.close {
  font-size: 23px;
  width: 48px;
  padding: 0;
  flex-shrink: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.choice {
  border: 2px solid transparent;
  background: var(--card);
  padding: 10px;
  text-align: left;
}

.choice[aria-pressed=true] {
  border-color: var(--wine);
  background: var(--lilac);
}

.choice .piece-box {
  max-height: 125px;
}

.not-today {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.not-today span {
  width: 100%;
  font-size: 12px;
  color: var(--muted);
}

.not-today button {
  font-size: 12px;
  min-height: 48px;
  background: var(--soft);
  font-weight: 500;
}

.closet-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 17px 10px;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.swatch {
  width: 100%;
  height: 65px;
  border-radius: 12px;
  display: block;
  margin-bottom: 8px;
}

.recipe-item {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  width: 100%;
  margin: 9px 0;
  padding: 13px;
  border-radius: 17px;
}

.recipe-item .thumbnail {
  width: 60px;
  height: 65px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
  background: var(--soft);
}

.recipe-item strong {
  display: block;
  font-size: 15px;
}

.recipe-item small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}

.recipe-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 18px;
  margin: 6px 0 15px;
}

.recipe-body {
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.recipe-body h3,.recipe-body h4 {
  margin: 22px 0 9px;
}

.recipe-body ul,.recipe-body ol {
  padding-left: 22px;
}

.recipe-body li {
  margin: 7px 0;
}

.recipe-body .line {
  margin: 9px 0;
  white-space: pre-wrap;
}

.person {
  display: block;
  font-size: 13px;
  margin: 3px 0;
}

.person b {
  font-weight: 600;
}

.list-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 12px 2px;
  min-height: 54px;
  background: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  font-size: 15px;
  font-weight: 400;
}

.list-item:last-child {
  border: 0;
}

.check {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1.5px solid var(--sage);
  border-radius: 8px;
  font-size: 13px;
}

.list-item[aria-pressed=true] {
  color: var(--muted);
}

.list-item[aria-pressed=true] .item-text {
  text-decoration: line-through;
}

.list-item[aria-pressed=true] .check {
  background: var(--sage);
  color: var(--ink);
}

.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.setting:last-child {
  border: 0;
}

.setting p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

.setting select {
  width: auto;
  min-width: 105px;
}

.setting .pill {
  white-space: nowrap;
}

.status-copy {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.error {
  color: var(--wine);
  font-size: 14px;
  line-height: 1.5;
}

.week-picker {
  margin: 10px 0 18px;
}

.note-list {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.note-list p {
  margin: 8px 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.app-footer {
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  margin: 28px 0 10px;
}

svg {
  max-width: 100%;
}

@media(min-width:430px) {
  main {
    padding-left: 24px;
    padding-right: 24px;
  }

  .app-header {
    padding-left: 26px;
    padding-right: 26px;
  }

  .outfit-grid.large .piece-box {
    aspect-ratio: 4/5;
  }

}

@media(prefers-reduced-motion:no-preference) {
  .card {
    animation: arrive .18s ease-out;
  }

  @keyframes arrive {
    from {
      opacity: .75;
      transform: translateY(3px);
    }

    to {
      opacity: 1;
      transform: none;
    }

  }

}

.outfit-grid:has(.piece:nth-child(4)) {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.outfit-grid:has(.piece:nth-child(4)) .piece-box {
  aspect-ratio: 5/4;
}

.outfit-grid.large:has(.piece:nth-child(4)) .piece-box {
  aspect-ratio: 1/1;
}
