/* Выбор роли */
.role {
  gap: 28px;
  justify-content: center;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 26px;
}

.brand__name {
  font-size: 1.8rem;
  font-weight: 700;
}

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

.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  padding: 18px 10px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: 26px;
}

.tile--primary {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
}

.tile__sub {
  font-size: 0.9rem;
  font-weight: 400;
}

/* Главный экран жителя */
.home__actions {
  display: grid;
  gap: 14px;
}

.cards {
  display: grid;
  gap: 12px;
}

.card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-lg);
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 700;
}

.card__date {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.card__text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card__more {
  display: flex;
  gap: 4px;
  align-items: center;
  font-weight: 600;
  color: var(--primary);
}

.empty {
  padding: 22px 18px;
  color: var(--ink-soft);
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
}

/* Форма заявки */
.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.thumb {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.thumb img,
.photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

/* Фото-кнопка: нажатие открывает фото во весь экран */
.photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--radius);
  cursor: zoom-in;
}

.photo-btn .photo {
  display: block;
}

/* Просмотр фото: тёмный фон в любой теме, фото целиком, не обрезается */
.lightbox {
  align-items: stretch;
  background: rgba(0, 0, 0, 0.94);
  cursor: zoom-out;
}

.lightbox__box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-height: 0;
  padding: 14px;
}

.lightbox__photo {
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: contain;
}

.thumb__remove {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--danger);
  cursor: pointer;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: 12px;
}

/* Экран «заявка отправлена» */
.sent {
  align-items: stretch;
  text-align: center;
}

.sent__mark {
  display: grid;
  place-items: center;
  align-self: center;
  width: 104px;
  height: 104px;
  margin-top: 12px;
  color: var(--st-done-fg);
  background: var(--st-done-bg);
  border-radius: 50%;
}

.sent__mark--wait {
  color: var(--st-wait-fg);
  background: var(--st-wait-bg);
}

.sent__number {
  font-size: 1.1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Карточка заявки */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  list-style: none;
}

.steps__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
}

.steps__dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.steps__item--reached {
  color: var(--ink);
}

.steps__item--reached .steps__dot {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
}

.facts {
  display: grid;
  gap: 14px;
}

.facts dt {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.facts dd {
  font-size: 1.08rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.stars {
  display: flex;
  gap: 4px;
  justify-content: space-between;
}

.star {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 60px;
  padding: 0;
  color: var(--line-strong);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 12px;
}

.star--on {
  color: var(--star);
}

.star--on svg {
  fill: currentColor;
}

/* О мастерской */
.hours {
  display: grid;
  gap: 8px;
}

.hours__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: space-between;
}

.hours__time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.big-number {
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  user-select: all;
}

/* Пульт для показа: не часть приложения */
.demo {
  flex: none;
  color: var(--ink);
  background: var(--surface);
  border-bottom: 2px solid var(--line);
}

.demo__toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 6px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.demo__body {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 4px 16px 16px;
}

.demo--open .demo__body {
  display: flex;
}

.demo--open .demo__toggle svg {
  transform: rotate(90deg);
}

.demo__about,
.demo__label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.demo__group {
  display: grid;
  gap: 8px;
}

.demo .btn,
.demo .choice {
  min-height: 52px;
  font-size: 0.95rem;
}

@media (min-width: 900px) {
  .demo {
    order: 2;
    width: 340px;
    border: 2px solid var(--line);
    border-radius: var(--radius-lg);
  }

  .demo__toggle {
    font-size: 1.05rem;
    cursor: default;
  }

  .demo__toggle svg {
    display: none;
  }

  .demo__body {
    display: flex;
  }
}

/* Экраны мастера */
.choice--tab {
  flex-direction: column;
  gap: 0;
  font-size: 0.9rem;
}

.choice__count {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

/* Оценка жителя в списке закрытых заявок мастера */
.card__rating {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
  color: var(--star);
}

.card__place {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.big-text {
  font-size: 1.25rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.input--code {
  font-size: 1.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  letter-spacing: 0.35em;
}
