/* V41: counter-anchored human guests with stable faces and outward order tickets. */

.hud-subline .shift-brief {
  position: static;
  flex: 0 0 auto;
  width: auto;
  min-width: 150px;
  min-height: 18px;
  padding: 1px 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  transform: none;
  border-color: rgb(190 147 81 / 64%);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgb(255 224 157 / 8%);
  background: rgb(20 26 42 / 78%);
}

.hud-subline .shift-brief .shift-act {
  min-width: 0;
  padding: 1px 5px;
  font-size: 7px;
}

.hud-subline .shift-brief .shift-copy strong,
.hud-subline .shift-brief .shift-count {
  font-size: 8px;
}

.hud-subline .shift-brief .shift-copy span,
.hud-subline .shift-brief .shift-track {
  display: none;
}

.shop .customer:is(
  .guest-lotus,
  .guest-ink,
  .guest-jade,
  .guest-opera,
  .guest-silver,
  .guest-guardian
):not(.preview) .alien-art {
  object-fit: contain;
  object-position: center top;
  image-rendering: auto;
  filter: saturate(.9) contrast(.96) brightness(.98) sepia(.04);
  animation: none !important;
}

.shop .customer.preview .alien-wrap {
  display: none;
}

.shop .customer:is(
  .guest-lotus,
  .guest-ink,
  .guest-jade,
  .guest-opera,
  .guest-silver,
  .guest-guardian
):not(.preview):not(.urgent):not(.mismatch):not(.serve-ready):not(.served) .alien-wrap {
  animation: none;
  transform: none;
}

.shop .customer:not(.preview) .patience {
  position: static;
  inset: auto;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.game-shell.phase-playing .hud-subline {
  overflow: visible;
}

.hud-subline .shift-brief {
  position: static;
  z-index: auto;
  top: auto;
  left: auto;
  order: 0;
  box-sizing: border-box;
  flex: 0 1 310px;
  width: min(310px, 42vw);
  min-width: 180px;
  height: 16px;
  min-height: 16px;
  padding: 1px 8px 2px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) 2px;
  gap: 0 6px;
  transform: none;
  overflow: hidden;
  border: 1px solid rgb(183 137 70 / 82%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(19 43 53 / 96%), rgb(13 31 39 / 96%));
  box-shadow: inset 0 0 0 1px rgb(255 228 159 / 10%);
  color: #fff1c9;
  text-shadow: 0 1px 2px #100813;
}

.hud-subline .shift-act {
  min-width: 30px;
  padding: 1px 4px;
  font-size: 7px;
  line-height: 1;
}

.hud-subline .shift-copy {
  gap: 5px;
  overflow: hidden;
  white-space: nowrap;
}

.hud-subline .shift-copy strong {
  font-size: 8px;
  line-height: 1;
}

.hud-subline .shift-copy span {
  font-size: 7px;
  line-height: 1;
}

.hud-subline .shift-count {
  font-size: 8px;
  line-height: 1;
}

.hud-subline .shift-track {
  height: 2px;
}

@media (min-width: 721px) and (min-height: 500px) {
  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-wrap {
    top: -8px;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: calc(100% + 25px);
    overflow: hidden;
    align-items: flex-start;
    justify-content: center;
  }

  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure,
  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-art {
    flex: 0 0 auto;
    width: clamp(430px, 35.5vw, 455px);
    height: clamp(430px, 35.5vw, 455px);
  }

  .shop .customer[data-slot="left"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: translateX(4%);
  }

  .shop .customer[data-slot="right"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: translateX(-4%);
  }

  .shop .customer:not(.preview) .speech {
    top: auto;
    bottom: -4px;
    width: 190px;
    height: auto;
    aspect-ratio: 560 / 425;
    padding: 43px 18px 25px 30px;
    grid-template-columns: 52px minmax(0, 1fr);
    transform: none;
  }

  .shop .customer:not(.preview) .order-dish {
    width: 48px;
    height: 48px;
  }

  .shop .customer:not(.preview) .order-line {
    justify-content: space-between;
    gap: 2px;
    font-size: 10px;
  }

  .shop .customer[data-slot="left"]:not(.preview) .speech {
    right: auto;
    left: -8px;
    background-image: url("../assets/meowa/ui/v23/order-ticket-left.png");
  }

  .shop .customer[data-slot="right"]:not(.preview) .speech {
    right: -8px;
    left: auto;
    background-image: url("../assets/meowa/ui/v23/order-ticket-right.png");
  }
}

@media (min-width: 721px) and (max-width: 1000px) and (min-height: 500px) {
  .shop .customer[data-slot="left"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: translateX(15%);
  }

  .shop .customer[data-slot="right"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: none;
  }
}

@media (min-width: 721px) and (max-width: 760px) and (min-height: 500px) {
  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure,
  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-art {
    width: 340px;
    height: 340px;
  }

  .shop .customer[data-slot="left"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: translateX(16%);
  }

  .shop .customer[data-slot="right"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: translateX(-5%);
  }
}

