.cc-card-portrait {
  isolation: isolate;
  transition-property: height;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.cc-card-portrait.has-photo {
  height: auto;
  aspect-ratio: 3 / 4;
}

.cc-card-portrait.has-photo::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 112px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(11, 7, 42, 0), rgba(11, 7, 42, 0.52));
}

.cc-card-portrait #card-dog-photo,
.cc-frame-portrait #frame-dog-photo {
  position: relative;
  z-index: 0;
  opacity: 1;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}

.cc-card-portrait #card-dog-photo {
  object-fit: contain;
}

.cc-card-portrait #aura-canvas,
.cc-frame-portrait #frame-aura-canvas {
  z-index: 1;
  pointer-events: none;
  transition-property: opacity;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

.cc-card-portrait.has-generated #aura-canvas,
.cc-frame-portrait.has-generated #frame-aura-canvas {
  opacity: 0;
}

.cc-model-selector {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: none;
  padding: 6px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(16, 11, 55, 0.72);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 24px rgba(3, 2, 18, 0.28);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}

.cc-model-selector.is-visible {
  display: block;
}

.cc-model-selector::before,
.cc-model-selector::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 6px;
  bottom: 6px;
  width: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease-out;
}

.cc-model-selector::before {
  left: 6px;
  background: linear-gradient(to right, rgba(16, 11, 55, 0.96), rgba(16, 11, 55, 0));
}

.cc-model-selector::after {
  right: 6px;
  background: linear-gradient(to left, rgba(16, 11, 55, 0.96), rgba(16, 11, 55, 0));
}

.cc-model-selector.can-scroll-left::before,
.cc-model-selector.can-scroll-right::after {
  opacity: 1;
}

.cc-model-scroll {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 28px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cc-model-scroll::-webkit-scrollbar {
  display: none;
}

.cc-model-chip {
  position: relative;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  scroll-margin-inline: 28px;
  scroll-snap-align: start;
  border: 0;
  border-radius: 18px;
  background: rgba(247, 243, 237, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: rgba(247, 243, 237, 0.78);
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  transition-property: transform, background-color, color, box-shadow, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.cc-model-chip:hover {
  background: rgba(247, 243, 237, 0.17);
  color: #fff;
}

.cc-model-chip:active:not(:disabled) {
  transform: scale(0.96);
}

.cc-model-chip:focus-visible {
  outline: 2px solid #f1cb60;
  outline-offset: 2px;
}

.cc-model-chip.is-active {
  background: #f1cb60;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    0 2px 8px rgba(241, 203, 96, 0.22);
  color: #1b1560;
}

.cc-model-chip.is-requested:not(.is-active) {
  box-shadow: inset 0 0 0 1px rgba(241, 203, 96, 0.68);
  color: #fff;
}

.cc-model-chip.is-loading {
  padding-left: 32px;
}

.cc-model-chip.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 13px;
  width: 11px;
  height: 11px;
  margin-top: -6px;
  border: 1.5px solid rgba(247, 243, 237, 0.28);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: cc-model-spin 0.8s linear infinite;
}

.cc-model-chip.is-error {
  box-shadow: inset 0 0 0 1px rgba(255, 153, 153, 0.72);
  color: #ffd1d1;
}

.cc-model-chip:disabled {
  cursor: wait;
  opacity: 0.62;
}

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

.cc-model-status.is-actionable {
  position: static;
  width: auto;
  height: auto;
  padding: 7px 10px 3px;
  overflow: visible;
  clip: auto;
  color: #ffd1d1;
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-align: center;
  text-wrap: pretty;
  white-space: normal;
}

.cc-model-selector.is-refresh-required .cc-model-chip:disabled {
  cursor: default;
  opacity: 0.72;
}

.cc2-photo-note {
  max-width: 470px;
  margin: 10px auto 0;
  color: rgba(255, 255, 255, 0.66);
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
  text-wrap: pretty;
}

@keyframes cc-model-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
  .cc-model-selector {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .cc-model-chip {
    min-height: 42px;
    padding-right: 13px;
    padding-left: 13px;
    font-size: 8px;
  }

  .cc-model-chip.is-loading {
    padding-left: 31px;
  }
}

@media print {
  .cc-model-selector,
  .cc-card-portrait.has-photo::after {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-card-portrait,
  .cc-card-portrait #aura-canvas,
  .cc-frame-portrait #frame-aura-canvas,
  .cc-model-chip {
    transition-duration: 0.01ms;
  }

  .cc-model-chip.is-loading::before {
    animation-duration: 1.6s;
  }
}
