.auth-screen {
  display: none;
}

.auth-screen:not(.is-visible) {
  display: none;
}

.auth-locked .auth-screen {
  display: grid;
}

.item-photo {
  height: auto;
  aspect-ratio: 4 / 5;
}

.care-label-editor {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 9px;
}

.care-label-preview {
  width: 82px;
  height: 102px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1eeeb;
  border: 1px solid #e5e0dc;
}

.care-label-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.care-label-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.care-label-copy small {
  color: #aaa5a4;
  font-size: 10px;
  line-height: 1.45;
}

.care-label-copy textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid #e5e0dc;
  border-radius: 9px;
  background: #fff;
  color: #373238;
  padding: 9px 10px;
  outline: 0;
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
}

.care-label-copy textarea:focus {
  border-color: #a79ce9;
  box-shadow: 0 0 0 3px #eeeaff;
}

.care-label-remove {
  justify-self: start;
  color: #c37c76;
  background: none;
  padding: 0;
  font-size: 10px;
}

.care-label-remove:hover {
  text-decoration: underline;
}

.care-label-empty {
  grid-column: 1 / -1;
  color: #aaa5a4;
  font-size: 10px;
  padding: 5px 0;
}

.care-label-loading {
  color: #6659cf;
}

.detail-care-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.detail-care-label img {
  width: 66px;
  height: 82px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
  background: #f1eeeb;
}

.detail-care-label span {
  display: block;
  color: #777074;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 6px;
}

.detail-care-label p {
  margin: 0;
  color: #999395;
  font-size: 11px;
  line-height: 1.5;
}

.detail-care-label .muted {
  color: #aaa5a4;
}

@media (max-width: 900px) {
  .care-label-editor {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .care-label-preview {
    width: 70px;
    height: 88px;
  }
}

.skeleton-card {
  background: #fff;
  border: 1px solid #eeeae7;
  border-radius: 15px;
  overflow: hidden;
}

.skeleton-shimmer {
  background: linear-gradient(100deg, #f1eeeb 25%, #faf8f6 42%, #f1eeeb 60%);
  background-size: 240% 100%;
  animation: skeleton-shimmer 1.35s ease-in-out infinite;
}

.skeleton-photo {
  height: 143px;
}

.skeleton-body {
  padding: 14px 15px 18px;
}

.skeleton-line {
  height: 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.skeleton-line-short { width: 34%; }
.skeleton-line-title { width: 82%; height: 16px; margin-top: 13px; }
.skeleton-line-detail { width: 62%; }
.skeleton-line-price { width: 29%; margin-top: 21px; }

@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(39, 32, 49, .32);
}

.detail-backdrop[hidden] {
  display: none;
}

.detail-modal {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 26px;
  background: #fbfaf8;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(36, 29, 48, .25);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.detail-header h2 {
  max-width: 560px;
  margin: 7px 0 0;
  font-size: 25px;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-edit {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #e6e0dc;
  border-radius: 11px;
  background: #f0edff;
  color: #6659cf;
  font-size: 21px;
  line-height: 1;
}

.detail-edit:hover {
  background: #e5e0ff;
  transform: translateY(-1px);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(190px, .85fr) minmax(0, 1.15fr);
  gap: 24px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
}

.detail-gallery img,
.detail-photo-empty {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  object-fit: cover;
  background: #f1eeeb;
}

.detail-photo-empty {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  color: #c8c0b9;
  font-family: 'Playfair Display', serif;
  font-size: 42px;
}

.detail-info {
  min-width: 0;
}

.detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.detail-category {
  min-width: 0;
  overflow: hidden;
  color: #a7a1a1;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 99px;
  background: #eeeaff;
  color: #6b62b7;
  font-size: 10px;
  font-weight: 600;
}

.detail-status.is-home {
  background: #edf5ed;
  color: #668a69;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid #eeeae7;
  border-bottom: 1px solid #eeeae7;
}

.detail-field {
  display: grid;
  gap: 4px;
}

.detail-field span,
.detail-notes > span {
  color: #aaa3a4;
  font-size: 10px;
}

.detail-field strong {
  color: #514b51;
  font-size: 12px;
}

.detail-price {
  margin: 20px 0;
  color: #2f2a31;
  font-size: 22px;
  font-weight: 600;
}

.detail-notes {
  padding-top: 16px;
  border-top: 1px solid #eeeae7;
}

.detail-notes p {
  margin: 7px 0 0;
  color: #77727a;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  color: #6659cf;
  font-size: 11px;
  font-weight: 600;
}

.detail-link:hover {
  color: #5143b0;
}

@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y;
  }

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

  .auth-locked .auth-screen {
    display: block !important;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .auth-panel {
    width: 100%;
    box-sizing: border-box;
    min-height: auto;
    padding: 27px 22px 0;
  }

  .auth-copy {
    max-width: 100%;
    margin: 52px 0 25px;
  }

  .auth-copy h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .auth-card-wrap {
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    padding: 0 18px 30px;
    overflow: hidden;
  }

  .auth-visual {
    display: none;
  }

  .auth-form {
    box-sizing: border-box;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 25px 20px 22px;
  }

  .skeleton-card {
    min-height: 310px;
  }

  .skeleton-photo {
    height: 185px;
  }

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

  .item-photo {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .item-body {
    padding: 10px 10px 11px;
  }

  .item-meta {
    font-size: 8px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .item-title {
    display: -webkit-box;
    min-height: 31px;
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .item-sub {
    display: none;
  }

  .item-bottom {
    margin-top: 11px;
  }

  .price {
    font-size: 11px;
  }

  .item-qty {
    font-size: 8px;
  }

  .detail-backdrop {
    place-items: end center;
    padding: 10px;
  }

  .detail-modal {
    width: 100%;
    max-height: calc(100svh - 20px);
    padding: 20px 16px 18px;
    border-radius: 17px;
  }

  .detail-header {
    margin-bottom: 16px;
  }

  .detail-header h2 {
    max-width: 245px;
    font-size: 21px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .detail-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 220px;
    overflow: hidden;
  }

  .detail-gallery img,
  .detail-photo-empty {
    aspect-ratio: 1 / 1;
    border-radius: 9px;
  }

  .detail-photo-empty {
    min-height: 150px;
  }

  .detail-topline {
    margin-bottom: 15px;
  }

  .detail-facts {
    padding: 12px 0;
    gap: 10px;
  }

  .detail-price {
    margin: 15px 0;
    font-size: 20px;
  }
}