@media (max-width: 720px) and (orientation: portrait) {
  .hud-subline .shift-brief {
    flex-basis: 174px;
    width: min(174px, 48vw);
    min-width: 126px;
    height: 15px;
    min-height: 15px;
    padding: 1px 6px 2px;
    gap: 0 4px;
  }

  .hud-subline .shift-copy span {
    display: none;
  }

  .hud-subline .shift-act,
  .hud-subline .shift-count {
    font-size: 7px;
  }

  .hud-subline .shift-copy strong {
    font-size: 8px;
  }

  .shop .customer.preview .speech {
    top: 8px;
    right: -39px;
    left: auto;
    box-sizing: border-box;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px;
    height: 102px !important;
    padding: 6px 5px 47px;
    grid-template-rows: 12px 28px minmax(14px, 1fr);
  }

  .shop .customer.preview .order-dish {
    width: 28px;
    height: 28px;
  }

  .shop .customer.preview .next-refresh-btn {
    right: 5px;
    bottom: 5px;
    left: 5px;
  }

  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-wrap {
    top: 32px;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 173px;
    overflow: hidden;
    align-items: flex-start;
    justify-content: center;
  }

  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure,
  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-art {
    flex: 0 0 auto;
    width: 190px;
    height: 190px;
  }

  .shop .customer[data-slot="left"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: translate(22px, -3px);
  }

  .shop .customer[data-slot="right"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: translate(-8px, -3px);
  }

  .shop .customer:not(.preview) .speech {
    box-sizing: border-box;
    top: auto;
    bottom: 8px;
    width: 142px;
    height: auto;
    aspect-ratio: 600 / 180;
    padding: 7px 10px 8px;
    grid-template-columns: 31px minmax(0, 1fr);
    grid-template-rows: 18px 5px;
    column-gap: 3px;
    transform: none;
    color: #fff0c7;
    text-shadow: 0 1px 2px #120c13;
    background-image: url("../assets/meowa/ui/ingredient-button.png");
  }

  .shop .customer[data-slot="left"]:not(.preview) .speech {
    right: auto;
    left: 2px;
  }

  .shop .customer[data-slot="right"]:not(.preview) .speech {
    right: 2px;
    left: auto;
  }

  .shop .customer:not(.preview) .order-dish {
    width: 31px;
    height: 31px;
  }

  .shop .customer:not(.preview) .order-line {
    font-size: 10px;
    display: flex;
    justify-content: space-between;
    gap: 2px;
    color: #fff0c7;
  }

  .shop .customer:not(.preview) .order-level {
    font-size: 8px;
  }

  .shop .customer:not(.preview) .preference,
  .shop .customer:not(.preview) .trait-line {
    display: none;
  }

  .shop .customer:not(.preview) .patience {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    height: 5px;
  }
}

@media (max-height: 430px) and (orientation: landscape) {
  .game-shell.phase-playing .hud-subline {
    position: fixed;
    z-index: 34;
    top: 50px;
    right: auto;
    bottom: auto;
    left: max(6px, calc(50% - 248px));
    width: min(480px, calc(100vw - 12px));
    height: 13px;
    min-height: 13px;
    justify-content: flex-start;
  }

  .hud-subline .shift-brief {
    flex-basis: 188px;
    width: min(188px, 34vw);
    min-width: 148px;
    height: 13px;
    min-height: 13px;
    padding: 1px 6px;
    gap: 0 4px;
  }

  .hud-subline .substat {
    min-height: 12px;
    padding-block: 1px;
    font-size: 7px;
    line-height: 1;
  }

  .hud-subline .shift-copy span {
    display: none;
  }

  .hud-subline .shift-act,
  .hud-subline .shift-count {
    font-size: 7px;
  }

  .hud-subline .shift-copy strong {
    font-size: 8px;
  }

  .shop .customer.preview .speech {
    right: -50px;
    left: auto;
  }

  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-wrap {
    top: 22px;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 94px;
    overflow: hidden;
    align-items: flex-start;
    justify-content: center;
  }

  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure,
  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-art {
    flex: 0 0 auto;
    width: 196px;
    height: 196px;
  }

  .shop .customer[data-slot="left"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: translateX(22px);
  }

  .shop .customer[data-slot="right"]:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    transform: translateX(-22px);
  }

  .shop .customer:not(.preview) .speech {
    top: auto;
    bottom: 5px;
    width: 112px;
    height: auto;
    aspect-ratio: 560 / 425;
    padding: 20px 12px 17px;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: 20px 15px 5px;
    column-gap: 3px;
    transform: none;
  }

  .shop .customer[data-slot="left"]:not(.preview) .speech {
    right: auto;
    left: 0;
  }

  .shop .customer[data-slot="right"]:not(.preview) .speech {
    right: 0;
    left: auto;
  }

  .shop .customer:not(.preview) .order-dish {
    width: 28px;
    height: 28px;
  }

  .shop .customer:not(.preview) .order-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 0;
    font-size: 9px;
  }

  .shop .customer:not(.preview) .order-level,
  .shop .customer:not(.preview) .preference.special {
    font-size: 8px;
  }

  .shop .customer:not(.preview) .trait-line {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-wrap,
  .shop .customer:is(
    .guest-lotus,
    .guest-ink,
    .guest-jade,
    .guest-opera,
    .guest-silver,
    .guest-guardian
  ):not(.preview) .alien-figure {
    animation: none !important;
  }
}
